/* ==========================================================================
   edZeb Referral Partner Platform
   ==========================================================================
   1.  Tokens
   2.  Base & typography
   3.  Buttons
   4.  Forms
   5.  Alerts
   6.  Status badges
   7.  Auth screens
   8.  App shell (sidebar, drawer)
   9.  Header band & page content
   10. Cards & panels
   11. Tables
   12. Dashboard
   13. Referrals list & detail modal
   14. What happens next
   15. Payouts
   16. Settings
   17. Student verification
   18. Admin
   ========================================================================== */


/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
    /* Shell — matched to the refer & earn landing page */
    --shell: #0d1f1e;
    --shell-raised: #163330;
    --shell-hover: #1c403c;
    --shell-deep: #081413;

    /* Accent.
       --teal and --gold are the landing values and belong on dark surfaces.
       --emerald is the CTA fill and works on both.
       --teal-ink / --gold-ink are the darkened versions for text on white. */
    --teal: #32dbc6;
    --gold: #fec92d;
    --gold-deep: #f5a623;
    --emerald: #0d8d7c;
    --emerald-hover: #0a7566;
    --teal-ink: #0a7c6d;
    --gold-ink: #8a6a00;
    --teal-tint: #E4F5F1;

    /* Workspace */
    --bg: #F5F8F7;
    --surface: #FFFFFF;
    --surface-hover: #F0F5F3;
    --surface-sunken: #F7FAF9;

    /* Text on shell (dark) */
    --paper: #FFFFFF;
    --paper-muted: #B7CFC9;

    /* Text on workspace (light) */
    --ink: #0B211D;
    --ink-muted: #4B615C;
    --ink-faint: #7C8F8A;

    /* Status */
    --status-info-bg: #EAF2FE;
    --status-info-text: #1D4ED8;
    --status-primary-bg: #ECEBFD;
    --status-primary-text: #4338CA;
    --status-purple-bg: #F1EBFE;
    --status-purple-text: #6D28D9;
    --status-amber-bg: #FDF1DC;
    --status-amber-text: #92610B;
    --status-orange-bg: #FCE9DC;
    --status-orange-text: #9A4A14;
    --status-yellow-bg: #FBF3D2;
    --status-yellow-text: #92720A;
    --status-success: #12A150;
    --status-success-bg: #DFF5E8;
    --status-success-text: #0D7A3C;
    --status-gray-bg: #EDF1F0;
    --status-gray-text: #55635F;
    --status-danger: #E0473E;
    --status-danger-bg: #FBE4E2;
    --status-danger-text: #A32A22;

    /* Borders */
    --hairline: rgba(255, 255, 255, 0.14);
    --hairline-ink: rgba(11, 33, 29, 0.08);
    --hairline-ink-soft: rgba(11, 33, 29, 0.06);

    /* Elevation — cards lift off the workspace instead of relying on outlines */
    --shadow-xs: 0 1px 2px rgba(11, 33, 29, 0.05);
    --shadow-sm: 0 1px 2px rgba(11, 33, 29, 0.04), 0 4px 12px rgba(11, 33, 29, 0.05);
    --shadow-md: 0 2px 4px rgba(11, 33, 29, 0.04), 0 14px 32px rgba(11, 33, 29, 0.09);
    --ring-emerald: 0 0 0 3px rgba(13, 141, 124, 0.18);

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-pill: 999px;

    /* Fonts */
    --font-heading: "Epilogue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}


/* ==========================================================================
   2. Base & typography
   ========================================================================== */
body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

a { color: var(--emerald); }
a:hover { color: var(--emerald-hover); }

.text-secondary { color: var(--ink-muted) !important; }

:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

/* off-screen input that catches bots */
.app-honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}


/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--r-pill);
    padding: 0.65rem 1.5rem;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(.98); }

.btn-primary {
    background-color: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--emerald-hover);
    border-color: var(--emerald-hover);
    color: #fff;
}

.btn-secondary, .btn-outline-secondary {
    background-color: transparent;
    border: 1px solid var(--hairline-ink);
    color: var(--ink);
}
.btn-secondary:hover, .btn-outline-secondary:hover {
    background-color: var(--surface-hover);
    border-color: var(--hairline-ink);
    color: var(--ink);
}

.btn-link { padding: 0; color: var(--emerald); font-weight: 500; }
.btn-link:hover { color: var(--emerald-hover); }

.btn-success { background-color: var(--status-success); border-color: var(--status-success); }
.btn-success:hover { background-color: var(--status-success-text); border-color: var(--status-success-text); }

.btn-danger { background-color: var(--status-danger); border-color: var(--status-danger); }
.btn-danger:hover { background-color: var(--status-danger-text); border-color: var(--status-danger-text); }


/* ==========================================================================
   4. Forms
   ========================================================================== */
.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.form-optional { font-weight: 400; color: var(--ink-muted); }
.form-hint { margin: 5px 0 0; font-size: 12px; color: var(--ink-muted); }

.form-control, .form-select {
    min-height: 42px;
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background-color: var(--surface);
}
textarea.form-control { min-height: 84px; }
.form-control:focus, .form-select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(13, 141, 124, 0.18);
}
.form-check-input:checked {
    background-color: var(--emerald);
    border-color: var(--emerald);
}
.invalid-feedback { color: var(--status-danger); font-size: 13px; }

/* grouped fields within a longer form */
.form-card-title { margin: 0 0 4px; font-size: 17px; }
.form-card-sub { margin: 0 0 22px; font-size: 13px; color: var(--ink-muted); }

.form-section + .form-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline-ink);
}
.form-section-title {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline-ink);
}
.form-actions .btn { flex: none; }
.form-actions p { margin: 0; font-size: 12px; color: var(--ink-muted); }


/* ==========================================================================
   5. Alerts
   ========================================================================== */
.alert { border: none; border-radius: var(--r-sm); font-size: 14px; }
.alert-success { background: var(--status-success-bg); color: var(--status-success-text); }
.alert-warning { background: var(--status-amber-bg); color: var(--status-amber-text); }
.alert-danger { background: var(--status-danger-bg); color: var(--status-danger-text); }
.alert-info { background: var(--status-info-bg); color: var(--status-info-text); }


/* ==========================================================================
   6. Status badges
   ========================================================================== */
.app-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}
.app-status-badge.is-info { background: var(--status-info-bg); color: var(--status-info-text); }
.app-status-badge.is-primary { background: var(--status-primary-bg); color: var(--status-primary-text); }
.app-status-badge.is-purple { background: var(--status-purple-bg); color: var(--status-purple-text); }
.app-status-badge.is-amber { background: var(--status-amber-bg); color: var(--status-amber-text); }
.app-status-badge.is-orange { background: var(--status-orange-bg); color: var(--status-orange-text); }
.app-status-badge.is-yellow { background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.app-status-badge.is-success { background: var(--status-success-bg); color: var(--status-success-text); }
.app-status-badge.is-gray { background: var(--status-gray-bg); color: var(--status-gray-text); }
.app-status-badge.is-danger { background: var(--status-danger-bg); color: var(--status-danger-text); }


/* ==========================================================================
   7. Auth screens (login, signup, forgot, reset, admin login)
   ========================================================================== */
body.app-auth-page {
    background: var(--shell);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(100%, 27rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}
.auth-brand { display: inline-block; text-decoration: none; }
.auth-brand img { display: block; height: 30px; width: auto; }

.auth-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 36px 34px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--r-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.auth-panel-head h1 { margin: 0 0 6px; font-size: 26px; color: var(--paper); }
.auth-panel-head p { margin: 0 0 26px; font-size: 14px; color: rgba(255, 255, 255, 0.60); }

/* the light Bootstrap alert tints don't work on a dark card */
.auth-panel .alert { margin-bottom: 18px; padding: 11px 14px; font-size: 13px; }
.auth-panel .alert-danger {
    background: rgba(224, 71, 62, 0.14);
    border: 1px solid rgba(224, 71, 62, 0.32);
    color: #FFB4AE;
}
.auth-panel .alert-success {
    background: rgba(50, 219, 198, 0.12);
    border: 1px solid rgba(50, 219, 198, 0.28);
    color: var(--teal);
}

/* white is Google's own approved button style */
.auth-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    background: #FFFFFF;
    color: #1F1F1F;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.auth-oauth:hover, .auth-oauth:focus-visible {
    background: #FFFFFF;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(50, 219, 198, 0.20);
    color: #1F1F1F;
}
.auth-oauth i { font-size: 17px; }
.auth-oauth-mark { flex-shrink: 0; display: block; width: 18px; height: 18px; }

.auth-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.40);
}
.auth-or::before, .auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-field { margin-bottom: 18px; }
.auth-field-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.auth-field label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }

/* deliberately not teal — the accent belongs to the submit button */
.auth-field-link {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
}
.auth-field-link:hover { color: var(--paper); text-decoration: underline; }

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--r-sm);
    background: rgba(0, 0, 0, 0.22);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.auth-input::placeholder { color: rgba(255, 255, 255, 0.32); }
.auth-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(50, 219, 198, 0.18);
}

/* Chrome paints autofilled fields lavender. Needs a solid colour, not rgba. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--paper);
    -webkit-box-shadow: 0 0 0 1000px #12211F inset;
    box-shadow: 0 0 0 1000px #12211F inset;
    caret-color: var(--paper);
    transition: background-color 9999s ease-out 0s;
}

.auth-pw { position: relative; }
.auth-pw .auth-input { padding-right: 48px; }
.auth-pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 16px;
    cursor: pointer;
}
.auth-pw-toggle:hover { background: rgba(255, 255, 255, 0.08); color: var(--paper); }

.auth-submit { width: 100%; height: 48px; margin-top: 6px; padding: 0; }

.auth-foot { margin: 22px 0 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, 0.45); }
.auth-foot a { color: var(--teal); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { color: var(--teal); text-decoration: underline; }

@media (max-width: 860px) {
    body.app-auth-page { place-items: start center; padding: 32px 16px; }
    .auth-panel { padding: 28px 22px 24px; }
}


/* ==========================================================================
   8. App shell (sidebar, drawer)
   ========================================================================== */
.app-portal { min-height: 100vh; display: flex; }
.app-main { flex: 1; min-width: 0; background: var(--bg); }

.app-sidebar {
    width: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--shell);
    color: var(--paper-muted);
    border-right: 1px solid rgba(255, 255, 255, 0.08);

}
.app-sidebar-brand { display: inline-block; margin: 4px 8px 32px; text-decoration: none; }
.app-sidebar-brand img { display: block; height: 28px; width: auto; }

.app-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav-group {
    margin: 20px 12px 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper-muted);
    opacity: 0.7;
}
.app-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-left: 3px solid transparent;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--paper-muted);
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease;
}
.app-nav-link i { flex-shrink: 0; width: 18px; font-size: 16px; text-align: center; }
.app-nav-link:hover { background: var(--shell-hover); color: var(--paper); }
.app-nav-link.is-active {
    background: var(--shell-raised);
    color: var(--paper);
    border-left-color: var(--gold);
}
.app-nav-logout {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
    border-radius: 0;
}

/* mobile drawer stays on the shell surface */
#partnerMenu.offcanvas, #adminMenu.offcanvas {
    background: var(--shell);
    color: var(--paper-muted);
}
#partnerMenu .offcanvas-header, #adminMenu .offcanvas-header { border-bottom: 1px solid var(--hairline); }
#partnerMenu .offcanvas-header h2, #adminMenu .offcanvas-header h2 { color: var(--paper); }
.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}
.auth-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.auth-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400 !important;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68) !important;
}

.auth-radio input {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--emerald);
}

.auth-radio span {
    color: rgba(255, 255, 255, 0.68);
}
.auth-radio {
    font-weight: 400 !important;
}
.auth-resend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.auth-resend-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--teal);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.auth-resend-link:hover {
    color: var(--paper);
    text-decoration: underline;
}
@media (max-width: 991.98px) {
    .app-sidebar { display: none; }
}


/* ==========================================================================
   9. Header band & page content
   The band replaces the old light topbar. Page content rides up over its
   lower edge, so the two read as one header rather than stacked bars.
   ========================================================================== */
.app-topbar {
   position: relative;
    overflow: hidden;
    padding: 22px 32px 52px;
    background:
        radial-gradient(900px 380px at 88% -30%, rgba(50, 219, 198, 0.16), transparent 60%),
        radial-gradient(700px 300px at 30% 120%, rgba(254, 201, 45, 0.07), transparent 65%),
        linear-gradient(135deg, var(--shell-raised) 0%, #1b3f39 55%, #14322e 100%);
}
.app-topbar > * { position: relative; z-index: 1; }
.app-topbar-top { display: flex; align-items: flex-start; gap: 14px; }
.app-topbar-titles { flex: 1; min-width: 0; }
.app-topbar h1 { margin: 0; font-size: 22px; color: var(--paper); }
.app-topbar p { margin: 4px 0 0; font-size: 13px; color: var(--paper-muted); }
.app-topbar-action { flex-shrink: 0; }

/* both buttons in the band sit on dark */
.app-topbar .btn.d-lg-none,
.app-topbar .btn-secondary,
.app-topbar .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.10);
    border-color: var(--hairline);
    color: var(--paper);
}
.app-topbar .btn.d-lg-none:hover,
.app-topbar .btn-secondary:hover,
.app-topbar .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--paper);
}
.app-topbar .btn.d-lg-none {
    flex-shrink: 0;
    padding: 0.45rem 0.7rem;
    font-size: 18px;
    line-height: 1;
}

/* summary pills — set $pageStats in the page to populate */
.page-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.page-stat {
    padding: 10px 16px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.07);
}
.page-stat-label { margin: 0; font-size: 11px; color: var(--paper-muted); }
.page-stat-value {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--paper);
    font-variant-numeric: tabular-nums;
}
.page-stat.is-teal { background: rgba(50, 219, 198, 0.10); border-color: rgba(50, 219, 198, 0.28); }
.page-stat.is-teal .page-stat-value { color: var(--teal); }
.page-stat.is-gold { background: rgba(254, 201, 45, 0.10); border-color: rgba(254, 201, 45, 0.28); }
.page-stat.is-gold .page-stat-value { color: var(--gold); }

.app-page-content {
    position: relative;
    padding: 0 32px 32px;
    margin-top: -24px;
}
body.is-signup .auth-shell { width: min(100%, 34rem); }

/* two fields per row where the content is short */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}
@media (max-width: 991.98px) {
     .app-topbar { padding: 18px 16px 48px; }
    .app-topbar h1 { font-size: 19px; }
    .app-page-content { padding: 0 16px 24px; }
}


/* ==========================================================================
   10. Cards & panels
   ========================================================================== */
.app-card {
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-md);
}
.app-empty-state { padding: 32px; text-align: center; color: var(--ink-muted); }

/* a card that holds a full-bleed table or list */
.dash-panel {
    background: var(--surface);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-md);
    overflow: hidden;
}
.dash-panel + .dash-panel { margin-top: 12px; }

.dash-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
}
.dash-section-head h2 { margin: 0; font-size: 15px; }
.dash-section-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.dash-section-head span { font-size: 12px; color: var(--ink-muted); }

code {
    display: inline-block;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-sm);
    color: var(--ink);
    font-size: 14px;
    word-break: break-all;
}

@media (max-width: 767.98px) {
    .dash-section-head { padding-inline: 16px; }
}


/* ==========================================================================
   11. Tables
   ========================================================================== */
.table { color: var(--ink); font-size: 14px; }
.table thead th {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--hairline-ink);
}
.table td { vertical-align: middle; border-color: var(--hairline-ink); }
.table tbody tr:hover { background: var(--surface-hover); }

/* tables inside a panel run to the panel's edges */
.dash-panel .table { margin: 0; }
.dash-panel .table th:first-child,
.dash-panel .table td:first-child { padding-left: 24px; }
.dash-panel .table th:last-child,
.dash-panel .table td:last-child { padding-right: 24px; }
.dash-panel .table tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 767.98px) {
    .dash-panel .table th:first-child,
    .dash-panel .table td:first-child { padding-left: 16px; }
    .dash-panel .table th:last-child,
    .dash-panel .table td:last-child { padding-right: 16px; }
}


/* ==========================================================================
   12. Dashboard
   Colour system — each hue has one job:
     teal   referral activity      green  confirmed, money-earning events
     gold   the iPhone milestone   blue/amber  status badges only
   ========================================================================== */
.dash-card-title { margin: 0; font-size: 15px; }
.dash-card-sub { margin: 4px 0 14px; font-size: 13px; color: var(--ink-muted); }

/* referral link */
.dash-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-link-value {
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-link-row .btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }

/* stat tiles */
.dash-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.dash-tile {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-md);
}
.dash-tile-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    border-radius: var(--r-sm);
    font-size: 17px;
}
.dash-tile-icon.is-teal  { background: var(--teal-tint); color: var(--teal-ink); }
.dash-tile-icon.is-green { background: var(--status-success-bg); color: var(--status-success-text); }
.dash-tile-icon.is-gold  { background: var(--status-amber-bg); color: var(--gold-ink); }
.dash-tile-label { margin: 0; font-size: 12px; color: var(--ink-muted); }
.dash-tile-value {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.dash-tile-value small { font-size: 14px; font-weight: 600; color: var(--ink-muted); }

/* iPhone challenge strip */
.dash-challenge {
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #FFFBF0;
    border: 1px solid rgba(254, 201, 45, 0.45);
    border-radius: var(--r-md);
}
.dash-challenge-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.dash-challenge-top h2 { margin: 0; font-size: 15px; }
.dash-challenge-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-ink);
    font-variant-numeric: tabular-nums;
}
.dash-challenge-bar {
    height: 8px;
    margin: 12px 0 9px;
    border-radius: var(--r-pill);
    background: #F3E7C8;
    overflow: hidden;
}
.dash-challenge-fill {
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--gold);
    transition: width 300ms ease;
}
.dash-challenge-note { margin: 0; font-size: 12px; color: var(--ink-muted); }

/* leaderboard */
.dash-board-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    border-top: 1px solid var(--hairline-ink);
    font-size: 14px;
}
.dash-board-row--you { background: #F2FAF8; }
.dash-board-rank {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--status-gray-bg);
    color: var(--status-gray-text);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.dash-board-row--first .dash-board-rank { background: var(--gold); color: #2a1f00; }
.dash-board-row--you .dash-board-rank { background: var(--emerald); color: #fff; }
.dash-board-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-board-row--you .dash-board-name { font-weight: 600; }
.dash-board-count {
    flex: none;
    color: var(--teal-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-board-row { padding-inline: 16px; }
}


/* ==========================================================================
   13. Referrals list & detail modal
   ========================================================================== */
.ref-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0 24px 16px;
}
.ref-search { position: relative; flex: 1 1 220px; max-width: 320px; }
.ref-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--ink-muted);
    pointer-events: none;
}
.ref-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 34px;
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
}
.ref-search input:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(13, 141, 124, 0.15);
}

.ref-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-chip {
    padding: 7px 14px;
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ref-chip:hover { background: var(--surface-hover); color: var(--ink); }
.ref-chip.is-active { background: var(--emerald); border-color: var(--emerald); color: #fff; }

.ref-person { display: flex; align-items: center; gap: 11px; }
.ref-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--teal-tint);
    color: var(--teal-ink);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.ref-name {
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.ref-name:hover { color: var(--emerald); text-decoration: underline; }
.ref-sub { margin: 1px 0 0; font-size: 12px; color: var(--ink-muted); }
.ref-no-match { padding: 30px; text-align: center; color: var(--ink-muted); }

.ref-modal .modal-content { border: 1px solid var(--hairline-ink); border-radius: var(--r-lg); }
.ref-modal .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--hairline-ink); }
.ref-modal .modal-title { font-size: 18px; }
.ref-modal .modal-body { padding: 22px 24px 26px; }

.ref-block + .ref-block { margin-top: 24px; }
.ref-block-title {
    margin: 0 0 11px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.ref-dl {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 9px 16px;
    margin: 0;
    font-size: 14px;
}
.ref-dl dt { font-weight: 400; color: var(--ink-muted); }
.ref-dl dd { margin: 0; word-break: break-word; }

.ref-timeline { list-style: none; margin: 0; padding: 0; }
.ref-timeline li { position: relative; padding: 0 0 15px 20px; font-size: 14px; }
.ref-timeline li:last-child { padding-bottom: 0; }
.ref-timeline li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
}
.ref-timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 3.5px;
    top: 17px;
    bottom: 0;
    width: 1px;
    background: var(--hairline-ink);
}
.ref-timeline time { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-muted); }

.ref-reward {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-sm);
}
.ref-reward-amount {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

@media (max-width: 767.98px) {
    .ref-controls { padding-inline: 16px; }
    .ref-search { max-width: none; }
    .ref-dl { grid-template-columns: 1fr; gap: 2px; }
    .ref-dl dd { margin-bottom: 8px; }
}


/* ==========================================================================
   14. What happens next (add referral aside)
   ========================================================================== */
.next-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.next-steps li {
    position: relative;
    padding: 0 0 18px 38px;
    counter-increment: step;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-muted);
}
.next-steps li:last-child { padding-bottom: 0; }
.next-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--teal-tint);
    color: var(--teal-ink);
    font-size: 12px;
    font-weight: 700;
}
.next-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 12.5px;
    top: 32px;
    bottom: 8px;
    width: 1px;
    background: var(--hairline-ink);
}
.next-steps b { display: block; font-weight: 600; color: var(--ink); }

/* wider card just for signup */
body.is-signup .auth-shell { width: min(100%, 34rem); }

/* the public referral form has six fields — it gets the signup width too.
   Keyed off the form itself so refer.php doesn't need a body class from
   the layout. If auth-layout.php supports one, add is-signup there instead. */
.auth-shell:has(#addReferralForm) { width: min(100%, 34rem); }

@media (max-width: 520px) {
    .auth-row { grid-template-columns: 1fr; }
}

/* amount column reads as money: right-aligned and lined up digit for digit */
#earningsTable td:last-child,
#earningsTable th:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
#earningsTable td:last-child { font-weight: 600; }


/* ==========================================================================
   15. Payouts
   ========================================================================== */
/* selectable commission rows — scoped to the form so no new class is needed */
#payoutForm .form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 8px;
    border: 1px solid var(--hairline-ink);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}
#payoutForm .form-check:hover { background: var(--surface-hover); border-color: rgba(11, 33, 29, 0.16); }
#payoutForm .form-check:has(input:checked) {
    border-color: var(--emerald);
    background: #F2FAF8;
}
#payoutForm .form-check-input {
    float: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
}
#payoutForm .form-check-label {
    display: flex;
    flex: 1;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    font-size: 14px;
    cursor: pointer;
}
#payoutForm .form-check-label b {
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* payout history: money last, lined up */
#payoutTable td:last-child,
#payoutTable th:last-child { white-space: nowrap; }
#payoutTable td:nth-child(4) { font-weight: 600; font-variant-numeric: tabular-nums; }
#payoutTable td:nth-child(2) { font-family: var(--font-mono); font-size: 13px; }

/* the referrals-included table inside the detail modal */
.ref-modal .table-sm { font-size: 13px; }
.ref-modal .table-sm thead th { background: transparent; border-top: 0; }
.ref-modal .table-sm td:last-child,
.ref-modal .table-sm th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Inline links inside a tinted alert inherit the alert's own colour — the
   emerald link colour disappears against amber. Buttons are excluded: an
   <a class="btn"> in an alert is a button, not a link. */
.alert a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; }
.alert a:not(.btn):hover { color: inherit; }
.alert .btn-primary { color: #fff; text-decoration: none; }
.alert ul { margin: 0; padding-left: 18px; }
.alert ul li + li { margin-top: 3px; }

/* an alert carrying an action gets room for it */
.alert .btn { flex: none; }
.alert.d-flex { padding: 11px 12px 11px 16px; }


/* ==========================================================================
   16. Settings
   A description rail on the left, fields on the right. Three identical
   full-width cards gave every section the same weight and pushed the labels
   miles from the inputs on a wide screen.
   ========================================================================== */
.set-section {
    display: grid;
    grid-template-columns: 240px minmax(0, 700px);
    justify-content: start;
    gap: 32px;
    align-items: start;
}
/* the page pulls content up over the header band, which only works when the
   first thing is a card — the description rail would land on the dark */
.set-section:first-child { padding-top: 40px; }
.set-section + .set-section {
    margin-top: 26px;
    padding-top: 28px;
    border-top: 1px solid var(--hairline-ink);
}
.set-aside { position: sticky; top: 24px; padding-top: 2px; }
.set-aside h2 { margin: 0 0 7px; font-size: 18px; }
.set-aside p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-muted); }

.set-card {
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--hairline-ink-soft);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}
/* the account we already hold, above the form that would replace it */
.set-current {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: linear-gradient(140deg, #F2FAF8, var(--surface));
    border: 1px solid rgba(13, 141, 124, 0.20);
    border-radius: var(--r-sm);
}
.set-current-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--teal-tint);
    color: var(--teal-ink);
    font-size: 19px;
}
.set-current b { display: block; font-size: 14px; font-weight: 600; }
.set-current span {
    font-size: 12.5px;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

@media (max-width: 1199.98px) {
    .set-section { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 991.98px) {
    .set-section { grid-template-columns: 1fr; gap: 14px; }
    .set-section:first-child { padding-top: 36px; }
    .set-section + .set-section { margin-top: 20px; padding-top: 22px; }
    .set-aside { position: static; }
    .set-aside h2 { font-size: 16px; }
    .set-card { padding: 18px; }
}


/* ==========================================================================
   17. Student verification
   A single focused task, so it gets a narrow centred card rather than a
   full-width one with a 34rem inline cap.
   ========================================================================== */
.verify-shell { max-width: 30rem; margin-inline: auto; }
.verify-head { margin-bottom: 22px; text-align: center; }
.verify-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 2px auto 14px;
    border-radius: 18px;
    background: var(--teal-tint);
    color: var(--teal-ink);
    font-size: 26px;
}
.verify-mark.is-done { background: var(--status-success-bg); color: var(--status-success-text); }
.verify-head h2 { margin: 0 0 6px; font-size: 19px; }
.verify-head p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-muted); }

/* what we'll match against — read-only, so it isn't dressed as a form */
.verify-facts {
    padding: 14px 16px;
    margin-bottom: 18px;
    background: var(--surface-sunken);
    border: 1px solid var(--hairline-ink-soft);
    border-radius: var(--r-sm);
}
.verify-facts dl {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 9px 14px;
    margin: 0;
    font-size: 13.5px;
}
.verify-facts dt { font-weight: 400; color: var(--ink-muted); }
.verify-facts dd { margin: 0; word-break: break-word; }
.verify-facts + .form-hint { margin: -10px 0 18px; }

.verify-shell .btn { width: 100%; }
.verify-course {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: var(--status-success-bg);
    color: var(--status-success-text);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .verify-facts dl { grid-template-columns: 1fr; gap: 2px; }
    .verify-facts dd { margin-bottom: 8px; }
}


/* ==========================================================================
   18. Admin
   ========================================================================== */
/* a panel header carrying a title, a subtitle and an action */
.dash-section-head > div { min-width: 0; }
.dash-section-head > div span { display: block; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Admin referrals. Scoped with :has(#date_range) — that field only exists on
   this page — so nothing here leaks into the partner screens.
   -------------------------------------------------------------------------- */
.app-card:has(#date_range) { overflow: hidden; }
.app-card:has(#date_range) > h2 { margin: 0 0 4px; font-size: 16px; }
.app-card:has(#date_range) > p { margin: 0 0 18px; font-size: 13px; color: var(--ink-muted); }

/* filter row reads as a toolbar rather than three loose fields */
.app-card:has(#date_range) > form[method="get"] {
    align-items: flex-end;
    gap: 12px !important;
    padding: 14px 16px;
    margin-bottom: 18px !important;
    background: var(--surface-sunken);
    border: 1px solid var(--hairline-ink-soft);
    border-radius: var(--r-md);
}
.app-card:has(#date_range) > form[method="get"] .form-label {
    margin-bottom: 5px;
    font-size: 12px !important;
    font-weight: 600;
    color: var(--ink-muted);
}
.app-card:has(#date_range) .form-control-sm,
.app-card:has(#date_range) .form-select-sm {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 13.5px;
    background-color: var(--surface);
}
/* the range field is readonly so flatpickr owns it — don't grey it out */
#date_range[readonly] { background-color: var(--surface); cursor: pointer; }
.app-card:has(#date_range) > form[method="get"] .btn {
    display: inline-flex;
    align-items: center;
    height: 38px;
}

/* table runs to the card's edges, like the panels elsewhere */
.app-card:has(#date_range) .table-responsive { margin: 0 -24px -22px; }
.app-card:has(#date_range) .table th:first-child,
.app-card:has(#date_range) .table td:first-child { padding-left: 24px; }
.app-card:has(#date_range) .table th:last-child,
.app-card:has(#date_range) .table td:last-child { padding-right: 24px; }
.app-card:has(#date_range) .table tbody tr:last-child td { border-bottom: 0; }
.app-card:has(#date_range) .app-empty-state { margin: 0 0 4px; }

/* the lead's name opens the record, so it carries the weight — not the
   referrer, which the global first-column rule would have bolded */
.app-card:has(#date_range) .table tbody td:first-child { font-weight: 400; color: var(--ink-muted); }
.app-card:has(#date_range) .table .btn-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}
.app-card:has(#date_range) .table .btn-link:hover { color: var(--emerald); text-decoration: underline; }
.app-card:has(#date_range) .table td:nth-child(3),
.app-card:has(#date_range) .table td:nth-child(5) { color: var(--ink-muted); }
.app-card:has(#date_range) .table td:nth-child(5) { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* action cell: three one-button forms that shouldn't wrap or add margin */
.app-card:has(#date_range) .table td:last-child { white-space: nowrap; }
.app-card:has(#date_range) .table td form { margin: 0; }
.app-card:has(#date_range) .table td .d-flex { flex-wrap: nowrap !important; gap: 6px !important; }
.app-card:has(#date_range) .table td .btn {
    padding: 0.3rem 0.72rem;
    font-size: 12px;
    box-shadow: none;
}
.app-card:has(#date_range) .table td .btn-outline-primary {
    border-color: rgba(13, 141, 124, 0.35);
    color: var(--emerald);
    background: var(--surface);
}
.app-card:has(#date_range) .table td .btn-outline-primary:hover {
    background: var(--teal-tint);
    border-color: var(--emerald);
    color: var(--emerald-hover);
}

@media (max-width: 1399.98px) {
    /* six columns with an action stack — scroll rather than squash */
    .app-card:has(#date_range) .table { min-width: 900px; }
}
@media (max-width: 767.98px) {
    .app-card:has(#date_range) .table-responsive { margin-inline: -16px; }
    .app-card:has(#date_range) .table th:first-child,
    .app-card:has(#date_range) .table td:first-child { padding-left: 16px; }
    .app-card:has(#date_range) .table th:last-child,
    .app-card:has(#date_range) .table td:last-child { padding-right: 16px; }
}

/* --------------------------------------------------------------------------
   Admin detail modal (.modal-lg is only used by this record view)
   -------------------------------------------------------------------------- */
.modal-lg .modal-content {
    border: 1px solid var(--hairline-ink-soft);
    border-radius: var(--r-lg);
    box-shadow: 0 24px 60px rgba(11, 33, 29, 0.22);
    overflow: hidden;
}
.modal-lg .modal-header {
    align-items: flex-start;
    padding: 22px 24px;
    background: linear-gradient(140deg, #F4FAF8, var(--surface));
    border-bottom: 1px solid var(--hairline-ink);
}
.modal-lg .modal-title { font-size: 19px; }
.modal-lg .btn-close { margin: 0 0 0 auto; opacity: 0.5; }
.modal-lg .btn-close:hover { opacity: 0.9; }
.modal-lg .modal-body { padding: 22px 24px 26px; }

/* the h6/text-uppercase section labels become proper block headings */
.modal-lg .modal-body h4 {
    margin: 0 0 12px;
    font-family: var(--font-body);
    font-size: 11.5px !important;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: var(--ink-faint) !important;
}
.modal-lg .modal-body h4 ~ h4 { margin-top: 0; }
.modal-lg .modal-body dl.row,
.modal-lg .modal-body ul.list-unstyled {
    padding-bottom: 20px;
    margin-bottom: 22px !important;
    border-bottom: 1px solid var(--hairline-ink-soft);
}
.modal-lg .modal-body dl.row.mb-0 {
    padding-bottom: 0;
    margin-bottom: 0 !important;
    border-bottom: 0;
}
/* a 33% label column leaves the values stranded — pin it to the text width */
.modal-lg .modal-body dl.row { row-gap: 9px; font-size: 14px; }
.modal-lg .modal-body dl.row > dt {
    width: 168px;
    font-weight: 400;
    color: var(--ink-muted);
}
.modal-lg .modal-body dl.row > dd {
    width: calc(100% - 168px);
    margin: 0;
    word-break: break-word;
}
.modal-lg .modal-body ul.list-unstyled li { font-size: 14px; }
.modal-lg .modal-body ul.list-unstyled li + li { margin-top: 4px; }

.modal-lg .modal-footer {
    gap: 8px;
    padding: 14px 24px;
    background: var(--surface-sunken);
    border-top: 1px solid var(--hairline-ink);
}
.modal-lg .modal-footer form { margin: 0; }
.modal-lg .modal-footer > * { margin: 0; }

@media (max-width: 575.98px) {
    .modal-lg .modal-body dl.row > dt,
    .modal-lg .modal-body dl.row > dd { width: 100%; }
    .modal-lg .modal-body dl.row > dt { margin-bottom: -4px; }
}

/* --------------------------------------------------------------------------
   Flatpickr, themed to match the rest of the app
   -------------------------------------------------------------------------- */
.flatpickr-calendar {
    border-radius: var(--r-md);
    border: 1px solid var(--hairline-ink-soft);
    box-shadow: var(--shadow-md);
    font-family: var(--font-body);
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: var(--emerald);
    border-color: var(--emerald);
}
.flatpickr-day.inRange {
    background: var(--teal-tint);
    border-color: var(--teal-tint);
    box-shadow: -5px 0 0 var(--teal-tint), 5px 0 0 var(--teal-tint);
}
.flatpickr-day:hover { background: var(--surface-hover); }
.flatpickr-day.today { border-color: var(--emerald); }

/* support fab -------------------------------------------------------------- */
.support-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.support-fab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--emerald);
    color: #fff;
    font-size: 21px;
    box-shadow: 0 8px 24px rgba(13, 141, 124, 0.35);
    cursor: pointer;
    transition: transform 150ms ease, background-color 150ms ease;
}
.support-fab-button:hover { background: var(--emerald-hover); transform: translateY(-2px); }
.support-fab-popup {
    display: none;
    width: 260px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--hairline-ink-soft);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
}
.support-fab.is-open .support-fab-popup { display: block; }
.support-fab-popup h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.support-fab-popup p { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }
@media (max-width: 575.98px) {
    .support-fab { right: 14px; bottom: 14px; }
    .support-fab-popup { width: calc(100vw - 48px); }
}
