html {
  font-size: 15px;
}

body.portal-body {
  background: #f4f6fb;
  color: #1f2937;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

.app-header {
  background: linear-gradient(120deg, #1f4fff, #7c3aed);
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 10px 25px rgba(31, 79, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-title {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}

.app-subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
}

.portal-container {
  padding: 1.5rem 1.25rem 3rem;
}

.portal-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.portal-sidebar {
  width: 280px;
  min-width: 260px;
  background: #fff;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  border: 1px solid #eef1f6;
  position: sticky;
  top: 88px;
  height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #111827;
}

.folder-tree {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.folder-node {
  margin: 0.2rem 0;
}

.folder-children {
  list-style: none;
  padding-left: 1.1rem;
  margin-top: 0.35rem;
}

.folder-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #374151;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.folder-link:hover {
  background: #f1f5ff;
  color: #1f4fff;
}

.folder-link.active {
  background: #1f4fff;
  color: #fff;
  box-shadow: 0 8px 16px rgba(31, 79, 255, 0.2);
}

.filters-panel {
  background: #fff;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  border: 1px solid #eef1f6;
  margin-bottom: 1.5rem;
}

.search-input {
  position: relative;
}

.search-input i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-input input {
  padding-left: 2.4rem;
  border-radius: 12px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tag-chip input {
  display: none;
}

.tag-chip.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.doc-card {
  border: none;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
}

.doc-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-card .breadcrumb-path {
  font-size: 0.85rem;
  color: #6b7280;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.doc-meta .badge {
  font-weight: 500;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-view-header {
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  margin-bottom: 1.5rem;
}

.pdf-frame {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.pdf-frame iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 12px;
}

.pdf-fallback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1020;
}

.sidebar-open .sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 991.98px) {
  .portal-layout {
    flex-direction: column;
  }

  .portal-sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    height: calc(100vh - 72px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1025;
  }

  .sidebar-open .portal-sidebar {
    transform: translateX(0);
  }
}