/* ================================================================
   NCA Attendance System — Design System
   Premium SaaS UI with Glassmorphism
   Primary: #5bb8e0  |  Font: Poppins
   ================================================================ */

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

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:          #0284c7;
  --primary-dark:     #0369a1;
  --primary-light:    #38bdf8;
  --primary-glow:     rgba(2, 132, 199, 0.20);
  --primary-subtle:   rgba(2, 132, 199, 0.08);

  /* Semantic Colors */
  --success:          #16a34a;
  --success-light:    rgba(22, 163, 74, 0.10);
  --warning:          #d97706;
  --warning-light:    rgba(217, 119, 6, 0.10);
  --danger:           #dc2626;
  --danger-light:     rgba(220, 38, 38, 0.10);
  --info:             #0284c7;
  --info-light:       rgba(2, 132, 199, 0.10);

  /* Background System — LIGHT THEME */
  --bg-base:          #f0f4f8;
  --bg-surface:       #ffffff;
  --bg-elevated:      #f8fafc;
  --bg-overlay:       #f1f5f9;
  --bg-glass:         rgba(255, 255, 255, 0.95);
  --bg-glass-light:   rgba(255, 255, 255, 0.70);
  --bg-sidebar:       #1e293b;

  /* Border System */
  --border:           #e2e8f0;
  --border-strong:    #cbd5e1;
  --border-primary:   rgba(2, 132, 199, 0.35);

  /* Text Colors */
  --text-primary:     #0f172a;
  --text-secondary:   #475569;
  --text-muted:       #94a3b8;
  --text-inverse:     #ffffff;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --gradient-surface: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 100%);
  --gradient-card:    linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-glow:    radial-gradient(ellipse at top, rgba(2,132,199,0.06) 0%, transparent 70%);

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:        0 10px 40px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-primary:   0 8px 32px rgba(2,132,199,0.20);
  --shadow-card:      0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);

  /* Sidebar */
  --sidebar-w:        260px;
  --sidebar-collapsed: 72px;

  /* Radius */
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;
  --radius-xl:        22px;
  --radius-full:      9999px;

  /* Transitions */
  --ease:             cubic-bezier(0.4, 0, 0.2, 1);
  --duration:         200ms;
  --duration-slow:    350ms;

  /* Typography */
  --font:             'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:        'SF Mono', 'Fira Code', monospace;

  /* Aliases used by component styles */
  --glass-bg:         var(--bg-surface);
  --glass-border:     var(--border);
  --input-bg:         #ffffff;
  --input-border:     #d1d5db;
  --text-accent:      var(--primary);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-light); }

img { max-width: 100%; }

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

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--duration-slow) var(--ease);
}

.page-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1600px;
  width: 100%;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  background: #1e293b !important;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--duration-slow) var(--ease);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

.sidebar-logo {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-primary);
  font-weight: 700;
  font-size: 14px;
  color: white;
  letter-spacing: -0.5px;
}

.sidebar-brand {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity var(--duration) var(--ease), width var(--duration) var(--ease);
}

.sidebar-brand .org-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.sidebar-brand .org-sub {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 400;
}

.sidebar.collapsed .sidebar-brand { opacity: 0; width: 0; }

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--duration);
}

.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  margin-bottom: 2px;
}

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

.nav-item.active {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--border-primary);
}

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

.nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--duration);
}

.nav-label {
  transition: opacity var(--duration), width var(--duration);
  overflow: hidden;
}

.sidebar.collapsed .nav-label { opacity: 0; width: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  transition: opacity var(--duration);
}

.sidebar.collapsed .nav-badge { opacity: 0; }

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  transition: background var(--duration);
  cursor: pointer;
  overflow: hidden;
}

.sidebar-user:hover { background: var(--bg-glass-light); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { overflow: hidden; }
.user-name  { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.user-role  { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.sidebar.collapsed .user-info { opacity: 0; width: 0; }

/* Sidebar Toggle */
/* sidebar-toggle: now lives inside topbar, not fixed-position */

/* ─── Top Bar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0; z-index: 50;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ─── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

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

.card-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}

.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); }

/* Stat Cards */
.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-slow) var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
  opacity: 0;
  transition: opacity var(--duration-slow);
}

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

.stat-info .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-info .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-info .stat-trend {
  font-size: 12px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.stat-icon.blue   { background: rgba(91,184,224,0.12);  color: var(--primary); }
.stat-icon.green  { background: rgba(34,197,94,0.12);   color: var(--success); }
.stat-icon.red    { background: rgba(239,68,68,0.12);   color: var(--danger); }
.stat-icon.amber  { background: rgba(245,158,11,0.12);  color: var(--warning); }
.stat-icon.purple { background: rgba(139,92,246,0.12);  color: #8b5cf6; }
.stat-icon.indigo { background: rgba(99,102,241,0.12);  color: #6366f1; }

/* ─── Tables ──────────────────────────────────────────────────── */
.table-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead tr {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table thead th:hover { color: var(--text-primary); }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--duration);
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }

.data-table tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody td.text-muted { color: var(--text-secondary); }

/* ─── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-label .required { color: var(--danger); margin-left: 3px; }

.form-control,
.form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13.5px;
  padding: 10px 14px;
  transition: all var(--duration) var(--ease);
  outline: none;
  appearance: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-overlay);
}

.form-control::placeholder { color: var(--text-muted); }

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238b949e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 38px;
}

.form-select option { background: var(--bg-overlay); color: var(--text-primary); }

textarea.form-control { resize: vertical; min-height: 100px; }

.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-control { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 12px rgba(91,184,224,0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,184,224,0.4);
  color: white;
}

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

.btn-secondary:hover:not(:disabled) { background: var(--bg-overlay); border-color: var(--border-strong); color: var(--text-primary); }

.btn-success  { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #16a34a; color: white; }

.btn-danger   { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; color: white; }

.btn-warning  { background: var(--warning); color: white; }
.btn-warning:hover:not(:disabled) { background: #d97706; color: white; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-glass-light); color: var(--text-primary); border-color: var(--border); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-md); }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* ─── Badges / Status ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-present  { background: var(--success-light); color: var(--success); }
.badge-absent   { background: var(--danger-light);  color: var(--danger); }
.badge-leave    { background: var(--info-light);    color: var(--info); }
.badge-holiday  { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.badge-pending  { background: var(--warning-light); color: var(--warning); }
.badge-approved { background: var(--success-light); color: var(--success); }
.badge-rejected { background: var(--danger-light);  color: var(--danger); }
.badge-active   { background: var(--success-light); color: var(--success); }
.badge-inactive { background: rgba(107,114,128,0.12); color: #6b7280; }
.badge-online   { background: var(--success-light); color: var(--success); }
.badge-online::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; animation: pulse 2s infinite; }
.badge-offline  { background: rgba(107,114,128,0.12); color: #6b7280; }
.badge-off_day  { background: rgba(107,114,128,0.12); color: #6b7280; }
.badge-secondary{ background: var(--bg-elevated); color: var(--text-secondary); }

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

/* ─── Flash Messages ────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideDown 0.3s var(--ease);
  border: 1px solid transparent;
}

.alert-success { background: var(--success-light); color: var(--success); border-color: rgba(34,197,94,0.2); }
.alert-error,
.alert-danger  { background: var(--danger-light);  color: var(--danger);  border-color: rgba(239,68,68,0.2); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.alert-info    { background: var(--info-light);    color: var(--info);    border-color: rgba(59,130,246,0.2); }

@keyframes slideDown { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration);
  text-decoration: none;
}

.page-btn:hover   { background: var(--bg-overlay); color: var(--text-primary); }
.page-btn.active  { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn.disabled{ opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ─── Progress Bars ──────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  transition: width 0.6s var(--ease);
}

.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ─── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sm  { width: 30px; height: 30px; font-size: 11px; }
.avatar-md  { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg  { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl  { width: 80px; height: 80px; font-size: 28px; }

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-gradient { background: var(--gradient-brand); color: white; }

/* ─── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all var(--duration);
}

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

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration) var(--ease);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-body  { padding: 24px 26px; }
.modal-footer { padding: 18px 26px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-header-info .page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.page-header-info .page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-muted); }

/* ─── Search & Filter Bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-input .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px; height: 16px;
}

.search-input .form-control { padding-left: 38px; }

/* ─── Charts Placeholder ──────────────────────────────────────── */
.chart-container {
  position: relative;
  height: 240px;
}

/* ─── Employee Card ───────────────────────────────────────────── */
.employee-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: background var(--duration);
}

.employee-card:hover { background: var(--bg-glass-light); }

/* ─── Calendar ────────────────────────────────────────────────── */
/* att-calendar: block container, not grid itself */
/* (header-row and cal-grid each have their own grid) */

.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
}

.cal-day.present  { background: var(--success-light); color: var(--success); }
.cal-day.absent   { background: var(--danger-light);  color: var(--danger); }
.cal-day.leave    { background: var(--info-light);    color: var(--info); }
.cal-day.holiday  { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.cal-day.off_day  { background: var(--bg-elevated);   color: var(--text-muted); }
.cal-day.future   { background: transparent;          color: var(--text-muted); }
.cal-day.header   { font-size: 10px; font-weight: 600; color: var(--text-muted); background: none; }
.cal-day.today    { border: 1px solid var(--primary); }

/* ─── Utilities ─────────────────────────────────────────────────  */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2   { gap: 8px; }
.gap-3   { gap: 12px; }
.gap-4   { gap: 16px; }
.w-full  { width: 100%; }
.mt-4    { margin-top: 16px; }
.mb-4    { margin-bottom: 16px; }
.mt-6    { margin-top: 24px; }
.mb-6    { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-primary  { color: var(--primary); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-muted-c  { color: var(--text-secondary); }
.text-money    { font-variant-numeric: tabular-nums; font-weight: 600; }

.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h4 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; }

/* ─── Login Page ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(91,184,224,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(58,125,213,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(139,92,246,0.04) 0%, transparent 50%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(22, 27, 34, 0.90);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(91,184,224,0.06);
}

.auth-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.auth-logo {
  width: 48px; height: 48px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: white;
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.auth-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

.auth-logo-text .system-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.auth-logo-text .org-name {
  font-size: 11px;
  color: var(--text-secondary);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-overlay); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 300; width: var(--sidebar-w) !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-toggle { display: none; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 12px; }
  .filter-bar { gap: 8px; }
  .search-input { max-width: 100%; min-width: 0; flex: 1 1 100%; }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-primary);
  }

  /* sidebar-overlay: hidden by default, only shown when .active is set by JS */
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }
  .sidebar-overlay.active {
    display: block;
  }
}

.mobile-menu-btn   { display: none; }
.sidebar-overlay   { display: none; }

/* ─── Tooltip ────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration);
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ─── Loading State ──────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Attendance Percentage Display ─────────────────────────── */
.att-pct-ring {
  position: relative;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
}

.att-pct-value {
  position: absolute;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .sidebar-toggle, .btn, .filter-bar, .pagination { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .card, .table-container { box-shadow: none; border: 1px solid #ccc; }
  body { background: white; color: black; }
  .page-content { padding: 0; }
}

/* ─── Extended component styles ──────────────────────────────── */

/* Page headers */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.page-title-inline { font-size:1.25rem; font-weight:600; color:var(--text-primary); margin:0; }
.page-subtitle { color:var(--text-muted); font-size:.85rem; margin:0.2rem 0 0; }
.page-actions { display:flex; gap:.5rem; flex-wrap:wrap; }

/* Auth page */
.auth-body { background:var(--bg-base); min-height:100vh; }
.auth-container { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; position:relative; }
.auth-bg { position:fixed; inset:0; overflow:hidden; pointer-events:none; }
.auth-bg-orb { position:absolute; border-radius:50%; opacity:.15; }
.orb-1 { width:500px; height:500px; background:var(--primary); top:-200px; right:-100px; }
.orb-2 { width:400px; height:400px; background:#a855f7; bottom:-150px; left:-100px; }
.orb-3 { width:300px; height:300px; background:#22c55e; top:40%; left:40%; }
.auth-card { width:100%; max-width:440px; background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:20px; padding:2.5rem; position:relative; z-index:1; box-shadow:0 25px 60px rgba(0,0,0,.5); }
.auth-logo { display:flex; flex-direction:column; align-items:center; text-align:center; margin-bottom:2rem; gap:.75rem; }
.auth-logo-icon { width:64px; height:64px; background:var(--gradient-primary); border-radius:16px; display:flex; align-items:center; justify-content:center; font-size:1.8rem; color:#fff; }
.auth-logo-img { width:80px; height:80px; object-fit:contain; }
.auth-logo-text h1 { font-size:1.1rem; font-weight:700; color:var(--text-primary); margin:0; }
.auth-logo-text p { font-size:.8rem; color:var(--text-muted); margin:0; }
.auth-form .form-group-float { margin-bottom:1rem; }
.input-icon-wrap { position:relative; }
.input-icon { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--text-muted); z-index:1; pointer-events:none; }
.input-icon-right { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--text-muted); cursor:pointer; padding:0; line-height:1; }
.input-icon-wrap .form-control-custom { padding-left:2.6rem; padding-right:2.6rem; }
.auth-options { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.25rem; }
.forgot-link { color:var(--primary); font-size:.85rem; text-decoration:none; }
.forgot-link:hover { text-decoration:underline; }
.btn-auth { display:flex; align-items:center; justify-content:center; width:100%; padding:.75rem; background:var(--gradient-primary); border:none; border-radius:10px; color:#fff; font-weight:600; font-family:inherit; font-size:.95rem; cursor:pointer; transition:all .2s; text-decoration:none; }
.btn-auth:hover { opacity:.9; transform:translateY(-1px); box-shadow:0 8px 20px rgba(91,184,224,.3); color:#fff; }
.auth-footer { text-align:center; margin-top:2rem; color:var(--text-muted); font-size:.78rem; }
.auth-footer p { margin:0.2rem 0; }
.custom-check { display:flex; align-items:center; gap:.5rem; cursor:pointer; color:var(--text-secondary); font-size:.85rem; user-select:none; }
.custom-check input { accent-color:var(--primary); width:16px; height:16px; }
.checkmark { display:none; }

/* Buttons */
.btn-primary-custom { display:inline-flex; align-items:center; padding:.5rem 1rem; background:var(--gradient-primary); border:none; border-radius:8px; color:#fff; font-family:inherit; font-weight:500; font-size:.875rem; cursor:pointer; text-decoration:none; transition:all .2s; white-space:nowrap; }
.btn-primary-custom:hover { opacity:.9; transform:translateY(-1px); color:#fff; }
.btn-outline-custom { display:inline-flex; align-items:center; padding:.5rem 1rem; background:transparent; border:1px solid var(--glass-border); border-radius:8px; color:var(--text-secondary); font-family:inherit; font-weight:500; font-size:.875rem; cursor:pointer; text-decoration:none; transition:all .2s; white-space:nowrap; }
.btn-outline-custom:hover { border-color:var(--primary); color:var(--primary); }
.btn-outline-custom.btn-sm, .btn-primary-custom.btn-sm { padding:.35rem .75rem; font-size:.8rem; }
.btn-success-custom { display:inline-flex; align-items:center; padding:.5rem 1rem; background:var(--success); border:none; border-radius:8px; color:#fff; font-family:inherit; font-weight:500; font-size:.875rem; cursor:pointer; text-decoration:none; }
.btn-danger-custom { display:inline-flex; align-items:center; padding:.5rem 1rem; background:var(--danger); border:none; border-radius:8px; color:#fff; font-family:inherit; font-weight:500; font-size:.875rem; cursor:pointer; text-decoration:none; }
.btn-filter { display:inline-flex; align-items:center; gap:.35rem; padding:.4rem .8rem; background:rgba(91,184,224,.15); border:1px solid var(--primary); border-radius:6px; color:var(--primary); font-family:inherit; font-size:.8rem; cursor:pointer; }
.btn-filter-clear { color:var(--text-muted); font-size:.8rem; text-decoration:none; padding:.4rem .5rem; }
.btn-filter-clear:hover { color:var(--text-primary); }
.btn-link-sm { background:none; border:none; color:var(--primary); font-size:.8rem; cursor:pointer; text-decoration:none; padding:0; }
.btn-link-sm:hover { text-decoration:underline; }
.btn-icon-sm { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:6px; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; color:var(--text-muted); cursor:pointer; font-size:.8rem; }

/* Action buttons in tables */
.action-btns { display:flex; gap:.35rem; }
.btn-action { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:6px; border:none; cursor:pointer; font-size:.8rem; transition:all .15s; text-decoration:none; }
.btn-view { background:rgba(59,130,246,.15); color:#3b82f6; }
.btn-view:hover { background:rgba(59,130,246,.3); color:#3b82f6; }
.btn-edit { background:rgba(245,158,11,.15); color:#f59e0b; }
.btn-edit:hover { background:rgba(245,158,11,.3); }
.btn-delete { background:rgba(239,68,68,.15); color:#ef4444; }
.btn-delete:hover { background:rgba(239,68,68,.3); }
.btn-success-sm { background:rgba(34,197,94,.15); color:#22c55e; }
.btn-success-sm:hover { background:rgba(34,197,94,.3); }
.btn-action-sm { width:26px; height:26px; font-size:.75rem; }

/* Table */
.table-premium { width:100%; border-collapse:collapse; font-size:.875rem; }
.table-premium thead tr { border-bottom:1px solid var(--glass-border); }
.table-premium th { padding:.75rem 1rem; color:var(--text-muted); font-weight:500; font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; white-space:nowrap; }
.table-premium td { padding:.7rem 1rem; color:var(--text-secondary); border-bottom:1px solid rgba(255,255,255,.04); vertical-align:middle; }
.table-premium tbody tr:hover { background:rgba(255,255,255,.03); }
.table-premium tbody tr:last-child td { border-bottom:none; }
.table-sm-premium th, .table-sm-premium td { padding:.5rem .75rem; font-size:.82rem; }

/* Filters */
.table-filters { padding:.75rem 1rem; }
.filter-form { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.form-control-sm-custom { background:var(--input-bg); border:1px solid var(--input-border); border-radius:6px; color:var(--text-primary); padding:.35rem .7rem; font-family:inherit; font-size:.82rem; transition:border-color .2s; }
.form-control-sm-custom:focus { outline:none; border-color:var(--primary); }
.form-select-sm-custom { background:var(--input-bg); border:1px solid var(--input-border); border-radius:6px; color:var(--text-primary); padding:.35rem .7rem; font-family:inherit; font-size:.82rem; cursor:pointer; }
.form-select-sm-custom:focus { outline:none; border-color:var(--primary); }
.date-range-wrap { display:flex; align-items:center; gap:.35rem; }
.search-wrap { position:relative; }
.search-icon-sm { position:absolute; left:8px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.75rem; pointer-events:none; }
.search-wrap .form-control-sm-custom { padding-left:1.8rem; }

/* Forms */
.form-label-custom { display:block; color:var(--text-secondary); font-size:.82rem; font-weight:500; margin-bottom:.4rem; }
.form-control-custom { width:100%; background:var(--input-bg); border:1px solid var(--input-border); border-radius:8px; color:var(--text-primary); padding:.6rem .9rem; font-family:inherit; font-size:.875rem; transition:border-color .2s,box-shadow .2s; }
.form-control-custom:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(91,184,224,.15); }
.form-control-custom.is-invalid { border-color:var(--danger); }
.form-control-custom:disabled { opacity:.5; cursor:not-allowed; }
.form-control-custom::placeholder { color:var(--text-muted); }
.invalid-feedback { color:var(--danger); font-size:.78rem; margin-top:.3rem; }
.required { color:var(--danger); }
.form-actions { display:flex; justify-content:flex-end; gap:.75rem; margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid var(--glass-border); }
.input-prefix-wrap { position:relative; }
.input-prefix { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.85rem; pointer-events:none; }
.input-prefix-wrap .form-control-custom { padding-left:2rem; }
.input-suffix-wrap { position:relative; }
.input-suffix { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.82rem; pointer-events:none; }

/* Badges */
.badge { display:inline-flex; align-items:center; padding:.25rem .6rem; border-radius:20px; font-size:.72rem; font-weight:500; }
.badge-success { background:rgba(34,197,94,.15); color:#22c55e; }
.badge-danger  { background:rgba(239,68,68,.15);  color:#ef4444; }
.badge-warning { background:rgba(245,158,11,.15); color:#f59e0b; }
.badge-primary { background:rgba(91,184,224,.15); color:var(--primary); }
.badge-info    { background:rgba(6,182,212,.15);  color:#06b6d4; }
.badge-secondary { background:rgba(148,163,184,.15); color:#94a3b8; }

/* Stat cards */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.stats-grid--4 { grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); }
.stat-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:16px; padding:1.25rem; display:flex; flex-direction:column; gap:.5rem; position:relative; overflow:hidden; transition:transform .2s; }
.stat-card:hover { transform:translateY(-2px); }
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; }
.stat-card--blue::before   { background:linear-gradient(90deg,#3b82f6,#1d4ed8); }
.stat-card--green::before  { background:linear-gradient(90deg,#22c55e,#15803d); }
.stat-card--red::before    { background:linear-gradient(90deg,#ef4444,#b91c1c); }
.stat-card--orange::before { background:linear-gradient(90deg,#f59e0b,#d97706); }
.stat-card--purple::before { background:linear-gradient(90deg,#a855f7,#7c3aed); }
.stat-card--teal::before   { background:linear-gradient(90deg,#14b8a6,#0f766e); }
.stat-icon { font-size:1.5rem; color:var(--text-muted); }
.stat-card--blue .stat-icon   { color:#3b82f6; }
.stat-card--green .stat-icon  { color:#22c55e; }
.stat-card--red .stat-icon    { color:#ef4444; }
.stat-card--orange .stat-icon { color:#f59e0b; }
.stat-card--purple .stat-icon { color:#a855f7; }
.stat-card--teal .stat-icon   { color:#14b8a6; }
.stat-body { flex:1; }
.stat-value { font-size:1.8rem; font-weight:700; color:var(--text-primary); line-height:1; }
.stat-label { color:var(--text-muted); font-size:.8rem; margin-top:.25rem; }
.stat-trend { font-size:.75rem; color:var(--text-muted); display:flex; align-items:center; gap:.25rem; }
.stat-trend--up { color:var(--success); }
.stat-trend--down { color:var(--danger); }
.stat-detail { font-size:.75rem; color:var(--text-muted); display:flex; gap:.75rem; flex-wrap:wrap; }
.progress-bar-mini { height:4px; background:rgba(255,255,255,.1); border-radius:4px; overflow:hidden; margin:.25rem 0; }
.progress-fill { height:100%; border-radius:4px; transition:width .6s ease; }
.stat-progress { font-size:.75rem; }

/* Glass card */
.card-glass { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:16px; overflow:hidden; margin-bottom:1rem; }
.card-glass-header { display:flex; align-items:center; justify-content:space-between; padding:.9rem 1.25rem; border-bottom:1px solid var(--glass-border); flex-wrap:wrap; gap:.5rem; }
.card-glass-title { font-size:.9rem; font-weight:600; color:var(--text-primary); margin:0; }
.card-glass-body { padding:1.25rem; }
.card-glass-footer { padding:.75rem 1.25rem; border-top:1px solid var(--glass-border); }
.card-actions { display:flex; align-items:center; gap:.5rem; }

/* Mini stat cards */
.mini-stat-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:12px; padding:1rem; text-align:center; }
.mini-stat-label { font-size:.75rem; color:var(--text-muted); margin-bottom:.25rem; }
.mini-stat-value { font-size:1.4rem; font-weight:700; color:var(--text-primary); }

/* Employee cell */
.employee-cell { display:flex; align-items:center; gap:.6rem; }
.emp-avatar { width:34px; height:34px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:700; color:#fff; flex-shrink:0; overflow:hidden; }
.emp-avatar img { width:100%; height:100%; object-fit:cover; }
.emp-name { font-weight:500; color:var(--text-primary); font-size:.875rem; }
.emp-id { color:var(--text-muted); font-size:.75rem; }
.employee-cell-sm { display:flex; align-items:center; gap:.5rem; }
.emp-avatar-sm { width:28px; height:28px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:700; color:#fff; flex-shrink:0; overflow:hidden; }
.emp-avatar-sm img { width:100%; height:100%; object-fit:cover; }

/* Time badges */
.time-badge { display:inline-flex; align-items:center; padding:.15rem .5rem; border-radius:6px; font-size:.78rem; font-weight:500; font-variant-numeric:tabular-nums; }
.time-badge--in  { background:rgba(34,197,94,.12); color:#22c55e; }
.time-badge--out { background:rgba(239,68,68,.12);  color:#ef4444; }
.badge-time { background:rgba(91,184,224,.15); color:var(--primary); padding:.2rem .5rem; border-radius:6px; font-size:.78rem; font-variant-numeric:tabular-nums; }

/* PIN badge */
.pin-badge { background:rgba(91,184,224,.1); color:var(--primary); padding:.1rem .4rem; border-radius:4px; font-size:.8rem; }

/* Percentage cell */
.pct-cell { display:flex; align-items:center; gap:.5rem; min-width:90px; }
.pct-bar { flex:1; height:4px; background:rgba(255,255,255,.1); border-radius:4px; overflow:hidden; }
.pct-fill { height:100%; border-radius:4px; }

/* Date cell */
.date-cell { display:flex; flex-direction:column; }
.date-day { font-size:.75rem; color:var(--text-muted); }
.date-full { font-size:.85rem; color:var(--text-primary); }

/* Checkin list */
.checkin-list { max-height:320px; overflow-y:auto; }
.checkin-item { display:flex; align-items:center; gap:.75rem; padding:.7rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.04); }
.checkin-item:last-child { border-bottom:none; }
.checkin-avatar { width:34px; height:34px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:700; color:#fff; overflow:hidden; flex-shrink:0; }
.checkin-avatar img { width:100%; height:100%; object-fit:cover; }
.checkin-info { flex:1; min-width:0; }
.checkin-name { font-size:.85rem; font-weight:500; color:var(--text-primary); }
.checkin-dept { font-size:.75rem; color:var(--text-muted); }
.checkin-time { flex-shrink:0; }

/* Top employees list */
.top-list { padding:0 }
.top-item { display:flex; align-items:center; gap:.75rem; padding:.7rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.04); }
.top-item:last-child { border-bottom:none; }
.top-rank { width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; flex-shrink:0; }
.rank-1 { background:linear-gradient(135deg,#fbbf24,#f59e0b); color:#fff; }
.rank-2 { background:linear-gradient(135deg,#94a3b8,#64748b); color:#fff; }
.rank-3 { background:linear-gradient(135deg,#c2855a,#a36b45); color:#fff; }
.top-rank:not(.rank-1):not(.rank-2):not(.rank-3) { background:var(--glass-bg); color:var(--text-muted); }
.top-info { flex:1; min-width:0; }
.top-name { font-size:.85rem; font-weight:500; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.top-dept { font-size:.72rem; color:var(--text-muted); }
.pct-badge { padding:.2rem .5rem; border-radius:6px; font-size:.75rem; font-weight:600; }
.pct-good { background:rgba(34,197,94,.12); color:#22c55e; }
.pct-bad  { background:rgba(239,68,68,.12);  color:#ef4444; }

/* Holiday list */
.holiday-list { padding:0; }
.holiday-item { display:flex; align-items:center; gap:.75rem; padding:.65rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.04); }
.holiday-item:last-child { border-bottom:none; }
.holiday-date-box { flex-shrink:0; width:44px; background:rgba(91,184,224,.1); border-radius:8px; text-align:center; padding:.3rem .2rem; }
.hday-month { display:block; font-size:.65rem; color:var(--primary); text-transform:uppercase; letter-spacing:.05em; }
.hday-day { display:block; font-size:1.1rem; font-weight:700; color:var(--text-primary); line-height:1.2; }
.holiday-name { font-size:.82rem; color:var(--text-primary); }
.holiday-range { font-size:.72rem; color:var(--text-muted); }
.holiday-name-cell { display:flex; align-items:center; gap:.6rem; }
.holiday-icon-sm { color:var(--primary); font-size:1rem; }

/* Leave list */
.leave-list { padding:0; }
.leave-item { display:flex; align-items:center; gap:.6rem; padding:.65rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.04); }
.leave-item:last-child { border-bottom:none; }
.leave-type-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.leave-info { flex:1; min-width:0; }
.leave-type { font-size:.82rem; font-weight:500; color:var(--text-primary); }
.leave-dates { font-size:.72rem; color:var(--text-muted); }

/* Days preview */
.days-preview { background:rgba(91,184,224,.1); border:1px solid rgba(91,184,224,.3); border-radius:8px; padding:.6rem 1rem; color:var(--primary); font-size:.85rem; }

/* Info alert */
.info-alert { background:rgba(91,184,224,.08); border:1px solid rgba(91,184,224,.2); border-radius:8px; padding:.75rem 1rem; color:var(--text-secondary); font-size:.83rem; }

/* Payroll */
.payroll-summary-bar { display:flex; align-items:center; padding:1rem 1.25rem; border-bottom:1px solid var(--glass-border); gap:0; flex-wrap:wrap; }
.psb-item { flex:1; text-align:center; min-width:120px; }
.psb-label { display:block; font-size:.72rem; color:var(--text-muted); margin-bottom:.2rem; }
.psb-value { font-size:1.15rem; font-weight:700; color:var(--text-primary); }
.psb-deduction .psb-value { color:var(--danger); }
.psb-net .psb-value { color:var(--success); }
.psb-divider { width:1px; background:var(--glass-border); height:40px; flex-shrink:0; }
.payroll-mini-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:10px; padding:.9rem 1rem; }
.pmini-label { font-size:.72rem; color:var(--text-muted); }
.pmini-value { font-size:1.2rem; font-weight:700; color:var(--text-primary); }
.pmini-deduction .pmini-value { color:var(--danger); }
.pmini-net .pmini-value { color:var(--success); }
.formula-item { display:flex; justify-content:space-between; padding:.4rem .6rem; font-size:.82rem; color:var(--text-secondary); border-bottom:1px solid rgba(255,255,255,.05); }
.formula-item--highlight { color:var(--text-primary); font-weight:600; background:rgba(91,184,224,.08); border-radius:6px; border:none; margin-top:.25rem; }
.payroll-formula-box { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:12px; padding:1rem; }

/* Payslip */
.payslip-card { max-width:700px; }
.payslip-header { display:flex; justify-content:space-between; align-items:flex-start; padding:1.5rem 1.5rem .75rem; border-bottom:2px solid var(--primary); }
.payslip-org h5 { color:var(--text-primary); font-size:1rem; margin:0; }
.payslip-org p { color:var(--text-muted); font-size:.8rem; margin:0; }
.payslip-title { text-align:right; }
.payslip-title h4 { color:var(--primary); font-size:1.1rem; letter-spacing:.1em; margin:0; }
.payslip-title p { color:var(--text-muted); font-size:.82rem; margin:0; }
.payslip-emp { display:grid; grid-template-columns:1fr 1fr; gap:.5rem .75rem; padding:1rem 1.5rem; border-bottom:1px solid var(--glass-border); }
.payslip-emp-row { display:flex; flex-direction:column; }
.pe-label { font-size:.72rem; color:var(--text-muted); }
.pe-value { font-size:.88rem; color:var(--text-primary); font-weight:500; }
.payslip-table { padding:1rem 1.5rem; }
.ps-section { margin-bottom:1.25rem; }
.ps-section h6 { color:var(--primary); font-size:.82rem; text-transform:uppercase; letter-spacing:.05em; margin-bottom:.5rem; }
.ps-section table { width:100%; font-size:.85rem; border-collapse:collapse; }
.ps-section table tr { border-bottom:1px solid rgba(255,255,255,.05); }
.ps-section table td { padding:.35rem .25rem; color:var(--text-secondary); }
.ps-section table td:last-child { text-align:right; font-weight:500; }
.ps-total td { font-size:1rem; color:var(--text-primary)!important; font-weight:700!important; padding-top:.6rem!important; border-top:2px solid var(--glass-border); }
.payslip-footer { text-align:center; padding:.75rem 1.5rem; border-top:1px solid var(--glass-border); color:var(--text-muted); font-size:.75rem; }

/* Reports */
.report-card-link { text-decoration:none; color:inherit; display:block; }
.report-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:16px; padding:1.5rem; transition:all .2s; position:relative; overflow:hidden; }
.report-card:hover { border-color:var(--primary); transform:translateY(-3px); box-shadow:0 10px 30px rgba(0,0,0,.3); }
.report-card .report-icon { width:56px; height:56px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:#fff; margin-bottom:1rem; }
.report-card h6 { color:var(--text-primary); font-size:.95rem; margin-bottom:.4rem; }
.report-card p { color:var(--text-muted); font-size:.8rem; margin:0 0 1rem; }
.report-btn { color:var(--primary); font-size:.82rem; font-weight:500; }
.report-badge { position:absolute; top:.75rem; right:.75rem; background:rgba(91,184,224,.15); color:var(--primary); font-size:.65rem; padding:.2rem .5rem; border-radius:12px; }
.report-emp-header { display:flex; align-items:center; gap:1rem; padding:1rem 1.25rem; border-bottom:1px solid var(--glass-border); flex-wrap:wrap; }
.emp-avatar-lg { width:52px; height:52px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:1.2rem; font-weight:700; color:#fff; overflow:hidden; flex-shrink:0; }
.emp-avatar-lg img { width:100%; height:100%; object-fit:cover; }
.report-mini-stats { display:flex; gap:1.5rem; }
.rms-item { text-align:center; }
.rms-item span { display:block; font-size:1.1rem; font-weight:700; color:var(--text-primary); }
.rms-item small { font-size:.7rem; color:var(--text-muted); }

/* Device cards */
.device-card { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:16px; padding:1.25rem; position:relative; transition:all .2s; }
.device-card:hover { border-color:var(--primary); transform:translateY(-2px); }
.device-card--online { border-top:2px solid var(--success); }
.device-card--offline { border-top:2px solid var(--danger); }
.device-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:.75rem; }
.device-icon { font-size:2rem; color:var(--primary); }
.device-status-dot { width:10px; height:10px; border-radius:50%; }
.status-online  { background:var(--success); box-shadow:0 0 8px rgba(34,197,94,.6); }
.status-offline { background:var(--danger); }
.device-name { font-size:1rem; font-weight:600; color:var(--text-primary); margin-bottom:.25rem; }
.device-serial { color:var(--text-muted); font-size:.8rem; margin-bottom:.5rem; }
.device-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:.5rem; font-size:.8rem; color:var(--text-muted); }
.device-heartbeat { font-size:.75rem; color:var(--text-muted); margin-bottom:.75rem; }
.device-actions { display:flex; gap:.5rem; flex-wrap:wrap; }
.btn-device-action { display:inline-flex; align-items:center; padding:.3rem .65rem; background:rgba(255,255,255,.05); border:1px solid var(--glass-border); border-radius:6px; color:var(--text-secondary); font-size:.78rem; cursor:pointer; text-decoration:none; transition:all .15s; }
.btn-device-action:hover { border-color:var(--primary); color:var(--primary); }
.btn-device-delete:hover { border-color:var(--danger); color:var(--danger)!important; }
.info-box { background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:8px; padding:.75rem; }
.info-box-label { display:block; font-size:.72rem; color:var(--text-muted); margin-bottom:.3rem; }
.info-box-value { font-size:.85rem; }

/* Profile */
.profile-avatar-lg { display:flex; justify-content:center; }
.profile-photo-lg { width:90px; height:90px; border-radius:50%; object-fit:cover; border:3px solid var(--primary); }
.profile-initials-lg { width:90px; height:90px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:1.8rem; font-weight:700; color:#fff; border:3px solid var(--primary); }
.text-primary-accent { color:var(--primary)!important; }
.fw-500 { font-weight:500; }
.fw-600 { font-weight:600; }

/* Info list */
.info-list { display:flex; flex-direction:column; gap:.5rem; }
.info-item { display:flex; justify-content:space-between; align-items:center; padding:.4rem 0; border-bottom:1px solid rgba(255,255,255,.04); font-size:.85rem; }
.info-item:last-child { border-bottom:none; }
.info-label { color:var(--text-muted); display:flex; align-items:center; gap:.25rem; }
.info-value { color:var(--text-primary); font-weight:500; text-align:right; max-width:65%; word-break:break-word; }

/* Detail grid (leave view) */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem 1.5rem; }
.detail-item--full { grid-column:span 2; }
.detail-item { display:flex; flex-direction:column; gap:.2rem; padding:.6rem 0; border-bottom:1px solid rgba(255,255,255,.04); }
.detail-label { font-size:.72rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.detail-value { font-size:.9rem; color:var(--text-primary); }

/* Contact cell */
.contact-cell { font-size:.78rem; color:var(--text-muted); display:flex; flex-direction:column; gap:.1rem; }

/* Photo upload */
.photo-upload-area { display:flex; flex-direction:column; align-items:center; }
.photo-preview { width:100px; height:100px; border-radius:50%; background:var(--glass-bg); border:2px dashed var(--glass-border); display:flex; align-items:center; justify-content:center; font-size:2rem; color:var(--text-muted); overflow:hidden; }
.btn-upload-photo { display:inline-flex; align-items:center; padding:.4rem .9rem; background:rgba(91,184,224,.1); border:1px solid rgba(91,184,224,.3); border-radius:8px; color:var(--primary); font-size:.82rem; cursor:pointer; transition:all .2s; }
.btn-upload-photo:hover { background:rgba(91,184,224,.2); }

/* Settings */
.day-checkboxes { display:flex; gap:.4rem; flex-wrap:wrap; }
.day-check { display:inline-flex; align-items:center; justify-content:center; min-width:42px; padding:.35rem .5rem; background:var(--input-bg); border:1px solid var(--input-border); border-radius:6px; font-size:.78rem; color:var(--text-muted); cursor:pointer; user-select:none; transition:all .15s; }
.day-check input { display:none; }
.day-check--active { background:rgba(91,184,224,.15); border-color:var(--primary); color:var(--primary); font-weight:500; }
.dept-list { max-height:220px; overflow-y:auto; }
.dept-item { display:flex; justify-content:space-between; align-items:center; padding:.6rem 1.25rem; border-bottom:1px solid rgba(255,255,255,.04); font-size:.85rem; }
.dept-item:last-child { border-bottom:none; }
.logo-upload-area { display:flex; flex-direction:column; align-items:center; text-align:center; gap:.25rem; }
.current-logo { max-height:60px; max-width:120px; object-fit:contain; }
.logo-placeholder { width:80px; height:60px; background:var(--glass-bg); border:2px dashed var(--glass-border); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:1.5rem; color:var(--text-muted); }

/* Pagination */
.pagination { margin:0; gap:.2rem; }
.page-item .page-link { background:var(--glass-bg); border:1px solid var(--glass-border); color:var(--text-secondary); border-radius:6px!important; padding:.35rem .65rem; font-size:.8rem; transition:all .15s; }
.page-item.active .page-link { background:var(--gradient-primary); border-color:transparent; color:#fff; }
.page-item .page-link:hover { border-color:var(--primary); color:var(--primary); }

/* Empty states */
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:3rem; text-align:center; }
.empty-state i { font-size:2.5rem; color:var(--text-muted); margin-bottom:.75rem; opacity:.5; }
.empty-state h6 { color:var(--text-secondary); margin-bottom:.4rem; }
.empty-state p { color:var(--text-muted); font-size:.85rem; margin:0 0 1rem; }
.empty-state-sm { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2rem; text-align:center; }
.empty-state-sm i { font-size:1.5rem; color:var(--text-muted); margin-bottom:.4rem; opacity:.5; }
.empty-state-sm p { color:var(--text-muted); font-size:.8rem; margin:0; }

/* Attendance calendar */
.att-calendar { width:100%; }
.cal-header-row { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin-bottom:4px; }
.cal-header-cell { text-align:center; font-size:.72rem; font-weight:500; color:var(--text-muted); padding:.3rem; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.cal-cell { aspect-ratio:1; border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:var(--glass-bg); border:1px solid transparent; cursor:default; transition:all .15s; position:relative; }
.cal-day-num { font-size:.78rem; color:var(--text-muted); line-height:1; }
.cal-day-icon { font-size:.65rem; font-weight:700; line-height:1; }
.cal-present { background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.2); }
.cal-present .cal-day-num { color:#22c55e; }
.cal-present .cal-day-icon { color:#22c55e; }
.cal-absent  { background:rgba(239,68,68,.12);  border-color:rgba(239,68,68,.2); }
.cal-absent .cal-day-num  { color:#ef4444; }
.cal-absent .cal-day-icon { color:#ef4444; }
.cal-leave   { background:rgba(91,184,224,.12); border-color:rgba(91,184,224,.2); }
.cal-leave .cal-day-num   { color:var(--primary); }
.cal-leave .cal-day-icon  { color:var(--primary); }
.cal-holiday { background:rgba(6,182,212,.12);  border-color:rgba(6,182,212,.2); }
.cal-holiday .cal-day-num { color:#06b6d4; }
.cal-off { background:rgba(255,255,255,.03); }
.cal-off .cal-day-num { color:rgba(255,255,255,.2); }
.cal-future { opacity:.4; }
.cal-today { border-color:var(--primary)!important; }
.cal-today .cal-day-num { font-weight:700!important; color:var(--primary)!important; }
.cal-month-label { font-size:.85rem; font-weight:600; color:var(--text-primary); min-width:120px; text-align:center; }
.cal-legend { display:flex; gap:1rem; margin-top:.75rem; flex-wrap:wrap; justify-content:center; }
.legend-item { display:flex; align-items:center; gap:.35rem; font-size:.72rem; color:var(--text-muted); }
.legend-dot { width:10px; height:10px; border-radius:50%; }
.dot-present { background:#22c55e; }
.dot-absent  { background:#ef4444; }
.dot-leave   { background:var(--primary); }
.dot-holiday { background:#06b6d4; }
.dot-off     { background:rgba(255,255,255,.15); }

/* Flash animation */
@keyframes fadeOut { from{opacity:1} to{opacity:0;transform:translateY(-8px)} }
.flash-alert.fade-out { animation:fadeOut .5s ease forwards; }
.flash-alert { animation:slideDown .3s ease; }
@keyframes slideDown { from{transform:translateY(-10px);opacity:0} to{transform:translateY(0);opacity:1} }

/* Glass dropdown */
.glass-dropdown { background:var(--bg-surface)!important; border:1px solid var(--glass-border)!important; border-radius:10px!important; padding:.4rem!important; min-width:220px; }
.glass-dropdown .dropdown-item { color:var(--text-secondary); font-size:.85rem; border-radius:6px; padding:.45rem .75rem; }
.glass-dropdown .dropdown-item:hover { background:rgba(255,255,255,.06); color:var(--text-primary); }
.glass-dropdown .dropdown-header { color:var(--text-muted); font-size:.75rem; padding:.5rem .75rem .25rem; }
.glass-dropdown .dropdown-divider { border-color:var(--glass-border); margin:.3rem 0; }

/* Topbar */
.topbar { display:flex; align-items:center; justify-content:space-between; padding:0 1.5rem; height:64px; background:var(--glass-bg); border-bottom:1px solid var(--glass-border); position:sticky; top:0; z-index:100; gap:1rem; }
.topbar-left { display:flex; align-items:center; gap:.75rem; min-width:0; }
.breadcrumb-wrap { min-width:0; }
.page-title { font-size:.95rem; font-weight:600; color:var(--text-primary); margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.breadcrumb-list { display:flex; align-items:center; gap:.3rem; list-style:none; margin:0; padding:0; flex-wrap:wrap; }
.breadcrumb-list li { font-size:.72rem; color:var(--text-muted); }
.breadcrumb-list li::before { content:'/'; margin-right:.3rem; }
.breadcrumb-list li:first-child::before { display:none; }
.breadcrumb-list a { color:var(--text-muted); text-decoration:none; }
.breadcrumb-list a:hover { color:var(--primary); }
.breadcrumb-list .active { color:var(--text-secondary); }
.topbar-right { display:flex; align-items:center; gap:.75rem; flex-shrink:0; }
.topbar-date { font-size:.78rem; color:var(--text-muted); white-space:nowrap; }
.topbar-divider { width:1px; height:24px; background:var(--glass-border); }
.topbar-user { display:flex; align-items:center; gap:.5rem; background:none; border:none; cursor:pointer; padding:.3rem .5rem; border-radius:8px; transition:background .15s; }
.topbar-user:hover { background:rgba(255,255,255,.06); }
.topbar-avatar { width:32px; height:32px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; color:#fff; flex-shrink:0; }
.topbar-user-info { display:flex; flex-direction:column; align-items:flex-start; }
.topbar-name { font-size:.82rem; color:var(--text-primary); font-weight:500; line-height:1.2; }
.topbar-role { font-size:.68rem; color:var(--text-muted); line-height:1; }
.sidebar-toggle { background:none; border:none; color:var(--text-muted); font-size:1.2rem; cursor:pointer; padding:.3rem; border-radius:6px; transition:all .15s; line-height:1; display:flex; align-items:center; }
.sidebar-toggle:hover { background:rgba(255,255,255,.08); color:var(--text-primary); }

/* Sidebar */
.sidebar { width:var(--sidebar-width,250px); background:var(--bg-surface); border-right:1px solid var(--glass-border); display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:200; transition:transform .25s ease,width .25s ease; overflow:hidden; }
.main-content { margin-left:var(--sidebar-width,250px); min-height:100vh; transition:margin-left .25s ease; display:flex; flex-direction:column; }
.page-content { flex:1; padding:1.5rem; }
.sidebar-header { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.25rem; border-bottom:1px solid var(--glass-border); }
.sidebar-brand { display:flex; align-items:center; gap:.75rem; overflow:hidden; }
.brand-icon { width:36px; height:36px; background:var(--gradient-primary); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.1rem; color:#fff; flex-shrink:0; }
.brand-logo { width:36px; height:36px; object-fit:contain; flex-shrink:0; }
.brand-text { display:flex; flex-direction:column; min-width:0; }
.brand-name { font-size:.95rem; font-weight:700; color:var(--text-primary); white-space:nowrap; }
.brand-tagline { font-size:.65rem; color:var(--text-muted); white-space:nowrap; }
.sidebar-close { background:none; border:none; color:var(--text-muted); font-size:1rem; cursor:pointer; padding:.2rem; border-radius:4px; }
.sidebar-search { padding:.75rem 1rem; border-bottom:1px solid var(--glass-border); }
.search-input-wrap { position:relative; }
.sidebar-search-input { width:100%; background:var(--input-bg); border:1px solid var(--input-border); border-radius:8px; color:var(--text-primary); padding:.4rem .75rem .4rem 2rem; font-family:inherit; font-size:.8rem; }
.sidebar-search-input:focus { outline:none; border-color:var(--primary); }
.search-icon { position:absolute; left:.6rem; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:.75rem; pointer-events:none; }
.sidebar-nav { flex:1; overflow-y:auto; padding:.5rem 0; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.1) transparent; }
.nav-section { padding:.4rem 0; }
.nav-label { display:block; font-size:.65rem; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; padding:.4rem 1.25rem .2rem; }
.nav-item { display:flex; align-items:center; gap:.6rem; padding:.55rem 1.25rem; text-decoration:none; color:var(--text-muted); border-radius:0; transition:all .15s; position:relative; font-size:.85rem; }
.nav-item:hover { background:rgba(255,255,255,.05); color:var(--text-secondary); }
.nav-item.active { color:var(--primary); background:rgba(91,184,224,.08); }
.nav-item.active::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--gradient-primary); border-radius:0 3px 3px 0; }
.nav-icon { width:20px; text-align:center; font-size:1rem; flex-shrink:0; }
.sidebar-footer { border-top:1px solid var(--glass-border); padding:.75rem 1rem; }
.user-card { display:flex; align-items:center; gap:.6rem; }
.user-avatar { width:32px; height:32px; border-radius:50%; background:var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; color:#fff; flex-shrink:0; }
.user-info { flex:1; min-width:0; }
.user-name { display:block; font-size:.82rem; font-weight:500; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-role { display:block; font-size:.68rem; color:var(--text-muted); }
.logout-btn { color:var(--text-muted); font-size:1rem; text-decoration:none; padding:.25rem; border-radius:6px; transition:all .15s; }
.logout-btn:hover { color:var(--danger); background:rgba(239,68,68,.1); }

/* Sidebar collapsed state */
.sidebar-collapsed .sidebar { width:64px; }
.sidebar-collapsed .main-content { margin-left:64px; }
.sidebar-collapsed .brand-text, .sidebar-collapsed .nav-text, .sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-search, .sidebar-collapsed .user-info, .sidebar-collapsed .logout-btn,
.sidebar-collapsed .sidebar-footer .user-name, .sidebar-collapsed .sidebar-footer .user-role { display:none; }
.sidebar-collapsed .nav-item { justify-content:center; padding:.6rem; }
.sidebar-collapsed .nav-icon { width:auto; font-size:1.1rem; }
.sidebar-collapsed .user-card { justify-content:center; }

/* Mobile sidebar */
@media (max-width:991px) {
    .sidebar { transform:translateX(-100%); }
    .main-content { margin-left:0!important; }
    .sidebar-mobile-open .sidebar { transform:translateX(0); }
    .sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:199; }
    .sidebar-overlay.active { display:block; }
    .topbar-date { display:none; }
}

/* Dashboard specific */
.dashboard-page { display:flex; flex-direction:column; gap:1.5rem; }
.dashboard-page .row { margin:0; }

/* Responsive */
@media (max-width:768px) {
    .stats-grid { grid-template-columns:1fr 1fr; }
    .page-content { padding:1rem; }
    .page-header { flex-direction:column; align-items:flex-start; }
    .payroll-summary-bar { flex-wrap:wrap; gap:.5rem; }
    .psb-divider { display:none; }
    .detail-grid { grid-template-columns:1fr; }
    .report-mini-stats { gap:.75rem; }
}

/* ─── PDF Upload Zone ──────────────────────────────────────── */
.pdf-upload-zone {
    position: relative;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--glass-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}
.pdf-upload-zone:hover,
.pdf-upload-zone.dragging {
    border-color: var(--primary);
    background: rgba(91,184,224,.06);
}
.pdf-upload-zone.has-file  { border-color: #22c55e; background: rgba(34,197,94,.06); }
.pdf-upload-zone.is-invalid-zone { border-color: var(--danger); background: rgba(239,68,68,.06); }
.pdf-upload-icon { font-size: 2rem; color: #ef4444; line-height: 1; }
.pdf-upload-zone.has-file .pdf-upload-icon { color: #22c55e; }
.pdf-upload-text { display: flex; flex-direction: column; gap: .15rem; }
.pdf-upload-hint { font-size: .85rem; color: var(--text-secondary); font-weight: 500; }
.pdf-upload-sub  { font-size: .75rem; color: var(--text-muted); }
.pdf-upload-name { font-size: .85rem; color: #22c55e; font-weight: 500; }
.pdf-upload-error{ font-size: .85rem; color: var(--danger); font-weight: 500; }
.pdf-file-input  { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* Current attachment bar */
.current-attachment-bar {
    display: flex;
    align-items: center;
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.25);
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .85rem;
    color: var(--text-secondary);
}

/* ================================================================
   LIGHT THEME OVERRIDES
   Overrides any remaining dark-theme values throughout the file
   ================================================================ */

/* ── Base ─────────────────────────────────────────────────────── */
html[data-theme="dark"] { color-scheme: light; }

body {
  background: #f0f4f8 !important;
  color: #0f172a !important;
}

/* ── Topbar ───────────────────────────────────────────────────── */
.topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
.topbar .page-title    { color: #0f172a !important; }
.topbar .topbar-date   { color: #64748b !important; }
.topbar-divider        { background: #e2e8f0 !important; }
.topbar-name           { color: #0f172a !important; }
.topbar-role           { color: #64748b !important; }
.topbar-user:hover     { background: #f1f5f9 !important; }
.breadcrumb-list a     { color: #64748b !important; }
.breadcrumb-list .active { color: #0284c7 !important; }
.sidebar-toggle        { color: #475569 !important; }
.sidebar-toggle:hover  { background: #f1f5f9 !important; color: #0284c7 !important; }
.topbar-avatar         { background: linear-gradient(135deg,#0284c7,#0369a1) !important; }

/* ── Cards ────────────────────────────────────────────────────── */
.card-glass {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04) !important;
}
.card-glass-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.card-glass-title  { color: #0f172a !important; }
.card-glass-footer { border-top: 1px solid #e2e8f0 !important; }

/* ── Page content background ──────────────────────────────────── */
.page-content      { background: transparent !important; }
.main-content      { background: #f0f4f8 !important; }

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
.stat-label  { color: #64748b !important; }
.stat-value  { color: #0f172a !important; }
.stat-trend  { color: #64748b !important; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-premium th   { color: #475569 !important; border-bottom: 2px solid #e2e8f0 !important; }
.table-premium td   { color: #334155 !important; border-bottom: 1px solid #f1f5f9 !important; }
.table-premium tbody tr:hover { background: #f8fafc !important; }
.fw-500 { color: #0f172a !important; }

/* ── Sidebar (keep dark) ──────────────────────────────────────── */
.sidebar                    { background: #1e293b !important; border-right: 1px solid #334155 !important; }
.sidebar-header             { border-bottom: 1px solid #334155 !important; }
.sidebar-search             { border-bottom: 1px solid #334155 !important; }
.sidebar-search-input       { background: rgba(255,255,255,0.06) !important; border-color: #334155 !important; color: #e2e8f0 !important; }
.sidebar-search-input::placeholder { color: #64748b !important; }
.nav-label                  { color: #64748b !important; }
.nav-item                   { color: #94a3b8 !important; }
.nav-item:hover             { background: rgba(255,255,255,0.06) !important; color: #e2e8f0 !important; }
.nav-item.active            { background: rgba(2,132,199,0.15) !important; color: #38bdf8 !important; }
.nav-item.active::before    { background: linear-gradient(180deg,#0284c7,#38bdf8) !important; }
.brand-name                 { color: #f1f5f9 !important; }
.brand-tagline              { color: #64748b !important; }
.user-name                  { color: #e2e8f0 !important; }
.user-role                  { color: #64748b !important; }
.logout-btn                 { color: #64748b !important; }
.logout-btn:hover           { color: #ef4444 !important; background: rgba(239,68,68,0.10) !important; }
.sidebar-footer             { border-top: 1px solid #334155 !important; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-control-custom {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #0f172a !important;
}
.form-control-custom:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2,132,199,0.12) !important;
}
.form-control-custom::placeholder { color: #94a3b8 !important; }
.form-label-custom { color: #374151 !important; }
.form-select-sm-custom,
.form-control-sm-custom {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #0f172a !important;
}
select.form-control-custom,
select.form-select-sm-custom { background-color: #ffffff !important; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary-custom    { background: linear-gradient(135deg,#0284c7,#0369a1) !important; color: #fff !important; }
.btn-primary-custom:hover { opacity: 0.90 !important; color: #fff !important; }
.btn-outline-custom    { background: #ffffff !important; border: 1px solid #d1d5db !important; color: #374151 !important; }
.btn-outline-custom:hover { border-color: #0284c7 !important; color: #0284c7 !important; background: #f0f9ff !important; }
.btn-filter            { background: #eff6ff !important; border-color: #0284c7 !important; color: #0284c7 !important; }
.btn-link-sm           { color: #0284c7 !important; }
.btn-success-custom    { background: #16a34a !important; }
.btn-danger-custom     { background: #dc2626 !important; }

/* ── Dropdowns ────────────────────────────────────────────────── */
.glass-dropdown {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important;
}
.glass-dropdown .dropdown-item       { color: #374151 !important; }
.glass-dropdown .dropdown-item:hover { background: #f0f9ff !important; color: #0284c7 !important; }
.glass-dropdown .dropdown-header     { color: #64748b !important; }
.glass-dropdown .dropdown-divider    { border-color: #e2e8f0 !important; }

/* ── Mini stats ───────────────────────────────────────────────── */
.mini-stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
.mini-stat-label { color: #64748b !important; }
.mini-stat-value { color: #0f172a !important; }

/* ── Employee/checkin cells ───────────────────────────────────── */
.emp-name       { color: #0f172a !important; }
.emp-id         { color: #64748b !important; }
.checkin-name   { color: #0f172a !important; }
.checkin-dept   { color: #64748b !important; }
.top-name       { color: #0f172a !important; }
.top-dept       { color: #64748b !important; }
.holiday-name   { color: #0f172a !important; }
.holiday-range  { color: #64748b !important; }
.device-name    { color: #0f172a !important; }
.device-serial  { color: #64748b !important; }
.date-full      { color: #0f172a !important; }
.date-day       { color: #64748b !important; }
.text-muted     { color: #64748b !important; }

/* ── Detail grid ──────────────────────────────────────────────── */
.detail-label  { color: #64748b !important; }
.detail-value  { color: #0f172a !important; }
.detail-item   { border-bottom: 1px solid #f1f5f9 !important; }
.info-label    { color: #64748b !important; }
.info-value    { color: #0f172a !important; }
.info-item     { border-bottom: 1px solid #f1f5f9 !important; }

/* ── Payroll summary bar ──────────────────────────────────────── */
.payroll-summary-bar  { background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; }
.psb-label  { color: #64748b !important; }
.psb-value  { color: #0f172a !important; }
.psb-divider{ background: #e2e8f0 !important; }

/* ── Payroll formula box ──────────────────────────────────────── */
.payroll-formula-box { background: #f8fafc !important; border-color: #e2e8f0 !important; }
.formula-item        { color: #374151 !important; border-bottom: 1px solid #f1f5f9 !important; }
.formula-item--highlight { background: #eff6ff !important; color: #0f172a !important; }

/* ── Payroll mini cards ───────────────────────────────────────── */
.payroll-mini-card { background: #f8fafc !important; border-color: #e2e8f0 !important; }
.pmini-label       { color: #64748b !important; }
.pmini-value       { color: #0f172a !important; }

/* ── Report cards ─────────────────────────────────────────────── */
.report-card { background: #ffffff !important; border-color: #e2e8f0 !important; }
.report-card:hover { border-color: #0284c7 !important; box-shadow: 0 8px 24px rgba(2,132,199,0.12) !important; }
.report-card h6 { color: #0f172a !important; }
.report-card p  { color: #64748b !important; }
.report-badge   { background: #eff6ff !important; color: #0284c7 !important; }

/* ── Device cards ─────────────────────────────────────────────── */
.device-card           { background: #ffffff !important; border-color: #e2e8f0 !important; }
.device-card:hover     { border-color: #0284c7 !important; }
.btn-device-action     { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #475569 !important; }
.btn-device-action:hover { border-color: #0284c7 !important; color: #0284c7 !important; }
.info-box              { background: #f8fafc !important; border-color: #e2e8f0 !important; }
.info-box-label        { color: #64748b !important; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge-success  { background: #dcfce7 !important; color: #15803d !important; }
.badge-danger   { background: #fee2e2 !important; color: #b91c1c !important; }
.badge-warning  { background: #fef3c7 !important; color: #b45309 !important; }
.badge-primary  { background: #dbeafe !important; color: #1d4ed8 !important; }
.badge-info     { background: #e0f2fe !important; color: #0369a1 !important; }
.badge-secondary{ background: #f1f5f9 !important; color: #64748b !important; }

/* ── Empty states ─────────────────────────────────────────────── */
.empty-state h6     { color: #374151 !important; }
.empty-state p      { color: #64748b !important; }
.empty-state-sm p   { color: #64748b !important; }

/* ── Calendar ─────────────────────────────────────────────────── */
.att-calendar .cal-cell  { background: #f8fafc !important; }
.cal-header-cell          { color: #475569 !important; }
.cal-day-num              { color: #475569 !important; }
.cal-future               { opacity: 0.4 !important; }
.cal-off .cal-day-num     { color: #cbd5e1 !important; }
.cal-month-label          { color: #0f172a !important; }
.legend-item              { color: #64748b !important; }

/* ── Pagination ───────────────────────────────────────────────── */
.page-item .page-link {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
.page-item.active .page-link  { background: linear-gradient(135deg,#0284c7,#0369a1) !important; color: #fff !important; border-color: transparent !important; }
.page-item .page-link:hover   { border-color: #0284c7 !important; color: #0284c7 !important; background: #eff6ff !important; }

/* ── Settings dept list ───────────────────────────────────────── */
.dept-item         { border-bottom: 1px solid #f1f5f9 !important; color: #334155 !important; }
.day-check         { background: #f8fafc !important; border-color: #d1d5db !important; color: #475569 !important; }
.day-check--active { background: #eff6ff !important; border-color: #0284c7 !important; color: #0284c7 !important; }

/* ── Corrections ──────────────────────────────────────────────── */
.info-alert { background: #eff6ff !important; border-color: rgba(2,132,199,0.25) !important; color: #1e40af !important; }
.info-alert i { color: #0284c7 !important; }

/* ── Payslip ──────────────────────────────────────────────────── */
.payslip-header     { border-bottom: 2px solid #0284c7 !important; }
.payslip-org h5     { color: #0f172a !important; }
.payslip-org p      { color: #64748b !important; }
.payslip-title h4   { color: #0284c7 !important; }
.payslip-title p    { color: #64748b !important; }
.pe-label           { color: #64748b !important; }
.pe-value           { color: #0f172a !important; }
.ps-section table td{ color: #334155 !important; }
.payslip-footer     { color: #94a3b8 !important; border-top: 1px solid #e2e8f0 !important; }
.payslip-emp        { border-bottom: 1px solid #e2e8f0 !important; }

/* ── Auth / Login page ────────────────────────────────────────── */
.auth-body { background: #f0f4f8 !important; }
.auth-bg-orb { opacity: 0.08 !important; }
.orb-1 { background: #0284c7 !important; }
.orb-2 { background: #6366f1 !important; }
.orb-3 { background: #0284c7 !important; }

.auth-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10) !important;
  width: 100%;
  max-width: 440px;
}

/* Fix login logo/text overlap — stack them vertically with proper spacing */
.auth-logo {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 0.75rem !important;
  margin-bottom: 1.75rem !important;
}
.auth-logo-icon {
  width: 60px !important;
  height: 60px !important;
  background: linear-gradient(135deg,#0284c7,#0369a1) !important;
  border-radius: 16px !important;
  font-size: 1.6rem !important;
  flex-shrink: 0 !important;
}
.auth-logo-text { text-align: center !important; }
.auth-logo-text h1 { font-size: 1.15rem !important; color: #0f172a !important; font-weight: 700 !important; margin: 0 !important; }
.auth-logo-text p  { font-size: 0.8rem !important; color: #64748b !important; margin: 0 !important; }

.form-control-custom { background: #f8fafc !important; }
.input-icon { color: #94a3b8 !important; }
.input-icon-right { color: #94a3b8 !important; }

.btn-auth {
  background: linear-gradient(135deg,#0284c7,#0369a1) !important;
  box-shadow: 0 4px 16px rgba(2,132,199,0.25) !important;
}
.btn-auth:hover { box-shadow: 0 6px 20px rgba(2,132,199,0.35) !important; }

.auth-footer p { color: #94a3b8 !important; }
.forgot-link   { color: #0284c7 !important; }
.custom-check  { color: #475569 !important; }

/* ── Profile/upload areas ─────────────────────────────────────── */
.photo-preview      { background: #f1f5f9 !important; border-color: #d1d5db !important; color: #94a3b8 !important; }
.btn-upload-photo   { background: #eff6ff !important; border-color: rgba(2,132,199,0.3) !important; color: #0284c7 !important; }
.btn-upload-photo:hover { background: #dbeafe !important; }
.logo-placeholder   { background: #f1f5f9 !important; border-color: #d1d5db !important; color: #94a3b8 !important; }

/* ── PDF upload zone ──────────────────────────────────────────── */
.pdf-upload-zone      { background: #f8fafc !important; border-color: #d1d5db !important; }
.pdf-upload-zone:hover { border-color: #0284c7 !important; background: #f0f9ff !important; }
.pdf-upload-zone.has-file { background: #f0fdf4 !important; border-color: #16a34a !important; }
.pdf-upload-zone.is-invalid-zone { background: #fef2f2 !important; border-color: #dc2626 !important; }
.pdf-upload-hint      { color: #374151 !important; }
.pdf-upload-sub       { color: #94a3b8 !important; }
.current-attachment-bar { background: #f0fdf4 !important; border-color: rgba(22,163,74,0.25) !important; }

/* ── Toggle badge ─────────────────────────────────────────────── */
.btn-toggle-badge { cursor: pointer; border: none; }

/* ── Print ────────────────────────────────────────────────────── */
@media print {
  body { background: #ffffff !important; color: #000 !important; }
  .sidebar, .topbar, .page-actions, .btn { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .card-glass { box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
}

/* ── Scrollbar (light) ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ================================================================
   AUTH PAGE — self-contained, no conflicts with old .auth-* classes
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f4f8 50%, #eef2f7 100%);
}

.auth-page .auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

/* Brand block — stacked, centered */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}
.auth-brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(2,132,199,0.25);
}
.auth-brand-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.auth-brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.auth-brand-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

/* Fields */
.auth-field {
  margin-bottom: 1.1rem;
}
.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.4rem;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 2.4rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.auth-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2,132,199,0.12);
  background: #ffffff;
}
.auth-input--error {
  border-color: #dc2626;
  background: #fff8f8;
}
.auth-toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
}
.auth-toggle-pass:hover { color: #475569; }
.auth-error {
  font-size: 0.77rem;
  color: #dc2626;
  margin-top: 0.3rem;
}

/* Row: remember + forgot */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0284c7;
}
.auth-forgot {
  font-size: 0.83rem;
  color: #0284c7;
  text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 0.7rem;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 4px 14px rgba(2,132,199,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.auth-submit:hover    { opacity: 0.92; transform: translateY(-1px); }
.auth-submit:active   { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Copyright */
.auth-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 1.5rem 0 0;
}

/* ================================================================
   LIGHT THEME — base overrides
   ================================================================ */
body { background: #f0f4f8 !important; color: #0f172a !important; }

/* ── Remove ALL blur effects — causes mobile render issues ── */
* { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ── Topbar ── */
.topbar { background: #ffffff !important; border-bottom: 1px solid #e2e8f0 !important; box-shadow: 0 1px 4px rgba(0,0,0,.06) !important; }
.topbar .page-title { color: #0f172a !important; }
.sidebar-toggle { position: static !important; top: auto !important; left: auto !important;
  transform: none !important; width: 36px !important; height: 36px !important;
  background: transparent !important; border: none !important; border-radius: 8px !important;
  box-shadow: none !important; color: #475569 !important; font-size: 1.25rem !important;
  cursor: pointer !important; display: flex !important; align-items: center !important;
  justify-content: center !important; flex-shrink: 0 !important; }
.sidebar-toggle:hover { background: #f1f5f9 !important; color: #0284c7 !important; }

/* ── Cards ── */
.card-glass { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04) !important; }
.card-glass-header { background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; }
.card-glass-title { color: #0f172a !important; }
.main-content { background: #f0f4f8 !important; }

/* ── Sidebar (dark) ── */
.sidebar { background: #1e293b !important; border-right: 1px solid #334155 !important; }
.sidebar-header { border-bottom: 1px solid #334155 !important; }
.nav-item { color: #94a3b8 !important; }
.nav-item:hover { background: rgba(255,255,255,.06) !important; color: #e2e8f0 !important; }
.nav-item.active { background: rgba(2,132,199,.15) !important; color: #38bdf8 !important; }
.nav-item.active::before { background: linear-gradient(180deg,#0284c7,#38bdf8) !important; }
.brand-name { color: #f1f5f9 !important; }
.user-name { color: #e2e8f0 !important; }
.user-role { color: #64748b !important; }
.logout-btn { color: #64748b !important; }
.logout-btn:hover { color: #ef4444 !important; background: rgba(239,68,68,.1) !important; }
.sidebar-footer { border-top: 1px solid #334155 !important; }

/* ── Mobile sidebar overlay ── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); width: 260px !important; }
  .sidebar-mobile-open .sidebar { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .sidebar-overlay { display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 199; }
  .sidebar-overlay.active { display: block; }
}

/* ── Tables ── */
.table-premium th { color: #475569 !important; border-bottom: 2px solid #e2e8f0 !important; }
.table-premium td { color: #334155 !important; border-bottom: 1px solid #f1f5f9 !important; }
.table-premium tbody tr:hover { background: #f8fafc !important; }

/* ── Forms ── */
.form-control-custom { background: #ffffff !important; border: 1px solid #d1d5db !important; color: #0f172a !important; }
.form-control-custom:focus { border-color: #0284c7 !important; box-shadow: 0 0 0 3px rgba(2,132,199,.12) !important; }
.form-label-custom { color: #374151 !important; }

/* ── Buttons ── */
.btn-primary-custom { background: linear-gradient(135deg,#0284c7,#0369a1) !important; color: #fff !important; }
.btn-outline-custom { background: #ffffff !important; border: 1px solid #d1d5db !important; color: #374151 !important; }
.btn-outline-custom:hover { border-color: #0284c7 !important; color: #0284c7 !important; }

/* ── Badges ── */
.badge-success  { background: #dcfce7 !important; color: #15803d !important; }
.badge-danger   { background: #fee2e2 !important; color: #b91c1c !important; }
.badge-warning  { background: #fef3c7 !important; color: #b45309 !important; }
.badge-primary  { background: #dbeafe !important; color: #1d4ed8 !important; }
.badge-info     { background: #e0f2fe !important; color: #0369a1 !important; }
.badge-secondary{ background: #f1f5f9 !important; color: #64748b !important; }

/* ── Dropdowns ── */
.glass-dropdown { background: #ffffff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 8px 24px rgba(0,0,0,.10) !important; }
.glass-dropdown .dropdown-item { color: #374151 !important; }
.glass-dropdown .dropdown-item:hover { background: #f0f9ff !important; color: #0284c7 !important; }


/* ================================================================
   EMPLOYEE DASHBOARD  (.edb-*)
   Single authoritative block — no duplicates
   ================================================================ */

.edb { display: flex; flex-direction: column; gap: 1rem; }

/* ── ROW 1: Today + Gauge ── */
.edb-row1 {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  align-items: stretch;  /* both cells grow to the tallest item */
}

/* Today card */
.edb-today {
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  height: 100%;       /* fill the grid row height */
  box-sizing: border-box;
}
.edb-today--present { background: linear-gradient(135deg,#0284c7,#0369a1); }
.edb-today--absent  { background: linear-gradient(135deg,#dc2626,#b91c1c); }
.edb-today--leave   { background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.edb-today--holiday { background: linear-gradient(135deg,#d97706,#b45309); }

.edb-today-top {
  display: flex; align-items: center;
  justify-content: space-between; gap: .5rem; flex-wrap: wrap;
}
.edb-today-date { font-size: .82rem; opacity: .85; }
.edb-badge {
  font-size: .75rem; font-weight: 600; padding: .2rem .65rem;
  border-radius: 20px; background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; gap: .3rem;
}
.edb-times {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.edb-time-block { display: flex; align-items: center; gap: .5rem; }
.edb-time-icon  { font-size: 1rem; opacity: .75; }
.edb-time-val   { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.edb-time-lbl   { font-size: .68rem; opacity: .75; margin-top: .1rem; }
.edb-time-sep   { width: 1px; height: 28px; background: rgba(255,255,255,.25); flex-shrink: 0; }
.edb-month-bar  { font-size: .78rem; opacity: .88; }
.edb-bar-track  { height: 4px; background: rgba(255,255,255,.25); border-radius: 3px; margin-top: .35rem; overflow: hidden; }
.edb-bar-fill   { height: 100%; background: rgba(255,255,255,.85); border-radius: 3px; transition: width .5s ease; }

/* ── Attendance Progress Card (replaces gauge) ── */
.edb-pcard {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  height: 100%;       /* fill the grid row height */
  box-sizing: border-box;
}
.edb-pcard-title {
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
}

/* Big percentage */
.edb-pcard-pct {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.edb-pcard-check { font-size: 1.2rem; }
.edb-pcard-sublabel {
  font-size: .75rem;
  color: #94a3b8;
  margin-top: -.35rem;
}

/* Progress bar */
.edb-pcard-bar-wrap { display: flex; flex-direction: column; gap: .3rem; }
.edb-pcard-bar-track {
  position: relative;
  height: 10px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: visible;
}
.edb-pcard-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s ease;
  min-width: 0;
}
/* 75% target marker line */
.edb-pcard-bar-target {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 75%;
  width: 2px;
  background: #f59e0b;
  border-radius: 2px;
}
.edb-pcard-bar-target::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
}
.edb-pcard-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: #94a3b8;
}
.edb-pcard-target-lbl {
  color: #f59e0b;
  font-weight: 600;
}

/* Status message */
.edb-pcard-status {
  font-size: .78rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: 8px;
  line-height: 1.45;
}
.edb-pcard-status--ok   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.edb-pcard-status--warn { background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }

/* Stats grid */
.edb-pcard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .5rem;
  padding-top: .5rem;
  border-top: 1px solid #f1f5f9;
}
.edb-pcard-stat {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
}
.edb-pcard-stat-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.edb-pcard-stat-label { color: #64748b; flex: 1; }
.edb-pcard-stat-val   { font-weight: 700; color: #0f172a; }

/* ── ROW 2: Three equal-height chart/calendar cards ── */
.edb-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.edb-card { display: flex; flex-direction: column; }
.edb-card .card-glass-header { flex-shrink: 0; }

/* Chart canvas container — fixed height, canvas fills it */
.edb-chart-body {
  flex: 1;
  position: relative;
  height: 220px;
  min-height: 220px;
  padding: .75rem !important;
}
.edb-chart-body canvas {
  position: absolute !important;
  top: .75rem !important; right: .75rem !important;
  bottom: .75rem !important; left: .75rem !important;
  width: calc(100% - 1.5rem) !important;
  height: calc(100% - 1.5rem) !important;
}

/* ── Calendar card ── */
.edb-cal-card { min-height: 0; }
.edb-cal-body {
  padding: .75rem !important;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* Day header row — 7 equal columns */
.edb-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.edb-cal-header > div {
  text-align: center;
  font-size: .65rem;
  font-weight: 600;
  color: #64748b;
  padding: .2rem 0;
}

/* Day cell grid — 7 equal columns, auto rows */
.edb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* Individual day cell */
.edb-day {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid transparent;
  cursor: default;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.edb-day-num  { font-size: .7rem; font-weight: 500; color: #475569; line-height: 1; }
.edb-day-icon { font-size: .55rem; font-weight: 700; line-height: 1; }

/* Status variants */
.edb-day--empty   { background: transparent !important; border-color: transparent !important; visibility: hidden; }
.edb-day--off     { background: #f1f5f9 !important; }
.edb-day--off .edb-day-num { color: #cbd5e1 !important; }
.edb-day--future  { background: #f8fafc; opacity: .45; }
.edb-day--future .edb-day-num { color: #94a3b8; }
.edb-day--present { background: #dcfce7 !important; border-color: #86efac !important; }
.edb-day--present .edb-day-num,
.edb-day--present .edb-day-icon { color: #15803d !important; }
.edb-day--absent  { background: #fee2e2 !important; border-color: #fca5a5 !important; }
.edb-day--absent .edb-day-num,
.edb-day--absent .edb-day-icon  { color: #b91c1c !important; }
.edb-day--leave   { background: #dbeafe !important; border-color: #93c5fd !important; }
.edb-day--leave .edb-day-num,
.edb-day--leave .edb-day-icon   { color: #1d4ed8 !important; }
.edb-day--holiday { background: #fef3c7 !important; border-color: #fcd34d !important; }
.edb-day--holiday .edb-day-num,
.edb-day--holiday .edb-day-icon { color: #b45309 !important; }
.edb-day--today   { border: 2px solid #0284c7 !important; box-shadow: 0 0 0 1px rgba(2,132,199,.15) !important; }
.edb-day--today .edb-day-num { color: #0284c7 !important; font-weight: 700 !important; }

/* Calendar label */
.edb-cal-label { font-size: .82rem; font-weight: 600; color: #0f172a; min-width: 110px; text-align: center; }

/* Legend */
.edb-cal-legend {
  display: flex; flex-wrap: wrap;
  gap: .25rem .75rem;
  padding-top: .4rem;
  border-top: 1px solid #f1f5f9;
  font-size: .68rem; color: #64748b;
}
.edb-cal-legend span { display: flex; align-items: center; gap: .3rem; }
.edb-ld { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.edb-ld--present { background: #16a34a; }
.edb-ld--absent  { background: #dc2626; }
.edb-ld--leave   { background: #1d4ed8; }
.edb-ld--holiday { background: #d97706; }
.edb-ld--off     { background: #cbd5e1; }

/* ── ROW 3: Recent leave full width ── */
.edb-row3 { width: 100%; }

/* ================================================================
   RESPONSIVE — Employee Dashboard
   ================================================================ */

/* 1100px — gauge drops below today card, charts go 2-col */
@media (max-width: 1100px) {
  .edb-row1 { grid-template-columns: 1fr; }
  .edb-gauge {
    flex-direction: row; flex-wrap: wrap;
    justify-content: space-between; align-items: flex-start;
  }
  .edb-gauge-svg-wrap { max-width: 160px; }
  .edb-row2 { grid-template-columns: 1fr 1fr; }
  .edb-cal-card { grid-column: span 2; }
}

/* 768px — single column */
@media (max-width: 768px) {
  .edb-row2 { grid-template-columns: 1fr; }
  .edb-cal-card { grid-column: auto; }
  .edb-chart-body { height: 180px; min-height: 180px; }
  /* edb-pcard full width on mobile */
  .edb-times { gap: .75rem; }
  .edb-time-val { font-size: 1rem; }
}

/* 480px — compact */
@media (max-width: 480px) {
  .edb-chart-body { height: 160px; min-height: 160px; }
  .edb-today { padding: .9rem 1rem; }
  .edb-times { gap: .5rem; }
  .edb-time-sep { height: 22px; }
  .edb-day-num { font-size: .6rem; }
}

/* ================================================================
   GENERAL MOBILE IMPROVEMENTS
   ================================================================ */
@media (max-width: 767px) {
  .page-content { padding: .9rem !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: .75rem !important; }
  .stat-value { font-size: 1.4rem !important; }
  .card-glass-header { flex-wrap: wrap; gap: .5rem; }
  .table-premium th, .table-premium td { padding: .5rem .6rem !important; font-size: .78rem !important; }
  .page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .topbar { padding: 0 1rem !important; }
}

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f4f8 50%, #eef2f7 100%);
}
.auth-page .auth-card {
  width: 100%; max-width: 420px; background: #ffffff; border-radius: 20px;
  padding: 2.5rem 2rem; box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  border: 1px solid #e2e8f0;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 2rem; }
.auth-brand-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg,#0284c7,#0369a1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: #fff; margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(2,132,199,.25);
}
.auth-brand-img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 1rem; }
.auth-brand-name { font-size: 1.2rem; font-weight: 700; color: #0f172a; margin: 0 0 .25rem; line-height: 1.3; }
.auth-brand-sub  { font-size: .8rem; color: #64748b; margin: 0; }
.auth-field { margin-bottom: 1.1rem; }
.auth-label { display: block; font-size: .82rem; font-weight: 500; color: #374151; margin-bottom: .4rem; }
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .9rem; pointer-events: none; }
.auth-input {
  width: 100%; padding: .6rem 2.5rem .6rem 2.4rem; border: 1px solid #d1d5db;
  border-radius: 10px; font-family: inherit; font-size: .9rem; color: #0f172a;
  background: #f8fafc; transition: border-color .18s, box-shadow .18s; outline: none;
}
.auth-input:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,.12); background: #ffffff; }
.auth-input--error { border-color: #dc2626; background: #fff8f8; }
.auth-toggle-pass { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94a3b8; cursor: pointer; padding: .25rem; font-size: 1rem; }
.auth-toggle-pass:hover { color: #475569; }
.auth-error { font-size: .77rem; color: #dc2626; margin-top: .3rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.auth-remember { display: flex; align-items: center; gap: .4rem; font-size: .83rem; color: #475569; cursor: pointer; user-select: none; }
.auth-remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: #0284c7; }
.auth-forgot { font-size: .83rem; color: #0284c7; text-decoration: none; }
.auth-forgot:hover { text-decoration: underline; }
.auth-submit {
  width: 100%; padding: .7rem; background: linear-gradient(135deg,#0284c7,#0369a1);
  color: #fff; border: none; border-radius: 10px; font-family: inherit; font-size: .95rem;
  font-weight: 600; cursor: pointer; transition: opacity .18s, transform .18s;
  box-shadow: 0 4px 14px rgba(2,132,199,.30);
  display: flex; align-items: center; justify-content: center; gap: .25rem;
}
.auth-submit:hover { opacity: .92; transform: translateY(-1px); }
.auth-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.auth-copyright { text-align: center; font-size: .75rem; color: #94a3b8; margin: 1.5rem 0 0; }
.auth-info-box { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 12px; padding: 1.25rem; text-align: center; margin-bottom: 1.5rem; }
.auth-info-icon { font-size: 2.5rem; color: #0284c7; margin-bottom: .75rem; }
.auth-info-text { font-size: .875rem; color: #374151; margin: 0 0 .75rem; line-height: 1.6; }
.auth-info-contact { font-size: .82rem; color: #0369a1; margin: 0; }

/* ================================================================
   PDF UPLOAD ZONE
   ================================================================ */
.pdf-upload-zone {
  position: relative; border: 2px dashed #d1d5db; border-radius: 12px;
  padding: 1.75rem 1.25rem; text-align: center; cursor: pointer;
  transition: all .2s; background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.pdf-upload-zone:hover, .pdf-upload-zone.dragging { border-color: #0284c7; background: rgba(2,132,199,.04); }
.pdf-upload-zone.has-file  { border-color: #22c55e; background: rgba(34,197,94,.04); }
.pdf-upload-zone.is-invalid-zone { border-color: #dc2626; background: rgba(239,68,68,.04); }
.pdf-upload-icon { font-size: 2rem; color: #ef4444; line-height: 1; }
.pdf-upload-zone.has-file .pdf-upload-icon { color: #22c55e; }
.pdf-upload-text  { display: flex; flex-direction: column; gap: .15rem; }
.pdf-upload-hint  { font-size: .85rem; color: #374151; font-weight: 500; }
.pdf-upload-sub   { font-size: .75rem; color: #94a3b8; }
.pdf-upload-name  { font-size: .85rem; color: #22c55e; font-weight: 500; }
.pdf-upload-error { font-size: .85rem; color: #dc2626; font-weight: 500; }
.pdf-file-input   { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.current-attachment-bar {
  display: flex; align-items: center; background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25); border-radius: 8px;
  padding: .5rem .75rem; font-size: .85rem; color: #374151;
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }