/* ============================================
   Tamil Paalam — Design System
   Colors: Charcoal (#1C1C1E) + Amber (#F59E0B)
   ============================================ */

:root {
  --charcoal:       #1C1C1E;
  --charcoal-soft:  #2C2C2E;
  --charcoal-card:  #3A3A3C;
  --charcoal-border:#424244;
  --amber:          #F59E0B;
  --amber-light:    #FBBF24;
  --amber-dark:     #D97706;
  --amber-glow:     #FFFBEB;
  --amber-muted:    #FDE68A;
  --white:          #FFFFFF;
  --offwhite:       #F9F9F9;
  --gray-100:       #F3F4F6;
  --gray-200:       #E5E7EB;
  --gray-400:       #9CA3AF;
  --gray-600:       #6B7280;
  --black:          #111111;
  --success:        #22C55E;
  --danger:         #EF4444;
  --warning:        #F59E0B;
  --info:           #3B82F6;
  --sidebar-w:      270px;
}

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

body {
  font-family: 'Catamaran', 'Noto Sans Tamil', 'Segoe UI', system-ui, sans-serif;
  background: var(--offwhite);
  color: var(--black);
  font-size: 14px;
  line-height: 1.65;
}

a { color: var(--black); text-decoration: none; }
a:hover { color: var(--amber-dark); }

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

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--charcoal);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.26s;
}

.sidebar-brand {
  padding: 24px 22px 20px;
  border-bottom: 1px solid var(--charcoal-border);
  background: var(--charcoal-soft);
}

.sidebar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.sidebar-brand-icon {
  width: 46px; height: 38px;
  background: var(--white);
  border-radius: 8px;
  display: block;
  object-fit: contain;
  padding: 3px;
  flex-shrink: 0;
}

.sidebar-brand h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.5px;
}

.sidebar-brand p {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  line-height: 1.4;
  margin-top: 2px;
}

.sidebar-role-badge {
  display: inline-block;
  margin-top: 10px;
  background: var(--amber);
  color: var(--charcoal);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
}

.sidebar-nav { flex: 1; padding: 14px 0; }

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  padding: 18px 22px 6px;
  font-weight: 600;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 22px;
  color: rgba(255,255,255,0.60);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-nav a:hover {
  background: rgba(245,158,11,0.12);
  color: var(--white);
  border-left-color: rgba(245,158,11,0.45);
}

.sidebar-nav a.active {
  background: rgba(245,158,11,0.20);
  color: var(--amber);
  border-left-color: var(--amber);
  font-weight: 700;
}

.sidebar-nav a .icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bootstrap Icons sizing in UI */
.bi { line-height: 1; vertical-align: -0.125em; }
.bi-lg { font-size: 1.25rem; }
.bi-xl { font-size: 1.5rem; }
.bi-2x { font-size: 2rem; }
.bi-3x { font-size: 3rem; }

.sidebar-nav a .badge-count {
  margin-left: auto;
  background: var(--amber);
  color: var(--charcoal);
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.sidebar-divider {
  height: 1px;
  background: var(--charcoal-border);
  margin: 10px 22px;
}

.sidebar-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--charcoal-border);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
}

.sidebar-footer strong { color: rgba(255,255,255,0.55); }

/* Tamil nav labels */
.nav-label { display: flex; flex-direction: column; line-height: 1.2; }
.nav-label small {
  font-size: 10px; font-weight: 400;
  color: rgba(255,255,255,0.35);
  font-family: 'Noto Sans Tamil', 'Catamaran', sans-serif;
  letter-spacing: 0;
}
.sidebar-nav a.active .nav-label small { color: rgba(245,158,11,0.65); }

/* Tamil brand subtitle */
.sidebar-brand-tamil {
  font-family: 'Noto Sans Tamil', 'Catamaran', sans-serif;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-top: 1px; letter-spacing: 0;
}

/* Tamil text utility class */
.ta { font-family: 'Noto Sans Tamil', 'Catamaran', sans-serif; }
.ta-sm { font-family: 'Noto Sans Tamil', 'Catamaran', sans-serif; font-size: 11px; color: var(--gray-400); font-weight: 400; }
.bilingual small { display: block; font-size: 11px; font-family: 'Noto Sans Tamil', 'Catamaran', sans-serif; color: var(--gray-400); font-weight: 400; margin-top: 1px; }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--charcoal);
  border-bottom: 2.5px solid var(--amber);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 16px rgba(0,0,0,0.28);
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* Vertical amber rule separating hamburger from title */
.topbar-left .hamburger + .topbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(245,158,11,0.35);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding-left: 2px;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.topbar-user-info { display: flex; flex-direction: column; }

.topbar-user-name {
  font-weight: 700;
  color: var(--white);
  font-size: 13px;
  line-height: 1.2;
}

.topbar-user-role {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  line-height: 1.2;
  font-weight: 500;
}

.topbar-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  transition: all 0.15s;
  white-space: nowrap;
  margin-left: 4px;
}

.topbar-signout:hover {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border-color: rgba(245,158,11,0.45);
}

/* Language toggle on dark topbar */
.topbar .btn-ghost {
  color: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
}
.topbar .btn-ghost:hover {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border-color: rgba(245,158,11,0.45);
}

/* Hamburger lines white on dark topbar */
.topbar .hamburger {
  border-color: rgba(255,255,255,0.18);
}
.topbar .hamburger:hover {
  border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.10);
}
.topbar .hamburger-line { background: rgba(255,255,255,0.80); }

/* ── PAGE BODY ── */
.page-body { padding: 30px; flex: 1; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-header-text h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.3px;
}

.page-header-text p { font-size: 13px; color: var(--gray-600); margin-top: 3px; }
.page-header-actions { display: flex; gap: 10px; align-items: flex-start; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.card-title { font-size: 14px; font-weight: 700; color: var(--black); letter-spacing: 0.1px; }
.card-gold { border-top: 3px solid var(--amber); }

/* ── KPI TILES ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-tile {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 22px 20px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: block;
  position: relative;
  overflow: hidden;
}

.kpi-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--amber);
}

.kpi-tile:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
  border-color: var(--amber-muted);
}

.kpi-tile-icon { font-size: 22px; margin-bottom: 10px; display: block; }

.kpi-label {
  font-size: 11.5px;
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 34px;
  font-weight: 900;
  color: var(--black);
  line-height: 1;
  letter-spacing: -1px;
}

.kpi-tile.kpi-alert .kpi-value { color: var(--danger); }
.kpi-tile.kpi-warn  .kpi-value { color: var(--amber-dark); }
.kpi-tile.kpi-gold  .kpi-value { color: var(--amber-dark); }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft                { background: #F1F1F1; color: #555; }
.badge-submitted            { background: var(--amber-glow); color: #92400E; border: 1px solid var(--amber-muted); }
.badge-pending_nrt          { background: var(--amber-glow); color: #92400E; border: 1px solid var(--amber-muted); }
.badge-pending_verification { background: #EDE9FE; color: #5B21B6; }
.badge-approved             { background: #DCFCE7; color: #14532D; }
.badge-clarification_needed { background: #FFF7ED; color: #9A3412; }
.badge-rejected             { background: #FEE2E2; color: #7F1D1D; }
.badge-nrt_rejected         { background: #FEE2E2; color: #7F1D1D; }
.badge-routed_to_expert     { background: #DBEAFE; color: #1E3A8A; }
.badge-expert_accepted      { background: #D1FAE5; color: #065F46; }
.badge-alternate_suggested  { background: #FEF9C3; color: #713F12; }
.badge-declined             { background: #FEE2E2; color: #7F1D1D; }
.badge-mutually_confirmed   { background: var(--amber); color: var(--charcoal); font-weight: 800; }
.badge-deferred              { background: #FEF3C7; color: #92400E; }
.badge-pending_expert       { background: var(--amber-glow); color: #92400E; border: 1px solid var(--amber-muted); }
.badge-scheduled            { background: #FEF9C3; color: #713F12; }
.badge-reschedule_requested { background: #FFF7ED; color: #9A3412; }
.badge-completed            { background: var(--charcoal); color: var(--amber); }
.badge-gold                 { background: var(--amber); color: var(--charcoal); }

/* ── TABLES ── */
.table-wrapper { overflow-x: auto; }

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

thead th {
  background: var(--charcoal);
  color: var(--amber);
  padding: 12px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  font-size: 13.5px;
}

tbody tr:hover { background: var(--amber-glow); }
tbody tr:last-child td { border-bottom: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--amber);
  color: var(--charcoal);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--charcoal);
}

.btn-dark {
  background: var(--charcoal);
  color: var(--amber);
  border-color: var(--charcoal);
}
.btn-dark:hover {
  background: var(--charcoal-soft);
  color: var(--amber-light);
}

.btn-outline {
  background: transparent;
  border-color: var(--gray-200);
  color: var(--black);
}
.btn-outline:hover {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.btn-success  { background: var(--success);  color: var(--white); border-color: var(--success); }
.btn-success:hover { opacity: 0.88; }

.btn-danger   { background: var(--danger);   color: var(--white); border-color: var(--danger); }
.btn-danger:hover { opacity: 0.88; }

.btn-warning  { background: var(--warning);  color: var(--white); border-color: var(--warning); }
.btn-warning:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--black); background: var(--gray-100); }

.btn-sm    { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg    { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { margin-bottom: 22px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-control:focus, .form-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.18);
}

.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 8px;
}

.form-check-input {
  width: 16px; height: 16px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--amber);
  flex-shrink: 0;
}

.form-check-label { font-size: 13px; cursor: pointer; line-height: 1.5; }
.form-hint  { font-size: 12px; color: var(--gray-600); margin-top: 5px; line-height: 1.4; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── ALERTS ── */
.alert {
  padding: 13px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid;
}

.alert-success { background: #F0FDF4; border-color: var(--success); color: #14532D; }
.alert-error   { background: #FEF2F2; border-color: var(--danger);  color: #7F1D1D; }
.alert-warning { background: var(--amber-glow); border-color: var(--amber); color: #78350F; }
.alert-info    { background: #EFF6FF; border-color: var(--info); color: #1E3A8A; }
.alert-gold    { background: var(--amber-glow); border-color: var(--amber); color: var(--black); font-weight: 500; }

/* ── TOASTS (flash messages) ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 40px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 10px 28px rgba(0,0,0,0.10);
  border-left: 4px solid;
  font-size: 13px;
  line-height: 1.45;
  animation: toast-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-leaving {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(24px); }
}

.toast-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-text { flex: 1; color: var(--black); }
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 16px; line-height: 1;
  padding: 0; flex-shrink: 0; margin-top: 1px;
  transition: color 0.15s;
}
.toast-close:hover { color: var(--black); }

.toast-success { border-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error   { border-color: var(--danger); }
.toast-error .toast-icon   { color: var(--danger); }
.toast-warning { border-color: var(--amber); }
.toast-warning .toast-icon { color: var(--amber-dark); }
.toast-info    { border-color: var(--info); }
.toast-info .toast-icon    { color: var(--info); }

@media (max-width: 480px) {
  .toast-container { top: 12px; right: 12px; left: 12px; max-width: none; width: auto; }
}

/* ── STATUS STEPPER ── */
.status-steps {
  display: flex;
  align-items: stretch;
  margin-bottom: 28px;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  gap: 4px;
  border-right: 1px solid var(--gray-200);
  background: var(--white);
}

.step:last-child { border-right: none; }
.step .step-icon { font-size: 16px; }

.step.done   { background: var(--charcoal); color: var(--amber); }
.step.active { background: var(--amber); color: var(--charcoal); font-weight: 800; }

/* ── EXPERT CARD (MASKED) ── */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.expert-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 22px;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.expert-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  border-color: var(--amber);
}

.expert-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.expert-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--charcoal);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.expert-ref   { font-size: 10px; color: var(--gray-400); font-family: monospace; margin-bottom: 4px; }
.expert-title { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 3px; line-height: 1.3; }

.expert-meta {
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.expert-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-400); display: inline-block; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.tag {
  background: var(--amber-glow);
  color: var(--black);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--amber-muted);
}

.tag-dark {
  background: var(--charcoal);
  color: var(--amber);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
}

.expert-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  background: var(--white);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
}

.filter-bar .form-control,
.filter-bar .form-select { max-width: 200px; }

.filter-bar label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ── QUEUE TABS ── */
.queue-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.queue-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.queue-tab:hover {
  border-color: var(--amber);
  color: var(--black);
}

.queue-tab.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--amber);
}

.queue-tab .count {
  background: var(--amber);
  color: var(--charcoal);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 800;
}

.queue-tab.active .count {
  background: var(--amber);
  color: var(--charcoal);
}

/* ── GRID UTILS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 70px 20px; color: var(--gray-600); }
.empty-state .icon { font-size: 44px; margin-bottom: 14px; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--black); margin-bottom: 7px; }
.empty-state p { font-size: 13px; max-width: 320px; margin: 0 auto; }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; background: var(--charcoal); }

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--charcoal);
  flex-direction: column;
}

.auth-brand-block { text-align: center; max-width: 380px; }

.auth-brand-icon {
  width: 72px; height: 72px;
  background: var(--amber);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--charcoal);
  margin: 0 auto 20px;
  letter-spacing: -2px;
}

.auth-brand-block h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-brand-block .tagline { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.6; margin-bottom: 32px; }

.auth-feature-list { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 14px; }

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.auth-feature-list li .fi {
  width: 28px; height: 28px;
  background: rgba(245,158,11,0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.auth-right {
  width: 480px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  flex-shrink: 0;
}

.auth-form-wrap { width: 100%; max-width: 360px; }
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h2 { font-size: 22px; font-weight: 800; color: var(--black); margin-bottom: 5px; }
.auth-form-header p { font-size: 13px; color: var(--gray-600); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--gray-400);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── ACTION PANELS ── */
.action-panel {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 10px;
  background: var(--white);
  transition: border-color 0.15s;
}

.action-panel:hover { border-color: var(--amber); }
.action-panel.danger  { border-color: #FECACA; background: #FFF5F5; }
.action-panel.warning { border-color: var(--amber-muted); background: var(--amber-glow); }
.action-panel.success { border-color: #BBF7D0; background: #F0FDF4; }

.action-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ── NOTICE BAR ── */
.notice-bar {
  background: var(--amber);
  padding: 10px 30px;
  font-size: 13px;
  color: var(--charcoal);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── QUICK STAT ROW ── */
.stat-row {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.stat-item {
  flex: 1;
  padding: 18px 20px;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}

.stat-item:last-child { border-right: none; }
.stat-item-value { font-size: 26px; font-weight: 900; color: var(--black); }
.stat-item-label { font-size: 11px; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── DETAIL TABLE ── */
.detail-table { width: 100%; }
.detail-table tr td:first-child {
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 9px 0;
  width: 42%;
  vertical-align: top;
}
.detail-table tr td:last-child { padding: 9px 0; font-size: 14px; }
.detail-table tr { border-bottom: 1px solid var(--gray-100); }
.detail-table tr:last-child { border-bottom: none; }

/* ── VERIFICATION CARD ── */
.verify-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.verify-card:hover { border-color: var(--amber); }

.verify-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--offwhite);
}

.verify-card-body { padding: 20px 22px; }

.verify-card-actions {
  padding: 16px 22px;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ── DASHBOARD QUICK LINKS ── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.quick-link {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.quick-link:hover {
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.quick-link-icon {
  width: 40px; height: 40px;
  background: var(--amber-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.quick-link-title { font-size: 14px; font-weight: 700; color: var(--black); }
.quick-link-desc  { font-size: 12px; color: var(--gray-600); line-height: 1.4; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-muted); }

/* ── TABLE RESPONSIVE ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; }

/* ── BADGE COLOR ALIASES ── */
.badge-green  { background: #DCFCE7; color: #14532D; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-red    { background: #FEE2E2; color: #7F1D1D; }
.badge-blue   { background: #DBEAFE; color: #1E3A8A; }
.badge-gray   { background: #F1F5F9; color: #475569; }

/* ── HAMBURGER BUTTON (hidden on desktop) ── */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.hamburger:hover { border-color: var(--charcoal); background: var(--gray-100); }
.hamburger-line {
  display: block;
  width: 18px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  pointer-events: none;
  transition: transform 0.25s, opacity 0.25s;
}
.sidebar-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-open .hamburger-line:nth-child(2) { opacity: 0; }
.sidebar-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 99;
  cursor: pointer;
}
.sidebar-open .sidebar-overlay { display: block; }
.sidebar-open .sidebar {
  transform: translateX(0) !important;
  box-shadow: 4px 0 32px rgba(0,0,0,0.30);
}

/* ── TOPBAR SIGN-OUT (split for responsive) ── */
.topbar-signout-icon { font-size: 16px; line-height: 1; }

/* ── RESPONSIVE ── */

/* Tablets & small laptops */
@media (max-width: 1100px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .quick-links { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  /* Hamburger visible */
  .hamburger { display: flex; }

  /* Sidebar off-canvas */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.26s;
  }

  /* Main fills viewport */
  .main-content { margin-left: 0; }

  /* Topbar: compact */
  .topbar { padding: 0 14px; }
  .topbar-user-info { display: none; }
  .topbar-signout-text { display: none; }
  .topbar-signout { padding: 6px 9px; margin-left: 0; }
  .topbar-user { gap: 6px; }

  /* Page body padding */
  .page-body { padding: 14px; }

  /* Page header: stack */
  .page-header { flex-direction: column; gap: 10px; }
  .page-header-actions { width: 100%; flex-wrap: wrap; gap: 8px; }

  /* KPI tiles: 2-column */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-tile { padding: 16px 14px; }
  .kpi-value { font-size: 28px; }
  .kpi-tile-icon { font-size: 20px; margin-bottom: 8px; }

  /* Column grids: single column */
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }

  /* Stat row: stack */
  .stat-row { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .stat-item:last-child { border-bottom: none; }

  /* Filter bar: stack */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .filter-bar .form-control,
  .filter-bar .form-select { max-width: 100% !important; width: 100%; }
  .filter-bar > .btn,
  .filter-bar > a { align-self: flex-start; }

  /* Tables: horizontal scroll */
  .table-responsive,
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Expert grid: single column */
  .expert-grid { grid-template-columns: 1fr; }

  /* Quick links: 2-column */
  .quick-links { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Auth pages */
  .auth-left { display: none; }
  .auth-right { width: 100%; padding: 28px 20px; }

  /* Card: slightly less padding */
  .card { padding: 16px; }
  .card-header { margin-bottom: 14px; padding-bottom: 12px; }

  /* Status steps: allow horizontal scroll on narrow screens */
  .status-steps { border-radius: 8px; }
  .step { min-width: 80px; }

  /* Notice bar */
  .notice-bar { padding: 10px 14px; font-size: 12px; }
}

/* Small phones (≤ 480px) */
@media (max-width: 480px) {
  /* Reset any min-width on date inputs so they fit on small screens */
  input[type="date"].form-control { min-width: 0; width: 100%; }
  /* Topbar */
  .topbar { padding: 0 12px; height: 54px; }
  .topbar-title { font-size: 13px; }

  /* Page body */
  .page-body { padding: 12px; }

  /* Page header */
  .page-header { margin-bottom: 18px; }
  .page-header-text h2 { font-size: 18px; }

  /* KPI */
  .kpi-tile { padding: 14px 12px; }
  .kpi-value { font-size: 24px; }
  .kpi-label { font-size: 10px; }
  .kpi-tile-icon { font-size: 18px; }

  /* Buttons */
  .btn { padding: 8px 14px; font-size: 12.5px; gap: 6px; }
  .btn-sm { padding: 5px 10px; font-size: 11.5px; }
  .btn-lg { padding: 10px 20px; font-size: 14px; }

  /* Quick links: single column */
  .quick-links { grid-template-columns: 1fr; }

  /* Auth */
  .auth-right { padding: 24px 14px; }
  .auth-form-header h2 { font-size: 19px; }
  .auth-brand-block h1 { font-size: 24px; }

  /* Tables */
  thead th { font-size: 9.5px; padding: 10px; letter-spacing: 0.5px; }
  tbody td { padding: 11px 10px; font-size: 12.5px; }

  /* Filter bar */
  .filter-bar { padding: 12px; }

  /* Tags */
  .tag, .tag-dark { font-size: 10.5px; padding: 3px 8px; }

  /* Expert card */
  .expert-card { padding: 16px; }
}
