/* ═══════════════════════════════════════════════════════════
   SPX Faculty Command Center — Smoke & Light Design System v5
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Color Palette */
  --primary:        #4f46e5;
  --primary-light:  #6366f1;
  --primary-dark:   #3730a3;
  --secondary:      #d946ef;
  --success:        #22c55e;
  --warning:        #eab308;
  --danger:         #ef4444;
  --white:          #ffffff;
  --off-white:      #f8fafc;

  /* Gradients */
  --accent-gradient:   linear-gradient(135deg, #4f46e5 0%, #d946ef 100%);
  --success-gradient:  linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  --warning-gradient:  linear-gradient(135deg, #eab308 0%, #d97706 100%);
  --danger-gradient:   linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  /* Mesh Aurora Background */
  --mesh-glow:
    radial-gradient(circle at 15% 15%,  rgba(99, 102, 241, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 85% 20%,  rgba(217, 70, 239, 0.10) 0%, transparent 38%),
    radial-gradient(circle at 50% 80%,  rgba(14, 165, 233, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%,  rgba(34, 197, 94, 0.04) 0%, transparent 32%),
    linear-gradient(180deg, #e0e7ff 0%, #f8fafc 38%, #eef2ff 100%);

  /* Glass */
  --glass-bg:       rgba(255, 255, 255, 0.80);
  --glass-border:   rgba(15, 23, 42, 0.06);
  --glass-shadow:   0 1px 3px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
  --glass-hover-shadow: 0 4px 6px rgba(15,23,42,0.04), 0 20px 40px rgba(15,23,42,0.10);

  /* Text */
  --text-main:   #0f172a;
  --text-sub:    #334155;
  --text-light:  #64748b;
  --text-muted:  #94a3b8;

  /* Layout */
  --sidebar-w:    280px;
  --transition:   all 0.35s cubic-bezier(0.2, 1, 0.2, 1);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    20px;
  --radius-xl:    28px;
}

/* ─── Typography Token ──────────────────────── */
:root {
  --font-system: 'Outfit', sans-serif;
  --font-mono:   "SF Mono", ui-monospace, "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--font-system);
  background-color: #eef2ff;
  background-image: var(--mesh-glow);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

html,
body,
.main-content {
  overflow-anchor: none;
}

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

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 2px 0 20px rgba(15,23,42,0.04);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  flex-shrink: 0;
}

.sidebar-brand h1 {
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.sidebar-brand p {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav section labels */
.nav-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0.5rem 0.5rem 0.4rem;
  margin-top: 0.5rem;
}

/* Nav links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-link:hover {
  background: rgba(79, 70, 229, 0.07);
  color: var(--primary);
  transform: translateX(3px);
}

.nav-link.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.nav-link .nav-icon { font-size: 1rem; width: 20px; text-align: center; }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.faculty-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--off-white);
  margin-bottom: 1rem;
}

.faculty-avatar {
  width: 36px; height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 0.85rem;
  flex-shrink: 0;
}

.faculty-card .faculty-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.faculty-card .faculty-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

/* ─── Main Content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2.5rem 3rem;
  min-height: 100vh;
  background: transparent;
}

/* ─── Section Header ─────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ─── Glass Panel ─────────────────────────────────────────── */
.glass-panel {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-panel.hover-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-hover-shadow);
}

/* ─── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-hover-shadow);
}

.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-system);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  background: var(--accent-gradient);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

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

.btn-sm { padding: 0.45rem 1rem; font-size: 0.78rem; border-radius: 10px; }

.btn-secondary {
  background: var(--off-white);
  color: var(--text-sub);
  border: 1.5px solid var(--glass-border);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(79,70,229,0.1);
}

.btn-success {
  background: var(--success-gradient);
  color: white;
}

.btn-success:hover { box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35); }

.btn-danger {
  background: var(--danger-gradient);
  color: white;
}

.btn-danger:hover { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35); }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-assigned   { background: #eef2ff; color: #4f46e5; }
.badge-submitted  { background: #fef3c7; color: #92400e; }
.badge-graded     { background: #dcfce7; color: #166534; }
.badge-active     { background: #dcfce7; color: #166534; }
.badge-inactive   { background: #fee2e2; color: #991b1b; }
.badge-scheduled  { background: #eef2ff; color: #4f46e5; }
.badge-completed  { background: #dcfce7; color: #166534; }

.label-excellent     { background: #dcfce7; color: #166534; }
.label-average       { background: #fef3c7; color: #92400e; }
.label-needs-imp     { background: #fee2e2; color: #991b1b; }
.label-underperform  { background: #fff1f2; color: #be123c; }
.label-eval          { background: #f1f5f9; color: #475569; }

/* ─── Task Cards ──────────────────────────────────────────── */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.task-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-hover-shadow);
}

.task-card .task-accent {
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}

.task-card .task-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.task-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.task-card .task-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.task-card .task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Grade result block inside task card */
.grade-result-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem;
  margin: 0.8rem 0;
}

.grade-result-box .grade-score {
  font-size: 1.4rem;
  font-weight: 900;
  color: #15803d;
  font-variant-numeric: tabular-nums;
}

.grade-result-box .grade-feedback {
  font-size: 0.78rem;
  color: #166534;
  font-style: italic;
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* ─── Table ───────────────────────────────────────────────── */
.table-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

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

thead tr {
  background: #f8fafc;
  border-bottom: 2px solid #f1f5f9;
}

th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.85rem;
  color: var(--text-sub);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.2s;
}

tbody tr:hover { background: #fafafa; }

/* ─── Forms ───────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-system);
  font-size: 0.9rem;
  color: var(--text-main);
  background: #f8fafc;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
}

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

.checkbox-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

/* Toggle Switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background-color: #cbd5e1; /* Visible Slate-300 track */
  border-radius: 34px;
  transition: 0.4s cubic-bezier(0.2, 1, 0.2, 1);
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.15); /* Recessed effect */
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  left: 3px; bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s cubic-bezier(0.2, 1, 0.2, 1);
  /* Premium multi-layered shadow */
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent-gradient);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(28px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4); /* Professional Glow */
}

/* ─── Progress Bar ────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

/* ─── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
}

.modal-overlay.active { display: flex; align-items: flex-start; justify-content: center; }

.modal-box {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
  animation: modalSlideIn 0.35s cubic-bezier(0.2, 1, 0.2, 1);
  margin: auto;
}

.modal-box.modal-wide { max-width: 1100px; width: 92%; }

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-header p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-light);
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close:hover { background: #fee2e2; color: var(--danger); }

.modal-footer {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
}

/* ─── Toast Notification ──────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-sub);
  animation: toastIn 0.35s cubic-bezier(0.2, 1, 0.2, 1);
  min-width: 280px;
  max-width: 380px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Section Loading ──────────────────────────────────────── */
.section-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem;
  color: var(--text-muted);
  gap: 1rem;
  min-height: 45vh;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid #f1f5f9;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-xl);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-sub); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.85rem; max-width: 380px; margin: 0 auto; }

/* ─── Performance Labels ───────────────────────────────────── */
.intern-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.9);
  margin-bottom: 0.75rem;
  transition: var(--transition);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.intern-row:hover { background: rgba(255, 255, 255, 0.98); box-shadow: var(--glass-shadow); }

/* ─── Attendance Toggle Panel ─────────────────────────────── */
.att-panel {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.att-panel.armed {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
}

/* ─── Score Badge ─────────────────────────────────────────── */
.score-badge {
  font-size: 1.3rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

/* ─── Attendance Log Color ────────────────────────────────── */
.log-present { color: var(--success); font-weight: 700; }
.log-absent  { color: var(--danger);  font-weight: 700; }
.log-override{ color: var(--warning); font-weight: 700; }

/* ─── Micro-animations ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.45s cubic-bezier(0.2, 1, 0.2, 1) both; }

/* Stagger children */
.stagger > * { animation: fadeUp 0.45s cubic-bezier(0.2, 1, 0.2, 1) both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ─── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-image: var(--mesh-glow);
  background-attachment: fixed;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
  border: 1px solid var(--glass-border);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
  .main-content { padding: 2rem; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Landing Page Components ──────────────────────────────── */

.landing-page {
  background: var(--mesh-glow);
  min-height: 100vh;
}

.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  height: 70px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--glass-shadow);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand .brand-logo {
  width: 38px; height: 38px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
}

.nav-brand span {
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-item {
  text-decoration: none;
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-item:hover { color: var(--primary); }

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.05) 0%, transparent 50%);
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Features Grid */
.section-padding { padding: 100px 0; }

.section-head {
  text-align: center;
  margin-bottom: 4rem;
}

.section-head h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  padding: 3rem 2rem;
  text-align: center;
}

.feature-icon {
  width: 60px; height: 60px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 2rem;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Landing Stats */
.landing-stats {
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* Footer */
.footer {
  background: #0f172a;
  padding: 80px 0 40px;
  color: #94a3b8;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 60px;
}

.footer-brand h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 1rem; }

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover { color: white; }

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .hero h1 { font-size: 3.5rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 576px) {
  .hero h1 { font-size: 2.5rem; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: stretch; padding: 0 2rem; }
}
