.filter-section-container {
  margin-bottom: 24px;
  padding: 0 2px;
}

.res-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.res-chip {
  padding: 6px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.res-chip:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.res-chip.active {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

.res-filters {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.res-filter-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: start;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.res-filter-row + .res-filter-row {
  border-top: 0;
}

.res-filter-label {
  padding-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.section-header {
  gap: 12px;
}

.section-header .tag {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  box-shadow: none;
}

.res-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.res-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.res-card:hover {
  border-color: #e2e8f0;
  background: #ffffff;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.res-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.res-card-head-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.res-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  flex: 1;
}

.res-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
  flex-wrap: wrap;
}

.res-card-actions {
  display: flex;
  gap: 8px;
}

.res-file-icon {
  width: 46px;
  height: 54px;
}

.res-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  background: #f1f5fb;
  color: #5f6f86;
  text-transform: uppercase;
  width: fit-content;
  border: 0;
}

.res-tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 7px;
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.empty-state-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #64748b;
}

.res-modal {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: none;
}

.res-modal-card,
.preview-fullscreen .res-modal-card {
  border-radius: 18px;
  border: 1px solid #e7edf3;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transform: none;
  transition: none;
}

.res-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid #eef2f6;
  background: #ffffff;
}

.res-modal-head h3 {
  font-size: 17px;
}

.res-modal-body {
  padding: 20px;
  background: #f7f9fc;
}

.docx-container,
.preview-fullscreen .res-docx {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: none;
}

.resource-preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

.pptx-preview {
  display: grid;
  gap: 14px;
}

.pptx-slide {
  background: #ffffff;
  border: 1px solid #e7edf3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.pptx-slide-head {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid #e7edf3;
}

.pptx-slide-body {
  padding: 14px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.65;
  display: grid;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.pptx-slide-body p {
  margin: 0;
}

.pptx-muted {
  color: #94a3b8;
}

@media (max-width: 900px) {
  .filter-section-container {
    margin-bottom: 22px;
  }

  .res-filters {
    padding: 16px;
    border-radius: 16px;
  }

  .res-filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .res-filter-label {
    padding-top: 0;
  }

  .section-header {
    flex-wrap: wrap;
    align-items: flex-start !important;
  }

  .res-list-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .res-card {
    padding: 16px;
  }

  .res-modal {
    padding: 12px;
  }

  .res-modal-card,
  .preview-fullscreen .res-modal-card {
    width: 100%;
    max-width: 100%;
    height: 92vh;
    max-height: 92vh;
    border-radius: 16px;
  }

  .res-modal-head {
    padding: 16px 18px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .res-modal-body {
    padding: 14px;
  }
}
