/* ------------------------------------------------------------------ tokens */
:root {
    /* Teal accent for the DevExpress Fluent theme (replaces its default blue ramp). */
    --dxbl-accent-color-10: #e6f4f2;
    --dxbl-accent-color-20: #c9e8e4;
    --dxbl-accent-color-30: #a8dad4;
    --dxbl-accent-color-40: #84cbc3;
    --dxbl-accent-color-50: #5fbab1;
    --dxbl-accent-color-60: #3ba99f;
    --dxbl-accent-color-70: #21978d;
    --dxbl-accent-color-80: #13867c;
    --dxbl-accent-color-90: #0f766e;
    --dxbl-accent-color-100: #0d6961;
    --dxbl-accent-color-110: #0b5c55;
    --dxbl-accent-color-120: #094f49;
    --dxbl-accent-color-130: #07423d;
    --dxbl-accent-color-140: #053531;
    --dxbl-accent-color-150: #042925;
    --dxbl-accent-color-160: #021c19;
    --dxbl-accent-color-170: #010f0d;

    --c-primary: #0f766e;
    --c-primary-soft: #e6f4f2;
    --c-accent: #e8677d;
    --c-accent-soft: #fdecef;
    --c-bg: #f4f6f8;
    --c-card: #ffffff;
    --c-text: #1f2937;
    --c-muted: #6b7280;
    --c-line: #e5e7eb;
    --c-good: #15803d;
    --c-good-soft: #e7f6ec;
    --c-warn: #b45309;
    --c-warn-soft: #fdf3e3;
    --c-rest: #7c6fb0;
    --c-rest-soft: #efedf8;

    --radius: 16px;
    --tab-h: 64px;
    --bar-h: 56px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 .75rem; }
a { color: var(--c-primary); }
h1:focus { outline: none; }

.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.good { color: var(--c-good); }
.warn { color: var(--c-warn); }

/* ------------------------------------------------------------------ shell */
.app { min-height: 100vh; min-height: 100dvh; }

.app-bar {
    position: sticky; top: 0; z-index: 20;
    height: var(--bar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.app-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.app-brand img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.app-bar-btn { color: #fff; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.app-bar-btn:active { background: rgba(255,255,255,.15); }

.app-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 24px);
}

.tab-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tab-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-top: 1px solid var(--c-line);
}
.tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--c-muted); text-decoration: none; font-size: .72rem; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.active { color: var(--c-primary); }
.tab.active svg { background: var(--c-primary-soft); border-radius: 12px; padding: 2px 12px; width: 48px; box-sizing: content-box; height: 22px; }

/* ------------------------------------------------------------------ building blocks */
.page { display: flex; flex-direction: column; gap: 16px; }
.hello p { margin: 0; }

.card {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
.card h2 + p { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-hero { border-top: 4px solid var(--c-primary); }

.pill {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    background: var(--c-primary-soft); color: var(--c-primary);
    font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.pill-good { background: var(--c-good-soft); color: var(--c-good); }
.pill-rest { background: var(--c-rest-soft); color: var(--c-rest); }
.pill-lock { background: var(--c-warn-soft); color: var(--c-warn); margin-top: 4px; width: fit-content; }

.btn-primary, .btn-secondary, .btn-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 20px; border-radius: 12px;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 0;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:active { background: #0b5c55; }
.btn-secondary { background: var(--c-primary-soft); color: var(--c-primary); }
.btn-link { background: none; color: var(--c-primary); padding: 0; min-height: 0; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-danger { background: #fdecec; color: #b42318; }

.back { text-decoration: none; font-weight: 600; }
.link { font-weight: 600; text-decoration: none; }

.stat-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.stat { font-size: 1.8rem; font-weight: 700; }
.steps-bar { margin-bottom: 12px; }

.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form .grow { flex: 1; min-width: 0; }
.big-input { font-size: 1.05rem !important; }
.inline-form .dxbl-btn { min-height: 44px; padding-inline: 20px; }

.safety {
    font-size: .85rem; color: var(--c-muted);
    background: var(--c-warn-soft); border-radius: 12px; padding: 12px 14px; margin: 0;
}

.done-banner {
    margin-top: 12px; padding: 12px 14px; border-radius: 12px;
    background: var(--c-good-soft); color: var(--c-good);
    display: flex; flex-direction: column;
}

/* ------------------------------------------------------------------ exercise lists */
.phase-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: 14px 0 6px; }
.page > .phase-title { margin: 4px 0 -8px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ex-row a {
    display: flex; align-items: center; gap: 12px;
    padding: 6px; border-radius: 12px; text-decoration: none; color: inherit;
    background: var(--c-bg);
}
.page > .ex-list .ex-row a { background: var(--c-card); box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.ex-row a:active { background: var(--c-primary-soft); }
.ex-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ex-text small { color: var(--c-muted); font-size: .85rem; }
.ex-row.done .ex-text strong { color: var(--c-good); }
.ex-row.locked { opacity: .75; }
.tick { color: #fff; background: var(--c-good); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-weight: 700; flex: none; }

/* ------------------------------------------------------------------ week strip */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.week-strip .day { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--c-muted); font-size: .75rem; font-weight: 600; }
.week-strip .dot {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-size: .85rem;
    background: var(--c-bg); color: var(--c-text); border: 2px solid transparent;
}
.week-strip .done .dot { background: var(--c-good); color: #fff; }
.week-strip .rest .dot { background: var(--c-rest-soft); color: var(--c-rest); }
.week-strip .missed .dot { background: #f3f4f6; color: #9ca3af; }
.week-strip .today .dot { border-color: var(--c-primary); color: var(--c-primary); }
.week-strip .today .dow { color: var(--c-primary); }

/* ------------------------------------------------------------------ figure (SVG) */
.figure { line-height: 0; }
.figure .fig { width: 100%; height: auto; display: block; }
.figure.thumb { width: 84px; flex: none; background: #fff; border-radius: 10px; }
.figure.hero { background: linear-gradient(#f8fbfb, #eef6f5); border-radius: 12px; width: 100%; max-width: 520px; margin: 0 auto; }
.figure.still { background: #f8fbfb; border-radius: 8px; }

.fig-floor { stroke: #cbd5e1; stroke-width: 2; }
.fig-mat { fill: #99d5cf; }
.fig-prop { fill: #a8b3c4; }
.fig-prop-soft { fill: #dfe5ec; }
.fig-prop-line { stroke: #a8b3c4; stroke-width: 4; stroke-linecap: round; }
.fig polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig-torso { stroke: #d94f68; stroke-width: 24; }
.fig-neck { stroke: #f0a58f; stroke-width: 9; }
.fig-leg { stroke-width: 13; }
.fig-arm { stroke-width: 9; }
.fig-near { stroke: #e8677d; }
.fig-far { stroke: #f3b2bd; }
.fig-head { fill: #f2b49f; }
.fig-eye { fill: #4b2e2e; }
.fig-ball { fill: #f6c445; stroke: #e0a91b; stroke-width: 1.5; }
.fig-glow { fill: #fbbf24; opacity: .18; animation: glow 1.6s ease-in-out infinite; }
.fig-caption { font: 600 11px "Segoe UI", system-ui, sans-serif; fill: #0f766e; }
@keyframes glow { 50% { opacity: .38; } }
@media (prefers-reduced-motion: reduce) { .fig-glow { animation: none; } }

.figure-card { display: flex; flex-direction: column; gap: 12px; }
.stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stills figure { margin: 0; }
.stills figcaption { font-size: .78rem; color: var(--c-muted); margin-top: 4px; line-height: 1.3; }
.stills figcaption b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c-primary); color: #fff; font-size: .7rem; margin-right: 2px; }

.steps { padding-left: 1.3rem; margin: 0 0 12px; }
.steps li { margin-bottom: 8px; }
.steps li::marker { color: var(--c-primary); font-weight: 700; }
.focus { background: var(--c-primary-soft); border-radius: 10px; padding: 10px 12px; margin: 0; }
.dose { font-size: 1.15rem; font-weight: 700; color: var(--c-primary); }
.dose-table summary { cursor: pointer; color: var(--c-primary); font-weight: 600; }
.dose-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.dose-table th, .dose-table td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--c-line); vertical-align: top; }
.dose-table th small { color: var(--c-muted); font-weight: 400; display: block; }
.dose-table tr.current { background: var(--c-primary-soft); }
.two-col { display: grid; gap: 12px; }
.two-col ul { margin: 0; padding-left: 1.2rem; }
@media (min-width: 560px) { .two-col { grid-template-columns: 1fr 1fr; } }

.principles ul { margin: 0; padding-left: 1.1rem; }
.principles li { margin-bottom: 6px; }

/* ------------------------------------------------------------------ workout player */
.player { display: flex; flex-direction: column; gap: 12px; }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.player-progress { display: flex; gap: 4px; }
.player-progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--c-line); }
.player-progress span.done { background: var(--c-good); }
.player-progress span.now { background: var(--c-primary); }
.player h1 { font-size: 1.35rem; }
.player .figure.hero { max-height: 46vh; display: flex; justify-content: center; }
.player .figure.hero .fig { max-height: 46vh; width: auto; max-width: 100%; }

.timer { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--c-line); }
.ring .bar { stroke: var(--c-primary); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ring.rest .bar { stroke: var(--c-rest); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring-label strong { font-size: 1.9rem; display: block; }
.ring-label small { color: var(--c-muted); font-size: .75rem; }
.segment-label { font-weight: 700; font-size: 1.05rem; }
.segment-next { color: var(--c-muted); font-size: .85rem; }
.count { font-size: 1rem; color: var(--c-primary); font-weight: 700; }

.controls { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 8px; }
.controls button { min-height: 56px; border-radius: 14px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.controls .main { background: var(--c-primary); color: #fff; font-size: 1.05rem; }
.controls .main.paused { background: var(--c-accent); }
.controls .side { background: var(--c-primary-soft); color: var(--c-primary); }
.controls button:disabled { opacity: .4; }

.how { background: var(--c-card); border-radius: 12px; padding: 4px 14px; }
.how summary { cursor: pointer; font-weight: 600; color: var(--c-primary); padding: 10px 0; }

.effort { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.effort button {
    min-height: 64px; border-radius: 14px; border: 2px solid var(--c-line); background: #fff;
    font: inherit; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.effort button span { font-size: 1.4rem; }
.effort button.on { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); }
.notes { width: 100%; min-height: 80px; border-radius: 12px; border: 1px solid var(--c-line); padding: 10px; font: inherit; }

.celebrate { text-align: center; }
.celebrate .big { font-size: 3rem; line-height: 1; }

/* ------------------------------------------------------------------ plan / scheduler */
.plan-scheduler { --dxbl-scheduler-font-size: .8rem; }
.plan-scheduler .dxbl-scheduler-month-view .dxbl-scheduler-appointment { font-size: .7rem; }
.appt-tip { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; min-width: 220px; }
.appt-tip ul { margin: 0; padding-left: 1.1rem; font-size: .85rem; }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--c-bg);
    border: 2px solid transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%;
}
.day-item.selected { border-color: var(--c-primary); background: var(--c-primary-soft); }
.day-item .date { width: 44px; text-align: center; flex: none; line-height: 1.1; }
.day-item .date strong { display: block; font-size: 1.2rem; }
.day-item .date small { color: var(--c-muted); text-transform: uppercase; font-size: .7rem; font-weight: 700; }
.day-item .what { flex: 1; min-width: 0; }
.day-item .what small { display: block; color: var(--c-muted); }
.status { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status.done { background: var(--c-good-soft); color: var(--c-good); }
.status.missed { background: #f3f4f6; color: #6b7280; }
.status.rest { background: var(--c-rest-soft); color: var(--c-rest); }
.status.today { background: var(--c-primary); color: #fff; }
.status.planned { background: var(--c-primary-soft); color: var(--c-primary); }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.week-nav button { min-width: 44px; min-height: 44px; border-radius: 12px; border: 0; background: var(--c-primary-soft); color: var(--c-primary); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--c-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* Appointment colours in the scheduler */
.appt-planned { background-color: #0f766e !important; }
.appt-done { background-color: #15803d !important; }
.appt-missed { background-color: #9ca3af !important; }
.appt-rest { background-color: #7c6fb0 !important; }
.appt-weigh { background-color: #d97706 !important; }

/* ------------------------------------------------------------------ forms, grids, charts */
.form-grid { display: grid; gap: 12px; }
.form-grid label, .field-label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
.st-lb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint { font-size: .8rem; color: var(--c-muted); margin-top: 4px; }
.chart-wrap { margin: 0 -6px; }
.segmented { display: inline-flex; background: var(--c-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; color: var(--c-muted); cursor: pointer; }
.segmented button.on { background: #fff; color: var(--c-primary); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary-grid div { background: var(--c-bg); border-radius: 12px; padding: 10px; text-align: center; }
.summary-grid strong { display: block; font-size: 1.15rem; }
.summary-grid small { color: var(--c-muted); font-size: .75rem; }
.entry-grid { font-size: .9rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.days label { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .75rem; font-weight: 600; }

/* ------------------------------------------------------------------ sign-in */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #0f766e, #134e4a); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 28px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand h1 { margin: 8px 0 0; color: var(--c-primary); }
.recaptcha-box { margin-top: 12px; }
.recaptcha-note { font-size: .75rem; color: var(--c-muted); margin: 10px 0 0; }
/* The v3 badge would cover the form on a phone; the note above stands in for it, as Google allows. */
.grecaptcha-badge { visibility: hidden; }
.auth-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 6px; }
.auth-brand p { color: var(--c-muted); margin: 0; }
.auth-title { text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-weight: 600; font-size: .9rem; margin-top: 8px; }
.auth-form input[type=text], .auth-form input[type=password], .auth-form input:not([type]) {
    min-height: 48px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 12px; font: inherit; font-size: 1rem;
}
.auth-form input:focus { outline: 2px solid var(--c-primary); border-color: transparent; }
.auth-form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.auth-form .check input { width: 20px; height: 20px; accent-color: var(--c-primary); }
.auth-form button { margin-top: 16px; }
.auth-switch { text-align: center; margin: 16px 0 0; }
.form-error { background: #fdecec; color: #b42318; border-radius: 10px; padding: 10px 12px; }
.validation-message { color: #b42318; font-size: .85rem; }

/* ------------------------------------------------------------------ Blazor error bar */
#blazor-error-ui {
    background: #fff3cd; bottom: calc(var(--tab-h) + var(--safe-b)); box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ------------------------------------------------------------------ late additions */
.cue { background: var(--c-card); border-radius: 12px; padding: 10px 12px; margin: 0; font-size: .95rem; }
.check { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ goals + Sarge */
.app-bar-actions { display: flex; align-items: center; gap: 4px; }
.app-bar-goals { width: auto; height: 36px; padding: 0 12px 0 8px; border-radius: 18px; display: flex; gap: 6px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.app-bar-goals.active { background: rgba(255,255,255,.18); }

.sarge, .card.sarge { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; }
.card.sarge { border-top: 4px solid #5b6b3a; }
.card.sarge-slipping { border-top-color: var(--c-warn); }
.card.sarge-wayoff { border-top-color: #b42318; }
.card.sarge-achieved { border-top-color: var(--c-good); }
.sarge-avatar { flex: none; }
.sarge-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sarge-headline { font-size: 1.05rem; letter-spacing: .01em; }
.sarge-slipping .sarge-headline { color: var(--c-warn); }
.sarge-wayoff .sarge-headline { color: #b42318; }
.sarge-message { margin: 0; }
.sarge-quote {
    margin: 0; padding: 8px 10px; border-left: 3px solid var(--c-primary);
    background: var(--c-bg); border-radius: 0 8px 8px 0; font-style: italic; font-size: .9rem; align-self: stretch;
}
.sarge-quote cite { font-style: normal; color: var(--c-muted); font-size: .8rem; }
.sarge-text .orders { align-self: stretch; }
.card.sarge-intro { display: flex; flex-direction: row; gap: 12px; align-items: center; }
.sarge-intro p { margin: 0; }
.sarge-finish { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--c-bg); border-radius: 12px; padding: 10px 12px; }
.sarge-finish p { margin: 0; }

.pep-popup .sarge { padding: 4px 0; }
.pep-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px;
    border: 2px solid var(--c-line); border-radius: 999px; background: #fff; color: var(--c-text);
    font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; text-align: left;
}
.chip.on { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); }
.chip.on::after { content: "✓"; font-weight: 700; }

.orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.order { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--c-bg); }
.order-tick {
    flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    border: 2px solid #cbd5e1; font-weight: 700; font-size: .9rem; color: #fff;
}
.order-done .order-tick { background: var(--c-good); border-color: var(--c-good); }
.order-failed .order-tick { background: #b42318; border-color: #b42318; }
.order-info .order-tick { background: var(--c-rest); border-color: var(--c-rest); font-style: italic; font-family: Georgia, serif; }
.order-text { flex: 1; min-width: 0; font-size: .95rem; }
.order-text a { font-weight: 600; text-decoration: none; }
.order-done .order-text { color: var(--c-muted); text-decoration: line-through; }
.order-habit { display: flex; gap: 6px; flex: none; }
.mini {
    min-height: 36px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--c-line); background: #fff;
    font: inherit; font-size: .85rem; font-weight: 700; color: var(--c-primary); cursor: pointer;
}
.mini.on { background: var(--c-good); border-color: var(--c-good); color: #fff; }
.mini-warn { color: #b42318; }
.mini-warn.on { background: #b42318; border-color: #b42318; color: #fff; }

.mission p { margin-bottom: 8px; }
.countdown { display: flex; align-items: baseline; gap: 8px; background: var(--c-primary-soft); color: var(--c-primary); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.countdown strong { font-size: 1.8rem; line-height: 1; }
.countdown-near { background: var(--c-accent-soft); color: #b4233f; }

.report { display: flex; flex-direction: column; gap: 14px; }
.report-head { display: flex; align-items: center; gap: 8px; }
.report-head strong { flex: 1; min-width: 0; }
.report-icon { font-size: 1.1rem; }
.report-bar { margin-top: 6px; }
.status.standing-achieved, .status.standing-ontrack { background: var(--c-good-soft); color: var(--c-good); }
.status.standing-slipping { background: var(--c-warn-soft); color: var(--c-warn); }
.status.standing-wayoff { background: #fdecec; color: #b42318; }
.status.standing-nodata { background: #f3f4f6; color: #6b7280; }

.segmented-wide { display: flex; width: 100%; }
.segmented-wide button { flex: 1; }
.mission-admin { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 4px; }
.btn-link.danger { color: #b42318; }
.order { flex-wrap: wrap; }
.order-text { flex: 1 1 130px; }
.order-habit { margin-left: auto; }

/* ------------------------------------------------------------------ Android app */
.phone-card { border-top: 4px solid var(--c-rest); }
.signin-server { font-size: .85rem; }
.auth-form .webkey { text-transform: uppercase; letter-spacing: .15em; font-family: ui-monospace, Consolas, monospace; }
.auth-help { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--c-bg); font-size: .85rem; color: var(--c-muted); }
.auth-help strong { color: var(--c-text); }
.auth-help p { margin: 4px 0 0; }
.webkey-show { font: 700 2.2rem/1.1 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-align: center; color: var(--c-primary); background: var(--c-primary-soft); border-radius: 12px; padding: 14px 8px; margin: 8px 0; user-select: all; }
.auth-mode { margin-bottom: 4px; }
.auth-form .webkey::placeholder { text-transform: none; letter-spacing: normal; font-family: inherit; }
