@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  /* Core palette */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-ultra-light: #eff6ff;

  /* Surface */
  --bg: #f4f6f9;
  --card: #ffffff;
  --card-hover: #fafbfc;

  /* Text */
  --text: #0d1117;
  --text-secondary: #374151;
  --text-light: #6b7280;
  --text-muted: #9ca3af;

  /* Border */
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Semantic */
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef9c3;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #2563eb;
  --info-light: #dbeafe;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 2px 8px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-xl: 0 12px 40px rgba(0,0,0,.12);

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

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --transition: all .18s var(--ease);

  /* Sidebar */
  --sidebar-bg: #0d1117;
  --sidebar-text: rgba(255,255,255,.6);
  --sidebar-active: rgba(255,255,255,.1);
  --sidebar-hover: rgba(255,255,255,.07);
  --sidebar-border: rgba(255,255,255,.06);
  --sidebar-width: 224px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: 14px;
}

.hidden { display: none !important; }

/* ══════════════════════════════════════════════════
   AUTH PAGE
══════════════════════════════════════════════════ */

#auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  flex-direction: column;
  background: #f8f9fb;
  position: relative;
  overflow: hidden;
}



/* Corner accents */
#auth-page::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.07) 0%, transparent 70%);
  pointer-events: none;
}

/* KODEX background watermark */
.auth-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(100px, 22vw, 220px);
  font-weight: 800;
  letter-spacing: -8px;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(37,99,235,.08);
  text-stroke: 1.5px rgba(37,99,235,.08);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

#portal-selector {
  text-align: center;
  animation: fadeInUp .5s var(--ease);
  position: relative;
  z-index: 1;
  max-width: 700px;
  width: 100%;
}

/* Brand */
.portal-header { margin-bottom: 44px; }

.portal-header .brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.portal-header .brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 10px rgba(13,17,23,.2);
}

.portal-header h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}

.portal-header .subtitle {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 400;
  margin-top: 4px;
}

/* ── Mode selector label ── */
.mode-selector-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

/* ── Mode toggle buttons ── */
.mode-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.mode-toggle {
  padding: 18px 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
  user-select: none;
}

.mode-toggle:hover {
  border-color: #c7d2fe;
  background: #fafcff;
}

.mode-toggle.active-corp {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.mode-toggle.active-acad {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.mode-toggle-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: var(--text-muted);
  transition: background .2s, color .2s;
}

.mode-toggle.active-corp .mode-toggle-icon { background: #dbeafe; color: var(--primary); }
.mode-toggle.active-acad .mode-toggle-icon { background: #ede9fe; color: #7c3aed; }

.mode-toggle h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  transition: color .2s;
}

.mode-toggle.active-corp h3 { color: #1e40af; }
.mode-toggle.active-acad h3 { color: #5b21b6; }

.mode-toggle p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.mode-toggle-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background .2s;
}

.mode-toggle-check svg { opacity: 0; transition: opacity .15s; }
.mode-toggle.active-corp .mode-toggle-check { background: var(--primary); }
.mode-toggle.active-acad .mode-toggle-check { background: #7c3aed; }
.mode-toggle.active-corp .mode-toggle-check svg,
.mode-toggle.active-acad .mode-toggle-check svg { opacity: 1; }

/* ── Portal cards wrap (animated reveal) ── */
.portal-cards-wrap {
  overflow: hidden;
  margin-top: 16px;
}

.portal-cards-section {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: transform .32s cubic-bezier(.22,.68,0,1.2), opacity .26s ease, max-height .3s ease;
}

.portal-cards-section.visible {
  max-height: 600px;
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Section label inside cards section */
.portal-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.corp-label { color: var(--primary); }
.acad-label { color: #7c3aed; }



/* Portal cards */
.portal-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.portal-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 26px 20px 22px;
  width: 186px;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.portal-card * { pointer-events: none; }
.portal-card > a:first-child { pointer-events: auto; }

.portal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .18s;
  border-radius: inherit;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.portal-card:active { transform: scale(0.98); }

/* Card type colours */
.staff-portal:hover     { --card-accent: var(--primary); background: #fafcff; border-color: #bfdbfe; }
.employee-portal:hover  { --card-accent: #059669; background: #fafffe; border-color: #a7f3d0; }
.lecturer-portal:hover  { --card-accent: #d97706; background: #fffdf5; border-color: #fde68a; }
.student-portal:hover   { --card-accent: #7c3aed; background: #fdfaff; border-color: #ddd6fe; }
.hod-portal:hover       { --card-accent: #0891b2; background: #f0fdff; border-color: #a5f3fc; }

.portal-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: var(--bg);
  color: var(--text-muted);
  transition: var(--transition);
}

.staff-portal:hover .portal-icon   { background: #eff6ff; color: var(--primary); }
.employee-portal:hover .portal-icon { background: #ecfdf5; color: #059669; }
.lecturer-portal:hover .portal-icon { background: #fffbeb; color: #d97706; }
.student-portal:hover .portal-icon  { background: #f5f3ff; color: #7c3aed; }
.hod-portal:hover .portal-icon     { background: #ecfeff; color: #0891b2; }

.portal-card h2 { font-size: 14px; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.portal-card p  { font-size: 12px; color: var(--text-light); margin-bottom: 16px; }

.portal-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-block;
}

.portal-card:hover .portal-arrow { transform: translateX(3px); }
.staff-portal:hover .portal-arrow   { color: var(--primary); }
.employee-portal:hover .portal-arrow { color: #059669; }
.lecturer-portal:hover .portal-arrow { color: #d97706; }
.student-portal:hover .portal-arrow  { color: #7c3aed; }
.hod-portal:hover .portal-arrow    { color: #0891b2; }

/* Auth forms */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  margin-bottom: 16px;
  transition: var(--transition);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.auth-back:hover { color: var(--text); background: white; }

.auth-container {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  animation: fadeInUp .45s var(--ease);
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
}

.auth-container h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 3px;
  text-align: center;
  color: var(--primary);
  letter-spacing: -.5px;
}

.auth-container .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 13px;
}

/* Portal theming on auth */
.employee-themed { border-top: 3px solid #059669; }
.employee-themed h1 { color: #059669 !important; }
.student-themed  { border-top: 3px solid #7c3aed; }
.student-themed h1  { color: #7c3aed !important; }

.employee-portal-badge,
.student-portal-badge {
  text-align: center;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

.employee-portal-badge { background: rgba(5,150,105,.08); color: #059669; }
.student-portal-badge  { background: rgba(124,58,237,.08); color: #7c3aed; }

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

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

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-secondary);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: white;
  color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.1px;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  box-shadow: 0 1px 3px rgba(37,99,235,.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(37,99,235,.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); border-color: var(--text-muted); }

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 1px 3px rgba(220,38,38,.2);
}

.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 1px 3px rgba(22,163,74,.2);
}

.btn-success:hover { background: #15803d; transform: translateY(-1px); }

.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 5px; }

/* Portal-specific buttons */
.btn-employee {
  width: 100%;
  padding: 11px;
  background: #059669;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(5,150,105,.25);
}

.btn-employee:hover { background: #047857; transform: translateY(-1px); }

.btn-student {
  width: 100%;
  padding: 11px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(124,58,237,.25);
}

.btn-student:hover { background: #6d28d9; transform: translateY(-1px); }

.employee-themed .form-group input:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,.08); }
.student-themed  .form-group input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.08); }

.auth-toggle {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-light);
}

.auth-toggle a {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover { text-decoration: underline; }

.error-msg {
  background: var(--danger-light);
  color: #991b1b;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  display: none;
  border: 1px solid rgba(220,38,38,.12);
}

/* ══════════════════════════════════════════════════
   DASHBOARD SHELL
══════════════════════════════════════════════════ */

#dashboard-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* Topbar */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-left h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
}

.topbar-left .portal-company {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}

.topbar-left .mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-info strong {
  color: var(--text);
  font-weight: 600;
}

/* Role badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.role-manager    { background: #dbeafe; color: #1d4ed8; }
.role-employee   { background: #dcfce7; color: #15803d; }
.role-lecturer   { background: #fef9c3; color: #a16207; }
.role-student    { background: #f3e8ff; color: #7c3aed; }
.role-admin      { background: #fee2e2; color: #dc2626; }
.role-hod        { background: #ecfeff; color: #0891b2; }
.role-superadmin { background: #0d1117; color: #f8fafc; }

/* Trial banners */
.trial-banner {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  color: #78350f;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.trial-expired-banner {
  background: var(--danger);
  color: white;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: none;
}

/* ══════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════ */

.main-layout {
  display: block;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* ── FLOATING PILL SIDEBAR (desktop) ── */
.sidebar {
  position: fixed;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 200px;
  max-height: calc(100vh - 56px - 28px);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 4px 24px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 12px;
  z-index: 100;
  overflow: hidden;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px;
  border-bottom: none;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0d1117;
  letter-spacing: -.2px;
}
.sidebar-section-title { display: none; }

.sidebar-nav {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 2px 0 4px;
  scrollbar-width: none;
  position: relative;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-nav a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: calc(100% - 16px);
  height: 40px;
  border-radius: 0;
  padding: 0 12px;
  margin: 0;
  color: #9ca3af;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

.sidebar-nav a span {
  display: inline;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .15s;
  letter-spacing: .1px;
}

.sidebar-nav a svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 1;
  transition: color .18s;
}

.sidebar-nav a::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background .18s;
  flex-shrink: 0;
}

.sidebar-nav a:hover { color: #374151; background: rgba(0,0,0,.04); }

.sidebar-nav a.active {
  color: var(--portal-primary, #2563eb);
  background: rgba(0,0,0,.05);
  font-weight: normal;
}
.sidebar-nav a.active::after { background: none; }
.sidebar-nav a.active svg { opacity: 1; color: inherit; }

/* Tooltip hidden when labels are showing */
.sidebar-nav a[data-tooltip]:hover::before { display: none; }

.sidebar-logout {
  flex-shrink: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,.06);
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* Sidebar divider line removed */
.sidebar-divider-line { display: none !important; }

/* ── Announcement badge (red line indicator) ── */
#nav-announcements {
  position: relative;
}
#nav-announcements .ann-line {
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #ef4444;
}


/* ══════════════════════════════════════════════════
   CONTENT AREA
══════════════════════════════════════════════════ */

.content {
  margin-left: 228px;
  padding: 24px 28px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
  max-width: 1180px;
  height: 100%;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -.5px;
  color: var(--text);
}

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

/* ══════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════ */

.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s;
}

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

.card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ══════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  opacity: 0;
  transition: opacity .18s;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card:hover::after { opacity: 1; }

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */

table { width: 100%; border-collapse: separate; border-spacing: 0; }

table th,
table td { padding: 9px 12px; text-align: left; font-size: 13px; }

table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  border-bottom: 1.5px solid var(--border);
  background: var(--border-light);
}

table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

table td {
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

table tbody tr { transition: background .12s; }
table tbody tr:hover { background: rgba(37,99,235,.02); }
table tbody tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════ */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

.status-active    { background: var(--success-light); color: #15803d; }
.status-stopped   { background: var(--danger-light); color: #991b1b; }
.status-present   { background: var(--success-light); color: #15803d; }
.status-late      { background: var(--warning-light); color: #92400e; }
.status-absent    { background: var(--danger-light); color: #991b1b; }

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(13,17,23,.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .15s ease;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 26px;
  width: 90%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn .22s var(--ease);
  border: 1px solid var(--border);
}

.modal h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -.3px;
}

.modal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════════════
   MISC COMPONENTS
══════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state p { margin-top: 8px; font-size: 14px; }

.actions-bar {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.quick-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.quick-actions .btn { flex: 1; min-width: 140px; }

.mark-method-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--primary) !important;
}

input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════
   REPORTS
══════════════════════════════════════════════════ */

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.report-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all .22s var(--ease);
  position: relative;
  overflow: hidden;
  min-height: 190px;
  box-shadow: var(--shadow-sm);
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--report-gradient);
  opacity: .7;
  transition: opacity .2s;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.report-card:hover::before { opacity: 1; }

.report-card-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
  background: var(--report-gradient);
  color: white;
  box-shadow: 0 3px 10px var(--report-shadow, rgba(0,0,0,.14));
  transition: transform .2s;
}

.report-card:hover .report-card-icon { transform: scale(1.06); }

.report-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.report-card-desc  { font-size: 11px; color: var(--text-light); line-height: 1.5; flex: 1; margin-bottom: 12px; }

.report-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .18s;
  background: var(--report-gradient);
  color: white;
  box-shadow: 0 2px 6px var(--report-shadow, rgba(0,0,0,.1));
}

.report-card-btn:hover {
  box-shadow: 0 4px 12px var(--report-shadow, rgba(0,0,0,.18));
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════
   PORTAL THEMES
══════════════════════════════════════════════════ */

#dashboard-page[data-portal="manager"]  {
  --portal-primary: #2563eb; --portal-primary-dark: #1d4ed8; --portal-primary-light: #60a5fa;
  --sidebar-bg: #0f172a;
}

#dashboard-page[data-portal="lecturer"] {
  --portal-primary: #d97706; --portal-primary-dark: #b45309; --portal-primary-light: #fbbf24;
  --sidebar-bg: #1c1008;
}

#dashboard-page[data-portal="employee"] {
  --portal-primary: #16a34a; --portal-primary-dark: #15803d; --portal-primary-light: #4ade80;
  --sidebar-bg: #0a1f14;
}

#dashboard-page[data-portal="student"]  {
  --portal-primary: #7c3aed; --portal-primary-dark: #6d28d9; --portal-primary-light: #a78bfa;
  --sidebar-bg: #160d2e;
}

#dashboard-page[data-portal="hod"] {
  --portal-primary: #0891b2; --portal-primary-dark: #0e7490; --portal-primary-light: #22d3ee;
  --sidebar-bg: #042f3d;
}

#dashboard-page[data-portal="admin"]    {
  --portal-primary: #374151; --portal-primary-dark: #1f2937; --portal-primary-light: #6b7280;
  --sidebar-bg: #0d1117;
}

/* Theme overrides */
#dashboard-page[data-portal] .topbar-left h2 { color: var(--portal-primary, var(--primary)); }

#dashboard-page[data-portal] .sidebar {
  /* floating pill sidebar — bg is always white, portal colour used for active icon */
}

#dashboard-page[data-portal] .stat-card .stat-value,
#dashboard-page[data-portal] .stat-card-v2 .stat-value { color: var(--portal-primary); }

#dashboard-page[data-portal] .btn-primary {
  background: var(--portal-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

#dashboard-page[data-portal] .btn-primary:hover {
  background: var(--portal-primary-dark);
}

#dashboard-page[data-portal] .sidebar-nav a.active {
  color: var(--portal-primary);
  background: none;
}
#dashboard-page[data-portal] .sidebar-nav a.active::after {
  background: var(--portal-primary);
}

/* ══════════════════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  z-index: 150;
  padding-left: 4px;
  padding-right: 4px;
  align-items: center;
  justify-content: space-around;
}

@media (max-width: 768px) {
  /* On mobile the floating sidebar becomes a sliding drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -260px !important;
    bottom: 0 !important;
    width: 240px !important;
    max-height: 100vh !important;
    transform: none !important;
    border-radius: 0 22px 22px 0 !important;
    z-index: 300 !important;
    transition: left .26s ease !important;
    padding: 20px 0 16px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  .sidebar.open {
    left: 0 !important;
    box-shadow: 4px 0 30px rgba(0,0,0,.15) !important;
  }
  /* Show labels in mobile drawer */
  .sidebar-nav a {
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    border-radius: 0 !important;
    padding: 12px 20px !important;
    margin: 0 !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid rgba(0,0,0,.07) !important;
  }
  .sidebar-nav a span { display: inline !important; font-size: 13px; font-weight: 700; letter-spacing: .1px; }
  .sidebar-nav a::after { display: none !important; }
  .sidebar-nav a.active { background: rgba(0,0,0,.06) !important; color: var(--portal-primary, #2563eb) !important; }
  .sidebar-logo {
    justify-content: flex-start !important;
    padding: 0 16px 12px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid rgba(0,0,0,.07) !important;
  }
  .sidebar-logo-text { display: block !important; font-size: 14px; font-weight: 800; color: #0d1117; }
  .sidebar-divider-line { display: block !important; }
  .sidebar-nav a[data-tooltip]:hover::before { display: none !important; }
  .topbar { padding: 0 14px; }
  .topbar-left .portal-company,
  .topbar-left .mode-badge { display: none; }
  .main-layout { display: block; height: calc(100vh - 56px); overflow-y: auto; }
  /* bottom padding clears the bottom nav bar */
  .content { margin-left: 0 !important; padding: 16px 14px; padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 16px) !important; height: auto; overflow-y: visible; max-width: 100%; }
  .modal { padding: 20px 16px; margin: 12px; }
}

@media (max-width: 600px) {
  .auth-container { padding: 26px 18px; border-radius: var(--radius-lg); }
  .portal-header h1 { font-size: 24px; }
  .form-group input, .form-group select { font-size: 16px !important; }
  .btn { min-height: 44px; font-size: 15px; touch-action: manipulation; }
  .auth-back { min-height: 44px; display: flex; align-items: center; touch-action: manipulation; }
}

@media (max-width: 768px) {
  /* Show floating bottom nav, keep sidebar as drawer (toggled via More) */
  .bottom-nav { display: flex; }
  .bottom-nav-spacer { display: block; }
  .sidebar-overlay { display: block; }
  .topbar-menu-btn { display: flex !important; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 13px 10px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-label { font-size: 9px; }

  .page-header h2 { font-size: 16px; }
  .page-header p  { font-size: 12px; }
  .card { padding: 13px; }

  .quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-actions .btn { min-width: unset; }
  .reports-grid { grid-template-columns: 1fr; }

  .topbar .user-info strong { display: none; }
  .topbar { padding: 0 12px; height: 52px; }
  /* Enough bottom padding so content clears the floating nav pill */
  .content { padding: 14px 12px; padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 16px); }
  .main-layout { height: calc(100vh - 52px); }
}

@media (max-width: 480px) {
  .stats-grid { gap: 8px; }
  .stat-card .stat-value { font-size: 20px; }
  .auth-container { padding: 20px 14px; }
  .quick-actions { grid-template-columns: 1fr; }
  table th, table td { padding: 8px 6px; font-size: 12px; }
}

@media (max-width: 380px) {
  .portal-header h1 { font-size: 22px; }
  #portal-cards-acad .portal-cards { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════
   MOBILE COMPONENTS
══════════════════════════════════════════════════ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,17,23,.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  animation: fadeIn .18s ease;
}

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

.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
  margin-right: 4px;
}

.topbar-menu-btn:hover { background: var(--border); color: var(--text); }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

.table-scroll table { min-width: 480px; }


.bottom-nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  height: 58px;
  cursor: pointer;
  color: #b0b7c3;
  transition: all .15s ease;
  border: none;
  background: none;
  padding: 0 2px;
  position: relative;
  border-radius: 10px;
  min-width: 0;
}

/* name beside icon */
.bottom-nav-item .nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
  line-height: 1;
}

.bottom-nav-dot { display: none; }

.bottom-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; transition: color .15s; }
.bottom-nav-item:hover { color: #6b7280; background: rgba(0,0,0,.03); }
.bottom-nav-item.active { color: var(--portal-primary, #2563eb); }
.bottom-nav-item.active svg { transform: scale(1.1); }
.bottom-nav-item:active { transform: scale(.93); }

/* On very small screens shrink labels slightly */
@media (max-width: 360px) {
  .bottom-nav-item .nav-label { font-size: 9.5px; }
  .bottom-nav-item svg { width: 18px; height: 18px; }
  .bottom-nav-item { gap: 3px; }
}

.bottom-nav-spacer { display: none; height: calc(58px + env(safe-area-inset-bottom, 0px)); flex-shrink: 0; }

@media (max-width: 540px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    padding: 20px 18px 30px;
    animation: modalSlideUp .28s var(--ease);
    margin: 0;
  }

  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .modal::before {
    content: '';
    display: block;
    width: 32px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
  }
}

.sidebar.sidebar-force-open {
  display: flex !important;
  flex-direction: column !important;
}

/* ══════════════════════════════════════════════════
   ERROR SHAKE
══════════════════════════════════════════════════ */

@keyframes shake-error {
  0%,100% { transform: translateX(0); }
  15%      { transform: translateX(-5px); }
  30%      { transform: translateX(5px); }
  45%      { transform: translateX(-3px); }
  60%      { transform: translateX(3px); }
  75%      { transform: translateX(-2px); }
  90%      { transform: translateX(2px); }
}

.error-msg.shake { animation: shake-error .4s ease; }

/* ══════════════════════════════════════════════════
   ADMIN DASHBOARD v2
══════════════════════════════════════════════════ */

.dashboard-welcome h2 {
  font-size: 20px; font-weight: 700; color: var(--text);
  letter-spacing: -.5px; margin-bottom: 3px;
}

.dashboard-welcome p { font-size: 13px; color: var(--text-light); margin: 0; }

/* Institution code */
.inst-code-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  text-align: center;
  min-width: 144px;
  flex-shrink: 0;
}

.inst-code-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 3px;
}

.inst-code-value {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--primary);
  margin-bottom: 6px;
}

/* Stat cards v2 */
.stat-card-v2 {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card-v2:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card-v2 .stat-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.stat-card-v2 .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.stat-card-v2 .stat-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.stat-card-v2 .stat-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-v2 .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-card-v2 .stat-trend { font-size: 11px; color: var(--text-muted); }

.stat-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-left: 4px;
  vertical-align: middle;
  animation: pulse 1.8s ease infinite;
}

/* Quick actions bar */
.quick-actions-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.quick-actions-bar .section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.quick-actions-bar .actions-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

/* Action chips */
.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.action-chip:hover { opacity: .85; transform: translateY(-1px); }
.action-chip:active { transform: scale(.97); }

.action-chip.blue   { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.action-chip.green  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.action-chip.purple { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.action-chip.amber  { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.action-chip.slate  { background: var(--bg); color: var(--text-secondary); border-color: var(--border); }

/* Dashboard panels */
.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.dashboard-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.dashboard-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.dashboard-panel .panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.dashboard-panel .panel-link {
  font-size: 11px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.dashboard-panel .panel-link:hover { text-decoration: underline; }

/* Session rows */
.session-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.session-row:last-child { border-bottom: none; }

.session-indicator {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.session-indicator.live  { background: var(--success); }
.session-indicator.ended { background: var(--border); }

.session-row-info { flex: 1; min-width: 0; }

.session-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-row-sub  { font-size: 11px; color: var(--text-muted); }
.session-row-time { font-size: 11px; white-space: nowrap; }
.session-row-time.live  { color: var(--success); font-weight: 600; }
.session-row-time.ended { color: var(--text-muted); }

/* Announcement rows */
.ann-row {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.ann-row:last-child { border-bottom: none; }

.ann-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.ann-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.ann-meta  { font-size: 11px; color: var(--text-muted); }

@media (max-width: 860px) {
  .dashboard-panels { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .stat-card-v2 .stat-value { font-size: 22px; }
  .quick-actions-bar .actions-row { gap: 6px; }
  .action-chip { padding: 6px 10px; font-size: 11px; }
}

/* ── Dashboard skeleton (prevents flash of wrong role content) ── */
.dashboard-skeleton { padding: 4px 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.skeleton-header {
  height: 56px; background: var(--border); border-radius: var(--radius-md);
  margin-bottom: 16px; width: 55%;
}
.skeleton-cards {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 16px;
}
.skeleton-card {
  height: 88px; background: var(--border); border-radius: var(--radius-md);
}
.skeleton-body {
  height: 200px; background: var(--border); border-radius: var(--radius-md);
}
@media (max-width: 768px) {
  .skeleton-cards { grid-template-columns: 1fr 1fr; }
}
