/* ============================================================
   STUDENT PORTAL — 8-COLOR DESIGN SYSTEM WITH 6 THEMES
   ============================================================
   Color Tokens (C1-C8) + Semantic Aliases
   Themes: Midnight, Dark, Classic, Light, Green, Pink
   ============================================================ */

/* DEFAULT: MIDNIGHT THEME (Deep Navy + Cyan) */
:root {
  --c1: #000000;
  --c2: #1E293B;
  --c3: #334155;
  --c4: #06B6D4;
  --c5: #8B5CF6;
  --c6: #10B981;
  --c7: #F59E0B;
  --c8: #F1F5F9;

  /* Semantic aliases — use these instead of color tokens */
  --bg-app:       var(--c1);
  --bg-surface:   var(--c2);
  --bg-elevated:  #243044;
  --border:       var(--c3);
  --accent:       var(--c4);
  --accent-2:     var(--c5);
  --success:      var(--c6);
  --warning:      var(--c7);
  --text-primary: var(--c8);
  --text-muted:   #94A3B8;
  --text-subtle:  #64748B;

  /* Effects */
  --glow-accent:  0 0 20px rgba(6, 182, 212, 0.15);
  --glow-violet:  0 0 20px rgba(139, 92, 246, 0.15);

  /* Spacing & radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --transition:  all 0.2s ease;
}

/* ────────────────────────────────────────────────────────
   THEME 1: MIDNIGHT (default — deep navy + cyan)
   ──────────────────────────────────────────────────────── */
[data-theme="midnight"] {
  --c1: #000000; --c2: #1E293B; --c3: #334155;
  --c4: #06B6D4; --c5: #8B5CF6; --c6: #10B981; --c7: #F59E0B; --c8: #F1F5F9;
  --bg-elevated: #243044; --text-muted: #94A3B8; --text-subtle: #64748B;
}

/* ────────────────────────────────────────────────────────
   THEME 2: DARK (charcoal black + emerald)
   ──────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --c1: #000000; --c2: #0E1520; --c3: #1C2A3A;
  --c4: #10B981; --c5: #06B6D4; --c6: #22C55E; --c7: #F59E0B; --c8: #E2E8F0;
  --bg-elevated: #162030; --text-muted: #7B9BB5; --text-subtle: #4D6A82;
  --glow-accent: 0 0 20px rgba(16, 185, 129, 0.18);
}

/* ────────────────────────────────────────────────────────
   THEME 3: CLASSIC (royal blue + sky blue)
   ──────────────────────────────────────────────────────── */
[data-theme="classic"] {
  --c1: #0B1730; --c2: #112348; --c3: #1D3561;
  --c4: #3B82F6; --c5: #06B6D4; --c6: #10B981; --c7: #F59E0B; --c8: #EFF6FF;
  --bg-elevated: #183059; --text-muted: #93B4D8; --text-subtle: #5B7FA8;
  --glow-accent: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* ────────────────────────────────────────────────────────
   THEME 4: LIGHT (clean white + teal)
   ──────────────────────────────────────────────────────── */
[data-theme="light"] {
  --c1: #F0F4F8; --c2: #FFFFFF; --c3: #DDE3ED;
  --c4: #0891B2; --c5: #7C3AED; --c6: #059669; --c7: #D97706; --c8: #0F172A;
  --bg-elevated: #E8EEF6; --text-muted: #5A6A7E; --text-subtle: #8A96A3;
  --glow-accent: 0 4px 16px rgba(8, 145, 178, 0.12);
}
[data-theme="light"] .navbar       { background: #FFFFFF; border-color: #DDE3ED; }
[data-theme="light"] .navbar-college-name { color: #0f172a; }
[data-theme="light"] .navbar-portal-label { color: #0891b2; }
[data-theme="light"] .sidebar      { background: #FFFFFF; border-color: #DDE3ED; }
[data-theme="light"] .profile-card { background: linear-gradient(135deg, rgba(8,145,178,0.06), rgba(124,58,237,0.06)); }
[data-theme="light"] .card         { background: #FFFFFF; border-color: #DDE3ED; }
[data-theme="light"] .stat-card    { background: #FFFFFF; border-color: #DDE3ED; }
[data-theme="light"] .portal-header{ background: #FFFFFF; border-color: #DDE3ED; }
[data-theme="light"] .nav-tab:hover{ background: #F0F4F8; }
[data-theme="light"] .nav-tab.active{ background: rgba(8,145,178,0.08); }
[data-theme="light"] .info-item:hover { background: #F0F4F8; }
[data-theme="light"] .data-table th { background: rgba(220,228,240,0.6); }
[data-theme="light"] .data-table tr:hover td { background: rgba(220,228,240,0.3); }
[data-theme="light"] .theme-btn    { border-color: #DDE3ED; color: #5A6A7E; }
[data-theme="light"] .nav-icon-btn { background: #F0F4F8; color: #5A6A7E; }
[data-theme="light"] .nav-badge-text { color: #5A6A7E; }

/* ────────────────────────────────────────────────────────
   THEME 5: GREEN (light fresh mint + emerald)
   ──────────────────────────────────────────────────────── */
[data-theme="green"] {
  --c1: #f0fdf4; --c2: #ffffff; --c3: #bbf7d0;
  --c4: #16a34a; --c5: #0891b2; --c6: #059669; --c7: #d97706; --c8: #14532d;
  --bg-elevated: #dcfce7; --text-muted: #4d7c5f; --text-subtle: #86a898;
  --glow-accent: 0 4px 16px rgba(22, 163, 74, 0.15);
  --border: #bbf7d0;
}
[data-theme="green"] .navbar        { background: #ffffff; border-color: #bbf7d0; box-shadow: 0 2px 12px rgba(22,163,74,0.08); }
[data-theme="green"] .sidebar       { background: #ffffff; border-color: #bbf7d0; }
[data-theme="green"] .profile-card  { background: linear-gradient(135deg, rgba(22,163,74,0.08), rgba(8,145,178,0.06)); border-color: #bbf7d0; }
[data-theme="green"] .card          { background: #ffffff; border-color: #bbf7d0; }
[data-theme="green"] .stat-card     { background: #ffffff; border-color: #bbf7d0; }
[data-theme="green"] .portal-header { background: #ffffff; border-color: #bbf7d0; }
[data-theme="green"] .nav-tab       { color: #4d7c5f; }
[data-theme="green"] .nav-tab:hover { background: #dcfce7; color: #14532d; }
[data-theme="green"] .nav-tab.active{ background: rgba(22,163,74,0.12); color: #16a34a; border-color: rgba(22,163,74,0.35); }
[data-theme="green"] .info-item:hover { background: #dcfce7; }
[data-theme="green"] .data-table th { background: rgba(187,247,208,0.6); color: #14532d; }
[data-theme="green"] .data-table td { color: #14532d; }
[data-theme="green"] .data-table tr:hover td { background: rgba(220,252,231,0.5); }
[data-theme="green"] .theme-btn     { border-color: #bbf7d0; color: #4d7c5f; }
[data-theme="green"] .nav-icon-btn  { background: #dcfce7; color: #16a34a; }
[data-theme="green"] .nav-badge-text{ color: #4d7c5f; }
[data-theme="green"] .btn-primary   { background: #16a34a; color: #ffffff; }
[data-theme="green"] .btn-primary:hover { background: #15803d; box-shadow: 0 4px 16px rgba(22,163,74,0.3); }
[data-theme="green"] .btn-secondary { background: rgba(22,163,74,0.10); color: #16a34a; border-color: rgba(22,163,74,0.3); }
[data-theme="green"] .navbar-logo   { background: linear-gradient(135deg, #16a34a, #0891b2); color: #ffffff; }
[data-theme="green"] .avatar-ring   { background: linear-gradient(135deg, #16a34a, #0891b2); }
[data-theme="green"] .card-title-icon { background: rgba(22,163,74,0.12); color: #16a34a; }
[data-theme="green"] .portal-title  { color: #14532d; }
[data-theme="green"] .portal-subtitle { color: #16a34a; }
[data-theme="green"] .stat-value    { color: #14532d; }
[data-theme="green"] .stat-label    { color: #4d7c5f; }
[data-theme="green"] .stat-detail   { color: #4d7c5f; }
[data-theme="green"] .navbar-college-name { color: #052e16; font-weight: 900; }
[data-theme="green"] .navbar-portal-label { color: #16a34a; }
[data-theme="green"] .profile-name  { color: #14532d; }
[data-theme="green"] .info-value    { color: #14532d; }
[data-theme="green"] .link-cyan     { color: #16a34a; }
[data-theme="green"] .link-cyan:hover { color: #15803d; }
[data-theme="green"] .nav-avatar    { background: linear-gradient(135deg, #16a34a, #0891b2); color: #ffffff; }
[data-theme="green"] .status-dot    { background: #16a34a; }
[data-theme="green"] .section-label { color: #4d7c5f; }
[data-theme="green"] .section-label::before { background: #16a34a; }

/* ────────────────────────────────────────────────────────
   THEME 6: PINK (light rose + vibrant magenta)
   ──────────────────────────────────────────────────────── */
[data-theme="pink"] {
  --c1: #fdf2f8; --c2: #ffffff; --c3: #fbcfe8;
  --c4: #db2777; --c5: #7c3aed; --c6: #059669; --c7: #d97706; --c8: #831843;
  --bg-elevated: #fce7f3; --text-muted: #9d4e70; --text-subtle: #c490a8;
  --glow-accent: 0 4px 16px rgba(219, 39, 119, 0.15);
  --border: #fbcfe8;
}
[data-theme="pink"] .navbar        { background: #ffffff; border-color: #fbcfe8; box-shadow: 0 2px 12px rgba(219,39,119,0.08); }
[data-theme="pink"] .sidebar       { background: #ffffff; border-color: #fbcfe8; }
[data-theme="pink"] .profile-card  { background: linear-gradient(135deg, rgba(219,39,119,0.08), rgba(124,58,237,0.06)); border-color: #fbcfe8; }
[data-theme="pink"] .card          { background: #ffffff; border-color: #fbcfe8; }
[data-theme="pink"] .stat-card     { background: #ffffff; border-color: #fbcfe8; }
[data-theme="pink"] .portal-header { background: #ffffff; border-color: #fbcfe8; }
[data-theme="pink"] .nav-tab       { color: #9d4e70; }
[data-theme="pink"] .nav-tab:hover { background: #fce7f3; color: #831843; }
[data-theme="pink"] .nav-tab.active{ background: rgba(219,39,119,0.10); color: #db2777; border-color: rgba(219,39,119,0.35); }
[data-theme="pink"] .info-item:hover { background: #fce7f3; }
[data-theme="pink"] .data-table th { background: rgba(251,207,232,0.6); color: #831843; }
[data-theme="pink"] .data-table td { color: #831843; }
[data-theme="pink"] .data-table tr:hover td { background: rgba(252,231,243,0.5); }
[data-theme="pink"] .theme-btn     { border-color: #fbcfe8; color: #9d4e70; }
[data-theme="pink"] .nav-icon-btn  { background: #fce7f3; color: #db2777; }
[data-theme="pink"] .nav-badge-text{ color: #9d4e70; }
[data-theme="pink"] .btn-primary   { background: #db2777; color: #ffffff; }
[data-theme="pink"] .btn-primary:hover { background: #be185d; box-shadow: 0 4px 16px rgba(219,39,119,0.3); }
[data-theme="pink"] .btn-secondary { background: rgba(219,39,119,0.10); color: #db2777; border-color: rgba(219,39,119,0.3); }
[data-theme="pink"] .navbar-logo   { background: linear-gradient(135deg, #db2777, #7c3aed); color: #ffffff; }
[data-theme="pink"] .avatar-ring   { background: linear-gradient(135deg, #db2777, #7c3aed); }
[data-theme="pink"] .card-title-icon { background: rgba(219,39,119,0.12); color: #db2777; }
[data-theme="pink"] .portal-title  { color: #831843; }
[data-theme="pink"] .portal-subtitle { color: #db2777; }
[data-theme="pink"] .stat-value    { color: #831843; }
[data-theme="pink"] .stat-label    { color: #9d4e70; }
[data-theme="pink"] .stat-detail   { color: #9d4e70; }
[data-theme="pink"] .navbar-college-name { color: #500724; font-weight: 900; }
[data-theme="pink"] .navbar-portal-label { color: #db2777; }
[data-theme="pink"] .profile-name  { color: #831843; }
[data-theme="pink"] .info-value    { color: #831843; }
[data-theme="pink"] .link-cyan     { color: #db2777; }
[data-theme="pink"] .link-cyan:hover { color: #be185d; }
[data-theme="pink"] .nav-avatar    { background: linear-gradient(135deg, #db2777, #7c3aed); color: #ffffff; }
[data-theme="pink"] .status-dot    { background: #db2777; }
[data-theme="pink"] .section-label { color: #9d4e70; }
[data-theme="pink"] .section-label::before { background: #db2777; }

/* ============================================================
   GLOBAL COMPONENT STYLES
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* background handled by globaldb.css with theme-aware gradient */
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ──── SCROLLBAR ──── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: var(--c3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c4); }

/* ──── NAVBAR ──── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}

/* Left: logo only */
.navbar-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Center: college name + portal label */
.navbar-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.navbar-college-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--c8);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-portal-label {
  font-size: 11px;
  color: var(--c4);
  font-weight: 500;
  margin: 1px 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--c4), var(--c5));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.navbar-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: #fff;
  padding: 3px;
  border: 1px solid var(--border);
}

/* Keep old .navbar-brand/title selectors harmless */
.navbar-brand { display: flex; align-items: center; gap: 12px; flex: 1; }
.navbar-title h1 { font-size: 15px; font-weight: 700; color: var(--c8); line-height: 1.2; }
.navbar-title p   { font-size: 11px; color: var(--c4); font-weight: 500; }

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

.nav-badge-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c4), var(--c5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  border: 2px solid var(--c3);
  transition: var(--transition);
}

.nav-avatar:hover { border-color: var(--c4); }

.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--c3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
}

.nav-icon-btn:hover { background: var(--c4); color: white; }

/* ──── LAYOUT ──── */
.app-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ──── SIDEBAR ──── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

/* Profile Card */
.profile-card {
  background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(139,92,246,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 8px;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.avatar-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c4), var(--c5));
  padding: 2px;
  display: inline-flex;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-muted);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c6);
  border: 2px solid var(--bg-surface);
}

.profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c8);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.profile-id {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Info List */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.info-item:hover { background: var(--c3); }

.info-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.info-icon.cyan    { background: rgba(6,182,212,0.12);   color: var(--c4); }
.info-icon.violet  { background: rgba(139,92,246,0.12);  color: var(--c5); }
.info-icon.emerald { background: rgba(16,185,129,0.12);  color: var(--c6); }
.info-icon.amber   { background: rgba(245,158,11,0.12);  color: var(--c7); }

.info-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

.info-value {
  font-size: 12px;
  color: var(--c8);
  font-weight: 500;
  margin-top: 1px;
}

/* Sidebar Actions */
.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ──── BUTTONS ──── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--c4);
  color: #0F172A;
  flex: 1;
}

.btn-primary:hover { background: #22D3EE; box-shadow: var(--glow-accent); }

.btn-secondary {
  background: rgba(139,92,246,0.15);
  color: var(--c5);
  border: 1px solid rgba(139,92,246,0.3);
  flex: 1;
}

.btn-secondary:hover { background: rgba(139,92,246,0.25); }

/* ──── THEME SWITCHER ──── */
.theme-section { margin-top: 12px; }

.section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--c4);
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
}

.theme-btn:hover,
.mob-theme-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.theme-btn.active,
.mob-theme-btn.active {
  outline: 3px solid var(--c4);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(6,182,212,0.25);
  filter: brightness(1.05);
}

/* ── Theme button colors — defined once, applies to all button variants ── */
[data-theme-btn="midnight"] { background:linear-gradient(135deg,#0f172a,#1e293b); color:#06B6D4; border-color:#334155; }
[data-theme-btn="dark"]     { background:linear-gradient(135deg,#0E1520,#162030); color:#10B981; border-color:#1C2A3A; }
[data-theme-btn="classic"]  { background:linear-gradient(135deg,#0B1730,#183059); color:#60a5fa; border-color:#1D3561; }
[data-theme-btn="light"]    { background:linear-gradient(135deg,#e8eef6,#f0f4f8); color:#0891B2; border-color:#DDE3ED; }
[data-theme-btn="green"]    { background:linear-gradient(135deg,#dcfce7,#bbf7d0); color:#15803d; border-color:#86efac; }
[data-theme-btn="pink"]     { background:linear-gradient(135deg,#fce7f3,#fbcfe8); color:#be185d; border-color:#f9a8d4; }

/* ── Nav header utility classes ── */
.ssd-nav-title    { margin:0; font-size:1.2rem; font-weight:800; color:var(--text-primary); letter-spacing:-0.01em; }
.ssd-nav-subtitle { margin:3px 0 0; font-size:0.82rem; color:var(--accent); font-weight:600; }
.ssd-nav-badges   { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ssd-badge-program { font-size:0.72rem; font-weight:800; background:var(--primary); color:#fff; padding:5px 14px; border-radius:20px; }
.ssd-badge-session { font-size:0.72rem; font-weight:700; background:rgba(255,255,255,0.2); color:#fff; padding:5px 12px; border-radius:20px; border:1px solid rgba(255,255,255,0.35); }

/* ── Mobile menu utility classes ── */
.mob-badge-row    { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; margin-top:8px; }
.mob-logout-wrap  { padding:12px 16px 0; }
.mob-action-danger { background:rgba(239,68,68,0.1); color:#ef4444 !important; border:1px solid rgba(239,68,68,0.25) !important; display:flex; align-items:center; justify-content:center; gap:8px; }

/* ──── MAIN CONTENT ──── */
.main {
  flex: 1;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ──── PORTAL HEADER ──── */
.portal-header {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.portal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.portal-subtitle {
  font-size: 13px;
  color: var(--c4);
  font-weight: 500;
  margin-top: 4px;
}

/* ──── NAV TABS ──── */
.nav-tabs {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  flex-wrap: wrap;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.nav-tab:hover { color: var(--text-primary); background: var(--c3); }

.nav-tab.active { color: var(--c4); background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.25); }

/* ──── STATS GRID ──── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--c4); box-shadow: var(--glow-accent); }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon.cyan    { background: rgba(6,182,212,0.12);   color: var(--c4); }
.stat-icon.violet  { background: rgba(139,92,246,0.12);  color: var(--c5); }
.stat-icon.emerald { background: rgba(16,185,129,0.12);  color: var(--c6); }
.stat-icon.amber   { background: rgba(245,158,11,0.12);  color: var(--c7); }

.stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.stat-detail {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.3;
}

/* ── Pending alert card — amber ring pulse (compositor-only: transform + opacity) ── */
@keyframes pendingRing {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0;  transform: scale(1.06); }
}
.stat-card-pending {
  position: relative;
  border-color: rgba(245,158,11,0.7) !important;
  background: rgba(245,158,11,0.07) !important;
  will-change: transform;
}
.stat-card-pending::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(245,158,11,0.6);
  animation: pendingRing 2s ease-in-out infinite;
  pointer-events: none;
  will-change: transform, opacity;
}
.stat-card-pending .stat-value  { color: #d97706 !important; }
.stat-card-pending .stat-detail { color: #b45309; font-weight: 700; }

/* ── Due alert card — red ring pulse ── */
@keyframes dueRing {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0;  transform: scale(1.06); }
}
.stat-card-due {
  position: relative;
  border-color: rgba(239,68,68,0.6) !important;
  background: rgba(239,68,68,0.06) !important;
}
.stat-card-due::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(239,68,68,0.55);
  animation: dueRing 2s ease-in-out infinite;
  pointer-events: none;
  will-change: transform, opacity;
}
.stat-card-due .stat-value  { color: #dc2626 !important; }
.stat-card-due .stat-detail { color: #b91c1c; font-weight: 700; }

/* ── Pending icon — scale pulse only (compositor-friendly) ── */
@keyframes iconScale {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.18); }
}
.stat-icon-pending {
  animation: iconScale 1.4s ease-in-out infinite;
  background: rgba(245,158,11,0.2) !important;
  will-change: transform;
}

/* ──── CARDS ──── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(6,182,212,0.12);
  color: var(--c4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.card-title-icon.violet  { background: rgba(139,92,246,0.12); color: var(--c5); }
.card-title-icon.emerald { background: rgba(16,185,129,0.12); color: var(--c6); }
.card-title-icon.amber   { background: rgba(245,158,11,0.12); color: var(--c7); }

.card-body {
  padding: 20px;
}

/* ──── BADGES ──── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-cyan    { background: rgba(6,182,212,0.12);   color: var(--c4); border: 1px solid rgba(6,182,212,0.2); }
.badge-violet  { background: rgba(139,92,246,0.12);  color: var(--c5); border: 1px solid rgba(139,92,246,0.2); }
.badge-emerald { background: rgba(16,185,129,0.12);  color: var(--c6); border: 1px solid rgba(16,185,129,0.2); }
.badge-amber   { background: rgba(245,158,11,0.12);  color: var(--c7); border: 1px solid rgba(245,158,11,0.2); }

/* ──── DATA TABLES ──── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: rgba(51,65,85,0.5);
  color: var(--text-muted);
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.data-table tbody tr:hover td {
  background: var(--bg-elevated);
}

/* ──── RESPONSIVE ──── */
/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET  ≤1024px
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 200px; padding: 16px 10px; }
  .profile-card { padding: 14px 10px; }
  .avatar-ring { width: 56px; height: 56px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET  ≤900px
   Sidebar collapses, content full-width
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Hide sidebar — use the ssd-layout-shell grid (globaldb.css handles this) */
  .sidebar { display: none; }

  .navbar { padding: 0 14px; min-height: 56px; }
  .navbar-college-name { font-size: 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 20px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤768px
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar { display: none; }

  /* Navbar */
  .navbar { padding: 0 12px; min-height: 52px; gap: 8px; }
  .navbar-college-name { font-size: 15px; }
  .navbar-portal-label { display: none; }
  .nav-avatar { width: 32px; height: 32px; font-size: 13px; }
  .nav-badge-text { display: none; }

  /* Stats: 2 col on tablet */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px 10px; gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 10px; }
  .stat-detail { font-size: 9px; }
  .stat-icon { width: 34px; height: 34px; font-size: 15px; }

  /* Main content */
  .main { padding: 12px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤640px
   Portrait phones — ultra compact
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Navbar */
  .navbar { padding: 0 10px; min-height: 48px; }
  .navbar-left { display: none; }   /* hide logo on very small */
  .navbar-college-name { font-size: 13px; font-weight: 800; }
  .nav-icon-btn { width: 32px; height: 32px; font-size: 14px; }

  /* Stats: 2 cols stay but tighter */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .stat-card { padding: 10px 8px; border-radius: 8px; gap: 6px; }
  .stat-icon { width: 30px; height: 30px; font-size: 13px; border-radius: 6px; }
  .stat-value { font-size: 18px; }
  .stat-detail { display: none; } /* hide sub-detail on very small */

  /* Profile card in sidebar (hidden but keep for offcanvas) */
  .avatar-ring { width: 52px; height: 52px; }
  .profile-name { font-size: 13px; }

  /* Theme grid: 3 cols, smaller buttons */
  .theme-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .theme-btn { font-size: 9px; padding: 6px 2px; }

  /* Nav tabs (if any remain) */
  .nav-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tab { font-size: 11px; padding: 6px 10px; white-space: nowrap; flex-shrink: 0; }

  /* Cards */
  .card { border-radius: 10px; }
  .ssd-card { border-radius: 10px; }
  .ssd-nav-header { padding: 10px 12px; }

  /* Dropdown */
  .ssd-dropdown-menu { right: 0; min-width: 180px; }

  /* Bottom nav padding */
  body { padding-bottom: 70px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤480px
   Small phones (e.g. iPhone SE)
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .navbar { min-height: 44px; }
  .navbar-college-name { font-size: 12px; }

  /* Stats: go 1 column on very small phones */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .stat-card { padding: 8px 6px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 9px; }
  .stat-icon { width: 26px; height: 26px; font-size: 12px; }

  /* Info list in sidebar */
  .info-list { gap: 6px; }
  .info-item { padding: 8px; }

  /* Action buttons */
  .sidebar-actions { flex-direction: column; gap: 6px; }
  .btn { padding: 8px 12px; font-size: 12px; }

  /* Nav header badges hidden */
  .ssd-nav-header > div:last-child { display: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤380px
   Tiny phones (Galaxy A series, etc.)
   ═══════════════════════════════════════════ */
@media (max-width: 380px) {
  .navbar-college-name { font-size: 11px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .stat-card { padding: 7px 5px; }
  .stat-value { font-size: 15px; }
  .stat-icon { width: 24px; height: 24px; font-size: 11px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-btn { font-size: 9px; }
}

/* ──── UTILITY CLASSES ──── */
.text-primary { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-accent { color: var(--accent); }

.bg-surface { background: var(--bg-surface); }
.bg-elevated { background: var(--bg-elevated); }

.border-subtle { border-color: var(--border); }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow-card); }

/* ═══════════════════════════════════════════
   HAMBURGER MENU — mobile nav overlay
   ═══════════════════════════════════════════ */

/* Hidden toggle — desktop: never show nav grid toggle */
#mob-menu-toggle { display: none; }

/* Hamburger button — hidden on desktop */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.navbar-hamburger:hover { background: rgba(255,255,255,0.12); }
.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--c8);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Overlay backdrop */
.mob-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

/* Tap-to-close backdrop */
.mob-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

/* Slide-in panel */
.mob-menu-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  z-index: 201;
  padding-bottom: 24px;
}

/* Close button */
.mob-menu-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 202;
  border: 1px solid rgba(255,255,255,0.2);
  line-height: 1;
}

/* Profile card at top of panel */
.mob-profile-card {
  background: linear-gradient(135deg, var(--primary), var(--c5));
  padding: 28px 16px 20px;
  text-align: center;
  flex-shrink: 0;
}
.mob-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.2);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #fff;
  overflow: hidden;
}
.mob-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mob-profile-name { font-size: 1rem; font-weight: 800; color: #fff; }
.mob-profile-id { font-size: 0.75rem; color: rgba(255,255,255,0.75); margin-top: 2px; }
.mob-profile-badge {
  font-size: 0.68rem; font-weight: 700;
  background: rgba(255,255,255,0.2); color: #fff;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
}
.mob-profile-badge-muted { background: rgba(255,255,255,0.1); }

/* Info rows */
.mob-info-list { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.mob-info-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  font-size: 0.8rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.mob-info-row:last-child { border-bottom: none; }
.mob-info-row span:first-child { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.mob-info-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Section labels */
.mob-section-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 16px 4px;
}

/* Nav items */
.mob-menu-nav { display: flex; flex-direction: column; }
.mob-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.mob-menu-item:hover { background: var(--primary-soft); color: var(--primary); border-left-color: var(--primary); }
.mob-menu-active { background: var(--primary-soft); color: var(--primary); border-left-color: var(--primary); font-weight: 800; }
.mob-menu-emoji { font-size: 1rem; width: 22px; text-align: center; }
.mob-menu-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-left: auto; flex-shrink: 0; }

/* Action buttons */
.mob-actions { display: flex; gap: 8px; padding: 12px 16px; }
.mob-action-btn {
  flex: 1; text-align: center; padding: 9px 10px;
  border-radius: 8px; font-size: 0.8rem; font-weight: 700;
  text-decoration: none; transition: opacity 0.15s;
  border: none; cursor: pointer;
}
.mob-action-btn:hover { opacity: 0.85; }
.mob-action-primary { background: var(--primary); color: #fff; }
.mob-action-secondary { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary); }

/* Theme grid */
.mob-theme-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; padding: 4px 16px 10px; }
.mob-theme-btn {
  padding: 8px 4px; border-radius: 6px; border: 2px solid transparent;
  font-size: 9.5px; font-weight: 800; cursor: pointer;
  transition: filter 0.15s, transform 0.15s; white-space: nowrap; overflow: hidden;
}

/* ── TOGGLE OPEN STATE ── */
#mob-menu-toggle:checked ~ .mob-menu-overlay { display: block; }
#mob-menu-toggle:checked ~ .mob-menu-overlay .mob-menu-panel { transform: translateX(0); }

/* Animate hamburger → X when open */
#mob-menu-toggle:checked ~ * .navbar-hamburger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
#mob-menu-toggle:checked ~ * .navbar-hamburger span:nth-child(2) { opacity: 0; }
#mob-menu-toggle:checked ~ * .navbar-hamburger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── Show hamburger + hide desktop nav card on mobile ── */
@media (max-width: 768px) {
  .navbar-hamburger { display: flex; }
  .ssd-nav-card { display: none; }
  .ssd-content-wrapper { gap: 10px; }
}

/* Light themes — panel background */
[data-theme="light"] .mob-menu-panel,
[data-theme="green"] .mob-menu-panel,
[data-theme="pink"]  .mob-menu-panel {
  background: var(--bg-card);
  border-right-color: var(--border-medium);
}
[data-theme="light"] .mob-menu-close,
[data-theme="green"] .mob-menu-close,
[data-theme="pink"]  .mob-menu-close {
  background: rgba(0,0,0,0.08);
  color: var(--text-main);
  border-color: var(--border-medium);
}

/* ──── THEME-AWARE SSD NAVIGATION HEADER ──── */
/* Now handled via globaldb.css theme variables — no overrides needed here */

/* ══════════════════════════════════════════════════════
   MOBILE FIXED BOTTOM BAR — Theme switcher + Footer
   Only visible on mobile (≤768px)
   ══════════════════════════════════════════════════════ */
.mob-bottom-bar {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Add padding so page content is not hidden behind the bar */
  .ssd-container { padding-bottom: 72px; }

  .mob-bottom-bar {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 900;
    background: var(--bg-nav, #0f172a);
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.1));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.35);
  }

  /* Theme row */
  .mob-bottom-theme-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .mob-bottom-theme-row::-webkit-scrollbar { display: none; }

  .mob-bottom-theme-label {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
  }

  .mob-bottom-theme-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, border-color 0.15s;
    position: relative;
    outline: none;
  }
  .mob-bottom-theme-btn:hover  { transform: scale(1.15); }
  .mob-bottom-theme-btn.active {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  }

  /* Footer strip */
  .mob-bottom-footer {
    text-align: center;
    font-size: 0.58rem;
    color: var(--text-subtle, #64748b);
    padding: 3px 12px 6px;
    line-height: 1.6;
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.07));
  }
  .mob-bottom-footer a {
    color: var(--accent, #06B6D4);
    text-decoration: none;
    font-weight: 600;
  }

  /* Light theme overrides */
  [data-theme="light"] .mob-bottom-bar,
  [data-theme="green"] .mob-bottom-bar,
  [data-theme="pink"]  .mob-bottom-bar {
    background: var(--bg-card, #fff);
    border-top-color: var(--border-medium, #e2e8f0);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  }
  [data-theme="light"] .mob-bottom-footer,
  [data-theme="green"] .mob-bottom-footer,
  [data-theme="pink"]  .mob-bottom-footer {
    border-top-color: var(--border-medium, #e2e8f0);
  }
}

