[hidden] { display: none !important; }
/* =====================================================================
   Кофешоп — дизайн как у панели отеля (в духе Apple): светлая база, системный шрифт,
   сгруппированные списки, один акцент, полупрозрачные панели.
   ===================================================================== */

/* ---------- токены ---------- */
:root {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7; --surface-3: #e8e8ed; --fill: rgba(118, 118, 128, .12);
  --line: rgba(60, 60, 67, .14); --line-strong: rgba(60, 60, 67, .26);
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6;
  --accent: #0071e3; --accent-hover: #0077ed; --on-accent: #ffffff; --accent-soft: rgba(0, 113, 227, .1);
  --ok: #248a3d; --bad: #d70015; --warn: #b25000; --info: #0071e3;
  --dot-ok: #34c759; --dot-bad: #ff3b30; --dot-warn: #ff9f0a; --dot-info: #0a84ff;
  --glass: rgba(251, 251, 253, .72); --glass-strong: rgba(255, 255, 255, .86);
  --shadow: 0 1px 1px rgba(0, 0, 0, .02), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --radius: 18px; --radius-sm: 12px; --side: 248px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Noto Sans Thai", "Helvetica Neue", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c; --fill: rgba(118, 118, 128, .24);
    --line: rgba(84, 84, 88, .55); --line-strong: rgba(84, 84, 88, .9);
    --text: #f5f5f7; --muted: #98989d; --faint: #636366;
    --accent: #0a84ff; --accent-hover: #409cff; --on-accent: #ffffff; --accent-soft: rgba(10, 132, 255, .18);
    --ok: #30d158; --bad: #ff6961; --warn: #ffb340; --info: #64d2ff;
    --glass: rgba(28, 28, 30, .72); --glass-strong: rgba(44, 44, 46, .92);
    --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c; --fill: rgba(118, 118, 128, .24);
  --line: rgba(84, 84, 88, .55); --line-strong: rgba(84, 84, 88, .9);
  --text: #f5f5f7; --muted: #98989d; --faint: #636366;
  --accent: #0a84ff; --accent-hover: #409cff; --on-accent: #ffffff; --accent-soft: rgba(10, 132, 255, .18);
  --ok: #30d158; --bad: #ff6961; --warn: #ffb340; --info: #64d2ff;
  --glass: rgba(28, 28, 30, .72); --glass-strong: rgba(44, 44, 46, .92);
  --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- база ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.47 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
html[lang="th"] body { letter-spacing: 0; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 34px; line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: -.016em; display: flex; align-items: center; gap: 8px; }
.i { flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--fill); padding: 1px 6px; border-radius: 6px; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 12px 14px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: .5px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; padding: 2px 8px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--text); color: var(--bg); flex: none; }
.side-cta { width: 100%; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font: inherit;
  font-weight: 500; font-size: 14.5px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.nav a .i, .nav button .i { color: var(--accent); }
.nav a:hover, .nav button:hover { background: var(--fill); }
.nav a.on { background: var(--accent); color: var(--on-accent); }
.nav a.on .i { color: var(--on-accent); }
.nav-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 0; margin-bottom: -8px; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav a.on .nav-count { color: color-mix(in srgb, var(--on-accent) 85%, transparent); }

.occ { display: block; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); }
.occ-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.occ-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.occ-nums b { display: block; font-size: 28px; line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.occ-nums span { font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--chart, var(--text)); border-radius: 99px; }
.bar.thin { height: 4px; }
.occ-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.side-foot { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px; border-top: .5px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; flex: 1; min-width: 0; }
.me:hover, .me.on { background: var(--fill); }
.me span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 12px; color: var(--muted); }
.me .avatar { width: 32px; height: 32px; font-size: 12px; }
.content { min-width: 0; }
.main { min-width: 0; padding: 36px 44px 64px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topbar, .tabbar, .fab { display: none; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; min-height: 36px; border-radius: 980px;
  border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn.ghost, .btn.soft { background: var(--fill); color: var(--text); }
.btn.ghost:hover, .btn.soft:hover { background: color-mix(in srgb, var(--fill) 100%, var(--text) 6%); }
.btn.soft { color: var(--accent); }
.btn.plain { background: none; color: var(--accent); padding-left: 6px; padding-right: 6px; }
.btn.plain:hover { background: var(--accent-soft); }
.btn.danger { background: var(--dot-bad); color: #fff; }
.btn.danger-ghost { background: none; color: var(--bad); }
.btn.danger-ghost:hover { background: color-mix(in srgb, var(--dot-bad) 10%, transparent); }
.btn.sm { padding: 5px 12px; min-height: 30px; font-size: 13.5px; }
.btn.icon { padding: 0; width: 36px; }
.btn.sm.icon { width: 30px; }
.btn .i { stroke-width: 1.8; }
form.inline { display: inline; margin: 0; }

input, select, textarea { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); padding: 10px 12px;
  border: .5px solid var(--line-strong); border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); -webkit-appearance: auto; appearance: auto; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; position: relative; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.fields.two { grid-template-columns: 1fr 1fr; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mini { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 6px; gap: 8px; }

/* сегментированный переключатель (iOS) */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); position: relative; flex-wrap: nowrap; }
.seg a, .seg label > span, .seg button { display: block; padding: 5px 14px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--text);
  cursor: pointer; white-space: nowrap; border: 0; background: none; font-family: inherit; transition: background .15s; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg a.on, .seg input:checked + span, .seg button.on { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .seg a.on, :root[data-theme="dark"] .seg input:checked + span, :root[data-theme="dark"] .seg button.on { background: #636366; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .seg a.on, :root:not([data-theme]) .seg input:checked + span, :root:not([data-theme]) .seg button.on { background: #636366; }
}

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 500;
  white-space: nowrap; background: var(--fill); color: var(--muted); border: 0; }
.badge.bad { color: var(--bad); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.badge.ok .dot { color: var(--dot-ok); } .badge.bad .dot { color: var(--dot-bad); }
.badge.warn .dot { color: var(--dot-warn); } .badge.info .dot { color: var(--dot-info); }
.room-pill { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--fill); color: var(--text); line-height: 20px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13.5px;
  color: #fff; background: linear-gradient(180deg, #a5a5aa, #86868b); }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------- карточки и сгруппированные списки ---------- */
.panel { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; flex-wrap: wrap; }
.panel-head .count { color: var(--muted); font-weight: 500; }
.panel-body { padding: 4px 20px 20px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details.panel:not([open]) > summary.panel-head { padding-bottom: 16px; }
.chev { color: var(--faint); transition: transform .2s; }
details[open] > summary .chev { transform: rotate(180deg); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.cols.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cols, .cols.three { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: block; transition: transform .15s; }
a.kpi:hover { transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.chip { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--fill); color: var(--muted); flex: none; }
.chip .i { width: 15px; height: 15px; }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; line-height: 1.08; }
.kpi-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; position: relative; min-height: 56px; }
.row::after { content: ""; position: absolute; left: 70px; right: 0; bottom: 0; height: .5px; background: var(--line); }
.row:last-child::after { display: none; }
a.row:hover, .row.link:hover { background: color-mix(in srgb, var(--fill) 50%, transparent); }
a.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.row-end { text-align: right; display: flex; align-items: center; gap: 10px; }
a.row .row-end::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-top: 2px solid var(--faint); transform: rotate(45deg); margin-left: 2px; }
.group-label { padding: 14px 20px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); }



/* ---------- карточка жильца ---------- */
.hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; align-items: center; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-photo { width: 96px; height: 64px; border-radius: 12px; object-fit: cover; display: block; }
.ul { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.sched { width: 100%; border-collapse: collapse; }
.sched td, .sched th { padding: 12px 20px; text-align: left; vertical-align: middle; border-bottom: .5px solid var(--line); }
.sched th { font-size: 12.5px; color: var(--muted); font-weight: 500; padding-top: 4px; }
.sched tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.t-actions { text-align: right; white-space: nowrap; }
.who-link { display: flex; align-items: center; gap: 10px; }
.foot-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.panel > .foot-note { padding: 0 20px 16px; }
.quick { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.quick button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 3px 9px; border-radius: 99px; border: 0; background: var(--fill); color: var(--text); cursor: pointer; }
.quick button:hover { background: var(--accent-soft); color: var(--accent); }
.hint-box { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; color: var(--muted); }
.hint-box b { color: var(--text); }
.hint-box:empty { display: none; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; background: var(--glass-strong); border-radius: 12px;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-pop); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; }
.suggest button:hover { background: var(--accent); color: var(--on-accent); }
.suggest button:hover small { color: rgba(255, 255, 255, .8); }
.suggest small { display: block; color: var(--muted); font-size: 12.5px; }

/* выпадающее меню */
.dd { position: relative; display: inline-block; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 170px; padding: 5px; background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-radius: 12px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 1px; animation: pop .14s ease-out; }
.dd-menu.wide { width: min(320px, calc(100vw - 40px)); padding: 14px; gap: 10px; }
.dd-menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.dd-item { font: inherit; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer;
  display: flex; align-items: center; gap: 8px; width: 100%; }
.dd-item:hover { background: var(--accent); color: var(--on-accent); }
.dd-item.on::after { content: "✓"; margin-left: auto; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- модальные окна, шторки, быстрая панель ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow-pop); animation: pop .18s ease-out; }
dialog::backdrop { background: rgba(0, 0, 0, .32); }
.modal-body { padding: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 22px; }

dialog.drawer { border: 0; padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); background: var(--bg); color: var(--text);
  box-shadow: var(--shadow-pop); animation: slide-in .22s cubic-bezier(.2, .8, .2, 1); }
.drawer-body { height: 100%; overflow-y: auto; padding: 18px 18px 30px; }
.drawer-close { position: sticky; top: 0; display: flex; justify-content: flex-end; margin-bottom: -10px; z-index: 2; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.peek-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 18px; }
.peek-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.peek .panel { margin-bottom: 14px; }
.peek .row { min-height: 46px; padding: 9px 16px; }
.peek .row::after { left: 16px; }
.peek-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.peek-actions .btn, .peek-actions form .btn { width: 100%; }
.peek-actions form { display: block; }
.peek-loading { padding: 60px 0; text-align: center; color: var(--muted); }

dialog.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; background: transparent; }
.sheet-body { background: var(--surface); color: var(--text); border-radius: 14px 14px 0 0; padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
  animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
.sheet-grip { width: 36px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet-body .me { margin-bottom: 6px; }
.sheet-body .nav a, .sheet-body .nav button { padding: 13px 12px; font-size: 16px; }
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }

/* палитра поиска ⌘K */
dialog.palette { border: 0; padding: 0; margin: 12vh auto auto; width: min(620px, calc(100vw - 24px)); border-radius: 16px; background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); color: var(--text); box-shadow: var(--shadow-pop); animation: pop .16s ease-out; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: .5px solid var(--line); color: var(--muted); }
.palette-input input { border: 0; padding: 4px 0; font-size: 19px; background: transparent; box-shadow: none !important; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; }
.palette-list a.on { background: var(--accent); color: var(--on-accent); }
.palette-list a.on small { color: rgba(255, 255, 255, .8); }
.palette-list a span { display: flex; flex-direction: column; min-width: 0; }
.palette-list small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-ico { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--fill); flex: none; }
.palette-list a.on .palette-ico { background: rgba(255, 255, 255, .2); }
.palette-foot { padding: 8px 18px; font-size: 12px; color: var(--muted); border-top: .5px solid var(--line); display: flex; gap: 14px; }
kbd { font: 11.5px var(--font); padding: 1px 5px; border-radius: 5px; background: var(--fill); color: var(--muted); }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 9px; border: 0; background: var(--fill);
  color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.search-btn kbd { margin-left: auto; }

/* ---------- уведомления ---------- */
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px;
  max-width: min(460px, calc(100vw - 32px)); padding: 10px 18px; border-radius: 99px; background: rgba(30, 30, 32, .86); color: #fff;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-pop); font-weight: 500; font-size: 14px;
  animation: toast 4.2s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 6%, 86% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; visibility: hidden; } }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; margin-bottom: 20px; background: var(--surface);
  box-shadow: var(--shadow); color: var(--text); font-weight: 500; }
.alert .i { color: var(--dot-bad); }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card .brand { justify-content: center; flex-direction: column; gap: 14px; font-size: 26px; font-weight: 700; margin-bottom: 26px; }
.login-card .brand-mark { width: 64px; height: 64px; border-radius: 16px; }
.login-card form.creds { display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); text-align: left; }
.login-card input { border: 0; border-radius: 0; padding: 14px 16px; font-size: 16px; }
.login-card input:focus { box-shadow: none; }
.login-card input + input { border-top: .5px solid var(--line); }
.login-card .btn.full { margin-top: 18px; min-height: 44px; font-size: 16px; width: 100%; }
.login-card .alert { text-align: left; }
.lang-pick { margin-top: 26px; display: flex; justify-content: center; }


/* ---------- статистика ---------- */
.stat-section { scroll-margin-top: 16px; margin-bottom: 36px; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head .section-title { margin: 0; }
.anchors { flex-wrap: wrap; }
.vchart { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding: 22px 20px 12px; }
.vchart.single { height: 200px; }
.vchart.days { gap: 3px; height: 140px; }
.vcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.vbars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: .5px solid var(--line-strong); }
.vbars i { display: block; width: 100%; max-width: 18px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--chart, var(--text)); transition: opacity .15s; }
.vbars i.b2 { background: var(--faint); opacity: .6; }
.vbars i.b3 { background: var(--dot-bad); opacity: .7; }
.vbars i:hover { opacity: .7; }
.vchart.days .vbars i { max-width: none; border-radius: 2px 2px 0 0; }
.vcol.fut .vbars i { background: var(--faint); opacity: .5; }
.vcol.we .vlabel { color: var(--text); font-weight: 600; }
.vcol.cur .vlabel { color: var(--text); font-weight: 700; }
.vlabel { font-size: 11.5px; color: var(--muted); height: 14px; white-space: nowrap; }
.vval { font-size: 11.5px; color: var(--muted); }
.table-toggle { padding: 0 20px 14px; }
.table-toggle summary { color: var(--accent); font-size: 13.5px; padding: 6px 0; }
.rank td { vertical-align: middle; }

/* ---------- журнал ---------- */
.log-row { align-items: flex-start; }
.log-row::after { left: 20px; }
.log-time { color: var(--muted); font-size: 13px; min-width: 80px; padding-top: 1px; }
.log-text { font-size: 14px; }
.log-text a:hover { color: var(--accent); }



/* ---------- телефон ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 20;
    padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--glass); backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
  .topbar .brand { font-size: 16px; padding: 0; }
  .topbar-actions { display: flex; align-items: center; gap: 6px; }
  .occ-chip { display: flex; align-items: center; gap: 4px; font-size: 13px; padding: 5px 10px; border-radius: 99px; background: var(--fill); color: var(--muted); }
  .occ-chip b { color: var(--text); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 10.5px; font-weight: 500;
    color: var(--faint); padding: 2px; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar .i { stroke-width: 1.7; }
  .tabbar a.on, .tabbar button.on { color: var(--accent); }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 21;
    width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
  .fab:active { transform: scale(.95); }
  .main { padding: 18px 16px 104px; }
  h1 { font-size: 30px; }
  .page-head { margin-bottom: 18px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; } .kpi-val { font-size: 23px; }
  .kpi-top { font-size: 12px; } .chip { display: none; }
  .hide-m { display: none !important; }
  .page-head .actions { width: 100%; }
  .page-head .actions .seg { overflow-x: auto; max-width: 100%; }
  .toast { top: auto; bottom: calc(140px + env(safe-area-inset-bottom)); }
  .panel { border-radius: 14px; }
  .row::after { left: 66px; }
  dialog.drawer { width: 100vw; max-width: 100vw; margin: auto 0 0; height: 92vh; border-radius: 14px 14px 0 0; animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
  dialog.modal { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 14px 14px 0 0; animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1); }
  .modal-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .search-m { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); color: var(--text); border: 0; }
}
@media (min-width: 901px) { .search-m { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Стекло и фон: мягкие пятна на фоне, карточки — матовое стекло
   ===================================================================== */
:root {
  --surface-solid: #ffffff;
  --glass-card: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-blur: saturate(180%) blur(24px);
  --blob-1: rgba(0, 113, 227, .16); --blob-2: rgba(175, 82, 222, .12); --blob-3: rgba(52, 199, 89, .10); --blob-4: rgba(255, 159, 10, .10);
  --free: #1f9d4c; --free-soft: rgba(52, 199, 89, .14); --busy-bg: #1d1d1f; --busy-text: #ffffff;
}
:root[data-theme="dark"] {
  --surface-solid: #1c1c1e;
  --glass-card: rgba(44, 44, 46, .55);
  --glass-border: rgba(255, 255, 255, .08);
  --blob-1: rgba(10, 132, 255, .22); --blob-2: rgba(191, 90, 242, .16); --blob-3: rgba(48, 209, 88, .10); --blob-4: rgba(255, 159, 10, .08);
  --free: #30d158; --free-soft: rgba(48, 209, 88, .16); --busy-bg: #f5f5f7; --busy-text: #1d1d1f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --surface-solid: #1c1c1e;
    --glass-card: rgba(44, 44, 46, .55);
    --glass-border: rgba(255, 255, 255, .08);
    --blob-1: rgba(10, 132, 255, .22); --blob-2: rgba(191, 90, 242, .16); --blob-3: rgba(48, 209, 88, .10); --blob-4: rgba(255, 159, 10, .08);
    --free: #30d158; --free-soft: rgba(48, 209, 88, .16); --busy-bg: #f5f5f7; --busy-text: #1d1d1f;
  }
}

/* фон: несколько размытых пятен, неподвижно за контентом */
body::before { content: ""; position: fixed; inset: -10vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 34vmax at 12% 8%, var(--blob-1), transparent 70%),
    radial-gradient(36vmax 30vmax at 92% 12%, var(--blob-2), transparent 70%),
    radial-gradient(38vmax 32vmax at 78% 92%, var(--blob-3), transparent 70%),
    radial-gradient(30vmax 26vmax at 8% 86%, var(--blob-4), transparent 70%);
  filter: blur(10px); }
body { background: var(--bg); isolation: isolate; }

/* стеклянные поверхности */
.panel, .kpi, .occ, .login-card form.creds {
  background: var(--glass-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: .5px solid var(--glass-border); box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px rgba(0, 0, 0, .04); }
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .occ { box-shadow: none; }
.side { background: var(--glass); }
dialog.modal, dialog.drawer { background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
dialog.drawer .panel { background: var(--surface-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sheet-body { background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
input, select, textarea { background: color-mix(in srgb, var(--surface-solid) 80%, transparent); }
.receipt { border: 0; }


/* =====================================================================
   Панель инструментов: все элементы одной высоты (38px)
   ===================================================================== */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar > *, .toolbar .btn { height: 38px; min-height: 38px; }
.toolbar .seg { align-items: stretch; padding: 2px; }
.toolbar .seg a, .toolbar .seg button, .toolbar .seg label > span { display: flex; align-items: center; height: 100%; padding: 0 14px; }
.search { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--fill); color: var(--muted); }
.search input { border: 0; background: transparent; padding: 0; height: 100%; width: 210px; box-shadow: none !important; font-size: 14.5px; }
.toolbar select { height: 38px; padding-top: 0; padding-bottom: 0; width: auto; }
.filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; padding: 0 5px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 4px 20px 18px; align-items: end; }
.filters .field select, .filters .field input { height: 38px; padding-top: 0; padding-bottom: 0; }
.filters-foot { display: flex; gap: 8px; align-items: center; padding: 0 20px 18px; flex-wrap: wrap; }
@media (max-width: 900px) { .search { flex: 1 1 100%; } .search input { width: 100%; } }





/* окно подтверждения */
dialog.confirm-dlg { width: min(400px, calc(100vw - 32px)); text-align: center; }
dialog.confirm-dlg h2 { justify-content: center; font-size: 19px; }
dialog.confirm-dlg p { margin: 10px 0 0; font-size: 15px; }
dialog.confirm-dlg .modal-foot { justify-content: center; }
dialog.confirm-dlg .modal-foot span { display: none; }
dialog.confirm-dlg .modal-foot .btn { flex: 1; }
@media (max-width: 900px) { dialog.confirm-dlg { margin: auto; border-radius: 16px; width: calc(100vw - 32px); animation: pop .18s ease-out; } }

/* =====================================================================
   Цветовые темы: тёмно-синяя и фиолетовая (обе тёмные, свой акцент)
   ===================================================================== */
:root[data-theme="navy"] {
  --bg: #070d1a; --surface: #0f1829; --surface-2: #16223a; --surface-3: #1f2e4b; --surface-solid: #0f1829;
  --fill: rgba(120, 150, 210, .16); --line: rgba(110, 140, 200, .22); --line-strong: rgba(110, 140, 200, .4);
  --text: #eef3ff; --muted: #94a3c4; --faint: #5b6b8c;
  --accent: #4d8dff; --accent-hover: #6aa0ff; --on-accent: #ffffff; --accent-soft: rgba(77, 141, 255, .2);
  --ok: #3ddc84; --bad: #ff7a85; --warn: #ffbd5c; --info: #6fb8ff;
  --glass: rgba(10, 18, 34, .72); --glass-strong: rgba(18, 28, 48, .92); --glass-card: rgba(20, 32, 56, .55);
  --glass-border: rgba(140, 170, 230, .12);
  --blob-1: rgba(40, 110, 255, .28); --blob-2: rgba(0, 180, 255, .14); --blob-3: rgba(80, 60, 220, .16); --blob-4: rgba(0, 200, 170, .08);
  --free: #3ddc84; --free-soft: rgba(61, 220, 132, .14); --busy-bg: #dfe8ff; --busy-text: #0b1530;
  --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="navy"] .seg a.on, :root[data-theme="navy"] .seg input:checked + span, :root[data-theme="navy"] .seg button.on { background: #2a3b5e; }
:root[data-theme="navy"] .panel, :root[data-theme="navy"] .kpi, :root[data-theme="navy"] .occ { box-shadow: none; }
:root[data-theme="navy"] .brand-mark { background: var(--accent); color: #fff; }

/* образцы тем в настройках */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.theme-pick button { border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: var(--text); text-align: center; }
.theme-pick .sw { display: block; height: 64px; border-radius: 12px; margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--line-strong); position: relative; overflow: hidden; }
.theme-pick .sw::after { content: ""; position: absolute; left: 10px; bottom: 10px; width: 34px; height: 8px; border-radius: 4px; background: var(--sw-accent); }
.theme-pick button.on .sw { box-shadow: 0 0 0 3px var(--accent); }
.theme-pick span.name { font-size: 13px; font-weight: 500; }

.dd { vertical-align: middle; }
.row-end { align-items: center; }

/* подсказки «?» при наведении */
.tip { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--fill); color: var(--muted);
  font: 600 11px/1 var(--font); font-style: normal; cursor: help; text-transform: none; letter-spacing: 0; flex: none; }
.tip:hover, .tip:focus { background: var(--accent); color: var(--on-accent); outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: 260px;
  padding: 9px 12px; border-radius: 10px; background: rgba(30, 30, 32, .94); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.4; white-space: normal;
  text-align: left; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50; }
.tip:hover::after, .tip:focus::after { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 900px) {
  .tip::after { left: auto; right: -10px; transform: none; }
  .tip:hover::after, .tip:focus::after { transform: none; }
}

/* Telegram-бот в настройках */
.bot-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bot-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.bot-form .field { flex: 1; min-width: 260px; }
.foot-note.bad { color: var(--bad); }
.field-label { display: inline-flex; align-items: center; gap: 5px; }

/* продажи: текст письма */
.sale-raw { margin-top: 6px; }
.sale-raw summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.sale-raw pre { white-space: pre-wrap; font: 12px/1.45 var(--mono, ui-monospace, monospace); background: var(--fill); padding: 10px 12px; border-radius: 10px; max-height: 260px; overflow: auto; margin: 6px 0 0; }
.staff-table td:last-child { width: 30%; min-width: 120px; }
.staff-table .num { text-align: right; }

/* вход: капча и выбор языка во всю ширину кнопки «Войти» */
.login-card .captcha-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: .5px solid var(--line); }
.login-card .captcha-row img { border-radius: 8px; display: block; flex: 1; min-width: 0; height: 56px; object-fit: cover; }
.login-card .cap-refresh { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--fill); color: var(--text); font-size: 20px; cursor: pointer; flex: none; }
.login-card .cap-refresh:hover { background: var(--accent-soft); color: var(--accent); }
.login-card #cap-in { border-top: .5px solid var(--line); text-transform: uppercase; letter-spacing: .2em; }
.login-card .lang-pick { margin-top: 14px; width: 100%; }
.login-card .lang-pick .seg { display: flex; width: 100%; box-sizing: border-box; }
.login-card .lang-pick .seg button { flex: 1 1 0; min-height: 36px; justify-content: center; }

/* внутри Telegram: без лишних отступов сверху, нижняя навигация учитывает безопасную зону */
.in-tg body { overscroll-behavior: none; }
.login-card #cap-in::placeholder { text-transform: none; letter-spacing: normal; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 4px; }

/* легенда графиков */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.swatch.s1 { background: var(--text); box-shadow: none; }
.swatch.s2 { background: var(--faint); opacity: .6; box-shadow: none; }
.swatch.s3 { background: var(--dot-bad); opacity: .7; box-shadow: none; }

/* =====================================================================
   Кофешоп: расходы в таблицу, распознавание чека, итоги месяца
   ===================================================================== */
.side-cta { margin-top: -4px; }
.occ-top b { color: var(--text); font-weight: 600; }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.kpi-val small { font-size: 18px; color: var(--faint); font-weight: 600; letter-spacing: -.02em; }
.sheet-link { display: inline-flex; align-items: center; gap: 6px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; }

/* строки нового расхода: дата · описание · категория · сумма · удалить */
.exp-rows { display: flex; flex-direction: column; gap: 10px; }
.exp-row { display: grid; grid-template-columns: 148px minmax(0, 1fr) 190px 120px 30px; gap: 8px; align-items: end; }
.exp-row .field { min-width: 0; }
.exp-row .btn.icon { margin-bottom: 4px; }
.exp-row:not(:first-child) .field > span { display: none; }
dialog.modal.wide { width: min(860px, calc(100vw - 32px)); }
.recognize { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, transparent); }
.recognize input[type=text] { flex: 1 1 240px; }
.recognize .file-btn { position: relative; overflow: hidden; }
.recognize .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.recognize .file-name { font-size: 12.5px; color: var(--muted); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recognize.busy { opacity: .6; pointer-events: none; }
.author-note { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) {
  .exp-row { grid-template-columns: 1fr 1fr; padding-bottom: 12px; border-bottom: .5px solid var(--line); }
  .exp-row .f-desc { grid-column: 1 / -1; order: -1; }
  .exp-row .btn.icon { justify-self: end; grid-column: 2; }
  .exp-row:not(:first-child) .field > span { display: inline; }
}

/* итоги месяца: половины месяца и оборот из Ocha */
.halves td.num, .halves th.num { text-align: right; }
.halves tr.total td { font-weight: 700; border-top: .5px solid var(--line-strong); }
.turn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 4px 20px 6px; }
.turn-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--fill) 55%, transparent); cursor: pointer; }
.turn-card input { margin-top: 3px; }
.turn-card.locked { cursor: default; opacity: .75; }
.turn-card .t-title { font-weight: 600; }
.turn-card .t-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.turn-card .t-line b { color: var(--text); }
.checklist { list-style: none; margin: 0; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.checklist li .dot { color: var(--dot-warn); }
.checklist li.ok .dot { color: var(--dot-ok); }
.vbars i.neg { background: var(--dot-bad); opacity: .35; }
.vchart.hours { height: 170px; }
a.vcol:hover .vlabel { color: var(--accent); }
@media (max-width: 900px) {
  .vchart { gap: 4px; padding-left: 12px; padding-right: 12px; }
  .vchart.many .vval { display: none; }
  .vchart.many .vlabel { font-size: 10px; }
  .vchart.hours .vlabel { font-size: 9.5px; }
}
.top-items td:first-child { width: 28px; }

/* сотрудники и зарплата */
.range-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.range-form .field { min-width: 150px; }
.pay-total { font-size: 22px; letter-spacing: -.01em; }
.pay-lines { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; }
.pay-lines li { padding-left: 16px; position: relative; }
.pay-lines li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.sched.compact td, .sched.compact th { padding: 8px 12px; font-size: 13.5px; }
.sched.compact td:first-child, .sched.compact th:first-child { padding-left: 0; }
#rates .sched.compact td:first-child, #rates .sched.compact th:first-child { padding-left: 20px; }
.rate-input { width: 110px; }
.nowrap { white-space: nowrap; }
.pay-lines li.adj { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pay-lines li.adj::before { background: currentColor; }
.pay-lines li.adj .btn { color: var(--muted); }
.adj-kind { margin-bottom: 14px; }
.pay-head-end { display: flex; align-items: center; gap: 10px; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-note { margin: 0 0 10px; font-size: 13.5px; }
.pay-history tr.on td { background: var(--fill); }
.sched.compact.pay-history td:first-child, .sched.compact.pay-history th:first-child { padding-left: 20px; }
.sched.compact.pay-history td:last-child, .sched.compact.pay-history th:last-child { padding-right: 20px; }
.name-link { color: inherit; text-decoration: none; }
.name-link:hover { color: var(--accent); }
.name-link .i { vertical-align: -2px; color: var(--faint); }
.person-head { display: flex; align-items: center; gap: 14px; }
.person-switch { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 14px; }
.person-switch a { padding: 5px 12px; border-radius: 99px; background: var(--fill); font-size: 13.5px; font-weight: 500; }
.person-switch a.on { background: var(--accent); color: var(--on-accent); }

/* =====================================================================
   Ещё цветовые темы. Тёмные: лесная, фиолетовая, золотая; светлые: мятная, закат, розовая.
   Каждая задаёт все цвета целиком — системная светлая/тёмная на них не влияет.
   ===================================================================== */
:root[data-theme="forest"] {
  --bg: #06110b; --surface: #0d1f15; --surface-2: #14291c; --surface-3: #1c3626; --surface-solid: #0d1f15;
  --fill: rgba(120, 200, 150, .14); --line: rgba(110, 190, 140, .2); --line-strong: rgba(110, 190, 140, .38);
  --text: #ecf8ef; --muted: #97b8a2; --faint: #5d7a66;
  --accent: #3ecf72; --accent-hover: #5fdc8a; --on-accent: #04140a; --accent-soft: rgba(62, 207, 114, .2);
  --ok: #5fe08f; --bad: #ff7a7a; --warn: #ffc35c; --info: #6cc7ff;
  --glass: rgba(6, 17, 11, .72); --glass-strong: rgba(13, 31, 21, .92); --glass-card: rgba(16, 38, 25, .55);
  --glass-border: rgba(140, 220, 170, .12);
  --blob-1: rgba(40, 200, 110, .24); --blob-2: rgba(0, 160, 120, .16); --blob-3: rgba(170, 220, 60, .10); --blob-4: rgba(0, 120, 90, .14);
  --free: #5fe08f; --free-soft: rgba(95, 224, 143, .14); --busy-bg: #dff5e6; --busy-text: #06110b;
  --seg-on: #2a4a36; --chart: var(--accent);
  --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="purple"] {
  --bg: #0d0716; --surface: #1a1029; --surface-2: #24173a; --surface-3: #2f1f4a; --surface-solid: #1a1029;
  --fill: rgba(170, 130, 230, .16); --line: rgba(160, 120, 220, .22); --line-strong: rgba(160, 120, 220, .4);
  --text: #f4eeff; --muted: #b3a3cf; --faint: #6e5f8a;
  --accent: #b07cff; --accent-hover: #c299ff; --on-accent: #ffffff; --accent-soft: rgba(176, 124, 255, .22);
  --ok: #4ade80; --bad: #ff7a9a; --warn: #ffc15c; --info: #8ab4ff;
  --glass: rgba(13, 7, 22, .72); --glass-strong: rgba(26, 16, 41, .92); --glass-card: rgba(36, 22, 58, .55);
  --glass-border: rgba(200, 160, 255, .12);
  --blob-1: rgba(150, 80, 255, .3); --blob-2: rgba(255, 80, 200, .14); --blob-3: rgba(80, 60, 220, .2); --blob-4: rgba(0, 200, 200, .07);
  --free: #4ade80; --free-soft: rgba(74, 222, 128, .14); --busy-bg: #efe4ff; --busy-text: #0d0716;
  --seg-on: #3b2a5c; --chart: var(--accent);
  --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="gold"] {
  --bg: #0e0d0b; --surface: #1b1915; --surface-2: #25221d; --surface-3: #322e27; --surface-solid: #1b1915;
  --fill: rgba(200, 180, 140, .14); --line: rgba(200, 180, 140, .18); --line-strong: rgba(200, 180, 140, .34);
  --text: #f6f1e7; --muted: #b0a690; --faint: #6d6556;
  --accent: #f5b642; --accent-hover: #ffc65c; --on-accent: #1b1300; --accent-soft: rgba(245, 182, 66, .2);
  --ok: #6bd88f; --bad: #ff7a6b; --warn: #ffc35c; --info: #7cc4ff;
  --glass: rgba(14, 13, 11, .74); --glass-strong: rgba(27, 25, 21, .94); --glass-card: rgba(38, 34, 28, .55);
  --glass-border: rgba(240, 210, 150, .1);
  --blob-1: rgba(245, 170, 50, .2); --blob-2: rgba(255, 110, 60, .1); --blob-3: rgba(200, 160, 90, .12); --blob-4: rgba(120, 90, 40, .14);
  --free: #6bd88f; --free-soft: rgba(107, 216, 143, .14); --busy-bg: #f6f1e7; --busy-text: #0e0d0b;
  --seg-on: #3d362a; --chart: var(--accent);
  --shadow: none; --shadow-pop: 0 12px 40px rgba(0, 0, 0, .65);
  color-scheme: dark;
}
:root[data-theme="mint"] {
  --bg: #eef6f1; --surface: #ffffff; --surface-2: #eef6f1; --surface-3: #dcebe2; --surface-solid: #ffffff;
  --fill: rgba(60, 120, 90, .1); --line: rgba(40, 90, 60, .14); --line-strong: rgba(40, 90, 60, .26);
  --text: #142019; --muted: #5c6f63; --faint: #9aaba0;
  --accent: #1f9d55; --accent-hover: #23ad5e; --on-accent: #ffffff; --accent-soft: rgba(31, 157, 85, .12);
  --ok: #1f8a3d; --bad: #d70015; --warn: #b25000; --info: #0a7cc2;
  --glass: rgba(246, 251, 248, .72); --glass-strong: rgba(255, 255, 255, .88); --glass-card: rgba(255, 255, 255, .6);
  --glass-border: rgba(255, 255, 255, .75);
  --blob-1: rgba(31, 157, 85, .2); --blob-2: rgba(0, 170, 160, .13); --blob-3: rgba(170, 210, 60, .15); --blob-4: rgba(255, 200, 60, .09);
  --free: #1f9d4c; --free-soft: rgba(52, 199, 89, .14); --busy-bg: #142019; --busy-text: #ffffff;
  --chart: var(--accent);
  color-scheme: light;
}
:root[data-theme="sunset"] {
  --bg: #fbf3ec; --surface: #ffffff; --surface-2: #fbf3ec; --surface-3: #f1e2d4; --surface-solid: #ffffff;
  --fill: rgba(150, 90, 40, .1); --line: rgba(120, 70, 30, .14); --line-strong: rgba(120, 70, 30, .26);
  --text: #2a1c12; --muted: #7a6352; --faint: #b29c8a;
  --accent: #e8590c; --accent-hover: #f06a1f; --on-accent: #ffffff; --accent-soft: rgba(232, 89, 12, .12);
  --ok: #2b8a3e; --bad: #c92a2a; --warn: #b25000; --info: #1971c2;
  --glass: rgba(253, 248, 243, .72); --glass-strong: rgba(255, 255, 255, .88); --glass-card: rgba(255, 255, 255, .6);
  --glass-border: rgba(255, 255, 255, .75);
  --blob-1: rgba(255, 140, 60, .22); --blob-2: rgba(255, 80, 120, .13); --blob-3: rgba(255, 200, 80, .18); --blob-4: rgba(180, 90, 200, .08);
  --free: #2b8a3e; --free-soft: rgba(43, 138, 62, .12); --busy-bg: #2a1c12; --busy-text: #ffffff;
  --chart: var(--accent);
  color-scheme: light;
}
:root[data-theme="rose"] {
  --bg: #fbf1f4; --surface: #ffffff; --surface-2: #fbf1f4; --surface-3: #f2dde4; --surface-solid: #ffffff;
  --fill: rgba(150, 60, 90, .1); --line: rgba(120, 40, 70, .14); --line-strong: rgba(120, 40, 70, .26);
  --text: #2a1219; --muted: #7d5a66; --faint: #b896a2;
  --accent: #d6336c; --accent-hover: #e0457b; --on-accent: #ffffff; --accent-soft: rgba(214, 51, 108, .12);
  --ok: #2b8a3e; --bad: #c92a2a; --warn: #b25000; --info: #1971c2;
  --glass: rgba(253, 246, 248, .72); --glass-strong: rgba(255, 255, 255, .88); --glass-card: rgba(255, 255, 255, .6);
  --glass-border: rgba(255, 255, 255, .75);
  --blob-1: rgba(240, 80, 140, .2); --blob-2: rgba(170, 90, 230, .13); --blob-3: rgba(255, 160, 120, .14); --blob-4: rgba(80, 140, 255, .08);
  --free: #2b8a3e; --free-soft: rgba(43, 138, 62, .12); --busy-bg: #2a1219; --busy-text: #ffffff;
  --chart: var(--accent);
  color-scheme: light;
}
:root[data-theme="forest"] .seg a.on, :root[data-theme="forest"] .seg input:checked + span, :root[data-theme="forest"] .seg button.on,
:root[data-theme="purple"] .seg a.on, :root[data-theme="purple"] .seg input:checked + span, :root[data-theme="purple"] .seg button.on,
:root[data-theme="gold"] .seg a.on, :root[data-theme="gold"] .seg input:checked + span, :root[data-theme="gold"] .seg button.on { background: var(--seg-on); }
:root[data-theme="forest"] :is(.panel, .kpi, .occ), :root[data-theme="purple"] :is(.panel, .kpi, .occ),
:root[data-theme="gold"] :is(.panel, .kpi, .occ) { box-shadow: none; }
:root:is([data-theme="forest"], [data-theme="purple"], [data-theme="gold"], [data-theme="mint"], [data-theme="sunset"], [data-theme="rose"]) .brand-mark {
  background: var(--accent); color: var(--on-accent); }
:root[data-theme="navy"] { --chart: var(--accent); }

/* =====================================================================
   Анимации: переход между страницами, появление карточек по очереди, рост графиков,
   отклик кнопок и меню. «Уменьшить движение» в системе выключает всё (правило выше + ниже).
   ===================================================================== */
@view-transition { navigation: auto; }
.side { view-transition-name: side; }
.tabbar { view-transition-name: tabbar; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* содержимое страницы — сверху вниз, с небольшой задержкой */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.main > :not(.toast, dialog, script) { animation: rise .45s cubic-bezier(.2, .8, .2, 1) backwards; }
.main > :nth-child(2) { animation-delay: .04s; } .main > :nth-child(3) { animation-delay: .08s; }
.main > :nth-child(4) { animation-delay: .12s; } .main > :nth-child(5) { animation-delay: .16s; }
.main > :nth-child(6) { animation-delay: .2s; } .main > :nth-child(n+7) { animation-delay: .24s; }
.kpis > *, .cols > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.kpis > :nth-child(2), .cols > :nth-child(2) { animation-delay: .06s; }
.kpis > :nth-child(3), .cols > :nth-child(3) { animation-delay: .12s; }
.kpis > :nth-child(4), .cols > :nth-child(4) { animation-delay: .18s; }
.kpis > :nth-child(n+5), .cols > :nth-child(n+5) { animation-delay: .24s; }
details[open] > :not(summary) { animation: rise .28s ease-out backwards; }

/* графики растут: столбики — снизу по очереди (--i ставит app.js), полоски — слева */
@keyframes grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: none; } }
.vbars i { transform-origin: bottom; animation: grow-y .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 16ms + .12s); }
.bar i { transform-origin: left; animation: grow-x .8s cubic-bezier(.2, .8, .2, 1) .15s backwards; }

/* отклик: меню, строки, карточки, образцы тем */
.nav a, .nav button, a.row, .person-switch a, .seg a, .seg button { transition: background .18s, color .18s; }
.kpi { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.theme-pick .sw { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.theme-pick button:hover .sw { transform: translateY(-3px); }
.theme-pick button.on .sw::before { content: "✓"; position: absolute; right: 8px; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--sw-accent); color: #fff; animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop-in { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
.toast .i { animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1) .12s both; }
.tabbar a .i, .tabbar button .i { transition: transform .15s; }
.tabbar a:active .i, .tabbar button:active .i { transform: scale(.86); }
.tabbar a.on .i { animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1) both; }

/* лист в логотипе покачивается при наведении и «дышит» на странице входа */
@keyframes sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 60% { transform: rotate(9deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.brand:hover .brand-mark .i { animation: sway .9s ease-in-out; transform-origin: 50% 90%; }
.login-card .brand-mark { animation: float 4s ease-in-out infinite; }

/* важное мигает мягко: «не выплачено», ошибки */
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot-bad) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.badge.bad .dot { animation: pulse-ring 1.8s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* постоянные расходы */
.fx-end { gap: 8px; }
.fx-end b { font-size: 15.5px; margin-right: 4px; }
.fx-row.is-paid .row-title { color: var(--muted); }
.fx-list tr.faint td { color: var(--faint); }
.sched.compact.fx-list td:first-child, .sched.compact.fx-list th:first-child { padding-left: 20px; }
.sched.compact.fx-list td:last-child, .sched.compact.fx-list th:last-child { padding-right: 20px; }
.fx-list .t-actions > div { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .fx-row { flex-wrap: wrap; }
  .fx-row .row-end { width: 100%; justify-content: flex-end; padding-left: 38px; }
  .fx-row .row-end b { margin-right: auto; }
}
#remind .bot-form .check { min-height: 42px; margin-right: 6px; }

/* категории: свои цвета на графике и в таблице (одинаково читаются в светлых и тёмных темах) */
:root { --cat-0: #30b158; --cat-1: #0a84ff; --cat-2: #ff9f0a; --cat-3: #bf5af2; --cat-4: #ff375f; --cat-5: #40c8e0; }
.c0 { --c: var(--cat-0); } .c1 { --c: var(--cat-1); } .c2 { --c: var(--cat-2); }
.c3 { --c: var(--cat-3); } .c4 { --c: var(--cat-4); } .c5 { --c: var(--cat-5); }
.cat-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.cat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cat-name { display: inline-flex; align-items: center; gap: 8px; }
.cat-best { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.cat-best .cat-sw { width: 14px; height: 14px; border-radius: 4px; }
.cat-table .bar i[class^="c"] { background: var(--c); }
.cat-share { min-width: 150px; }
.cat-share .bar { display: inline-flex; width: calc(100% - 52px); vertical-align: middle; }
.cat-share .num { display: inline-block; width: 46px; text-align: right; font-size: 12.5px; }
.sched.compact.cat-table td:first-child, .sched.compact.cat-table th:first-child { padding-left: 20px; }
.sched.compact.cat-table td:last-child, .sched.compact.cat-table th:last-child { padding-right: 20px; }
.cat-items h2 .cat-sw { width: 12px; height: 12px; }
.vchart.stacked .vbars { align-items: flex-end; }
.vstack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; min-height: 2px;
  transform-origin: bottom; animation: grow-y .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 16ms + .12s); }
.vstack i { display: block; flex: 1 1 0; min-height: 0; max-width: none; border-radius: 0; background: var(--c); animation: none; }
.vstack i + i { box-shadow: 0 -1px 0 var(--surface-solid, #fff); }
.vcol.fut .vstack { opacity: .4; }
.vchart.stacked .vstack i { border-radius: 0; }

/* установка приложения */
.install h3 { font-size: 15px; margin: 6px 0 -4px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.steps li::marker { color: var(--accent); font-weight: 600; }
.install-help summary { color: var(--accent); font-size: 13.5px; }
.install-help ul { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.install-chip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px;
  border-radius: 99px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.install-chip[hidden] { display: none; }

/* ИИ-помощник */
.ai-fab { position: fixed; right: 24px; bottom: 24px; z-index: 22; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #bf5af2));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 38%, transparent); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
  animation: pop-in .4s cubic-bezier(.3, 1.6, .5, 1) .3s backwards; }
.ai-fab:hover { transform: translateY(-2px) scale(1.05); }
.ai-fab:active { transform: scale(.95); }
@media (max-width: 900px) { .ai-fab { display: none; } }
dialog.ai-drawer { width: min(460px, 100vw); }
.ai-box { height: 100%; display: flex; flex-direction: column; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 18px; border-bottom: .5px solid var(--line); }
.ai-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-head small { color: var(--muted); font-size: 12px; }
.ai-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #bf5af2)); }
.ai-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ai-hello p { color: var(--muted); margin: 4px 0 14px; font-size: 14.5px; }
.ai-chips { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.ai-chips button { border: .5px solid var(--line-strong); background: color-mix(in srgb, var(--surface-solid) 85%, transparent); color: var(--text);
  font: inherit; font-size: 13.5px; padding: 7px 13px; border-radius: 14px; cursor: pointer; text-align: left; transition: border-color .15s, color .15s; }
.ai-chips button:hover { border-color: var(--accent); color: var(--accent); }
.ai-msg { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere;
  animation: rise .25s ease-out backwards; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.ai-msg.model { align-self: flex-start; background: color-mix(in srgb, var(--surface-solid) 92%, transparent); border: .5px solid var(--line); border-bottom-left-radius: 5px; }
.ai-msg.err { color: var(--bad); }
.ai-msg p { margin: 0 0 6px; }
.ai-msg p:last-child, .ai-msg ul:last-child, .ai-msg ol:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: 2px 0 6px; padding-left: 18px; }
.ai-msg a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ai-msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.ai-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: ai-dot 1s infinite ease-in-out; }
.ai-msg.typing span:nth-child(2) { animation-delay: .15s; }
.ai-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: .5px solid var(--line); }
.ai-form textarea { resize: none; min-height: 40px; max-height: 140px; border-radius: 20px; padding: 9px 14px; line-height: 1.4; }
.ai-form .btn { width: 40px; height: 40px; min-height: 40px; flex: none; }

/* =====================================================================
   Цветовые схемы — как в панели отеля (правка homelab, 2026-10-27).
   «Мои настройки» → «Цветовая схема», users.accent → <html data-accent>.
   Меняют акцент кнопок/ссылок/графиков и пятна фона поверх ЛЮБОЙ темы;
   «Как в теме» — атрибута нет, цвет самой темы. Светлые значения — :root[data-accent=X]
   (светлая, мятная, закат, розовая); тёмные — с более сильным селектором (тёмные темы
   и «как в системе» при тёмной системе). Белый текст на акценте: светлые ≥ 5.2:1, тёмные ≥ 3.4:1.
   ===================================================================== */
:root[data-accent="blue"] { --accent: #0071e3; --accent-hover: #0077ed; --on-accent: #ffffff; --accent-soft: rgba(0, 113, 227, .1); --info: #0071e3;
  --blob-1: rgba(0, 113, 227, .16); --blob-2: rgba(175, 82, 222, .12); --blob-3: rgba(52, 199, 89, .1); --blob-4: rgba(255, 159, 10, .1); }
:root[data-accent="blue"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #0a84ff; --accent-hover: #409cff; --on-accent: #ffffff; --accent-soft: rgba(10, 132, 255, .2); --info: #64d2ff;
  --blob-1: rgba(0, 113, 227, .24); --blob-2: rgba(175, 82, 222, .16); --blob-3: rgba(52, 199, 89, .12); --blob-4: rgba(255, 159, 10, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="blue"]:not([data-theme]) { --accent: #0a84ff; --accent-hover: #409cff; --on-accent: #ffffff; --accent-soft: rgba(10, 132, 255, .2); --info: #64d2ff;
  --blob-1: rgba(0, 113, 227, .24); --blob-2: rgba(175, 82, 222, .16); --blob-3: rgba(52, 199, 89, .12); --blob-4: rgba(255, 159, 10, .09); } }
:root[data-accent="violet"] { --accent: #7b3fe4; --accent-hover: #8650ea; --on-accent: #ffffff; --accent-soft: rgba(123, 63, 228, .1); --info: #7b3fe4;
  --blob-1: rgba(123, 63, 228, .16); --blob-2: rgba(214, 72, 180, .12); --blob-3: rgba(80, 110, 255, .1); --blob-4: rgba(255, 140, 190, .1); }
:root[data-accent="violet"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #9b6bff; --accent-hover: #ad85ff; --on-accent: #ffffff; --accent-soft: rgba(155, 107, 255, .2); --info: #ad85ff;
  --blob-1: rgba(123, 63, 228, .24); --blob-2: rgba(214, 72, 180, .16); --blob-3: rgba(80, 110, 255, .12); --blob-4: rgba(255, 140, 190, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="violet"]:not([data-theme]) { --accent: #9b6bff; --accent-hover: #ad85ff; --on-accent: #ffffff; --accent-soft: rgba(155, 107, 255, .2); --info: #ad85ff;
  --blob-1: rgba(123, 63, 228, .24); --blob-2: rgba(214, 72, 180, .16); --blob-3: rgba(80, 110, 255, .12); --blob-4: rgba(255, 140, 190, .09); } }
:root[data-accent="indigo"] { --accent: #4f46e5; --accent-hover: #5b53ec; --on-accent: #ffffff; --accent-soft: rgba(79, 70, 229, .1); --info: #4f46e5;
  --blob-1: rgba(79, 70, 229, .16); --blob-2: rgba(30, 150, 255, .12); --blob-3: rgba(150, 90, 240, .1); --blob-4: rgba(0, 190, 200, .1); }
:root[data-accent="indigo"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #6c6cff; --accent-hover: #8484ff; --on-accent: #ffffff; --accent-soft: rgba(108, 108, 255, .2); --info: #8484ff;
  --blob-1: rgba(79, 70, 229, .24); --blob-2: rgba(30, 150, 255, .16); --blob-3: rgba(150, 90, 240, .12); --blob-4: rgba(0, 190, 200, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="indigo"]:not([data-theme]) { --accent: #6c6cff; --accent-hover: #8484ff; --on-accent: #ffffff; --accent-soft: rgba(108, 108, 255, .2); --info: #8484ff;
  --blob-1: rgba(79, 70, 229, .24); --blob-2: rgba(30, 150, 255, .16); --blob-3: rgba(150, 90, 240, .12); --blob-4: rgba(0, 190, 200, .09); } }
:root[data-accent="emerald"] { --accent: #0b7a55; --accent-hover: #0d8a60; --on-accent: #ffffff; --accent-soft: rgba(11, 122, 85, .1); --info: #0b7a55;
  --blob-1: rgba(16, 160, 110, .16); --blob-2: rgba(0, 170, 190, .12); --blob-3: rgba(120, 200, 90, .1); --blob-4: rgba(255, 200, 60, .1); }
:root[data-accent="emerald"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #1f9e6e; --accent-hover: #2bb47f; --on-accent: #ffffff; --accent-soft: rgba(31, 158, 110, .2); --info: #2bb47f;
  --blob-1: rgba(16, 160, 110, .24); --blob-2: rgba(0, 170, 190, .16); --blob-3: rgba(120, 200, 90, .12); --blob-4: rgba(255, 200, 60, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="emerald"]:not([data-theme]) { --accent: #1f9e6e; --accent-hover: #2bb47f; --on-accent: #ffffff; --accent-soft: rgba(31, 158, 110, .2); --info: #2bb47f;
  --blob-1: rgba(16, 160, 110, .24); --blob-2: rgba(0, 170, 190, .16); --blob-3: rgba(120, 200, 90, .12); --blob-4: rgba(255, 200, 60, .09); } }
:root[data-accent="teal"] { --accent: #0b7285; --accent-hover: #0c8197; --on-accent: #ffffff; --accent-soft: rgba(11, 114, 133, .1); --info: #0b7285;
  --blob-1: rgba(10, 150, 175, .16); --blob-2: rgba(40, 120, 255, .12); --blob-3: rgba(20, 200, 160, .1); --blob-4: rgba(140, 110, 240, .1); }
:root[data-accent="teal"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #1694aa; --accent-hover: #22a8bf; --on-accent: #ffffff; --accent-soft: rgba(22, 148, 170, .2); --info: #22a8bf;
  --blob-1: rgba(10, 150, 175, .24); --blob-2: rgba(40, 120, 255, .16); --blob-3: rgba(20, 200, 160, .12); --blob-4: rgba(140, 110, 240, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="teal"]:not([data-theme]) { --accent: #1694aa; --accent-hover: #22a8bf; --on-accent: #ffffff; --accent-soft: rgba(22, 148, 170, .2); --info: #22a8bf;
  --blob-1: rgba(10, 150, 175, .24); --blob-2: rgba(40, 120, 255, .16); --blob-3: rgba(20, 200, 160, .12); --blob-4: rgba(140, 110, 240, .09); } }
:root[data-accent="sunset"] { --accent: #c2410c; --accent-hover: #d0480f; --on-accent: #ffffff; --accent-soft: rgba(194, 65, 12, .1); --info: #c2410c;
  --blob-1: rgba(240, 110, 30, .16); --blob-2: rgba(230, 60, 90, .12); --blob-3: rgba(255, 180, 40, .1); --blob-4: rgba(170, 80, 220, .1); }
:root[data-accent="sunset"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #e0611c; --accent-hover: #ec7633; --on-accent: #ffffff; --accent-soft: rgba(224, 97, 28, .2); --info: #ec7633;
  --blob-1: rgba(240, 110, 30, .24); --blob-2: rgba(230, 60, 90, .16); --blob-3: rgba(255, 180, 40, .12); --blob-4: rgba(170, 80, 220, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="sunset"]:not([data-theme]) { --accent: #e0611c; --accent-hover: #ec7633; --on-accent: #ffffff; --accent-soft: rgba(224, 97, 28, .2); --info: #ec7633;
  --blob-1: rgba(240, 110, 30, .24); --blob-2: rgba(230, 60, 90, .16); --blob-3: rgba(255, 180, 40, .12); --blob-4: rgba(170, 80, 220, .09); } }
:root[data-accent="rose"] { --accent: #c8205f; --accent-hover: #d42b6b; --on-accent: #ffffff; --accent-soft: rgba(200, 32, 95, .1); --info: #c8205f;
  --blob-1: rgba(225, 50, 110, .16); --blob-2: rgba(170, 80, 230, .12); --blob-3: rgba(255, 130, 90, .1); --blob-4: rgba(255, 180, 210, .1); }
:root[data-accent="rose"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #e0457f; --accent-hover: #ea5f93; --on-accent: #ffffff; --accent-soft: rgba(224, 69, 127, .2); --info: #ea5f93;
  --blob-1: rgba(225, 50, 110, .24); --blob-2: rgba(170, 80, 230, .16); --blob-3: rgba(255, 130, 90, .12); --blob-4: rgba(255, 180, 210, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="rose"]:not([data-theme]) { --accent: #e0457f; --accent-hover: #ea5f93; --on-accent: #ffffff; --accent-soft: rgba(224, 69, 127, .2); --info: #ea5f93;
  --blob-1: rgba(225, 50, 110, .24); --blob-2: rgba(170, 80, 230, .16); --blob-3: rgba(255, 130, 90, .12); --blob-4: rgba(255, 180, 210, .09); } }
:root[data-accent="graphite"] { --accent: #3a3a3c; --accent-hover: #48484a; --on-accent: #ffffff; --accent-soft: rgba(58, 58, 60, .1); --info: #3a3a3c;
  --blob-1: rgba(120, 120, 130, .16); --blob-2: rgba(90, 100, 120, .12); --blob-3: rgba(150, 150, 155, .1); --blob-4: rgba(110, 110, 115, .1); }
:root[data-accent="graphite"]:is([data-theme="dark"], [data-theme="navy"], [data-theme="forest"], [data-theme="purple"], [data-theme="gold"]) { --accent: #7c7c82; --accent-hover: #8e8e93; --on-accent: #ffffff; --accent-soft: rgba(124, 124, 130, .2); --info: #8e8e93;
  --blob-1: rgba(120, 120, 130, .24); --blob-2: rgba(90, 100, 120, .16); --blob-3: rgba(150, 150, 155, .12); --blob-4: rgba(110, 110, 115, .09); }
@media (prefers-color-scheme: dark) { :root[data-accent="graphite"]:not([data-theme]) { --accent: #7c7c82; --accent-hover: #8e8e93; --on-accent: #ffffff; --accent-soft: rgba(124, 124, 130, .2); --info: #8e8e93;
  --blob-1: rgba(120, 120, 130, .24); --blob-2: rgba(90, 100, 120, .16); --blob-3: rgba(150, 150, 155, .12); --blob-4: rgba(110, 110, 115, .09); } }
:root[data-accent="graphite"] :is(.nav a .i, .nav button .i) { color: var(--muted); }
:root[data-accent] .brand-mark { background: var(--accent); color: var(--on-accent); }

/* выбор схемы в настройках */
.accent-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
.accent-pick button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--fill); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left;
  transition: background .2s, box-shadow .2s, transform .2s; }
.accent-pick .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--sw-bg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 8px color-mix(in srgb, var(--sw) 45%, transparent); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.accent-pick button.on { box-shadow: 0 0 0 2px var(--sw); background: color-mix(in srgb, var(--sw) 12%, var(--fill)); }
.accent-pick button.on .dot { transform: scale(1.12); }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .accent-pick button:hover { transform: translateY(-2px); }
  .accent-pick button:hover .dot { transform: scale(1.2) rotate(12deg); }
}
