@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao+Looped:wdth,wght@100,100..900&display=swap');

:root {
  --primary: #1A2CA3;
  --primary-dark: #102080;
  --primary-light: #2D3FBE;
  --primary-50: rgba(26, 44, 163, 0.05);
  --primary-100: rgba(26, 44, 163, 0.1);
  --primary-200: rgba(26, 44, 163, 0.2);
  --accent: #4F6AF5;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Lao Looped', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== LAYOUT ===== */
.app-container { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text { flex: 1; }
.sidebar-logo .logo-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.sidebar-logo .logo-sub { font-size: 11px; opacity: 0.65; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

/* .nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  padding: 12px 20px 6px;
  font-weight: 600;
} */

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }

.nav-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 24px;
  background: white;
  border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--danger); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; min-width: 18px; text-align: center; }

.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 10px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; opacity: 0.6; }

.btn-logout {
  background: none; border: none; color: rgba(255,255,255,0.6);
  cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
  transition: all 0.2s; font-size: 14px;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); color: white; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: white;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.topbar-sub { font-size: 13px; color: var(--gray-500); }

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

.btn-icon {
  width: 36px; height: 36px;
  background: none; border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: var(--gray-600);
  transition: all 0.2s; position: relative;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px;
  background: var(--danger); border-radius: 50%;
  border: 2px solid white;
}

.menu-toggle {
  display: none;
  background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-700);
  padding: 6px;
}

.content-area { padding: 24px; flex: 1; }

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

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

.card-title { font-size: 15px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* ===== STATS CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.stat-icon.blue { background: var(--primary-100); color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red { background: rgba(239,68,68,0.1); color: var(--danger); }

.stat-value { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 3px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  font-family: 'Noto Sans Lao Looped', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: all 0.2s; text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(26,44,163,0.35); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

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

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

.btn-outline { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

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

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Noto Sans Lao Looped', sans-serif;
  font-size: 14px; color: var(--gray-800);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===== CALENDAR ===== */
.calendar-container {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.calendar-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.calendar-title { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
.btn-cal-nav {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  color: white; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-cal-nav:hover { background: rgba(255,255,255,0.35); }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--primary-dark);
  padding: 10px 16px 8px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.weekday-label {
  text-align: center; font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.8); padding: 4px 0;
  letter-spacing: 0.5px;
}
.calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 12px 16px 16px;
  gap: 6px;
  background: linear-gradient(135deg, #EEF2FF 0%, #F0FDF4 100%);
}
.calendar-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  border: 1.5px solid transparent;
  min-height: 40px;
  background: linear-gradient(145deg, #ffffff, #f8faff);
  box-shadow: var(--shadow-sm);
}

.calendar-day:hover:not(.empty):not(.disabled) {
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  z-index: 2;
}
.calendar-day.empty {
  cursor: default;
  background: transparent;
  box-shadow: none;
}
.calendar-day.today {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe) !important;
  border-color: var(--primary);
  font-weight: 800;
  color: var(--primary);
}
.calendar-day.weekend {
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb) !important;
  color: var(--gray-400);
}
.calendar-day.disabled { opacity: 0.4; cursor: not-allowed; }
.calendar-day.status-reported {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0) !important;
  color: #065F46;
  border-color: #34d399;
  font-weight: 700;
}
.calendar-day.status-not_reported {
  background: linear-gradient(145deg, #fee2e2, #fecaca) !important;
  color: #991B1B;
  border-color: #f87171;
  font-weight: 700;
}
.calendar-day.status-on_leave {
  background: linear-gradient(145deg, #fef3c7, #fde68a) !important;
  color: #92400E;
  border-color: #fbbf24;
  font-weight: 700;
}
.calendar-day.status-future {
  background: var(--gray-50) !important;
  color: var(--gray-300);
  box-shadow: none;
}
.day-dot {
  width: 7px; height: 7px; border-radius: 50%;
  position: absolute; bottom: 7px;
  box-shadow: 0 0 0 2px white;
}
.day-dot.reported { background: var(--success); }
.day-dot.not_reported { background: var(--danger); }
.day-dot.on_leave { background: var(--warning); }
.calendar-legend {
  display: flex; gap: 20px;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  background: white;
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--gray-600); font-weight: 500; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.legend-dot.reported { background: var(--success); }
.legend-dot.not_reported { background: var(--danger); }
.legend-dot.on_leave { background: var(--warning); }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { background: var(--gray-50); padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }


/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-primary { background: var(--primary-100); color: var(--primary); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 16px;
  backdrop-filter: blur(2px);
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title { font-size: 16px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray-400); padding: 4px; border-radius: var(--radius-sm); transition: all 0.2s; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 400px;
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 30px 28px;
  text-align: center; color: white;
}

.login-icon { font-size: 48px; margin-bottom: 12px; }
.login-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.login-sub { font-size: 13px; opacity: 0.75; }

.login-body { padding: 28px; }

.employee-id-input-wrapper { position: relative; }
.employee-id-prefix {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 600; color: var(--primary); letter-spacing: 0.5px;
}
.employee-id-input { padding-left: 70px !important; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

.remember-me-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; cursor: pointer; font-size: 14px; }
.remember-me-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ===== NOTIFICATION PANEL ===== */
.notif-panel {
  position: fixed;
  top: 60px; right: 0;
  width: 340px;
  max-height: calc(100vh - 70px);
  background: white;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  z-index: 1500;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.notif-title { font-size: 15px; font-weight: 700; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--gray-50); display: flex; gap: 10px; cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--primary-50); }
.notif-item-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-100); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.notif-item-msg { font-size: 12px; color: var(--gray-500); margin-top: 2px; line-height: 1.4; }
.notif-item-time { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* ===== ALERTS / TOASTS ===== */
.toast-container { position: fixed; top: 70px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 360px;
  border-left: 4px solid var(--primary);
  animation: toastIn 0.3s ease;
  font-size: 14px;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.tab-btn { padding: 10px 18px; background: none; border: none; cursor: pointer; font-family: 'Noto Sans Lao Looped', sans-serif; font-size: 14px; font-weight: 600; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== LEAVE BALANCE ===== */
.leave-bar { background: var(--gray-200); border-radius: var(--radius-full); height: 10px; overflow: hidden; margin-top: 8px; }
.leave-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.5s ease; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.leave-fill.low { background: linear-gradient(90deg, var(--warning), var(--danger)); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-400); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 15px; font-weight: 600; color: var(--gray-500); }
.empty-sub { font-size: 13px; margin-top: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; }
  .sidebar-overlay.visible { display: block; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; align-items: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
  .modal {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .notif-panel { width: 100%; border-radius: 0; }
  .calendar-day { min-height: 36px; font-size: 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; font-size: 17px; }
  .stat-value { font-size: 22px; }
  .btn-text-hide { display: none; }
}

/* ===== PWA / INSTALL ===== */
.pwa-banner {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.pwa-banner-text { flex: 1; }
.pwa-banner-title { font-weight: 700; }

/* ===== LOADING ===== */
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }

/* ===== GRID HELPERS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--gray-500); }
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }

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

/* ===== MATRIX TABLE ===== */
.matrix-wrap { overflow: auto; border-radius: var(--radius-md); box-shadow: var(--shadow); }
.matrix-wrap table { border-collapse: collapse; }
.matrix-wrap th, .matrix-wrap td { border: 1px solid var(--gray-100); }
.matrix-wrap thead th { background: var(--primary); color: white; position: sticky; top: 0; z-index: 2; }
.matrix-wrap tbody tr:hover td:not(:first-child) { filter: brightness(0.95); }

/* ===== SETTINGS ===== */
.settings-section-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.grid-leave-info {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .grid-leave-info {
    grid-template-columns: 1fr;
  }
}