/* ==========================================================================
   Krishna Reminder — design system
   Krishna devotional-modern: deep blue + marigold gold, soft cards, 14px radius.
   Mobile-first; every screen is designed for 360px before anything else.
   ========================================================================== */

:root {
    --blue: #1B3A6B;
    --blue-600: #16305a;
    --blue-100: #e8eefa;
    --gold: #F2B33D;
    --gold-100: #fdf3e0;
    --green: #1E8E5A;
    --green-100: #e6f5ee;
    --red: #C0392B;
    --red-100: #fdecea;
    --amber: #B7791F;

    --surface: #F7F8FB;
    --card: #ffffff;
    --line: #e3e7ef;
    --text: #1a2233;
    --muted: #697386;
    --muted-2: #9aa3b2;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 1px 3px rgba(20, 30, 60, .07), 0 1px 2px rgba(20, 30, 60, .04);
    --shadow-lg: 0 8px 30px rgba(20, 30, 60, .12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-gu: 'Anek Gujarati', 'Noto Sans Gujarati', var(--font);
    --header-h: 60px;
    --bottomnav-h: 62px;

    color-scheme: light;
}

[data-theme="dark"] {
    /* Without this the browser still paints native widgets — select popups,
       date pickers, scrollbars, autofill — in their light colours, which is
       where most "white box on a dark page" comes from. */
    color-scheme: dark;

    --surface: #10141d;
    --card: #182030;
    --line: #27304a;
    --text: #e8ecf5;
    --muted: #98a2b8;
    --muted-2: #6b7690;
    --blue-100: #1b2740;
    --gold-100: #2c2313;
    --green-100: #12291f;
    --red-100: #2b1614;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

body[lang="gu"], body[lang="hi"] { font-family: var(--font-gu); }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
code { background: var(--blue-100); padding: 2px 6px; border-radius: 6px; font-size: .88em; }

[data-theme="dark"] a { color: #9fc0ff; }

/* ------------------------------------------------------------------ Layout */

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 720px; }
.section { padding: 48px 0; }
.stack > * + * { margin-top: 14px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 720px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    h1 { font-size: 2.4rem; }
}

.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.text-muted { color: var(--muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hide { display: none !important; }

@media (min-width: 900px) { .desktop-only { display: initial; } .mobile-only { display: none !important; } }
@media (max-width: 899px) { .desktop-only { display: none !important; } }

/* ------------------------------------------------------------------- Cards */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    border: 1px solid transparent;
}

[data-theme="dark"] .card { border-color: var(--line); }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-pad-lg { padding: 24px; }

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 4px solid var(--blue);
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .value { font-size: 1.85rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.stat-card .label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat-card.gold { border-left-color: var(--gold); }
.stat-card.green { border-left-color: var(--green); }
.stat-card.red { border-left-color: var(--red); }

/* ----------------------------------------------------------------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font: 600 15px/1.2 var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease, opacity .15s;
}

.btn:hover { background: var(--blue-600); text-decoration: none; color: #fff; }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-gold { background: var(--gold); color: #3a2a05; }
.btn-gold:hover { background: #e0a32e; color: #3a2a05; }
.btn-green { background: var(--green); }
.btn-danger { background: var(--red); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; min-height: 40px; min-width: 40px; }

.btn.is-loading::after {
    content: '';
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ Forms */

.field { margin-bottom: 16px; }
.field label, .form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; display: block; margin-top: 4px; }

/*
 * Every text-like field, including <input> with no type attribute at all.
 *
 * Listing types explicitly missed those, because `<input name="x">` is a text
 * field but does not match `input[type=text]`. Unstyled, they fell back to the
 * browser default — a white box with black text — which in dark mode is an
 * unreadable white rectangle. Excluding the handful of non-text types is the
 * only way to catch the rest.
 */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=range]):not([type=color]):not([type=hidden]),
select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font: 400 15px/1.4 inherit;
    transition: border-color .15s, box-shadow .15s;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-100);
}

input::placeholder, textarea::placeholder { color: var(--muted-2); }

.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; padding: 6px 0; min-height: 44px; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); flex-shrink: 0; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; min-height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 26px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }

.otp-input { letter-spacing: .6em; text-align: center; font-size: 24px; font-weight: 700; }

/* ----------------------------------------------------------------- Badges */

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .01em;
    background: var(--blue-100); color: var(--blue);
}

.badge-success { background: var(--green-100); color: var(--green); }
.badge-warning { background: var(--gold-100); color: var(--amber); }
.badge-danger  { background: var(--red-100); color: var(--red); }
.badge-secondary { background: var(--surface); color: var(--muted); }
.badge-info { background: #e6f1fb; color: #1b6bb0; }
.badge-muted { background: var(--surface); color: var(--muted); }

/* Pager used by the admin message and log lists ------------------------- */
.pager {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.pager-info { flex: 1 1 auto; min-width: 120px; }
.pager-links { display: flex; flex-wrap: wrap; gap: 4px; }
.pager-links .btn { min-width: 34px; padding: 5px 9px; }
.pager-links [aria-current="page"] { pointer-events: none; }

.pager-clear { display: flex; gap: 6px; align-items: center; }
.pager-clear input {
    width: 150px; padding: 5px 9px; font-size: 12.5px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}

/* At 360px the pager must stack rather than push the card sideways. */
@media (max-width: 560px) {
    .pager { flex-direction: column; align-items: stretch; }
    .pager-clear { width: 100%; }
    .pager-clear input { flex: 1 1 auto; width: auto; }
}

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: 13.5px; font-weight: 600; color: var(--muted);
    text-decoration: none; white-space: nowrap; min-height: 38px;
}

.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:hover { text-decoration: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ------------------------------------------------------------------ Lists */

.list { list-style: none; margin: 0; padding: 0; }

.list-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 13px 0; border-bottom: 1px solid var(--line);
}

.list-item:last-child { border-bottom: 0; }
.list-item .time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; min-width: 62px; color: var(--blue); }
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: 15px; word-break: break-word; }
.list-item .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list-item.done .title { text-decoration: line-through; color: var(--muted); }
.list-item .actions { display: flex; gap: 6px; flex-shrink: 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
table.data tbody tr:hover { background: var(--surface); }

/* --------------------------------------------------------------- Progress */

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s ease; }

.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line) 0); }
.ring::before { content: ''; position: absolute; width: 72px; height: 72px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; font-size: 21px; font-weight: 800; }
.ring-wrap { position: relative; display: grid; place-items: center; }

/* ----------------------------------------------------------------- Alerts */

.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14.5px; border: 1px solid transparent; }
.alert-success { background: var(--green-100); color: var(--green); border-color: rgba(30,142,90,.2); }
.alert-error, .alert-danger { background: var(--red-100); color: var(--red); border-color: rgba(192,57,43,.2); }
.alert-warning { background: var(--gold-100); color: var(--amber); border-color: rgba(242,179,61,.35); }
.alert-info { background: var(--blue-100); color: var(--blue); border-color: rgba(27,58,107,.15); }

/*
 * Short forms. Several views write class="alert warn" rather than
 * "alert alert-warning", which matched nothing at all: the box rendered with a
 * transparent border and no background, so the text sat on the page looking
 * like an unstyled white panel. These aliases make both spellings work rather
 * than leaving a trap for the next person who writes the short one.
 */
.alert.success { background: var(--green-100); color: var(--green); border-color: rgba(30,142,90,.2); }
.alert.error, .alert.danger { background: var(--red-100); color: var(--red); border-color: rgba(192,57,43,.2); }
.alert.warn, .alert.warning { background: var(--gold-100); color: var(--amber); border-color: rgba(242,179,61,.35); }
.alert.info { background: var(--blue-100); color: var(--blue); border-color: rgba(27,58,107,.15); }

.badge-warn { background: var(--gold-100); color: var(--amber); }

/* ---------------------------------------------------------------- Toasts */

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + 16px); z-index: 9000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14.5px; animation: toastIn .25s ease; }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 900px) { .toasts { bottom: 20px; right: 20px; left: auto; transform: none; } }

/* --------------------------------------------------------------- Skeleton */

.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--surface) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
.skeleton-line { height: 14px; margin-bottom: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { font-size: 46px; margin-bottom: 10px; opacity: .55; }
.empty h3 { color: var(--text); }

/* ----------------------------------------------------------------- Header */

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    height: var(--header-h);
    display: flex; align-items: center;
}

[data-theme="dark"] .site-header { background: rgba(24, 32, 48, .92); }

.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: var(--blue); text-decoration: none; letter-spacing: -.02em; }
.logo .mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--blue), #2d5599); color: var(--gold); display: grid; place-items: center; font-size: 18px; }
[data-theme="dark"] .logo { color: var(--text); }

.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a { padding: 8px 13px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.main-nav a:hover, .main-nav a.active { background: var(--blue-100); color: var(--blue); text-decoration: none; }
[data-theme="dark"] .main-nav a:hover, [data-theme="dark"] .main-nav a.active { color: #cfe0ff; }

.icon-btn { background: transparent; border: 0; padding: 8px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 19px; line-height: 1; min-height: 40px; min-width: 40px; }
.icon-btn:hover { background: var(--surface); }

/* -------------------------------------------------------------- App shell */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px; flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--line);
    padding: 16px 12px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.sidebar .logo { padding: 6px 10px 18px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.sidebar nav a:hover { background: var(--surface); text-decoration: none; }
.sidebar nav a.active { background: var(--blue); color: #fff; }
.sidebar nav a .ico { width: 20px; text-align: center; font-size: 16px; }
.sidebar .group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 700; padding: 16px 12px 6px; }

.app-main { flex: 1; min-width: 0; padding-bottom: calc(var(--bottomnav-h) + 20px); }
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 50; }
.app-topbar h1 { font-size: 1.2rem; margin: 0; }
.app-content { padding: 18px 16px; }

@media (min-width: 900px) {
    .app-main { padding-bottom: 30px; }
    .app-content { padding: 24px; max-width: 1200px; }
}

/*
 * On a phone the sidebar used to be display:none with nothing to open it, and
 * the bottom bar only carries five links — so WhatsApp, Telegram, AI,
 * Templates, Settings and the rest of the admin were simply unreachable from a
 * phone. It is now a slide-in drawer behind the ☰ button in the top bar.
 */
@media (max-width: 899px) {
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
        width: min(84vw, 300px); height: 100dvh;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: var(--shadow-lg);
        padding-bottom: 28px;
    }

    .app-shell.nav-open .sidebar { transform: translateX(0); }

    .nav-scrim {
        position: fixed; inset: 0; z-index: 290;
        background: rgba(8, 12, 22, .55);
        opacity: 0; pointer-events: none;
        transition: opacity .22s ease;
    }

    .app-shell.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

    /* Nothing behind the drawer should scroll while it is open. */
    body.nav-locked { overflow: hidden; }
}

@media (min-width: 900px) {
    .nav-toggle, .nav-scrim { display: none !important; }
}

/* ------------------------------------------------------------ Bottom nav */

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--card); border-top: 1px solid var(--line);
    display: flex; justify-content: space-around;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    height: var(--bottomnav-h);
}

.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted-2); font-size: 10.5px; font-weight: 600; padding: 4px 10px; min-width: 56px; text-decoration: none; }
.bottom-nav a .ico { font-size: 20px; line-height: 1; }
.bottom-nav a.active { color: var(--blue); }
[data-theme="dark"] .bottom-nav a.active { color: var(--gold); }

@media (min-width: 900px) { .bottom-nav { display: none; } }

.fab {
    position: fixed; right: 18px; bottom: calc(var(--bottomnav-h) + 16px); z-index: 210;
    width: 56px; height: 56px; border-radius: 18px;
    background: var(--gold); color: #3a2a05;
    border: 0; box-shadow: var(--shadow-lg);
    font-size: 26px; line-height: 1; cursor: pointer;
    display: grid; place-items: center; text-decoration: none;
}

@media (min-width: 900px) { .fab { bottom: 24px; right: 24px; } }

/* --------------------------------------------------------------- Landing */

.hero { padding: 44px 0 36px; background: linear-gradient(170deg, var(--blue) 0%, #2a4d87 60%, #33589a 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(242,179,61,.16); }
.hero h1 { font-size: 1.95rem; margin-bottom: 14px; }
.hero p { font-size: 1.05rem; opacity: .93; max-width: 620px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (min-width: 720px) { .hero { padding: 76px 0 66px; } .hero h1 { font-size: 2.9rem; } }

.step-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: relative; }
.step-card .num { width: 34px; height: 34px; border-radius: 11px; background: var(--gold); color: #3a2a05; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }

.feature { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.feature .ico { font-size: 26px; margin-bottom: 8px; display: block; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: 14px; color: var(--muted); margin: 0; }

.price-card { background: var(--card); border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow); border: 2px solid transparent; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--gold); box-shadow: var(--shadow-lg); }
.price-card .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.price-card .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.price-card li { padding: 6px 0; font-size: 14.5px; display: flex; gap: 8px; }

.faq details { background: var(--card); border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow); margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 20px; color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }

.testimonial { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.testimonial .stars { color: var(--gold); font-size: 15px; }
.testimonial .who { font-size: 13px; color: var(--muted); margin-top: 10px; }

.site-footer { background: var(--blue); color: rgba(255,255,255,.78); padding: 36px 0 24px; margin-top: 40px; font-size: 14.5px; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 26px; padding-top: 16px; font-size: 13px; }

.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 300; width: 54px; height: 54px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 27px; box-shadow: var(--shadow-lg); text-decoration: none; }

.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 400; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
@media (min-width: 720px) { .cookie-banner { max-width: 520px; left: auto; right: 16px; } }

/* -------------------------------------------------------------- Auth page */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--blue) 0%, #2a4d87 100%); }
.auth-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 28px 24px; width: 100%; max-width: 420px; }
.auth-card .logo { justify-content: center; margin-bottom: 16px; }

/* ---------------------------------------------------------------- Modals */

.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 18, 32, .55); z-index: 900; display: grid; place-items: end center; padding: 0; }
.modal { background: var(--card); border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 720px) { .modal-backdrop { place-items: center; padding: 20px; } .modal { border-radius: var(--radius-lg); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* -------------------------------------------------------------- Calendar */

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: center; font-weight: 700; padding: 6px 0; }
.cal-day { background: var(--card); border-radius: 9px; min-height: 66px; padding: 5px; font-size: 12px; border: 1px solid var(--line); cursor: pointer; }
.cal-day.other { opacity: .38; }
.cal-day.today { border-color: var(--gold); border-width: 2px; }
.cal-day .n { font-weight: 700; font-size: 12.5px; }
.cal-day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; margin: 1px; }
.cal-day .dot.done { background: var(--green); }
.cal-day .dot.missed { background: var(--red); }

/* ----------------------------------------------------------------- Charts */

.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; }
.bars .bar { flex: 1; background: var(--blue); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; transition: height .4s; }
.bars .bar.green { background: var(--green); }
.bars .bar.gold { background: var(--gold); }
.bars-labels { display: flex; gap: 5px; margin-top: 6px; }
.bars-labels span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); overflow: hidden; }

/* ------------------------------------------------------------------ Misc */

.countdown { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; word-break: break-all; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

.impersonate-bar { background: var(--amber); color: #fff; text-align: center; padding: 8px 14px; font-size: 13.5px; font-weight: 600; }

@media print {
    .sidebar, .bottom-nav, .app-topbar, .site-header, .site-footer, .fab, .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
