/* ══════════════════════════════════════════════════════════════
   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: #ffffff;
  border-radius: 9px;
  padding: 3px; object-fit: contain; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(26,107,138,.45);
}
.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); }

/* Clickable table rows */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: #e8f5f9 !important; }

/* Notification bell */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; width: 38px; height: 38px; border-radius: 9px;
  background: transparent; border: 1px solid var(--gray-200); cursor: pointer;
  color: var(--gray-600); display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.notif-bell:hover { background: var(--gray-50); color: var(--gs-teal); border-color: var(--gray-300); }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-width: 92vw;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200); overflow: hidden; z-index: 200;
  display: flex; flex-direction: column;
  /* Never taller than the space below the top bar, so the last item is never
     clipped by the viewport (R7). The inner list scrolls. */
  max-height: calc(100vh - var(--topbar-h) - 24px);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.notif-wrap.open .notif-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
  font-size: 13px; font-weight: 700; color: var(--gray-800);
}
.notif-head button { background: none; border: none; font-size: 11px; color: var(--gs-teal); cursor: pointer; font-weight: 600; }
.notif-head button:hover { text-decoration: underline; }
.notif-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.notif-foot { border-top: 1px solid var(--gray-100); }
.notif-foot a { display: block; text-align: center; padding: 11px 16px; font-size: 12.5px;
                font-weight: 600; color: var(--gs-teal); text-decoration: none; }
.notif-foot a:hover { background: var(--gray-50); }
.notif-item {
  display: flex; gap: 10px; padding: 11px 16px; text-decoration: none;
  border-bottom: 1px solid var(--gray-100); transition: background .12s;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: rgba(26,107,138,.06); }
.notif-item.unread:hover { background: rgba(26,107,138,.10); }
.notif-icon { font-size: 15px; flex-shrink: 0; line-height: 1.4; }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-msg { font-size: 12.5px; color: var(--gray-700); line-height: 1.4; }
.notif-ago { font-size: 11px; color: var(--gray-400); }
.notif-empty { padding: 28px 16px; text-align: center; font-size: 12.5px; color: var(--gray-400); }
.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 }

/* ── Apply form: range vs specific-day mode + calendar picker (R6 item 1) ── */
.mode-toggle { display: inline-flex; border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; }
.mode-btn { border: none; background: #fff; color: var(--gray-500); cursor: pointer;
            padding: 8px 16px; font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.mode-btn + .mode-btn { border-left: 1px solid var(--gray-200); }
.mode-btn:hover { background: var(--gray-50); color: var(--gs-teal); }
.mode-btn.active { background: var(--gs-teal); color: #fff; }

.cal-wrap { border: 1px solid var(--gray-200); border-radius: 12px; padding: 14px; max-width: 380px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.cal-nav { border: 1px solid var(--gray-200); background: #fff; border-radius: 7px; cursor: pointer;
           width: 28px; height: 28px; font-size: 16px; line-height: 1; color: var(--gray-500); }
.cal-nav:hover { background: var(--gray-50); color: var(--gs-teal); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase;
                color: var(--gray-400); padding-bottom: 4px; }
.cal-day { border: 1px solid transparent; background: var(--gray-50); border-radius: 7px; cursor: pointer;
           aspect-ratio: 1; font-size: 12.5px; font-weight: 600; color: var(--navy);
           transition: background .12s, color .12s, transform .12s; }
.cal-day:hover:not(:disabled) { background: var(--info-bg); border-color: var(--gs-teal); transform: translateY(-1px); }
.cal-day.sel { background: var(--gs-teal); color: #fff; border-color: var(--gs-teal); }
.cal-day.off { background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 4px, #eceff3 4px, #eceff3 8px);
               color: var(--gray-300); cursor: not-allowed; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 10.5px; color: var(--gray-400); }
.cal-legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; }
.cal-legend .sw.sel { background: var(--gs-teal); }
.cal-legend .sw.off { background: #e3e7ec; }
.picked-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px;
  background: var(--info-bg); color: var(--gs-teal); border-radius: 20px; font-size: 12.5px; font-weight: 600; }
.picked-chip button { border: none; background: rgba(26,107,138,.15); color: var(--gs-teal); cursor: pointer;
  width: 18px; height: 18px; border-radius: 50%; font-size: 14px; line-height: 1; display: flex;
  align-items: center; justify-content: center; padding: 0; transition: background .12s; }
.picked-chip button:hover { background: var(--gs-teal); color: #fff; }

/* Sub-groups within a top-level nav section (e.g. Administration), so a long
   flat list can be organised without introducing a new visual pattern —
   same collapsible mechanic, just smaller/indented so it reads as a level down. */
.nav-section-label.nav-subsection-label {
  font-size: 9px; padding: 9px 8px 3px 18px; color: rgba(255,255,255,.35);
}
.nav-section-label.nav-subsection-label:hover { color: rgba(255,255,255,.55); }
.nav-section-label.nav-subsection-label .section-chevron { width: 10px; height: 10px; }
.nav-section-items.nav-subsection-items { padding-left: 4px; }
.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 ─────────────────────────────── */
/* min-width:0 is load-bearing: body is a flex row and flex items refuse to
   shrink below their content's intrinsic width by default — without it, any
   wide content (e.g. the mobile balance-chip scroller) stretches the whole
   layout viewport and phones zoom out to fit. */
.main-wrap  { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0 }
.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: 15px 22px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--gray-100) }
.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 }
.info-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; margin-left: 4px;
  background: var(--gray-200); color: var(--gray-600);
  font-size: 10px; font-weight: 800; cursor: help; vertical-align: middle;
  transition: background .15s, color .15s;
}
.info-tip:hover, .info-tip:focus { background: var(--gs-teal); color: #fff; outline: none; }
.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-neutral { background: var(--gray-100); color: var(--gray-500) }
.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) }
.badge-change  { background: #fdf1e3; color: #c26a1b }  /* Change Request (staff feedback item 10) */

/* Clickable stat cards + collapsible dashboard panels (R2 feedback items 1 & 7) */
a.stat-link { display: block; text-decoration: none; color: inherit;
              transition: transform .15s, box-shadow .15s; }
a.stat-link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(11,37,69,.10); }
.panel-toggle { border: none; background: none; cursor: pointer; color: var(--gray-400);
                padding: 4px; border-radius: 6px; display: inline-flex; align-items: center;
                transition: transform .18s, color .15s, background .15s; }
.panel-toggle:hover { color: var(--gs-teal); background: var(--gray-50); }

/* Campus Manager: view toggle + clickable cards (R3 follow-up items 3 & 4) */
.view-toggle { display: flex; border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; }
.view-toggle-btn { border: none; background: #fff; color: var(--gray-400); cursor: pointer;
                   padding: 8px 12px; display: flex; align-items: center; transition: background .15s, color .15s; }
.view-toggle-btn + .view-toggle-btn { border-left: 1px solid var(--gray-200); }
.view-toggle-btn:hover { background: var(--gray-50); color: var(--gs-teal); }
.view-toggle-btn.active { background: var(--gs-teal); color: #fff; }

.campus-card { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.campus-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(11,37,69,.10); }

/* List view: reflow each card into a compact horizontal row.
   !important is required here because the per-element layout (photo size,
   card padding) is set via inline style attributes in the template, which
   normally beat external stylesheet rules — an !important author rule is
   the one thing that can still override them. */
.campus-grid.list-view { grid-template-columns: 1fr !important; gap: 10px !important; }
.campus-grid.list-view .campus-card { display: flex !important; align-items: center; }
.campus-grid.list-view .campus-card-photo { width: 64px !important; height: 64px !important;
  border-radius: 10px !important; margin: 12px !important; flex-shrink: 0; }
.campus-grid.list-view .campus-card-body { display: flex !important; align-items: center; gap: 20px;
  flex: 1; min-width: 0; padding: 12px 16px !important; }
.campus-grid.list-view .campus-card-body > div:first-child { flex: 0 0 200px; }
.campus-grid.list-view .campus-card-address { min-height: 0 !important; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campus-grid.list-view .campus-card-actions { margin-top: 0 !important; flex-shrink: 0; }
@media (max-width: 700px) {
  .campus-grid.list-view .campus-card { flex-wrap: wrap; }
  .campus-grid.list-view .campus-card-body { flex-wrap: wrap; }
}
.card-header.clickable { cursor: pointer; user-select: none; }
.card-header.clickable:hover .card-title { color: var(--gs-teal); }

/* Segmented Map/Insights toggle + infographic bits (R3 feedback items 3 & 5) */
.seg-toggle { display: inline-flex; background: var(--gray-100); border-radius: 8px; padding: 3px; }
.seg-btn { border: none; background: none; cursor: pointer; font-size: 12px; font-weight: 600;
           color: var(--gray-500); padding: 5px 12px; border-radius: 6px; transition: all .15s; }
.seg-btn.active { background: #fff; color: var(--gs-teal); box-shadow: 0 1px 3px rgba(11,37,69,.12); }
.info-stat { flex: 1; min-width: 96px; background: var(--gray-50); border-radius: 10px;
             padding: 12px 14px; border-left: 3px solid var(--c); }
.info-stat-val { font-size: 22px; font-weight: 800; color: var(--c); line-height: 1; }
.info-stat-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
                 color: var(--gray-400); margin-top: 5px; }
.info-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
          color: var(--gray-400); margin-bottom: 12px; }
/* Leaflet popups on-brand */
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-container { font: inherit; }

/* ─────────────────────────────── 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.submitted { background: var(--info-bg); color: var(--gs-teal); border-color: var(--gs-teal) }
.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) }
/* The cards link through to Leave Balances.  Scoped to a.balance-card so the
   "no balances yet" placeholder, which stays a div, keeps a normal cursor. */
a.balance-card { display: block; text-decoration: none; color: inherit; cursor: pointer }
a.balance-card:focus-visible { outline: 2px solid var(--gs-teal); outline-offset: 2px }
.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) }

/* ───────────────────────── Mobile bottom navigation (PWA) ────────────────── */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    background: #fff; border-top: 1px solid var(--gray-200);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(11, 37, 69, .08);
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; background: none; border: none; cursor: pointer;
    color: var(--gray-400); font-size: 10.5px; font-weight: 600; text-decoration: none;
    position: relative;
  }
  .bn-item svg { width: 22px; height: 22px; }
  .bn-item.active { color: var(--gs-teal); }
  .bn-dot { position: absolute; top: 4px; right: 50%; margin-right: -13px;
            width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
  .bn-fab { margin-top: -22px; }
  .bn-fab .bn-fab-btn {
    width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gs-teal), #2a8bb0); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(26, 107, 138, .45); margin-bottom: 2px;
  }
  .bn-fab .bn-fab-btn svg { width: 24px; height: 24px; }
  .bn-fab.active .bn-fab-btn { background: linear-gradient(135deg, var(--navy), var(--gs-teal)); }
}

/* ─────────────────────────────── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .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; padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .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% }
}

/* ══════════════════════════════════════════════════════════════
   Mobile PWA experience (2026-07-19)
   Purpose-built card-based mobile screens per the approved plan:
   don't shrink desktop pages — each key screen carries a second,
   mobile-first markup variant. Visibility helpers keep them apart:
   .m-only renders ≤900px, .d-only above it. Media-scoped (no display
   override) so each element keeps its own display value in range.
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 901px) { .m-only { display: none !important; } }
@media (max-width: 900px) {
  .d-only { display: none !important; }

  /* Safety net: even if some future element is wider than the screen, never
     let it stretch the layout viewport (phones would zoom out to fit). */
  body { overflow-x: clip; }

  /* Topbar: the bottom-nav FAB already covers Apply — drop the duplicate */
  .topbar-right > .btn-primary { display: none; }

  /* Big tap targets; 16px inputs also stop iOS auto-zoom on focus */
  .form-control { font-size: 16px; padding: 11px 14px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }

  /* Modals become bottom sheets. z-index must beat the bottom nav (1200) or
     the nav covers the sheet's footer and hides the confirm button. */
  .modal-backdrop { align-items: flex-end; padding: 0; z-index: 1300; }
  .modal {
    max-width: none; border-radius: 18px 18px 0 0; max-height: 88vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetUp .26s var(--ease-out);
  }
  /* Primary action on top, Cancel underneath (iOS action-sheet order) */
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }

  /* Apply form: calendar fills the width, submit row stacks full-width */
  .cal-wrap { max-width: none; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; justify-content: center; }

  /* Leave view page: timeline + documents stack, action buttons stretch */
  .view-cols { grid-template-columns: 1fr !important; }
  .view-actions .btn { flex: 1; min-width: 130px; justify-content: center; }
  .view-actions form { flex: 1; min-width: 130px; display: flex; }
  .view-actions form .btn { width: 100%; }

  /* Admin-only pages: content hidden, friendly card (in base.html) shows */
  .mb-content { display: none; }

  /* Flash toasts: keep clear of the topbar on narrow screens */
  .flash-stack { left: 16px; right: 16px; max-width: none; }

  /* Dim the page behind the slide-in Menu drawer */
  body.sidebar-open::after {
    content: ''; position: fixed; inset: 0; z-index: 99;
    background: rgba(15,30,61,.45); backdrop-filter: blur(2px);
    animation: welcomeFade .2s ease;
  }
}
@keyframes sheetUp { from { transform: translateY(48px); opacity: .5 } to { transform: none; opacity: 1 } }

/* ── Mobile hero (compact greeting header) ── */
.m-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, #1a5c7a 100%);
  border-radius: var(--radius-lg); padding: 18px 18px 16px; margin-bottom: 14px;
  position: relative; overflow: hidden; color: #fff;
}
.m-hero::before {
  content: ''; position: absolute; top: -50%; right: -12%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125,196,216,.16) 0%, transparent 70%);
}
.m-hero::after {
  content: ''; position: absolute; bottom: -45%; right: 16%;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.20) 0%, transparent 70%);
}
.m-hero h2 { font-family: var(--font-display); font-size: 20px; margin-bottom: 3px; position: relative; z-index: 1; }
.m-hero p  { font-size: 12px; color: rgba(255,255,255,.65); position: relative; z-index: 1; }

/* ── Amber note: super-admin on mobile sees the manager experience ── */
.m-admin-note {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--gold-pale); border: 1px solid #ecd9a0; border-radius: 10px;
  padding: 10px 13px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.5; color: #7a6420;
}
.m-admin-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── Horizontally-scrolling balance chips ── */
.m-balances {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-balances::-webkit-scrollbar { display: none; }
.m-bal-chip {
  flex: 0 0 142px; scroll-snap-align: start;
  background: #fff; border: 1px solid rgba(15,30,61,.08);
  border-top: 3px solid var(--type-color, var(--gs-teal));
  border-radius: 12px; padding: 12px 13px; box-shadow: var(--shadow-sm);
}
.m-bal-type { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bal-num  { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.m-bal-num span { font-size: 11px; font-weight: 500; color: var(--gray-400); margin-left: 2px; }
.m-bal-sub  { font-size: 10.5px; color: var(--gray-400); margin-top: 4px; }
/* Chips link through to Leave Balances, same as the desktop cards. */
a.m-bal-chip { display: block; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent }
a.m-bal-chip:active { transform: scale(.97); transition: transform .1s }

/* ── Quick-action tiles ── */
.m-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.m-quick a {
  background: #fff; border: 1px solid rgba(15,30,61,.07); border-radius: 12px;
  padding: 12px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; font-size: 10.5px; font-weight: 600; color: var(--gray-600);
  box-shadow: var(--shadow-sm);
}
.m-quick a:active { background: var(--gray-50); }
.mq-ic {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--info-bg); color: var(--gs-teal);
}

/* ── Section label + tappable list rows ── */
.m-section { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500); margin: 18px 2px 8px; display: flex; align-items: center; justify-content: space-between; }
.m-section a { font-size: 11px; font-weight: 600; color: var(--gs-teal); text-decoration: none; text-transform: none; letter-spacing: 0; }
.m-list { background: #fff; border-radius: 14px; border: 1px solid rgba(15,30,61,.07); box-shadow: var(--shadow-card); overflow: hidden; }
.m-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 60px;
  text-decoration: none; color: inherit; border-bottom: 1px solid var(--gray-100);
}
.m-item:last-child { border-bottom: none; }
.m-item:active { background: var(--gray-50); }
.m-item-main  { flex: 1; min-width: 0; }
.m-item-title { font-size: 13.5px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item-sub   { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item-side  { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.m-chev { color: var(--gray-300); flex-shrink: 0; }
.m-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-muted), var(--gs-teal));
  color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.m-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-empty { padding: 30px 16px; text-align: center; font-size: 13px; color: var(--gray-400); }

/* ── Deputy-style approve card ── */
.m-approve-card {
  background: #fff; border-radius: 14px; border: 1px solid rgba(15,30,61,.07);
  box-shadow: var(--shadow-card); margin-bottom: 12px; overflow: hidden;
}
.m-ap-link { display: block; text-decoration: none; color: inherit; }
.m-ap-link:active { background: var(--gray-50); }
.m-ap-head { display: flex; align-items: center; gap: 11px; padding: 13px 14px 0; }
.m-ap-name { font-size: 14.5px; font-weight: 700; color: var(--navy); line-height: 1.25; }
.m-ap-meta { font-size: 11.5px; color: var(--gray-400); margin-top: 1px; }
.m-ap-body { padding: 10px 14px 13px; }
.m-ap-type { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--gray-600); }
.m-ap-dates {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-50); border-radius: 10px; padding: 10px 12px; margin-top: 8px;
}
.m-ap-drange { font-size: 13.5px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.m-ap-drange small { display: block; font-size: 11px; font-weight: 500; color: var(--gray-400); }
.m-ap-days {
  margin-left: auto; background: var(--info-bg); color: var(--gs-teal);
  font-weight: 800; font-size: 13px; border-radius: 8px; padding: 7px 11px; white-space: nowrap;
}
.m-ap-comment { font-size: 12.5px; color: var(--gray-500); margin-top: 9px; font-style: italic; line-height: 1.45; }
.m-ap-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 14px 14px; border-top: 1px solid var(--gray-100);
}
.m-ap-actions button {
  border: none; padding: 12px; min-height: 46px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
  transition: transform .12s;
}
.m-ap-actions button:active { transform: scale(.97); }
.m-ap-decline {
  color: var(--danger); background: #fff;
  box-shadow: inset 0 0 0 1.5px #fecaca;
}
.m-ap-approve {
  color: #fff; background: linear-gradient(135deg, var(--success), #22b45e);
  box-shadow: 0 3px 10px rgba(22,163,74,.3);
}

/* ── Mobile balance detail card (balances page) ── */
.m-balcard {
  background: #fff; border-radius: 14px; border: 1px solid rgba(15,30,61,.07);
  box-shadow: var(--shadow-card); padding: 16px 16px 15px; margin-bottom: 12px;
  position: relative; overflow: hidden;
}
/* accent strip as a pseudo-element so it doesn't curve around the corners */
.m-balcard::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--type-color, var(--gs-teal));
}
.m-balcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.m-balcard-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.m-balcard-avail { text-align: right; }
.m-balcard-avail b { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.m-balcard-avail small { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin-top: 2px; }
.m-balrow { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--gray-500); padding: 6px 0; border-top: 1px dashed var(--gray-200); }
.m-balrow b { color: var(--gray-700); font-variant-numeric: tabular-nums; }

/* ── Leave Assistant (chat bubble, all screens) ── */
.ast-fab {
  position: fixed; right: 18px; bottom: 24px; z-index: 1150;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--navy), var(--gs-teal)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(15,30,61,.35);
  transition: transform .18s var(--ease-spring), opacity .18s;
}
.ast-fab:hover { transform: scale(1.08); }
.ast-fab.hidden { opacity: 0; pointer-events: none; transform: scale(.6); }
.ast-panel {
  position: fixed; right: 18px; bottom: 24px; z-index: 1350;
  width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 90px);
  background: #fff; border-radius: 18px; border: 1px solid var(--gray-200);
  box-shadow: 0 24px 70px rgba(15,30,61,.35);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97);
  transition: opacity .2s, transform .22s var(--ease-out), visibility .2s;
}
.ast-panel.open { opacity: 1; visibility: visible; transform: none; }
.ast-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  background: linear-gradient(120deg, var(--navy), #1a5c7a); color: #fff;
}
.ast-head-ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ast-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 2px 4px; }
.ast-close:hover { color: #fff; }
.ast-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px;
  background: var(--gray-50); }
.ast-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; }
.ast-msg.bot { background: #fff; border: 1px solid var(--gray-200); color: var(--gray-700);
  border-bottom-left-radius: 4px; align-self: flex-start; }
.ast-msg.me { background: var(--gs-teal); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.ast-msg small { color: var(--gray-400); font-size: 10.5px; }
.ast-link { display: inline-block; margin-top: 4px; color: var(--gs-teal); font-weight: 600;
  font-size: 12px; text-decoration: none; }
.ast-typing i { display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gray-300); margin-right: 3px; animation: astBlink 1s infinite; }
.ast-typing i:nth-child(2) { animation-delay: .15s; }
.ast-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes astBlink { 0%,80%,100% { opacity: .3 } 40% { opacity: 1 } }
.ast-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 4px; background: #fff;
  border-top: 1px solid var(--gray-100); max-height: 118px; overflow-y: auto; }
.ast-chip { border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-700);
  border-radius: 16px; padding: 6px 12px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); transition: all .13s; }
.ast-chip:hover { border-color: var(--gs-teal); color: var(--gs-teal); background: var(--info-bg); }
.ast-chip-action { background: var(--gold-pale); border-color: var(--gold); color: #7a6420; }
.ast-inputrow { display: flex; gap: 8px; padding: 9px 12px 12px; background: #fff; }
.ast-inputrow input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: 20px;
  padding: 8px 15px; font-size: 13px; font-family: var(--font-body); }
.ast-inputrow input:focus { outline: none; border-color: var(--gs-teal); }
.ast-inputrow button { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--gs-teal); color: #fff; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  /* sit above the bottom nav; panel keeps clear of it too */
  .ast-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  .ast-panel { right: 8px; left: 8px; width: auto;
               bottom: calc(84px + env(safe-area-inset-bottom, 0px)); height: 480px; }
  .ast-inputrow input { font-size: 16px; }
}

/* ── "Best on desktop" block for admin-only pages ── */
.m-desktop-card {
  background: #fff; border-radius: 16px; border: 1px solid rgba(15,30,61,.07);
  box-shadow: var(--shadow-card); padding: 36px 24px; text-align: center;
}
.m-desktop-card .mdc-ic {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  background: var(--info-bg); color: var(--gs-teal);
  display: flex; align-items: center; justify-content: center;
}
.m-desktop-card h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.m-desktop-card p  { font-size: 13px; color: var(--gray-500); line-height: 1.6; max-width: 300px; margin: 0 auto 20px; }
.m-desktop-card .btn { width: 100%; justify-content: center; }

/* ─────────────── PWA install helper (banner + instructions sheet) ─────────── */
/* One-time, dismissable nudge shown on mobile web (never once installed), plus
   a branded sheet with platform-correct steps. Top-anchored so it never fights
   the bottom nav or the assistant FAB. */
.pwa-banner {
  position: fixed; top: calc(var(--topbar-h) + 10px); left: 12px; right: 12px; z-index: 1150;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,30,61,.18);
  display: none; align-items: center; gap: 11px; padding: 11px 12px;
  animation: pwaBannerDrop .32s var(--ease-out);
}
.pwa-banner.show { display: flex; }
@keyframes pwaBannerDrop { from { transform: translateY(-14px); opacity: 0 } to { transform: none; opacity: 1 } }
@media (min-width: 901px) { .pwa-banner { display: none !important; } }
.pwa-banner-ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gs-teal), #2a8bb0); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.pwa-banner-txt { flex: 1; min-width: 0; }
.pwa-banner-txt strong { display: block; font-size: 12.5px; color: var(--navy); }
.pwa-banner-txt span { font-size: 11px; color: var(--gray-500); }
.pwa-banner-x { background: none; border: none; color: var(--gray-400); font-size: 21px;
  cursor: pointer; padding: 0 2px; line-height: 1; flex-shrink: 0; }

.pwa-sheet-backdrop {
  position: fixed; inset: 0; z-index: 1350; background: rgba(15,30,61,.5);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.pwa-sheet-backdrop.open { display: flex; }
.pwa-sheet {
  background: #fff; width: 100%; max-width: 430px; border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow-lg); animation: modalIn .24s var(--ease-out);
  max-height: 92vh; overflow-y: auto;
}
@media (max-width: 560px) {
  .pwa-sheet-backdrop { align-items: flex-end; }
  .pwa-sheet { max-width: none; border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); animation: sheetUp .28s var(--ease-out); }
}
.pwa-sheet-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #163065 55%, var(--gs-teal) 100%);
  color: #fff; padding: 24px 24px 20px; text-align: center; position: relative;
}
.pwa-sheet-hero .app-mark { width: 58px; height: 58px; border-radius: 15px; margin: 0 auto 12px;
  display: block; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.pwa-sheet-hero h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 4px; }
.pwa-sheet-hero p { font-size: 12.5px; opacity: .82; line-height: 1.45; }
.pwa-sheet-close { position: absolute; top: 12px; right: 14px; background: rgba(255,255,255,.16);
  border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px;
  line-height: 1; cursor: pointer; }
.pwa-sheet-close:hover { background: rgba(255,255,255,.28); }
.pwa-sheet-body { padding: 20px 22px 24px; }
.pwa-step { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 15px; }
.pwa-step:last-child { margin-bottom: 0; }
.pwa-step-n { width: 27px; height: 27px; border-radius: 50%; background: var(--info-bg);
  color: var(--gs-teal); font-weight: 800; font-size: 13px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; }
.pwa-step-txt { font-size: 13.5px; color: var(--gray-700); line-height: 1.5; padding-top: 3px; }
.pwa-step-txt b { color: var(--navy); }
.pwa-ios-icon { display: inline-flex; vertical-align: -4px; margin: 0 1px; color: var(--gs-teal); }
.pwa-note { font-size: 12.5px; color: var(--gray-600); background: var(--gray-50); border-radius: 10px;
  padding: 12px 14px; line-height: 1.55; }
.pwa-note b { color: var(--navy); }

/* ─────────────────────────────── Help & Guides ─────────────────────────────── */
.help-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #163065 50%, var(--gs-teal) 100%);
  border-radius: 16px; padding: 32px 36px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden;
}
.help-hero-text h1 { font-family: var(--font-display); font-size: 30px; color: #fff; margin-bottom: 8px; }
.help-hero-text p { font-size: 14.5px; color: rgba(255,255,255,.8); line-height: 1.6; max-width: 560px; }
.help-hero-art { flex-shrink: 0; opacity: .9; }
@media (max-width: 640px) { .help-hero-art { display: none; } }

.help-topics {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 32px;
}
.help-topic {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.help-topic:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--gs-teal); }
.help-topic-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.help-topic span:last-child { display: flex; flex-direction: column; }
.help-topic strong { font-size: 13.5px; color: var(--gray-800); }
.help-topic small { font-size: 11.5px; color: var(--gray-400); }

.help-section { margin-bottom: 38px; scroll-margin-top: 80px; }
.help-section-role {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 16px; padding: 24px 26px;
}
.help-h2 { font-size: 20px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.help-h2-ic { font-size: 20px; }
.help-lead { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 18px; }

.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.help-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px; }
.help-card-ic { font-size: 24px; margin-bottom: 10px; }
.help-card h4 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 5px; }
.help-card p { font-size: 12.5px; color: var(--gray-500); line-height: 1.55; }

.help-steps { display: flex; flex-direction: column; gap: 12px; }
.help-step { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 16px 18px; }
.help-step-n {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gs-teal); color: #fff;
  font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.help-step h4 { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 3px; }
.help-step p { font-size: 13px; color: var(--gray-500); line-height: 1.55; }

.help-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .help-compare { grid-template-columns: 1fr; } }
.help-compare-card { background: #fff; border: 1px solid var(--gray-200); border-top: 3px solid; border-radius: 12px; padding: 18px 20px; }
.help-compare-tag { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.help-compare-card p { font-size: 13px; color: var(--gray-600); line-height: 1.6; }

.help-status-row { display: flex; gap: 8px; flex-wrap: wrap; }
.help-footer { text-align: center; padding: 24px; color: var(--gray-500); font-size: 13.5px; }

/* Help controls: role tabs + view toggle */
.help-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.help-tabs { display: inline-flex; gap: 6px; background: var(--gray-100); padding: 5px; border-radius: 11px; }
.help-tab {
  border: none; background: transparent; cursor: pointer; padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--gray-500); transition: background .15s, color .15s, box-shadow .15s;
}
.help-tab:hover { color: var(--gray-700); }
.help-tab.active { background: #fff; color: var(--gs-teal); box-shadow: var(--shadow-sm); }
.help-viewtoggle { display: inline-flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 10px; }
.help-viewtoggle button {
  border: none; background: transparent; cursor: pointer; padding: 7px 14px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--gray-500); transition: background .15s, color .15s, box-shadow .15s;
}
.help-viewtoggle button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* View mode switching */
.help-wrap.mode-illustrated .view-screenshot { display: none; }
.help-wrap.mode-shots .view-illustrated { display: none; }

/* Screenshot figures */
.view-screenshot { display: flex; flex-direction: column; gap: 22px; }
.help-shot { margin: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.help-shot img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--gray-100); }
.help-shot-ph {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 200px; background: repeating-linear-gradient(45deg, var(--gray-50), var(--gray-50) 12px, #fff 12px, #fff 24px);
  color: var(--gray-400); border-bottom: 1px solid var(--gray-100);
}
.help-shot-ph span { font-size: 30px; opacity: .6; }
.help-shot-ph small { font-size: 12px; font-weight: 600; }
.help-shot.missing img { display: none; }
.help-shot.missing .help-shot-ph { display: flex; }
.help-shot figcaption { padding: 13px 18px; font-size: 13px; color: var(--gray-600); line-height: 1.5; }
.help-shot figcaption strong { color: var(--gray-800); }

/* ─────────────────────────────── Welcome modal ─────────────────────────────── */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,30,61,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: welcomeFade .25s ease;
}
.welcome-overlay.closing { opacity: 0; transition: opacity .2s; }
@keyframes welcomeFade { from { opacity: 0; } to { opacity: 1; } }
.welcome-modal {
  width: 100%; max-width: 460px; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: welcomePop .3s var(--ease-spring);
}
@keyframes welcomePop { from { transform: scale(.92) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.welcome-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #163065 50%, var(--gs-teal) 100%);
  padding: 30px 28px 26px; text-align: center; color: #fff;
}
.welcome-hero-mark { font-size: 40px; margin-bottom: 8px; }
.welcome-hero h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; line-height: 1.25; }
.welcome-hero p { font-size: 13.5px; color: rgba(255,255,255,.82); line-height: 1.55; }
.welcome-body { padding: 22px 26px 8px; display: flex; flex-direction: column; gap: 14px; }
.welcome-feat { display: flex; gap: 13px; align-items: flex-start; }
.welcome-feat-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.welcome-feat strong { display: block; font-size: 13.5px; color: var(--gray-800); }
.welcome-feat span:last-child { font-size: 12.5px; color: var(--gray-500); line-height: 1.5; }
.welcome-actions { padding: 16px 26px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.welcome-dismiss { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--gray-500); cursor: pointer; }
.welcome-dismiss input { width: 15px; height: 15px; cursor: pointer; }
.welcome-btns { display: flex; gap: 8px; }
/* Mobile: the welcome tour arrives as a bottom sheet, like every other modal */
@media (max-width: 640px) {
  .welcome-overlay { align-items: flex-end; padding: 0; z-index: 1300; }
  .welcome-modal {
    max-width: none; border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetUp .3s var(--ease-out);
  }
  .welcome-btns { flex: 1; }
  .welcome-btns .btn { flex: 1; justify-content: center; }
}
