/* =============================================================
   FaceAttend — Next-Gen B2B SaaS AI Platform
   Design: Modern SaaS Design System (Inspired by Uxerflow & SSTR)
   Typography: Plus Jakarta Sans (Clean Modern Proportions)
   Theme Engine: Dynamic High-Contrast Light & Luxury Carbon Dark
   ============================================================= */

/* ── Light Mode System (Default Uxerflow SaaS Aesthetic) ───── */
:root,
[data-theme="light"] {
  --bg-base:        #f4f6f8;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  --bg-sidebar:     #ffffff;
  --bg-input:       #f8fafc;
  --bg-modal:       #ffffff;

  --accent:         #ff5722;
  --accent-light:   #ff7043;
  --accent-dark:    #e64a19;
  --accent-glow:    rgba(255, 87, 34, 0.15);

  --primary-btn:    #0f172a;
  --primary-btn-hover: #1e293b;

  --orange:         #ff5722;
  --orange-light:   #ff8a65;
  --orange-glow:    rgba(255, 87, 34, 0.18);

  --gold:           #d97706;
  --gold-light:     #f59e0b;
  --gold-dark:      #b45309;
  --gold-glow:      rgba(217, 119, 6, 0.12);

  --success:        #10b981;
  --success-bg:     #ecfdf5;
  --success-text:   #047857;
  
  --warning:        #f59e0b;
  --warning-bg:     #fffbeb;
  --warning-text:   #b45309;

  --danger:         #ef4444;
  --danger-bg:      #fef2f2;
  --danger-text:    #b91c1c;

  --info:           #3b82f6;
  --info-bg:        #eff6ff;
  --info-text:      #1d4ed8;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --border:         #e2e8f0;
  --border-subtle:  #f1f5f9;
  --border-hover:   #cbd5e1;
  --border-active:  #ff5722;

  --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card:    0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg:      0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow:    0 0 20px var(--accent-glow);

  --sidebar-w:      256px;
  --topbar-h:       68px;
  --radius-sm:      8px;
  --radius:         16px;
  --radius-lg:      24px;
  --transition:     0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Dark Graphite & Carbon Mode ────────────────────────────── */
[data-theme="dark"] {
  --bg-base:        #090a0f;
  --bg-surface:     #11131a;
  --bg-card:        #151822;
  --bg-card-hover:  #1c202e;
  --bg-sidebar:     #0d0f15;
  --bg-input:       #181c28;
  --bg-modal:       #141722;

  --accent:         #ff6b3d;
  --accent-light:   #ff8a65;
  --accent-dark:    #e64a19;
  --accent-glow:    rgba(255, 107, 61, 0.22);

  --primary-btn:    #ffffff;
  --primary-btn-hover: #f1f5f9;

  --orange:         #ff6b3d;
  --orange-light:   #ff8a65;
  --orange-glow:    rgba(255, 107, 61, 0.22);

  --gold:           #f59e0b;
  --gold-light:     #fbbf24;
  --gold-dark:      #d97706;
  --gold-glow:      rgba(245, 158, 11, 0.18);

  --success:        #10b981;
  --success-bg:     rgba(16, 185, 129, 0.12);
  --success-text:   #34d399;

  --warning:        #f59e0b;
  --warning-bg:     rgba(245, 158, 11, 0.12);
  --warning-text:   #fbbf24;

  --danger:         #f43f5e;
  --danger-bg:      rgba(244, 63, 94, 0.12);
  --danger-text:    #fb7185;

  --info:           #38bdf8;
  --info-bg:        rgba(56, 189, 248, 0.12);
  --info-text:      #7dd3fc;

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --border:         rgba(255, 255, 255, 0.08);
  --border-subtle:  rgba(255, 255, 255, 0.04);
  --border-hover:   rgba(255, 255, 255, 0.15);
  --border-active:  #ff6b3d;

  --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-card:    0 4px 20px rgba(0, 0, 0, 0.35), 0 0 1px 1px rgba(255, 255, 255, 0.04);
  --shadow-lg:      0 16px 40px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  --shadow-glow:    0 0 24px var(--accent-glow);
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  line-height: 1.55;
  letter-spacing: -0.01em;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ── Precision Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Uxerflow Modern Sidebar Architecture ────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition), background-color var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 38px; height: 38px;
  background: #0f172a;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1.1rem;
}

[data-theme="dark"] .brand-icon {
  background: #ffffff;
  color: #0f172a;
}

.brand-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Nav Menu */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all var(--transition);
  margin-bottom: 3px;
  position: relative;
}

.nav-item svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

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

.nav-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.nav-item.active svg {
  color: var(--orange);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: var(--orange);
  border-radius: 0 4px 4px 0;
}


.nav-item svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  font-weight: 700;
}

[data-theme="light"] .nav-item.active {
  background: #eef2ff;
  color: #4f46e5;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Sidebar user */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #312e81);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

.btn-logout {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  display: flex; align-items: center;
  transition: all var(--transition);
}
.btn-logout svg { width: 16px; height: 16px; }
.btn-logout:hover { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }

/* ── Main Layout & SSTR Topbar ───────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-base);
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color var(--transition), border-color var(--transition);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex: 1;
}

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

.topbar-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-bg);
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── Interactive Theme Toggle Switch ─────────────────────────── */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.theme-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
}

[data-theme="dark"] .sun-icon { display: inline-flex; }
[data-theme="dark"] .moon-icon { display: none; }

[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: inline-flex; }

.theme-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Page Content ────────────────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.card-title svg { width: 20px; height: 20px; color: var(--orange); }

/* ── Uxerflow Stat Cards Grid ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

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

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--success-text);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

/* ── Modern Table System (Uxerflow Style) ────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

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

thead th {
  padding: 14px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-input);
  white-space: nowrap;
}

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

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background-color: var(--bg-card-hover); }

tbody td {
  padding: 14px 18px;
  color: var(--text-secondary);
  vertical-align: middle;
  font-weight: 500;
}

tbody td.td-primary {
  color: var(--text-primary);
  font-weight: 700;
}

/* ── Precision Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-checkin, .badge-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .badge-checkin,
[data-theme="dark"] .badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-checkout, .badge-inactive {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

[data-theme="dark"] .badge-checkout,
[data-theme="dark"] .badge-inactive {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

/* ── Modern Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary-btn);
  color: var(--bg-surface);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
  transform: translateY(-1px);
}

.btn-orange, .btn-accent {
  background: var(--orange);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--orange-glow);
}

.btn-orange:hover, .btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-secondary, .btn-ghost {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover, .btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

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

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}


/* ── Filters / Forms ─────────────────────────────────────────── */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.form-control, .form-select, select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="month"], textarea {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary) !important;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 9px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  min-width: 160px;
}

select option, .form-select option, .form-control option {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  padding: 10px;
}

select option:checked, .form-select option:checked {
  background-color: var(--accent) !important;
  color: #ffffff !important;
}

.form-control:focus, .form-select:focus, select:focus, input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}



/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); box-shadow: var(--shadow-glow); }

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

.btn-success { background: rgba(34,197,94,0.15); color: var(--success); border-color: rgba(34,197,94,0.3); }
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-danger { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.22); }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin: 0 28px 0;
  border: 1px solid;
  position: relative;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

.alert-success { background: rgba(34,197,94,0.1);  color: var(--success);  border-color: rgba(34,197,94,0.25); margin-top: 16px; }
.alert-error   { background: rgba(239,68,68,0.1);  color: #f87171;         border-color: rgba(239,68,68,0.25); margin-top: 16px; }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.6;
  padding: 2px 6px;
}
.alert-close:hover { opacity: 1; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 20px;
  list-style: none;
}

.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
}

.page-item .page-link:hover { border-color: var(--accent); color: var(--accent-light); }
.page-item.active .page-link { background: var(--accent); color: white; border-color: var(--accent); }
.page-item.disabled .page-link { opacity: 0.4; cursor: not-allowed; }

/* ── Utility ─────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.font-semibold { font-weight: 600; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent  { color: var(--accent-light); }

/* No data state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ── Avatar/Face placeholder ─────────────────────────────────── */
.face-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9c95ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Hours worked progress bar ───────────────────────────────── */
.hours-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hours-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
  min-width: 80px;
}

.hours-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 99px;
  transition: width 0.8s ease;
}

.hours-fill.over { background: linear-gradient(90deg, var(--success), #4ade80); }

/* ── Form pages ──────────────────────────────────────────────── */
.form-page {
  max-width: 640px;
}

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

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

.form-group .form-control,
.form-group .form-select {
  width: 100%;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.error-msg {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
}

/* File upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone svg { width: 40px; height: 40px; color: var(--text-muted); margin-bottom: 12px; }
.upload-zone p { font-size: 0.875rem; color: var(--text-secondary); }
.upload-zone .upload-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Enrollment CLI card ─────────────────────────────────────── */
.cli-block {
  background: #0a0c14;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  color: #7dd3fc;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.7;
}

.cli-comment { color: var(--text-muted); }
.cli-cmd     { color: #a5f3fc; }

/* ── Mobile Sidebar Overlay ──────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 99990;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block !important;
  opacity: 1;
}

/* ── Responsive Architecture ──────────────────────────────────── */
@media (max-width: 992px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  .sidebar {
    transform: translateX(-100%);
    display: none;
    box-shadow: none;
    z-index: 999999;
    top: 0; left: 0; bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    max-width: 85vw;
  }
  .sidebar.open {
    display: flex !important;
    transform: translateX(0) !important;
    box-shadow: 0 0 60px rgba(0,0,0,0.95);
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .topbar {
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 9999;
  }
  .topbar-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: var(--radius-sm);
    cursor: pointer !important;
    z-index: 99999 !important;
    position: relative;
  }
  .topbar-menu-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
  }
  .topbar-date { display: none; }
  .page-content { padding: 12px; max-width: 100vw; overflow-x: hidden; }
  .card {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters-bar { flex-direction: column; align-items: stretch; gap: 10px !important; }
  .filter-group { width: 100% !important; min-width: 100% !important; }
  .table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 8px;
  }
  .table-wrapper table {
    min-width: 600px;
  }
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-title { font-size: 0.95rem; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-title { font-size: 1rem !important; }
  .employee-cell { gap: 8px; }
  .face-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
}

/* ── Ultra-Premium Vercel/Stripe Grade Pagination ───────────────────────────── */
.custom-pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 20px;
  background: rgba(26, 29, 39, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.pagination-meta {
  font-size: 0.86rem;
  color: #71717a;
  letter-spacing: -0.01em;
}

.pagination-meta .num {
  color: #f4f4f5;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 500;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

a.pg-btn:hover {
  background: rgba(108, 99, 255, 0.18);
  border-color: rgba(108, 99, 255, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.25);
}

.pg-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

.pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none !important;
  transition: all 0.18s ease;
  cursor: pointer;
}

a.pg-num:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

.pg-num.active {
  background: #6c63ff !important;
  border-color: #6c63ff !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.45);
}

.pg-num.ellipsis {
  color: #52525b;
  cursor: default;
}

@media (max-width: 640px) {
  .custom-pagination-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


