/* ══════════════════════════════════════════════════════════════
   Generation Schools Leave Management — Design System v2
   ══════════════════════════════════════════════════════════════ */

:root {
  --navy:        #0f1e3d;
  --navy-mid:    #172645;
  --navy-light:  #1e3060;
  --navy-muted:  #2a3f6f;
  --gs-teal:     #1a6b8a;
  --gs-teal-lt:  #7dc4d8;
  --gold:        #c9a84c;
  --gold-light:  #e2c472;
  --gold-pale:   #fdf6e3;
  --success:     #16a34a;
  --success-bg:  #dcfce7;
  --danger:      #dc2626;
  --danger-bg:   #fee2e2;
  --warning:     #d97706;
  --warning-bg:  #fef3c7;
  --info:        #0284c7;
  --info-bg:     #e0f2fe;
  --purple:      #7c3aed;
  --purple-bg:   #ede9fe;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-600:    #475569;
  --gray-700:    #334155;
  --gray-800:    #1e293b;
  --gray-900:    #0f172a;
  --white:       #ffffff;
  --sidebar-w:   256px;
  --topbar-h:    60px;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 3px rgba(15,30,61,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 20px rgba(15,30,61,.10);
  --shadow-lg:   0 12px 48px rgba(15,30,61,.18);
  --shadow-card: 0 2px 8px rgba(15,30,61,.06), 0 0 0 1px rgba(15,30,61,.04);
  --font-body:   'Inter', -apple-system, sans-serif;
  --font-display:'DM Serif Display', Georgia, serif;
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --ease-out:    cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { font-size: 15px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth }
body { font-family: var(--font-body); background: #edf2f7; color: var(--gray-800); min-height: 100vh; display: flex }

/* ─────────────────────────────── Sidebar ─────────────────────────────── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--navy);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  transition: transform .28s var(--ease-out);
}
.sidebar::-webkit-scrollbar { display: none }

.sidebar-header {
  padding: 18px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(26,107,138,.18) 0%, transparent 100%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none }
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gs-teal) 0%, #1e90b5 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: var(--white); flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(26,107,138,.55);
  letter-spacing: -.5px;
}
.brand-name  { font-size: 13px; font-weight: 700; color: var(--white); line-height: 1.2; display: block }
.brand-sub   { font-size: 10px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .07em }
.sidebar-close { display: none; background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer; padding: 4px }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,.05) }

.avatar-wrap       { position: relative; flex-shrink: 0 }
.avatar-img        { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid rgba(255,255,255,.15) }
.avatar-initials   {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-muted), var(--gs-teal));
  border: 2px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--white);
}
.avatar-status     { position: absolute; bottom: 1px; right: 1px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--navy) }
.avatar-status.online { background: #22c55e }

.user-name { font-size: 13px; font-weight: 600; color: var(--white); line-height: 1.3 }
.user-role { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px }

.sidebar-nav { flex: 1; padding: 10px 10px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.nav-section-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.25); padding: 14px 10px 5px;
}
.nav-section-label.collapsible {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; padding-right: 8px;
  transition: color .15s;
}
.nav-section-label.collapsible:hover { color: rgba(255,255,255,.45); }
.section-chevron {
  width: 12px; height: 12px; flex-shrink: 0; opacity: .5;
  transition: transform .2s ease, opacity .15s;
}
.nav-section-label.collapsible:hover .section-chevron { opacity: .8; }
.nav-section-label.collapsed .section-chevron { transform: rotate(-90deg); }
.nav-section-items {
  overflow: hidden;
  transition: max-height .25s ease, opacity .2s ease;
  max-height: 600px; opacity: 1;
}
.nav-section-items.collapsed { max-height: 0; opacity: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 9px 9px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  text-decoration: none; font-size: 13px; font-weight: 500;
  margin-bottom: 1px;
  transition: background .14s, color .14s, transform .14s;
  border-left: 2.5px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(26,107,138,.32), rgba(26,107,138,.10));
  color: var(--white); font-weight: 600;
  border-left-color: var(--gs-teal-lt);
}
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .75 }
.nav-item.active .nav-icon { opacity: 1 }
.nav-item:hover .nav-icon  { opacity: 1 }
.nav-badge {
  margin-left: auto;
  background: var(--gold); color: var(--navy);
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}
.sidebar-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,.07) }

/* ─────────────────────────────── Layout ─────────────────────────────── */
.main-wrap  { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh }
.topbar {
  position: sticky; top: 0; height: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid rgba(15,30,61,.08);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(15,30,61,.05), 0 2px 12px rgba(15,30,61,.04);
}
.topbar-left   { display: flex; align-items: center; gap: 12px }
.topbar-menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--gray-600); padding: 6px; border-radius: 6px; transition: background .15s }
.topbar-menu-btn:hover { background: var(--gray-100) }
.page-title    { font-size: 15px; font-weight: 700; color: var(--gray-900) }
.topbar-right  { margin-left: auto; display: flex; align-items: center; gap: 10px }
.page-content  { padding: 28px; flex: 1 }

/* ─────────────────────────────── Cards ─────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15,30,61,.07);
  transition: box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}
.card:hover {
  box-shadow: 0 6px 28px rgba(15,30,61,.11), 0 0 0 1px rgba(15,30,61,.05);
}
.card-header { padding: 18px 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px }
.card-title  { font-size: 15px; font-weight: 700; color: var(--gray-900) }
.card-body   { padding: 22px }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; align-items: center }

/* interactive card variant */
.card-interactive { cursor: pointer }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ─────────────────────────────── Stat cards ─────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg); padding: 20px;
  border: 1px solid rgba(15,30,61,.07);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--gs-teal);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow) }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500); margin-bottom: 6px }
.stat-value { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; font-variant-numeric: tabular-nums }
.stat-sub   { font-size: 12px; color: var(--gray-500); margin-top: 4px }
.stat-icon  { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px }

/* ─────────────────────────────── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  text-decoration: none;
  transition: all .16s var(--ease-out);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-sm { padding: 6px 13px; font-size: 12px }
.btn:active { transform: scale(.97) !important }

.btn-primary {
  background: linear-gradient(135deg, var(--gs-teal) 0%, #1e87b0 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26,107,138,.28);
}
.btn-primary:hover {
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,107,138,.42);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(201,168,76,.3);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,.45);
}
.btn-success { background: var(--success); color: var(--white); box-shadow: 0 2px 6px rgba(22,163,74,.25) }
.btn-success:hover { color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.38) }
.btn-danger  { background: var(--danger);  color: var(--white); box-shadow: 0 2px 6px rgba(220,38,38,.2) }
.btn-danger:hover  { color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(220,38,38,.32) }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); color: var(--gray-700); transform: translateY(-1px) }
.btn-outline-light { background: transparent; border: 1.5px solid rgba(255,255,255,.25); color: rgba(255,255,255,.8) }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff; transform: translateY(-1px) }
.btn-ghost  { background: transparent; color: var(--gray-600); padding: 6px 10px }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800) }
.btn-navy   { background: var(--navy); color: var(--white) }
.btn-navy:hover { opacity: .88; color: var(--white); transform: translateY(-1px) }

/* ─────────────────────────────── Forms ─────────────────────────────── */
.form-group { margin-bottom: 18px }
label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 5px }
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px; font-size: 14px;
  color: var(--gray-800); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  font-family: var(--font-body);
}
.form-control:focus {
  outline: none;
  border-color: var(--gs-teal);
  box-shadow: 0 0 0 3px rgba(26,107,138,.13);
}
.form-control::placeholder { color: var(--gray-400) }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
textarea.form-control { resize: vertical; min-height: 80px }
.form-hint { font-size: 11px; color: var(--gray-500); margin-top: 4px }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px }

/* ─────────────────────────────── Tables ─────────────────────────────── */
.table-wrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: 13px }
th {
  padding: 10px 14px;
  background: var(--gray-50);
  font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--gray-500); text-align: left;
  border-bottom: 1.5px solid var(--gray-200);
}
td { padding: 12px 14px; border-bottom: 1px solid rgba(15,30,61,.05); color: var(--gray-700); vertical-align: middle }
tr:last-child td { border-bottom: none }
tbody tr:nth-child(even) td { background: rgba(240,245,252,.6) }
tbody tr:hover td { background: #e8f5f9 !important; transition: background .1s }

/* ─────────────────────────────── Badges ─────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .7; flex-shrink: 0;
}
.badge-success { background: var(--success-bg); color: var(--success) }
.badge-danger  { background: var(--danger-bg);  color: var(--danger) }
.badge-warning { background: var(--warning-bg); color: var(--warning) }
.badge-info    { background: var(--info-bg);    color: var(--info) }
.badge-gray    { background: var(--gray-100);   color: var(--gray-600) }
.badge-navy    { background: var(--navy);       color: var(--white) }
.badge-purple  { background: var(--purple-bg);  color: var(--purple) }

/* ─────────────────────────────── Flash messages ─────────────────────────────── */
.flash-stack {
  position: fixed; top: 72px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
  animation: flashIn .3s var(--ease-spring);
}
.flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d }
.flash-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c }
.flash-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e }
.flash-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af }
.flash-close   { margin-left: auto; background: none; border: none; cursor: pointer; opacity: .45; font-size: 18px; line-height: 1; padding: 0 0 0 4px }
.flash-close:hover { opacity: .75 }
@keyframes flashIn {
  from { transform: translateX(32px) scale(.95); opacity: 0 }
  to   { transform: translateX(0)    scale(1);   opacity: 1 }
}

/* ─────────────────────────────── Balance bars ─────────────────────────────── */
.balance-bar-wrap { background: var(--gray-100); border-radius: 6px; height: 7px; overflow: hidden; margin-top: 7px }
.balance-bar { height: 100%; border-radius: 6px; transition: width .7s var(--ease-out); background: linear-gradient(90deg, var(--gs-teal), var(--gs-teal-lt)) }
.balance-bar.low { background: linear-gradient(90deg, var(--danger), #f87171) }
.balance-bar.mid { background: linear-gradient(90deg, var(--warning), #fbbf24) }

/* ─────────────────────────────── Leave type colours ─────────────────────────────── */
.lt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0 }

/* ─────────────────────────────── Empty state ─────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--gray-400) }
.empty-state svg { opacity: .25; margin-bottom: 16px }
.empty-state p   { font-size: 14px; margin-bottom: 18px; color: var(--gray-500) }
.empty-state .empty-title { font-size: 16px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px }

/* ─────────────────────────────── Modal ─────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,30,61,.45); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px }
.modal-backdrop.open { display: flex }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .22s var(--ease-out);
}
.modal-header { padding: 20px 22px 0; display: flex; align-items: center; justify-content: space-between }
.modal-title  { font-size: 16px; font-weight: 700; color: var(--gray-900) }
.modal-close  { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 22px; line-height: 1; padding: 4px; border-radius: 4px; transition: color .15s }
.modal-close:hover { color: var(--gray-700) }
.modal-body   { padding: 18px 22px }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(6px) } to { opacity: 1; transform: scale(1) translateY(0) } }

/* ─────────────────────────────── Auth — LOGIN PAGE ─────────────────────────────── */
.auth-page { min-height: 100vh; width: 100%; display: flex; align-items: stretch; }

.auth-left {
  flex: 0 0 36%;
  background: linear-gradient(160deg, #0f1e3d 0%, #1a4a6b 60%, #1a6b8a 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 52px; position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; top: -20%; right: -10%;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125,196,216,.10) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand-logo {
  height: 120px; width: auto;
  background: #ffffff; padding: 10px 20px;
  border-radius: 12px; object-fit: contain;
  margin-bottom: 52px; display: block;
}
.auth-brand-mark {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 900; color: white;
  margin-bottom: 52px;
  backdrop-filter: blur(4px);
}
.auth-left-title {
  font-family: var(--font-display);
  font-size: 42px; line-height: 1.15; color: white; margin-bottom: 16px;
}
.auth-left-sub {
  font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.78); margin-bottom: 48px; max-width: 380px;
}
.auth-feature-list { display: flex; flex-direction: column; gap: 16px }
.auth-feature { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.95); font-size: 15px; font-weight: 600; }
.auth-feature-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.30);
  display: flex; align-items: center; justify-content: center;
  color: white;
}

.auth-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 60px;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.auth-right::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, #1a4a6b 0%, rgba(26,74,107,.5) 25%, rgba(10,25,55,.25) 60%, rgba(10,25,55,.15) 100%);
  pointer-events: none;
}
.auth-form-wrap {
  width: 100%; max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  position: relative; z-index: 1;
}
.auth-title { font-size: 24px; font-weight: 800; color: var(--gs-teal); margin-bottom: 6px; }
.auth-sub   { font-size: 14px; color: var(--gray-400); margin-bottom: 28px; }
.auth-error { background: var(--danger-bg); border: 1px solid #fecaca; color: var(--danger); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px }

/* Legacy */
.auth-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg) }
.auth-logo  { text-align: center; margin-bottom: 28px }

@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { flex: 1; padding: 24px; justify-content: center; }
}

/* ─────────────────────────────── Page header ─────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-size: 22px; font-weight: 800; color: var(--gray-900) }
.page-header p  { font-size: 13px; color: var(--gray-500); margin-top: 2px }

/* ─────────────────────────────── Document list ─────────────────────────────── */
.doc-row  { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px; transition: border-color .15s, box-shadow .15s }
.doc-row:hover { border-color: var(--gs-teal); box-shadow: 0 2px 8px rgba(26,107,138,.1) }
.doc-icon { width: 32px; height: 32px; background: var(--info-bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.doc-name { font-size: 13px; font-weight: 500; flex: 1 }
.doc-meta { font-size: 11px; color: var(--gray-400) }

/* ─────────────────────────────── Approval timeline ─────────────────────────────── */
.approval-timeline { display: flex; flex-direction: column; gap: 0 }
.approval-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; position: relative }
.approval-step:not(:last-child)::after {
  content: ''; position: absolute; left: 14px; top: 36px; bottom: -12px;
  width: 2px; background: var(--gray-200);
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px; font-weight: 700; border: 2px solid transparent;
}
.step-dot.pending  { background: var(--warning-bg); color: var(--warning); border-color: var(--warning) }
.step-dot.approved { background: var(--success-bg); color: var(--success); border-color: var(--success) }
.step-dot.declined { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger) }
.step-dot.waiting  { background: var(--gray-100);   color: var(--gray-400);border-color: var(--gray-300) }

/* ─────────────────────────────── File upload zone ─────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 28px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--gs-teal); background: rgba(26,107,138,.04); transform: scale(1.01);
}
.upload-zone input { display: none }

/* ─────────────────────────────── Balance cards ─────────────────────────────── */
.balance-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.balance-card {
  background: var(--white);
  border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15,30,61,.07);
  position: relative; overflow: hidden;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out);
  border-top: 3px solid var(--type-color, var(--gs-teal));
}
.balance-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(15,30,61,.13) }
.balance-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-bottom: 8px }
.balance-days { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums }
.balance-days span { font-size: 13px; font-weight: 500; color: var(--gray-400); margin-left: 3px }
.balance-used { font-size: 12px; color: var(--gray-500); margin-top: 4px }

/* ─────────────────────────────── Topbar search ─────────────────────────────── */
.topbar-search { display: flex; align-items: center; gap: 8px; background: var(--gray-100); border-radius: 8px; padding: 7px 12px; font-size: 13px; color: var(--gray-500) }

/* ─────────────────────────────── Pagination ─────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; margin-top: 20px }
.page-link {
  padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 500;
  text-decoration: none; color: var(--gray-600); border: 1px solid var(--gray-200);
  transition: all .15s;
}
.page-link:hover { background: var(--gray-100); border-color: var(--gray-300) }
.page-link.active { background: var(--gs-teal); color: var(--white); border-color: var(--gs-teal) }

/* ─────────────────────────────── Chips ─────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200) }

/* ─────────────────────────────── Welcome banner ─────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1a5c7a 100%);
  border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; top: -40%; right: 5%;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125,196,216,.13) 0%, transparent 70%);
}
.welcome-banner::after {
  content: '';
  position: absolute; bottom: -30%; right: 20%;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.1) 0%, transparent 70%);
}
.welcome-text h2 { font-family: var(--font-display); font-size: 22px; color: white; margin-bottom: 4px }
.welcome-text p  { font-size: 13px; color: rgba(255,255,255,.65) }
.welcome-action  { position: relative; z-index: 1; flex-shrink: 0 }

/* ─────────────────────────────── Section divider ─────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-500); margin-bottom: 12px; margin-top: 4px;
}

/* ─────────────────────────────── Info callout ─────────────────────────────── */
.callout {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  display: flex; gap: 10px; align-items: flex-start;
}
.callout-info { background: var(--info-bg); color: var(--info); border-left: 3px solid var(--info) }
.callout-warning { background: var(--warning-bg); color: var(--warning); border-left: 3px solid var(--warning) }
.callout-success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success) }

/* ─────────────────────────────── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%) }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg) }
  .sidebar-close { display: block }
  .main-wrap { margin-left: 0 }
  .topbar-menu-btn { display: block }
  .form-row, .form-row-3 { grid-template-columns: 1fr }
  .page-content { padding: 16px }
  .stats-grid { grid-template-columns: 1fr 1fr }
  .balance-cards { grid-template-columns: 1fr 1fr }
  .col-hide-mobile { display: none }
  .welcome-banner { flex-direction: column; align-items: flex-start }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr }
  .balance-cards { grid-template-columns: 1fr }
  .auth-right { padding: 32px 20px }
}
@media (max-width: 800px) {
  .auth-left { display: none }
  .auth-right { width: 100% }
}
