/* =============================================================================
   AttendTrax – Institutional Attendance & Analytics Platform
   Human-Crafted Design System · Warm Slate + Refined Indigo Palette
   Mobile-First · Faculty & Admin Optimized · Cross-Platform Responsive
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Custom Properties & Design Tokens ─────────────────────────────────── */
:root {
  /* Brand & Primary Accents — warm indigo-blue, more grounded */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  --indigo-50:  #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-800: #3730a3;

  /* Semantic State Colors */
  --success:      #059669;
  --success-bg:   #f0fdf4;
  --success-text: #065f46;
  --success-ring: #bbf7d0;
  --success-dark: #047857;

  --warning:      #d97706;
  --warning-bg:   #fffbeb;
  --warning-text: #92400e;
  --warning-ring: #fde68a;
  --warning-dark: #b45309;

  --danger:       #dc2626;
  --danger-bg:    #fef2f2;
  --danger-text:  #991b1b;
  --danger-ring:  #fecaca;
  --danger-dark:  #b91c1c;

  --info:         #0284c7;
  --info-bg:      #f0f9ff;
  --info-text:    #0369a1;
  --info-ring:    #bae6fd;
  --info-dark:    #075985;

  /* Neutrals — warm-tinted slate for a human, non-sterile feel */
  --gray-25:   #fdfcfc;
  --gray-50:   #f9f8f8;
  --gray-100:  #f2f0f0;
  --gray-200:  #e5e1e1;
  --gray-300:  #d1cece;
  --gray-400:  #9e9898;
  --gray-500:  #6b6666;
  --gray-600:  #504c4c;
  --gray-700:  #362f2f;
  --gray-800:  #211c1c;
  --gray-900:  #120e0e;

  /* Elevated surface tokens for depth layering */
  --surface:        #ffffff;
  --surface-raised: #fdfcfc;
  --surface-inset:  #f5f4f4;
  --surface-hover:  #f0eeed;

  /* Dark Surface Elements */
  --sidebar-bg: #0d1017;
  --sidebar-card: rgba(255, 255, 255, 0.055);
  --sidebar-border: rgba(255, 255, 255, 0.09);
  --sidebar-active: rgba(99, 102, 241, 0.2);
  --sidebar-active-border: #818cf8;

  /* Layout Dimensions */
  --sidebar-width: 262px;
  --topbar-height: 62px;

  /* Radii */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Refined Elevation — softer, warmer shadows */
  --shadow-xs:  0 1px 2px 0 rgb(18 14 14 / 0.05);
  --shadow-sm:  0 1px 4px 0 rgb(18 14 14 / 0.07), 0 1px 2px -1px rgb(18 14 14 / 0.04);
  --shadow-md:  0 4px 8px -1px rgb(18 14 14 / 0.07), 0 2px 4px -2px rgb(18 14 14 / 0.04);
  --shadow-lg:  0 10px 20px -3px rgb(18 14 14 / 0.08), 0 4px 8px -4px rgb(18 14 14 / 0.03);
  --shadow-xl:  0 20px 30px -5px rgb(18 14 14 / 0.1), 0 8px 12px -6px rgb(18 14 14 / 0.04);
  --shadow-brand: 0 4px 14px -2px rgb(79 70 229 / 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base Typography ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.012em;
}

button, a, input, select, textarea, .btn, .nav-item, .card, .clickable {
  touch-action: manipulation;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Headings & Display Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }
h5 { font-size: 0.875rem; font-weight: 600; }

/* ── Utility Classes ─────────────────────────────────────────────────────────── */
.hidden       { display: none !important; }
.sr-only      { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1 1 0%; min-width: 0; }

.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.w-full       { width: 100%; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-2xl     { font-size: 1.5rem; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-mono    { font-family: 'JetBrains Mono', monospace; }
.text-muted   { color: var(--gray-500); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ── Buttons System (Tactile, Confident & Human) ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              box-shadow var(--transition-fast), transform 100ms ease, opacity var(--transition-fast);
  outline: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1.3;
  min-height: 36px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-primary {
  background: var(--brand-600);
  color: #ffffff;
  border-color: var(--brand-700);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-800);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:active {
  background: var(--brand-800);
  transform: translateY(1px);
  box-shadow: var(--shadow-xs);
}

.btn-secondary {
  background: var(--surface);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--gray-400);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:active {
  background: var(--gray-100);
  transform: translateY(1px);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-ring);
}
.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger-dark);
  box-shadow: 0 2px 8px -1px rgba(220, 38, 38, 0.3);
}

.btn-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-ring);
}
.btn-success:hover {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success-dark);
  box-shadow: 0 2px 8px -1px rgba(5, 150, 105, 0.3);
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  min-height: 30px;
}

.btn-lg {
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Cards (Refined Depth & Warmth) ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-header {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-raised);
}

.card-body {
  padding: 1.35rem;
}

/* ── Form Controls & Accessible Inputs ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 0.56rem 0.9rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gray-900);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast);
  outline: none;
  box-shadow: var(--shadow-xs);
  min-height: 38px;
}

.form-control:hover {
  border-color: var(--gray-300);
  background: var(--surface-raised);
}

.form-control:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: var(--surface);
}

.form-control::placeholder {
  color: var(--gray-400);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b6666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* ── Key Metric / Stat Cards — Icon-Box Style ───────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              border-color var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg, var(--brand-50));
  color: var(--accent, var(--brand-600));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--accent-ring, var(--brand-100));
}

.stat-card-body {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--gray-900);
  line-height: 1.1;
  margin-top: 0.1rem;
}

.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

/* Legacy stat-card fallback (left-bar style kept for compat) */
.stat-card:not(:has(.stat-card-icon))::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent, var(--brand-600));
  border-radius: 0 2px 2px 0;
}

/* ── Data Tables (Human-Readable Enterprise Standard) ───────────────────────── */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

thead tr {
  background: var(--surface-inset);
  border-bottom: 2px solid var(--gray-200);
}

thead th {
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--gray-500);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background-color var(--transition-fast);
}

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

tbody tr:nth-child(even) {
  background-color: var(--gray-25);
}

tbody tr:hover {
  background-color: var(--brand-50);
}

tbody td {
  padding: 0.78rem 1rem;
  color: var(--gray-700);
  vertical-align: middle;
}

/* ── Status Badges & Pills ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.badge-present {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-ring);
}

.badge-absent {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-ring);
}

.badge-od {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-ring);
}

.badge-free {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.badge-info {
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-200);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-ring);
}

/* ── Live Attendance Status Counters Bar ───────────────────────────────────── */
.live-status-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--gray-50);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.live-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.live-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-present { background: var(--success); }
.dot-absent  { background: var(--danger); }
.dot-od      { background: var(--warning); }

/* ── Live Sync Pulse Indicator ────────────────────────────────────────────── */
.live-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  background: var(--success-bg);
  border: 1px solid var(--success-ring);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success-text);
  user-select: none;
  white-space: nowrap;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ── Segmented Chip Selectors for P / A / OD Attendance ─────────────────────── */
.attendance-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px;
  border-radius: var(--radius-full);
}

.attendance-chip {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  background: #ffffff;
  color: var(--gray-600);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.attendance-chip:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.chip-P { color: var(--success-text); }
.chip-P.active {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success-dark);
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.3);
}

.chip-A { color: var(--danger-text); }
.chip-A.active {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger-dark);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
}

.chip-OD { color: var(--warning-text); }
.chip-OD.active {
  background: var(--warning);
  color: #ffffff;
  border-color: var(--warning-dark);
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.3);
}

/* ── Modern App Layout & Sidebar Navigation ────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  background-color: var(--gray-50);
}

/* Scrim / Backdrop */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 16, 23, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.sidebar-backdrop.active,
.app-layout.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Fixed Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.app-layout.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  pointer-events: none;
  box-shadow: none;
}

.sidebar-brand {
  padding: 1.1rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--brand-600);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-user {
  margin: 0.65rem 0.7rem 0.3rem;
  padding: 0.6rem 0.75rem;
  background: var(--sidebar-card);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  border: 1.5px solid rgba(129, 140, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c7d2fe;
  flex-shrink: 0;
}

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

.sidebar-user .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  padding: 0.1rem 0.42rem;
  border-radius: var(--radius-full);
  margin-top: 0.15rem;
}

.role-admin   { background: #fef3c7; color: #92400e; }
.role-faculty { background: #c7d2fe; color: #3730a3; }
.role-student { background: #bbf7d0; color: #065f46; }

/* Sidebar Navigation Groups */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-group-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  padding: 0.65rem 0.75rem 0.2rem;
  margin-top: 0.3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.56rem 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.855rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border-left: 2.5px solid transparent;
  transition: all var(--transition-fast);
  user-select: none;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #c7d2fe;
  background: var(--sidebar-active, rgba(99, 102, 241, 0.2));
  border-left-color: var(--sidebar-active-border, #818cf8);
  font-weight: 600;
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.65rem;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.18);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.75rem;
  width: 100%;
}

.logout-btn:hover {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
  border-color: rgba(220, 38, 38, 0.35);
}

/* ── Main Content Area ─────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-layout.sidebar-collapsed .main-content {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
}

.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(18,14,14,0.06);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.015em;
}

.topbar-date {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.page-content {
  padding: 1.5rem;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Section Switching */
.section {
  display: none;
  width: 100%;
  min-width: 0;
}

.section.active {
  display: block;
  animation: fadeSection 0.22s ease;
}

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

/* ── Menu Toggle Button ────────────────────────────────────────────────────── */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--gray-300);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

/* ── Modals & Dialogs ──────────────────────────────────────────────────────── */
.modal-overlay,
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.25rem;
  animation: modalFadeIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  padding: 1.75rem;
  width: min(500px, calc(100vw - 2rem));
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  padding: 1.75rem 1.5rem;
  width: min(400px, calc(100vw - 2.5rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  animation: modalPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.confirm-content h3 {
  font-size: 1.15rem;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}

.confirm-content p {
  color: var(--gray-500);
  font-size: 0.85rem;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.confirm-actions button {
  flex: 1;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.95) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ── Toast Notifications ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  pointer-events: all;
  animation: toastIn 0.25s ease forwards;
  border-left: 3px solid rgba(255,255,255,0.3);
}

.toast.toast-success { background: #064e3b; border-color: #10b981; }
.toast.toast-error   { background: #7f1d1d; border-color: #ef4444; }
.toast.toast-info    { background: #1e1b4b; border-color: #818cf8; }
.toast.toast-warning { background: #78350f; border-color: #f59e0b; }
.toast.leaving { animation: toastOut 0.25s ease forwards; }

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

@media (max-width: 640px) {
  #toast-container {
    top: auto;
    bottom: 1.25rem;
    right: 0.75rem;
    left: 0.75rem;
    align-items: stretch;
  }
  .toast {
    min-width: 0;
    max-width: 100%;
  }
}

/* ── Spinner & Page Loader ─────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 9999;
}

.page-loader .loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Analytics & Charts ────────────────────────────────────────────────────── */
.charts-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.charts-grid-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chart-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.chart-card-sub {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.chart-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 240px;
}

/* ── Section Summary Badges Grid ───────────────────────────────────────────── */
.sec-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sec-summary-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.sec-summary-card:hover {
  background-color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.sec-summary-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sec-summary-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--gray-900);
}

.sec-summary-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ── Drop Zone (File Upload) ───────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  background: var(--surface-inset);
}

.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand-200);
}

.drop-zone .drop-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Clean Institutional App Footer ────────────────────────────────────────── */
.app-footer {
  margin-top: auto;
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
  width: 100%;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  color: var(--gray-900);
  font-size: 0.9rem;
}

.footer-desc {
  color: var(--gray-400);
  font-size: 0.78rem;
}

.footer-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--gray-600);
}

.footer-credit-badge .dept-tag {
  background: var(--gray-900);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

/* ── Dedicated About Us Showcase & Developer Portfolio Section ────────────── */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about-hero-banner {
  background: linear-gradient(135deg, #0b0f19 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
  box-sizing: border-box;
}

.about-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand-300);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.about-hero-banner h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.about-hero-banner p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-section-header {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-section-header p {
  font-size: 0.82rem;
  color: var(--gray-500);
}

.about-devs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.about-dev-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.about-dev-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-600);
}

.about-dev-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}

.dev-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about-dev-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.about-dev-avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.avatar-pradeeshwar {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.avatar-kanaga {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.dev-status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #ffffff;
}

.dev-top-meta {
  flex: 1;
  min-width: 0;
}

.dev-title-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}

.dev-role-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-architect {
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-200);
}

.badge-systems {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.dev-dept-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
}

.dev-bio-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.dev-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--gray-50);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.dev-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-700);
  line-height: 1.45;
}

.dev-bullet-item svg {
  color: var(--brand-600);
  flex-shrink: 0;
  margin-top: 2px;
}

.dev-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.dev-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: auto;
}

.dev-contact-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: all var(--transition-fast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-contact-btn:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-800);
}

.dev-contact-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Featured Projects Portfolio Grid ──────────────────────────────────────── */
.about-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}

.project-card-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.project-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}

.project-status-pill.status-live {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-ring);
}

.project-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
}

/* ── Open for Projects CTA Card ────────────────────────────────────────────── */
.about-cta-card {
  background: linear-gradient(135deg, #0b0f19 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  width: 100%;
  box-sizing: border-box;
}

.about-cta-content h4 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.about-cta-content p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  line-height: 1.55;
  margin: 0;
}

.about-cta-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Architecture Highlights ───────────────────────────────────────────────── */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.about-feature-box {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.about-feature-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.about-feat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 1px solid var(--brand-100);
}

.about-feat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}

.about-feat-desc {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ── Responsive Media Queries (Mobile & Tablet First Standards) ────────────── */
@media (max-width: 1023.98px) {
  .sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1000 !important;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
    box-shadow: none;
    margin-left: 0 !important;
    pointer-events: auto !important;
  }

  .sidebar-close-btn {
    display: inline-flex !important;
  }

  .app-layout.sidebar-open .sidebar,
  .sidebar.drawer-open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.4) !important;
  }

  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    flex: 1 1 100% !important;
  }

  .topbar {
    padding: 0 1rem;
    height: 56px;
  }

  .page-content {
    padding: 1.1rem 0.9rem;
  }

  .charts-grid-2, .charts-grid-equal {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 0.75rem;
    height: 52px;
  }

  .topbar-title {
    font-size: 0.925rem;
  }

  .topbar-date {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .page-content {
    padding: 0.85rem 0.65rem 5rem;
  }

  .card-body {
    padding: 1rem 0.9rem;
  }

  .card-header {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Mobile table → card-stack conversion */
  .mobile-stack thead {
    display: none;
  }
  .mobile-stack, .mobile-stack tbody, .mobile-stack tr, .mobile-stack td {
    display: block;
    width: 100%;
  }
  .mobile-stack tr {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.6rem;
    padding: 0.75rem 0.9rem;
    box-shadow: var(--shadow-xs);
  }
  .mobile-stack td {
    padding: 0.2rem 0;
    border: none;
    font-size: 0.875rem;
  }
  .mobile-stack td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
  }

  /* Min touch targets */
  .btn {
    min-height: 40px;
  }
  .btn-sm {
    min-height: 34px;
  }

  .dev-card-top {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .dev-dept-badge {
    justify-content: center;
  }

  .dev-skills-row {
    justify-content: center;
  }

  .dev-contact-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .about-cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem;
  }

  .about-cta-action {
    width: 100%;
  }

  .about-cta-action .btn {
    width: 100%;
    justify-content: center;
  }

  /* Mobile-first attendance marking cards */
  .mark-table thead {
    display: none;
  }

  .mark-table, .mark-table tbody, .mark-table tr, .mark-table td {
    display: block;
    width: 100%;
  }

  .mark-table tr {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.65rem;
    padding: 0.75rem 0.85rem;
    box-shadow: var(--shadow-xs);
    position: relative;
  }

  .mark-table td {
    padding: 0.2rem 0;
    border: none;
  }

  .mark-table td:first-child {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    font-size: 0.75rem;
    color: var(--gray-400);
  }

  .mark-table .student-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    display: block;
    margin-bottom: 0.1rem;
  }

  .mark-table .student-reg {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--brand-700);
    background: var(--brand-50);
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  .mark-table td:last-child {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--gray-200);
    text-align: left !important;
  }

  .mark-table .attendance-chip-group {
    display: flex;
    width: 100%;
    gap: 0.35rem;
  }

  .mark-table .attendance-chip {
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.45rem;
    font-size: 0.82rem;
  }
}

/* ── Live Server Warmup Pill (Non-blocking cold-start indicator) ─────────── */
.server-warmup-pill {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(59, 130, 246, 0.2);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.server-warmup-pill.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.warmup-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ═════════════════════════════════════════════════════════════════════════════
   EXECUTIVE PRINCIPAL COCKPIT – DESIGN TOKENS & STYLES
   ═════════════════════════════════════════════════════════════════════════════ */
.exec-banner {
  background: linear-gradient(135deg, #090e1a 0%, #0f172a 40%, #1e1b4b 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.exec-banner::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.exec-emblem {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  flex-shrink: 0;
}

.exec-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.exec-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exec-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.exec-pill-live {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.exec-pill-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Executive KPI Grid */
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.exec-kpi-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.exec-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  border-color: var(--brand-300);
}

.exec-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-600);
}

.exec-kpi-card.kpi-gold::before    { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.exec-kpi-card.kpi-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.exec-kpi-card.kpi-purple::before  { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.exec-kpi-card.kpi-rose::before    { background: linear-gradient(90deg, #ef4444, #f87171); }

.exec-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exec-kpi-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.exec-kpi-sub {
  font-size: 0.78rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Executive Leave Cards */
.exec-leave-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.exec-leave-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

.exec-leave-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.exec-leave-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-bottom: 0.45rem;
}

.exec-leave-reason {
  font-size: 0.82rem;
  color: var(--gray-800);
  background: var(--gray-50);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-style: italic;
  margin: 0.45rem 0;
  border-left: 3px solid var(--brand-500);
}

.exec-leave-hod-remark {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: #f0fdf4;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.exec-leave-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.65rem;
}

/* Ranks and Dept Indicators */
.exec-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--gray-100);
  color: var(--gray-700);
}

.exec-rank-badge.rank-1 { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.exec-rank-badge.rank-2 { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.exec-rank-badge.rank-3 { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

.dept-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.dept-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-800);
  font-weight: 700;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.btn-xs {
  padding: 0.22rem 0.55rem;
  font-size: 0.74rem;
  border-radius: var(--radius-xs);
}

/* ── Modern High-Performance Skeleton Shimmer ────────────────────────────── */
@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-box {
  display: inline-block;
  height: 14px;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-row td {
  padding: 0.85rem 1rem !important;
}


