/* === UCHET.CSS ===
   uchet/assets/css/uchet.css
   НАЗНАЧЕНИЕ: Основа дашборда HealthyFeet: токены бренда (светлая и темная тема), каркас (шапка, боковое меню, нижняя панель), кнопки, поля, листы, тосты
   СВЯЗИ: uchet/index.php, uchet/assets/css/uchet-screens.css (экраны), uchet/assets/js/uchet-core.js
   РАЗМЕР: ~640 строк */

:root {
    /* Бренд HealthyFeet (логотип #354860, сайт #2b5672 / #3c6e71, анкета) */
    --hf-navy: #354860;
    --hf-navy-deep: #263547;
    --hf-ink: #1f2b3a;
    --hf-teal: #3c6e71;
    --hf-mint: #84a499;
    --hf-mint-soft: #ebf1ee;
    --hf-sand: #dcd7cc;
    --hf-paper: #f6f4ef;
    --hf-card: #ffffff;
    --hf-muted: #677283;
    --hf-line: #e4e0d7;
    --hf-danger: #b4412f;
    --hf-warn: #b7791f;
    --hf-ok: #2f7a55;
    --hf-radius: 14px;
    --hf-gap: 10px;

    /* Смысловые цвета (меняются темой) */
    --c-bg: var(--hf-paper);
    --c-surface: var(--hf-card);
    --c-surface-2: #faf8f4;
    --c-sunken: #efece5;
    --c-text: var(--hf-ink);
    --c-muted: var(--hf-muted);
    --c-line: var(--hf-line);
    --c-line-strong: #d3cdc0;
    --c-primary: var(--hf-navy);
    --c-primary-hover: var(--hf-navy-deep);
    --c-on-primary: #ffffff;
    --c-accent: var(--hf-mint);
    --c-accent-soft: var(--hf-mint-soft);
    --c-accent-ink: #3f6a5c;
    --c-danger: var(--hf-danger);
    --c-danger-soft: #f8e9e5;
    --c-warn: var(--hf-warn);
    --c-warn-soft: #faf0dc;
    --c-ok: var(--hf-ok);
    --c-ok-soft: #e4f1ea;
    --c-hero-1: #354860;
    --c-hero-2: #263547;
    --c-shadow: 0 1px 2px rgba(31, 43, 58, .06), 0 6px 18px rgba(31, 43, 58, .06);
    --c-shadow-lg: 0 12px 40px rgba(31, 43, 58, .18);
    --c-focus: 0 0 0 3px rgba(132, 164, 153, .45);

    --f-display: 'Lora', Georgia, serif;
    --f-ui: 'Manrope', 'Segoe UI', sans-serif;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: var(--hf-radius);
    --h-top: 56px;
    --h-nav: 64px;
    --w-side: 248px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}

html.theme-dark {
    --c-bg: #10161e;
    --c-surface: #18212c;
    --c-surface-2: #1c2632;
    --c-sunken: #141c25;
    --c-text: #e8ecf1;
    --c-muted: #94a1b2;
    --c-line: #263141;
    --c-line-strong: #334052;
    --c-primary: #5b7aa3;
    --c-primary-hover: #6c8bb4;
    --c-on-primary: #ffffff;
    --c-accent: #8fb8a9;
    --c-accent-soft: #1d2f2b;
    --c-accent-ink: #a9d0c2;
    --c-danger: #e0735f;
    --c-danger-soft: #3a1f1b;
    --c-warn: #e3a945;
    --c-warn-soft: #3a2e17;
    --c-ok: #5fbf8c;
    --c-ok-soft: #173126;
    --c-hero-1: #22324a;
    --c-hero-2: #182436;
    --c-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --c-shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 500 15px/1.45 var(--f-ui);
    font-variant-numeric: lining-nums tabular-nums;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}
html.no-transition *, html.no-transition *::before, html.no-transition *::after { transition: none !important; }
a { color: var(--c-primary); text-decoration: none; }
/* Меняет только цвет ссылки по умолчанию; цвет из классов (нижнее меню, кнопки, плитки) не перебивает */
:where(html.theme-dark) a { color: var(--c-accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0; letter-spacing: -.01em; word-spacing: -.22em; }
/* Пробел в Lora на кириллице около 0.5em - ужимаем во всех многословных заголовках этим шрифтом */
.topbar-title, .month-switch .month-name { word-spacing: -.22em; }
.muted { color: var(--c-muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }
:focus-visible { outline: none; box-shadow: var(--c-focus); border-radius: 6px; }

/* ---------- Загрузка приложения ---------- */
.boot-splash {
    position: fixed; inset: 0; display: grid; place-items: center; background: var(--c-bg); z-index: 50;
}
.boot-splash img { width: 64px; opacity: .9; animation: pulse 1.4s ease-in-out infinite; }
html.theme-dark .boot-splash img { filter: brightness(0) invert(1); opacity: .7; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .55; } }

/* ---------- Каркас ---------- */
.app { min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    height: calc(var(--h-top) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 12px 0;
    display: flex; align-items: center; gap: 10px;
    background: color-mix(in srgb, var(--c-bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--c-line);
}
.topbar-emblem { width: 22px; height: auto; flex: 0 0 auto; }
html.theme-dark .topbar-emblem { filter: brightness(0) invert(1); opacity: .85; }
.topbar-title { font-family: var(--f-display); font-size: 19px; font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sync { display: flex; align-items: center; gap: 6px; color: var(--c-muted); font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
.main { padding: 12px 12px calc(var(--h-nav) + var(--safe-b) + 24px); max-width: 1180px; margin: 0 auto; }

.side { display: none; }

/* Нижняя панель (телефон) */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    height: calc(var(--h-nav) + var(--safe-b)); padding-bottom: var(--safe-b);
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    background: var(--c-surface);
    border-top: 1px solid var(--c-line);
    box-shadow: 0 -6px 20px rgba(31, 43, 58, .05);
}
.bottomnav a, .bottomnav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 100%; border: 0; background: none; color: var(--c-muted); font-size: 11px; font-weight: 600;
}
.bottomnav a.active, .bottomnav button.active { color: var(--c-primary); }
html.theme-dark .bottomnav a.active { color: var(--c-accent-ink); }
.bottomnav .fab-slot { position: relative; }
.bottomnav .fab {
    width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; border: 0;
    display: grid; place-items: center;
    background: radial-gradient(circle at 30% 25%, #4d6585, var(--hf-navy) 60%, var(--hf-navy-deep));
    color: #fff; box-shadow: 0 0 0 5px var(--c-surface), 0 0 0 6px var(--c-line), 0 10px 24px rgba(38, 53, 71, .35);
    transition: transform .15s ease;
}
.bottomnav .fab:active { transform: scale(.94); }
.bottomnav .fab .ic { width: 28px; height: 28px; stroke-width: 2.2; }

@media (min-width: 960px) {
    body { font-size: 14.5px; }
    .app { display: grid; grid-template-columns: var(--w-side) minmax(0, 1fr); }
    .side {
        display: flex; flex-direction: column; gap: 4px;
        position: sticky; top: 0; height: 100vh; overflow-y: auto;
        padding: 18px 12px 14px; background: var(--c-surface); border-right: 1px solid var(--c-line);
    }
    .side-logo { display: block; padding: 4px 10px 16px; }
    .side-logo img { width: 150px; height: auto; display: block; }
    html.theme-dark .side-logo img { filter: brightness(0) invert(1); opacity: .9; }
    .side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 12px; }
    .side-actions .btn { height: 38px; font-size: 13px; padding: 0 8px; }
    .side-actions .btn:first-child { grid-column: 1 / -1; }
    .side a.nav {
        display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
        color: var(--c-text); font-weight: 600;
    }
    .side a.nav:hover { background: var(--c-surface-2); }
    .side a.nav.active { background: var(--c-accent-soft); color: var(--c-accent-ink); }
    .side a.nav .ic { color: var(--c-muted); }
    .side a.nav.active .ic { color: var(--c-accent-ink); }
    .side-sep { height: 1px; background: var(--c-line); margin: 8px 6px; }
    .side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); padding: 6px 10px 2px; }
    .side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--c-line); display: flex; align-items: center; gap: 10px; }
    .side-foot .who { flex: 1 1 auto; min-width: 0; }
    .side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar { padding: 0 20px; }
    .topbar-emblem { display: none; }
    .main { padding: 18px 20px 40px; }
    .bottomnav { display: none; }
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--c-line-strong);
    background: var(--c-surface); color: var(--c-text); font-weight: 700; font-size: 14.5px; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { background: var(--c-surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-hover); }
.btn-accent { background: var(--c-accent-soft); border-color: transparent; color: var(--c-accent-ink); }
.btn-danger { background: var(--c-danger-soft); border-color: transparent; color: var(--c-danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--c-sunken); }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; border-color: transparent; background: transparent; color: var(--c-muted); }
.btn-icon:hover { background: var(--c-sunken); color: var(--c-text); }
.btn .spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 0; min-width: 0; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; font-weight: 700; color: var(--c-muted); letter-spacing: .01em; }
.field-hint { font-size: 12px; color: var(--c-muted); }
.field-hint b { color: var(--c-text); }
.input, .select, .textarea {
    width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
    border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-text);
    font-size: 16px; font-weight: 600; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 72px; padding: 12px 14px; resize: vertical; font-weight: 500; }
.select { padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%), linear-gradient(135deg, var(--c-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: var(--c-focus); }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--c-danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .input-suffix { position: absolute; right: 4px; top: 4px; }
.input-wrap .input-unit { position: absolute; right: 14px; top: 0; height: 48px; display: grid; place-items: center; color: var(--c-muted); font-weight: 700; pointer-events: none; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 14px; top: 14px; color: var(--c-muted); pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hf-gap); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.form-error { padding: 10px 12px; border-radius: 10px; background: var(--c-danger-soft); color: var(--c-danger); font-weight: 600; font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--hf-navy); }

/* Переключатель вариантов (вместо select) */
.seg { display: flex; padding: 4px; gap: 4px; background: var(--c-sunken); border-radius: 13px; }
.seg button {
    flex: 1 1 auto; min-width: 0; height: 40px; border: 0; border-radius: 10px; background: transparent;
    color: var(--c-muted); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px;
}
.seg button.on { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 3px rgba(31, 43, 58, .12); }
.seg.seg-danger button.on { color: var(--c-danger); }

/* Счетчик количества */
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
    width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--c-line-strong); background: var(--c-surface);
    display: grid; place-items: center; color: var(--c-text); flex: 0 0 auto;
}
.stepper button:active { background: var(--c-sunken); }
.stepper .input { text-align: center; height: 52px; font-size: 22px; font-weight: 800; flex: 1 1 auto; }

/* ---------- Чипы и метки ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--c-line-strong);
    background: var(--c-surface); color: var(--c-text); font-weight: 600; font-size: 13px;
}
.chip.on { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.badge {
    flex: 0 0 auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    background: var(--c-sunken); color: var(--c-muted);
}
.badge-ok { background: var(--c-ok-soft); color: var(--c-ok); }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-accent { background: var(--c-accent-soft); color: var(--c-accent-ink); }
.badge-navy { background: var(--c-primary); color: var(--c-on-primary); }

/* ---------- Карточки ---------- */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--c-shadow); }
.card-pad { padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.card-head h2, .card-head h3 { font-size: 17px; }
.section { margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 8px; }
.section-head h2 { font-size: 18px; }
.section-head .muted { font-size: 12.5px; }

/* ---------- Список строк ---------- */
.rows { display: flex; flex-direction: column; }
.row {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--c-line);
    background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left;
}
.rows > .row:first-child { border-top: 0; }
button.row:hover, a.row:hover { background: var(--c-surface-2); }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row-title { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { display: block; font-size: 12.5px; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; max-width: 46%; }
.row-end .big { display: block; font-weight: 800; font-size: 15.5px; white-space: nowrap; }
.row-lead { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--c-accent-soft); color: var(--c-accent-ink); }
.row-lead.is-off { background: var(--c-danger-soft); color: var(--c-danger); }

/* ---------- Пусто / ошибка / скелет ---------- */
.empty { padding: 26px 16px; text-align: center; color: var(--c-muted); }
.empty .ic { width: 34px; height: 34px; stroke-width: 1.4; margin-bottom: 6px; color: var(--c-line-strong); }
.empty b { display: block; color: var(--c-text); font-size: 15px; margin-bottom: 2px; }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--c-sunken) 0, var(--c-surface-2) 40%, var(--c-sunken) 80%); background-size: 300% 100%; animation: skel 1.3s ease-in-out infinite; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skel-line { height: 14px; margin: 8px 0; }
.skel-block { height: 110px; margin-bottom: 10px; }
.screen-error { padding: 18px; border-radius: var(--r-lg); background: var(--c-danger-soft); color: var(--c-danger); font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Лист (снизу на телефоне, окно на компьютере) ---------- */
.sheet-backdrop {
    position: fixed; inset: 0; z-index: 60; background: rgba(16, 22, 30, .45);
    opacity: 0; transition: opacity .2s ease;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
    max-height: calc(100vh - 40px); max-height: calc(100dvh - 24px);
    display: flex; flex-direction: column;
    background: var(--c-bg); border-radius: 22px 22px 0 0; box-shadow: var(--c-shadow-lg);
    transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open { transform: translateY(0); }
.sheet.full { height: calc(100dvh - 24px); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--c-line-strong); margin: 8px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 18px; flex: 0 0 auto; }
.sheet-head h2 { flex: 1 1 auto; font-size: 20px; min-width: 0; }
.sheet-body { padding: 4px 16px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.sheet-foot { padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--c-line); background: var(--c-surface); flex: 0 0 auto; }
@media (min-width: 720px) {
    .sheet {
        left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 40px));
        max-height: min(86vh, 860px); border-radius: 20px;
        transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease;
    }
    .sheet.wide { width: min(860px, calc(100vw - 40px)); }
    .sheet.full { height: min(86vh, 860px); }
    .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
    .sheet-grip { display: none; }
    .sheet-head { padding: 14px 12px 6px 20px; }
    .sheet-body { padding: 6px 20px 18px; }
    .sheet-foot { padding: 12px 20px; border-radius: 0 0 20px 20px; }
}
body.sheet-lock { overflow: hidden; }

/* Меню действий в листе */
/* Меню "Еще": группы-карточки со строками, все пункты помещаются на экран телефона */
.menu-list { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; overflow: hidden; }
.menu-list + .menu-list { margin-top: 10px; }
.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 52px;
    border: 0; border-top: 1px solid var(--c-line); background: transparent; color: var(--c-text); font-weight: 700; text-align: left; width: 100%;
}
.menu-item:first-child { border-top: 0; }
.menu-item:hover { background: var(--c-surface-2); }
.menu-item .menu-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--c-accent-soft); color: var(--c-accent-ink); flex: 0 0 auto; }
.menu-item .menu-ic.navy { background: var(--c-primary); color: var(--c-on-primary); }
.menu-item .menu-ic.danger { background: var(--c-danger-soft); color: var(--c-danger); }
.menu-item small { display: block; font-weight: 500; color: var(--c-muted); font-size: 12.5px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Тосты ---------- */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--h-nav) + var(--safe-b) + 12px); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 960px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; width: 100%;
    padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--hf-ink); color: #fff; box-shadow: var(--c-shadow-lg);
    font-weight: 600; font-size: 14px; animation: toast-in .22s ease;
}
@media (min-width: 960px) { .toast { width: auto; min-width: 300px; } }
html.theme-dark .toast { background: #2a3646; }
.toast .ic { color: var(--hf-mint); }
.toast.err .ic { color: #f0a08f; }
.toast span { flex: 1 1 auto; }
.toast button { border: 0; background: rgba(255, 255, 255, .12); color: #fff; height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 700; flex: 0 0 auto; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--c-bg); }
.login-brand {
    position: relative; overflow: hidden; padding: calc(36px + env(safe-area-inset-top, 0px)) 24px 64px; text-align: center; color: #fff;
    background: radial-gradient(120% 90% at 85% 0%, #4b6383 0, transparent 60%), linear-gradient(160deg, var(--hf-navy), var(--hf-navy-deep));
}
.login-brand::after {
    content: ''; position: absolute; left: 50%; bottom: -3px; width: 140%; height: 48px; transform: translateX(-50%);
    background: var(--c-bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.login-brand img { width: 200px; max-width: 70%; height: auto; }
.login-brand p { margin: 10px 0 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.login-card { width: min(420px, calc(100% - 32px)); margin: -18px auto 32px; position: relative; z-index: 1; align-self: start; }
.login-card .card-pad { padding: 22px 20px; }
.login-card h1 { font-size: 24px; margin-bottom: 4px; }
@media (min-width: 960px) {
    .login { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; }
    .login-brand { display: grid; place-items: center; align-content: center; padding: 40px; text-align: left; }
    .login-brand::after { left: auto; right: -1px; bottom: 50%; top: auto; width: 60px; height: 140%; transform: translateY(50%); border-radius: 100% 0 0 100% / 50% 0 0 50%; }
    .login-brand img { width: 320px; max-width: 80%; }
    .login-card { align-self: center; margin: 0 auto; }
}

/* Пароль один раз (после добавления человека) */
.secret {
    display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px;
    border: 1.5px dashed var(--c-accent); background: var(--c-accent-soft);
}
.secret code { flex: 1 1 auto; font: 800 20px/1.2 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; color: var(--c-text); word-break: break-all; }
.note { padding: 10px 12px; border-radius: 12px; background: var(--c-warn-soft); color: var(--c-warn); font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.note .ic { margin-top: 1px; }
.note.info { background: var(--c-accent-soft); color: var(--c-accent-ink); }
