/* ═══════════════════════════════════════════════════════════════
   TGU ISU ADMIN PORTAL — styles.css
   Tiangong University · International Student Union
   Autumn 2026 · Imperial Violet Design System
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand Purple */
  --purple:         #4B1E6D;
  --purple-mid:     #5A2A82;
  --purple-light:   #7C3EA8;
  --purple-xlight:  #9D5EC4;
  --purple-dark:    #380F55;
  --purple-deeper:  #260D3B;

  /* Lavender Surfaces */
  --lavender:       #F5F0FA;
  --lavender-mid:   #EDE4F7;
  --lavender-dark:  #E2D9EC;
  --lavender-deep:  #D4C5E8;

  /* Typography */
  --ink:            #260D3B;
  --ink-mid:        #4A2D6A;
  --ink-light:      #7A5C9A;
  --ink-muted:      #9E84B8;

  /* Neutrals (purple-tinted) */
  --gray-50:        #FDFCFE;
  --gray-100:       #F8F5FC;
  --gray-200:       #EDE4F7;
  --gray-300:       #D8C9E8;
  --gray-400:       #B09EC0;
  --gray-500:       #8A74A0;
  --gray-600:       #6A5480;
  --gray-700:       #4A3460;
  --gray-900:       #1E0A30;

  /* Semantic Colors */
  --success:        #16A34A;
  --success-light:  #DCFCE7;
  --success-mid:    #86EFAC;
  --warning:        #D97706;
  --warning-light:  #FEF3C7;
  --danger:         #DC2626;
  --danger-light:   #FEE2E2;
  --info:           #0EA5E9;
  --info-light:     #E0F2FE;
  --gold:           #C89B3C;
  --gold-light:     #FDF5E0;

  /* Pillar Accent Colors */
  --pillar-1:       #4B1E6D;   /* Help Desk — Purple */
  --pillar-1-light: #F0E8FA;
  --pillar-2-light: #E6F7F0;
  --pillar-3:       #B45309;   /* Events — Amber */
  --pillar-3-light: #FFF7ED;

  /* Borders & Radius */
  --border:         #E2D9EC;
  --radius-xs:      6px;
  --radius-sm:      8px;
  --radius:         14px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --radius-2xl:     32px;
  --radius-full:    999px;

  /* Shadows */
  --shadow-xs:      0 1px 3px rgba(75,30,109,0.07);
  --shadow-sm:      0 2px 8px rgba(75,30,109,0.10);
  --shadow:         0 4px 20px rgba(75,30,109,0.13);
  --shadow-md:      0 6px 28px rgba(75,30,109,0.16);
  --shadow-lg:      0 12px 48px rgba(75,30,109,0.20);
  --shadow-purple:  0 4px 24px rgba(75,30,109,0.35);
  --shadow-inset:   inset 0 2px 8px rgba(75,30,109,0.08);

  /* Layout */
  --header-h:       72px;
  --bottom-nav-h:   76px;
  --sidebar-w:      264px;

  /* Motion */
  --ease:           cubic-bezier(0.4,0,0.2,1);
  --ease-spring:    cubic-bezier(0.34,1.56,0.64,1);
  --dur-fast:       0.15s;
  --dur:            0.22s;
  --dur-slow:       0.35s;
  --transition:     var(--dur) var(--ease);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}
body {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  background: var(--lavender);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.lang-cn { font-family: 'Noto Sans SC', 'Inter', sans-serif; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
fieldset { border: none; }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--lavender); }
::-webkit-scrollbar-thumb { background: var(--lavender-deep); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-xlight); }

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 60%, var(--purple-mid) 100%);
  display: flex; align-items: center;
  padding: 0 16px; gap: 12px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.32);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* subtle shimmer line at bottom of header */
.header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* Dual Logo Block */
.header-logos {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.logo-img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.logo-img:hover { transform: scale(1.06); box-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.logo-divider {
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* Title Block */
.header-title { flex: 1; min-width: 0; }
.header-title h1 {
  font-size: 13px; font-weight: 800;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2; letter-spacing: 0.3px;
}
.header-title span {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  font-weight: 400; letter-spacing: 0.2px;
}

/* Controls (Lang + Role) */
.header-controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.20);
}
.lang-toggle button {
  padding: 5px 12px;
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.60);
  transition: all var(--transition);
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
}
.lang-toggle button.active {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 1px 6px rgba(0,0,0,0.20);
}
.lang-toggle button:hover:not(.active) { color: rgba(255,255,255,0.90); }

/* Role Switcher */
.role-switcher { position: relative; }
.role-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff; font-size: 11px; font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.role-btn:hover { background: rgba(255,255,255,0.20); }
.role-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #C4B5FD;
  flex-shrink: 0;
}
.role-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 175px; overflow: hidden;
  display: none; z-index: 300;
  border: 1px solid var(--lavender-dark);
}
.role-dropdown.open { display: block; animation: dropIn var(--dur-fast) var(--ease-spring) both; }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px) scale(0.97); } to { opacity:1; transform:none; } }
.role-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  font-size: 13px; color: var(--ink-mid);
  transition: background var(--transition); cursor: pointer;
}
.role-icon { font-size: 16px; }

/* User Identification Greeting Badge */
.user-greeting-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  max-width: 380px;
}
.user-greeting-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}
.ug-avatar { font-size: 13px; line-height: 1; flex-shrink: 0; }
.ug-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ug-sep {
  opacity: 0.6;
  margin: 0 1px;
}
.ug-wc {
  opacity: 0.95;
  font-weight: 500;
}
.ug-edit {
  font-size: 10px;
  opacity: 0.65;
  margin-left: 2px;
  flex-shrink: 0;
  transition: opacity var(--dur);
}
.user-greeting-btn:hover .ug-edit { opacity: 1; }

@media (max-width: 900px) {
  .user-greeting-btn {
    max-width: 240px;
  }
}
@media (max-width: 600px) {
  .user-greeting-btn {
    padding: 4px 8px;
    font-size: 11px;
    max-width: 140px;
  }
}

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════════════════════════════ */
.app-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}

/* ── SIDEBAR (desktop) ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--lavender-dark);
  position: fixed; top: var(--header-h); left: 0;
  height: calc(100vh - var(--header-h));
  overflow-y: auto; z-index: 100;
  display: none;
  padding: 12px 0 24px;
  box-shadow: 2px 0 16px rgba(75,30,109,0.06);
}

.sidebar-section-label {
  font-size: 9.5px; font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 1.4px;
  padding: 10px 22px 4px;
}
.sidebar-divider { height: 1px; background: var(--lavender-dark); margin: 10px 20px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 20px;
  margin: 2px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-mid); font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.sidebar-nav-item:hover { background: var(--lavender); color: var(--purple); }
.sidebar-nav-item.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 16px rgba(75,30,109,0.30);
  font-weight: 600;
}
.sidebar-nav-item .s-icon { font-size: 17px; flex-shrink: 0; }

/* Pillar label in sidebar */
.sidebar-pillar-tag {
  display: inline-flex; align-items: center;
  font-size: 8.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 4px;
  margin-left: auto; text-transform: uppercase; letter-spacing: 0.3px;
}
.sidebar-pillar-tag.p1 { background: #EDE4F7; color: var(--purple); }
.sidebar-pillar-tag.p2 { background: #D1FAE5; color: #065F46; }
.sidebar-pillar-tag.p3 { background: #FEF3C7; color: #92400E; }

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px 16px calc(var(--bottom-nav-h) + 32px);
  max-width: 100%;
  min-width: 0;
}
.section-page { display: none; animation: fadeIn var(--dur-slow) var(--ease) both; }
.section-page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM NAV (mobile)
══════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--lavender-dark);
  display: flex;
  box-shadow: 0 -4px 24px rgba(75,30,109,0.10);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--gray-400);
  transition: all var(--transition);
  padding: 8px 4px;
  position: relative; cursor: pointer;
}
.bottom-nav-item.active { color: var(--purple); }
.bottom-nav-item.active::after {
  content: '';
  position: absolute; bottom: 0; left: 18%; right: 18%;
  height: 3px;
  background: var(--purple);
  border-radius: 3px 3px 0 0;
}
.nav-icon { font-size: 22px; transition: transform var(--transition); }
.bottom-nav-item.active .nav-icon { transform: translateY(-2px); }
.nav-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px; }

/* ══════════════════════════════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.section-title {
  font-size: 22px; font-weight: 900;
  color: var(--ink); line-height: 1.2;
  display: flex; align-items: center; gap: 8px;
}
.section-desc {
  font-size: 13.5px; color: var(--ink-light);
  margin-bottom: 20px; line-height: 1.6;
}
.s-emoji { font-size: 22px; }

/* Pillar Banner Strip */
.pillar-banner {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex; gap: 14px; align-items: flex-start;
  border-left: 4px solid;
  position: relative; overflow: hidden;
}
.pillar-banner::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.06;
  background: repeating-linear-gradient(45deg, currentColor 0, currentColor 1px, transparent 0, transparent 50%);
  background-size: 8px 8px;
}
.pillar-banner.p1 { background: var(--pillar-1-light); border-color: var(--pillar-1); color: var(--pillar-1); }
.pillar-banner.p3 { background: var(--pillar-3-light); border-color: var(--pillar-3); color: var(--pillar-3); }
.pillar-banner-icon { font-size: 26px; flex-shrink: 0; }
.pillar-banner-title {
  font-size: 14px; font-weight: 800; letter-spacing: 0.2px;
  margin-bottom: 3px;
}
.pillar-banner-text { font-size: 12.5px; line-height: 1.55; opacity: 0.85; }

/* Disclaimer Notice */
.disclaimer-notice {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px;
  font-size: 12.5px; color: #92400E; line-height: 1.55;
}
.disclaimer-notice .di-icon { font-size: 16px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--lavender-dark);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.card-title {
  font-size: 15px; font-weight: 800;
  color: var(--ink); line-height: 1.3; margin-bottom: 3px;
}
.card-subtitle {
  font-size: 12px; color: var(--ink-light); font-weight: 400;
}
.card-body { padding: 14px 18px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--lavender-dark);
  background: var(--gray-50);
}

/* Card Variants */
.card-purple {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 100%);
  border-color: transparent;
  color: #fff;
}
.card-purple .card-title { color: #fff; }
.card-purple .card-subtitle { color: rgba(255,255,255,0.65); }

/* ══════════════════════════════════════════════════════════════
   HERO BANNER
══════════════════════════════════════════════════════════════ */
.hero-banner {
  background: linear-gradient(135deg, var(--purple-darker, #1A0530) 0%, var(--purple) 55%, var(--purple-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  margin-bottom: 20px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-purple);
}
.hero-banner::before {
  content: '';
  position: absolute; top: -50%; right: -30%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-banner::after {
  content: '';
  position: absolute; bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-label {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-title {
  font-size: 26px; font-weight: 900;
  color: #fff; line-height: 1.15;
  margin-bottom: 8px;
}
.hero-sub {
  font-size: 13.5px; color: rgba(255,255,255,0.72);
  line-height: 1.5; margin-bottom: 16px;
}
.hero-status {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.90);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  animation: pulse 2s infinite;
}
.status-dot.online { background: #4ADE80; }
.status-dot.offline { background: #F87171; animation: none; }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.3); }
}

/* ══════════════════════════════════════════════════════════════
   QUICK ACTIONS
══════════════════════════════════════════════════════════════ */
.quick-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.quick-action-btn {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1.5px solid var(--lavender-dark);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left; width: 100%;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.quick-action-btn:hover {
  border-color: var(--purple-xlight);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.quick-action-btn.primary-action {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(75,30,109,0.30);
}
.quick-action-btn.primary-action:hover {
  box-shadow: 0 8px 32px rgba(75,30,109,0.40);
  transform: translateY(-2px);
}
.qa-icon { font-size: 24px; flex-shrink: 0; }
.qa-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.qa-sub { font-size: 11.5px; color: var(--ink-light); margin-top: 2px; }
.primary-action .qa-sub { color: rgba(255,255,255,0.65); }
.qa-arrow { margin-left: auto; font-size: 18px; opacity: 0.5; }

/* Privacy Badge */
.privacy-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(75,30,109,0.08);
  border: 1px solid rgba(75,30,109,0.15);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px; font-weight: 600; color: var(--purple);
}
.lock-icon { font-size: 12px; }
.primary-action .privacy-badge {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   KPI GRID
══════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.kpi-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--lavender-dark);
  padding: 16px 14px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-num {
  font-size: 32px; font-weight: 900;
  color: var(--purple); line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi-label { font-size: 11.5px; color: var(--ink-light); font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.kpi-trend { font-size: 10.5px; font-weight: 600; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.neutral { color: var(--ink-muted); }
.kpi-trend.warn { color: var(--warning); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD FUTURE UPDATES SLOT
══════════════════════════════════════════════════════════════ */
.dashboard-slot-container {
  width: 100%;
  margin-top: 8px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.dashboard-slot-container:empty {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   TIMELINE (Semester Milestones)
══════════════════════════════════════════════════════════════ */
.timeline { position: relative; padding-left: 20px; }
.timeline-track {
  position: absolute; left: 7px; top: 10px; bottom: 10px;
  width: 2px; background: var(--lavender-dark); border-radius: 2px;
}
.timeline-fill {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--purple); border-radius: 2px;
  transition: height 1s var(--ease);
}
.timeline-item {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 12px; align-items: flex-start;
  padding: 12px 0; position: relative;
}
.timeline-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--lavender-dark);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--lavender-dark);
  position: absolute; left: -22px; top: 16px;
  transition: all var(--transition);
}
.timeline-item.done .timeline-dot {
  background: var(--purple);
  box-shadow: 0 0 0 3px rgba(75,30,109,0.20);
}
.timeline-item.active .timeline-dot {
  background: var(--purple-mid);
  box-shadow: 0 0 0 4px rgba(90,42,130,0.25);
  animation: pulse 2s infinite;
}
.timeline-date { font-size: 11px; font-weight: 700; color: var(--ink-muted); padding-top: 2px; }
.timeline-title { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.timeline-desc { font-size: 11.5px; color: var(--ink-light); }
.timeline-item.done .timeline-title { color: var(--purple); }

/* ══════════════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════════════ */
.tabs-nav {
  display: flex; gap: 4px;
  background: var(--lavender-mid);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1; padding: 9px 12px;
  border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 600;
  color: var(--ink-light);
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--purple); }
.tab-btn.active {
  background: #fff;
  color: var(--purple);
  box-shadow: var(--shadow-xs);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════════════════════════════
   ACCORDION / FAQ
══════════════════════════════════════════════════════════════ */
.accordion-item {
  border-bottom: 1px solid var(--lavender-dark);
}
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
  transition: color var(--transition);
  user-select: none;
}
.accordion-header:hover { color: var(--purple); }
.accordion-chevron {
  font-size: 16px; color: var(--ink-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.accordion-header.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  font-size: 13px; color: var(--ink-light);
  line-height: 1.65; max-height: 0; overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.25s var(--ease);
}
.accordion-body.open { max-height: 300px; padding-bottom: 14px; }

/* FAQ Search */
.faq-search-wrap {
  position: relative; margin-bottom: 10px;
}
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 14px;
}
.faq-search {
  width: 100%; padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ink);
  background: var(--lavender);
  transition: border-color var(--transition);
}
.faq-search:focus { outline: none; border-color: var(--purple-xlight); background: #fff; }

/* ══════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: var(--ink-mid); margin-bottom: 6px;
  letter-spacing: 0.1px;
}
.required { color: var(--danger); }
.req-star { color: #e53935; margin-left: 2px; font-weight: bold; }
.form-control {
  display: block; width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--ink);
  background: var(--lavender);
  transition: all var(--transition);
  line-height: 1.5;
}
.form-control:focus {
  outline: none;
  border-color: var(--purple-xlight);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(90,42,130,0.10);
}
.form-control.is-invalid {
  border-color: #e53935 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15) !important;
}
.input-error-msg {
  color: #e53935;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  line-height: 1.4;
  letter-spacing: 0.1px;
}
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-control::placeholder { color: var(--ink-muted); }
.form-hint { font-size: 11.5px; color: var(--ink-muted); margin-top: 5px; }
.form-check {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; padding: 12px 14px;
  background: var(--lavender);
  border: 1.5px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.form-check:hover { border-color: var(--purple-xlight); background: #fff; }
.form-check input[type="checkbox"] {
  width: 17px; height: 17px; flex-shrink: 0;
  accent-color: var(--purple); margin-top: 1px;
}
.form-check-label { font-size: 13px; font-weight: 500; color: var(--ink-mid); line-height: 1.5; }

/* Upload Area */
.upload-area {
  border: 2px dashed var(--lavender-deep);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center; cursor: pointer;
  background: var(--lavender);
  transition: all var(--transition);
}
.upload-area:hover { border-color: var(--purple-xlight); background: #fff; }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-text { font-size: 13px; color: var(--ink-light); line-height: 1.5; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 14.5px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(75,30,109,0.30);
  border: none;
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(75,30,109,0.40); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--purple);
  color: var(--purple);
}
.btn-outline:hover { background: var(--lavender); }

.btn-ghost {
  background: var(--lavender);
  border: 1px solid var(--lavender-dark);
  color: var(--ink-mid);
}
.btn-ghost:hover { background: var(--lavender-mid); color: var(--purple); }

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #fff; border: none;
  box-shadow: 0 3px 14px rgba(5,150,105,0.25);
}
.btn-danger { background: var(--danger); color: #fff; border: none; }

/* ══════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}
.badge-purple { background: var(--lavender-mid); color: var(--purple); }
.badge-green  { background: var(--success-light); color: #065F46; }
.badge-amber  { background: var(--warning-light); color: #92400E; }
.badge-red    { background: var(--danger-light); color: #991B1B; }
.badge-gold   { background: var(--gold-light); color: #78350F; }
.badge-gray   { background: var(--gray-200); color: var(--gray-600); }
.badge-white  { background: rgba(255,255,255,0.20); color: #fff; }
.badge-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block; margin-right: 5px;
  animation: pulse 2s infinite;
}

/* ══════════════════════════════════════════════════════════════
   PILLAR I — HELP DESK
══════════════════════════════════════════════════════════════ */

/* Ticket Ref Display */
.ticket-ref {
  background: var(--lavender-mid);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center; margin-bottom: 16px;
}
.ticket-code {
  font-size: 22px; font-weight: 900;
  color: var(--purple); letter-spacing: 3px;
  font-family: 'Courier New', monospace;
  margin-bottom: 4px;
}
.ticket-label { font-size: 11px; color: var(--ink-muted); }

/* Status Tracker */
.status-tracker {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 20px 0;
}
.status-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px; flex: 1;
}
.status-step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--lavender-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  color: var(--gray-400);
  background: #fff;
  transition: all var(--transition);
  position: relative; z-index: 1;
}
.status-step.done .status-step-dot {
  background: var(--purple); border-color: var(--purple); color: #fff;
}
.status-step.active .status-step-dot {
  border-color: var(--purple-mid); color: var(--purple-mid);
  box-shadow: 0 0 0 4px rgba(90,42,130,0.15);
  animation: pulse 2s infinite;
}
.status-step-label { font-size: 10.5px; font-weight: 600; color: var(--ink-muted); text-align: center; }
.status-step.done .status-step-label { color: var(--purple); }
.status-step.active .status-step-label { color: var(--purple-mid); }
.status-line {
  flex: 1; height: 2px; background: var(--lavender-dark);
  margin-top: -24px; position: relative; z-index: 0;
}
.status-line.done { background: var(--purple); }

/* ══════════════════════════════════════════════════════════════
   PILLAR III — EVENTS
══════════════════════════════════════════════════════════════ */

/* Event Card */
.event-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--lavender-dark);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-md); }

.event-card-header {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  padding: 20px 18px 16px;
  position: relative; overflow: hidden;
  color: #fff;
}
.event-card-header::after {
  content: '';
  position: absolute; bottom: -30px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.event-card-header.green  { background: linear-gradient(135deg, #064E3B 0%, #059669 100%); }
.event-card-header.amber  { background: linear-gradient(135deg, #78350F 0%, #D97706 100%); }
.event-card-header.indigo { background: linear-gradient(135deg, #1E1B4B 0%, #4338CA 100%); }

.event-date-badge {
  display: inline-flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px; margin-bottom: 12px;
  min-width: 60px;
}
.event-date-day   { font-size: 22px; font-weight: 900; line-height: 1; }
.event-date-month { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; }
.event-card-title { font-size: 18px; font-weight: 900; margin-bottom: 5px; line-height: 1.2; }
.event-card-sub   { font-size: 12.5px; opacity: 0.75; margin-bottom: 10px; }

.event-card-body { padding: 16px 18px; }

/* Agenda Timeline */
.agenda-timeline { margin-bottom: 16px; }
.agenda-item {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 10px;
}
.agenda-item:last-child { margin-bottom: 0; }
.agenda-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0; margin-top: 6px;
}
.agenda-time {
  font-size: 10.5px; font-weight: 700;
  color: var(--purple-xlight); text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 1px;
}
.agenda-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.agenda-note  { font-size: 11.5px; color: var(--ink-muted); }

/* Action Items (checkbox) */
.action-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--lavender);
}
.action-item:last-child { border-bottom: none; }
.action-check { width: 16px; height: 16px; accent-color: var(--purple); flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.action-text { font-size: 13px; color: var(--ink-mid); cursor: pointer; transition: color var(--transition); }
.action-text.done { text-decoration: line-through; color: var(--ink-muted); }

/* Seat Counter */
.seat-counter {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 16px 0; margin-bottom: 10px;
}
.seat-num  { font-size: 40px; font-weight: 900; color: var(--purple); line-height: 1; }
.seat-total{ font-size: 40px; font-weight: 900; color: var(--ink-muted); line-height: 1; }
.seat-label{ font-size: 10.5px; color: var(--ink-muted); font-weight: 600; text-align: center; margin-top: 2px; }
.seat-sep  { font-size: 28px; font-weight: 300; color: var(--lavender-deep); }
.seat-progress {
  height: 8px; background: var(--lavender-dark);
  border-radius: 8px; overflow: hidden; margin-bottom: 12px;
}
.seat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-xlight));
  border-radius: 8px;
  transition: width 0.8s var(--ease);
}

/* Topic Tags */
.topic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.topic-tag {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--lavender-dark);
  background: var(--lavender);
  font-size: 12px; font-weight: 600; color: var(--ink-mid);
  cursor: pointer; transition: all var(--transition);
  user-select: none;
}
.topic-tag:hover { border-color: var(--purple-xlight); color: var(--purple); background: #fff; }
.topic-tag.selected { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ══════════════════════════════════════════════════════════════
   ADMIN / KPI / KANBAN / DOCS
══════════════════════════════════════════════════════════════ */

/* Admin Restrict Notice */
.restrict-notice {
  background: var(--lavender-mid);
  border: 1px solid var(--lavender-deep);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px;
  font-size: 13px; color: var(--ink-mid);
  line-height: 1.5;
}

/* KPI Health indicators (full-width in admin) */
.kpi-grid-wide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.kpi-health-card {
  background: #fff;
  border: 1px solid var(--lavender-dark);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.kpi-health-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-health-card.done::before { background: var(--success); }
.kpi-health-card.progress::before { background: var(--warning); }
.kpi-health-card.pending::before { background: var(--gray-300); }
.kpi-health-num { font-size: 28px; font-weight: 900; line-height: 1; margin-bottom: 4px; }
.kpi-health-card.done .kpi-health-num { color: var(--success); }
.kpi-health-card.progress .kpi-health-num { color: var(--warning); }
.kpi-health-card.pending .kpi-health-num { color: var(--gray-400); }
.kpi-health-label { font-size: 11px; color: var(--ink-light); font-weight: 500; line-height: 1.3; margin-bottom: 5px; }
.kpi-health-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
}
.kpi-health-card.done .kpi-health-status { color: var(--success); }
.kpi-health-card.progress .kpi-health-status { color: var(--warning); }
.kpi-health-card.pending .kpi-health-status { color: var(--gray-400); }

/* Document Vault */
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--lavender);
  transition: background var(--transition);
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--gray-50); }
.doc-icon { font-size: 22px; flex-shrink: 0; }
.doc-name { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.doc-meta { font-size: 11px; color: var(--ink-muted); }
.doc-actions { margin-left: auto; flex-shrink: 0; }

/* Kanban */
.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.kanban-col { background: var(--lavender); border-radius: var(--radius-sm); padding: 10px; }
.kanban-col-title {
  font-size: 11px; font-weight: 800;
  color: var(--ink-mid); text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.kanban-card {
  background: #fff; border-radius: var(--radius-sm);
  padding: 10px 11px; margin-bottom: 6px;
  border: 1px solid var(--lavender-dark);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kanban-card:last-child { margin-bottom: 0; }
.kanban-card-title { font-size: 11.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; line-height: 1.4; }
.kanban-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.kanban-deadline { font-size: 10px; color: var(--ink-muted); }

/* ══════════════════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(14, 4, 26, 0.65);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: none;
}
.modal-overlay.open {
  display: flex;
  animation: overlayFadeIn var(--dur-fast) var(--ease);
}
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 8px 22px 36px;
  width: 100%; max-width: 520px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.30);
  animation: slideUp var(--dur-slow) var(--ease-spring);
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0.5; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--lavender-deep);
  border-radius: 4px;
  margin: 0 auto 20px;
}
.modal-title { font-size: 18px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--ink-light); margin-bottom: 18px; }

/* ══════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 12px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all 0.3s var(--ease-spring);
  white-space: nowrap; max-width: calc(100vw - 32px);
  z-index: 3000; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════════ */
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-xs  { font-size: 11px; }
.text-sm  { font-size: 12.5px; }
.text-gray { color: var(--ink-muted); }
.text-purple { color: var(--purple); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.divider { height: 1px; background: var(--lavender-dark); margin: 14px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Role visibility */
body.role-student .admin-only,
body.role-student #snav-admin,
body.role-student #bnav-admin,
body.role-student #section-admin,
body.role-student #sidebar-admin-divider,
body.role-student #sidebar-admin-label {
  display: none !important;
}

body.role-admin .student-only {
  display: none !important;
}

body.role-admin #snav-admin {
  display: flex !important;
}

body.role-admin #bnav-admin {
  display: flex !important;
}

body.role-admin #sidebar-admin-divider,
body.role-admin #sidebar-admin-label {
  display: block !important;
}

body.role-admin #section-admin.active {
  display: block !important;
}

.bnav-admin-badge {
  position: absolute;
  top: 3px;
  right: 8px;
  background: linear-gradient(135deg, #4B1E6D, #6D28D9);
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.1;
  letter-spacing: 0.4px;
  box-shadow: 0 1px 4px rgba(75, 30, 109, 0.3);
  text-transform: uppercase;
}

.admin-case-student-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--lavender-mid);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--ink);
  border: 1px solid var(--lavender-dark);
}

.admin-case-student-info-bar .student-info-item strong {
  color: var(--purple-dark);
}

/* Student Welfare & Confidential Identity Tracking (Admin Only) */
.admin-confidential-banner {
  background: linear-gradient(135deg, #FAF5FF 0%, #FFFBEB 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 3px solid #F59E0B;
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.08);
}

.admin-confidential-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.confidential-banner-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #92400E;
}

.confidential-banner-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.confidential-field-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink);
}

.confidential-field-label {
  font-weight: 700;
  color: var(--purple-dark);
  min-width: 72px;
}

.confidential-field-value {
  font-weight: 600;
  color: var(--ink);
  background: rgba(245, 158, 11, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-family: monospace;
  font-size: 12px;
}

.confidential-banner-note {
  margin-top: 4px;
}

.confidential-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #B45309;
  background: rgba(245, 158, 11, 0.16);
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.confidential-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
}

.confidential-details strong {
  color: var(--purple-dark);
}

.confidential-sep {
  color: #CBD5E1;
  font-weight: bold;
}

.confidential-hint {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.35;
}

.admin-chat-confidential-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

.admin-chat-confidential-tag strong {
  color: var(--purple-dark);
}

/* Guard: Prevent confidential welfare data from ever leaking to student DOM */
body.role-student .admin-confidential-banner,
body.role-student .admin-chat-confidential-tag {
  display: none !important;
}

/* Student-side Anonymous Submission Reassurance Notice */
.sv-anon-notice {
  background: var(--lavender-mid);
  border: 1px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--purple-dark);
  animation: fadeIn var(--dur-fast) var(--ease) both;
}

.sv-anon-notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-anon-notice-icon {
  font-size: 18px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — DESKTOP (≥768px)
══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .sidebar { display: block; }
  .bottom-nav { display: none; }
  .main-content {
    margin-left: var(--sidebar-w);
    padding: 28px 28px 48px;
    max-width: 860px;
  }
  .header { padding: 0 24px; }
  .logo-img { width: 50px; height: 50px; }
  .header-title h1 { font-size: 14.5px; }
  .header-title span { font-size: 11px; }
  .hero-title { font-size: 30px; }
  .quick-actions { flex-direction: row; }
  .quick-action-btn { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .kpi-grid-wide { grid-template-columns: repeat(3, 1fr); }
  .kanban-board { grid-template-columns: repeat(3, 1fr); }
  .section-title { font-size: 26px; }
}

@media (min-width: 1200px) {
  .main-content { max-width: 980px; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE OPTIMISATION (≤767px — WeChat webview / iPhone)
══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Layout & Spacing ─────────────────────────────────── */
  .main-content {
    padding: 14px 12px calc(var(--bottom-nav-h) + 20px);
  }
  :root {
    --bottom-nav-h: 66px;
  }

  /* ── Header ───────────────────────────────────────────── */
  .header {
    padding: 0 10px;
    gap: 7px;
    height: 60px;
    --header-h: 60px;
  }
  .logo-img {
    width: 34px;
    height: 34px;
    padding: 2px;
    border-width: 1.5px;
  }
  .logo-divider { height: 22px; }
  .header-logos { gap: 6px; }
  .header-title h1 { font-size: 11px; letter-spacing: 0; }
  .header-title span { font-size: 9px; display: none; }/* hide subtitle on mobile */
  .header-controls { gap: 6px; }
  .lang-toggle button { padding: 4px 9px; font-size: 10px; }
  /* Role btn — just dot + chevron, hide label text to save space */
  .role-btn { padding: 4px 8px; gap: 4px; font-size: 11px; }
  .role-label-text { display: none; }
  .role-btn span:nth-child(3) { font-size: 10px; } /* chevron */

  /* Fix layout offset for shorter header */
  .app-layout { padding-top: 60px; }
  .sidebar     { top: 60px; height: calc(100vh - 60px); }

  /* ── Hero Banner ──────────────────────────────────────── */
  .hero-banner {
    padding: 18px 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
  }
  .hero-label { font-size: 10px; margin-bottom: 6px; }
  .hero-title { font-size: 20px; margin-bottom: 6px; }
  .hero-sub   { font-size: 12px; margin-bottom: 12px; line-height: 1.5; }
  .hero-status { font-size: 11px; padding: 4px 10px; }

  /* ── Quick Action Buttons ─────────────────────────────── */
  .quick-actions { gap: 8px; margin-bottom: 14px; }
  .quick-action-btn { padding: 11px 13px; gap: 11px; border-radius: var(--radius-sm); }
  .qa-icon  { font-size: 20px; }
  .qa-title { font-size: 13px; }
  .qa-sub   { font-size: 11px; }
  /* Strip the Pillar badge on small screens to avoid overflow */
  .quick-action-btn .privacy-badge { display: none; }
  .qa-arrow { display: none; }

  /* ── KPI Grid ─────────────────────────────────────────── */
  .kpi-grid { gap: 8px; margin-bottom: 14px; }
  .kpi-card { padding: 12px 10px; border-radius: var(--radius-sm); }
  .kpi-num  { font-size: 24px; }
  .kpi-label { font-size: 10.5px; }
  .kpi-trend { font-size: 9.5px; }

  /* ── Cards ────────────────────────────────────────────── */
  .card { border-radius: var(--radius-sm); }
  .card-header { padding: 13px 14px 0; }
  .card-title  { font-size: 13.5px; }
  .card-subtitle { font-size: 11px; }
  .card-body   { padding: 11px 14px 14px; }
  .card-footer { padding: 10px 14px; }

  /* ── Section Headers ──────────────────────────────────── */
  .section-title { font-size: 19px; }
  .section-desc  { font-size: 12.5px; margin-bottom: 14px; }

  /* ── Pillar Banners ───────────────────────────────────── */
  .pillar-banner {
    padding: 12px 13px;
    margin-bottom: 14px;
    border-left-width: 3px;
  }
  .pillar-banner-icon  { font-size: 20px; }
  .pillar-banner-title { font-size: 12px; margin-bottom: 2px; }
  .pillar-banner-text  { font-size: 11.5px; line-height: 1.5; }

  /* ── Disclaimer / Restrict Notice ────────────────────── */
  .disclaimer-notice { font-size: 11.5px; padding: 10px 12px; gap: 8px; margin-bottom: 12px; }
  .di-icon { font-size: 14px; }
  .restrict-notice { font-size: 12px; padding: 11px 13px; }

  /* ── Tabs ─────────────────────────────────────────────── */
  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 3px;
    scrollbar-width: none;
    padding: 3px;
  }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11.5px;
    padding: 7px 11px;
  }

  /* ── Accordion / FAQ ──────────────────────────────────── */
  .accordion-header { font-size: 12.5px; padding: 12px 0; }
  .accordion-chevron { font-size: 14px; }
  .accordion-body { font-size: 12px; }
  .faq-search { font-size: 12.5px; }

  /* ── Forms ────────────────────────────────────────────── */
  .form-label   { font-size: 11.5px; }
  .form-control { font-size: 13px; padding: 9px 12px; }
  .form-check   { padding: 10px 12px; }
  .form-check-label { font-size: 12px; }
  .form-hint    { font-size: 11px; }
  .upload-area  { padding: 18px 12px; }
  .upload-icon  { font-size: 24px; margin-bottom: 6px; }
  .upload-text  { font-size: 12px; }

  /* Stack the 2-col grids on mobile */
  .grid-2 { grid-template-columns: 1fr; }
  .dept-select-group { grid-template-columns: 1fr; }

  /* ── Buttons ──────────────────────────────────────────── */
  .btn    { font-size: 13px; padding: 10px 16px; }
  .btn-lg { font-size: 13.5px; padding: 12px 18px; }
  .btn-sm { font-size: 11px; padding: 6px 12px; }

  /* ── Event Cards ──────────────────────────────────────── */
  .event-card { margin-bottom: 12px; border-radius: var(--radius-sm); }
  .event-card-header { padding: 16px 14px 13px; }
  .event-date-badge { padding: 6px 10px; margin-bottom: 10px; }
  .event-date-day   { font-size: 18px; }
  .event-date-month { font-size: 9px; }
  .event-card-title { font-size: 15px; margin-bottom: 4px; }
  .event-card-sub   { font-size: 11.5px; }
  .event-card-body  { padding: 13px 14px; }
  .agenda-title { font-size: 12px; }
  .agenda-time  { font-size: 9.5px; }
  .agenda-note  { font-size: 10.5px; }
  .agenda-item  { gap: 10px; margin-bottom: 8px; }
  .action-text  { font-size: 12px; }

  /* ── Seat Counter ─────────────────────────────────────── */
  .seat-counter { gap: 14px; padding: 12px 0; margin-bottom: 8px; }
  .seat-num   { font-size: 30px; }
  .seat-total { font-size: 30px; }
  .seat-label { font-size: 9.5px; }
  .seat-sep   { font-size: 22px; }
  .seat-progress { height: 6px; margin-bottom: 10px; }

  /* ── Topic Tags ───────────────────────────────────────── */
  .topic-tags { gap: 6px; }
  .topic-tag  { font-size: 11px; padding: 6px 11px; }

  /* ── Kanban Board — horizontal scroll on mobile ───────── */
  .kanban-board {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 6px;
    /* reset grid */
    grid-template-columns: unset;
    scrollbar-width: none;
  }
  .kanban-board::-webkit-scrollbar { display: none; }
  .kanban-col {
    min-width: 58vw;
    max-width: 72vw;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .kanban-col-title { font-size: 10px; }
  .kanban-card-title { font-size: 11px; }
  .kanban-deadline   { font-size: 9.5px; }

  /* ── Admin KPI Health ─────────────────────────────────── */
  #kpi-health-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-health-card { padding: 12px 11px 10px; border-radius: var(--radius-sm); }
  .kpi-health-num  { font-size: 24px; margin-bottom: 3px; }
  .kpi-health-label{ font-size: 10px; }
  .kpi-health-status { font-size: 9.5px; }

  /* ── Document Vault ───────────────────────────────────── */
  .doc-item { padding: 11px 14px; gap: 10px; }
  .doc-icon { font-size: 19px; }
  .doc-name { font-size: 12px; margin-bottom: 1px; }
  .doc-meta { font-size: 10px; }

  /* ── Status Tracker (modal) ───────────────────────────── */
  .status-step-dot   { width: 30px; height: 30px; font-size: 11px; }
  .status-step-label { font-size: 9.5px; }
  .status-line       { margin-top: -20px; }

  /* ── Modal ────────────────────────────────────────────── */
  .modal { padding: 6px 16px 28px; border-radius: 20px 20px 0 0; }
  .modal-title { font-size: 16px; }
  .modal-sub   { font-size: 12.5px; margin-bottom: 14px; }
  .ticket-code { font-size: 18px; letter-spacing: 2px; }
  .ticket-label{ font-size: 10.5px; }

  /* ── Timeline (dashboard) ─────────────────────────────── */
  .timeline-item { grid-template-columns: 46px 1fr; gap: 10px; padding: 10px 0; }
  .timeline-date  { font-size: 10px; }
  .timeline-title { font-size: 12.5px; }
  .timeline-desc  { font-size: 11px; }

  /* ── Bottom Nav ───────────────────────────────────────── */
  .bottom-nav-item { padding: 6px 4px; }
  .nav-icon  { font-size: 20px; }
  .nav-label { font-size: 9px; }

  /* ── Dividers & Utilities ─────────────────────────────── */
  .divider { margin: 11px 0; }
  .mb-16   { margin-bottom: 12px; }
  .mb-20   { margin-bottom: 14px; }
}

/* ── Very small phones (≤374px, e.g. iPhone SE) ──────────── */
@media (max-width: 374px) {
  .hero-title { font-size: 18px; }
  .kpi-num    { font-size: 21px; }
  .kpi-card   { padding: 10px 9px; }
  .event-card-title { font-size: 14px; }
  .header-title h1  { font-size: 10px; }
  .logo-img { width: 30px; height: 30px; }
  .kanban-col { min-width: 72vw; }
  .quick-action-btn { padding: 10px 11px; }
  .section-title { font-size: 17px; }
}


/* ═══════════════════════════════════════════════════════════════
   STUDENT VOICE — Component Styles
   Tiangong University · ISU Portal · Autumn 2026
═══════════════════════════════════════════════════════════════ */

/* ── Section subtitle ──────────────────────────────────────── */
.section-subtitle {
  font-size: 13px;
  color: var(--ink-light);
  margin-top: 3px;
  line-height: 1.5;
}

/* ── Mode Switcher Grid ──────────────────────────────────────── */
.sv-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sv-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background   var(--dur) var(--ease),
    box-shadow   var(--dur) var(--ease),
    transform    var(--dur) var(--ease-spring);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sv-mode-card:hover {
  border-color: var(--purple-light);
  background: var(--lavender);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sv-mode-card:focus-visible {
  outline: 3px solid var(--purple-xlight);
  outline-offset: 2px;
}
.sv-mode-card.selected {
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--lavender-mid) 0%, var(--lavender) 100%);
  box-shadow: 0 0 0 3px rgba(75,30,109,0.12), var(--shadow-sm);
}

.sv-mode-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.sv-mode-body  { flex: 1; min-width: 0; }
.sv-mode-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 3px;
}
.sv-mode-note {
  font-size: 11.5px;
  color: var(--ink-light);
  line-height: 1.4;
}

.sv-mode-check {
  position: absolute;
  top: 8px; right: 10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity   var(--dur) var(--ease),
    transform var(--dur) var(--ease-spring);
  pointer-events: none;
}
.sv-mode-card.selected .sv-mode-check {
  opacity: 1;
  transform: scale(1);
}

/* ── Identity Fields Animated Reveal ────────────────────────── */
.sv-identity-fields {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.38s cubic-bezier(0.4,0,0.2,1),
    opacity    0.28s cubic-bezier(0.4,0,0.2,1),
    margin-top 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sv-identity-fields.sv-fields-open {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
}
.sv-fields-inner {
  padding: 16px;
  background: var(--lavender);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

/* ── Category Grid ───────────────────────────────────────────── */
.sv-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.sv-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition:
    border-color var(--dur) var(--ease),
    background   var(--dur) var(--ease),
    box-shadow   var(--dur) var(--ease),
    transform    var(--dur) var(--ease-spring);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sv-cat-card:hover {
  border-color: var(--purple-light);
  background: var(--lavender);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.sv-cat-card:focus-visible {
  outline: 3px solid var(--purple-xlight);
  outline-offset: 2px;
}
.sv-cat-card.selected {
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--lavender-mid) 0%, var(--lavender) 100%);
  box-shadow: 0 0 0 3px rgba(75,30,109,0.12), var(--shadow-sm);
  transform: translateY(-2px) scale(1.03);
}

.sv-cat-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--dur) var(--ease-spring);
}
.sv-cat-card.selected .sv-cat-icon { transform: scale(1.15); }

.sv-cat-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-mid);
  line-height: 1.3;
}
.sv-cat-card.selected .sv-cat-label { color: var(--purple); }

.sv-cat-check {
  position: absolute;
  top: 5px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity   var(--dur) var(--ease),
    transform var(--dur) var(--ease-spring);
  pointer-events: none;
}
.sv-cat-card.selected .sv-cat-check {
  opacity: 1;
  transform: scale(1);
}

/* ── Submit Button shimmer ───────────────────────────────────── */
.sv-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.sv-submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.18) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.sv-submit-btn:hover::after { transform: translateX(100%); }

/* ── Confirmation Modals ─────────────────────────────────────── */
.sv-confirm-modal { text-align: center; }

.sv-confirm-icon {
  font-size: 52px;
  margin: 4px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  border-radius: 50%;
  animation: sv-icon-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}
.sv-confirm-icon--anon  { background: var(--lavender-mid); }
.sv-confirm-icon--ident { background: var(--success-light); }

@keyframes sv-icon-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.sv-confirm-body {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 18px;
  padding: 0 4px;
}

/* ── Enhanced Post-Submission Highlight Modal ──────────────── */
.hd-success-modal {
  max-width: 480px;
  padding: 16px 20px 24px;
}
.hd-success-icon-wrap {
  font-size: 46px;
  text-align: center;
  margin-bottom: 6px;
  animation: sv-icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.hd-success-card {
  margin: 16px 0;
  padding: 18px 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(75, 30, 109, 0.05) 0%, rgba(124, 62, 168, 0.12) 100%);
  border: 2px solid var(--purple-light);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(75, 30, 109, 0.10);
  position: relative;
}
.hd-case-badge-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--purple);
  background: #fff;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--purple-light);
  margin-bottom: 10px;
}
.hd-success-case-id {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--purple-dark);
  margin-bottom: 14px;
  word-break: break-all;
}
.btn-copy-case {
  background: #fff;
  border: 1.5px solid var(--purple-light);
  color: var(--purple);
  font-weight: 700;
  font-size: 12.5px;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  transition: all var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-xs);
}
.btn-copy-case:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(75, 30, 109, 0.25);
}
.btn-copy-case.copied {
  background: #16A34A !important;
  color: #fff !important;
  border-color: #16A34A !important;
  animation: pulseCopied 0.35s ease;
}
@keyframes pulseCopied {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Strong Visual Highlight Banner (Alert Box) */
.hd-save-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FAF5FF;
  border: 1.5px solid #D8B4FE;
  border-left: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 14px 0;
  box-shadow: 0 2px 10px rgba(75, 30, 109, 0.08);
  text-align: left;
}
.hd-save-alert-box .alert-icon {
  font-size: 18px;
  line-height: 1.3;
  flex-shrink: 0;
}
.hd-save-alert-box .alert-content strong {
  font-size: 12.5px;
  line-height: 1.55;
  color: #4C1D95;
  display: block;
}

/* User Identity Modal */
.user-ident-modal {
  max-width: 460px;
  padding: 22px 24px 28px;
}

/* Modal Role Segmented Control (Student / Admin) */
.modal-role-segmented {
  display: flex;
  background: var(--lavender);
  border: 1.5px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}
.modal-role-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-mid);
  cursor: pointer;
  transition: all var(--transition);
}
.modal-role-btn:hover {
  color: var(--purple);
  background: rgba(75, 30, 109, 0.06);
}
.modal-role-btn.active {
  background: #4B1E6D;
  color: #fff;
  box-shadow: 0 3px 10px rgba(75, 30, 109, 0.28);
}
.modal-role-btn .mr-icon {
  font-size: 15px;
  line-height: 1;
}

/* Password Toggle Eye Button */
.btn-toggle-pass {
  transition: opacity var(--dur);
}
.btn-toggle-pass:hover {
  opacity: 0.75;
}

/* Sidebar Admin Pill Badge */
.sidebar-admin-badge {
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #4B1E6D, #6D28D9);
  color: #fff;
  margin-left: auto;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 6px rgba(75, 30, 109, 0.25);
  text-transform: uppercase;
}

/* ── Tablet (<=900px) — 3-col categories ───────────────────── */
@media (max-width: 900px) {
  .sv-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hd-action-grid { grid-template-columns: repeat(2, 1fr); }
  .hd-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .unsorted-card { grid-column: span 2; }
  .stages-explain-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-filter-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (<=599px) — 2-col categories, stacked mode cards ── */
@media (max-width: 599px) {
  .sv-mode-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sv-mode-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    gap: 8px;
  }
  .sv-mode-icon  { font-size: 26px; }
  .sv-mode-label { font-size: 12.5px; }
  .sv-mode-note  { font-size: 11px; }

  .hd-action-grid { grid-template-columns: 1fr; gap: 10px; }
  .hd-cat-grid  { grid-template-columns: 1fr; gap: 9px; }
  .unsorted-card { grid-column: span 1; }
  .pref-grid { grid-template-columns: 1fr; gap: 8px; }

  .sv-cat-grid  { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .sv-cat-icon  { font-size: 20px; }
  .sv-cat-label { font-size: 10px; }

  .stages-explain-grid { grid-template-columns: 1fr; gap: 8px; }
  .admin-filter-bar { grid-template-columns: 1fr; gap: 8px; }
  .stepper-5 { padding: 0; }
  .step-node { width: 52px; }
  .step-dot-wrap { width: 30px; height: 30px; font-size: 11px; }
  .step-label { font-size: 10px; }

  .sv-identity-fields.sv-fields-open { max-height: 600px; }
  .sv-submit-btn { font-size: 14px; }
  .ai-floating-btn { bottom: 80px; right: 14px; padding: 8px 14px; font-size: 12.5px; }
}

/* ── Very small phones (<=374px) ────────────────────────────── */
@media (max-width: 374px) {
  .sv-mode-card { padding: 12px 8px; }
  .sv-cat-card  { padding: 12px 6px 10px; }
  .sv-cat-icon  { font-size: 18px; }
  .hd-action-card { padding: 12px 10px; }
}

/* ══════════════════════════════════════════════════════════════
   STUDENT-TO-STUDENT SUPPORT PLATFORM — EXPANDED STYLES
══════════════════════════════════════════════════════════════ */

/* ── 1. Welcome Banner & Room 107 Status Pill ──────────────── */
.hd-welcome-banner {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 65%, var(--purple-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  color: #fff;
  box-shadow: var(--shadow-purple);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.hd-welcome-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hd-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.hd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.status-pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
  animation: pulse-green 1.8s infinite;
  display: inline-block;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.hd-banner-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.hd-banner-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,0.92);
  line-height: 1.5;
  margin-bottom: 14px;
  max-width: 650px;
}
.hd-banner-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  flex-wrap: wrap;
}
.hd-banner-meta .meta-icon { margin-right: 2px; }

/* ── 2. 6 Action Cards Grid ────────────────────────────────── */
.hd-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 6px;
}
.hd-action-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: var(--shadow-xs);
  position: relative;
  outline: none;
}
.hd-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--purple-light);
}
.hd-action-card:focus-visible {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(75,30,109,0.25);
}
.hd-action-card.highlight {
  border-color: #0EA5E9;
  background: linear-gradient(135deg, #fff 0%, #F0F9FF 100%);
}
.hd-action-card.highlight:hover {
  border-color: #0284C7;
  box-shadow: 0 6px 20px rgba(14,165,233,0.18);
}
.hd-action-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease-spring);
}
.hd-action-card:hover .hd-action-icon-wrap {
  transform: scale(1.12);
}
.action-help    { background: rgba(220,38,38,0.1); color: #DC2626; }
.action-concern { background: rgba(217,119,6,0.1); color: #D97706; }
.action-idea    { background: rgba(22,163,74,0.1); color: #16A34A; }
.action-talk    { background: rgba(124,62,168,0.12); color: #7C3EA8; }
.action-route   { background: rgba(14,165,233,0.12); color: #0EA5E9; }
.action-track   { background: rgba(75,30,109,0.1); color: #4B1E6D; }
.hd-action-text {
  flex: 1;
  min-width: 0;
}
.hd-action-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 3px;
}
.hd-action-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hd-action-arrow {
  font-size: 16px;
  color: var(--ink-muted);
  transition: transform var(--dur) var(--ease);
}
.hd-action-card:hover .hd-action-arrow {
  color: var(--purple);
  transform: translateX(3px);
}
.hd-action-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
  flex-shrink: 0;
}

/* ── 3. Urgency Box ─────────────────────────────────────────── */
.urgency-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.urgency-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.urgency-icon {
  font-size: 26px;
  line-height: 1;
}
.urgency-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.urgency-sub {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.urgency-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.urgency-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.urgency-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--gray-300);
  border-radius: 28px;
  transition: 0.3s;
}
.urgency-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.urgency-toggle input:checked + .urgency-slider {
  background-color: #E53935;
}
.urgency-toggle input:checked + .urgency-slider:before {
  transform: translateX(20px);
}
.badge-urgent {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  animation: pulse-urgent 2s infinite;
}
@keyframes pulse-urgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.urgency-pill-state {
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

/* ── 4. 9 Structured Categories Grid ───────────────────────── */
.hd-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.hd-cat-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  position: relative;
  transition: all var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
  outline: none;
}
.hd-cat-card:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.hd-cat-card.selected {
  border-color: var(--purple);
  background: linear-gradient(135deg, #FAF7FD 0%, #F3ECF9 100%);
  box-shadow: 0 0 0 2px rgba(75,30,109,0.18), var(--shadow-sm);
}
.hd-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hd-cat-icon {
  font-size: 20px;
  line-height: 1;
}
.hd-cat-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.hd-cat-card.selected .hd-cat-title {
  color: var(--purple);
}
.hd-cat-sub {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.35;
}
.hd-cat-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-spring);
  pointer-events: none;
}
.hd-cat-card.selected .hd-cat-check {
  opacity: 1;
  transform: scale(1);
}
.unsorted-card {
  grid-column: span 3;
  border-style: dashed;
  background: #F8FAFC;
}
.unsorted-card:hover {
  background: #F0F9FF;
  border-color: #0EA5E9;
}

/* ── 5. Room 107 Offline Consultation & Preference Selector ── */
.room107-info-box {
  background: var(--lavender-mid);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
}
.room107-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.room107-detail-item .r-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pref-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pref-card:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
}
.pref-card.selected {
  border-color: var(--purple);
  background: var(--lavender);
  box-shadow: 0 0 0 2px rgba(75,30,109,0.15);
}
.pref-icon { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.pref-label { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.pref-sub { font-size: 11px; color: var(--ink-muted); }
.pref-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: all var(--dur) var(--ease-spring);
}
.pref-card.selected .pref-check {
  opacity: 1;
  transform: scale(1);
}

/* ── 6. 5-Stage Case Tracker Stepper ───────────────────────── */
.track-search-row {
  display: flex;
  gap: 10px;
}
.track-code-input {
  font-family: monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 700;
}
.sample-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.sample-chip-label {
  font-size: 11.5px;
  color: var(--ink-muted);
}
.sample-chip {
  background: var(--lavender-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  font-family: monospace;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.sample-chip:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.stepper-5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 24px 0 18px;
  padding: 0 10px;
}
.step-track-line {
  position: absolute;
  top: 18px;
  left: 32px;
  right: 32px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  z-index: 1;
}
.step-track-line-progress {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #F59E0B 0%, #2563EB 25%, #7C3EA8 50%, #16A34A 80%, #6B7280 100%);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 64px;
  text-align: center;
}
.step-dot-wrap {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  transition: all var(--dur) var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.step-node.completed .step-dot-wrap {
  background: #16A34A;
  border-color: #16A34A;
  color: #fff;
}
.step-node.current .step-dot-wrap {
  border-width: 3px;
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(124,62,168,0.2);
}
.step-node.current.stage-received .step-dot-wrap { border-color: #F59E0B; color: #F59E0B; background: #FEF3C7; }
.step-node.current.stage-reviewing .step-dot-wrap { border-color: #2563EB; color: #2563EB; background: #DBEAFE; }
.step-node.current.stage-referred .step-dot-wrap { border-color: #7C3EA8; color: #7C3EA8; background: #F3E8FF; }
.step-node.current.stage-followup .step-dot-wrap { border-color: #16A34A; color: #16A34A; background: #DCFCE7; }
.step-node.current.stage-closed .step-dot-wrap { border-color: #4B5563; color: #4B5563; background: #F3F4F6; }
.step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.2;
}
.step-node.current .step-label {
  font-weight: 800;
  color: var(--ink);
}
.step-node.completed .step-label {
  color: var(--ink-mid);
}
.stages-explain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.stage-explain-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}
.stage-explain-item .sei-icon {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  width: fit-content;
}
.stage-explain-item p {
  color: var(--ink-muted);
  line-height: 1.35;
  margin-top: 2px;
}

/* ── 7. Floating Action Button & AI Assistant Modal ────────── */
.ai-floating-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 990;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 70%, var(--purple-light) 100%);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 10px 18px 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(75,30,109,0.38);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all var(--dur) var(--ease-spring);
  border: 1px solid rgba(255,255,255,0.25);
}
.ai-floating-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 28px rgba(75,30,109,0.5);
}
.ai-fab-icon { font-size: 20px; }
.ai-fab-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  animation: pulse-green 1.8s infinite;
}
.ai-assistant-modal {
  max-width: 540px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}
.ai-modal-header {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.ai-modal-title { font-size: 15.5px; font-weight: 700; }
.ai-modal-subtitle { font-size: 11.5px; opacity: 0.85; }
.ai-close-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--dur);
}
.ai-close-btn:hover { background: rgba(255,255,255,0.3); }
.ai-emergency-guard {
  background: #FEE2E2;
  border-bottom: 2px solid #EF4444;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #991B1B;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.aeg-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.aeg-content strong { font-size: 13px; display: block; margin-bottom: 2px; }
.aeg-content p { font-size: 12px; line-height: 1.45; }
.ai-chat-window {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAF8FC;
  max-height: 48vh;
}
.ai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ai-msg-bot { align-self: flex-start; max-width: 90%; }
.ai-msg-user { align-self: flex-end; flex-direction: row-reverse; max-width: 85%; }
.ai-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lavender-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ai-msg-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 2px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.ai-msg-user .ai-msg-bubble {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  border-radius: 14px 14px 2px 14px;
}
.ai-chips-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ai-chip {
  background: var(--lavender-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.ai-chip:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.ai-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.ai-input-field {
  flex: 1;
  font-size: 13.5px;
  border-radius: var(--radius-full);
  padding-left: 16px;
}
.ai-send-btn {
  border-radius: 50%;
  width: 40px; height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── 8. Admin Case Manager ─────────────────────────────────── */
.admin-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--lavender-mid);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.admin-case-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all var(--dur) var(--ease);
}
.admin-case-card.is-urgent {
  border-color: #F87171;
  background: linear-gradient(135deg, #FFF7F7 0%, #FFFFFF 100%);
  box-shadow: 0 2px 12px rgba(220,38,38,0.12);
}
.admin-case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.admin-case-body {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
  margin-bottom: 12px;
}
.admin-case-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-stage-select {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}
.admin-note-input {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 160px;
}

/* ══════════════════════════════════════════════════════════════
   EVENTS REFACTOR: PLACEHOLDER, PUBLISHED FEED & ADMIN PUBLISHER
══════════════════════════════════════════════════════════════ */

/* Events Admin Control Bar & Segmented Switcher */
.events-admin-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--lavender-dark);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.events-view-switcher {
  display: inline-flex;
  background: var(--lavender-mid);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 2px;
}
.events-view-tab {
  border: none;
  background: transparent;
  color: var(--ink-mid);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.events-view-tab:hover {
  color: var(--purple);
}
.events-view-tab.active {
  background: var(--purple);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.events-admin-notice-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Elegant Public Events Placeholder Card */
.events-placeholder-card {
  background: linear-gradient(135deg, rgba(75, 30, 109, 0.03) 0%, rgba(123, 67, 151, 0.08) 100%);
  border: 2px dashed rgba(75, 30, 109, 0.28);
  border-radius: var(--radius-lg);
  padding: 42px 24px;
  text-align: center;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.events-placeholder-card:hover {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, rgba(75, 30, 109, 0.05) 0%, rgba(123, 67, 151, 0.11) 100%);
}
.events-placeholder-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  background: rgba(75, 30, 109, 0.08);
  border-radius: 50%;
  margin-bottom: 18px;
  border: 1px solid rgba(75, 30, 109, 0.12);
}
.events-balloon-icon {
  font-size: 38px;
  display: inline-block;
  animation: floatBalloon 3.2s ease-in-out infinite;
}
.events-calendar-mini-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 20px;
  background: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}
@keyframes floatBalloon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
.events-placeholder-title {
  font-size: 21px;
  font-weight: 900;
  color: var(--purple-dark);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.events-placeholder-desc {
  font-size: 14px;
  color: var(--ink-mid);
  max-width: 540px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.events-placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.08);
}
.events-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: pulseDot 2s infinite;
}
.events-wechat-icon {
  font-size: 15px;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.35); }
}
.events-placeholder-footer {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 16px;
  font-weight: 500;
}

/* Published Student Events Cards */
.published-event-card {
  background: #fff;
  border: 1px solid var(--lavender-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.published-event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--lavender-deep);
}
.published-event-header {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  padding: 16px 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.published-event-date-box {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  text-align: center;
  min-width: 60px;
}
.published-event-day {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.published-event-month {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.published-event-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}
.published-event-meta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.published-event-body {
  padding: 16px 18px;
}
.published-event-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px;
  margin-bottom: 14px;
}
.published-event-info-item {
  font-size: 12.5px;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}
.published-event-info-item strong {
  color: var(--ink);
}
.published-event-desc {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 14px;
}
.published-event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--lavender);
  flex-wrap: wrap;
  gap: 10px;
}

/* Admin Event Publisher Tool */
.admin-pub-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--lavender-mid);
  border-radius: var(--radius-sm);
  border: 1px solid var(--lavender-dark);
}
.admin-preset-btn {
  background: #fff;
  border: 1px solid var(--lavender-deep);
  color: var(--purple-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-preset-btn:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.admin-pub-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  .admin-pub-form-grid {
    grid-template-columns: 1fr;
  }
}
.admin-pub-verify-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.admin-pub-verify-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #065F46;
  cursor: pointer;
}
.admin-published-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.admin-published-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--lavender);
  color: var(--purple-dark);
  font-weight: 700;
  border-bottom: 1px solid var(--lavender-dark);
}
.admin-published-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--lavender);
  color: var(--ink-mid);
}

/* ══════════════════════════════════════════════════════════════
   TWO-WAY CASE CHAT SYSTEM (STUDENT ↔ ADMIN)
   Tiangong University ISU Support Desk
══════════════════════════════════════════════════════════════ */
.case-chat-card {
  margin-top: 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.case-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #FAF7FD 0%, #F5F0FA 100%);
  border-bottom: 1.5px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.case-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--purple);
}

.case-chat-sub {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 2px;
}

.case-chat-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  box-shadow: var(--shadow-xs);
}

.chat-live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
  animation: pulse 2s infinite;
}

.chat-count-badge {
  background: var(--purple);
  color: #FFFFFF;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 800;
  margin-left: 2px;
}

.case-chat-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #FDF9F3;
  border-bottom: 1px solid #F3E8D0;
  font-size: 11.5px;
  color: #8C6212;
  line-height: 1.4;
}

.chat-notice-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.case-chat-stream {
  padding: 18px 16px;
  max-height: 380px;
  overflow-y: auto;
  background: #FAF8FC;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.case-chat-stream::-webkit-scrollbar {
  width: 6px;
}
.case-chat-stream::-webkit-scrollbar-track {
  background: #F5F0FA;
}
.case-chat-stream::-webkit-scrollbar-thumb {
  background: var(--lavender-dark);
  border-radius: 3px;
}
.case-chat-stream::-webkit-scrollbar-thumb:hover {
  background: var(--purple-light);
}

.case-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeIn 0.25s ease-out;
}

.case-msg-row.msg-admin {
  flex-direction: row;
}

.case-msg-row.msg-student {
  flex-direction: row-reverse;
}

.case-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.msg-admin .case-msg-avatar {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  color: #FFFFFF;
  border: 1.5px solid var(--purple-mid);
}

.msg-student .case-msg-avatar {
  background: linear-gradient(135deg, var(--lavender-mid) 0%, #FFFFFF 100%);
  border: 1.5px solid var(--purple-light);
  color: var(--purple);
}

.case-msg-content {
  max-width: 76%;
  display: flex;
  flex-direction: column;
}

.msg-admin .case-msg-content {
  align-items: flex-start;
}

.msg-student .case-msg-content {
  align-items: flex-end;
}

.case-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--ink-muted);
}

.case-msg-name {
  font-weight: 700;
  color: var(--ink);
}

.badge-role-admin {
  background: var(--lavender-mid);
  color: var(--purple);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--lavender-dark);
}

.badge-role-student {
  background: var(--gray-200);
  color: var(--ink-mid);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.case-msg-time {
  font-size: 10.5px;
  color: var(--ink-muted);
}

.case-msg-bubble {
  padding: 10px 15px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 14px;
  word-break: break-word;
}

.msg-admin .case-msg-bubble {
  background: #FFFFFF;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-top-left-radius: 3px;
  box-shadow: var(--shadow-xs);
}

.msg-student .case-msg-bubble {
  background: var(--purple);
  color: #FFFFFF;
  border-top-right-radius: 3px;
  box-shadow: 0 2px 10px rgba(75, 30, 109, 0.22);
}

.chat-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-muted);
}
.chat-empty-state .empty-icon {
  font-size: 34px;
  margin-bottom: 8px;
}
.chat-empty-state .empty-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.chat-empty-state .empty-desc {
  font-size: 12.5px;
  margin-top: 4px;
  color: var(--ink-light);
}

.case-chat-quick-wrap {
  padding: 10px 16px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
}

.chat-quick-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.chat-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-chip {
  background: var(--lavender);
  border: 1px solid var(--lavender-dark);
  color: var(--purple-mid);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.chat-chip:hover {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--purple);
  transform: translateY(-1px);
}

.case-chat-input-form {
  padding: 12px 16px 16px 16px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
}

.case-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 6px 4px 14px;
  transition: all var(--transition);
}

.case-chat-input-bar:focus-within {
  border-color: var(--purple);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(75, 30, 109, 0.14);
}

.case-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  padding: 8px 0;
  font-family: inherit;
}

.btn-chat-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-chat-send:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(75, 30, 109, 0.28);
}

.btn-chat-send:active {
  transform: translateY(0);
}

/* ── ADMIN CASE CARD CHAT DRAWER & THREAD ──────────────────── */
.btn-admin-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  border: 1px solid var(--lavender-dark);
  background: var(--lavender);
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-admin-chat-toggle:hover {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--purple);
}
.btn-admin-chat-toggle.active {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--purple);
}
.pulse-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

.admin-case-chat-drawer {
  margin-top: 12px;
  border-top: 1.5px solid var(--border);
  padding-top: 12px;
  background: #FDFBFE;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.admin-chat-inner {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #FFFFFF;
}

.admin-chat-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--lavender);
  border-bottom: 1px solid var(--border);
}

.admin-chat-stream {
  padding: 12px;
  max-height: 250px;
  overflow-y: auto;
  background: #FAF8FC;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.admin-chat-stream::-webkit-scrollbar {
  width: 5px;
}
.admin-chat-stream::-webkit-scrollbar-thumb {
  background: var(--lavender-dark);
  border-radius: 3px;
}

.admin-quick-presets {
  padding: 8px 12px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
}

.admin-quick-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.admin-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-preset-chip {
  background: var(--lavender);
  border: 1px solid var(--lavender-dark);
  color: var(--purple-dark);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.admin-preset-chip:hover {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--purple);
}

.admin-chat-form {
  padding: 8px 12px 10px 12px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
}

.admin-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-chat-input {
  flex: 1;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  outline: none;
  font-family: inherit;
  transition: all var(--transition);
}

.admin-chat-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(75, 30, 109, 0.12);
}

.btn-admin-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: var(--purple);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-xs);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-admin-send:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .case-msg-content {
    max-width: 86%;
  }
  .case-chat-stream {
    max-height: 300px;
    padding: 14px 12px;
  }
  .case-chat-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .case-chat-status-pill {
    align-self: flex-start;
  }
  .admin-chat-input-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-admin-send {
    justify-content: center;
  }
}



