/* Master Attendance System - Main Stylesheet */

:root {
  /* Brand */
  --primary:        #4f46e5;
  --primary-hover:  #4338ca;
  --primary-light:  #eef2ff;
  --primary-glow:   rgba(79, 70, 229, 0.18);

  /* Sidebar */
  --sidebar-bg:         #0f172a;
  --sidebar-hover-bg:   rgba(255,255,255,0.06);
  --sidebar-active-bg:  rgba(79, 70, 229, 0.22);
  --sidebar-text:       rgba(255,255,255,0.55);
  --sidebar-text-hover: #ffffff;
  --sidebar-accent:     #4f46e5;
  --sidebar-collapsed:  64px;
  --sidebar-expanded:   230px;
  --sidebar-transition: width 0.22s cubic-bezier(.4,0,.2,1), opacity 0.18s ease;

  /* Surface */
  --bg-body:    #f1f5f9;
  --bg-card:    #ffffff;
  --bg-dark:    #0f172a;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --text-white:     #ffffff;

  /* Border */
  --border:       #e2e8f0;
  --border-light: #f1f5f9;

  /* Status */
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #06b6d4;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  /* Transition */
  --transition: all 0.18s ease;

  /* Secondary color */
  --secondary:        #64748b;
  --secondary-hover:  #475569;
  --secondary-light:  #f1f5f9;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Font sizes */
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;

  /* Font weights */
  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  /* Legacy aliases (keep for backward compat) */
  --primary-color:    #4f46e5;
  --primary-hover:    #4338ca;
  --primary-light:    #eef2ff;
  --secondary-color:  #64748b;
  --success-color:    #10b981;
  --success-hover:    #059669;
  --success-light:    #d1fae5;
  --warning-color:    #f59e0b;
  --warning-hover:    #d97706;
  --warning-light:    #fef3c7;
  --danger-color:     #ef4444;
  --danger-hover:     #dc2626;
  --danger-light:     #fee2e2;
  --info-color:       #06b6d4;
  --info-hover:       #0891b2;
  --info-light:       #cffafe;
  --white:            #ffffff;
  --bg-primary:       #f1f5f9;
  --bg-secondary:     #e2e8f0;
  --border-color:     #e2e8f0;
  --box-shadow:       0 4px 6px -1px rgba(0,0,0,0.07);
  --box-shadow-sm:    0 1px 3px rgba(0,0,0,0.06);
  --box-shadow-lg:    0 10px 15px -3px rgba(0,0,0,0.08);
  --border-radius:    10px;
  --border-radius-sm: 6px;
  --border-radius-lg: 14px;
}

/* ─── Reset / Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-expanded);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 0 12px rgba(0,0,0,0.18);
}

/* Brand */
.sidebar-brand {
  height: 60px;
  padding: 0 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-brand .brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
}

.sidebar-brand .brand-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.sidebar-brand .brand-text {
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Nav */
.sidebar-nav {
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-nav .nav-section {
  padding: 14px 0 4px 18px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  opacity: 1;
}

.sidebar-nav .nav-item { list-style: none; }

.sidebar-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 0 16px;
  height: 44px;
  color: var(--sidebar-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 0;
}

.sidebar-nav .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--sidebar-accent);
  border-radius: 0 3px 3px 0;
  transition: height 0.18s ease;
}

.sidebar-nav .nav-link:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover-bg);
}

.sidebar-nav .nav-link.active {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-active-bg);
}

.sidebar-nav .nav-link.active::before {
  height: 28px;
}

.sidebar-nav .nav-link .nav-icon {
  font-size: 1.05rem;
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav .nav-link .nav-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 1;
}

/* Tooltip on collapsed - hidden since sidebar is always expanded */
.sidebar-nav .nav-link .nav-tooltip {
  display: none;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  margin-top: auto;
}

.sidebar-footer .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 0 16px;
  height: 44px;
  color: var(--sidebar-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 0;
  cursor: pointer;
}

.sidebar-footer .nav-link:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover-bg);
}

.sidebar-footer .nav-link .nav-icon {
  font-size: 1.05rem;
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer .nav-link .nav-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 1;
}

.sidebar-footer .nav-link .nav-tooltip {
  display: none;
}

/* ─── Main Content ──────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-expanded);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top Navbar ────────────────────────────────────────────────────────────── */
.top-navbar {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.top-navbar .page-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.top-navbar .nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-navbar .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ─── Page Content ──────────────────────────────────────────────────────────── */
.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-body { padding: 1.25rem; }
.card-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
}

/* ─── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.danger  { background: #fee2e2; color: var(--danger); }
.stat-icon.info    { background: #cffafe; color: var(--info); }

.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

/* Focus accessibility */
.btn:focus-visible {
  outline: 3px solid var(--primary-glow);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--secondary-hover);
  border-color: var(--secondary-hover);
  color: #fff;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-success:active { transform: translateY(0); }

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.btn-danger:active { transform: translateY(0); }

.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.btn-info {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}
.btn-info:hover {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: var(--danger);
}
.btn-outline-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.btn-outline-success {
  color: var(--success);
  border-color: var(--success);
}
.btn-outline-success:hover {
  background: var(--success);
  border-color: var(--success);
}

.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.65rem; }
.btn-lg { font-size: 1rem; padding: 0.65rem 1.25rem; }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

/* High-contrast focus for keyboard navigation */
.form-control:focus-visible, .form-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--danger);
}
.form-control.is-invalid:focus, .form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.form-control.is-valid, .form-select.is-valid {
  border-color: var(--success);
}
.form-control.is-valid:focus, .form-select.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.invalid-feedback {
  font-size: 0.78rem;
  color: var(--danger);
}

.input-group .form-control:focus { z-index: 3; }

/* Checkbox & Radio accessibility */
.form-check-input:focus {
  box-shadow: 0 0 0 3px var(--primary-glow);
  border-color: var(--primary);
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ─── Tables ────────────────────────────────────────────────────────────────── */
.table {
  font-size: 0.875rem;
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-body);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  transition: background 0.12s ease;
}

.table tbody tr:hover td {
  background: var(--bg-body);
}

.table tbody tr:last-child td { border-bottom: none; }

/* Responsive table wrapper */
.table-responsive {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.table-responsive .table { margin-bottom: 0; }

/* Action buttons in table */
.table .btn-sm {
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

/* Sortable column header */
.table thead th.sortable {
  cursor: pointer;
  user-select: none;
}
.table thead th.sortable:hover { color: var(--text-secondary); }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
}

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1055;
}

.toast {
  min-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--info); }

/* ─── Status Badges ─────────────────────────────────────────────────────────── */
.status-present   { background: #d1fae5; color: #065f46; }
.status-absent    { background: #fee2e2; color: #991b1b; }
.status-late      { background: #fef3c7; color: #92400e; }
.status-half-day  { background: #cffafe; color: #164e63; }
.status-week-off  { background: #f1f5f9; color: #475569; }
.status-paid-leave{ background: #eef2ff; color: #3730a3; }

/* ─── Page Header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* ─── PWA / Employee ────────────────────────────────────────────────────────── */
.pwa-header {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1rem;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: var(--shadow);
}

.pwa-content {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.bottom-nav .nav-item { flex: 1; }

.bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  gap: 2px;
  transition: var(--transition);
}

.bottom-nav .nav-link i { font-size: 1.3rem; }

.bottom-nav .nav-link.active,
.bottom-nav .nav-link:hover { color: var(--primary); }

/* ─── Check-in/out buttons ──────────────────────────────────────────────────── */
.check-in-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  color: #fff;
  font-weight: 600;
  transition: var(--transition);
}

.check-in-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.check-out-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--danger), #dc2626);
  border: none;
  color: #fff;
  font-weight: 600;
  transition: var(--transition);
}

.check-out-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ─── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    transform: translateX(-100%);
  }

  .sidebar.show {
    width: var(--sidebar-expanded);
    transform: translateX(0);
  }

  .main-content { margin-left: 0; }

  .page-content { padding: 1rem; }
}

/* ─── Links ─────────────────────────────────────────────────────────────────── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--primary-hover); }
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Modals ────────────────────────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close:focus {
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ─── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  gap: 3px;
}

.page-link {
  border-radius: var(--radius-sm) !important;
  border-color: var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  transition: var(--transition);
}

.page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.page-link:focus {
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-item.disabled .page-link {
  color: var(--text-muted);
  background: transparent;
}

/* ─── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: none;
  border-left: 4px solid transparent;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left-color: var(--success);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left-color: var(--danger);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left-color: var(--warning);
}

.alert-info {
  background: #cffafe;
  color: #164e63;
  border-left-color: var(--info);
}

/* ─── Dropdowns ─────────────────────────────────────────────────────────────── */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  color: var(--text-primary);
  transition: background 0.12s ease;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item:focus {
  background: var(--primary-light);
  color: var(--primary);
  outline: none;
}

/* ─── Accessibility Utilities ───────────────────────────────────────────────── */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast focus ring for all interactive elements */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ─── Utility Classes ───────────────────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.text-success-custom { color: var(--success) !important; }
.text-danger-custom  { color: var(--danger) !important; }
.text-warning-custom { color: var(--warning) !important; }
.text-muted-custom   { color: var(--text-muted) !important; }

.bg-primary-light { background: var(--primary-light) !important; }
.bg-success-light { background: #d1fae5 !important; }
.bg-danger-light  { background: #fee2e2 !important; }
.bg-warning-light { background: #fef3c7 !important; }
.bg-info-light    { background: #cffafe !important; }

.rounded-custom    { border-radius: var(--radius) !important; }
.rounded-custom-sm { border-radius: var(--radius-sm) !important; }
.rounded-custom-lg { border-radius: var(--radius-lg) !important; }

.shadow-custom    { box-shadow: var(--shadow) !important; }
.shadow-custom-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-custom-lg { box-shadow: var(--shadow-lg) !important; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: 0.4; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; margin: 0; }
