:root {
    --bg: #f5f5f7;
    --card: #ffffff;
    --ink: #1d1d1f;
    --ink-2: #6e6e73;
    --ink-3: #aeaeb2;
    --line: rgba(0, 0, 0, 0.09);
    --line-soft: rgba(0, 0, 0, 0.05);
    --brand: #2cc8dd;
    --accent: #2cc8dd;
    --accent-press: #1fb6cd;
    --accent-ink: #0a7d92;
    --accent-soft: rgba(44, 200, 221, 0.14);
    --on-accent: #062830;
    --danger: #ff3b30;
    --danger-press: #e0342b;
    --danger-soft: rgba(255, 59, 48, 0.1);
    --go: #30d158;
    --radius: 14px;
    --radius-sm: 9px;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 34px rgba(0, 0, 0, 0.06);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101012;
        --card: #1c1c1e;
        --ink: #f5f5f7;
        --ink-2: #98989d;
        --ink-3: #636366;
        --line: rgba(255, 255, 255, 0.11);
        --line-soft: rgba(255, 255, 255, 0.06);
        --brand: #2cc8dd;
        --accent: #2cc8dd;
        --accent-press: #4dd3e4;
        --accent-ink: #6fdbe8;
        --accent-soft: rgba(44, 200, 221, 0.16);
        --on-accent: #062830;
        --danger: #ff453a;
        --danger-press: #ff6961;
        --danger-soft: rgba(255, 69, 58, 0.16);
        --go: #30d158;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 34px rgba(0, 0, 0, 0.35);
        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25);
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent-soft); }

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

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

.sidebar {
    width: 232px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--bg);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 10px;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-logo {
    height: 38px;
    width: auto;
    border-radius: 7px;
    display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 13.5px; font-weight: 650; }
.brand-app { font-size: 11px; font-weight: 500; color: var(--ink-3); }
@media (prefers-color-scheme: dark) {
    .brand-logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    padding: 14px 10px 6px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav a .count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
    background: var(--line-soft);
    border-radius: 99px;
    padding: 1px 7px;
}
.nav a.active .count { background: transparent; color: var(--accent-ink); }

.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; }
.who { padding: 0 10px 10px; font-size: 13px; color: var(--ink-2); }
.who strong { color: var(--ink); font-weight: 600; display: block; font-size: 14px; }

.main {
    flex: 1;
    min-width: 0;
    padding: 44px 40px 100px;
}
.main-inner { max-width: 780px; margin: 0 auto; }

.page-head { margin-bottom: 28px; }
.tz-note { color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }

/* ---------- cards ---------- */

.card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 22px;
}

/* ---------- hero (timer) ---------- */

.hero {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 34px 34px 30px;
    text-align: center;
    transition: border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.hero.is-running { border-color: rgba(48, 209, 88, 0.35); }
.hero-edit { position: absolute; top: 14px; right: 14px; }
.hero details.editor[open] { margin: 22px -34px -30px; }

.hint { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 12px; }
kbd {
    font-family: var(--mono);
    font-size: 11px;
    background: var(--line-soft);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 1px 6px;
}

.hero-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    color: var(--ink-2);
    font-size: 14px;
    flex-wrap: wrap;
}
.hero-top .dot { width: 10px; height: 10px; flex-shrink: 0; }
.hero-top .p-name { font-weight: 600; color: var(--ink); }
.hero-top .cmt { color: var(--ink-2); }
.hero-top .cmt:empty { display: none; }

.hero-timer {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 60px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 14px 0 4px;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.hero.is-running .hero-timer { color: var(--ink); }
.hero .pulse {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--go);
    display: none;
}
.hero.is-running .pulse { display: block; animation: pulse 2s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

.hero-sub { color: var(--ink-2); font-size: 13px; min-height: 20px; }
.hero-sub strong { color: var(--ink-2); font-weight: 600; }

.toggle-btn {
    width: 150px;
    height: 52px;
    border: none;
    border-radius: 26px;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    color: var(--on-accent);
    background: var(--accent);
    transition: background 0.15s ease, transform 0.1s ease;
    margin-top: 20px;
}
.toggle-btn:hover { background: var(--accent-press); }
.toggle-btn:active { transform: scale(0.97); }
.toggle-btn.stop { background: var(--danger); }
.toggle-btn.stop:hover { background: var(--danger-press); }

.start-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.start-form select,
.start-form input {
    width: 200px;
    margin: 0;
}
.start-form input { flex: 0 1 280px; }

/* ---------- inputs ---------- */

label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="datetime-local"], input[type="date"], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--card);
    margin-bottom: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px var(--accent-soft);
}

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e6e73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

input[type="datetime-local"] { font-family: var(--mono); font-size: 13px; }

button { font-family: var(--sans); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    background: var(--accent);
    color: var(--on-accent);
    transition: background 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}
.btn:hover { background: var(--accent-press); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.secondary {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn.secondary:hover { background: var(--line-soft); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.small { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------- notices ---------- */

.notice {
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
}

.form-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #c25e00;
    background: rgba(255, 149, 0, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
}
@media (prefers-color-scheme: dark) {
    .form-hint { color: #ffb340; background: rgba(255, 149, 0, 0.12); }
}

.manual-reveal { margin-top: 40px; text-align: center; }
.manual-reveal summary {
    list-style: none;
    cursor: pointer;
    color: var(--ink-3);
    font-size: 12px;
    padding: 4px 8px;
}
.manual-reveal summary::-webkit-details-marker { display: none; }
.manual-reveal summary:hover { color: var(--ink-2); text-decoration: underline; }
.manual-pop {
    margin: 14px auto 0;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 16px 18px;
}
.manual-pop p {
    font-size: 13px;
    color: var(--ink-2);
    margin-bottom: 12px;
}

.progress { height: 4px; border-radius: 2px; background: var(--line-soft); margin-top: 10px; overflow: hidden; }
.progress .fill { height: 100%; border-radius: 2px; background: var(--accent); }
.progress .fill.reached { background: var(--go); }

/* ---------- day groups & entry rows ---------- */

.days { display: flex; flex-direction: column; gap: 26px; margin-top: 30px; }

.day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 4px 8px;
}
.day-head h2 { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.day-head .day-total { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

.rows { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }

.entry { position: relative; }
.entry + .entry .row { border-top: 1px solid var(--line-soft); }
.entry:has(.row.manual) { box-shadow: inset 3px 0 0 rgba(175, 82, 222, 0.137); }
.row.manual { background: rgba(175, 82, 222, 0.018); }
.row.manual:hover { background: rgba(175, 82, 222, 0.031); }
@media (prefers-color-scheme: dark) {
    .row.manual { background: rgba(191, 90, 242, 0.024); }
    .row.manual:hover { background: rgba(191, 90, 242, 0.039); }
}

.entry:has(.row.imported) { box-shadow: inset 3px 0 0 rgba(255, 204, 0, 0.157); }
.row.imported { background: rgba(255, 204, 0, 0.025); }
.row.imported:hover { background: rgba(255, 204, 0, 0.042); }
@media (prefers-color-scheme: dark) {
    .row.imported { background: rgba(255, 214, 10, 0.027); }
    .row.imported:hover { background: rgba(255, 214, 10, 0.044); }
}

.entry:has(.row.edited) { box-shadow: inset 3px 0 0 rgba(255, 149, 0, 0.157); }
.row.edited { background: rgba(255, 149, 0, 0.025); }
.row.edited:hover { background: rgba(255, 149, 0, 0.042); }
@media (prefers-color-scheme: dark) {
    .row.edited { background: rgba(255, 159, 10, 0.027); }
    .row.edited:hover { background: rgba(255, 159, 10, 0.044); }
}

.entry.is-deleted .row { opacity: 0.55; }
.badge-del {
    display: inline-block;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-3);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    padding: 0 5px;
    line-height: 14px;
    vertical-align: 1px;
}

/* Entry origin/status badges: inline chips inside the row title on
   every page (dashboard, reports, admin team view) — one construction,
   no corner-floats. Colors stay at the reduced (30% x2) opacity. */
.badge-manual,
.badge-imported,
.badge-toggled,
.badge-edited {
    display: inline-block;
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 4px;
    padding: 0 5px;
    line-height: 14px;
    vertical-align: 1px;
    margin-left: 2px;
}
.badge-manual { color: rgba(120, 45, 160, 0.43); border: 1px solid rgba(175, 82, 222, 0.15); }
@media (prefers-color-scheme: dark) {
    .badge-manual { color: rgba(209, 145, 255, 0.42); border-color: rgba(191, 90, 242, 0.2); }
}
.badge-imported { color: rgba(150, 118, 0, 0.43); border: 1px solid rgba(255, 204, 0, 0.22); }
@media (prefers-color-scheme: dark) {
    .badge-imported { color: rgba(235, 205, 90, 0.49); border-color: rgba(255, 214, 10, 0.22); }
}
.badge-toggled { color: rgba(20, 110, 45, 0.43); border: 1px solid rgba(48, 209, 88, 0.22); }
@media (prefers-color-scheme: dark) {
    .badge-toggled { color: rgba(100, 230, 135, 0.49); border-color: rgba(48, 209, 88, 0.22); }
}
.badge-edited { color: rgba(175, 100, 0, 0.43); border: 1px solid rgba(255, 149, 0, 0.21); }
@media (prefers-color-scheme: dark) {
    .badge-edited { color: rgba(255, 180, 90, 0.48); border-color: rgba(255, 159, 10, 0.21); }
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: background 0.12s ease;
}
.entry:hover .row { background: var(--line-soft); }

.row .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c, var(--ink-3));
    flex-shrink: 0;
}

.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.row-title .hash {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
    color: var(--ink-3);
    background: var(--line-soft);
    padding: 1px 6px;
    border-radius: 5px;
}
.row-sub { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-times { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.row-dur { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; min-width: 52px; text-align: right; }

.row-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.row:hover .row-actions, .row:focus-within .row-actions { opacity: 1; }

.icon-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { display: block; }

/* ---------- edit drawer ---------- */

details.editor > summary { display: none; }
details.editor[open] .edit-form { margin-top: 0; border-top: 1px solid var(--line-soft); }

.edit-form {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    background: var(--bg);
}
.edit-form .full { grid-column: 1 / -1; }
.edit-form label { margin-bottom: 4px; }
.edit-form input, .edit-form select { margin-bottom: 12px; }
.edit-form .actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 2px; }

/* ---------- reports ---------- */

.range-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.range-nav h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.range-nav .pager { display: flex; align-items: center; gap: 4px; }
.range-nav .pager .current-label { font-size: 14px; color: var(--ink-2); padding: 0 8px; min-width: 120px; text-align: center; }

.summary-strip { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.stat {
    flex: 1;
    min-width: 140px;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
}
.stat .k { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 600; margin-top: 3px; white-space: nowrap; }
.stat .v small { font-size: 12px; color: var(--ink-3); font-weight: 400; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 64px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 3px; background: var(--accent); }
.bar-row .val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; }

.report-days { display: flex; flex-direction: column; gap: 22px; margin-top: 26px; }
.report-day h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    padding: 0 4px 8px;
    display: flex;
    justify-content: space-between;
}
.report-day h3 .t { font-family: var(--mono); }

/* ---------- tables ---------- */

.table-wrap { overflow: auto; max-height: 70vh; }
.chain-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}
.pager-info { font-size: 13px; color: var(--ink-2); }
.table-wrap th {
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- admin ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.color-select { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.color-select input[type="radio"] { display: none; margin: 0; }
.color-select label.swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.1s ease, border-color 0.1s ease;
}
.color-select label.swatch:hover { transform: scale(1.15); }
.color-select input[type="radio"]:checked + label.swatch { border-color: var(--ink); }

.dot-pick { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }

.map-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}
.map-row:last-of-type { border-bottom: none; }
.map-source .count { font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.map-target { max-width: 320px; margin: 0; }

.who-name { color: var(--ink-2); font-weight: 500; }

/* ---------- chain ---------- */

.chain-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.chain-head .head-hash {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
    background: var(--card);
    border: 1px solid var(--line-soft);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    word-break: break-all;
}
.verify-result { font-size: 13.5px; font-weight: 600; margin-top: 12px; }
.verify-result.ok { color: var(--go); }
.verify-result.bad { color: var(--danger); }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.gray { background: var(--line-soft); color: var(--ink-2); }

/* chain page fork residuals */
tr.row-superseded td { opacity: 0.55; }
tr.row-unresolved td { background: rgba(255, 59, 48, 0.05); }

.hash-full { font-family: var(--mono); font-size: 11px; word-break: break-all; color: var(--ink-2); }

/* ---------- login ---------- */

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}
.login-card {
    width: 100%;
    max-width: 340px;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 36px 32px 32px;
    text-align: center;
}
.login-card .brand { justify-content: center; margin-bottom: 6px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }
.login-brand .brand-name { font-size: 16px; font-weight: 650; }
.login-card .tagline { color: var(--ink-3); font-size: 13px; margin-bottom: 26px; }
.login-card input { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 4px; padding: 11px; }

/* ---------- error page ---------- */

.error-card { text-align: center; padding-top: 12vh; }
.error-card .code { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.error-card h1 { font-size: 22px; font-weight: 700; margin: 8px 0 16px; }

/* ---------- metrics ---------- */

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 20px; }
.filters > div { flex: 1; min-width: 130px; }
.filters label { margin-bottom: 5px; }
.filters input, .filters select { margin-bottom: 0; }
.filters .btn-col { flex: 0; display: flex; gap: 8px; }

#chart-container { max-width: 640px; margin: 22px auto; }

.empty {
    text-align: center;
    color: var(--ink-3);
    padding: 48px 20px;
    font-size: 14px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        padding: 12px 16px;
        gap: 12px;
        border-right: none;
        border-bottom: 1px solid var(--line);
        overflow-x: auto;
    }
    .nav { flex-direction: row; gap: 4px; }
    .nav-label, .sidebar-foot { display: none; }
    .main { padding: 24px 16px 80px; }
    .hero { padding: 26px 18px 24px; }
    .hero details.editor[open] { margin: 16px -18px -24px; }
    .hero-timer { font-size: 44px; }
    .grid-2 { grid-template-columns: 1fr; }
    .start-form select, .start-form input { width: 100%; flex: 1 1 100%; }
    .row-actions { opacity: 1; }
    .edit-form { grid-template-columns: 1fr; }
    input, select, textarea { font-size: 16px; }
}
