/* ═══════════════════════════════════════════════════════
   Fit · rustig, neutraal, professioneel
   Eén accentkleur, veel wit, subtiele lijnen.
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #f5f5f2;
    --bg-2: #ffffff;          /* kaarten / oppervlakken */
    --bg-3: #f0f0ec;          /* zachte vlakken, hover */
    --text: #1d2125;
    --text-2: #475057;
    --muted: #7b838a;
    --border: #e5e5e0;
    --border-strong: #d6d6d0;
    --accent: #2f6f62;
    --accent-soft: #3d8574;
    --accent-bg: #e8f0ed;
    --ok: #2f6f62;
    --warn: #b7853a;
    --err: #b24a3f;
    --radius: 14px;
    --radius-s: 9px;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --shadow: 0 1px 2px rgba(20, 24, 28, .04), 0 1px 1px rgba(20, 24, 28, .03);
    --shadow-lg: 0 12px 32px rgba(20, 24, 28, .12);
    --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #121416;
        --bg-2: #1a1d20;
        --bg-3: #22262a;
        --text: #e7e9eb;
        --text-2: #b9bfc4;
        --muted: #858d94;
        --border: #2a2f34;
        --border-strong: #353b41;
        --accent: #5fae9b;
        --accent-soft: #74c0ad;
        --accent-bg: #1d2b28;
        --ok: #5fae9b;
        --warn: #d3a35a;
        --err: #d46c60;
        --shadow: none;
        --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    }
}

/* ─── Base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
    padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4 {
    font-family: var(--font-display); font-weight: 600;
    margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.015em;
}
.display { font-size: 2.2rem; margin: 0 0 .2em; letter-spacing: -.03em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-top: 1.5rem; }
h3 { font-size: 1rem; }
h4 { font-size: .9rem; color: var(--text-2); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }

.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; }

.container {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1rem calc(var(--nav-h) + 2rem);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    appearance: none;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    color: var(--text);
    font-family: inherit; font-size: .92rem; font-weight: 500;
    padding: .6rem 1rem;
    border-radius: var(--radius-s);
    cursor: pointer;
    min-height: 42px;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bg-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #fff; }
.btn.big { font-size: 1rem; padding: .85rem 1.2rem; width: 100%; min-height: 48px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-3); }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err); color: #fff; }
.btn.tiny { padding: .3rem .65rem; min-height: auto; font-size: .78rem; }

/* ─── Forms ──────────────────────────────────────────── */
label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-2); margin-bottom: .9rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"],
input[type="date"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: .6rem .75rem;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-s);
    color: var(--text);
    font-family: inherit; font-size: .95rem; font-weight: 400;
    min-height: 42px;
    margin-top: .3rem;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
input[type="checkbox"] { accent-color: var(--accent); }
.stack > * + * { margin-top: 1rem; }

/* ─── Kaarten & banners ──────────────────────────────── */
.card, .chart-card, .workout-foot {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem 1.2rem;
    margin-bottom: .9rem;
    box-shadow: var(--shadow);
}
.card h3, .chart-card h3 { font-size: .95rem; margin-bottom: .75rem; }

.banner {
    border-radius: var(--radius-s);
    padding: .8rem 1rem;
    margin: 0 0 1rem;
    background: var(--accent-bg);
    color: var(--text);
    font-size: .9rem;
    border: 1px solid transparent;
}
.banner.ok { background: var(--accent-bg); }
.banner.err { background: color-mix(in srgb, var(--err) 10%, var(--bg-2)); color: var(--err); }
.banner p { margin: .35rem 0 0; }

/* ─── Auth ───────────────────────────────────────────── */
.auth-card {
    max-width: 380px;
    margin: 4rem auto;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.25rem 1.75rem;
    box-shadow: var(--shadow-lg);
}
.auth-card .display { color: var(--accent); }
.google-btn { width: 100%; background: var(--bg-2); color: var(--text); }
.google-btn .g { font-weight: 700; color: #4285f4; }

/* ─── Paginakop ──────────────────────────────────────── */
.page-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    margin-bottom: 1.25rem; padding-right: 2.25rem;
}
.page-head h1 { margin-bottom: .15rem; }
.page-head p { margin: 0; }
.back-link { color: var(--muted); font-size: .85rem; white-space: nowrap; padding-top: .35rem; }
.back-link:hover { color: var(--text); }

.settings-link {
    position: absolute; top: 1.4rem; right: 1rem; z-index: 5;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); background: transparent;
    transition: background .15s, color .15s;
}
.settings-link:hover { background: var(--bg-3); color: var(--text); }
.settings-link svg { width: 19px; height: 19px; }

/* ─── Dashboard ──────────────────────────────────────── */
.dash-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 1rem; margin-bottom: 1.25rem; padding-right: 2.25rem;
}
.countdown .muted.tiny { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: .7rem; }
.countdown .big { font-size: 1.6rem; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; margin: .1rem 0 .15rem; }
.countdown .muted { font-size: .9rem; }
.today-date { text-align: right; }
.today-date .weekday { font-weight: 600; text-transform: capitalize; }
.today-date .date { font-size: .82rem; color: var(--muted); }

.progress-bar {
    height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden;
    margin-top: .7rem; max-width: 280px;
}
.progress-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }

.schedule-card { padding: .9rem 1.1rem; }
.schedule-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    font-weight: 500; font-size: .95rem; color: var(--text);
}
.schedule-pill::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0;
}
.schedule-pill.daga::before, .schedule-pill.dagb::before { background: var(--accent); }
.schedule-pill.restactive::before, .schedule-pill.longwalk::before { background: var(--warn); }
.schedule-pill.restfull::before { background: var(--border-strong); }

/* Quick actions */
.quick-actions {
    display: grid; gap: .65rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
}
.quick-actions .qa-primary, .quick-actions .qa-snapshot { grid-column: 1 / -1; }

.qa {
    appearance: none; cursor: pointer; text-align: left; text-decoration: none;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .95rem 1rem;
    color: var(--text); font-family: inherit; font-size: .95rem;
    display: flex; flex-direction: column; gap: .3rem;
    min-height: 92px; position: relative; box-shadow: var(--shadow);
    transition: border-color .15s, background .15s;
}
.qa:hover { border-color: var(--border-strong); color: var(--text); }
.qa:active { transform: translateY(1px); }
.qa-ico { font-size: 1.3rem; line-height: 1; }
.qa-label { font-weight: 600; font-size: .92rem; }
.qa-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

.qa-primary {
    background: var(--accent); color: #fff; border-color: var(--accent);
    flex-direction: row; align-items: center; min-height: 58px; gap: .75rem;
}
.qa-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #fff; }
.qa-primary .qa-ico { font-size: 1rem; }
.qa-snapshot { background: var(--accent-bg); border-color: transparent; flex-direction: row; align-items: center; min-height: 58px; gap: .75rem; }
.qa-primary .qa-count { color: rgba(255, 255, 255, .8); }

/* Teller-trackers (water, koffie, …) */
.qa-drinks { grid-column: 1 / -1; padding: 0; min-height: auto; gap: 0; overflow: hidden; cursor: default; }
.drinks-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); }
.drinks-row:last-child { border-bottom: none; }
.drink-main {
    flex: 1; display: flex; align-items: center; gap: .7rem;
    background: transparent; border: none; cursor: pointer;
    color: var(--text); font-family: inherit; font-size: .95rem;
    padding: .7rem 1rem; min-height: 54px; text-align: left;
    transition: background .15s;
}
.drink-main:hover { background: var(--bg-3); }
.drink-ico { font-size: 1.15rem; width: 1.6em; text-align: center; }
.drink-label { font-weight: 500; flex: 1; }
.drink-count { color: var(--text-2); font-size: .92rem; padding: .15rem .45rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.drink-count:hover { background: var(--bg-2); }
.drink-mini {
    appearance: none; border: none; border-right: 1px solid var(--border);
    background: transparent; color: var(--muted); cursor: pointer;
    width: 48px; font-size: 1.2rem; transition: background .15s, color .15s;
}
.drink-mini:hover { background: var(--bg-3); color: var(--text); }

/* Status */
.status-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem;
    margin-bottom: .9rem;
}
.status-tile {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-s); padding: .55rem .7rem;
    font-size: .82rem; color: var(--muted);
    display: flex; align-items: center; gap: .45rem;
}
.status-tile .ti {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    border: 1.5px solid var(--border-strong); color: transparent;
    display: inline-flex; align-items: center; justify-content: center; font-size: .65rem;
}
.status-tile.ok { color: var(--text); }
.status-tile.ok .ti { background: var(--accent); border-color: var(--accent); color: #fff; }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: .9rem; }
.stat {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow);
}
.stat-value { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .8rem; }

/* ─── Modals ─────────────────────────────────────────── */
.modal-bg {
    position: fixed; inset: 0; background: rgba(15, 18, 20, .45);
    backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
    z-index: 100; padding: 1rem;
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.4rem;
    width: 100%; max-width: 400px; box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 2rem); overflow-y: auto;
}
.modal h3 { font-size: 1.05rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.1rem; }

.quick-grams { display: flex; gap: .4rem; margin: -.4rem 0 .9rem; }
.quick-grams button, .rpe-scale button {
    appearance: none; border: 1px solid var(--border-strong); background: var(--bg-2);
    color: var(--text-2); padding: .4rem .75rem; border-radius: var(--radius-s);
    cursor: pointer; min-height: 36px; font-family: inherit; font-size: .88rem;
    transition: background .15s, border-color .15s, color .15s;
}
.quick-grams button:hover, .rpe-scale button:hover { border-color: var(--accent); color: var(--accent); }

.rpe-scale { display: flex; gap: .3rem; margin-bottom: .5rem; }
.rpe-scale button { flex: 1; padding: .4rem 0; font-variant-numeric: tabular-nums; }
.rpe-scale button.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Bottom nav ─────────────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: color-mix(in srgb, var(--bg-2) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--border);
    display: grid; grid-template-columns: repeat(6, 1fr);
    padding: .4rem max(.5rem, calc((100vw - 680px) / 2)) calc(.4rem + env(safe-area-inset-bottom));
    z-index: 50;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: .2rem;
    color: var(--muted); font-size: .68rem; font-weight: 500; padding: .35rem 0;
    text-decoration: none; border-radius: var(--radius-s);
    transition: color .15s;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--accent); }
.nav-item:hover { color: var(--text); }

/* ─── Workout ────────────────────────────────────────── */
.exercise-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: .6rem; overflow: hidden;
    box-shadow: var(--shadow);
}
.exercise-head {
    padding: .9rem 1.1rem; cursor: pointer; display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.exercise-head .name { font-weight: 600; font-size: .98rem; }
.exercise-head .target { color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.exercise-head .chev { color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.exercise-card.open .exercise-head .chev { transform: rotate(90deg); }
.exercise-body { display: none; padding: 0 1.1rem 1rem; border-top: 1px solid var(--border); }
.exercise-card.open .exercise-body { display: block; }
.exercise-body .prev { font-size: .82rem; color: var(--muted); padding: .7rem 0 .5rem; }
.set-row {
    display: grid; grid-template-columns: 36px 1fr 1fr 32px; gap: .5rem;
    align-items: center; margin-bottom: .45rem; font-variant-numeric: tabular-nums;
}
.set-row label { margin: 0; font-size: .72rem; color: var(--muted); font-weight: 500; }
.set-row .num {
    width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .8rem; color: var(--text-2);
}
.set-row input { margin: .15rem 0 0; padding: .45rem .6rem; min-height: 38px; }
.add-set, .remove-set {
    appearance: none; border: 1px dashed var(--border-strong); background: transparent;
    color: var(--muted); padding: .45rem .8rem; border-radius: var(--radius-s);
    cursor: pointer; font-family: inherit; font-size: .82rem;
}
.add-set:hover { color: var(--accent); border-color: var(--accent); }
.remove-set { border: none; padding: 0; font-size: 1.15rem; }
.remove-set:hover { color: var(--err); }
.workout-foot { margin-top: 1rem; }

/* ─── Schema ─────────────────────────────────────────── */
.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.sg-cell {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-s); padding: .45rem .35rem;
    aspect-ratio: 1 / 1.05;
    display: flex; flex-direction: column; justify-content: space-between;
    text-decoration: none; color: var(--text); font-size: .72rem;
    transition: border-color .15s;
}
.sg-cell:hover { border-color: var(--border-strong); color: var(--text); }
.sg-cell .d { font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-cell .lbl { color: var(--muted); font-size: .64rem; }
.sg-cell.done { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.sg-cell.partial { background: color-mix(in srgb, var(--warn) 12%, var(--bg-2)); }
.sg-cell.missed { background: color-mix(in srgb, var(--err) 8%, var(--bg-2)); }
.sg-cell.rest { background: var(--bg-3); }
.sg-cell.future { opacity: .5; }
.sg-cell.today { box-shadow: 0 0 0 2px var(--accent); }

.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .76rem; color: var(--muted); margin: .75rem 0 1rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* ─── Lijsten ────────────────────────────────────────── */
.metric-list {
    list-style: none; padding: 0; margin: 0;
    border: 1px solid var(--border); border-radius: var(--radius-s);
    background: var(--bg-2); overflow: hidden;
}
.card .metric-list { border: none; border-radius: 0; margin: 0 -1.2rem; background: transparent; }
.metric-list li {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .65rem 1.2rem; border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.metric-list li:last-child { border-bottom: none; }
.card .metric-list li:first-child { border-top: 1px solid var(--border); }
.log-list li { align-items: flex-start; }

details summary { cursor: pointer; padding: .3rem 0; }

/* ─── Snapshots ──────────────────────────────────────── */
.snap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.snap-tile {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.snap-tile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.snap-tile .meta { padding: .55rem .7rem; font-size: .8rem; }
.snap-tile .meta .kg { color: var(--muted); }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.compare-row img { width: 100%; border-radius: var(--radius); display: block; }

/* ─── Grafieken ──────────────────────────────────────── */
/* Vaste hoogte: voorkomt de resize-loop van Chart.js met maintainAspectRatio:false */
.chart-wrap { position: relative; height: 220px; width: 100%; }
.chart-wrap.tall { height: 280px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* ─── Chat ───────────────────────────────────────────── */
.chat-list { display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.chat-msg { display: flex; flex-direction: column; max-width: 88%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.assistant { align-self: flex-start; align-items: flex-start; }
.chat-msg .bubble {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 16px; border-bottom-left-radius: 5px;
    padding: .65rem .9rem; line-height: 1.55; font-size: .93rem;
    box-shadow: var(--shadow);
}
.chat-msg.user .bubble {
    background: var(--accent); border-color: var(--accent); color: #fff;
    border-radius: 16px; border-bottom-right-radius: 5px;
}
.chat-msg .meta { font-size: .68rem; color: var(--muted); margin-top: .2rem; padding: 0 .35rem; }
.chat-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.chat-actions span {
    font-size: .72rem; color: var(--accent); background: var(--accent-bg);
    border-radius: 999px; padding: .15rem .6rem; font-weight: 500;
}

.bubble.md > *:first-child { margin-top: 0; }
.bubble.md > *:last-child { margin-bottom: 0; }
.bubble.md p { margin: .4rem 0; }
.bubble.md h1, .bubble.md h2, .bubble.md h3, .bubble.md h4 { margin: .8rem 0 .3rem; }
.bubble.md h1 { font-size: 1.05rem; }
.bubble.md h2 { font-size: 1rem; }
.bubble.md h3, .bubble.md h4 { font-size: .93rem; }
.bubble.md ul, .bubble.md ol { margin: .35rem 0 .5rem; padding-left: 1.2rem; }
.bubble.md li { margin: .15rem 0; }
.bubble.md li > p { margin: 0; }
.bubble.md strong { font-weight: 600; }
.bubble.md a { text-decoration: underline; }
.bubble.md code { background: var(--bg-3); padding: 1px 5px; border-radius: 4px; }
.bubble.md pre {
    background: var(--bg-3); border-radius: var(--radius-s); padding: .65rem .8rem;
    margin: .5rem 0; overflow-x: auto; font-size: .85rem;
}
.bubble.md pre code { background: transparent; padding: 0; }
.bubble.md blockquote { border-left: 3px solid var(--accent); margin: .4rem 0; padding: .1rem .75rem; color: var(--text-2); }
.bubble.md hr { border: none; border-top: 1px solid var(--border); margin: .8rem 0; }
.bubble.md table { border-collapse: collapse; margin: .5rem 0; font-size: .88rem; display: block; overflow-x: auto; }
.bubble.md th, .bubble.md td { border: 1px solid var(--border); padding: .35rem .55rem; text-align: left; }
.bubble.md th { background: var(--bg-3); font-weight: 600; }

.chat-form {
    display: flex; gap: .5rem; align-items: flex-end;
    position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    background: var(--bg); padding: .6rem 0; z-index: 10;
}
.chat-form textarea { flex: 1; resize: none; margin: 0; padding: .65rem .8rem; min-height: 46px; max-height: 140px; border-radius: 12px; }
.chat-form .btn { min-height: 46px; border-radius: 12px; }

.chat-msg.placeholder .bubble { padding: .85rem 1rem; }
.typing { display: inline-flex; gap: .3rem; align-items: center; }
.typing span {
    width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
    animation: blink 1.3s infinite ease-in-out; opacity: .3;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    0%, 60%, 100% { transform: scale(.7); opacity: .3; }
    30% { transform: scale(1); opacity: 1; }
}

.chat-day {
    align-self: center; margin: 1rem 0 .25rem;
    font-size: .7rem; color: var(--muted); text-transform: uppercase;
    letter-spacing: .06em; font-weight: 600;
}
.chat-break { align-self: stretch; display: flex; align-items: center; gap: .6rem; margin: .75rem 0; color: var(--muted); font-size: .72rem; }
.chat-break::before, .chat-break::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.chat-break span { white-space: nowrap; }

.chat-empty { padding: 1.5rem 0; }
.suggestions { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-direction: column; gap: .4rem; }
.suggestions button {
    text-align: left; appearance: none; border: 1px solid var(--border);
    background: var(--bg-2); color: var(--text-2); padding: .65rem .9rem;
    border-radius: var(--radius-s); cursor: pointer; font-family: inherit; font-size: .9rem;
    transition: border-color .15s, color .15s;
}
.suggestions button:hover { border-color: var(--accent); color: var(--text); }
.intro-card p { margin: .4rem 0; }

/* ─── Beheer ─────────────────────────────────────────── */
.invite-link { display: flex; gap: .4rem; margin-top: .5rem; }
.invite-link input { flex: 1; margin: 0; font-size: .75rem; font-family: ui-monospace, Consolas, monospace; }

/* ─── Utility ────────────────────────────────────────── */
.row { display: flex; gap: .5rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }

@media (max-width: 380px) {
    .quick-actions { grid-template-columns: 1fr; }
    .countdown .big { font-size: 1.35rem; }
}

/* ─── AI-gebruik (beheer) ────────────────────────────── */
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.usage-tile { background: var(--bg-3); border-radius: var(--radius-s); padding: .7rem .8rem; }
.usage-cost { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: .1rem 0; }
