/* ===========================================================
   Облако — открытие смены.
   Палитра и шрифт — как на боевом smena.oblakovape.ru.
   Продавец: телефон, одна колонка, действие внизу под большим пальцем.
   Админка: широкая раскладка, таблицы.
   =========================================================== */

:root {
    --bg: #0b1220;
    --surface: #131c2e;
    --raised: #1a2540;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: #2c3a5c;

    --text: #e8edf5;
    --muted: #8a96ad;
    --faint: #5b6781;

    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --accent-soft: rgba(59, 130, 246, 0.12);

    --ok: #10b981;
    --ok-soft: rgba(16, 185, 129, 0.12);
    --ok-line: rgba(16, 185, 129, 0.35);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.12);
    --warn-line: rgba(245, 158, 11, 0.35);
    --bad: #ef4444;
    --bad-text: #fca5a5;
    --bad-soft: rgba(239, 68, 68, 0.12);
    --bad-line: rgba(239, 68, 68, 0.35);

    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 10px;

    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --t: 0.15s ease;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background-image: radial-gradient(ellipse at top right, rgba(59, 130, 246, 0.08), transparent 55%);
    background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ----- Шапка ---------------------------------------------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 18px 6px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.brand__mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #60a5fa 0%, #3b82f6 60%, #1e3a8a 100%);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.45);
    flex-shrink: 0;
}

.topbar__exit {
    color: var(--muted);
    font-size: 14px;
    padding: 8px 0 8px 12px;
}

.topbar__exit:hover { color: var(--text); }

.mock-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--warn);
    background: var(--warn-soft);
    border: 1px solid var(--warn-line);
    padding: 3px 8px;
    border-radius: 999px;
}

/* ----- Каркас страницы продавца -------------------------- */

.page {
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 18px calc(180px + var(--safe-bottom));
}

.page--plain { padding-bottom: 48px; }

.title {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 14px 0 8px;
}

.lead {
    color: var(--muted);
    margin: 0 0 22px;
    font-size: 15px;
}

.lead strong { color: var(--text); font-weight: 600; }

/* Прогресс чек-листа: шесть отрезков, пройденные — синие. */
.progress {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.progress__seg {
    height: 4px;
    border-radius: 2px;
    background: var(--raised);
}

.progress__seg--done { background: var(--accent); }
.progress__seg--now { background: linear-gradient(90deg, var(--accent) 50%, var(--raised) 50%); }

.progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

.progress-meta a { color: var(--muted); }
.progress-meta a:hover { color: var(--text); }

/* ----- Нижняя панель действия ---------------------------- */

.actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 14px 18px calc(14px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(11, 18, 32, 0) 0%, rgba(11, 18, 32, 0.92) 28%, var(--bg) 100%);
}

.actionbar__inner {
    max-width: 484px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actionbar .btn--ghost { background: var(--bg); }

.actionbar__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4px 4px;
}

.actionbar__total span { color: var(--muted); font-size: 14px; }
.actionbar__total strong { font-size: 24px; letter-spacing: -0.01em; }

/* ----- Кнопки --------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--t), border-color var(--t), color var(--t), transform 0.06s ease, opacity var(--t);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--primary:disabled {
    background: var(--raised);
    color: var(--faint);
    box-shadow: none;
    cursor: not-allowed;
}

.btn--ghost {
    background: transparent;
    color: var(--muted);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn--ghost:hover { color: var(--text); border-color: var(--line-strong); }

.btn--small {
    width: auto;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: var(--r-sm);
}

.link-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 15px;
    padding: 10px;
    cursor: pointer;
}

.link-btn:hover { color: var(--text); }

/* ----- Поля ----------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.field__label { font-size: 14px; color: var(--muted); font-weight: 500; }

.input, .textarea, .select {
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font: inherit;
    font-size: 17px;
    color: var(--text);
    transition: border-color var(--t), box-shadow var(--t);
    -webkit-appearance: none;
    appearance: none;
}

.textarea { min-height: 96px; resize: vertical; line-height: 1.4; }

.input:hover, .textarea:hover, .select:hover { border-color: var(--line-strong); }

.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input::placeholder, .textarea::placeholder { color: var(--faint); }

.input--big {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.02em;
    min-height: 68px;
    font-variant-numeric: tabular-nums;
}

/* ----- Сообщения ------------------------------------------ */

.alert {
    padding: 13px 15px;
    border-radius: var(--r-md);
    font-size: 15px;
    line-height: 1.4;
    border: 1px solid transparent;
    margin-bottom: 16px;
}

.alert--error { background: var(--bad-soft); color: var(--bad-text); border-color: var(--bad-line); }
.alert--ok { background: var(--ok-soft); color: #6ee7b7; border-color: var(--ok-line); }
.alert--warn { background: var(--warn-soft); color: #fcd34d; border-color: var(--warn-line); }
.alert--info { background: var(--surface); color: var(--text); border-color: var(--line); }

/* ----- Выбор точки ---------------------------------------- */

.search {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 6px 0 12px;
    background: var(--bg);
}

.store-recent { margin-bottom: 20px; }

.store-group { margin-bottom: 18px; }

.store-group__city {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin: 0 4px 8px;
}

.store-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.store-list form { margin: 0; }

.store-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--t);
}

.store-list > .store-btn:first-child { border-top: none; }
.store-btn:hover { background: var(--accent-soft); }
.store-btn__chev { color: var(--faint); font-size: 22px; line-height: 1; }

a.store-btn { text-decoration: none; }

.store-btn--recent {
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--r-lg);
}

.store-btn__sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.store-empty { padding: 28px 8px; text-align: center; color: var(--muted); }

/* Ссылка «Назад» над заголовком. */
.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 -4px;
    padding: 8px 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.back::before { content: "‹"; font-size: 22px; line-height: 1; margin-top: -2px; }
.back:hover { color: var(--text); }

/* ----- Подтверждение точки ------------------------------- */

.confirm-store {
    padding: 22px 20px;
    margin: 10px 0 18px;
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--r-lg);
}

.confirm-store__name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.kv--left { margin: 14px 0 0; max-width: none; }

/* ----- Результат открытия -------------------------------- */

.done-hero {
    text-align: center;
    padding: 28px 18px 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin: 18px 0 22px;
}

.done-hero__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ok-soft);
    border: 1px solid var(--ok-line);
    color: var(--ok);
    font-size: 30px;
    font-weight: 700;
}

.done-hero__title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.done-hero__store { font-size: 19px; font-weight: 600; margin: 14px 0 4px; }
.done-hero__meta { color: var(--muted); font-size: 14px; }

.kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    text-align: left;
    margin: 16px auto 0;
    max-width: 320px;
    font-size: 14px;
}

.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ----- Камера --------------------------------------------- */

.camera {
    position: relative;
    aspect-ratio: 3 / 4;
    width: 100%;
    max-height: 62vh;
    background: #05080f;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.camera video, .camera img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera--mirror video { transform: scaleX(-1); }
.camera--wide { aspect-ratio: 4 / 3; }

.camera__msg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.camera__msg .btn { width: auto; }

.camera__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px 18px 20px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.shutter {
    grid-column: 2;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: background-color var(--t), transform 0.08s ease;
}

.shutter:active { transform: scale(0.94); background: rgba(255, 255, 255, 0.6); }

.cam-icon-btn {
    grid-column: 3;
    justify-self: end;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.camera__retake {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    background: rgba(11, 18, 32, 0.78);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
}

.camera__flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

.camera__flash--on { animation: flash 0.35s ease-out; }

@keyframes flash {
    from { opacity: 0.85; }
    to { opacity: 0; }
}

/* ----- Чекбокс-строка ------------------------------------- */

.check {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 18px;
    transition: border-color var(--t), background-color var(--t);
}

.check input {
    width: 26px;
    height: 26px;
    margin: 0;
    accent-color: var(--ok);
    flex-shrink: 0;
}

.check:has(input:checked) { border-color: var(--ok-line); background: var(--ok-soft); }

/* ----- Купюры ---------------------------------------------- */

.notes { display: flex; flex-direction: column; gap: 8px; }

.note-row {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    gap: 10px;
}

.step-btn {
    height: 56px;
    border-radius: var(--r-md);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background-color var(--t), border-color var(--t), opacity var(--t);
}

.step-btn:hover { border-color: var(--accent); }
.step-btn:active { background: var(--accent-soft); }
.step-btn:disabled { opacity: 0.3; cursor: default; border-color: var(--line-strong); }

/* Купюра: цвет — как у настоящей банкноты этого номинала. */
.note {
    --c1: #555;
    --c2: #888;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 12px 0 18px;
    border-radius: 10px;
    background:
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.16) 0 17px, transparent 18px),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 7px),
        linear-gradient(100deg, var(--c1), var(--c2));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0, 0, 0, 0.35);
    color: #fff;
    overflow: hidden;
}

.note::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    pointer-events: none;
}

.note__value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    font-variant-numeric: tabular-nums;
}

.note__value small { font-size: 15px; font-weight: 600; opacity: 0.85; margin-left: 3px; }

.note__count {
    position: relative;
    z-index: 1;
    width: 66px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: rgba(11, 18, 32, 0.6);
    color: #fff;
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.note__count::-webkit-outer-spin-button,
.note__count::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.note__count:focus { outline: 2px solid #fff; }

.note--coin { border-radius: 999px; height: 56px; margin: 4px 0; }
.note--coin::before { border-radius: 999px; }

.note[data-v="5000"] { --c1: #a8432c; --c2: #e08a5a; }
.note[data-v="2000"] { --c1: #23579a; --c2: #5b9be0; }
.note[data-v="1000"] { --c1: #2b7766; --c2: #6cc1a7; }
.note[data-v="500"]  { --c1: #66478f; --c2: #a68bd0; }
.note[data-v="200"]  { --c1: #3d7240; --c2: #86b97a; }
.note[data-v="100"]  { --c1: #84593a; --c2: #c99a6e; }
.note[data-v="50"]   { --c1: #4c5d72; --c2: #8fa1b5; }
.note[data-v="10"]   { --c1: #93691d; --c2: #e3bf6a; }
.note[data-v="5"], .note[data-v="2"], .note[data-v="1"] { --c1: #545d6b; --c2: #9aa4b2; }

.note-sum {
    grid-column: 2;
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.note-sum:empty { margin: 0; }

.notes-split {
    margin: 16px 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

/* ----- Статус проверки кассы ----------------------------- */

.status {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    margin-bottom: 18px;
}

.status__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
}

.status__title { font-weight: 700; font-size: 17px; margin: 0 0 4px; }
.status__text { margin: 0; color: var(--muted); font-size: 15px; }
.status__text strong { color: var(--text); }

.status--ok { border-color: var(--ok-line); background: var(--ok-soft); }
.status--ok .status__icon { background: var(--ok); color: #fff; }
.status--bad { border-color: var(--bad-line); background: var(--bad-soft); }
.status--bad .status__icon { background: var(--bad); color: #fff; }
.status--warn { border-color: var(--warn-line); background: var(--warn-soft); }
.status--warn .status__icon { background: var(--warn); color: #1a1205; }
.status--idle .status__icon { background: var(--raised); color: var(--muted); }

.howto {
    counter-reset: howto;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.howto li {
    counter-increment: howto;
    position: relative;
    padding: 0 0 14px 40px;
    color: var(--muted);
    font-size: 15px;
}

.howto li::before {
    content: counter(howto);
    position: absolute;
    left: 0;
    top: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--raised);
    color: var(--text);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}

.howto strong { color: var(--text); }

/* ----- Карточки проверки (оборудование, стенд) ----------- */

.item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color var(--t);
}

.item--ok { border-color: var(--ok-line); }
.item--bad { border-color: var(--bad-line); }

.item__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.item__pos {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--raised);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.item__icon { font-size: 18px; }
.item__name { font-weight: 700; font-size: 17px; line-height: 1.25; }
.item__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Сегментированный выбор: две большие кнопки-радио. */
.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.seg input { position: absolute; opacity: 0; pointer-events: none; }

.seg label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 10px;
    border-radius: var(--r-md);
    border: 1px solid var(--line-strong);
    background: var(--bg);
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--t), border-color var(--t), color var(--t);
}

.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg input:checked + label.seg__ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg input:checked + label.seg__bad { background: var(--bad); border-color: var(--bad); color: #fff; }

.item__more { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.item__more .textarea { min-height: 72px; font-size: 16px; }

/* Чипы-переключатели. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--t), border-color var(--t);
}

.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: #bfdbfe; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.sublabel { font-size: 13px; font-weight: 600; color: var(--muted); margin: 2px 0 -4px; }

.empty-card {
    text-align: center;
    padding: 30px 18px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    color: var(--muted);
}

/* ----- Итог чек-листа ------------------------------------- */

.summary {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.summary li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.summary li:first-child { border-top: none; }
.summary .ok { color: var(--ok); font-weight: 600; }
.summary .bad { color: var(--bad-text); font-weight: 600; }
.summary .warn { color: var(--warn); font-weight: 600; }

.stack { display: flex; flex-direction: column; gap: 10px; }

/* ===========================================================
   Админка
   =========================================================== */

.admin-top {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px 0;
    flex-wrap: wrap;
}

.admin-top .brand { margin-right: auto; }
.admin-top a.muted:hover { color: var(--text); }

.admin-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px 0;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.admin-nav a {
    padding: 12px 16px;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.admin-nav a:hover { color: var(--text); }
.admin-nav a.is-active { color: var(--text); border-bottom-color: var(--accent); }

.admin {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 64px;
}

.admin h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 6px; }
.admin h2 { font-size: 18px; margin: 30px 0 12px; }
.admin .lead { margin-bottom: 18px; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.toolbar .select, .toolbar .input {
    width: auto;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: var(--r-sm);
}

.toolbar .select { padding-right: 34px; }
.toolbar .input { min-width: 200px; flex: 1 1 200px; }

.select {
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.toolbar__spacer { flex: 1; }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.panel--pad { padding: 20px; }

.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.table tbody tr.is-link { cursor: pointer; }
.table tbody tr.is-link:hover { background: var(--accent-soft); }
.table .r { text-align: right; }
.table .strong { font-weight: 600; }
.table .nowrap { white-space: nowrap; }
.table td.fio { width: 40%; }
.table input.input { min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: var(--r-sm); }
.table input.input.is-invalid { border-color: var(--bad); }
.table tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.table tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table tr.is-muted td { color: var(--muted); }

.tag {
    display: inline-block;
    padding: 3px 9px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tag--ok { background: var(--ok-soft); color: #6ee7b7; border-color: var(--ok-line); }
.tag--warn { background: var(--warn-soft); color: #fcd34d; border-color: var(--warn-line); }
.tag--bad { background: var(--bad-soft); color: var(--bad-text); border-color: var(--bad-line); }
.tag--muted { background: var(--raised); color: var(--muted); }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
}

.stat__label { color: var(--muted); font-size: 13px; }
.stat__value { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat--bad .stat__value { color: var(--bad-text); }
.stat--warn .stat__value { color: var(--warn); }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.detail-grid .panel h3 { margin: 0 0 12px; font-size: 16px; }

.photo-link img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

.quote {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--warn);
    background: var(--warn-soft);
    border-radius: 0 10px 10px 0;
    font-size: 14px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.slot-form {
    display: grid;
    grid-template-columns: 90px 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.slot-form .field { margin: 0; }
.slot-form .input { min-height: 44px; font-size: 15px; padding: 10px 12px; border-radius: var(--r-sm); }
.slot-form .field__label { font-size: 13px; }

.inline-form { display: inline; margin: 0; }

.bar {
    display: inline-block;
    height: 8px;
    border-radius: 4px;
    background: var(--accent);
    vertical-align: middle;
    margin-right: 8px;
    min-width: 2px;
}

.bar--warn { background: var(--warn); }
.bar--bad { background: var(--bad); }

.save-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 0;
    background: linear-gradient(180deg, transparent, var(--bg) 40%);
}

.login-box { max-width: 380px; margin: 60px auto; padding: 0 18px; }

details.archived { margin-top: 20px; }
details.archived summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 0; }

@media (max-width: 720px) {
    .admin { padding: 18px 14px 48px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat__value { font-size: 20px; }
    .admin-top, .admin-nav { padding-left: 14px; padding-right: 14px; }
    .slot-form { grid-template-columns: 70px 1fr; }
    .slot-form .btn { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
    .title { font-size: 24px; }
    .note-row { grid-template-columns: 48px 1fr 48px; gap: 8px; }
    .step-btn { height: 52px; }
    .note__value { font-size: 21px; }
}

/* ----- Закрытие смены ------------------------------------- */

.block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-bottom: 14px;
}

.block__title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.block .field:last-child { margin-bottom: 0; }
.block .camera { margin-bottom: 0; }

.field--row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.field--row .field__label { font-size: 15px; color: var(--text); }

.money-input {
    position: relative;
    flex: 0 0 150px;
}

.money-input .input { padding-right: 34px; text-align: right; font-weight: 600; }
.money-input > span {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.sumcheck {
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    background: var(--ok-soft);
    color: #6ee7b7;
}

.sumcheck--bad { background: var(--warn-soft); color: #fcd34d; }

.payout {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.payout__photo {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payout__pick { cursor: pointer; }
.payout__cat, .payout__emp { grid-column: 1 / -1; }
.payout .select { min-height: 50px; font-size: 16px; }
.payout__remove { margin-left: auto; }
.payout__photo img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
}

.payout-hint { font-size: 13px; margin: 10px 0 0; }

.payout .money-input { flex: none; }
[data-payouts]:not(:empty) { margin-bottom: 12px; }
.block [data-refund-comment] { margin-top: 6px; }

@media (max-width: 400px) {
    .payout { grid-template-columns: 1fr; }
}

/* ----- Админка: статусы, «Сегодня», настройки ------------ */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    background: var(--raised);
    color: var(--muted);
}

.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.admin h1 .pill { font-size: 13px; margin-left: 8px; }
.pill--closed { background: var(--ok-soft); color: #6ee7b7; }
.pill--open { background: var(--accent-soft); color: #93c5fd; }
.pill--checklist { background: var(--warn-soft); color: #fcd34d; }
.pill--missing { background: var(--bad-soft); color: var(--bad-text); }
.pill--waiting { background: var(--raised); color: var(--faint); }

.day-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.day-head h1 { margin: 0; }
.day-head h1::first-letter { text-transform: uppercase; }
.day-arrow {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong); color: var(--text); font-size: 22px; line-height: 1;
}
.day-arrow:hover { border-color: var(--accent); }
.day-today { font-size: 14px; }

.stat__value small { font-size: 15px; font-weight: 600; color: var(--muted); }

.region { margin-top: 26px; }
.region__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.region__head h2 { margin: 0; font-size: 18px; }
.region__head .muted { font-size: 14px; }

.day-list { overflow: hidden; }

.day-row {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1.4fr) minmax(150px, 1fr) 130px 110px minmax(160px, 1.6fr);
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 14px;
    transition: background-color var(--t);
}

.day-list > :first-child { border-top: none; }
a.day-row:hover { background: var(--accent-soft); }
.day-row--bad { box-shadow: inset 3px 0 0 var(--bad); }
.day-row--warn { box-shadow: inset 3px 0 0 var(--warn); }
.day-row__store { font-weight: 600; }
.day-row__num { text-align: right; white-space: nowrap; }
.day-row__flags .tag { margin: 2px 4px 2px 0; }

.subnav { display: flex; gap: 6px; margin: 0 0 20px; flex-wrap: wrap; }
.subnav a {
    padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
    color: var(--muted); border: 1px solid var(--line-strong);
}
.subnav a:hover { color: var(--text); }
.subnav a.is-active { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }

.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

@media (max-width: 1000px) {
    .day-row { grid-template-columns: auto 1fr auto; row-gap: 8px; column-gap: 10px; }
    .day-row__store { grid-column: 1 / -1; order: -1; }
    .day-row__who { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .day-row__num:nth-of-type(4) { display: none; }
    .day-row__who:empty, .day-row__num:empty { display: none; }
    .day-row__flags { grid-column: 1 / -1; }
    .day-row__flags:empty { display: none; }
}

@media (max-width: 720px) {
    .admin-top .admin-top__site { display: none; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stats .stat:first-child { grid-column: 1 / -1; }
}

.toolbar__field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.toolbar__field .input { min-width: 0; flex: none; width: 160px; color-scheme: dark; }

.table input.input.time { width: 72px; text-align: center; padding: 10px 6px; }

.day-row__hours { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.access-cluster { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0 0; }
.access-cluster legend { padding: 0 6px; }
.access-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; margin-top: 6px; }

/* ===========================================================
   v12: иконки, шаги, подсказки, состояния загрузки.
   =========================================================== */

:root {
    --faint: #6b7894;               /* было #5b6781 — плейсхолдеры читаются лучше */
    --surface-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }

/* Появление страницы: короткий подъём, без мерцания. */
.page { animation: page-in 0.2s ease-out backwards; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

.lead { font-size: 16px; line-height: 1.5; }

/* Шапка: «В кабинет» — кнопка с иконкой, 44px под палец. */
.topbar__exit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    margin-right: -12px;
    border-radius: 999px;
    font-weight: 600;
    transition: color var(--t), background-color var(--t);
}
.topbar__exit .ico { width: 18px; height: 18px; }
.topbar__exit:hover { background: var(--surface); }

/* Назад над заголовком — тоже 44px. */
.back { min-height: 44px; padding: 0 12px 0 0; }

/* ----- Шаги чек-листа ------------------------------------- */

.stepper { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.stepper__body { flex: 1; min-width: 0; }
.stepper__back {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    transition: border-color var(--t), background-color var(--t);
}
.stepper__back:hover { border-color: var(--line-strong); }
.stepper__back:active { background: var(--raised); }
.stepper__meta {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stepper__count {
    display: inline-block;
    padding: 1px 7px;
    margin-right: 4px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
}
.stepper__next { color: var(--muted); font-weight: 500; }
.stepper .progress { margin-top: 0; }
.progress__seg { transition: background-color 0.3s ease; }
.progress__seg--now { background: linear-gradient(90deg, var(--accent) 50%, var(--raised) 50%); animation: seg-fill 0.5s var(--ease-out) both; background-size: 200% 100%; }
@keyframes seg-fill { from { background-position: 100% 0; } to { background-position: 0 0; } }

.step-ico {
    width: 52px;
    height: 52px;
    margin: 22px 0 -2px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #93c5fd;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}
.step-ico .ico { width: 26px; height: 26px; }

/* ----- Кнопки: загрузка и подсказка ----------------------- */

.btn .ico { width: 20px; height: 20px; }
.btn--block { width: 100%; margin-bottom: 14px; }
.btn--primary { background: linear-gradient(180deg, #4b8df8, var(--accent)); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { background: var(--raised); }
.btn.is-loading { pointer-events: none; }
.spinner {
    width: 18px; height: 18px; flex-shrink: 0;
    border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.actionbar__hint {
    display: none;
    margin: -2px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.btn:disabled + .actionbar__hint { display: block; }

/* ----- Выбор точки ---------------------------------------- */

.search__box { position: relative; display: block; }
.search__ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__input { padding-left: 46px; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.store-group__city { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.store-group__count { padding: 1px 7px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 11px; letter-spacing: 0; }
.store-list { background: var(--surface) var(--surface-grad); }
.store-btn { min-height: 58px; }
.store-btn:active { background: var(--raised); }
.store-btn__text { flex: 1; min-width: 0; }
.store-btn__chev { width: 18px; height: 18px; color: var(--faint); transition: transform var(--t), color var(--t); }
.store-btn:hover .store-btn__chev { color: var(--accent); transform: translateX(2px); }
.store-btn--recent { justify-content: flex-start; min-height: 72px; }
.store-btn__ico {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--accent); color: #fff;
    box-shadow: 0 6px 16px var(--accent-glow);
}

/* ----- Подтверждение точки -------------------------------- */

.confirm-store { position: relative; background: linear-gradient(145deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.05)); }
.confirm-store__ico {
    width: 44px; height: 44px; margin-bottom: 14px;
    display: grid; place-items: center;
    border-radius: 14px; background: var(--accent); color: #fff;
    box-shadow: 0 6px 18px var(--accent-glow);
}

/* ----- Аккаунт готов: кто вы и что дальше ----------------- */

.person {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; margin: 0 0 18px;
    background: var(--surface) var(--surface-grad);
    border: 1px solid var(--line); border-radius: var(--r-lg);
}
.person__avatar {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #60a5fa, #2563eb); color: #fff;
    font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.person__label { margin: 0; font-size: 13px; color: var(--muted); }
.person__name { margin: 2px 0 0; font-size: 18px; font-weight: 700; line-height: 1.25; }

.sublabel--section { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.steps-preview {
    list-style: none; margin: 0 0 24px; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    counter-reset: sp;
}
.steps-preview li {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 6px; text-align: center;
    font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.steps-preview .ico { color: #93c5fd; width: 22px; height: 22px; }

.field__label--block { display: block; margin: 0 0 8px; }
.seg--field { margin-bottom: 18px; }
.toggle--field { margin: -8px 0 18px; min-height: 44px; }
.toggle--field input { width: 22px; height: 22px; }

.meta-line { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.meta-line .ico { width: 16px; height: 16px; }

/* ----- Итоговые экраны ------------------------------------ */

.done-hero { background: var(--surface) var(--surface-grad); position: relative; overflow: hidden; }
.done-hero::before {
    content: ""; position: absolute; inset: -40% -20% auto; height: 70%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.16), transparent 65%);
    pointer-events: none;
}
.done-hero > * { position: relative; }
.done-hero__icon {
    width: 72px; height: 72px;
    background: var(--ok); border: none; color: #fff;
    box-shadow: 0 0 0 8px var(--ok-soft), 0 10px 30px rgba(16, 185, 129, 0.35);
    animation: pop 0.45s var(--ease-out) both;
}
.done-hero__icon .ico { width: 34px; height: 34px; stroke-width: 3; }
@keyframes pop { 0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

.status__icon .ico { width: 22px; height: 22px; }
.status--ok .status__icon .ico { stroke-width: 3; }

/* ----- Карточки проверки ---------------------------------- */

.item { padding: 14px; background: var(--surface) var(--surface-grad); transition: border-color var(--t), background-color var(--t); }
.item__head { position: relative; }
.item__pos--ico { color: #93c5fd; background: var(--accent-soft); }
.item__pos--ico .ico { width: 19px; height: 19px; }
.item__name { flex: 1; min-width: 0; }
.item__head > div { flex: 1; min-width: 0; }
.item__state {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--ok); color: #fff;
    opacity: 0; transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.item__state .ico { width: 15px; height: 15px; stroke-width: 3; }
.item--ok .item__state { opacity: 1; transform: none; }
.item--ok { background: linear-gradient(180deg, rgba(16, 185, 129, 0.07), rgba(16, 185, 129, 0)) , var(--surface); }
.item--bad { background: linear-gradient(180deg, rgba(239, 68, 68, 0.07), rgba(239, 68, 68, 0)), var(--surface); }

.seg label { min-height: 52px; gap: 6px; padding: 10px 8px; }
.seg label:active { transform: scale(0.98); }
.seg input:checked + label.seg__ok::before,
.seg input:checked + label.seg__bad::before {
    content: ""; width: 16px; height: 16px; flex-shrink: 0;
    background: currentColor;
    -webkit-mask: var(--m) center / contain no-repeat;
    mask: var(--m) center / contain no-repeat;
}
.seg input:checked + label.seg__ok::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.seg input:checked + label.seg__bad::before { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E"); }

.chip span { min-height: 44px; }
.check { min-height: 56px; }
.check--flush { margin: 0; }
.check input { width: 24px; height: 24px; }

/* ----- Закрытие смены ------------------------------------- */

.block { background: var(--surface) var(--surface-grad); }
.block__title { display: flex; align-items: center; gap: 10px; }
.block__ico {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--accent-soft); color: #93c5fd;
}
.block__ico .ico { width: 17px; height: 17px; }
.payout { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.sumcheck::before { content: "✓ "; }
.sumcheck--bad::before { content: "! "; }

/* ----- Касса ----------------------------------------------- */

.actionbar__total strong { font-size: 26px; font-weight: 800; }
.note { transition: transform 0.08s ease; }
.note-row.is-filled .note { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 14px rgba(0, 0, 0, 0.4); }

@media (prefers-reduced-motion: reduce) {
    .page, .done-hero__icon, .progress__seg--now { animation: none !important; }
}

.back::before {
    content: "";
    width: 18px; height: 18px; margin: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Админка: те же поверхности, шапка таблицы не уезжает при прокрутке. */
.stat, .panel { background: var(--surface) var(--surface-grad); }
.stat { transition: border-color var(--t); }
.stat--bad { border-color: var(--bad-line); }
.stat--warn { border-color: var(--warn-line); }
.table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.admin-nav { scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.day-arrow { transition: border-color var(--t), background-color var(--t); }

/* ===========================================================
   Админка на телефоне: нижняя панель, карточки вместо таблиц.
   =========================================================== */

.admin-nav a { display: inline-flex; align-items: center; gap: 8px; }
.admin-nav .ico { width: 18px; height: 18px; }
.admin-nav__more { display: none !important; }

.menu-list { overflow: hidden; }
.menu-list a {
    display: flex; align-items: center; gap: 14px;
    min-height: 60px; padding: 12px 16px;
    color: var(--text); font-weight: 600;
    border-top: 1px solid var(--line);
    transition: background-color var(--t);
}
.menu-list a:first-child { border-top: none; }
.menu-list a:hover, .menu-list a:active { background: var(--accent-soft); }
.menu-list .ico { color: #93c5fd; }
.menu-list small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* Фильтры «Сегодня». */
.chips-filter { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.chips-filter::-webkit-scrollbar { display: none; }
.chips-filter button {
    flex-shrink: 0; min-height: 40px; padding: 8px 14px;
    border-radius: 999px; border: 1px solid var(--line-strong);
    background: transparent; color: var(--muted);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background-color var(--t), color var(--t), border-color var(--t);
}
.chips-filter button b { font-weight: 700; color: var(--text); margin-left: 4px; }
.chips-filter button.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chips-filter button[data-f="bad"] b { color: var(--bad-text); }
.refresh-note { font-size: 12px; color: var(--faint); margin: -8px 0 14px; }

@media (max-width: 720px) {
    body { padding-bottom: calc(68px + var(--safe-bottom)); }
    .admin-top { padding-top: 14px; }
    .admin-top > a.muted, .admin-top > span.muted { display: none; }
    .admin h1 { font-size: 22px; }
    .day-head { gap: 10px; }
    .day-head h1 { font-size: 20px; flex: 1; }

    /* Нижняя панель: четыре раздела + «Ещё». */
    .admin-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        max-width: none; margin: 0; padding: 6px 4px calc(6px + var(--safe-bottom));
        display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
        border-top: 1px solid var(--line); border-bottom: none;
        background: rgba(11, 18, 32, 0.96);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        overflow: visible;
    }
    .admin-nav a {
        flex-direction: column; gap: 3px; justify-content: center;
        min-height: 52px; padding: 4px 2px; margin: 0;
        font-size: 11px; font-weight: 600; border: none; border-radius: 12px;
    }
    .admin-nav .ico { width: 22px; height: 22px; }
    .admin-nav a.is-active { color: #93c5fd; background: var(--accent-soft); }
    .admin-nav__wide { display: none !important; }
    .admin-nav__more { display: flex !important; }

    /* Фильтры — ровной сеткой во всю ширину. */
    .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
    .toolbar .select, .toolbar .input { width: 100%; min-width: 0; }
    .toolbar .select:first-child { grid-column: 1 / -1; }
    .toolbar .toggle, .toolbar .btn { grid-column: 1 / -1; }
    .toolbar__field { display: grid; gap: 4px; }
    .toolbar__field .input { width: 100%; }
    .toolbar__spacer { display: none; }

    /* Таблица → карточки: каждая строка — блок, подписи из data-label. */
    .table--cards thead { display: none; }
    .table--cards, .table--cards tbody { display: block; }
    .table--cards tr {
        display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
        padding: 14px 16px; border-bottom: 1px solid var(--line);
    }
    .table--cards tbody tr:nth-child(even) { background: none; }
    .table--cards tr:last-child { border-bottom: none; }
    .table--cards td { display: block; padding: 0; border: none; min-width: 0; }
    .table--cards td:empty { display: none; }
    .table--cards td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-weight: 500; }
    .table--cards .c-main { grid-column: 1; font-weight: 600; font-size: 15px; order: 1; }
    .table--cards .c-side { grid-column: 2; justify-self: end; text-align: right; order: 2; }
    .table--cards .c-sub { grid-column: 1; color: var(--muted); order: 3; }
    .table--cards .c-sum { grid-column: 2; justify-self: end; text-align: right; order: 4; }
    .table--cards .c-more { grid-column: 1 / -1; order: 5; }
    .table--cards .c-more2 { grid-column: 1 / -1; order: 6; }
    .table--cards tr.row-bad { box-shadow: inset 3px 0 0 var(--bad); }
    .table--cards tr.row-warn { box-shadow: inset 3px 0 0 var(--warn); }
    .table--cards tr.row-bad td:first-child, .table--cards tr.row-warn td:first-child { box-shadow: none; }

    /* «Сегодня»: неоткрытые точки — одной строкой. */
    .day-row { padding: 12px 14px; }
    .day-row--compact { grid-template-columns: 1fr auto; }
    .day-row--compact .day-row__store { grid-column: 1; order: 0; }
    .day-row--compact .pill { grid-column: 2; order: 1; align-self: start; }
    .day-row--compact .day-row__hours { display: inline; margin-left: 6px; }

    .stats { gap: 8px; }
    .stat { padding: 12px 14px; }
    .save-bar { bottom: calc(68px + var(--safe-bottom)); }
}

/* ----- Время на чек-лист ----------------------------------- */
.timer {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0 0; padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--ok-soft); border: 1px solid var(--ok-line); color: #6ee7b7;
    font-size: 15px; font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.timer b { font-size: 17px; font-weight: 800; color: var(--text); margin-left: 2px; }
.timer--soon { background: var(--warn-soft); border-color: var(--warn-line); color: #fcd34d; }
.timer--late { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad-text); }
.stepper + .step-ico + .timer, .step-ico + .timer { margin-top: 14px; }
.steps-preview li.is-first { border-color: rgba(59, 130, 246, 0.5); color: var(--text); background: var(--accent-soft); }
.timer + .sublabel--section { margin-top: 20px; }

/* ----- Экран загрузки «Готовим аккаунт» -------------------- */
.loading-screen {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center; padding: 24px;
    background: rgba(11, 18, 32, 0.97);
    animation: page-in 0.2s ease-out both;
}
.loading-screen__box { width: 100%; max-width: 380px; text-align: center; }
.spinner--big { width: 52px; height: 52px; border-width: 4px; color: var(--accent); margin: 0 auto 20px; display: block; }
.loading-screen__title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.loading-screen__store { margin: 0 0 22px; color: var(--muted); font-weight: 600; }
.loading-steps { list-style: none; margin: 0 0 18px; padding: 0; text-align: left; display: grid; gap: 10px; }
.loading-steps li {
    position: relative; padding: 12px 14px 12px 44px;
    border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
    color: var(--faint); font-weight: 600; font-size: 15px;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.loading-steps li::before {
    content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
    border-radius: 50%; border: 2px solid var(--line-strong);
}
.loading-steps li.is-now { color: var(--text); border-color: rgba(59, 130, 246, 0.45); }
.loading-steps li.is-now::before { border-color: var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.loading-steps li.is-done { color: var(--muted); }
.loading-steps li.is-done::before { border: none; background: var(--ok) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.loading-screen__hint { font-size: 13px; margin: 0; }

/* ----- Закрытие смены по шагам ----------------------------- */
.progress--7 { grid-template-columns: repeat(7, 1fr); }
.alert--top { margin: 14px 0 0; }
.close-step .block { margin-top: 4px; }
.close-step .camera { margin-bottom: 14px; }
.cash-total-line {
    position: sticky; bottom: calc(96px + var(--safe-bottom)); z-index: 5;
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 14px 0 10px; padding: 14px 16px;
    border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line-strong);
}
.cash-total-line span { color: var(--muted); font-size: 14px; }
.cash-total-line strong { font-size: 24px; font-weight: 800; }
[data-leftcheck] { margin-top: 0; }
.close-who { margin: 8px 0 0; font-size: 13px; }

/* ----- График: подсказки продавцу -------------------------- */
.sched-note {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 0 0 18px; padding: 14px 16px;
    border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
    color: var(--muted);
}
.sched-note > div { flex: 1; min-width: 0; }
.sched-note .ico { margin-top: 2px; }
.sched-note__title { margin: 0; font-weight: 600; color: var(--text); font-size: 15px; }
.sched-note--ok { border-color: var(--ok-line); background: var(--ok-soft); }
.sched-note--ok .ico { color: var(--ok); }
.sched-note--sub { border-color: var(--warn-line); background: var(--warn-soft); }
.sched-note--sub .ico { color: var(--warn); }
.store-btn--plan { border-color: var(--ok-line); background: var(--ok-soft); }
.store-btn--plan .store-btn__ico { background: var(--ok); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3); }
.store-btn--plan + .store-btn--plan { margin-top: 8px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.title-row__link .ico { width: 18px; height: 18px; }

.my-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.my-day {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
}
.my-day--today { border-color: rgba(59, 130, 246, 0.5); background: var(--accent-soft); }
.my-day--off { background: transparent; }
.my-day--off .my-day__hours { color: var(--faint); }
.my-day__date { width: 40px; flex-shrink: 0; text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.my-day__date b { display: block; font-size: 20px; color: var(--text); line-height: 1.1; }
.my-day__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.my-day__store { font-weight: 700; }
.my-day__hours { color: var(--muted); font-size: 14px; }

/* ----- Админка: график ------------------------------------- */
.sched th.is-today, .sched td.is-today { background: var(--accent-soft); }
.sched td { padding: 6px; vertical-align: top; }
.sched__store { min-width: 180px; font-weight: 600; padding: 10px 12px !important; }
.sched__cell { min-width: 178px; }
.sched__slot { display: flex; align-items: center; gap: 4px; }
.sched__slot + .sched__slot { margin-top: 4px; }
.sched__kind { width: 16px; font-size: 11px; font-weight: 700; color: var(--faint); text-align: center; }
.sched__slot--night .sched__kind { color: #a78bfa; }
.sched__input {
    width: 100%; min-width: 0; min-height: 34px; padding: 6px 8px;
    border-radius: 8px; border: 1px solid transparent; background: transparent;
    color: var(--text); font: inherit; font-size: 12.5px; letter-spacing: -0.01em;
    transition: border-color var(--t), background-color var(--t);
}
.sched__input:hover { border-color: var(--line-strong); }
.sched__input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.sched__input.is-filled { background: var(--raised); }
.sched__input.is-unknown { border-color: var(--warn-line); background: var(--warn-soft); }
.sched__input.is-ok { border-color: var(--ok); }
.sched__input.is-error { border-color: var(--bad); }
.sched__input.is-saving { opacity: 0.6; }
.sched__input::placeholder { color: var(--faint); }

/* ----- Тестовый режим: быстрые кнопки ---------------------- */
.demo-bar {
    position: sticky; top: 0; z-index: 25;
    display: flex; align-items: center; gap: 8px;
    max-width: 520px; margin: 0 auto; padding: 6px 18px;
    background: rgba(11, 18, 32, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.demo-bar span { font-size: 12px; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: 0.06em; margin-right: auto; }
.demo-bar button {
    min-height: 36px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--warn-line); background: var(--warn-soft); color: #fcd34d;
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.demo-bar button.is-on { background: var(--warn); color: #1a1205; }

/* ----- Мой график: календарь месяца ------------------------ */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 6px; }
.cal-head__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.cal-today-link { margin: 0 0 8px; text-align: center; font-size: 14px; font-weight: 600; }
.cal-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.cal-summary div {
    display: flex; flex-direction: column; align-items: center; padding: 10px 6px;
    border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
}
.cal-summary b { font-size: 22px; font-weight: 800; }
.cal-summary span { font-size: 12px; color: var(--muted); }

.cal { background: var(--surface) var(--surface-grad); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; }
.cal__row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__row + .cal__row { margin-top: 4px; }
.cal__row--head span { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 0 6px; }
.cal__row--head span.is-weekend { color: #f0a3a3; }
.cal__day {
    position: relative; aspect-ratio: 1 / 1.08; min-height: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
    padding: 6px 2px 4px; border: 1px solid transparent; border-radius: 12px;
    background: transparent; color: var(--text); font: inherit; cursor: pointer;
    transition: background-color var(--t), border-color var(--t);
}
.cal__day:hover { background: var(--raised); }
.cal__num { font-size: 15px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.cal__day.is-out { opacity: 0.32; }
.cal__day.is-past .cal__num { color: var(--muted); }
.cal__day.has-shift { background: rgba(59, 130, 246, 0.08); }
.cal__day.is-today { border-color: var(--accent); }
.cal__day.is-today .cal__num { color: #93c5fd; }
.cal__day.is-selected { background: var(--accent-soft); border-color: rgba(59, 130, 246, 0.7); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
.cal__bars { display: flex; flex-direction: column; gap: 3px; width: 70%; }
.cal__bar { display: block; height: 5px; border-radius: 3px; background: var(--accent); }
.cal__bar--night { background: #8b5cf6; }
.cal__done {
    position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
    display: grid; place-items: center; background: var(--ok); color: #fff;
}
.cal__done .ico { width: 9px; height: 9px; stroke-width: 4; }

.cal-legend { display: flex; justify-content: center; gap: 16px; margin: 10px 0 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .cal__bar { width: 16px; }
.cal-legend__done { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.cal-legend__done .ico { width: 9px; height: 9px; stroke-width: 4; }

.cal-detail { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-height: 64px; }
.cal-detail__title { margin: 0 0 10px; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cal-detail__shift { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); border-left: 4px solid var(--accent); background: var(--raised); }
.cal-detail__shift + .cal-detail__shift { margin-top: 8px; }
.cal-detail__shift--night { border-left-color: #8b5cf6; }
.cal-detail__shift span { color: var(--muted); font-size: 14px; }
.cal-detail__off { margin: 0; color: var(--muted); }
.cal-detail__worked { margin: 10px 0 0; color: #6ee7b7; font-size: 14px; font-weight: 600; }
