:root {
  --navy: #0e1b33;
  --navy-2: #16274a;
  --navy-3: #1e3258;
  --navy-4: #28406b;
  --ice: #8fd9d4;
  --ice-dim: #5fb8b2;
  --ice-tint: rgba(143, 217, 212, 0.12);
  --red: #e6392c;
  --red-dark: #c22a1f;
  --red-tint: rgba(230, 57, 44, 0.14);
  --white: #f4f8f8;
  --muted: #9db0c7;
  --muted-2: #6f83a0;
  --good: #34c789;
  --good-tint: rgba(52, 199, 137, 0.14);
  --warn: #e0a72f;
  --warn-tint: rgba(224, 167, 47, 0.14);
  --bad: var(--red);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --font: 'Poppins', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Anton', 'Bebas Neue', sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 14px 32px -16px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--navy);
  background-image: radial-gradient(circle at 15% 0%, rgba(143, 217, 212, 0.08), transparent 45%),
    radial-gradient(circle at 100% 20%, rgba(230, 57, 44, 0.08), transparent 40%);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ice); }
.hidden { display: none !important; }
::selection { background: var(--red-tint); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--navy-4); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease);
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(230, 57, 44, 0.6); }
.btn-primary:hover:not(:disabled) { background: var(--red-dark); }
.btn-ice { background: var(--ice); color: var(--navy); box-shadow: 0 8px 20px -8px rgba(143, 217, 212, 0.45); }
.btn-ice:hover:not(:disabled) { background: var(--ice-dim); }
.btn-ghost { background: var(--navy-3); color: var(--white); }
.btn-ghost:hover:not(:disabled) { background: var(--navy-4); }
.btn-outline { background: transparent; color: var(--ice); border: 1px solid var(--navy-4); }
.btn-outline:hover:not(:disabled) { border-color: var(--ice); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(230, 57, 44, 0.4); }
.btn-danger:hover:not(:disabled) { background: var(--red-tint); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-icon { padding: 9px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.2px; }
.check-field { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; cursor: pointer; }
.check-field input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ice); flex-shrink: 0; }
.check-field span { font-size: 13.5px; color: var(--white); line-height: 1.4; }
.input, select.input, textarea.input {
  background: var(--navy);
  border: 1px solid var(--navy-4);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14.5px;
  color: var(--white);
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  width: 100%;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-tint); }
textarea.input { resize: vertical; min-height: 70px; }
/* Native date/time picker glyphs default to black and disappear on our dark inputs. */
input[type="date"].input, input[type="time"].input { color-scheme: dark; }
.input-row { display: flex; gap: 10px; }
.password-row { position: relative; }
.password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); padding: 4px;
}
.hint { font-size: 12px; color: var(--muted-2); }
.error-text { font-size: 13px; color: var(--red); min-height: 18px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--navy-4); background: var(--navy-3); color: var(--white);
  border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  transition: all 0.15s var(--ease);
}
.chip.active, .chip:hover { border-color: var(--ice); color: var(--ice); background: var(--ice-tint); }

/* ---------- Auth screen ---------- */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--navy-2); border: 1px solid var(--navy-3);
  border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow);
  animation: rise 0.4s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-logo { width: 250px; max-width: 78%; height: auto; display: block; margin: 0 auto 12px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45)); }
.auth-sub { display: block; text-align: center; color: var(--muted); font-size: 13px; margin-top: -4px; margin-bottom: 22px; }
.auth-tabs { display: flex; background: var(--navy); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: none; background: none; padding: 9px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); transition: all 0.15s var(--ease); }
.auth-tab.active { background: var(--red); color: #fff; }
.lock-banner {
  background: var(--warn-tint); border: 1px solid rgba(224, 167, 47, 0.4); color: var(--warn);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; text-align: center;
}

/* Password recovery: the log-in card's other faces */
.link-btn { background: none; border: none; padding: 4px 2px; color: var(--ice); font-size: 13px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 6px; }
.field-foot { display: flex; justify-content: flex-end; margin: -6px 0 4px; }
.auth-title { font-size: 20px; text-align: center; margin-bottom: 6px; }
.auth-lead { color: var(--muted); font-size: 13.5px; line-height: 1.55; text-align: center; margin-bottom: 18px; }
.auth-lead b { color: var(--white); overflow-wrap: anywhere; }
.auth-foot { color: var(--muted-2); font-size: 12.5px; line-height: 1.5; text-align: center; margin-top: 14px; }
.auth-back { display: block; margin: 12px auto 0; }
.auth-icon { width: 60px; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin: 2px auto 14px; animation: rise 0.3s var(--ease); }
.auth-icon.ok { background: var(--good-tint); color: var(--good); }
.auth-icon.warn { background: var(--warn-tint); color: var(--warn); }
.auth-form > .btn + .btn { margin-top: 10px; }
#forgot-form .error-text, #reset-form .error-text { margin-bottom: 8px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy-2); border-right: 1px solid var(--navy-3);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
/* The logo is a button: tapping it goes Home. */
.brand { position: relative; display: flex; align-items: center; justify-content: center; padding: 6px 8px 18px; background: none; border: none; cursor: pointer; border-radius: 16px; -webkit-tap-highlight-color: transparent; }
.brand-badge { display: none; position: absolute; top: 2px; right: 2px; } /* shown only where the real Home tab-btn (and its own badge) is hidden — see the 860px media query below */
.brand img { width: 150px; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4)); transition: transform 0.15s var(--ease); }
.brand:hover img { transform: scale(1.03); }
.brand:active img { transform: scale(0.96); }
.brand:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted-2); text-transform: uppercase; padding: 14px 12px 6px; }
.tabbar { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.tab-btn {
  display: flex; align-items: center; gap: 12px; border: none; background: none; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  position: relative;
}
.tab-btn svg { width: 19px; height: 19px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }
.tab-btn span { flex: 1; }
.tab-btn:hover { background: var(--navy-3); color: var(--white); }
.tab-btn.active { background: var(--red-tint); color: var(--ice); box-shadow: inset 3px 0 0 var(--red); }
.count-badge {
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.count-badge.hidden { display: none; }

.content { padding: 28px 32px 100px; max-width: 980px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.panel-head h2 { font-size: 22px; }
.panel-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

.tab-panel { display: none; animation: fadeIn 0.25s var(--ease); }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.card {
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 52px; height: 52px; font-size: 18px; flex-shrink: 0; }
.profile-id { flex: 1; min-width: 0; }
.profile-id .list-row-title { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-balance { text-align: right; flex-shrink: 0; }
.profile-balance b { font-size: 16px; }
.pf-note { background: var(--ice-tint); border: 1px solid rgba(143, 217, 212, 0.35); color: var(--ice); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.pf-note.hidden { display: none; }
.pf-logout { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* ---------- Admin: email health ---------- */
.email-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.email-log { margin-top: 12px; display: flex; flex-direction: column; }
.email-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--navy-3); font-size: 13px; }
.email-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.email-dot.sent { background: var(--good-tint); color: var(--good); }
.email-dot.failed { background: var(--red-tint); color: var(--red); }
.email-dot.skipped { background: var(--navy-3); color: var(--muted); }
.email-row b { font-weight: 600; }
.email-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; overflow-wrap: anywhere; }
.email-row .err { color: var(--red); }

/* ---------- Admin: notification message templates ---------- */
.tpl-block { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--navy-3); }
.tpl-block:last-of-type { border-bottom: none; margin-bottom: 4px; padding-bottom: 0; }
.tpl-preview {
  background: var(--navy); border: 1px solid var(--navy-4); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 13.5px; font-family: inherit; color: var(--muted); white-space: pre-wrap; margin: 0;
}
.tpl-block code { background: var(--navy-3); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; stroke: var(--muted-2); margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.badge-good { background: var(--good-tint); color: var(--good); }
.badge-warn { background: var(--warn-tint); color: var(--warn); }
.badge-bad { background: var(--red-tint); color: var(--red); }
.badge-muted { background: var(--navy-3); color: var(--muted); }
.badge-ice { background: var(--ice-tint); color: var(--ice); }

/* ---------- Session card ---------- */
.session-card { display: flex; flex-direction: column; gap: 14px; }
.session-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.session-date { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.5px; line-height: 1.1; }
.session-meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.session-meta svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; }
.countdown { font-size: 12.5px; color: var(--ice); font-weight: 600; }
.countdown.locked { color: var(--warn); }
.attendee-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--navy-3); }
.attendee-row:first-of-type { border-top: none; }
.avatar {
  width: 30px; height: 30px; border-radius: 999px; background: var(--navy-4); color: var(--ice);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-right: 10px;
}
.attendee-name { display: flex; align-items: center; font-size: 13.5px; }
.session-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.progress-track { height: 6px; background: var(--navy-3); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--ice-dim), var(--ice)); border-radius: 999px; transition: width 0.3s var(--ease); }

/* ---------- Calendar ---------- */
/* Sideways drags belong to the calendar (swipe to change month); vertical drags still scroll the page. */
.cal-card { touch-action: pan-y; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-header h3 { font-size: 16px; font-family: var(--font-display); letter-spacing: 0.5px; }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted-2); font-weight: 700; padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--navy-3); background: var(--navy);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 13px; font-weight: 600; transition: all 0.15s var(--ease); position: relative;
}
.cal-day:not(.cal-day-empty):not(.cal-day-past):hover { border-color: var(--ice); }
.cal-day-empty { visibility: hidden; }
.cal-day-past { opacity: 0.35; }
.cal-day-today { box-shadow: 0 0 0 2px var(--ice) inset; }
.cal-day-selected { background: var(--ice); color: var(--navy); border-color: var(--ice); }
.cal-day-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--red); position: absolute; bottom: 5px; }
.cal-day-pending { animation: cal-pending 0.9s ease-in-out infinite; }
@keyframes cal-pending { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.cal-legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }

/* ---------- Wallet ---------- */
.wallet-hero {
  background: linear-gradient(135deg, var(--navy-3), var(--navy-2)); border: 1px solid var(--navy-4);
  border-radius: var(--radius); padding: 24px; text-align: center; position: relative; overflow: hidden;
}
.wallet-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 80% 0%, rgba(143,217,212,0.16), transparent 55%);
}
.wallet-hero-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; position: relative; }
.wallet-hero-amount { font-family: var(--font-display); font-size: 42px; color: var(--ice); margin: 6px 0 16px; position: relative; letter-spacing: 0.5px; }
.ledger-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--navy-3); }
.ledger-row:first-child { border-top: none; }
.ledger-desc { font-size: 13.5px; font-weight: 600; }
.ledger-date { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.ledger-amount { font-weight: 700; font-size: 14px; }
.ledger-amount.positive { color: var(--good); }
.ledger-amount.negative { color: var(--red); }

.airtel-box { background: var(--navy); border: 1px dashed var(--navy-4); border-radius: var(--radius-sm); padding: 16px; text-align: center; margin: 16px 0; }
.airtel-number { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; color: var(--white); margin: 4px 0; }
.ref-code { display: inline-block; background: var(--ice-tint); color: var(--ice); font-weight: 700; padding: 6px 14px; border-radius: 8px; letter-spacing: 1px; margin-top: 8px; }
.step-list { text-align: left; font-size: 13px; color: var(--muted); margin-top: 14px; padding-left: 18px; }
.step-list li { margin-bottom: 6px; }

.push-wait { text-align: center; padding: 6px 0 2px; }
.push-spinner { width: 46px; height: 46px; border-width: 4px; margin: 6px auto 16px; }
.push-wait-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.push-icon { width: 60px; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin: 4px auto 14px; animation: rise 0.3s var(--ease); }
.push-icon.ok { background: var(--good-tint); color: var(--good); }
.push-icon.bad { background: var(--red-tint); color: var(--red); }

/* ---------- Table-ish lists ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--navy-3); flex-wrap: wrap; }
.list-row:first-child { border-top: none; }
.list-row-main { display: flex; align-items: center; }
.list-row-title { font-size: 14px; font-weight: 600; }
.list-row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--navy); border-radius: 999px; padding: 3px; border: 1px solid var(--navy-4); }
.seg button { border: none; background: none; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--ice); color: var(--navy); }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Sessions: post / manage ---------- */
.mm-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
/* A boxed warning inside a form or a modal (session timing, a wallet about to be wiped, and so on). */
.warn-hint { font-size: 12.5px; line-height: 1.45; color: var(--warn); background: var(--warn-tint); border: 1px solid rgba(224, 167, 47, 0.35); border-radius: var(--radius-sm); padding: 9px 11px; margin: -4px 0 14px; }
.warn-hint.hidden { display: none; }
.warn-hint b { color: inherit; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 10, 20, 0.65); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
  animation: fadeIn 0.15s var(--ease);
}
.modal-card {
  width: 100%; max-width: 440px; background: var(--navy-2); border: 1px solid var(--navy-3);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto;
  animation: rise 0.2s var(--ease);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-close { position: absolute; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; padding: 0 16px; pointer-events: none; }
.toast {
  background: var(--navy-3); border: 1px solid var(--navy-4); color: var(--white); padding: 12px 18px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow);
  animation: toastIn 0.2s var(--ease); max-width: 420px; text-align: center;
}
.toast.success { border-color: var(--good); color: var(--good); }
.toast.error { border-color: var(--red); color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Loading ---------- */
.spinner { width: 20px; height: 20px; border-radius: 999px; border: 2.5px solid var(--navy-4); border-top-color: var(--ice); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--navy-3) 25%, var(--navy-4) 37%, var(--navy-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); height: 90px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Sticky mobile action bar ---------- */
.push-bar { display: none; }

/* ---------- Responsive ---------- */
.content { min-width: 0; }

@media (max-width: 860px) {
  /* The header row is only as tall as its tabs and the page takes the rest; without this a short page splits the spare
     screen height with the header and the top bar balloons to several times its size. */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: auto; align-self: start; flex-direction: row; align-items: center;
    padding: 8px 12px; overflow-x: auto; z-index: 50; border-right: none; border-bottom: 1px solid var(--navy-3);
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  /* On phones the logo IS the Home tab (same highlight as an active tab), so Home isn't repeated in the strip. */
  .brand { padding: 4px 10px; flex: none; border-radius: var(--radius-sm); }
  .brand img { width: auto; height: 42px; }
  .brand.active { background: var(--red-tint); }
  .brand-badge { display: inline-flex; } /* .hidden (higher specificity) still wins when the count is 0 */
  .tab-btn[data-tab="home"] { display: none; }
  .tabbar { flex-direction: row; flex: none; }
  .nav-label { display: none; }
  .tab-btn { flex-direction: column; gap: 3px; padding: 7px 12px; font-size: 10.5px; }
  .tab-btn span { flex: none; }
  .tab-btn svg { width: 20px; height: 20px; }
  .tab-btn.active { box-shadow: none; background: var(--red-tint); }
  .content { padding: 18px 16px 90px; }
  .wallet-hero-amount { font-size: 34px; }
}

@media (max-width: 520px) {
  .panel-head { flex-direction: column; align-items: flex-start; }
  .session-date { font-size: 22px; }
  .modal-card { padding: 18px; }
}

/* ---------- DUPR (Admin → DUPR, and the privacy notice) ---------- */
.dupr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dupr-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; }
.dupr-list { margin-top: 12px; border: 1px solid var(--navy-3); border-radius: var(--radius-sm); overflow: hidden; }
.dupr-game { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--navy-3); }
.dupr-game:first-child { border-top: none; }
label.dupr-game { cursor: pointer; transition: background 0.15s var(--ease); }
label.dupr-game:hover { background: var(--navy-3); }
.dupr-game input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ice); flex-shrink: 0; }
.dupr-game-main { flex: 1; min-width: 0; }
.dupr-when { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.dupr-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.dupr-team { min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.dupr-team:last-child { text-align: right; }
.dupr-score { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.5px; color: var(--ice); white-space: nowrap; }
.dupr-score i { font-style: normal; color: var(--muted-2); padding: 0 3px; }
.dupr-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; background: var(--navy-3); color: var(--ice); padding: 1px 6px; border-radius: 6px; }
.dupr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dupr-tag { font-size: 11.5px; line-height: 1.4; padding: 2px 9px; border-radius: 999px; background: var(--navy-3); color: var(--muted); }
.dupr-tag.warn { background: var(--warn-tint); color: var(--warn); }
.dupr-tag.bad { background: var(--red-tint); color: var(--red); }
.dupr-more { margin-top: 14px; }
.dupr-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.dupr-more summary:hover { color: var(--white); }

.privacy { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.privacy h4 { color: var(--white); font-size: 13.5px; margin: 16px 0 6px; }
.privacy h4:first-child { margin-top: 0; }
.privacy ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.privacy b { color: var(--white); }

@media (max-width: 520px) {
  .dupr-sides { grid-template-columns: 1fr; gap: 4px; }
  .dupr-team:last-child { text-align: left; }
}

/* A save-time heads-up that never blocks anything: "this game won't be sent to DUPR". */
.toast.warn { border-color: var(--warn); color: var(--warn); }

/* The Home reminder to add a DUPR ID. */
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 14px 16px; border-color: var(--navy-4); }
.nudge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.nudge-text b { font-size: 14px; }
.nudge-text span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.nudge-actions { display: flex; gap: 8px; }

/* Connecting to DUPR: its login frame, the member's connection card, and the admin's connection panel. */
.dupr-frame-wrap { background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.dupr-frame { display: block; width: 100%; height: min(60vh, 520px); border: 0; background: #fff; }
.dupr-conn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dupr-rating-line { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--muted); }
.dupr-rating-line b { color: var(--ice); font-family: var(--font-display); font-size: 20px; letter-spacing: 0.5px; margin-left: 4px; font-weight: 400; }
.dupr-game-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dupr-health { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.dupr-events { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.dupr-results { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; }
.dupr-results li { margin: 4px 0; overflow-wrap: anywhere; }

/* Help & support: a member's own requests (Profile), and an admin's inbox (Requests). */
.support-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.support-item { border: 1px solid var(--navy-3); border-radius: var(--radius-sm); padding: 10px 12px; }
.support-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.support-msg { font-size: 13.5px; line-height: 1.5; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-reply { font-size: 13px; line-height: 1.5; margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--navy-3); color: var(--white); overflow-wrap: anywhere; }
.support-row { align-items: flex-start; }
.link-btn.sb-report { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.link-btn.sb-report:hover { color: var(--white); }
