/* ============================================================
   HRIS Web Dashboard — Design System (app.css)
   Minimalis + Modern — No Tailwind, Pure CSS
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Primary */
  --primary: #4F46E5;
  --primary-light: #E0E7FF;
  --primary-dark: #3730A3;
  --primary-50: #EEF2FF;

  /* Secondary / Neutral */
  --secondary: #64748B;

  /* Semantic */
  --success: #10B981;
  --success-light: #D1FAE5;
  --success-dark: #065F46;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --warning-dark: #92400E;
  --danger: #F43F5E;
  --danger-light: #FFE4E6;
  --danger-dark: #9F1239;
  --info: #3B82F6;
  --info-light: #DBEAFE;
  --info-dark: #1E40AF;

  /* Backgrounds */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-white: #FFFFFF;

  /* Spacing (4px scale) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Border Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --shadow-btn: 0 4px 14px rgba(79,70,229,0.35);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --content-max: 1280px;

  /* Transition */
  --transition: 150ms ease;
  --transition-md: 250ms ease;
  --transition-lg: 300ms ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.3;
}

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

img { max-width: 100%; display: block; }

/* ============================================================
   3. TYPOGRAPHY UTILITIES
   ============================================================ */
.heading-1 { font-size: 1.75rem; font-weight: 700; }
.heading-2 { font-size: 1.375rem; font-weight: 600; }
.heading-3 { font-size: 1.125rem; font-weight: 600; }
.body-text  { font-size: 0.9375rem; font-weight: 400; }
.caption    { font-size: 0.8125rem; font-weight: 400; color: var(--text-secondary); }
.label-text { font-size: 0.9375rem; font-weight: 500; }
.mono       { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; }

/* ============================================================
   4. LAYOUT — App Shell
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: width var(--transition-md);
  overflow: hidden;
}

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

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-5);
  border-bottom: 1px solid var(--border);
  gap: var(--sp-3);
  flex-shrink: 0;
}

.sidebar-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  white-space: nowrap;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-icon svg { color: white; }

.sidebar-nav {
  flex: 1;
  padding: var(--sp-3) var(--sp-3);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

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

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

.nav-item.active:hover {
  background: var(--primary-light);
}

.nav-item svg,
.nav-item i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-logo {
  display: none;
}

.nav-section {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}

.sidebar.collapsed .nav-section {
  text-align: center;
  font-size: 0;
}

.sidebar.collapsed .nav-section::after {
  content: '···';
  font-size: 0.75rem;
}

.sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-md);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar.collapsed ~ .main-content,
.app-wrapper.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

/* --- Header / Navbar --- */
.header {
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.header-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-toggle:hover { background: var(--bg-secondary); }

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.header-user:hover { background: var(--bg-secondary); }

.header-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.header-user-info { text-align: right; }
.header-user-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.header-user-role { font-size: 0.75rem; color: var(--text-muted); text-transform: capitalize; }

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: var(--sp-2);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all var(--transition);
  cursor: pointer;
}

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

.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-1) 0;
}

/* --- Content Area --- */
.content {
  flex: 1;
  padding: var(--sp-6);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   5. COMPONENTS — Cards
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xs);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
}

.stat-icon.primary   { background: var(--primary-light); color: var(--primary); }
.stat-icon.success   { background: var(--success-light); color: var(--success-dark); }
.stat-icon.warning   { background: var(--warning-light); color: var(--warning-dark); }
.stat-icon.danger    { background: var(--danger-light);  color: var(--danger-dark); }
.stat-icon.info      { background: var(--info-light);    color: var(--info-dark); }

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.75rem;
  margin-top: var(--sp-2);
}

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

/* ============================================================
   6. COMPONENTS — Tables
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--text-secondary);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.data-table tbody td {
  padding: 14px var(--sp-4);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: var(--bg-secondary);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   7. COMPONENTS — Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px 10px;
  border-radius: var(--r-2xl);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-approved, .badge-present, .badge-active, .badge-paid {
  background: var(--success-light);
  color: var(--success-dark);
}

.badge-pending, .badge-late, .badge-draft {
  background: var(--warning-light);
  color: var(--warning-dark);
}

.badge-rejected, .badge-absent, .badge-inactive {
  background: var(--danger-light);
  color: var(--danger-dark);
}

.badge-processed, .badge-info {
  background: var(--info-light);
  color: var(--info-dark);
}

.badge-neutral {
  background: var(--border-light);
  color: var(--text-secondary);
}

/* ============================================================
   8. COMPONENTS — Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-btn);
  color: var(--text-white);
}

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

.btn-danger {
  background: var(--danger-light);
  color: #DC2626;
}
.btn-danger:hover { background: #FECACA; }

.btn-success {
  background: var(--success-light);
  color: var(--success-dark);
}
.btn-success:hover { background: #A7F3D0; }

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

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

.btn-lg {
  padding: 12px 28px;
  font-size: 1rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--r-md);
}

.btn-group {
  display: flex;
  gap: var(--sp-2);
}

/* ============================================================
   9. COMPONENTS — Forms
   ============================================================ */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

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

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

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

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

/* ============================================================
   10. COMPONENTS — Modals
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms ease;
}

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

.modal {
  background: var(--bg-primary);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  max-width: 520px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 200ms ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--sp-1);
  border-radius: var(--r-sm);
  transition: background var(--transition);
}

.modal-close:hover { background: var(--bg-secondary); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* ============================================================
   11. COMPONENTS — Alerts / Flash Messages
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
  font-size: 0.875rem;
  animation: slideDown 250ms ease;
}

.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--success-light); color: var(--success-dark); }
.alert-warning { background: var(--warning-light); color: var(--warning-dark); }
.alert-danger  { background: var(--danger-light);  color: var(--danger-dark); }
.alert-info    { background: var(--info-light);    color: var(--info-dark); }

/* ============================================================
   12. COMPONENTS — Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-top: var(--sp-5);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.pagination a {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pagination a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.pagination .active span {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.pagination .disabled span {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ============================================================
   13. COMPONENTS — Page Header
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   14. COMPONENTS — Search & Filter Bar
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-group {
  display: flex;
  gap: var(--sp-2);
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* ============================================================
   15. COMPONENTS — Empty State
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9375rem;
  max-width: 300px;
}

/* ============================================================
   16. LOGIN PAGE
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #4F46E5 100%);
  padding: var(--sp-4);
}

.login-card {
  background: var(--bg-primary);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-icon svg { color: white; }

.login-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.login-title {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.login-subtitle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================================
   17. UTILITY CLASSES
   ============================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.mt-2   { margin-top: var(--sp-2); }
.mt-4   { margin-top: var(--sp-4); }
.mt-6   { margin-top: var(--sp-6); }
.mb-2   { margin-bottom: var(--sp-2); }
.mb-4   { margin-bottom: var(--sp-4); }
.mb-6   { margin-bottom: var(--sp-6); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 0.8125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.w-full      { width: 100%; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden      { display: none !important; }

/* ============================================================
   18. ANIMATIONS
   ============================================================ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

/* ============================================================
   19. RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .nav-label, .sidebar .sidebar-logo, .sidebar .nav-section { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); }
  .form-row { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    z-index: 50;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar.mobile-open .nav-label,
  .sidebar.mobile-open .sidebar-logo,
  .sidebar.mobile-open .nav-section { display: block; }
  .main-content { margin-left: 0; }
  .content { padding: var(--sp-4); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .toolbar { flex-direction: column; }
  .search-box { max-width: 100%; }
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 45;
}

@media (max-width: 640px) {
  .sidebar.mobile-open ~ .sidebar-overlay {
    display: block;
  }
}

/* Print styles */
@media print {
  .sidebar, .header, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
}
