/* ===== VARIABLES ===== */
:root {
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --secondary: #7C3AED;
  --success: #059669;
  --danger: #DC2626;
  --warning: #D97706;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(79,70,229,.15);
  --radius: 12px;
  --radius-sm: 8px;
  --header-height: 56px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }
a { color: var(--primary); text-decoration: none; }

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed; inset: 0;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease;
}
.loader-wrap { text-align: center; }
.loader-logo {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  font-size: 1.4rem; font-weight: 700; color: var(--primary);
  margin-bottom: 2rem;
}
.loader-bar {
  width: 200px; height: 4px; background: var(--border);
  border-radius: 99px; overflow: hidden; margin: 0 auto 1rem;
}
.loader-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  animation: loadFill 1.8s ease forwards;
}
@keyframes loadFill { to { width: 100%; } }
.loader-text { color: var(--text-light); font-size: .875rem; }

/* ===== SCREEN UTILITY ===== */
.screen { min-height: 100vh; }
.hidden { display: none !important; }

/* ===== AUTH ===== */
.auth-container {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem; gap: 1.5rem;
}
.auth-brand {
  display: flex; align-items: center; gap: .8rem;
}
.brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #EEF2FF, #DDD6FE);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.brand-sub { font-size: .8rem; color: var(--text-light); }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}
.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.auth-desc { color: var(--text-light); font-size: .875rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; color: var(--text-light); font-size: .75rem; margin-top: 1.2rem; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text); margin-bottom: .4rem; letter-spacing: .02em; text-transform: uppercase; }
.req { color: var(--danger); font-weight: 700; margin-left: .15rem; }
.form-input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.input-wrap { position: relative; }
.toggle-pw {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: .9rem;
  color: var(--text-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.form-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem; font-weight: 600;
  transition: all .2s;
  cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.4); }
.btn-secondary {
  background: var(--secondary); color: white;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
}
.btn-secondary:hover:not(:disabled) { background: #6D28D9; }
.btn-success {
  background: var(--success); color: white;
  box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-success:hover:not(:disabled) { background: #047857; }
.btn-danger {
  background: var(--danger); color: white;
}
.btn-danger:hover:not(:disabled) { background: #B91C1C; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: #EEF2FF; }
.btn-sm { padding: .4rem .8rem; font-size: .8125rem; }
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  transition: background .2s, color .2s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }

/* ===== HEADER ===== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  height: var(--header-height);
}
.header-brand {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
}

/* ===== ADMIN NAV ===== */
.admin-nav {
  display: flex; gap: .25rem;
  padding: .5rem 1rem;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  padding: .45rem .9rem;
  border-radius: 6px;
  font-size: .8375rem; font-weight: 600;
  color: var(--text-light);
  transition: all .2s;
  white-space: nowrap;
}
.nav-tab.active { background: var(--primary); color: white; }
.nav-tab:hover:not(.active) { background: var(--bg); color: var(--text); }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 1rem; max-width: 640px; margin: 0 auto; padding-bottom: 3rem; }

/* ===== WELCOME BANNER ===== */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.welcome-day { font-size: .8rem; font-weight: 600; opacity: .8; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .25rem; }
.welcome-name { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
.welcome-domain { font-size: .875rem; opacity: .8; }

/* ===== STATUS CARD ===== */
.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.status-open { border-left: 4px solid var(--success); }
.status-closed { border-left: 4px solid var(--text-light); }
.status-holiday { border-left: 4px solid var(--warning); }
.status-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .25rem;
}
.status-label.open { color: var(--success); }
.status-label.closed { color: var(--text-light); }
.status-label.holiday { color: var(--warning); }
.status-main { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.status-sub { font-size: .825rem; color: var(--text-light); margin-top: .2rem; }

/* ===== STATS ROW ===== */
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin-bottom: 1rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem .75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); font-family: 'DM Mono', monospace; }
.stat-label { font-size: .75rem; color: var(--text-light); margin-top: .2rem; font-weight: 500; }

/* ===== TODAY CARD ===== */
.today-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.today-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.time-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.time-block { flex: 1; }
.time-sep { color: var(--text-light); font-size: 1.2rem; }
.time-label { font-size: .7rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.time-value { font-size: 1rem; font-weight: 600; color: var(--text); font-family: 'DM Mono', monospace; }
.action-msg { padding: .6rem .9rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; margin-bottom: .75rem; }
.action-msg.success { background: #D1FAE5; color: #065F46; }
.action-msg.error { background: #FEE2E2; color: #991B1B; }
.action-msg.info { background: #EEF2FF; color: var(--primary-dark); }

/* ===== SECTION CARDS ===== */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.section-heading { font-size: .75rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; margin: 1.25rem 0 .6rem; }
.empty-msg { color: var(--text-light); font-size: .875rem; text-align: center; padding: 1rem 0; }

/* ===== HISTORY LIST ===== */
.history-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.history-dot.present { background: var(--success); }
.history-dot.absent { background: var(--danger); }
.history-day { font-weight: 600; font-size: .875rem; flex: 1; }
.history-times { font-size: .8rem; color: var(--text-light); font-family: 'DM Mono', monospace; }
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .5rem; border-radius: 99px; font-size: .7rem; font-weight: 700;
}
.badge-present { background: #D1FAE5; color: #065F46; }
.badge-absent { background: #FEE2E2; color: #991B1B; }
.badge-holiday { background: #FEF3C7; color: #92400E; }

/* ===== STUDENT ITEM ===== */
.student-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow);
}
.student-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.student-info { flex: 1; min-width: 0; }
.student-name { font-weight: 600; font-size: .9375rem; }
.student-meta { font-size: .775rem; color: var(--text-light); margin-top: .15rem; }
.student-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ===== DOMAIN GRID ===== */
.domain-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .75rem; margin-bottom: 1rem; }
.domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.domain-name { font-size: .8rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.domain-count { font-size: 2rem; font-weight: 700; color: var(--primary); font-family: 'DM Mono', monospace; }
.domain-sub { font-size: .775rem; color: var(--text-light); }

/* ===== DAY LOG ===== */
.day-log-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: .5rem;
  display: flex; align-items: center; gap: .75rem;
  box-shadow: var(--shadow);
}
.day-log-num { font-size: 1.1rem; font-weight: 700; color: var(--primary); min-width: 52px; }
.day-log-info { flex: 1; }
.day-log-date { font-size: .875rem; font-weight: 600; }
.day-log-status { font-size: .775rem; color: var(--text-light); margin-top: .1rem; }

/* ===== TOGGLE SWITCH ===== */
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 99px;
  transition: background .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: white; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ===== REPORT TABLE ===== */
.report-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.report-table {
  width: 100%; border-collapse: collapse; font-size: .8125rem;
  background: var(--surface);
}
.report-table th {
  padding: .6rem .8rem; text-align: left;
  background: var(--bg); color: var(--text-light);
  font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.report-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.report-table tr:last-child td { border-bottom: none; }
.report-table tr:hover td { background: var(--bg); }

/* ===== FILTER ROW ===== */
.filter-row { display: flex; gap: .6rem; margin-bottom: .75rem; flex-wrap: wrap; }
.filter-select { width: auto; flex: 1; min-width: 120px; }

/* ===== ALERTS ===== */
.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; }
.alert-danger { background: #FEE2E2; color: #991B1B; }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-success { background: #D1FAE5; color: #065F46; }
.alert-info { background: #EEF2FF; color: var(--primary-dark); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: white;
  padding: .7rem 1.2rem; border-radius: 99px;
  font-size: .875rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 9999; opacity: 0;
  transition: all .3s ease;
  white-space: nowrap; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== SKELETON ===== */
.skeleton-line {
  height: 14px; background: var(--border);
  border-radius: 99px; margin-bottom: .5rem;
  animation: shimmer 1.5s infinite;
}
.skeleton-line.short { width: 60%; }
@keyframes shimmer {
  0%,100% { opacity: 1; } 50% { opacity: .5; }
}

/* ===== ADMIN TAB ===== */
.admin-tab { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TODAY SUMMARY ITEM ===== */
.summary-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
}
.summary-item:last-child { border-bottom: none; }
.summary-name { flex: 1; font-size: .875rem; font-weight: 500; }
.summary-times { font-size: .775rem; color: var(--text-light); font-family: 'DM Mono', monospace; text-align: right; }

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .main-content { padding: 1.5rem; }
  .welcome-banner { padding: 2rem; }
  .welcome-name { font-size: 1.75rem; }
}

/* ===== LEAVE MANAGEMENT ===== */
.leave-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
}
.leave-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.leave-dates { font-size: .85rem; font-weight: 600; color: var(--text); font-family: 'DM Mono', monospace; }
.leave-session-tag { display: inline-block; font-size: .72rem; font-weight: 700; background: #EEF2FF; color: var(--primary); border-radius: 99px; padding: .15rem .6rem; margin-bottom: .4rem; }
.leave-reason-text { font-size: .85rem; color: var(--text-light); margin-bottom: .4rem; }
.leave-reject-reason { font-size: .8rem; color: var(--danger); margin-top: .3rem; }
.leave-doc-link { font-size: .8rem; color: var(--primary); text-decoration: underline; }

.leave-admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: .85rem;
  box-shadow: var(--shadow);
}
.leave-admin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.leave-admin-meta { flex: 1; }
.leave-admin-name { font-size: .9375rem; font-weight: 700; color: var(--text); margin-bottom: .15rem; }
.leave-admin-sub  { font-size: .775rem; color: var(--text-light); margin-bottom: .3rem; }
.leave-call-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600;
  color: var(--success); text-decoration: none;
  background: #D1FAE5; border-radius: 99px;
  padding: .2rem .7rem; margin-top: .2rem;
}
.leave-call-btn:hover { background: #A7F3D0; }
.leave-admin-period {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
  margin-bottom: .6rem;
  padding: .5rem .75rem;
  background: var(--bg); border-radius: var(--radius-sm);
  font-size: .825rem;
}
.leave-admin-date { font-weight: 700; color: var(--text); font-family: 'DM Mono', monospace; }
.leave-period-arrow { color: var(--primary); font-weight: 700; }
.leave-period-to { color: var(--text-light); font-size: .75rem; }
.leave-duration-tag {
  margin-left: auto;
  font-size: .72rem; font-weight: 700;
  background: #EEF2FF; color: var(--primary);
  border-radius: 99px; padding: .15rem .65rem;
}
.leave-reason-block {
  display: flex; gap: .5rem; align-items: flex-start;
  margin-bottom: .5rem;
}
.leave-reason-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-light);
  white-space: nowrap; padding-top: .1rem;
}
.leave-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* Leave badge on nav tab */
.leave-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: white;
  font-size: .65rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 99px; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}

/* Reject modal */
.reject-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
}
.reject-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 90%; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.reject-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.reject-modal-btns { display: flex; gap: .6rem; margin-top: 1rem; }

/* ===== REPORT CHARTS ===== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 520px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  height: 260px;
  position: relative;
}
.chart-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .6rem;
}

/* ===== REPORT SUMMARY BAR ===== */
.report-summary-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin-bottom: 1rem;
}
.summary-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.summary-stat-label { font-size: .7rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; }
.summary-stat-value { font-size: 1.4rem; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--text); }
@media (max-width: 480px) { .report-summary-bar { grid-template-columns: repeat(3, 1fr); } }

/* ===== REPORT ROW HIGHLIGHT ===== */
.row-present   td { background: #F0FDF4; }
.row-checkedin td { background: #FFFBEB; }
.row-absent    td { background: #FFF5F5; }
.badge-checkedin { background: #FEF3C7; color: #92400E; }

/* ===== LEAVE STATS ===== */
.leave-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1rem;
}
@media (max-width: 520px) { .leave-stats-grid { grid-template-columns: 1fr; } }
.leave-stat-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.leave-stat-title {
  font-size: .75rem; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .6rem;
}
.leave-stat-table {
  width: 100%; border-collapse: collapse; font-size: .8rem;
}
.leave-stat-table th {
  padding: .4rem .6rem; text-align: left;
  background: var(--bg); color: var(--text-light);
  font-weight: 700; font-size: .7rem; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.leave-stat-table td {
  padding: .4rem .6rem; border-bottom: 1px solid var(--border);
}
.leave-stat-table tr:last-child td { border-bottom: none; }
