/* ==========================================================================
   IIEC OS — Shared Design System & Core Stylesheet
   Based on design.md specification
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Color System */
  --color-base: #09090b;
  --color-base-rgb: 9, 9, 11;
  --color-surface: #18181b;
  --color-surface-elevated: #27272a;
  --color-surface-hover: #3f3f46;
  
  /* Gradient Background Layers */
  --gradient-start: #18181b;
  --gradient-mid: #070912;
  --gradient-end: #05070f;
  
  /* Glass Effect Colors */
  --glass-bg: rgba(24, 24, 27, 0.65);
  --glass-bg-solid: rgba(14, 20, 34, 0.92);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 183, 3, 0.3);
  
  /* Accent Gold / Amber Palette */
  --color-accent: #F5A524;
  --color-accent-rgb: 245, 165, 36;
  --color-accent-hover: #F7B750;
  --color-accent-muted: rgba(255, 183, 3, 0.15);
  
  /* Text Color Scale */
  --text-primary: #f5f7ff;      /* Bright Off-White for Headings */
  --text-secondary: #c2c9de;    /* Soft Grey-Blue for Subtitles */
  --text-muted: #8891a8;        /* Muted Grey for Captions & Metadata */
  --text-accent: var(--color-accent);
  
  /* Semantic Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Shadows & Ambient Glows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(var(--color-accent-rgb), 0.3);
  --shadow-glow-lg: 0 0 40px rgba(var(--color-accent-rgb), 0.4);

  /* Border Radii */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;  /* Pill / Circle */

  /* Layout Limits */
  --container-max: 1280px;
  --navbar-height: 80px;
  --sidebar-width: 260px;

  /* Typography Fonts */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-bebas: 'Bebas Neue', sans-serif;
  --font-poppins: 'Poppins', sans-serif;

  /* Fluid Typography Scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1.05rem + 0.5vw, 1.25rem);
  --text-2xl: clamp(1.4rem, 1.2rem + 1vw, 1.5rem);
  --text-3xl: clamp(1.75rem, 1.5rem + 1.25vw, 1.875rem);
  --text-4xl: clamp(2rem, 1.5rem + 2.5vw, 2.5rem);
  --text-5xl: clamp(2.5rem, 2rem + 2.5vw, 3rem);
  --text-hero: clamp(3rem, 2.2rem + 4vw, 4.8rem);
}

/* Reset & Global Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-base);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 0%, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

.bebas-title {
  font-family: var(--font-bebas);
  letter-spacing: 1px;
}

.text-gold-gradient {
  background: linear-gradient(135deg, #ffb703, #ffd166);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--color-accent-muted);
  border: 1px solid rgba(255, 183, 3, 0.3);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Layout Containers & Grids */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.main-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.content-area {
  flex: 1;
  padding: 2rem 1.5rem 4rem 1.5rem;
  max-width: 100%;
  min-width: 0; /* Fix flex overflow */
}

.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Glassmorphism Cards & Panels */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 183, 3, 0.15);
}

.glass-panel {
  background: var(--glass-bg-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

/* Buttons System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ffd56a 0%, #f5b335 100%);
  color: #05070f;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid rgba(255, 227, 152, 0.4);
  box-shadow: 0 8px 20px rgba(245, 179, 53, 0.28);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: #000;
  background: linear-gradient(135deg, #ffe08a 0%, #f9bf49 100%);
  box-shadow: 0 14px 30px rgba(245, 179, 53, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* Form Controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 9, 11, 0.7);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

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

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.18), 0 0 15px rgba(245, 165, 36, 0.2);
}

.field select option {
  background: #18181b;
  color: #fff;
}

/* Status Pills & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active, .badge-success, .badge-present, .badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending, .badge-warning, .badge-in-progress {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger, .badge-absent, .badge-overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info, .badge-guest {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Tables & Data Lists */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  background: rgba(24, 24, 27, 0.4);
  -webkit-overflow-scrolling: touch;
}

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

.data-table th {
  background: rgba(10, 13, 24, 0.8);
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Navbar Component */
.navbar {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100%;
  height: var(--navbar-height);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-badge {
  background: linear-gradient(135deg, #ffb703, #f5a524);
  color: #05070f;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  object-fit: cover;
}

/* ===== MOBILE HAMBURGER BUTTON ===== */
.mobile-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  z-index: 400;
  transition: all 0.3s ease;
}

.mobile-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-hamburger.active {
  background: var(--color-accent-muted);
  border-color: var(--color-accent);
}

.mobile-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== SIDEBAR TOGGLE BUTTON (Mobile) ===== */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--color-accent-muted);
  border: 1px solid rgba(255, 183, 3, 0.3);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-size: 1.2rem;
  cursor: pointer;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 299;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: all 0.3s ease;
}

.sidebar-toggle-btn:active {
  transform: scale(0.92);
}

/* Navigation Drawer Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(14, 20, 34, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  min-height: calc(100vh - var(--navbar-height));
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-item a:hover, .sidebar-item.active a {
  background: rgba(255, 183, 3, 0.12);
  color: var(--color-accent);
  border-left: 3px solid var(--color-accent);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 298;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Stat Widget Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: var(--color-accent-muted);
  border: 1px solid rgba(255, 183, 3, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-info .stat-number {
  font-family: var(--font-bebas);
  font-size: 2.2rem;
  line-height: 1;
  color: #fff;
}

.stat-info .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== THREE-DOT ACTION MENU (for mobile table actions) ===== */
.action-menu-wrapper {
  position: relative;
  display: inline-block;
}

.action-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  letter-spacing: 2px;
  transition: all 0.2s ease;
  padding: 0;
}

.action-menu-trigger:hover,
.action-menu-trigger:focus {
  background: var(--color-accent-muted);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.action-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.action-menu-dropdown a,
.action-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  text-decoration: none;
}

.action-menu-dropdown a:hover,
.action-menu-dropdown button:hover {
  background: rgba(255, 183, 3, 0.1);
  color: var(--color-accent);
}

/* ===== MOBILE-CARD TABLE VIEW ===== */
.mobile-card-list {
  display: none;
}

.mobile-data-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease;
}

.mobile-data-card:last-child {
  margin-bottom: 0;
}

.mobile-data-card:active {
  border-color: var(--glass-border-hover);
}

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

.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.mobile-card-row .row-label {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.mobile-card-row .row-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 2rem 0;
  margin-top: 4rem;
  background: rgba(5, 7, 15, 0.9);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Utility: hide on desktop, show on mobile */
.mobile-only { display: none !important; }
.desktop-only { display: initial; }

/* ========================================================================
   RESPONSIVE BREAKPOINTS
   ======================================================================== */

/* ===== TABLET (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --navbar-height: 64px;
  }

  .sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    z-index: 299;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .content-area {
    padding: 1.5rem 1.25rem 3rem 1.25rem;
  }

  .glass-card {
    padding: 1.25rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-hamburger {
    display: flex;
  }

  /* Mobile nav overlay */
  .mobile-nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
    z-index: 350;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: var(--shadow-xl);
    max-height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
  }

  .mobile-nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .mobile-nav-menu .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    text-decoration: none;
  }

  .mobile-nav-menu .mobile-nav-link:hover,
  .mobile-nav-menu .mobile-nav-link.active {
    background: var(--color-accent-muted);
    color: var(--color-accent);
  }

  .mobile-nav-menu .mobile-nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
  }

  .mobile-nav-menu .mobile-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
  }

  .mobile-nav-menu .mobile-nav-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    object-fit: cover;
  }

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

  .mobile-nav-menu .mobile-nav-user-info .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-menu .mobile-nav-user-info .role {
    font-size: 0.8rem;
    color: var(--color-accent);
  }

  .user-profile-menu {
    display: none;
  }

  .brand-logo-badge {
    display: none;
  }

  .stat-icon {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }

  .stat-info .stat-number {
    font-size: 1.7rem;
  }

  .stat-info .stat-label {
    font-size: 0.8rem;
  }
}

/* ===== MOBILE (max-width: 640px) ===== */
@media (max-width: 640px) {
  :root {
    --navbar-height: 58px;
  }

  html {
    font-size: 15px;
  }

  .mobile-only { display: initial !important; }
  .desktop-only { display: none !important; }

  .content-area {
    padding: 1rem 0.75rem 2.5rem 0.75rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  /* Navbar mobile */
  .brand-logo {
    gap: 8px;
  }

  .brand-logo img {
    height: 30px !important;
  }

  .brand-logo span {
    font-size: 1rem !important;
  }

  .brand-logo-badge {
    display: none;
  }

  /* Card & Panel compact */
  .glass-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
  }

  .glass-card:hover {
    transform: none; /* Disable hover lift on touch */
    box-shadow: none;
  }

  .glass-panel {
    padding: 1.15rem;
    border-radius: var(--radius-xl);
  }

  /* Compact stat cards */
  .stat-card {
    gap: 0.85rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
  }

  .stat-info .stat-number {
    font-size: 1.4rem;
  }

  .stat-info .stat-label {
    font-size: 0.75rem;
  }

  /* Grid adjustments */
  .grid-1, .grid-2, .grid-3, .grid-4 {
    gap: 0.75rem;
  }

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

  /* Buttons */
  .btn-primary, .btn-secondary {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* Form fields */
  .field input, .field select, .field textarea {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  /* Badge compact */
  .badge {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  /* Tables -> hide on mobile, use card view */
  .table-container {
    border-radius: var(--radius-lg);
  }

  .data-table th {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .data-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  /* Modals */
  .modal-container {
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    margin: 0.5rem;
    max-height: 85vh;
  }

  .modal-header h3 {
    font-size: var(--text-lg);
  }

  /* Section eyebrow */
  .section-eyebrow {
    padding: 5px 10px;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
  }

  /* Footer */
  footer {
    padding: 1.25rem 0;
    margin-top: 2rem;
    font-size: 0.75rem;
  }

  /* Sidebar toggle */
  .sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    bottom: 16px;
    left: 16px;
    font-size: 1rem;
  }

  /* Page header layouts */
  h2 {
    font-size: var(--text-xl);
    line-height: 1.3;
  }

  h3 {
    font-size: var(--text-lg);
  }

  /* Hero section adjustments */
  .bebas-title {
    letter-spacing: 0;
  }
}

/* ===== EXTRA SMALL (max-width: 400px) ===== */
@media (max-width: 400px) {
  html {
    font-size: 14px;
  }

  .content-area {
    padding: 0.75rem 0.5rem 2rem 0.5rem;
  }

  .container {
    padding: 0 0.5rem;
  }

  .glass-card {
    padding: 0.85rem;
  }

  .glass-panel {
    padding: 1rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .stat-info .stat-number {
    font-size: 1.2rem;
  }

  .modal-container {
    padding: 1rem;
    margin: 0.25rem;
  }
}

/* ===== PERFORMANCE: reduce blur on low-end ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

