/* ============================================================
   main.css — Global styles for StudyBridge Student Support Portal
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --color-primary:         #1a3a5c;
  --color-secondary:       #2e6da4;
  --color-accent:          #f0a500;
  --color-text-on-primary: #ffffff;
  --color-bg:              #f5f7fa;
  --color-surface:         #ffffff;
  --color-text:            #1a1a2e;
  --color-text-muted:      #6b7280;
  --color-border:          #e5e7eb;
  --color-danger:          #ef4444;
  --color-success:         #10b981;
  --sidebar-width:         240px;
  --border-radius:         8px;
  --shadow-sm:             0 1px 3px rgba(0,0,0,0.1);
  --shadow-md:             0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --transition:            0.2s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Initial Loader ─────────────────────────────────────────── */
.initial-loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  transition: opacity 0.3s ease;
}

.initial-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.initial-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.initial-loader__logo {
  width: 160px;
  height: auto;
}

/* ── App Layout ─────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
}

.sidebar-logo .tenant-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.15);
  padding: 4px;
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-on-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sidebar Nav ────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--color-secondary);
  color: var(--color-text-on-primary);
  text-decoration: none;
}

.nav-link.active {
  background-color: rgba(255,255,255,0.18);
  color: var(--color-text-on-primary);
  font-weight: 600;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg { display: block; }

/* ── Sidebar Footer ─────────────────────────────────────────── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: var(--color-text-on-primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-on-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-transform: capitalize;
}

.logout-btn {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
  width: 100%;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  overflow-y: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  padding: 28px 32px;
  width: 100%;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 24px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card__icon.blue   { background: #dbeafe; }
.stat-card__icon.green  { background: #d1fae5; }
.stat-card__icon.amber  { background: #fef3c7; }
.stat-card__icon.purple { background: #ede9fe; }

.stat-card__body {}
.stat-card__label { font-size: 12px; color: var(--color-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card__value { font-size: 28px; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.stat-card__sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Quick Action Cards ─────────────────────────────────────── */
.quick-action-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
}

.quick-action-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.quick-action-card__icon {
  font-size: 32px;
}

.quick-action-card__title {
  font-size: 16px;
  font-weight: 600;
}

.quick-action-card__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-bg);
  border-color: #c5c9cf;
}

.btn-danger {
  background-color: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
  border-color: #dc2626;
}

.btn-accent {
  background-color: var(--color-accent);
  color: #1a1a2e;
  border-color: var(--color-accent);
}

.btn-accent:hover:not(:disabled) {
  background-color: #d99300;
  border-color: #d99300;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  border-radius: 6px;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-grey   { background: #f3f4f6; color: #374151; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-red    { background: #fee2e2; color: #991b1b; }

/* ── Exam Likelihood Tags ───────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.tag.high   { color: #ef4444; }
.tag.medium { color: #f59e0b; }
.tag.low    { color: #10b981; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.form-control,
.form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(46,109,164,0.15);
}

.form-control::placeholder { color: var(--color-text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.form-error {
  font-size: 12px;
  color: var(--color-danger);
}

.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input-row .form-group {
  flex: 1;
  min-width: 140px;
}

/* ── Loading Spinner ────────────────────────────────────────── */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.loading-spinner.sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-spinner.lg {
  width: 52px;
  height: 52px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ── Skeleton Loading ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line { height: 14px; border-radius: 3px; }
.skeleton-line.w-full  { width: 100%; }
.skeleton-line.w-3-4   { width: 75%; }
.skeleton-line.w-1-2   { width: 50%; }
.skeleton-line.w-1-4   { width: 25%; }
.skeleton-line.h-20    { height: 20px; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  gap: 16px;
  color: var(--color-text-muted);
}

.empty-state__icon {
  font-size: 56px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.empty-state p {
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}

/* ── Toasts ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 320px;
  pointer-events: all;
  box-shadow: var(--shadow-md);
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-info    { background: #3b82f6; }
.toast-success { background: var(--color-success); }
.toast-error   { background: var(--color-danger); }
.toast-warning { background: #f59e0b; }

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: white;
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.modal-body  { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: background var(--transition);
}

.modal-close:hover { background: var(--color-bg); color: var(--color-text); }

/* ── Hamburger / Mobile nav toggle ─────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 150;
}

.mobile-topbar .sidebar-brand-name {
  color: var(--color-text);
  font-size: 15px;
}

/* ── Sidebar overlay for mobile ─────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}

.sidebar-overlay.active { display: block; }

/* ── Dividers ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 20px 0;
}

/* ── Section label ──────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* ── Chips / Tags ───────────────────────────────────────────── */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--color-text);
  white-space: nowrap;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }

/* ── Utilities ──────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.text-sm    { font-size: 13px; }
.text-muted { color: var(--color-text-muted); }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger,
  .mobile-topbar {
    display: flex;
  }

  .content-wrapper {
    padding: 16px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .input-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Profile Strip ──────────────────────────────────────────── */
.profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.profile-strip__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  flex: 1;
  min-width: 180px;
  border-right: 1px solid var(--color-border);
}

.profile-strip__item:last-child { border-right: none; }

.profile-strip__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.profile-strip__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.profile-strip__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

/* ── Stats Row ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── Stat Card SVG icons ────────────────────────────────────── */
.stat-card__icon svg { display: block; }
.stat-card__value--sm { font-size: 18px; padding-top: 4px; }

/* ── Quick Actions Grid ─────────────────────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 750px) {
  .quick-actions-grid { grid-template-columns: 1fr; }
}

.quick-action-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--card-accent, var(--color-secondary));
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: var(--color-text);
}

.quick-action-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.quick-action-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--color-secondary));
}

.quick-action-card__icon svg { display: block; }

.quick-action-card__title {
  font-size: 15px;
  font-weight: 600;
}

.quick-action-card__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── File icon wrap (table) ─────────────────────────────────── */
.file-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon-wrap.red  { background: #fee2e2; color: #dc2626; }
.file-icon-wrap.blue { background: #dbeafe; color: #1d4ed8; }
.file-icon-wrap svg  { display: block; }

/* ── Empty state SVG icon ───────────────────────────────────── */
.empty-state__icon {
  opacity: 0.35;
  color: var(--color-text-muted);
}

.empty-state__icon svg { display: block; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--color-text-muted); margin-bottom:16px; }
.breadcrumb a { color:var(--color-text-muted); text-decoration:none; }
.breadcrumb a:hover { color:var(--color-primary); }
.breadcrumb__sep { opacity:0.4; }
.breadcrumb__current { color:var(--color-text); font-weight:500; }

/* ── Nav role shortcuts ─────────────────────────────────────── */
.nav-shortcuts-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 8px 12px;
}

.nav-link--shortcut {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.12);
}

.nav-link--shortcut:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--color-text-on-primary);
}

/* ── Sidebar footer action row ──────────────────────────────── */
.sidebar-footer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sidebar-footer-actions .logout-btn {
  flex: 1;
}

/* ── Dark mode toggle button ────────────────────────────────── */
.dark-mode-btn {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 8px;
  flex-shrink: 0;
}

.dark-mode-btn:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

.dark-mode-btn__icon {
  display: flex;
  align-items: center;
}

/* ── Dark Mode ──────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-primary: #4a90d9;
  --color-secondary: #5ba3e8;
  --color-bg: #0f1117;
  --color-surface: #1a1d27;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: #2d3748;
}
[data-theme="dark"] body { background-color: var(--color-bg); }
[data-theme="dark"] .sidebar { background: #12151f; border-right-color: var(--color-border); }
[data-theme="dark"] .auth-container { background: var(--color-surface); }
[data-theme="dark"] .card, [data-theme="dark"] .stat-card, [data-theme="dark"] .quick-action-card { background: var(--color-surface); border-color: var(--color-border); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: #1a1d27; border-color: var(--color-border); color: var(--color-text); }
[data-theme="dark"] .modal-box { background: var(--color-surface); }
[data-theme="dark"] .auth-page { background: linear-gradient(135deg, #0f1117 0%, #1a1d27 100%); }
