/* ─────────────────────────────────────────────────────────────
   Work Tracker — базовые стили (iOS 27 UI Kit, светлая тема).
   ВНИМАНИЕ: это стартовый, вручную написанный CSS, чтобы страницы
   выглядели правильно до первой сборки Tailwind. После `npm run build`
   он будет перезаписан выводом Tailwind (см. resources/css/app.css).
   ───────────────────────────────────────────────────────────── */

:root {
    --bg:          #F2F2F7;
    --surface:     #FFFFFF;
    --label:       #1C1C1E;
    --label-2:     #3C3C43;
    --label-3:     #6C6C70;  /* чуть темнее #8E8E93 ради контраста WCAG AA */
    --muted:       #8E8E93;
    --separator:   rgba(120,120,128,.20);

    --blue:        #0A84FF;
    --blue-press:  #0071E3;
    --blue-tint:   rgba(10,132,255,.15);
    --green:       #30D158;
    --red:         #FF453A;
    --fill-gray:   rgba(120,120,128,.16);
    --fill-input:  rgba(120,120,128,.12);

    --radius-card: 24px;
    --radius-md:   16px;
    --radius-sm:   12px;
    --radius-pill: 100px;

    --shadow-card: 0 1px 3px rgba(0,0,0,.06);
    --font: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--label);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 17px;
    line-height: 1.4;
}

/* Layout ------------------------------------------------------- */
.shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.card--center { text-align: center; align-items: center; }

.card__head { display: flex; flex-direction: column; gap: 6px; }

/* Typography (iOS scale) -------------------------------------- */
.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.title-lg { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.lede     { font-size: 15px; color: var(--label-3); }
.footnote { font-size: 13px; color: var(--label-3); text-align: center; }
.link     { color: var(--blue); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Forms ------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form--inline { margin-top: -4px; }

.field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--fill-input);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    transition: background .15s ease;
}
.field:focus-within { background: rgba(120,120,128,.18); }
.field__icon { color: var(--muted); flex-shrink: 0; }
.field__input {
    border: none;
    background: transparent;
    font: inherit;
    color: var(--label);
    flex: 1;
    min-width: 0;
    outline: none;
}
.field__input::placeholder { color: var(--muted); }

.code-input {
    width: 100%;
    border: none;
    background: var(--fill-input);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .4em;
    text-align: center;
    color: var(--label);
    outline: none;
    caret-color: var(--blue);
}
.code-input:focus { box-shadow: 0 0 0 3px var(--blue-tint); }
.code-input::placeholder { color: var(--muted); letter-spacing: .3em; }

/* Buttons (pill, iOS) ---------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: background .15s ease, transform .05s ease;
    min-height: 48px;               /* тач-таргет ≥44px (спека §13) */
}
.btn:active { transform: scale(.98); }
.btn--block { width: 100%; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-press); }

.btn--tinted { background: var(--blue-tint); color: var(--blue); }
.btn--tinted:hover { background: rgba(10,132,255,.24); }

.btn--gray { background: var(--fill-gray); color: var(--label); }
.btn--gray:hover { background: rgba(120,120,128,.24); }

.btn--plain { background: transparent; color: var(--blue); padding: 8px 12px; min-height: 0; }
.btn--plain:hover { background: rgba(10,132,255,.10); }

/* Alerts ------------------------------------------------------ */
.alert {
    font-size: 15px;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    line-height: 1.35;
}
.alert--error { background: rgba(255,69,58,.12); color: #C7362E; }
.alert--info  { background: var(--blue-tint);     color: #0060C0; }

/* Language switch --------------------------------------------- */
.langswitch {
    display: inline-flex;
    background: var(--fill-gray);
    border-radius: var(--radius-pill);
    padding: 3px;
}
.langswitch__item {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--label-3);
    text-decoration: none;
    border-radius: var(--radius-pill);
}
.langswitch__item.is-active { background: var(--surface); color: var(--label); box-shadow: var(--shadow-card); }

/* ═══════════════════════════════════════════════════════════════
   Авторизованная часть: app shell, навигация, списки, карточки.
   ═══════════════════════════════════════════════════════════════ */

.app { min-height: 100dvh; padding-bottom: 0; }

/* Верхняя панель */
.appbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: rgba(255,255,255,.86);
    backdrop-filter: saturate(1.8) blur(20px);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: 1px solid var(--separator);
}
.appbar__title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.appbar__actions { display: flex; align-items: center; gap: 4px; }
.appbar__logout { display: flex; }
.appbar__link {
    font-size: 13px; font-weight: 700; color: var(--label-3);
    text-decoration: none; padding: 8px 10px; border-radius: var(--radius-pill);
}
.appbar__link:hover { background: var(--fill-gray); }
.icon-btn {
    display: grid; place-items: center;
    width: 40px; height: 40px; border: none; cursor: pointer;
    background: transparent; color: var(--label); border-radius: 50%;
}
.icon-btn:hover { background: var(--fill-gray); }

/* Контент */
.app-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
}
.stack { display: flex; flex-direction: column; gap: 18px; }

/* Нижняя навигация (одним пальцем, §13) */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(1.8) blur(20px);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    border-top: 1px solid var(--separator);
}
.tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 0;
    font-size: 11px; font-weight: 600;
    color: var(--muted); text-decoration: none;
    border-radius: 12px;
}
.tab.is-active { color: var(--blue); }
.tab:active { background: var(--fill-gray); }

/* Заголовки секций */
.month-head { display: flex; flex-direction: column; gap: 2px; }
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

/* Плитки-показатели */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-width: 0; }
.stat__value { overflow-wrap: anywhere; }
.stat-card {
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.stat-card--wide { grid-column: 1 / -1; }
.stat__label { font-size: 13px; color: var(--label-3); font-weight: 600; }
.stat__value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.stat__value--muted { color: var(--muted); font-size: 17px; font-weight: 600; }

/* Списки (Settings-style) */
.list { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; }
.list__row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; text-decoration: none; color: var(--label);
    border-bottom: 1px solid var(--separator);
}
.list__row:last-child { border-bottom: none; }
.list__row:active { background: var(--fill-input); }
.list__title { flex: 1; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.list__meta { font-size: 15px; color: var(--label-3); }
.chevron { color: #C7C7CC; flex-shrink: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.dot--lg { width: 40px; height: 40px; border-radius: 12px; }
.badge {
    font-size: 11px; font-weight: 700; color: var(--label-3);
    background: var(--fill-gray); padding: 2px 8px; border-radius: var(--radius-pill);
}

/* Empty state */
.empty {
    background: var(--surface); border-radius: var(--radius-card);
    box-shadow: var(--shadow-card); padding: 32px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.empty__icon {
    display: grid; place-items: center; width: 64px; height: 64px;
    border-radius: 20px; background: var(--blue-tint); color: var(--blue); margin-bottom: 4px;
}
.empty__title { font-size: 17px; font-weight: 700; }
.empty__text { font-size: 15px; color: var(--label-3); max-width: 300px; }
.empty .btn { margin-top: 8px; }

/* Назад */
.back {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 15px; font-weight: 600; color: var(--blue); text-decoration: none;
    align-self: flex-start;
}

/* Формы */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 600; color: var(--label-3); }
.input {
    width: 100%; border: none; background: var(--fill-input);
    border-radius: var(--radius-sm); padding: 13px 14px;
    font-family: var(--font); font-size: 17px; color: var(--label); outline: none;
}
.input:focus { box-shadow: 0 0 0 3px var(--blue-tint); }
.input--error { box-shadow: 0 0 0 2px var(--red); }
.select { cursor: pointer; }
.textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
.field-error { font-size: 13px; color: #C7362E; }

/* Свотчи цвета */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch__dot {
    display: block; width: 32px; height: 32px; border-radius: 50%;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 2px var(--surface);
    transition: transform .1s ease;
}
.swatch input:checked + .swatch__dot {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue);
    transform: scale(1.05);
}

/* Просмотр компании */
.company-head { display: flex; align-items: center; gap: 14px; }
.info-row { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--separator); }
.info-row__label { font-size: 13px; color: var(--label-3); font-weight: 600; }
.info-row__value { font-size: 17px; }

/* Мелкая кнопка */
.btn--sm { font-size: 15px; padding: 9px 16px; min-height: 40px; }

/* ── Оплата: сегмент-контрол, история ставок ─────────────────── */
.segmented {
    display: flex;
    background: var(--fill-gray);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}
.segmented__item { flex: 1; cursor: pointer; }
.segmented__item input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented__item span {
    display: block; text-align: center;
    font-size: 14px; font-weight: 600; color: var(--label-3);
    padding: 8px 6px; border-radius: 9px;
}
.segmented__item input:checked + span {
    background: var(--surface); color: var(--label); box-shadow: var(--shadow-card);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comp-fields { display: flex; flex-direction: column; gap: 14px; }

.list__row--stack { flex-direction: column; align-items: stretch; gap: 6px; }
.comp-row__top { display: flex; align-items: center; gap: 8px; }
.comp-row__type { font-size: 15px; font-weight: 700; }
.comp-row__period { margin-left: auto; font-size: 13px; color: var(--label-3); }
.comp-row__summary { font-size: 15px; color: var(--label-2); }

.badge--green { color: #248A3D; background: rgba(48,209,88,.16); }

.empty--sm { padding: 20px; }

/* ── Календарь / платежи / баланс ────────────────────────────── */
.monthnav {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 6px 8px;
}
.monthnav__label { font-size: 17px; font-weight: 700; }

.day-head {
    font-size: 13px; font-weight: 700; color: var(--label-3);
    padding: 8px 4px 2px; text-transform: capitalize;
}

.entry {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 12px 14px;
}
.entry__main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entry__company { font-size: 16px; font-weight: 600; }
.entry__type { font-size: 13px; color: var(--label-3); }
.entry__amount { font-size: 16px; font-weight: 700; white-space: nowrap; }
.entry--void { opacity: .55; }
.entry--void .entry__amount { text-decoration: line-through; }

.icon-btn--sm { width: 32px; height: 32px; color: var(--muted); }
.icon-btn--sm:hover { background: rgba(255,69,58,.12); color: var(--red); }

/* Баланс на дашборде */
.stat-block { display: flex; flex-direction: column; gap: 10px; }
.balance-line {
    font-size: 15px; font-weight: 600;
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.balance-line--ok    { background: rgba(48,209,88,.14);  color: #248A3D; }
.balance-line--warn  { background: rgba(255,159,10,.16); color: #B25E00; }
.balance-line--muted { background: var(--fill-gray);     color: var(--label-3); }

/* ── Календарь-сетка на месяц ────────────────────────────────── */
.cal { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid--wd { margin-bottom: 4px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--label-3); padding: 2px 0; }
.cal-wd--we { color: var(--red); opacity: .75; }

.cal-cell {
    position: relative;
    min-height: 60px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px;
    border-radius: 10px;
    text-decoration: none; color: var(--label);
    overflow: hidden;
}
.cal-cell--has { background: var(--fill-input); }
.cal-cell--today.cal-cell--has { background: var(--blue-tint); }
.cal-cell:not(.cal-cell--empty):active { background: var(--fill-input); }
.cal-cell:not(.cal-cell--empty):hover { background: var(--fill-input); }
.cal-cell--empty { pointer-events: none; }
.cal-cell--today { background: var(--blue-tint); }
.cal-cell--today .cal-day-num { color: var(--blue); font-weight: 700; }
.cal-cell--we .cal-day-num { color: var(--label-3); }
.cal-day-num { font-size: 14px; font-weight: 600; }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 92%; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }

.entry__note { font-size: 13px; color: var(--label-3); }
.segmented--wrap .segmented__item span { padding: 8px 4px; font-size: 13px; }

/* ── Модальное окно дня ──────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.4);
    padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    width: 100%; max-width: 460px; max-height: 88dvh;
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 48px rgba(0,0,0,.25);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px 12px; border-bottom: 1px solid var(--separator);
    flex-shrink: 0;
}
.modal__title { font-size: 20px; font-weight: 700; }
.modal__body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal__entries { display: flex; flex-direction: column; gap: 8px; }
.modal__empty { font-size: 15px; color: var(--label-3); text-align: center; padding: 8px 0; }

.modal-entry {
    display: flex; align-items: center; gap: 10px;
    background: var(--fill-input); border-radius: var(--radius-sm); padding: 10px 12px;
}
.modal-entry__main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.modal-entry__co { font-size: 15px; font-weight: 600; }
.modal-entry__meta { font-size: 13px; color: var(--label-3); }
.modal-entry__note { font-size: 13px; color: var(--label-2); }
.modal-entry__amt { font-size: 15px; font-weight: 700; white-space: nowrap; }

.form-divider {
    font-size: 13px; font-weight: 700; color: var(--label-3);
    text-transform: uppercase; letter-spacing: .04em;
    padding-top: 6px; border-top: 1px solid var(--separator);
}

/* ── Информативные ячейки календаря + итоги + легенда ────────── */
.cal-events { display: flex; flex-direction: column; gap: 1px; width: 100%; align-items: stretch; padding: 0 1px; }
.cal-ev {
    display: flex; align-items: center; gap: 2px;
    font-size: 9px; line-height: 1.25; color: var(--label-2);
    white-space: nowrap; overflow: hidden;
}
.cal-ev__dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-ev__h { font-weight: 700; }
.cal-ev__loc { font-size: 8px; }
.cal-ev--more { color: var(--label-3); font-weight: 700; justify-content: flex-start; }

.monthnav__center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.monthnav__today {
    font-size: 12px; font-weight: 700; color: var(--blue);
    text-decoration: none; background: var(--blue-tint);
    padding: 2px 10px; border-radius: var(--radius-pill);
}

.cal-summary {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cal-summary__item {
    background: var(--surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 12px 14px;
    display: flex; flex-direction: column; gap: 2px;
}
.cal-summary__item--exp { grid-column: 1 / -1; }
.cal-summary__val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.cal-summary__item--exp .cal-summary__val { font-size: 17px; color: var(--blue); }
.cal-summary__lbl { font-size: 12px; color: var(--label-3); font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 2px 4px; }
.legend__item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--label-2); }
.legend__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Действия карточки / опасная кнопка ──────────────────────── */
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-row form { display: flex; }
.btn--danger { background: rgba(255,69,58,.12); color: #C7362E; }
.btn--danger:hover { background: rgba(255,69,58,.2); }

/* ── Статистика: сравнение ───────────────────────────────────── */
.stat__value--accent { color: var(--blue); }
.cmp { padding-top: 12px; border-top: 1px solid var(--separator); display: flex; flex-direction: column; gap: 6px; }
.cmp:first-of-type { border-top: none; padding-top: 0; }
.cmp__cur { font-size: 13px; font-weight: 700; color: var(--label-3); }
.cmp__row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmp__lbl { font-size: 13px; color: var(--label-3); min-width: 78px; }
.cmp__vals { font-size: 15px; flex: 1; }
.cmp__arrow { color: var(--muted); }
.cmp__delta { font-size: 13px; font-weight: 700; color: var(--label-2); white-space: nowrap; }

/* ── Статистика: чипы, кривая, компании, таблица сравнения ───── */
.stat__sub { font-size: 13px; font-weight: 600; color: var(--label-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; color: var(--label-2); background: var(--fill-input); padding: 5px 10px; border-radius: var(--radius-pill); }
.chip b { font-weight: 700; color: var(--label); }

.curve-wrap { display: flex; flex-direction: column; gap: 4px; }
.curve-title { font-size: 12px; font-weight: 600; color: var(--label-3); }
.curve { width: 100%; height: 64px; display: block; }

.co-stat { padding: 12px 0; border-top: 1px solid var(--separator); display: flex; flex-direction: column; gap: 4px; }
.co-stat:first-of-type { border-top: none; }
.co-stat__head { display: flex; align-items: center; gap: 8px; }
.co-stat__name { font-size: 15px; font-weight: 700; flex: 1; }
.co-stat__load { font-size: 13px; font-weight: 700; color: var(--blue); }
.co-stat__meta { font-size: 13px; color: var(--label-3); line-height: 1.4; }
.co-stat__money { font-size: 13px; color: var(--label-2); }

.cmp-table { display: flex; flex-direction: column; gap: 2px; }
.cmp-head, .cmp-line { display: grid; grid-template-columns: 1fr 52px 52px 52px; gap: 4px; align-items: center; }
.cmp-head { font-size: 12px; font-weight: 700; color: var(--label-3); padding-bottom: 4px; border-bottom: 1px solid var(--separator); text-align: right; }
.cmp-head span:first-child { text-align: left; }
.cmp-line { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--separator); }
.cmp-line__lbl { color: var(--label-2); }
.cmp-line__a, .cmp-line__b, .cmp-line__d { text-align: right; font-variant-numeric: tabular-nums; }
.cmp-line__d { font-weight: 700; color: var(--blue); }

/* ── Кликабельная строка (платежи) ───────────────────────────── */
.entry__link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }

/* ── Переключатель компаний (чипы) ───────────────────────────── */
.cswitch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cswitch::-webkit-scrollbar { display: none; }
.cswitch__item {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
    font-size: 14px; font-weight: 600; color: var(--label-2);
    background: var(--fill-input); padding: 8px 14px; border-radius: var(--radius-pill); text-decoration: none;
}
.cswitch__item.is-active { background: var(--blue); color: #fff; }
.cswitch__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cswitch__item.is-active .cswitch__dot { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }

/* ── Месячный хитмап ─────────────────────────────────────────── */
.hm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.hm-cell { aspect-ratio: 1 / 1; border-radius: 4px; }
.hm-cell--empty { background: transparent !important; }

/* ── Напоминания: баннер, колокольчик, чекбоксы ──────────────── */
.appbar__bell { position: relative; display: inline-grid; place-items: center; }
.appbar__badge { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(255,255,255,.9); }

.rem-banner {
    position: sticky; top: 0; z-index: 15;
    max-width: 640px; margin: 0 auto; width: 100%;
    display: flex; align-items: center; gap: 12px;
    background: #FFF6E5; color: #7A4E00;
    border-bottom: 1px solid rgba(255,159,10,.35);
    padding: 10px 16px;
}
.rem-banner svg { flex-shrink: 0; color: #FF9F0A; }
.rem-banner__main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rem-banner__title { font-size: 15px; font-weight: 700; color: #7A4E00; text-decoration: none; }
.rem-banner__due { font-size: 13px; opacity: .85; }

.chk { cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk span {
    display: inline-block; font-size: 14px; font-weight: 600; color: var(--label-2);
    background: var(--fill-input); padding: 8px 14px; border-radius: var(--radius-pill);
}
.chk input:checked + span { background: var(--blue); color: #fff; }
.chk input:disabled + span { opacity: .4; }
.chip--sm { font-size: 11px; padding: 3px 8px; }
.rem__offs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }

/* ── Инлайн-чекбокс (админка) ────────────────────────────────── */
.chk-inline { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--label-2); cursor: pointer; }
.chk-inline input { width: 20px; height: 20px; accent-color: var(--blue); }

/* ═════════════════════════════════════════════════════════════
   Бэкапы/экспорт, график, метрики месяца, заметки, шейр.
   Тот же язык токенов, что и выше: переменные :root, без Tailwind.
   ═════════════════════════════════════════════════════════════ */

/* Мелочи, которых не хватало разметке */
.muted { color: var(--label-3); font-size: 13px; }
.recon-adj { font-size: 14px; color: var(--label-2); }
.recon-adj summary { cursor: pointer; font-weight: 600; color: var(--blue); }

/* Карточка-ссылка (переход в раздел) */
.card--link { text-decoration: none; color: inherit; display: block; transition: background .15s; }
.card--link:active { background: var(--fill-input); }

/* ── Полоса состояния раздела за кодом ───────────────────────── */
.vault-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--blue-tint); color: #0060C0;
    border-radius: var(--radius-pill); padding: 8px 8px 8px 16px;
}
.vault-bar__state { font-size: 14px; font-weight: 600; }

/* ── Строка бэкапа ──────────────────────────────────────────── */
.bk { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.bk__kind {
    align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; padding: 2px 8px; border-radius: var(--radius-pill);
    background: var(--fill-gray); color: var(--label-2);
}
.bk__kind--db   { background: var(--blue-tint); color: #0060C0; }
.bk__kind--site { background: rgba(48,209,88,.16); color: #1E8E3E; }
.bk__name {
    font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.bk__meta { font-size: 12px; color: var(--label-3); }
.bk__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── Пагинация ──────────────────────────────────────────────── */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.pager__btn {
    min-width: 36px; padding: 7px 10px; text-align: center; text-decoration: none;
    font-size: 14px; font-weight: 600; color: var(--label-2);
    background: var(--fill-input); border-radius: 10px;
}
.pager__btn.is-active { background: var(--blue); color: #fff; }
.pager__btn.is-off { opacity: .35; }

/* ── Дельты «против прошлого месяца» ────────────────────────── */
.dl { display: flex; flex-direction: column; }
.dl__row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--separator);
}
.dl__row:last-child { border-bottom: 0; }
.dl__lbl { font-size: 14px; color: var(--label-2); }
.dl__val { font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl__val--up   { color: #1E8E3E; }
.dl__val--down { color: #C7362E; }
.dl__val--flat { color: var(--label-3); }
.dl__pct { font-size: 12px; font-weight: 600; opacity: .75; margin-left: 2px; }

/* ── План / факт ────────────────────────────────────────────── */
.pf { display: flex; flex-direction: column; gap: 8px; }
.pf__bar { height: 10px; border-radius: 5px; background: var(--fill-input); overflow: hidden; }
.pf__fill { display: block; height: 100%; border-radius: 5px; background: var(--blue); }
.pf__legend {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
    font-size: 13px; color: var(--label-2);
}
.pf__pct { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--blue); }

/* ── Хитмап: подписи дней недели и «сегодня» ────────────────── */
.hm-wd {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
    font-size: 10px; font-weight: 600; color: var(--label-3); text-align: center;
}
a.hm-cell { display: block; }
.hm-cell--today { box-shadow: inset 0 0 0 2px var(--blue); }

/* ── Разнос платежей по месяцам ─────────────────────────────── */
.lg {
    display: flex; flex-direction: column; gap: 8px;
    padding: 12px 0; border-bottom: 1px solid var(--separator);
}
.lg:last-child { border-bottom: 0; padding-bottom: 0; }
.lg__head { display: flex; align-items: center; gap: 8px; }
.lg__co { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.lg__status {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 3px 9px; border-radius: var(--radius-pill);
}
.lg__status--ok   { background: rgba(48,209,88,.16);  color: #1E8E3E; }
.lg__status--warn { background: rgba(255,159,10,.18); color: #8A5300; }
.lg__status--open { background: rgba(255,69,58,.12);  color: #C7362E; }
.lg__nums {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums;
}
.lg__nums b { color: var(--label); }
.lg__open b { color: #C7362E; }
.lg__lines { display: flex; flex-direction: column; gap: 4px; }
.lg__line {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
    font-size: 13px; color: var(--label-2);
}
.lg__line-date { font-variant-numeric: tabular-nums; color: var(--label-3); }
.lg__line-amt { font-weight: 700; color: var(--label); font-variant-numeric: tabular-nums; }
.lg__line-lbl { color: var(--label-3); }
.lg__note {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--fill-input); border-radius: 12px; padding: 10px 12px;
    font-size: 13px; color: var(--label-2);
}
.lg__note-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg__months { display: flex; flex-wrap: wrap; gap: 4px; }
.lg__warn {
    background: rgba(255,159,10,.14); color: #8A5300;
    border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600;
}
a.chip { text-decoration: none; }

/* ── Заметка: правка на месте ────────────────────────────────── */
.note-edit { margin: -4px 0 6px; }
.note-edit__sum {
    cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue);
    padding: 4px 0 4px 34px; list-style: none;
}
.note-edit__sum::-webkit-details-marker { display: none; }
.note-edit__form { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 0 34px; }
.note-edit__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-edit__count { font-size: 12px; color: var(--label-3); font-variant-numeric: tabular-nums; }

/* ── Лента заметок ──────────────────────────────────────────── */
.nf { gap: 12px; padding: 16px; }
.nf__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nf__date { font-size: 15px; font-weight: 700; color: var(--label); text-decoration: none; }
.nf__meta { font-size: 13px; color: var(--label-3); }
.nf .note-edit__form { padding-left: 0; }

/* ── Публичные ссылки ───────────────────────────────────────── */
.sl { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.sl__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sl__ref { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sl__url { font-size: 12px; padding: 8px 10px; color: var(--label-2); }
.sl__meta { font-size: 12px; color: var(--label-3); }

/* ── Упрощённый (публичный) вид дня и месяца ─────────────────── */
.shell--share { justify-content: flex-start; padding-top: 24px; }
.sh { max-width: 480px; gap: 16px; }
.sh__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sh__date { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sh__wd { font-size: 14px; font-weight: 600; color: var(--label-3); }
.sh__total { display: flex; align-items: baseline; gap: 6px; }
.sh__hours { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: var(--blue); }
.sh__unit { font-size: 15px; font-weight: 600; color: var(--label-3); }
.sh__list { display: flex; flex-direction: column; gap: 10px; }
.sh__row { display: flex; align-items: flex-start; gap: 10px; }
.sh__main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh__co { font-size: 15px; font-weight: 700; }
.sh__meta { font-size: 13px; color: var(--label-3); }
.sh__amt { font-size: 15px; font-weight: 700; white-space: nowrap; }
.sh__notes {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--fill-input); border-radius: 14px; padding: 12px 14px;
}
.sh__note { display: flex; gap: 8px; }
.sh__note p { font-size: 14px; color: var(--label); line-height: 1.45; margin: 0; }
.sh__note-co { font-size: 12px; line-height: 1.6; }
.sh__foot { display: flex; flex-direction: column; gap: 10px; }
