/*
 * Iris Platform — дизайн-система застосунку (портовано з docs/design/*).
 * Правила світу — DESIGN.md. Джерело токенів — iris-brandbook (монохром) +
 * UI-акцент soft violet (тільки інтерактив). Не хардкодити кольори у в'юхах.
 */

:root {
  color-scheme: dark;

  --bg:#000000; --surface-1:#0A0A0B; --surface-2:#141416; --surface-3:#1C1C1F; --surface-input:#0E0E10;
  --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.14); --line-faint:rgba(255,255,255,.05);
  --text:#F5F5F7; --text-2:#A6A6AD; --text-3:#6E6E76; --text-on-accent:#FFFFFF;

  --violet-200:#D4CBFB; --violet-300:#BCAEF9; --violet-400:#A08FF3;
  --violet-500:#8A78EE; --violet-600:#7A67E6; --violet-700:#6857D6;
  --accent:var(--violet-600); --accent-hover:var(--violet-500); --accent-active:var(--violet-700);
  --accent-text:var(--violet-300);
  --accent-tint:rgba(138,120,238,.12); --accent-tint-2:rgba(138,120,238,.20);
  --focus-ring:rgba(138,120,238,.55); --accent-glow:0 0 0 4px rgba(138,120,238,.16);

  --success:#35A379; --danger:#D25A4C; --warning:#D19A2A; --info:#5A8FCB;
  /* Кольори даних для графіків — палітра iris-brandbook/DESIGN.md §1.7 (лише застосунки; лаванда до даних не входить). */
  --data-1:#3DBE8B; --data-2:#3E9BE6; --data-3:#E8B04A; --data-4:#E5675A;
  /* «Колір за змістом» (рішення власника 2026-11-07): один показник — один колір усюди (плитки, графіки, тренди).
     Матові тони (власник: «не глянцеві»), основа — зелений стовпчиків каси на production (#3DBE8B × 0,85 на #141416 ≈
     #37A479): каса — м'який смарагд, години — приглушена лаванда (родина violet), друк — глибока бірюза, зміни — сланцево-
     синій. Валідатор dataviz, темна тема, поверхні #000 / #0A0A0B / #141416, на парах, що стоять поруч у рядах плиток
     (зміни–години, години–каса, каса–друк, зміни–каса): смуга L 0.48–0.67, CVD ΔE ≥ 11.9, звичайний зір ΔE ≥ 15.2, контраст
     позначки ≥ 3:1. Свідомо послаблено: поріг хроми 0.10 (друк і зміни — 0.08, бо матові) і перевірка «всі пари» (друк↔зміни
     ΔE 10 — ніде не стоять поруч, і кожна плитка підписана). Текст цим кольором не фарбуємо — лише крапки, лінії, заливки. */
  --metric-cash:#4FA27B; --metric-hours:#9588CD; --metric-print:#157171; --metric-shifts:#576697;
  /* Напрямок (той самий матовий характер): вгору — смарагд каси, вниз — приглушений цегляно-рожевий, не «тривожний» червоний.
     Пара вгору/вниз — CVD ΔE 9.3, звичайний зір 21.4; колір ніколи не єдиний сигнал (стрілка ▲/▼ або текст поруч). */
  --trend-up:var(--metric-cash); --trend-down:#A55856;
  --success-tint:rgba(53,163,121,.14); --danger-tint:rgba(210,90,76,.14); --warning-tint:rgba(209,154,42,.14);

  --font-ui:"Inter",-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;
  --font-brand:"Archivo","Helvetica Neue",Arial,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace;

  --r-sm:8px; --r-md:12px; --r-lg:18px; --r-xl:24px; --r-full:9999px;
  --shadow-1:0 1px 2px rgba(0,0,0,.4); --shadow-2:0 8px 30px rgba(0,0,0,.45);
  --ease:cubic-bezier(.22,.61,.36,1); --dur-1:120ms; --dur-2:180ms; --dur-3:260ms;
}

html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: -.011em;
}
::selection { background: var(--accent-tint-2); color: #fff; }
/* Атрибут hidden ховає завжди — навіть елементи, яким клас задає display (плитки, сітки). */
[hidden] { display: none !important; }
.iris a { color: inherit; text-decoration: none; }
.iris button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); letter-spacing: -.02em; }

/* ============ APP SHELL ============ */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 22px 22px 18px; display: flex; align-items: center; gap: 10px; }
/* Логотип — лише з файлу власника (iris-brandbook, logo-master-*): знак у два рядки, задаємо тільки висоту. */
.brand img { height: 34px; width: auto; display: block; opacity: .96; }
.brand .badge { margin-left: auto; font: 500 10px/1 var(--font-mono); color: var(--text-3); border: 1px solid var(--line); padding: 4px 6px; border-radius: var(--r-full); letter-spacing: .04em; }

.nav { padding: 8px 12px; overflow-y: auto; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); text-transform: uppercase; padding: 8px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-md); color: var(--text-2); font-weight: 500; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); position: relative; }
.nav-item svg { width: 18px; height: 18px; flex: none; stroke-width: 1.6; opacity: .9; }
.nav-item .count { margin-left: auto; font: 500 11px/1 var(--font-mono); color: var(--text-3); }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-tint); color: var(--text); }
.nav-item.active svg { color: var(--accent-text); opacity: 1; }
.nav-item.active .count { color: var(--accent-text); }

/* Розкривні розділи меню (docs/CRM_SPEC.md §1) */
.nav > * + * { margin-top: 2px; }
.nav-label-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > .nav-item { flex: 1; min-width: 0; }
.nav-toggle { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); color: var(--text-3); background: none; border: none; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.nav-toggle:hover { background: var(--surface-3); color: var(--text); }
.nav-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.nav-toggle svg { width: 14px; height: 14px; stroke-width: 2; transition: transform var(--dur-1) var(--ease); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav-sub { margin: 2px 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-sub > * + * { margin-top: 1px; }
.nav-subitem { padding: 6px 10px; font-size: 13px; }
.nav-item.is-soon { color: var(--text-3); cursor: default; }
.nav-item.is-soon:hover { background: none; color: var(--text-3); }
.nav-item .soon { margin-left: auto; flex: none; font: 500 10px/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); border-radius: var(--r-full); padding: 3px 6px; }
.userchip-form { margin: 0; }

/* Перемикач мови у верхній панелі */
.locale-switch { position: relative; }
.locale-switch summary { list-style: none; cursor: pointer; height: 32px; min-width: 42px; padding: 0 10px; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line); font: 500 12px/1 var(--font-mono); color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.locale-switch summary::-webkit-details-marker { display: none; }
.locale-switch summary:hover { background: var(--surface-3); color: var(--text); }
.locale-switch summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.locale-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 168px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-1); z-index: 30; }
.locale-menu form { margin: 0; }
.locale-option { width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-md); background: none; border: none; color: var(--text-2); font-size: 13px; }
.locale-option:hover { background: var(--surface-3); color: var(--text); }
.locale-option:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.locale-option.is-current { color: var(--text); font-weight: 600; }

/* Дошка зі статусами (заявки) */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.board-col { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 140px; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.board-col.is-over { border-color: var(--focus-ring); background: var(--accent-tint); }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-size: 13px; }
.board-cards { display: flex; flex-direction: column; gap: 8px; }
.board-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 12px 8px; cursor: grab; }
.board-card:active { cursor: grabbing; }
.board-card.is-dragging { opacity: .45; }
.board-card-title { font-weight: 600; font-size: 14px; color: var(--text); display: block; }
.board-card-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.board-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; }
.board-card-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; border-top: 1px solid var(--line-faint); padding-top: 6px; }
.board-empty, .board-more { padding: 10px 4px; font-size: 12.5px; }

/* ============ ГРАФІК: календар (рішення власника 2026-10-23) ============
 * Тиждень — сітка годин 00–24 × 7 днів; бронювання — суцільна плашка кольору локації (палітра iris-brandbook §1.7, текст
 * чорнилом), запрошення — порожниста з пунктиром, свої — зі світлим кільцем. Робочі години (08–22) світліші за ніч.
 * Лаванда — лише інтерактив і «сьогодні / зараз». */
:root { --cal-none: #98958D; --cal-ink: #0B0B0C; }
.cal { --cal-hour: 46px; --cal-gutter: 62px; }
.cal .page-head > .btn { margin-left: auto; }
.tnum { font-variant-numeric: tabular-nums; }
.sev.info { color: var(--info); }

.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.cal-arrow, .cal-today { height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-input); color: var(--text-2); transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.cal-arrow { width: 34px; }
.cal-arrow svg { width: 16px; height: 16px; stroke-width: 2; }
.cal-today { padding: 0 14px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.cal-today.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.cal-range { margin: 0 4px; font-size: 20px; font-weight: 680; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.cal-filters .tselect { width: auto; min-width: 170px; }
@media (hover: hover) and (pointer: fine) { .cal-arrow:hover, .cal-today:hover { color: var(--text); background: var(--surface-3); } }

.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; font-size: 12.5px; color: var(--text); }
.cal-key { display: inline-flex; align-items: center; gap: 7px; }
.cal-key .subtle { color: var(--text-2); }
.cal-key-chip { width: 14px; height: 14px; border-radius: 4px; background: var(--loc); flex: none; }
.cal-key.is-invited .cal-key-chip { background: transparent; border: 1.5px dashed var(--loc); }

/* Тиждень */
.cal-week { position: relative; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-scroll { max-height: min(72vh, 780px); overflow: auto; overscroll-behavior: contain; }
/* Доріжка не вужча за 34px: коли точок водночас багато, тиждень гортається вбік, а не тоншає до смужок. */
.cal-grid { --cal-day-min: max(112px, calc(var(--lanes-max, 1) * 34px)); display: grid; grid-template-columns: var(--cal-gutter) repeat(7, minmax(var(--cal-day-min), 1fr)); min-width: calc(var(--cal-gutter) + 7 * var(--cal-day-min)); }
.cal-corner, .cal-dayhead { position: sticky; top: 0; z-index: 4; background: var(--surface-1); border-bottom: 1px solid var(--line-strong); }
.cal-corner { left: 0; z-index: 5; }
.cal-dayhead { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 10px 12px; border-left: 1px solid var(--line); }
.cal-dow { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: capitalize; }
.cal-num { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: var(--r-full); font-size: 24px; font-weight: 720; letter-spacing: -.03em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-dayhead.is-today .cal-num { background: var(--accent); color: var(--text-on-accent); }
.cal-dayhead.is-today .cal-dow { color: var(--accent-text); }
.cal-dayhead.is-past .cal-num { color: var(--text-3); }
.cal-dayhead.is-past .cal-dow { color: var(--text-2); font-weight: 500; }
.cal-hours { position: sticky; left: 0; z-index: 3; display: grid; grid-template-rows: repeat(24, var(--cal-hour)); background: var(--surface-1); border-right: 1px solid var(--line); }
.cal-hours span { position: relative; top: -8px; padding-right: 10px; text-align: right; font-size: 11.5px; font-weight: 640; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-hours span:first-child { top: 4px; }
.cal-hours span:nth-child(-n+8), .cal-hours span:nth-child(n+23) { color: var(--text-2); font-weight: 500; }
.cal-col {
  position: relative; height: calc(24 * var(--cal-hour)); border-left: 1px solid var(--line);
  background:
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--cal-hour) - 1px), var(--line) calc(var(--cal-hour) - 1px) var(--cal-hour)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--cal-hour) / 2 - 1px), var(--line-faint) calc(var(--cal-hour) / 2 - 1px) calc(var(--cal-hour) / 2), transparent calc(var(--cal-hour) / 2) var(--cal-hour)),
    linear-gradient(to bottom, var(--bg) 0 calc(8 * var(--cal-hour)), var(--surface-2) calc(8 * var(--cal-hour)) calc(22 * var(--cal-hour)), var(--bg) calc(22 * var(--cal-hour)));
}
.cal-hours + .cal-col { border-left: none; }
.cal-col.is-today { box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--accent) 6%, transparent); }
.cal-col.is-pickable { cursor: pointer; }
.cal-ev {
  position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden;
  top: calc(var(--from) / 60 * var(--cal-hour) + 1px); height: calc(var(--len) / 60 * var(--cal-hour) - 2px);
  left: calc(var(--lane) / var(--lanes) * (100% - 6px) + 3px); width: calc((100% - 6px) * var(--span) / var(--lanes) - 2px);
  padding: 5px 6px; border: none; border-radius: 8px; background: var(--loc); color: var(--cal-ink);
  font: inherit; font-size: 12px; line-height: 1.25; text-align: left; letter-spacing: -.005em;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); transition: filter var(--dur-1) var(--ease);
}
.cal-ev > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-time { font-weight: 720; font-variant-numeric: tabular-nums; }
.cal-ev-who { font-weight: 620; }
.cal-ev-where { font-weight: 500; }
.cal-ev.is-short { flex-direction: row; gap: 6px; padding-block: 2px; }
.cal-ev.is-short .cal-ev-where { display: none; }
.cal-ev.is-tiny { padding: 0; }
.cal-ev.is-tiny > span { display: none !important; }
/* Вузька плашка (багато точок водночас): спершу лише початок та ім'я, ще вужча — ініціали; решта — у картці по кліку. */
.cal-ev { container-type: inline-size; }
.cal-ev > .cal-ev-start, .cal-ev > .cal-ev-initials { display: none; }
@container (max-width: 92px) {
  .cal-ev > .cal-ev-time, .cal-ev > .cal-ev-where { display: none; }
  .cal-ev > .cal-ev-start { display: block; font-weight: 720; font-variant-numeric: tabular-nums; }
}
@container (max-width: 46px) {
  .cal-ev > .cal-ev-start, .cal-ev > .cal-ev-who { display: none; }
  .cal-ev > .cal-ev-initials { display: block; font-size: 11px; font-weight: 720; text-overflow: clip; }
}
.cal-ev.is-invited, .cal-pill.is-invited { background: color-mix(in srgb, var(--loc) 16%, var(--surface-1)); color: var(--text); outline: 1.5px dashed var(--loc); outline-offset: -1.5px; }
.cal-ev.is-invited { box-shadow: none; }
.cal-ev.is-mine, .cal-pill.is-mine { box-shadow: inset 0 0 0 2px var(--text), inset 0 0 0 3px var(--cal-ink); }
.cal-ev.is-cut-top { border-top-left-radius: 0; border-top-right-radius: 0; }
.cal-ev.is-cut-bottom { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cal-ev:focus-visible, .cal-pill:focus-visible { outline: 2px solid var(--violet-300); outline-offset: 1px; z-index: 2; }
.cal-arrow:focus-visible, .cal-today:focus-visible, .cal-cell-num:focus-visible, .cal-more:focus-visible, .bk-close:focus-visible, .sheet-close:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
@media (hover: hover) and (pointer: fine) { .cal-ev:hover, .cal-pill:hover { filter: brightness(1.08); } .cal-ev:hover { z-index: 2; } }
.cal-now { position: absolute; left: 0; right: 0; z-index: 2; top: calc(var(--at) / 60 * var(--cal-hour) - 1px); height: 2px; background: var(--accent); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
/* «+ 10:00» під курсором — стрибає за пів години без переходу: за ним стежать очима, затримка лише заважала б. */
.cal-ghost { position: absolute; left: 3px; right: 3px; z-index: 1; top: calc(var(--from) / 60 * var(--cal-hour) + 1px); height: calc(var(--cal-hour) / 2 - 2px); display: flex; align-items: center; padding: 0 7px; border: 1px dashed var(--violet-400); border-radius: 6px; background: var(--accent-tint); color: var(--violet-200); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.cal-zone { margin-top: 10px; font-size: 12px; color: var(--text-2); }
.cal-empty { padding: 18px; }

/* Місяць */
.cal-month { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal-month-head, .cal-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month-head { border-bottom: 1px solid var(--line-strong); }
.cal-month-head span { padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: capitalize; }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 128px; padding: 8px; background: var(--surface-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.is-outside { background: var(--surface-1); }
.cal-cell.is-today { background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.cal-cell.is-pickable { cursor: pointer; }
.cal-cell-num { align-self: flex-start; display: inline-grid; place-items: center; min-width: 32px; height: 32px; margin: -4px 0 2px -4px; padding: 0 6px; border-radius: var(--r-full); font-size: 19px; font-weight: 720; color: var(--text); font-variant-numeric: tabular-nums; text-decoration: none; transition: background var(--dur-1) var(--ease); }
.cal-cell.is-past .cal-cell-num { color: var(--text-2); }
.cal-cell.is-outside .cal-cell-num { color: var(--text-2); font-weight: 500; }
.cal-cell.is-today .cal-cell-num { background: var(--accent); color: var(--text-on-accent); }
@media (hover: hover) and (pointer: fine) { .cal-cell:not(.is-today) .cal-cell-num:hover { background: var(--surface-3); } }
.cal-pill { display: block; width: 100%; padding: 3px 7px; border: none; border-radius: 6px; background: var(--loc); color: var(--cal-ink); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.35; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter var(--dur-1) var(--ease); }
.cal-pill .tnum { font-weight: 720; }
.cal-more { padding-left: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }

/* Список і вкладка точки: смужка кольору локації перед часом */
.list-key { display: inline-block; width: 12px; height: 12px; margin-right: 10px; border-radius: 4px; background: var(--loc); vertical-align: -1px; }
.list-key.is-invited { background: transparent; border: 1.5px dashed var(--loc); }
.list-time { font-weight: 650; color: var(--text); }
.list-status { display: flex; margin-top: 2px; white-space: normal; }
/* Колонки однакові в усіх днях списку — час, точка й люди стоять рівно одне під одним. */
.iris-table.schedule-list tbody td:nth-child(n) { width: auto; text-align: left; }
.schedule-list .c-time { width: 160px; }
.schedule-list .c-point { width: 170px; }
.schedule-list .c-loc { width: 22%; }
.schedule-list .c-act { width: 320px; }
.schedule-list td { overflow-wrap: anywhere; }
.list-line { display: block; }
.list-note, .list-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.list-note { margin-top: 2px; font-size: 12.5px; }
/* Другорядний текст календаря — text-2: на поверхнях 2–3 text-3 не дотягує до 4.5:1. */
.schedule-list .subtle, .bk-card .subtle, .cal-invites .subtle { color: var(--text-2); }
.iris-table.schedule-list tbody td:last-child { text-align: right; }
.panel:has(.schedule-list) { overflow-x: auto; }
.schedule-list { min-width: 900px; }

/* Запрошення, що чекають відповіді */
.cal-invites { margin-bottom: 16px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-strong); }
.cal-invites h2 { margin-bottom: 4px; font-size: 15px; font-weight: 650; }
.cal-invites ul { margin: 0; padding: 0; list-style: none; }
.cal-invites li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.cal-invites li:first-child { border-top: none; }
.cal-invite-text p { margin: 0; font-size: 13px; }
.cal-invite-actions { display: flex; gap: 8px; }
.cal-invite-actions form { margin: 0; }

/* Картка бронювання (Popover API): з'являється з легким збільшенням, зникає швидше, ніж з'являється. */
.bk-card {
  width: min(380px, calc(100vw - 32px)); margin: auto; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-2);
  opacity: 1; transform: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
}
.bk-card:not(:popover-open) { opacity: 0; transform: scale(.97); transition-duration: var(--dur-1); }
@starting-style { .bk-card:popover-open { opacity: 0; transform: scale(.97); } }
.bk-card::backdrop { background: rgba(0, 0, 0, .4); }
.bk-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; }
.bk-card h3 { font-size: 17px; font-weight: 680; letter-spacing: -.01em; overflow-wrap: anywhere; }
.bk-card-head p { margin-top: 2px; color: var(--text-2); font-size: 13px; }
.bk-swatch { width: 12px; height: 40px; border-radius: 4px; background: var(--loc); }
.bk-swatch.is-invited { background: transparent; border: 1.5px dashed var(--loc); }
.bk-close, .sheet-close { display: grid; place-items: center; width: 32px; height: 32px; border: none; border-radius: var(--r-sm); background: transparent; color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.bk-close svg, .sheet-close svg { width: 16px; height: 16px; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .bk-close:hover, .sheet-close:hover { background: var(--surface-3); color: var(--text); } }
.bk-status { margin-top: 12px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text); font-size: 12.5px; font-weight: 550; }
.bk-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 13px; }
.bk-facts dt { color: var(--text-2); }
.bk-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.bk-actions form { margin: 0; }

/* Панель «Нове бронювання»: аркуш справа (на телефоні — знизу) виїжджає від свого краю. */
.sheet {
  inset: 0 0 0 auto; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0;
  border: none; border-left: 1px solid var(--line-strong); background: var(--surface-1); color: var(--text); box-shadow: var(--shadow-2);
  transform: none; opacity: 1;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-3) var(--ease), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete;
}
.sheet:not([open]) { transform: translateX(100%); opacity: 0; transition-duration: var(--dur-2); }
@starting-style { .sheet[open] { transform: translateX(100%); opacity: 0; } }
.sheet::backdrop { background: rgba(0, 0, 0, .55); opacity: 1; transition: opacity var(--dur-3) var(--ease), overlay var(--dur-3) allow-discrete, display var(--dur-3) allow-discrete; }
.sheet:not([open])::backdrop { opacity: 0; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-form { display: flex; flex-direction: column; height: 100%; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; max-width: none; }
.sheet .errors:focus { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.sheet .form-row { grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.sheet-swatch-row { display: flex; align-items: center; gap: 10px; }
.sheet-swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--loc, var(--cal-none)); }
.sheet-invite { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 13px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .cal { --cal-hour: 42px; --cal-gutter: 52px; }
  .cal-arrow { width: 40px; height: 40px; }
  .cal-today { height: 40px; }
  .cal-range { order: -1; width: 100%; margin: 0; }
  .cal-filters { margin-left: 0; width: 100%; }
  .cal-filters .tselect { flex: 1; min-width: 0; }
  .cal-cell { min-height: 76px; padding: 6px 4px; }
  .cal-cell-num { font-size: 19px; min-width: 30px; height: 30px; margin: 0 0 2px; padding: 0 4px; }
  .cal-pill { height: 6px; padding: 0; font-size: 0; border-radius: 3px; }
  .cal-pill.is-mine { box-shadow: none; }
  .cal-more { font-size: 11px; }
  .sheet { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 92dvh; border-left: none; border-top: 1px solid var(--line-strong); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .sheet:not([open]) { transform: translateY(100%); }
  @starting-style { .sheet[open] { transform: translateY(100%); } }
  .sheet .form-row { grid-template-columns: 1fr 1fr; }
  .sheet .form-row > :first-child { grid-column: 1 / -1; }
}

/* Менше руху: аркуш і картка лише коротко проявляються (≤180 мс), без виїзду й збільшення; підсвічування лишається. */
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet::backdrop { transition-duration: var(--dur-2); }
  .sheet:not([open]), .bk-card:not(:popover-open) { transform: none; }
  @starting-style { .sheet[open], .bk-card:popover-open { transform: none; } }
}

/* Дзвіночок сповіщень у верхній панелі */
.bell { position: relative; }
.bell summary { list-style: none; cursor: pointer; position: relative; width: 36px; height: 32px; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.bell summary::-webkit-details-marker { display: none; }
.bell summary:hover { background: var(--surface-3); color: var(--text); }
.bell summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.bell summary svg { width: 17px; height: 17px; stroke-width: 1.7; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-full); background: var(--accent); color: var(--text-on-accent); font: 600 10px/17px var(--font-mono); text-align: center; }
.bell-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 360px; max-width: calc(100vw - 32px); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-2); z-index: 30; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bell-head .link-plain { background: none; border: none; color: var(--text-2); font-size: 12.5px; }
.bell-item { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: none; border-bottom: 1px solid var(--line-faint); color: var(--text-2); font-size: 13px; line-height: 1.4; }
.bell-item b { display: block; color: var(--text); font-weight: 600; }
.bell-item time { display: block; font-size: 11.5px; margin-top: 2px; }
.bell-item:hover { background: var(--surface-3); }
.bell-item.is-unread { box-shadow: inset 2px 0 0 var(--accent); }
.bell-all { display: block; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); text-align: center; }
.bell-all:hover { color: var(--text); }

/* Сторінки розділів: заголовок блоку, картки інструментів, пояснення в панелі */
.section-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 12px; }
.org-card-body { min-width: 0; }
.mono-mark svg { width: 20px; height: 20px; stroke-width: 1.7; }
.panel-note { padding: 0 20px 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

.sidebar-foot { border-top: 1px solid var(--line); padding: 12px; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); transition: background var(--dur-1) var(--ease); width: 100%; text-align: left; background: none; border: none; }
.userchip:hover { background: var(--surface-3); }
.avatar { width: 30px; height: 30px; border-radius: var(--r-full); flex: none; background: linear-gradient(150deg, var(--violet-500), var(--violet-700)); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.userchip .who { line-height: 1.2; min-width: 0; }
.userchip .who b { font-weight: 600; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip .who span { font-size: 11px; color: var(--text-3); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(140%) blur(18px); position: sticky; top: 0; z-index: 20; }
.search { display: flex; align-items: center; gap: 9px; background: var(--surface-input); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; width: 320px; color: var(--text-3); transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.search:focus-within { border-color: var(--focus-ring); box-shadow: var(--accent-glow); }
.search svg { width: 16px; height: 16px; stroke-width: 1.7; }
.search input { border: none; background: none; outline: none; color: var(--text); width: 100%; font-size: 13.5px; }
.search input::placeholder { color: var(--text-3); }
.search kbd { font: 500 11px/1 var(--font-mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; }
.topbar-spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); position: relative; background: none; border: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; stroke-width: 1.6; }
.menu-toggle { display: none; }
.hm-btn .hm-avatar { display: none; }
@media (max-width: 720px) {
  .hm-btn svg { display: none; }
  .hm-btn .hm-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
    font-size: 12px; overflow: hidden; }
  .hm-btn:has(.hm-avatar) { padding: 0; display: inline-flex; align-items: center; justify-content: center; }
}
.nav-backdrop { display: none; }
@media (max-width: 720px) { .nav-backdrop { display: block; } }
@media (max-width: 720px) and (prefers-reduced-motion: reduce) { .sidebar, .app.nav-open .sidebar, .nav-backdrop { transition: none; } }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface-1); }

/* Ширина робочої області (власник 2026-10-30: нормально на будь-якому екрані — від ноутбука 13–14″ до великого монітора):
   поля ростуть з екраном, а сам вміст зупиняється на 1680 px, щоб рядки таблиць не розтягувались на весь монітор. */
.content { padding: 22px clamp(18px, 2.4vw, 40px) 64px; max-width: 1680px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 640; letter-spacing: -.02em; }
.page-head p { color: var(--text-2); margin-top: 4px; font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; height: 38px; padding: 0 16px; border-radius: var(--r-md); font-weight: 560; font-size: 13.5px; letter-spacing: -.01em; border: none; cursor: pointer; transition: transform var(--dur-1) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); white-space: nowrap; user-select: none; }
.btn svg { width: 16px; height: 16px; stroke-width: 1.8; flex: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-1), var(--accent-glow); }
.btn-primary:active { background: var(--accent-active); box-shadow: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--accent-tint); color: var(--accent-text); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; box-shadow: none; }
/* Колір тексту кнопок-посилань (рішення власника 2026-10-23: «всюди білий на лавандових»). Скидання `.iris a { color:
   inherit }` (0,1,1) перебивало колір кнопки (0,1,0) у кожного <a class="btn …">: у сірому контейнері (порожній стан,
   підказка) лавандова кнопка ставала сірою на лавандовому, червона «небезпечна» — білою. Колір кнопок — на рівень вище.
   Текстові посилання (.link-plain) цим не зачіпаємо. */
.iris .btn-primary { color: var(--text-on-accent); }
.iris .btn-secondary { color: var(--text); }
.iris .btn-ghost { color: var(--text-2); }
.iris .btn-ghost:hover { color: var(--accent-text); }
.iris .btn-danger { color: var(--danger); }
/* Те саме для текстових посилань: `.link-plain` задумано лавандовим, але скидання `.iris a` робило його білим чи сірим
   («Усі зміни», «Докладніше», «Відкрити журнал»…). Колір — на рівень вище; у дзвіночку свій приглушений колір лишається. */
.iris .link-plain { color: var(--accent-text); }
.iris .link-plain:hover { color: var(--violet-200); }
.iris .bell-head .link-plain { color: var(--text-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* ============ PANELS / TABLE / PILLS ============ */
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; gap: 12px 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.panel-head .sub { color: var(--text-3); font-size: 12.5px; }
.panel-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.ribbon { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; }
.ribbon .cell { padding: 18px 20px; border-right: 1px solid var(--line); }
.ribbon .cell:last-child { border-right: none; }
.ribbon .k { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.ribbon .k svg { width: 14px; height: 14px; stroke-width: 1.7; color: var(--text-3); }
.ribbon .v { font-size: 27px; font-weight: 620; letter-spacing: -.02em; margin-top: 10px; }
.ribbon .v small { font-size: 15px; color: var(--text-3); font-weight: 500; }
.delta { font-size: 12px; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.delta.up { color: var(--success); } .delta.flat { color: var(--text-3); }
.delta svg { width: 13px; height: 13px; stroke-width: 2; }
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; align-items: start; }

.iris-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.iris-table thead th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); padding: 11px 18px; border-bottom: 1px solid var(--line); }
.iris-table thead th:nth-child(1), .iris-table tbody td:nth-child(1) { width: 44%; }
.iris-table thead th:nth-child(2), .iris-table tbody td:nth-child(2) { width: 27%; }
.iris-table thead th:nth-child(3), .iris-table tbody td:nth-child(3) { width: 19%; }
.iris-table thead th:nth-child(4), .iris-table tbody td:nth-child(4) { width: 10%; text-align: right; }
.iris-table tbody td { padding: 13px 18px; border-bottom: 1px solid var(--line-faint); font-size: 13.5px; vertical-align: middle; }
.iris-table tbody tr { transition: background var(--dur-1) var(--ease); }
.iris-table tbody tr:hover { background: var(--surface-3); }
.iris-table tbody tr:last-child td { border-bottom: none; }
.cellname { display: flex; align-items: center; gap: 11px; }
.cellname > div { min-width: 0; }
.flag { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; font-size: 13px; flex: none; }
.cellname b { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Лише підпис під ім'ям: аватар-кружечок із ініціалами теж span, його це правило не чіпає (2026-10-20). */
.cellname > div > span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iris-table.auto { table-layout: auto; }
.iris-table.auto th, .iris-table.auto td { width: auto; }
.iris-table.auto td:last-child, .iris-table.auto th:last-child { text-align: right; white-space: nowrap; }
.row-link { cursor: pointer; }
.avatar.has-photo, .avatar-sm.has-photo, .avatar-lg.has-photo { overflow: hidden; background: var(--line-faint); }
.avatar-lg.is-current { box-shadow: 0 0 0 2px var(--violet-500); }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 34px; height: 34px; border-radius: var(--r-full); background: linear-gradient(150deg, var(--violet-500), var(--violet-700)); display: grid; place-items: center; font-weight: 650; font-size: 12px; color: #fff; flex: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 550; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--success); background: var(--success-tint); }
.pill.grace { color: var(--warning); background: var(--warning-tint); }
.pill.susp { color: var(--danger); background: var(--danger-tint); }
.pill.neutral { color: var(--text-2); background: var(--surface-3); }

/* ============ CONTROLS ============ */
.stack { display: flex; flex-direction: column; gap: 20px; padding: 18px; }
.field-label { font-size: 12px; color: var(--text-2); font-weight: 550; margin-bottom: 9px; display: flex; justify-content: space-between; }
.field-label .val { color: var(--accent-text); font-family: var(--font-mono); font-size: 12px; }
input[type=range].iris-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; }
input[type=range].iris-range::-webkit-slider-runnable-track { height: 5px; border-radius: var(--r-full); background: var(--track, var(--surface-3)); }
input[type=range].iris-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; margin-top: -6.5px; background: #fff; border: 1px solid rgba(0,0,0,.15); box-shadow: 0 1px 3px rgba(0,0,0,.5); transition: box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
input[type=range].iris-range:hover::-webkit-slider-thumb { box-shadow: 0 1px 3px rgba(0,0,0,.5), var(--accent-glow); }
input[type=range].iris-range:active::-webkit-slider-thumb { transform: scale(1.08); }
input[type=range].iris-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--focus-ring); }

.toggle { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle .track { position: absolute; inset: 0; border-radius: var(--r-full); background: var(--surface-3); transition: background var(--dur-2) var(--ease); }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); transition: transform var(--dur-2) var(--ease); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked ~ .knob { transform: translateX(18px); }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--focus-ring); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row-between .t b { font-weight: 550; font-size: 13.5px; }
.row-between .t span { display: block; font-size: 12px; color: var(--text-3); }

.segmented { display: inline-flex; background: var(--surface-input); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.segmented button, .segmented a, .segmented .off { padding: 6px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 550; color: var(--text-2); border: none; background: none; text-decoration: none; transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.segmented button.on, .segmented a.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-1); }
.segmented button:hover:not(.on), .segmented a:hover:not(.on) { color: var(--text); }
.segmented .off { opacity: .45; cursor: default; }

/* Код активації комп'ютера точки: читається з екрана й виділяється одним кліком. */
.activation-code { display: inline-block; margin: 6px 0 8px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-input); border: 1px solid var(--line); font-size: 20px; letter-spacing: .06em; user-select: all; }

/* Показники роботи точки: плитки-цифри (число — пропорційними цифрами, підпис — приглушений). */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 14px 18px 4px; }
.kpi { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--line-faint); }
.kpi .label { font-size: 12.5px; color: var(--text-3); }
.kpi .value { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; color: var(--text); }
.kpi .value.neg { color: var(--danger); }
/* Витрати виїзду: базові ширини 44/27/19/10 % і правий край 4-ї колонки не пасують — нотатка широка й зліва; рядок, що
   став формою (`tr.editing`, одна комірка на весь ряд), не успадковує правий край останньої колонки. */
.iris-table.tour-expenses-table :is(thead th, tbody td):nth-child(n) { width: auto; }
.iris-table.tour-expenses-table :is(thead th, tbody td):nth-child(4) { text-align: left; width: 38%; }
.iris-table.auto.tour-expenses-table tr.editing td:last-child { text-align: left; white-space: normal; }
.iris-table th.nowrap { white-space: nowrap; }
.iris-table.tour-expenses-table tfoot th { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.kpi .meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.kpi-grid.tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid.tight .kpi { padding: 12px 14px; }
.kpi-grid.tight .value { font-size: 20px; }

/* Каса по місяцях: одна серія без легенди; монохромні стовпчики ≤24px із заокругленим верхом (акцент — лише для
   інтерактиву), шкала — тонкі суцільні лінії, підказка — на наведення й фокус. */
.bar-chart { margin: 0; padding: 10px 18px 12px; }
.bar-chart-title { font-size: 12.5px; color: var(--text-3); margin-bottom: 22px; }
.bar-chart-plot { position: relative; height: 150px; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.bar-chart-grid { position: absolute; inset: 0; pointer-events: none; }
.bar-chart-grid .tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.bar-chart-grid .tick span { position: absolute; right: 0; top: -17px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; border-radius: 6px; }
.bar-col .bar { width: min(24px, 70%); height: var(--h); background: var(--text-2); border-radius: 4px 4px 0 0; transition: background var(--dur-1) var(--ease); }
.bar-col:hover .bar, .bar-col:focus-visible .bar { background: var(--text); }
/* Кольорові графіки (рішення власника 2026-10-21): один колір на показник з палітри даних; стовпчики виростають від осі один
   раз при завантаженні (ease-out, 25 мс між сусідами); з prefers-reduced-motion — лише проявлення. */
/* З 2026-11-07 тони беруть кольори показників (--metric-*): каса, друк і зміни однакові на всіх сторінках. */
.bar-chart[data-tone="cash"] { --bar: var(--metric-cash); }
.bar-chart[data-tone="printed"] { --bar: var(--metric-print); }
.bar-chart[data-tone="shifts"] { --bar: var(--metric-shifts); }
/* P&L: дохід і витрата — дві серії з палітри даних; легенда — тими самими кольорами. */
.bar-chart[data-tone="profit"] { --bar: var(--data-1); --bar-2: var(--data-4); }
.bar-chart[data-tone="profit"] .bar.expense, .bar-chart[data-tone="profit"] .bar-col.pair:hover .bar.expense, .bar-chart[data-tone="profit"] .bar-col.pair:focus-visible .bar.expense { background: var(--bar-2); }
@media (hover: hover) and (pointer: fine) { .bar-chart[data-tone="profit"] .bar-col.pair:hover .bar.expense { background: color-mix(in srgb, var(--bar-2) 78%, white); } }
.bar-chart[data-tone="profit"] .bar-col.pair:focus-visible .bar.expense { background: color-mix(in srgb, var(--bar-2) 78%, white); }
.bar-chart[data-tone="profit"] .swatch.income { background: var(--data-1); }
.bar-chart[data-tone="profit"] .swatch.expense { background: var(--data-4); }
.bar-chart[data-tone="profit"] .bar-tip b::before { display: none; }
/* Стовпчик — ледь помітний вертикальний градієнт кольору показника (повний угорі → 62 % біля осі, матово); наведення світлішає. */
.bar-chart[data-tone] .bar { background: linear-gradient(180deg, var(--bar), color-mix(in srgb, var(--bar) 62%, transparent)); transform-origin: bottom; animation: bar-rise .32s cubic-bezier(.23, 1, .32, 1) both; animation-delay: calc(var(--i, 0) * 25ms); }
.bar-chart[data-tone] .bar-col:focus-visible .bar { background: linear-gradient(180deg, color-mix(in srgb, var(--bar) 78%, white), color-mix(in srgb, var(--bar) 55%, transparent)); }
@media (hover: hover) and (pointer: fine) { .bar-chart[data-tone] .bar-col:hover .bar { background: linear-gradient(180deg, color-mix(in srgb, var(--bar) 78%, white), color-mix(in srgb, var(--bar) 55%, transparent)); } }
.bar-chart[data-tone] .bar-tip b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--bar); margin-right: 6px; vertical-align: 0; }
@keyframes bar-rise { from { transform: scaleY(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bar-chart[data-tone] .bar { animation: bar-fade .2s ease both; }
  @keyframes bar-fade { from { opacity: 0; } }
}
/* Дві серії (фінанси: дохід і витрата) — поруч, тон розрізняє серії, легенда над графіком. */
.bar-col.pair { gap: 2px; }
.bar-col.pair .bar { width: min(12px, 34%); }
.bar-col.pair .bar.expense { height: var(--h2); background: var(--text-3); }
.bar-col.pair:hover .bar.expense, .bar-col.pair:focus-visible .bar.expense { background: var(--text-2); }
.bar-col.pair .bar-tip { bottom: calc(max(var(--h), var(--h2)) + 8px); }
.bar-chart-legend { display: flex; gap: 14px; margin: -14px 0 10px; font-size: 12px; color: var(--text-3); }
.bar-chart-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--text-2); vertical-align: -1px; }
.bar-chart-legend .swatch.expense { background: var(--text-3); }
.bar-col:focus-visible { box-shadow: 0 0 0 2px var(--focus-ring); }
.bar-tip { position: absolute; left: 50%; bottom: calc(var(--h) + 8px); transform: translateX(-50%); z-index: 2; white-space: nowrap; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); font-size: 12px; color: var(--text-2); opacity: 0; pointer-events: none; transition: opacity var(--dur-1) var(--ease); }
.bar-tip b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.bar-col:hover .bar-tip, .bar-col:focus-visible .bar-tip { opacity: 1; }
.bar-chart-axis { display: flex; gap: 4px; margin-top: 6px; }
.bar-chart-axis span { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); }
/* Лінія «каса за годину по днях» (показники): SVG у тих самих тонах, що й стовпчики — сітка лініями, серія чорнилом,
   точки з підказкою через <title>. */
.line-chart { margin: 0; }
.line-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .series { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .dot { fill: var(--surface-1); stroke: var(--text); stroke-width: 2; }
.line-chart .dot:hover { fill: var(--text); }
/* Лінія каси за годину — той самий смарагдовий, що й каса на стовпчиках; графік сервера лишається нейтральним. */
.line-chart:not(.server-chart) .series { stroke: var(--metric-cash); }
.line-chart:not(.server-chart) .dot { stroke: var(--metric-cash); }
.line-chart:not(.server-chart) .dot:hover { fill: var(--metric-cash); }
/* Площа під лінією (2026-11-07): колір каси від ~22 % угорі до нуля біля осі; проявляється разом зі стовпчиками сусіднього
   графіка — один вхід на сторінку; з prefers-reduced-motion — коротке проявлення 150 мс. */
.line-chart .area-stop-top { stop-color: var(--metric-cash); stop-opacity: .22; }
.line-chart .area-stop-bottom { stop-color: var(--metric-cash); stop-opacity: 0; }
.line-chart .area { stroke: none; animation: chart-fade .4s cubic-bezier(.23, 1, .32, 1) .1s both; }
@keyframes chart-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .line-chart .area { animation: chart-fade .15s ease both; } } /* лише коротке проявлення, як у стовпчиків */
.line-chart .tick, .line-chart .axis { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
/* Ряди блоків «Аналітики» (2026-11-07): блоки в ряду однакової висоти, графік заповнює блок — стовпчики ростуть у висоту,
   лінія тримає пропорції по центру. */
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.analytics-grid > .panel { display: flex; flex-direction: column; min-width: 0; overflow-x: auto; }
.analytics-grid .chart-body { flex: 1; display: flex; flex-direction: column; padding: 6px 18px 12px; min-height: 0; }
.analytics-grid .chart-body > .bar-chart { flex: 1; display: flex; flex-direction: column; padding-left: 0; padding-right: 0; }
.analytics-grid .chart-body > .bar-chart .bar-chart-plot { flex: 1; min-height: 150px; }
.analytics-grid .chart-body > .chart-table { padding-left: 0; padding-right: 0; }
.analytics-grid .chart-body > .line-chart { flex: 1; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1100px) { .analytics-grid { grid-template-columns: minmax(0, 1fr); } }
/* Медіа сайту (запит сайту §16): слоти з мініатюрами, стрілки порядку, форма завантаження. */
.media-slot { padding: 12px 18px 14px; border-top: 1px solid var(--line-faint); }
.media-slot-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.media-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.media-list li { display: flex; align-items: center; gap: 12px; }
.media-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-3); flex: none; display: grid; place-items: center; color: var(--text-3); }
.media-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.media-actions { display: flex; gap: 4px; }
.media-upload { display: flex; gap: 8px; align-items: center; }
.media-upload .tinput { max-width: 360px; }
/* Кілька рядів (Turnstile): тон ряду + легенда з підписами */
.multi-chart .series.tone-muted { stroke: var(--text-3); }
.multi-chart .series.tone-ok { stroke: var(--success); }
.multi-chart .series.tone-bad { stroke: var(--danger); }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; padding: 0; font-size: 12px; color: var(--text-2); }
.chart-legend li::before { content: ""; display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--text-3); margin-right: 6px; vertical-align: middle; }
.chart-legend li.tone-ok::before { border-color: var(--success); }
.chart-legend li.tone-bad::before { border-color: var(--danger); }
.line-chart .limit { stroke: var(--warning); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.line-chart .hit { fill: transparent; stroke: none; }
.line-chart .hit:hover { fill: var(--text); }
.iris-table tr.total td { border-top: 1px solid var(--line-strong); font-weight: 600; }
.chart-table { padding: 0 18px 14px; font-size: 12.5px; color: var(--text-2); }
.chart-table summary { cursor: pointer; color: var(--text-3); margin-bottom: 6px; }

/* Журнал точки: фільтри в один рядок над тим, що фільтрують; позначки стану — знак + текст, не лише колір. */
.journal-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.journal-filters .log-search { display: flex; gap: 8px; margin-left: auto; }
.journal-filters .log-search .tinput { width: 240px; }
/* «Аналітика» (2026-11-07): дати вужчі — фільтри вміщаються в один ряд; на телефоні переносяться рядками на всю ширину,
   а не виходять за екран. */
.journal-filters[data-section="analytics-filters"] .log-search .tinput { width: 160px; }
@media (max-width: 720px) {
  .journal-filters[data-section="analytics-filters"] .log-search { flex-wrap: wrap; margin-left: 0; width: 100%; min-width: 0; }
  .journal-filters[data-section="analytics-filters"] .log-search > * { flex: 1 1 140px; min-width: 0; width: auto; }
}
.journal-table th, .journal-table td { width: auto !important; text-align: left !important; }
.session-crumbs { margin: 0 0 16px; color: var(--text-2); }
.sev { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.sev.error { color: var(--danger); }
.sev.warning { color: var(--warning); }
.pager { display: flex; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line-faint); }
.assign-worker { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.assign-worker .tselect { max-width: 260px; }
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { display: grid; grid-template-columns: 52px 18px 1fr; gap: 8px; padding: 7px 18px; font-size: 13px; border-bottom: 1px solid var(--line-faint); }
.timeline li:last-child { border-bottom: none; }
.timeline time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline .icon { text-align: center; color: var(--text-3); }
.timeline li.error .icon, .timeline li.crash .icon { color: var(--danger); }
.timeline li.warning .icon { color: var(--warning); }
.log-lines { font-family: var(--font-mono); font-size: 12px; line-height: 1.55; padding: 8px 0; overflow-x: auto; }
.log-lines .row { display: grid; grid-template-columns: 64px 48px 110px minmax(0, 1fr); gap: 10px; padding: 2px 18px; }
.log-lines .row.error { background: var(--danger-tint); }
.log-lines .row.warning { background: var(--warning-tint); }
.log-lines .meta { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-lines .msg { white-space: pre-wrap; word-break: break-word; color: var(--text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Графік (рішення власника 2026-09-14): дні з бронюваннями, скасовані — приглушено. */
.schedule-day { border-bottom: 1px solid var(--line-faint); }
.schedule-day:last-child { border-bottom: none; }
.schedule-day h4 { margin: 0; padding: 12px 18px 4px; font-size: 13px; font-weight: 600; }
.schedule-day .schedule-free { padding: 2px 18px 12px; font-size: 13px; }
.schedule-day .iris-table tbody td { padding-top: 9px; padding-bottom: 9px; }
.schedule-day .iris-table tbody tr.muted td { color: var(--text-3); }
.schedule-day .iris-table tbody tr.muted .mono { text-decoration: line-through; }
.iris-table td.nowrap { white-space: nowrap; }
.iris-table tbody tr.muted td { color: var(--text-3); }
/* Техніка (CRM_SPEC §5): мініатюра моделі в каталозі, фото на картці. */
.eq-thumb { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--surface-input); }
.eq-thumb.empty { border: 1px dashed var(--line); }
.eq-photo { display: block; max-width: 100%; max-height: 260px; border-radius: var(--r-md); margin: 6px 0 12px; }
.schedule-rules { margin: 0; padding: 12px 18px 16px 34px; }
.schedule-rules li { margin-bottom: 6px; }
/* «Фото зміни» (етап В, крок 2б): мініатюри на чорному, вікно перегляду без скачування. */
.qc-grid { list-style: none; margin: 0; padding: 4px 18px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.qc-grid li { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qc-thumb { display: block; width: 100%; aspect-ratio: 1; padding: 0; background: #000; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; }
.qc-thumb:focus-visible { outline: none; border-color: var(--focus-ring); box-shadow: var(--accent-glow); }
.qc-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.qc-thumb.pending { display: grid; place-items: center; cursor: default; color: var(--text-3); font-size: 12px; background: var(--surface-input); }
.qc-meta { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
/* margin: auto — центрування модального dialog, яке скидання стилів Tailwind прибирає (margin: 0 усім елементам). */
.qc-dialog { margin: auto; padding: 0; border: none; border-radius: var(--r-lg); background: #000; max-width: min(92vw, 1040px); }
.qc-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.qc-dialog img { display: block; min-width: 240px; min-height: 240px; max-width: 100%; max-height: 86vh; margin: 0 auto; user-select: none; -webkit-user-drag: none; }
.qc-dialog form { position: absolute; top: 8px; right: 8px; }
.qc-dialog form .btn { color: #fff; background: rgba(255, 255, 255, .1); }
.qc-viewers { padding: 4px 18px 16px; border-top: 1px solid var(--line-faint); }
.qc-viewers h4 { margin: 12px 0 6px; font-size: 13px; font-weight: 600; }
.qc-viewers ul { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-2); line-height: 1.7; }

.tinput { width: 100%; height: 38px; padding: 0 13px; border-radius: var(--r-md); background: var(--surface-input); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.tinput::placeholder { color: var(--text-3); }
.tinput:focus { outline: none; border-color: var(--focus-ring); box-shadow: var(--accent-glow); }

/* ============ AUTH (login) ============ */
.auth-body { display: grid; place-items: center; min-height: 100vh; overflow: hidden; position: relative; }
.ambient { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 0; }
.ambient img { width: 820px; max-width: 120vw; opacity: .05; filter: saturate(0); }
.ambient::after { content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, var(--accent-tint) 0%, transparent 62%); opacity: .5; }
.auth-wrap { position: relative; z-index: 1; width: 380px; max-width: calc(100vw - 40px); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 34px; }
.auth-brand img { height: 46px; width: auto; opacity: .98; }
.auth-card { background: color-mix(in srgb, var(--surface-2) 82%, transparent); backdrop-filter: saturate(140%) blur(20px); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px 30px; box-shadow: var(--shadow-2); }
.auth-card h1 { font-size: 20px; font-weight: 620; letter-spacing: -.02em; text-align: center; }
.auth-card .lede { text-align: center; color: var(--text-2); font-size: 13.5px; margin-top: 6px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 8px; }
.field .tinput { height: 44px; font-size: 14.5px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; }
.link { color: var(--accent-text); font-size: 12.5px; font-weight: 550; transition: color var(--dur-1) var(--ease); }
.link:hover { color: var(--violet-200); }
.checkrow { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; cursor: pointer; }
.check { position: relative; width: 20px; height: 20px; flex: none; display: inline-block; }
.check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.check .box { position: absolute; inset: 0; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-input); transition: all var(--dur-1) var(--ease); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check .box::after { content: ""; position: absolute; left: 6.5px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform var(--dur-1) var(--ease); }
.check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px var(--focus-ring); }
.checkrow span { font-size: 13px; color: var(--text-2); }
/* Cloudflare Turnstile (shared/_turnstile): у режимі «interaction-only» поле з'являється лише для сумнівних запитів — над кнопкою, по центру. */
.turnstile { display: flex; justify-content: center; }
.turnstile iframe { margin-bottom: 14px; }
.btn-auth { width: 100%; height: 46px; border-radius: var(--r-md); background: var(--accent); color: #fff; font-weight: 580; font-size: 14.5px; letter-spacing: -.01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; box-shadow: var(--shadow-1); transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease); }
.btn-auth:hover { background: var(--accent-hover); box-shadow: var(--shadow-1), var(--accent-glow); }
.btn-auth:active { background: var(--accent-active); transform: scale(.985); box-shadow: none; }
.btn-auth:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.btn-auth svg { width: 18px; height: 18px; flex: none; }
.btn-alt { width: 100%; height: 44px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); font-weight: 550; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; transition: background var(--dur-1) var(--ease); }
.btn-alt:hover { background: var(--surface-3); }
.btn-alt svg { width: 17px; height: 17px; }
.auth-foot { text-align: center; margin-top: 26px; color: var(--text-3); font-size: 12px; }
.auth-foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.flash { max-width: 360px; margin: 0 auto 16px; padding: 10px 14px; border-radius: var(--r-md); font-size: 13px; text-align: center; }
.flash.notice { background: var(--success-tint); color: var(--success); }
.flash.alert { background: var(--danger-tint); color: var(--danger); }

/* Перемикач мови на сторінках входу й анкети */
.auth-locale { position: fixed; top: 16px; right: 18px; z-index: 20; }

/* Самореєстрація (CRM_SPEC §3.2): ширша картка, групи полів, повідомлення про дані */
.req { color: var(--accent-text); font-weight: 650; }
.onboarding-card .req-note { text-align: center; margin: -16px 0 18px; }
.auth-body.is-long { padding: 44px 0; }
.auth-wrap.is-wide { width: 600px; }
/* Без uppercase: велика кирилична «З» у «КРОК 1 З 2» читається як цифра «3». */
.onboarding-step { text-align: center; font-size: 12.5px; font-weight: 550; color: var(--text-3); margin-bottom: 8px; }
.onboarding-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.onboarding-card legend { float: left; width: 100%; padding: 16px 0 0; margin: 0 0 14px; border-top: 1px solid var(--line-faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.onboarding-card legend + * { clear: both; }
.onboarding-card .hint { font-size: 12px; color: var(--text-3); margin: -8px 0 14px; }
.onboarding-card .field .hint { margin: 6px 0 0; }
.onboarding-card .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.onboarding-card .row-phone { display: grid; grid-template-columns: 2fr 3fr; gap: 0 14px; }
.onboarding-card .field .tselect { height: 44px; font-size: 14.5px; }
.onboarding-card .check-line { margin: 2px 0 16px; }
.onboarding-card .check-line .t { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.notice-list { margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.notice-list .doc .doc-h1, .notice-list .doc .doc-h2, .notice-list .doc .doc-h3 { font-size: 13px; font-weight: 600; text-align: left; color: var(--text); margin: 12px 0 3px; }
.notice-list .doc p, .notice-list .doc li { color: var(--text-2); margin: 0 0 6px; }
.notice-draft { margin-bottom: 14px; }
@media (max-width: 640px) { .onboarding-card .row-2, .onboarding-card .row-phone { grid-template-columns: 1fr; } }
.upload-row { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.upload-thumb { width: 72px; height: 72px; margin-top: 24px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); background: var(--surface-input); overflow: hidden; }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tfile { display: block; width: 100%; font-size: 13px; color: var(--text-2); padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-input); }
.tfile::file-selector-button { margin-right: 12px; height: 28px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-weight: 550; cursor: pointer; }
.review-note { max-width: none; text-align: left; margin: 0 0 16px; }

/* Підказки адреси (Geoapify) під полем вулиці */
.addr-field { position: relative; }
.addr-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 6px; list-style: none; max-height: 260px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.addr-suggestions button { width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font-size: 13.5px; cursor: pointer; }
.addr-suggestions button:hover, .addr-suggestions button.is-active { background: var(--surface-3); }
.addr-suggestions .sub { color: var(--text-3); font-size: 12px; margin-left: 8px; }

/* NDA: читання з перекладом і підпис (CRM_SPEC §3.2, крок 7) */
.auth-wrap.is-wide.nda-wrap { width: 880px; }
.nda-langs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -8px 0 16px; }
.nda-langs a { font-size: 12.5px; padding: 5px 11px; border-radius: var(--r-full); border: 1px solid var(--line); color: var(--text-2); }
.nda-langs a.is-active { border-color: var(--accent); color: var(--accent-text); }
.nda-text { max-height: 58vh; overflow-y: auto; display: grid; gap: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-input); }
.nda-text.has-translation { grid-template-columns: 1fr 1fr; }
.nda-text .nda-end { grid-column: 1 / -1; height: 1px; }
.nda-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 10px; }
.nda-body { overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--text); }
/* Документи компанії з розмітки DocumentMarkup: заголовки, абзаци, пункти */
.doc .doc-h1 { font-size: 15px; font-weight: 650; text-align: center; letter-spacing: -.01em; margin: 0 0 14px; }
.doc .doc-h2 { font-size: 13.5px; font-weight: 650; margin: 20px 0 8px; }
.doc .doc-h3 { font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 20px; list-style: disc; }
.doc li::marker { color: var(--text-3); }
.doc li { margin: 0 0 6px; }
.doc strong { font-weight: 650; }
.nda-admin { padding: 16px 18px; }
.onboarding-card .nda-hint { text-align: center; margin: 12px 0 0; }
.nda-form { margin-top: 18px; }
.nda-form fieldset:disabled { opacity: .45; }
.form.form-wide { max-width: 980px; }
@media (max-width: 800px) { .nda-text.has-translation { grid-template-columns: 1fr; } }

/* Перевірка анкети в картці людини (CRM_SPEC §3.2, кроки 8–9) */
.review-panel { margin-bottom: 22px; }
.review-body { padding: 6px 18px 18px; }
.review-files { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 0; }
.review-file { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.review-file img { width: 160px; height: 110px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-input); }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 14px; border-top: 1px solid var(--line-faint); }
.review-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.review-form label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.review-form .tinput { width: 100%; }
@media (max-width: 800px) { .review-actions { grid-template-columns: 1fr; } }

/* ============ FORMS ============ */
.form { padding: 20px; display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field > label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.form-field .hint { font-size: 12px; color: var(--text-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tselect { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface-input); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E76' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.tselect:focus { outline: none; border-color: var(--focus-ring); box-shadow: var(--accent-glow); }
textarea.tinput { height: auto; padding: 10px 13px; min-height: 76px; resize: vertical; line-height: 1.5; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }
.errors { background: var(--danger-tint); color: var(--danger); border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
/* Поле з помилкою: Rails обгортає його в .field_with_errors — обгортка не ламає сітку, рамка червона. */
.field_with_errors { display: contents; }
.field_with_errors label { color: var(--danger); }
.field_with_errors .tinput, .field_with_errors .tselect { border-color: var(--danger); }
.link-plain { color: var(--accent-text); font-weight: 550; }
.link-plain:hover { color: var(--violet-200); }

/* Checkbox list / permission grid */
.check-line { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; cursor: pointer; }
.check-line .check { margin-top: 1px; }
.check-line .t b { font-weight: 550; font-size: 13.5px; }
.check-line .t span { display: block; font-size: 12px; color: var(--text-3); }
.perm-group { border-top: 1px solid var(--line-faint); padding: 8px 0; }
.perm-group > h4 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 8px 0 4px; }

/* ============ PEOPLE / CARDS ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
/* Сторінка точок: пошук і вигляд «списком / плитками» в тулбарі. */
.points-search { width: 240px; }
.segmented button svg { display: block; }
.points-empty { padding: 14px 18px; }
.card-grid .points-empty { grid-column: 1 / -1; }
.org-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); display: block; }
.org-card:hover { border-color: var(--line-strong); background: var(--surface-3); }
.org-card .top { display: flex; align-items: center; gap: 12px; }
.org-card .mono-mark { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--text-2); font-size: 15px; flex: none; }
.org-card h3 { font-size: 15px; font-weight: 600; }
.org-card .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.org-card .foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-faint); font-size: 12.5px; color: var(--text-2); }

.avatar-lg { width: 56px; height: 56px; border-radius: var(--r-full); background: linear-gradient(150deg, var(--violet-500), var(--violet-700)); display: grid; place-items: center; font-weight: 700; font-size: 19px; color: #fff; flex: none; }

.badge-role { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-full); font-size: 11.5px; font-weight: 550; background: var(--accent-tint); color: var(--accent-text); white-space: nowrap; }
.badge-role.plain { background: var(--surface-3); color: var(--text-2); }
.badge-role.global::before { content: "◆"; margin-right: 5px; font-size: 8px; }
.role-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }

/* Definition list (profile) */
.def-list { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.def-list dt { padding: 12px 0; color: var(--text-3); font-size: 13px; border-bottom: 1px solid var(--line-faint); }
.def-list dd { padding: 12px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-faint); }
.def-list dt:last-of-type, .def-list dd:last-of-type { border-bottom: none; }

/* Invite banner */
.invite-banner { background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 22px; }
.invite-banner h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.invite-banner p { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; height: 38px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface-input); border: 1px solid var(--line); color: var(--text); font-family: var(--font-mono); font-size: 12px; }

/* Empty state */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty-state svg { width: 40px; height: 40px; stroke-width: 1.3; opacity: .5; margin-bottom: 14px; }
.empty-state h3 { font-size: 15px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 13px; max-width: 340px; margin: 0 auto 18px; }

.section-gap { margin-top: 24px; }
.subtle { color: var(--text-3); font-size: 12.5px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-dot.active { color: var(--success); }
.status-dot.invited { color: var(--warning); }
.status-dot.suspended { color: var(--danger); }
.status-dot.review { color: var(--accent-text); }

/* City Tour у CRM (2026-10-23): підсумок туру «показник × період» і загальний список бронювань */
.tour-scroll { overflow-x: auto; }
/* Підрядки й email клієнта — text-2: на 12px text-3 не тримає контраст AA, а email — головний ідентифікатор клієнта. */
.tour-sub { display: block; font-size: 12px; color: var(--text-2); }
.cellname.tour-client > div > span { color: var(--text-2); }
.iris-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-summary-table thead th:not(:first-child), .tour-summary-table td { text-align: right; }
.tour-summary-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-summary-table thead th:nth-child(2) { color: var(--accent-text); }
.tour-summary-table col.is-today { background: var(--accent-tint); }
.tour-summary-table th[scope="row"] { position: sticky; left: 0; z-index: 1; min-width: 150px; padding: 11px 18px; text-align: left; font-size: 13.5px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--line-faint); }
.tour-summary-table tbody tr:last-child th[scope="row"] { border-bottom: none; }
.tour-summary-table tbody tr:hover th[scope="row"] { background: var(--surface-3); }
.iris-table.tour-summary-table tr.group th { padding: 16px 18px 6px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text); }
/* Базові ширини iris-table (44/27/19/10 %) сильніші за .auto — у таблицях туру ширину задають колонки й зміст. */
.iris-table.tour-summary-table :is(thead th, tbody td):nth-child(n), .iris-table.tour-bookings-table :is(thead th, tbody td):nth-child(n),
.iris-table.tour-interests-table :is(thead th, tbody td):nth-child(n) { width: auto; }
.iris-table.tour-interests-table :is(thead th, tbody td):nth-child(4) { text-align: left; }
.tour-summary-table col:not(:first-child) { width: 16%; }
.tour-summary-table tbody + tbody tr.group th { border-top: 1px solid var(--line); }
.tour-summary-table tbody tr.group:hover { background: none; }
.tour-summary-hint { margin: 0; padding: 12px 18px 14px; }
.tour-filters { max-width: none; }
.tour-filters-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
/* Базові правила iris-table вирівнюють 4-ту колонку праворуч — у списку бронювань це «Клієнт». */
.iris-table.tour-bookings-table thead th:nth-child(4), .iris-table.tour-bookings-table tbody td:nth-child(4) { text-align: left; }
.iris-table th.num { text-align: right; }
.page-head .actions.tour-actions { flex-wrap: wrap; }
@media (max-width: 720px) { .tour-filters-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Лист «нові дати» людям із «Хочу ще» у виїзді (2026-10-29): кнопка, пояснення й журнал розсилок під цифрами. */
#interest-notice { margin-bottom: 16px; }
.tour-notice-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 18px 16px; }
.tour-notice-form { margin: 0; }
.tour-notice-body .hint { margin: 0; }
.tour-notice-log-title { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.tour-notice-body .plain-list { margin: 0; }
/* Блок «Пісочниця» в картці виїзду (2026-11-19, DECISIONS №26): стан плитками, дії в ряд — одна суцільна (тестові броні);
   на вузькому екрані дії стають стовпцем на всю ширину. Кольори — лише наявні токени. */
#sandbox { margin-bottom: 16px; }
#sandbox .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#sandbox .kpi .value { font-size: 17px; }
#sandbox .kpi .value[data-sandbox-days] { white-space: nowrap; font-size: 16px; }
#sandbox .kpi.is-zero .value { color: var(--text-3); font-weight: 500; }
#sandbox .kpi.is-alert { background: var(--warning-tint); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
#sandbox .kpi.is-alert .value { color: var(--warning); }
.sandbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sandbox-seed { display: flex; align-items: center; gap: 8px; margin: 0; }
.sandbox-seed .tselect { width: 76px; }
.sandbox-problem { margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--text); font-size: 13.5px; line-height: 1.5; }
.sandbox-intro { margin: 0; max-width: 68ch; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
h1 > .pill[data-sandbox-badge] { vertical-align: middle; margin-left: 6px; }
@media (max-width: 720px) { #sandbox .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .sandbox-actions, .sandbox-actions > form { width: 100%; }
  .sandbox-actions > form .btn { width: 100%; }
  .sandbox-seed .btn { flex: 1; width: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .ribbon { grid-template-columns: repeat(2, 1fr); }
  .ribbon .cell:nth-child(2) { border-right: none; }
  .ribbon .cell:nth-child(1), .ribbon .cell:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  /* Мобільне меню (2026-10-30): бічна панель — шухляда зліва; відкрита — під нею затемнення, решта сторінки inert. */
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); height: 100dvh; z-index: 60; transform: translateX(-100%);
    visibility: hidden; transition: transform 260ms cubic-bezier(.32, .72, 0, 1), visibility 0s linear 260ms; box-shadow: none; overflow-y: auto; }
  .app.nav-open .sidebar { transform: none; visibility: visible; transition: transform 260ms cubic-bezier(.32, .72, 0, 1), visibility 0s;
    box-shadow: 18px 0 48px rgba(0, 0, 0, .55); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .app.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex; flex: none; }
  .content { padding: 20px 18px 48px; }
  .search { width: 100%; }
}

/* Політика вмісту (Налаштування) */
.csp-kpis { padding-bottom: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.csp-mode { font-size: 18px; }
.csp-reports { margin-top: 16px; }
.panel-empty { padding: 14px 18px; }

/* Навчання */
.panel-gap { margin-top: 16px; }
.panel-top { align-self: start; }
.panel-form { padding: 18px; }
.panel-actions { display: flex; gap: 10px; padding: 4px 18px 18px; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.course-card { display: block; padding: 18px; border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color var(--dur-1) var(--ease); }
.course-card:hover { border-color: var(--line-strong); }
.course-card h3 { margin: 12px 0 6px; font-size: 16px; font-weight: 600; }
.course-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.course-kind { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.course-deadline { margin: 10px 0 0; font-size: 13px; color: var(--text-2); min-height: 18px; }
.lesson-list { margin: 0; padding: 6px 18px 12px 38px; }
.lesson-list li { padding: 7px 0; }
.lesson-list li .pill { margin-left: 8px; }
.lesson { margin-top: 16px; }
.lesson-body { padding: 20px 22px 8px; max-width: 760px; font-size: 14.5px; line-height: 1.6; }
.lesson-body .doc .doc-h2 { font-size: 15px; }
.lesson-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 6px 22px 20px; }
.quiz { display: grid; gap: 14px; max-width: 820px; }
.quiz-question { margin: 0; padding: 18px 20px; }
.quiz-question legend { float: left; width: 100%; font-weight: 600; font-size: 14.5px; margin-bottom: 12px; padding: 0; }
.quiz-number { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; margin-right: 6px; border-radius: 999px; background: var(--surface-3); font-size: 12px; }
.quiz-option { clear: both; display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-size: 14px; }
.quiz-option input { margin-top: 3px; accent-color: var(--accent); }
.attempt-kpis { padding-bottom: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attempt-answers { margin-top: 16px; }
.answer-list { margin: 0; padding: 8px 18px 14px 40px; }
.answer-list > li { padding: 10px 0; border-bottom: 1px solid var(--line-faint); }
.answer-list > li:last-child { border-bottom: 0; }
.answer-list p { margin: 4px 0 0; }
.option-list { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.option-list .is-correct { color: var(--success); font-weight: 600; }
.problem-list { margin: 0; padding: 10px 18px 16px 36px; }
.problem-list li { padding: 4px 0; }
.publish-form { padding: 0 18px 18px; }
.locale-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 0 0 16px; }
.locale-block legend { padding: 0 8px; font-weight: 600; }
.mono-area { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 13px; line-height: 1.5; min-height: 320px; }
/* Поле пароля з кнопкою «показати» */
.pw-wrap { position: relative; }
.pw-wrap .tinput.has-toggle { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; border-radius: var(--r-sm, 8px); background: transparent; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); background: var(--surface-2, rgba(255,255,255,.06)); outline: none; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off, .pw-toggle.is-on .eye { display: none; }
.pw-toggle.is-on .eye-off { display: block; }

.plain-list { margin: 0 0 14px; padding-left: 20px; }
.plain-list li { margin: 0 0 6px; }

/* База знань («Довідка») */
.knowledge-search { display: flex; gap: 10px; margin-bottom: 14px; }
.knowledge-search .tinput { flex: 1; }
.knowledge-list { list-style: none; margin: 0; padding: 0; }
.knowledge-list li { padding: 11px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.knowledge-list li:last-child { border-bottom: 0; }
.knowledge-body { max-width: 760px; }
/* «Знання» в Iris Bot (2026-11-07, docs/KNOWLEDGE_BASE.md §5.1): рядки статей з описом і тегами, стан — лише редакторам
 * (застарілу бачать усі). Посилання [[Назва]] в тексті — лавандові; зламані — пунктиром, без кліку; архівні — сірі. */
.kb-panel { padding: 16px 18px 6px; }
.knowledge-search.kb-search { margin-bottom: 12px; }
.kb-statuses { margin: 0 0 12px; flex-wrap: wrap; }
.kb-count { font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.kb-tags, .kb-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.iris .kb-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-full);
  font-size: 12.5px; color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.iris a.kb-tag:hover { background: var(--surface-3); color: var(--text); }
a.kb-tag:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.iris .kb-tag.is-on { background: var(--accent-tint); border-color: color-mix(in srgb, var(--violet-400) 45%, transparent); color: var(--text); }
.iris .kb-tag.is-static { height: 22px; font-size: 11.5px; border-color: var(--line); }
.kb-filter-note { font-size: 13px; color: var(--text-2); margin: 4px 0 8px; }
.kb-list { list-style: none; margin: 8px 0 0; padding: 0; }
.kb-list li { padding: 13px 0 12px; border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.kb-list li:last-child { border-bottom: 0; }
.kb-list li.is-archived .kb-title { color: var(--text-2); }
.kb-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.kb-title { font-weight: 600; font-size: 14.5px; color: var(--text); }
.kb-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.kb-title:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 2px var(--focus-ring); }
.kb-summary { font-size: 13px; color: var(--text-2); line-height: 1.5; max-width: 80ch; }
.kb-row-tags { margin: 2px 0 0; }
.kb-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--text); font-size: 13.5px; line-height: 1.5; max-width: 90ch; }
.kb-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.kb-meta { position: sticky; top: 82px; padding: 16px 18px; }
.kb-meta dl { display: grid; gap: 4px; margin: 0; }
.kb-meta dt { font-size: 12px; font-weight: 560; color: var(--text-2); margin-top: 10px; }
.kb-meta dt:first-child { margin-top: 0; }
.kb-meta dd { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.kb-due { display: block; font-size: 12px; color: var(--text-2); }
.kb-due.is-late { color: var(--warning); }
.kb-plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.iris .kb-meta dd a:not(.kb-tag) { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.iris .kb-meta dd a:not(.kb-tag):hover { text-decoration-color: currentColor; }
.iris .kb-meta dd a:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 2px var(--focus-ring); }
.kb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.iris .kb-link { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 2px; }
.iris a.kb-link:hover { text-decoration-color: currentColor; }
a.kb-link:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 2px var(--focus-ring); }
.iris .kb-link.is-broken { color: var(--text-2); text-decoration-style: dashed; text-decoration-color: var(--text-3); cursor: help; }
.iris .kb-link.is-hidden { color: inherit; text-decoration: none; }
.iris .kb-link.is-archived { color: var(--text-2); }
.kb-fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px 14px; margin: 14px 0; }
.kb-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 560; color: var(--text-2); }
.kb-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.kb-multi { min-height: 96px; }
.kb-revisions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kb-revisions details { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; }
.kb-revisions summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; }
.kb-revisions summary:focus-visible { outline: none; border-radius: 6px; box-shadow: 0 0 0 2px var(--focus-ring); }
.kb-rev-number { font-weight: 600; font-variant-numeric: tabular-nums; }
.kb-rev-body { margin: 12px 0; }
.kb-rev-body h2 { font-size: 16px; margin-bottom: 6px; }
.kb-kpis { padding-bottom: 14px; }
.kb-decided { margin-top: 14px; }
.kb-reject { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.kb-reject label { width: 100%; }
.kb-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.kb-panel .panel-title { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.kb-rank { list-style: decimal; margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }
.kb-rank li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.kb-rank li { padding-left: 2px; }
.kb-rank li > :first-child { margin-right: 8px; }
.kb-rank a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.kb-todo { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 10px; font-size: 13.5px; }
.kb-todo dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
@media (max-width: 960px) { .kb-page { grid-template-columns: 1fr; } .kb-meta { position: static; } }
/* «Знання → Граф» (етап 5, docs/KNOWLEDGE_BASE.md §5.2). Вигляд — як граф Obsidian зі знімка власника (2026-11-09): чорне
 * полотно, дрібні світлі крапки статей (розмір — цитування), волосяні напівпрозорі ребра лавандою брендбуку, тьмяні крапки
 * зламаних посилань, підписи — лише з наближенням або під курсором. Cytoscape читає змінні --kb-graph-* під час побудови,
 * тож значення — готові кольори, без rgba і color-mix. Світла тема — `:root[data-theme="light"]` (перемикача ще немає). */
.kb-graph {
  --kb-graph-bg:var(--bg); --kb-graph-label:#A6A6AD; --kb-graph-label-hi:#F5F5F7;
  --kb-graph-article:#C9C9D1; --kb-graph-article-hi:var(--violet-300); --kb-graph-archived:#6E6E76;
  --kb-graph-tag:var(--violet-500); --kb-graph-model:#3A9A98; --kb-graph-broken:#45454C;
  --kb-graph-edge:var(--violet-700); --kb-graph-link:var(--violet-600); --kb-graph-edge-hi:var(--violet-400);
  position: relative; margin: 6px 0 0;
}
:root[data-theme="light"] .kb-graph {
  --kb-graph-bg:#F6F5F2; --kb-graph-label:#55524C; --kb-graph-label-hi:#0B0B0C;
  --kb-graph-article:#55524C; --kb-graph-article-hi:var(--violet-700); --kb-graph-archived:#A9A69F;
  --kb-graph-tag:var(--violet-600); --kb-graph-model:#157171; --kb-graph-broken:#C9C6BF;
  --kb-graph-edge:var(--violet-300); --kb-graph-link:var(--violet-400); --kb-graph-edge-hi:var(--violet-600);
}
.kb-graph-canvas { height: clamp(420px, calc(100vh - 330px), 760px); background: var(--kb-graph-bg); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.kb-graph-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 13px; color: var(--text-2); pointer-events: none; }
.kb-graph[data-state="error"] .kb-graph-status { color: var(--text); padding: 0 24px; text-align: center; }
.kb-graph-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); overflow: hidden; }
.kb-graph:not([data-state="ready"]) .kb-graph-zoom { display: none; }
.iris .kb-graph-zoom button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--text-2); }
.iris .kb-graph-zoom button + button { border-top: 1px solid var(--line); }
.iris .kb-graph-zoom button:hover { color: var(--text); background: var(--surface-3); }
.iris .kb-graph-zoom button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus-ring); }
.kb-graph-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kb-graph-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
.kb-graph-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; padding: 0; font-size: 12.5px; color: var(--text-2); }
.kb-graph-legend li { display: inline-flex; align-items: center; gap: 7px; }
.kb-graph-key { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C9C9D1; }
.kb-graph-legend .kb-graph-key.is-tag { width: 6px; height: 6px; background: var(--violet-500); }
.kb-graph-legend .kb-graph-key.is-model { background: none; box-shadow: inset 0 0 0 1.4px #3A9A98; }
.kb-graph-legend .kb-graph-key.is-broken { width: 6px; height: 6px; background: #45454C; }
.kb-graph-legend .kb-graph-key.is-archived { background: #6E6E76; }
.kb-graph-text { margin: 10px 0 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.kb-graph-text summary { cursor: pointer; font-size: 13.5px; font-weight: 560; color: var(--text-2); padding: 4px 0; width: fit-content; }
.kb-graph-text summary:hover { color: var(--text); }
.kb-graph-text summary:focus-visible { outline: none; border-radius: 6px; box-shadow: 0 0 0 2px var(--focus-ring); }
.kb-graph-facts { display: grid; gap: 2px; margin: 0; font-size: 13px; color: var(--text-2); }
.kb-graph-facts > div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.kb-graph-facts dt { color: var(--text-3); }
.kb-graph-facts dt::after { content: ":"; }
.kb-graph-facts dd { margin: 0; overflow-wrap: anywhere; }
.iris .kb-graph-facts a { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 2px; }
.iris .kb-graph-facts a:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 2px var(--focus-ring); }
@media (max-width: 720px) { .kb-graph-canvas { height: 62vh; min-height: 360px; } }

/* Машинний переклад у формах документів і курсів */
.translate-panel { margin: 10px 0 4px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-md); }
.translate-panel .hint { margin: 8px 0 0; }
.translate-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.translate-row .form-field { margin: 0; min-width: 180px; }
.translate-status { margin: 8px 0 0; font-size: 13px; color: var(--text-2); min-height: 1em; }
.translate-status.is-error { color: var(--danger); }
.review-line[hidden] { display: none; }
.format-help { margin-bottom: 16px; }
.format-help summary { cursor: pointer; color: var(--text-2); }
.format-help pre { margin: 10px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 12.5px; white-space: pre-wrap; }
.results-filter { margin-left: 0; }
.training-block { padding: 6px 0 4px; }
.training-block p { margin: 0 0 10px; }

/* Чат підтримки (CRM_SPEC §14): стрічка повідомлень, відповідь HQ праворуч, службові рядки по центру. */
.support-chat { display: flex; flex-direction: column; gap: 10px; padding: 18px; max-height: 60vh; overflow-y: auto; }
.support-msg { display: flex; align-items: flex-start; gap: 8px; max-width: 72%; }
.support-msg.is-hq { align-self: flex-end; flex-direction: row-reverse; }
.support-msg.is-system { align-self: center; max-width: 90%; }
.support-msg.is-system .support-bubble { background: transparent; border: 1px dashed var(--line); color: var(--text-3); font-size: 12.5px; text-align: center; }
.support-bubble { background: var(--surface-3); border: 1px solid var(--line-faint); border-radius: var(--r-lg); padding: 10px 14px; font-size: 13.5px; line-height: 1.5; }
.support-msg.is-hq .support-bubble { background: var(--accent-tint, var(--surface-3)); }
.support-msg.is-resolved .support-bubble { border-color: var(--success); }
.support-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.support-meta b { color: var(--text-2); font-weight: 600; }
.support-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.support-photo { display: block; max-width: 320px; max-height: 320px; border-radius: var(--r-md); margin-bottom: 6px; }
.support-pick { padding-top: 12px; }
.support-resolve-bar { display: flex; gap: 10px; padding: 0 18px 10px; }
.support-resolve-bar .tinput { max-width: 420px; }
.support-resolve > .hint { padding: 0 18px 16px; }
.support-reply { margin-top: 18px; padding: 18px; }
.iris-table tr.is-unread td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* HR — черга «Потребує дії» (редизайн 2026-10-20): один рядок на привід, лише цифри; люди — у «Команді» за фільтром.
   Колір — лише крапка й текст строку. */
.hr-queue { margin-bottom: 22px; }
.hr-queue-list { list-style: none; margin: 0; padding: 4px 0; }
.hr-queue-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line-faint); }
.hr-queue-row:first-child { border-top: none; }
.hr-queue-count { width: 34px; height: 34px; border-radius: var(--r-full); background: var(--surface-3); display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--text); flex: none; font-variant-numeric: tabular-nums; }
.hr-queue-row.overdue .hr-queue-count { color: var(--danger); background: var(--danger-tint); }
.hr-queue-row.soon .hr-queue-count { color: var(--warning); background: var(--warning-tint); }
.hr-queue-text { min-width: 0; flex: 1; font-size: 14px; }
.hr-queue-text strong { font-weight: 600; overflow-wrap: anywhere; }
.hr-queue-due { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hr-queue-due::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: .6; }
.hr-queue-row.soon .hr-queue-due { color: var(--warning); }
.hr-queue-row.soon .hr-queue-due::before { background: var(--warning); opacity: 1; }
.hr-queue-row.overdue .hr-queue-due { color: var(--danger); }
.hr-queue-row.overdue .hr-queue-due::before { background: var(--danger); opacity: 1; }
.hr-queue-row .btn { flex: none; }
.hr-queue-empty { padding: 36px 18px 40px; text-align: center; }
.hr-queue-empty p { font-size: 15px; font-weight: 600; color: var(--text); }
.hr-queue-empty span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-3); }
.ribbon a.cell { color: inherit; transition: background var(--dur-1) var(--ease); }
.ribbon a.cell:hover { background: var(--surface-3); }
.ribbon a.cell:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.team-filter { overflow-x: auto; }
.team-filter .segmented a { white-space: nowrap; }
@media (pointer: coarse) { .hr-queue-row .btn { min-height: 44px; } }
@media (max-width: 720px) {
  .hr-queue-row { flex-wrap: wrap; }
  .hr-queue-text { flex-basis: calc(100% - 48px); }
  .hr-queue-due { margin-left: 48px; }
  .hr-queue-row .btn { margin-left: auto; }
}

/* Сторінка людини (редизайн 2026-10-21, рішення власника: шапка + вкладки). Вкладки — посилання з ?tab=, усі розділи
   рендеряться, неактивні сховано атрибутом hidden; стан — в адресі. */
.member-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; flex-wrap: wrap; }
.member-hero .who { min-width: 0; flex: 1; }
.member-hero .who h2 { font-size: 20px; font-weight: 640; letter-spacing: -.02em; }
.member-hero .who .line { color: var(--text-2); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.member-hero .who .role-badges { margin-top: 8px; }
.member-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.member-kpis .cell { padding: 14px 20px; border-right: 1px solid var(--line); }
.member-kpis .cell:last-child { border-right: none; }
.member-kpis .k { font-size: 12px; color: var(--text-2); }
.member-kpis .v { font-size: 22px; font-weight: 620; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.member-kpis .v small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.member-tabs { display: flex; gap: 2px; margin: 18px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.member-tabs a { padding: 10px 14px; font-size: 13.5px; font-weight: 550; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.member-tabs a:hover { color: var(--text); }
.member-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.member-tabs a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--r-sm); }
.member-tabs a .n { margin-left: 6px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.member-tab > .panel + .panel, .member-tab > .panel + section { margin-top: 16px; }
/* «Історія змін» людини (2026-11-01): період як у «Графіку», підсумки, розхідники й місця, список змін — кожна розгортається. */
.history-bar .cal-arrow.off { opacity: .35; }
.history-range { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; margin-left: auto; }
.history-range label { display: grid; gap: 4px; font-size: 12px; color: var(--text-3); }
.history-range .tinput { width: auto; }
.history-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 28px; padding: 14px 18px 16px; border-top: 1px solid var(--line-faint); margin-top: 10px; }
.history-split h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.history-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.history-dl dt { color: var(--text-3); }
.history-dl dd { margin: 0; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.history-dl dd.strong { font-weight: 650; }
.history-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.history-places li { display: flex; justify-content: space-between; gap: 12px; }
.history-places .num { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-list { max-height: min(70vh, 720px); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line-faint); }
.history-shift { border-bottom: 1px solid var(--line-faint); }
.history-shift > summary { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 7.5em 5em 6.5em 6.5em 16px; align-items: center; gap: 12px;
  padding: 11px 18px; cursor: pointer; list-style: none; font-size: 13.5px; transition: background var(--dur-1) var(--ease); }
.history-shift > summary::-webkit-details-marker { display: none; }
.history-shift > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg); transition: transform var(--dur-1) var(--ease); justify-self: end; }
.history-shift[open] > summary::after { transform: rotate(-135deg); }
.history-shift > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.history-shift .day { font-variant-numeric: tabular-nums; color: var(--text); }
.history-shift .where { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-shift .num, .history-shift .time { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-shift[open] > summary { background: var(--surface-1); }
.history-shift > .history-dl { padding: 4px 18px 12px; max-width: 520px; }
.history-open { margin: 0; padding: 0 18px 14px; }
@media (hover: hover) and (pointer: fine) { .history-shift > summary:hover { background: var(--surface-1); } }
@media (max-width: 760px) {
  .history-shift > summary { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
  .history-shift > summary .day { flex: 1 1 auto; }
  .history-shift > summary .where { order: 9; flex-basis: 100%; color: var(--text-2); }
  .history-shift > summary .time, .history-shift > summary .num.subtle { display: none; }
  .history-range { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .history-shift > summary, .history-shift > summary::after { transition: none; } }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.summary-card { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.summary-card:hover { border-color: var(--line-strong); background: var(--surface-3); }
.summary-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.summary-card h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.summary-card .big { font-size: 22px; font-weight: 620; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.summary-card .big small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.summary-card .rows { margin-top: 10px; display: grid; gap: 5px; font-size: 13px; color: var(--text-2); }
.summary-card .rows span { display: flex; justify-content: space-between; gap: 10px; }
.summary-card .rows b { color: var(--text); font-weight: 560; }
.summary-card .sev.warning { color: var(--warning); }
.summary-card .sev.danger { color: var(--danger); }
.summary-card .sev.ok { color: var(--success); }
.member-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.member-efficiency { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px 18px 16px; }
@media (max-width: 960px) { .member-grid, .chart-pair { grid-template-columns: 1fr; } }

/* Архів компанії (2026-10-21): теки ліворуч, список праворуч; картка документа — два стовпці. */
.sev.danger { color: var(--danger); }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.panel-body-pad { padding: 16px 18px 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.archive-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.archive-folders { padding: 8px; position: sticky; top: 16px; }
.archive-folder { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); color: var(--text-2); font-size: 13.5px; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.archive-folder:hover { background: var(--surface-3); color: var(--text); }
.archive-folder.on { background: var(--accent-tint); color: var(--text); }
.archive-folder .n { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.archive-folder.on .n { color: var(--accent-text); }
.archive-folder:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.archive-folder-form { display: grid; gap: 6px; padding: 10px 4px 4px; border-top: 1px solid var(--line-faint); margin-top: 6px; }
.archive-form .tinput[type="file"] { padding: 7px 12px; height: auto; }
.archive-version-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line-faint); align-items: center; }
.archive-version-form .tinput[type="file"] { padding: 7px 12px; height: auto; }
.iris-table tr.is-current td { background: var(--accent-tint); }
@media (max-width: 960px) {
  .archive-layout { grid-template-columns: 1fr; }
  .archive-folders { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .archive-folder-form { flex-basis: 100%; }
  .field-row, .archive-version-form { grid-template-columns: 1fr; }
}

/* Огляд людини (2026-10-21): піктограма в картці, кільце прогресу навчання (синій з палітри даних), міні-графік каси
   за 6 місяців (смарагдовий); піктограми у вкладках. */
.member-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.member-tabs a svg { width: 16px; height: 16px; stroke-width: 1.7; opacity: .8; flex: none; }
.member-tabs a[aria-current="page"] svg { opacity: 1; color: var(--accent-text); }
.summary-card .head { display: flex; align-items: center; gap: 10px; }
.summary-card .ic { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.summary-card .ic svg { width: 16px; height: 16px; stroke-width: 1.7; }
.summary-card[data-card="metrics"] .ic { color: var(--data-1); background: color-mix(in srgb, var(--data-1) 14%, transparent); }
.summary-card[data-card="training"] .ic { color: var(--data-2); background: color-mix(in srgb, var(--data-2) 14%, transparent); }
.summary-card[data-card="bookings"] .ic { color: var(--data-3); background: color-mix(in srgb, var(--data-3) 14%, transparent); }
.summary-card .ring-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.summary-card .ring-row .big { margin-top: 0; }
.progress-ring { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.progress-ring .track { fill: none; stroke: var(--line-strong); stroke-width: 4; }
.progress-ring .value { fill: none; stroke: var(--data-2); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 - 113.1 * var(--p, 0) / 100); transition: stroke-dashoffset var(--dur-3) var(--ease); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 10px; }
.spark i { flex: 1; height: max(var(--h, 0%), 3%); background: var(--metric-cash); border-radius: 2px 2px 0 0; opacity: .85; }
.spark i:last-child { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .progress-ring .value { transition: none; } }

/* Документи компанії — хаб із розгортанням версій на місці (рішення власника 2026-10-23). Стилі тієї самої системи,
   що картка учасника й HR: поверхні, лінії, статус-крапки, акцент лише на інтерактиві. */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-search { display: flex; align-items: center; gap: 9px; background: var(--surface-input); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 12px; margin-bottom: 4px; }
.doc-search svg { width: 16px; height: 16px; stroke-width: 1.8; color: var(--text-3); flex: none; }
.doc-search input { border: none; background: none; outline: none; color: var(--text); font-size: 13.5px; padding: 10px 0; width: 100%; }
.doc-search input::placeholder { color: var(--text-3); }

.doc-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--dur-1) var(--ease); }
.doc-card[open] { border-color: var(--line-strong); }
.doc-card > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px 14px; padding: 15px 18px; }
.doc-card > summary::-webkit-details-marker { display: none; }
.doc-card > summary:hover { background: var(--surface-3); }
.doc-card > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.doc-head .chev { display: grid; place-items: center; color: var(--text-3); }
.doc-head .chev svg { width: 17px; height: 17px; stroke-width: 2; transition: transform var(--dur-1) var(--ease); }
.doc-card[open] .chev svg { transform: rotate(90deg); }
.doc-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-title b { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.doc-title .subtle { font-size: 12.5px; }
.doc-meta { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.doc-edition { font-size: 12.5px; color: var(--text-3); }
.doc-count { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.doc-count .n { color: var(--text); font-weight: 620; font-variant-numeric: tabular-nums; }

.doc-body { border-top: 1px solid var(--line); padding: 4px 6px 6px; }
.doc-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; }
.doc-bar-new { margin-left: auto; }

/* Версії документа — таблиця з фіксованими колонками: усе вирівняно, кожна дата на своєму місці (рішення власника 2026-10-23). */
.version-table-wrap { overflow-x: auto; padding: 2px 4px 6px; }
.version-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.version-table thead th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom; line-height: 1.25; }
.version-table thead th.c-acc { max-width: 110px; white-space: normal; }
.version-table tbody td { padding: 10px 10px; border-bottom: 1px solid var(--line-faint); vertical-align: middle; white-space: nowrap; }
.version-table tbody tr:last-child td { border-bottom: none; }
.version-table tbody tr.is-current td { background: color-mix(in srgb, var(--success) 7%, transparent); }
.version-table tbody tr.is-current td:first-child { border-top-left-radius: var(--r-sm); border-bottom-left-radius: var(--r-sm); }
.version-table tbody tr.is-current td:last-child { border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
.version-table .c-ver { display: flex; align-items: center; gap: 9px; }
.version-table .vt-label { font-weight: 600; }
.version-table .c-ed { color: var(--text-2); }
.version-table td.c-acc { font-variant-numeric: tabular-nums; color: var(--text-2); }
.version-table .c-dl, .version-table .c-act { text-align: right; }
.dv-tag { font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); border-radius: 999px; padding: 1px 7px; }
.dv-langs { display: inline-flex; gap: 4px; }
.lang-chip { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; color: var(--text-2); background: var(--surface-3); border-radius: 4px; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.doc-export { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 2px; background: var(--surface-input); }
.doc-export .dx { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); padding: 4px 7px; border-radius: 7px; transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.doc-export .dx:hover { color: var(--text); background: var(--surface-3); }
.doc-export .dx:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

.doc-empty { padding: 16px 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.doc-none { text-align: center; color: var(--text-3); font-size: 13px; padding: 24px; }

@media (max-width: 720px) {
  .doc-card > summary { grid-template-columns: 20px 1fr; }
  .doc-meta, .doc-count { grid-column: 2; justify-self: start; }
  .doc-version { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-head .chev svg { transition: none; }
}

/* Реєстр сторонніх ліцензій (2026-11-07, лише HQ): факти версії, розділи по продуктах тими самими картками, що хаб
   документів. Виділено лише «Needs attention» — межа кольору попередження (без кольорової смуги зліва, DESIGN.md);
   короткі рядки компонентів — колонками. */
.lr-auto-hint { color: var(--text-2); font-size: 13px; max-width: 72ch; margin: 0 0 16px; }
.doc-bar .lr-auto-hint { margin: 0; font-size: 12.5px; }
.lr-stale { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--text); font-size: 13px; }
.lr-stale a { color: var(--accent-text); margin-left: 6px; }
.lr-facts-panel { margin-bottom: 14px; }
.lr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); gap: 14px 36px; padding: 16px 18px; }
.lr-facts dt { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.lr-facts dd { font-size: 13.5px; color: var(--text); }
.lr-facts .lr-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.lr-facts .lr-sha { grid-column: 1 / -1; min-width: 0; }
.lr-facts .lr-sha code { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.lr-intro { padding: 0 18px 16px; color: var(--text-2); max-width: 80ch; }
.lr-intro .doc p:last-child { margin-bottom: 0; }
.lr-section > summary { grid-template-columns: 22px 1fr auto; }
.lr-section .doc-count { color: var(--text-2); font-variant-numeric: tabular-nums; }
.lr-section.is-attention { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.lr-section.is-attention .doc-title .subtle { color: var(--warning); }
.lr-body { padding: 10px 14px 6px; content-visibility: auto; contain-intrinsic-size: auto 480px; }
.lr-body .doc .doc-h3 { color: var(--text-2); }
.lr-body .doc li { margin-bottom: 4px; }
.lr-body.is-compact .doc ul { columns: 3 280px; column-gap: 32px; }
.lr-body.is-compact .doc li { break-inside: avoid; font-size: 12.5px; margin-bottom: 2px; }
.lr-body .doc code { font-family: var(--font-mono); font-size: .92em; color: var(--text-2); }
.lr-body .doc-table { overflow-x: auto; margin: 0 0 12px; }
.lr-body .doc-table table { border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.lr-body .doc-table th, .lr-body .doc-table td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid var(--line-faint); }
.lr-body .doc-table thead th { color: var(--text-2); font-weight: 600; border-bottom-color: var(--line); }
@media (max-width: 720px) {
  .lr-section > summary { grid-template-columns: 20px 1fr; }
  .lr-facts { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
}


/* Шапка (рішення власника 2026-10-23): хлібні крихти зліва — верхній рядок не порожній на жодній сторінці; справа живий
   статус змін. Рух лише там, де він щось означає: пульс «зараз працює» (стан) і одна поява плиток (без ривка). */

.live-now { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--text); font-size: 12.5px; font-weight: 560; white-space: nowrap; transition: background var(--dur-1) var(--ease); }
.live-now:hover { background: color-mix(in srgb, var(--success) 17%, transparent); }
.live-now:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.live-dot { position: relative; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--success); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--success); animation: live-ping 2s cubic-bezier(.23, 1, .32, 1) infinite; }
@keyframes live-ping { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
.offline .live-dot, .offline .live-dot::after { background: var(--warning); }

/* Плитки точок: поява одним рухом (ease-out, 35 мс між сусідами, не більше 12 кроків); fill backwards — після появи
   діє звичайний hover. Жива точка — зелена рамка й смужка зміни; ПК не на зв'язку — бурштин. */
.point-tile { transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), transform var(--dur-2) cubic-bezier(.23, 1, .32, 1);
  animation: tile-rise .3s cubic-bezier(.23, 1, .32, 1) backwards; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
@keyframes tile-rise { from { opacity: 0; transform: translateY(6px); } }
@media (hover: hover) and (pointer: fine) { .point-tile:hover { transform: translateY(-2px); } }
.point-tile.is-live { border-color: color-mix(in srgb, var(--success) 38%, var(--line)); }
.point-tile.is-live:has(.tile-live.offline) { border-color: color-mix(in srgb, var(--warning) 38%, var(--line)); }

.tile-live { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--success) 9%, transparent); border: 1px solid color-mix(in srgb, var(--success) 22%, transparent); }
.tile-live.offline { background: color-mix(in srgb, var(--warning) 9%, transparent); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.tile-live .avatar { width: 26px; height: 26px; font-size: 11px; }
.tile-live .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tile-live .who b { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-live .who span { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tile-counters { margin-left: auto; display: flex; gap: 10px; flex: none; }
.tile-counters span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.tile-counters svg { width: 14px; height: 14px; stroke-width: 1.8; opacity: .75; }
.tile-counters b { font-weight: 620; color: var(--text); font-variant-numeric: tabular-nums; }
.list-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }

@media (max-width: 720px) {
    .live-now span:last-child { display: none; }
  .live-now { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .point-tile { animation: tile-fade .2s ease backwards; }
  @keyframes tile-fade { from { opacity: 0; } }
  .live-dot::after { display: none; }
  .point-tile:hover { transform: none; }
}

/* ===== Сторінка точки (редизайн 2026-10-23) ===== */
.point-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.point-head .point-live { height: 26px; font-size: 12px; padding: 0 10px; }

/* Вкладки: жирніші, з іконками; підкреслення активної плавно перетікає між вкладками (View Transitions у Turbo). */
.point-tabs { display: flex; gap: 4px; margin: 4px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.point-tabs::-webkit-scrollbar { display: none; }
.iris .point-tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px 13px; font-size: 14.5px; font-weight: 620;
  letter-spacing: -.01em; color: var(--text-2); white-space: nowrap; border-radius: var(--r-md) var(--r-md) 0 0;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.iris .point-tabs a svg { width: 17px; height: 17px; stroke-width: 1.8; opacity: .75; transition: opacity var(--dur-1) var(--ease); }
@media (hover: hover) and (pointer: fine) { .iris .point-tabs a:hover { color: var(--text); background: var(--surface-2); } }
.iris .point-tabs a.on { color: var(--text); }
.iris .point-tabs a.on svg { opacity: 1; color: var(--accent-text); }
.iris .point-tabs a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.point-tabs .ink { position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--accent); view-transition-name: point-tab-ink; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
::view-transition-group(point-tab-ink) { animation-duration: .3s; animation-timing-function: cubic-bezier(.23, 1, .32, 1); }

/* Живий банер дашборда — хто на зміні зараз і лічильники з пульсу ПК. */
.live-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--success) 9%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  animation: tile-rise .3s cubic-bezier(.23, 1, .32, 1) backwards; }
.live-banner.offline { background: color-mix(in srgb, var(--warning) 9%, var(--surface-2)); border-color: color-mix(in srgb, var(--warning) 32%, transparent); }
.live-banner .avatar { width: 34px; height: 34px; }
.lb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lb-who b { font-size: 14.5px; font-weight: 620; }
.lb-who span { font-size: 12.5px; color: var(--text-2); }
.lb-counters { margin-left: auto; display: flex; gap: 22px; }
.lb-counters div { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.lb-counters b { font-size: 22px; font-weight: 640; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lb-counters span { font-size: 11.5px; color: var(--text-3); }

/* Головні показники: велика сума, що набігає; зміна проти того самого проміжку минулого періоду — зелена / червона. */
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.hero-stat { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line);
  animation: tile-rise .34s cubic-bezier(.23, 1, .32, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.hs-label { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.hs-value { font-size: 32px; font-weight: 660; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--text); }
.hs-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.hs-versus { color: var(--text-3); }
.hs-meta { color: var(--text-3); margin-left: auto; }
.stat-delta { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 640; font-variant-numeric: tabular-nums; }
.stat-delta.up { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.stat-delta.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.stat-delta.flat { color: var(--text-3); background: var(--surface-3); }

.chart-panel { margin-bottom: 16px; }
/* Дві колонки лише коли кожна має ≥ 560 px — інакше «Хто працював» ламав імена на два рядки. */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 16px; align-items: start; }
.shift-list { list-style: none; margin: 0; padding: 4px 6px 8px; }
.shift-list li { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); font-size: 13.5px; }
.shift-list li + li { border-top: 1px solid var(--line-faint); border-radius: 0; }
.shift-list .sl-cash { font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; }

/* Паспорт, живлення й люди — згорнуто внизу (рішення власника: на дашборді — показники). */
.point-more { margin-top: 18px; overflow: hidden; }
.point-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 18px; }
.point-more > summary::-webkit-details-marker { display: none; }
.point-more > summary > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.point-more > summary b { font-size: 14px; font-weight: 600; }
.point-more > summary .subtle { font-size: 12.5px; }
@media (hover: hover) and (pointer: fine) { .point-more > summary:hover { background: var(--surface-3); } }
.point-more > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.point-more .chev svg { width: 17px; height: 17px; stroke-width: 2; color: var(--text-3); transition: transform var(--dur-2) cubic-bezier(.23, 1, .32, 1); }
.point-more[open] .chev svg { transform: rotate(90deg); }
.point-more-body { border-top: 1px solid var(--line); padding: 18px; }
.pm-h { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }

/* ===== Телеметрія й API ===== */
.tm-section { margin-bottom: 22px; }
.tm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tm-head h2 { font-size: 17px; font-weight: 640; letter-spacing: -.015em; }
.tm-head > a { margin-left: auto; }
.tm-resp { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.tm-panel { margin-top: 14px; }

.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.device-card { padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line);
  animation: tile-rise .3s cubic-bezier(.23, 1, .32, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.device-card.is-online { border-color: color-mix(in srgb, var(--success) 34%, var(--line)); }
.device-card.is-soon { border-style: dashed; background: transparent; }
.dc-top { display: flex; align-items: center; gap: 11px; }
.dc-top > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dc-top b { font-size: 14px; font-weight: 620; }
.dc-top .subtle, .dc-top > div > span { font-size: 12px; }
.dc-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-3); color: var(--accent-text); }
.device-card.is-soon .dc-ic { color: var(--text-3); }
.dc-ic svg { width: 19px; height: 19px; stroke-width: 1.7; }
.dc-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 14px; font-size: 12.5px; }
.dc-facts dt { color: var(--text-3); }
.dc-facts dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.dc-empty { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

.sev-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin: 1px 4px 1px 0; border-radius: var(--r-full); font-size: 11.5px; font-weight: 620; }
.sev-chip.ok { color: var(--success); background: color-mix(in srgb, var(--success) 13%, transparent); }
.sev-chip.warning { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.sev-chip.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.sev-chip.crash { color: #fff; background: var(--danger); }
.tm-sessions tr.has-problems td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

.vtimeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.vtimeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.vtimeline li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 16px; font-size: 13px; }
.vtimeline li::before { content: ""; position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--text-3); }
.vtimeline li.now::before, .vtimeline li.active::before { background: var(--success); border-color: var(--success); }
.vtimeline li.draining::before { background: var(--warning); border-color: var(--warning); }
.vtimeline li.revoked::before { border-color: var(--danger); }
.device-timeline li { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.device-timeline .dt-main { font-weight: 550; }

.crew-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.crew-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-faint); }
.cw-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cw-who b { font-size: 13.5px; font-weight: 600; }
.cw-who .subtle, .cw-n .subtle { font-size: 11.5px; }
.cw-n { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.cw-n b { font-size: 17px; font-weight: 640; font-variant-numeric: tabular-nums; }

.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 22px; }
.api-serial { margin-top: 16px; }
.api-serial code { font-size: 22px; font-weight: 600; letter-spacing: .02em; color: var(--text); }
.api-steps { color: var(--text-2); padding-left: 18px; margin: 4px 0 12px; font-size: 13px; line-height: 1.6; }

@media (max-width: 900px) {
  .hero-stats, .dash-grid, .api-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .lb-counters { gap: 14px; }
  .shift-list li { grid-template-columns: 1fr auto; }
  .shift-list .sl-who, .shift-list .sl-dur { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stat, .device-card, .live-banner { animation: tile-fade .2s ease backwards; }
  .point-more .chev svg { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
/* Публічна сторінка документа — помітно (рішення власника 2026-10-23: посилання було сховане й бліде, бо `.iris a`
   придушувало його колір). Бейдж у згорнутому заголовку (посилання всередині <summary> відкривається, картку не згортає)
   і лавандова кнопка в розгорнутій картці. Специфічність `.iris .…` — щоб колір не перебивало скидання посилань. */
.iris .doc-public-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600; color: var(--accent-text); background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.iris .doc-public-chip:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--text); }
.iris .doc-public-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.iris .doc-public-chip svg { width: 12px; height: 12px; stroke-width: 2; }
.iris .doc-open-public { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-1); }
.iris .doc-open-public:hover { background: var(--accent-hover); box-shadow: var(--shadow-1), var(--accent-glow); }
.iris .doc-open-public svg { width: 14px; height: 14px; stroke-width: 2; }

/* Шапка (рішення власника 2026-10-24): пошук ⌘K · віджети · сповіщення · меню. Колір стану віджета — лише крапка біля
   числа й тонка рамка для «увага»/«погано»; текст — завжди текстовими токенами. Панелі з'являються від тригера (160 мс),
   число, що змінилось у живому оновленні, коротко прокручується; палітра відкривається без руху (дія на сотні разів). */
.topbar { gap: 10px; }
.topbar-search { width: 280px; cursor: pointer; text-align: left; font: inherit; }
.topbar-search .search-text { flex: 1; font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search:hover { border-color: var(--line-strong); }
.topbar-search:focus-visible { outline: none; border-color: var(--focus-ring); box-shadow: var(--accent-glow); }
.hw-frame { display: block; min-width: 0; }
.hw-row { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.hw { position: relative; }
.hw summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 9px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface-1); color: var(--text-2); font-size: 12.5px; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.hw summary::-webkit-details-marker { display: none; }
.hw summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.hw[open] summary { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.hw-ic { position: relative; display: grid; place-items: center; flex: none; }
.hw-ic svg { width: 15px; height: 15px; stroke-width: 1.7; }
.hw summary .hw-ic::after { content: ""; position: absolute; right: -3px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--tone, transparent); box-shadow: 0 0 0 2px var(--surface-1); }
.hw-val { color: var(--text); font-weight: 620; font-variant-numeric: tabular-nums; display: inline-block; }
.hw-lbl { color: var(--text-2); }
.hw.tone-ok { --tone: var(--success); }
.hw.tone-info { --tone: var(--accent); }
.hw.tone-warning { --tone: var(--warning); }
.hw.tone-danger { --tone: var(--danger); }
.hw.tone-warning summary { border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.hw.tone-danger summary { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: var(--danger-tint); }
.hw.tone-muted .hw-val { color: var(--text-2); font-weight: 560; }
.hw-panel, .hm-panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); z-index: 30; transform-origin: top right; }
.hw-panel { width: 300px; max-width: calc(100vw - 32px); padding: 6px; }
.hw[open] > .hw-panel, .hm[open] > .hm-panel { animation: header-pop var(--dur-2) cubic-bezier(.23, 1, .32, 1); }
@keyframes header-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.hw-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 10px 6px; font-size: 13px; }
.hw-panel-head b { color: var(--text); font-weight: 600; }
.iris .hw-panel-head .link-plain { font-size: 12.5px; color: var(--accent-text); }
.hw-list { list-style: none; margin: 0; padding: 0; }
.hw-list a, .hw-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); }
.hw-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-list b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hw-list a:hover { background: var(--surface-3); color: var(--text); }
.hw-list a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus-ring); }
.hw-empty { margin: 0; padding: 4px 10px 10px; font-size: 13px; color: var(--text-2); }
.hw.is-changed .hw-val { animation: hw-tick var(--dur-3) cubic-bezier(.23, 1, .32, 1); }
@keyframes hw-tick { from { opacity: .15; transform: translateY(45%); } }

.hm { position: relative; }
.hm-btn { list-style: none; cursor: pointer; width: 36px; height: 32px; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--text-2);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.hm-btn::-webkit-details-marker { display: none; }
.hm-btn:hover, .hm[open] .hm-btn { background: var(--surface-3); color: var(--text); }
.hm-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.hm-btn svg { width: 17px; height: 17px; stroke-width: 1.7; }
.hm-panel { width: 280px; max-width: calc(100vw - 32px); padding: 6px; }
.hm-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.hm-me > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hm-me b { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-me span span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-group { border-top: 1px solid var(--line); padding: 6px 0; }
.hm-group:last-child { padding-bottom: 0; }
.hm-title { margin: 0; padding: 6px 10px 4px; font-size: 12px; color: var(--text-2); }
.hm-group form { margin: 0; }
.iris .hm-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: none; border: none; color: var(--text-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.hm-item svg { width: 16px; height: 16px; stroke-width: 1.7; flex: none; }
.hm-item > span:not(.hm-state) { flex: 1; }
.iris .hm-item:hover { background: var(--surface-3); color: var(--text); }
.iris .hm-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus-ring); }
.iris .hm-item.is-static { cursor: default; }
.iris .hm-item.is-static:hover { background: none; color: var(--text-2); }
.iris .hm-item.is-danger:hover { color: var(--danger); }
.hm-state { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.hm-state.is-on { color: var(--success); }
.hm-locales { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 2px 10px 6px; }
.iris .hm-locale { width: 100%; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line); background: none; color: var(--text-2); font: 500 12px/1 var(--font-mono); cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.iris .hm-locale:hover { background: var(--surface-3); color: var(--text); }
.iris .hm-locale.is-current { background: var(--accent-tint-2); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.iris .hm-locale:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }

.cmdk, .hw-dialog { padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-2); }
.cmdk::backdrop, .hw-dialog::backdrop { background: rgba(0,0,0,.6); }
.cmdk { width: min(620px, calc(100vw - 32px)); margin: 12vh auto auto; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk-input svg { width: 18px; height: 18px; stroke-width: 1.7; flex: none; }
.cmdk-input input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--text); font: inherit; font-size: 15px; }
.cmdk-input input::-webkit-search-cancel-button { display: none; }
.cmdk-input kbd, .topbar-search kbd { font: 500 11px/1 var(--font-mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; white-space: nowrap; }
.cmdk-results { list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; }
.cmdk-results:empty { display: none; }
.cmdk-group { padding: 10px 10px 4px; font-size: 12px; color: var(--text-2); }
.cmdk-item { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; }
.cmdk-item b { font-weight: 560; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item span { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item[aria-selected="true"] { background: var(--accent-tint); }
.cmdk-status { margin: 0; padding: 14px 16px; font-size: 13px; color: var(--text-2); }
.cmdk-status:empty { display: none; }

.hw-dialog { width: min(520px, calc(100vw - 32px)); }
.hw-dialog form { padding: 20px; }
.hw-dialog h2 { margin: 0 0 4px; font-size: 17px; font-weight: 620; }
.hw-dialog .subtle { margin: 0 0 14px; font-size: 13px; }
.hw-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hw-options li { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); }
.hw-options label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.hw-options input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.hw-options .hw-ic { color: var(--text-2); }
.hw-opt-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hw-opt-text b { font-size: 13.5px; font-weight: 600; }
.hw-opt-text span { font-size: 12px; color: var(--text-2); }
.hw-move { display: flex; flex: none; }
.hw-move .icon-btn { width: 32px; height: 32px; }
.hw-move .icon-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }
.hw-move .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.hw-options li:first-child [data-action$="moveUp"], .hw-options li:last-child [data-action$="moveDown"] { opacity: .3; pointer-events: none; }
.hw-dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }

@media (max-width: 1360px) { .hw-lbl { display: none; } }
@media (max-width: 1100px) { .topbar-search { width: auto; } .topbar-search .search-text { display: none; } }
@media (max-width: 720px) {
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar-search { padding: 8px 10px; }
  .topbar-search kbd { display: none; }
  .topbar-spacer { display: none; }
  .hw-frame { flex: 1; overflow-x: auto; scrollbar-width: none; }
  .hw-frame::-webkit-scrollbar { display: none; }
  .hw { position: static; }
  .hw-panel { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-width: none; transform-origin: top center; }
  .hw-dialog-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .hw[open] > .hw-panel, .hm[open] > .hm-panel { animation: header-fade var(--dur-1) ease; }
  .hw.is-changed .hw-val { animation: header-fade var(--dur-2) ease; }
  @keyframes header-fade { from { opacity: 0; } }
}

/* «Конектори» в меню акаунта (2026-10-24): адреса й кроки зліва, що бачить агент справа, застосунки — рядками-картками з
   перемикачем «Керування графіком». Перемикач — кнопка з role="switch"; повзунок їде 180 мс, з reduced motion — одразу. */
.conn-setup, .conn-scope, .conn-empty { padding: 18px 20px; }
.conn-scope .hint { margin: 0; }
.conn-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.conn-h { margin: 0 0 12px; font-size: 15px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.conn-h .count { font: 500 12px/1 var(--font-mono); color: var(--text-2); border: 1px solid var(--line); border-radius: var(--r-full); padding: 4px 8px; }
.conn-sub { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.conn-url { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--surface-input); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.conn-url code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13.5px; color: var(--text); }
.conn-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.conn-steps li::marker { color: var(--accent-text); font-weight: 600; }
.conn-can { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.conn-can li, .conn-never { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.conn-can svg, .conn-never svg { width: 16px; height: 16px; stroke-width: 2; flex: none; margin-top: 2px; }
.conn-can svg { color: var(--success); }
.conn-never { margin: 0 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.conn-never svg { color: var(--text-2); stroke-width: 1.7; }
.conn-apps { margin-top: 24px; }
.conn-apps > .hint { margin: -4px 0 12px; }
.conn-app { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 18px; padding: 14px 16px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.conn-app + .conn-app { margin-top: 8px; }
.conn-mono { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); font-weight: 700; font-size: 16px; }
.conn-app-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.conn-app-main b { font-size: 14.5px; font-weight: 620; }
.conn-app-main span { font-size: 12.5px; color: var(--text-2); }
.conn-app-calls { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.conn-app-calls b { font-size: 16px; font-weight: 620; font-variant-numeric: tabular-nums; }
.conn-app-calls span { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.conn-app-schedule { display: flex; align-items: center; gap: 12px; padding-left: 18px; border-left: 1px solid var(--line); }
.conn-switch-label { display: flex; flex-direction: column; line-height: 1.3; text-align: right; }
.conn-switch-label b { font-size: 13px; font-weight: 600; }
.conn-switch-label span { font-size: 12px; color: var(--text-2); }
.iris .conn-switch { position: relative; width: 40px; height: 24px; flex: none; border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface-3); cursor: pointer; padding: 0;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
.conn-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform var(--dur-2) cubic-bezier(.23, 1, .32, 1), background var(--dur-2) var(--ease); }
.iris .conn-switch.is-on { background: var(--accent); border-color: var(--accent); }
.conn-switch.is-on .conn-knob { transform: translateX(16px); background: #fff; }
.iris .conn-switch:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.conn-empty { text-align: left; }
.conn-empty b { display: block; font-size: 14px; margin-bottom: 4px; }
.conn-empty p { margin: 0; color: var(--text-2); font-size: 13.5px; }
@media (max-width: 960px) { .conn-top { grid-template-columns: 1fr; } }
@media (max-width: 1180px) {
  .conn-app { grid-template-columns: auto minmax(0, 1fr) auto; }
  .conn-app-schedule { grid-column: 1 / -1; padding-left: 0; border-left: none; padding-top: 12px; border-top: 1px solid var(--line); justify-content: space-between; }
  .conn-switch-label { text-align: left; }
  .conn-app > form:last-child { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .conn-knob, .iris .conn-switch { transition: none; } }

/* Плитка-посилання (TileLinkHelper, 2026-10-24): без адреси в рядку стану браузера; поводиться як посилання. */
[data-controller~="tile-link"] { cursor: pointer; }
[data-controller~="tile-link"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Шаблони eye.photo для магазину артів (рішення власника 2026-10-25): плитки з прев'ю й галочкою «продавати». */
.art-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.art-template { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-input);
                cursor: pointer; transition: border-color var(--dur-1) var(--ease); }
.art-template:has(input:checked) { border-color: var(--accent); }
.art-template.is-disabled { cursor: default; opacity: .55; }
.art-template-img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.art-template-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-template-body { display: flex; gap: 10px; align-items: flex-start; }
.art-template-body > span:last-child { display: grid; gap: 3px; min-width: 0; }
.art-template-body b { font-weight: 550; font-size: 13.5px; overflow-wrap: anywhere; }

/* Заявки (2026-10-25, docs/INTERNAL_AGENT.md етап 2): у картці зліва опис, фото й журнал, справа — стан і дії. */
.status-dot.muted { color: var(--text-2); }
.ticket-text { padding: 14px 18px; white-space: pre-line; line-height: 1.55; font-size: 14px; max-width: 72ch; }
.ticket-text + .ticket-text { border-top: 1px solid var(--line-faint); }
.ticket-text h3 { font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 6px; }
.ticket-photos { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 18px 16px; }
.ticket-photos a { display: block; border-radius: var(--r-md); }
.ticket-photos img { display: block; width: 132px; height: 132px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.ticket-log li { grid-template-columns: 96px 1fr; }
.ticket-log .who { font-weight: 550; }
.ticket-log .note { display: block; color: var(--text-2); margin-top: 3px; white-space: pre-line; }
.ticket-actions { padding: 14px 18px 18px; display: grid; gap: 14px; }
.ticket-actions form { display: grid; gap: 8px; }
.ticket-actions .row { display: flex; gap: 8px; flex-wrap: wrap; }
.ticket-cell-sub { display: block; font-size: 12px; color: var(--text-2); }
@media (max-width: 640px) { .ticket-log li { grid-template-columns: 1fr; gap: 2px; } }

/* ============ АГЕНТ (docs/INTERNAL_AGENT.md етап 5) ============
 * Розмова як записка колеги: відповіді агента — текстом без бульбашки (легко читати кроки й посилання), питання людини —
 * компактною бульбашкою справа. Акцент — лише на діях (картка «Підтвердити», кнопки, фокус). Єдиний рух — діафрагма, що
 * обертається, поки агент працює; без руху (prefers-reduced-motion) — лише текст стану. */
.agent-page { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; }
/* У розмітці чат іде першим (заголовок h1 — перший на сторінці), список розмов ставимо ліворуч сіткою. */
.agent-chat { grid-column: 2; grid-row: 1; }
.agent-list { grid-column: 1; grid-row: 1; position: sticky; top: 82px; max-height: calc(100vh - 106px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
/* Поле внизу липке — клавіатурний фокус не ховається під ним. */
html:has(.agent-composer) { scroll-padding-bottom: 220px; }
.agent-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 10px; }
.agent-list-head h2 { font-size: 13px; font-weight: 560; color: var(--text-2); }
.agent-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agent-list-item { display: grid; gap: 2px; padding: 9px 10px; border-radius: var(--r-md); color: var(--text-2); transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.agent-list-item:hover { background: var(--surface-3); color: var(--text); }
.agent-list-item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-list-item.is-current { background: var(--accent-tint); color: var(--text); }
.agent-list-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-list-time { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.agent-list-empty { font-size: 13px; color: var(--text-2); padding: 6px 10px; }

.agent-chat { display: flex; flex-direction: column; max-width: 760px; min-height: calc(100vh - 150px); }
.agent-chat-head { padding-bottom: 6px; }
.agent-chat-head h1 { font-size: 22px; font-weight: 640; letter-spacing: -.02em; overflow-wrap: anywhere; }
.agent-back { display: none; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.agent-back:hover { color: var(--text); }
.agent-notice { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--text-2); padding: 8px 0 14px; border-bottom: 1px solid var(--line-faint); }
.agent-notice svg { width: 15px; height: 15px; flex: none; margin-top: 1px; stroke-width: 1.8; }

.agent-start { margin: auto 0; padding: 40px 0 28px; max-width: 58ch; }
.agent-start .agent-aperture { width: 44px; height: 44px; color: var(--text-2); margin-bottom: 18px; }
.agent-start h1 { font-family: var(--font-brand); font-size: 30px; font-weight: 640; letter-spacing: -.025em; line-height: 1.15; }
.agent-start p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin-top: 10px; }

.agent-log { list-style: none; margin: 0; padding: 20px 0 8px; display: flex; flex-direction: column; gap: 22px; }
.agent-msg { min-width: 0; }
.agent-msg.is-user { align-self: flex-end; max-width: min(78%, 520px); display: grid; justify-items: end; gap: 4px; }
.agent-msg.is-user time { font-size: 11.5px; color: var(--text-2); }
.agent-bubble { background: var(--surface-3); border: 1px solid var(--line-faint); border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); padding: 10px 14px; font-size: 14px; line-height: 1.55; }
.agent-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-photo { display: block; border-radius: var(--r-md); margin: 2px 0 8px; }
.agent-photo:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-photo img { display: block; max-width: 100%; width: 280px; max-height: 280px; object-fit: cover; border-radius: var(--r-md); }
.agent-msg.is-agent { max-width: 68ch; }
.agent-byline { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; display: flex; gap: 7px; align-items: center; }
.agent-byline b { color: var(--text); font-weight: 560; }
.agent-byline .agent-aperture { width: 16px; height: 16px; color: var(--text); }
.agent-byline time { margin-left: 2px; }
/* Позначка ШІ (AI Act ст. 50): маленька нейтральна плашка біля імені; повну фразу чує читач екрана й видно в підказці. */
.agent-ai { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 600; letter-spacing: .03em; line-height: 1; color: var(--text-2); }
.agent-text { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.agent-text p + p { margin-top: .75em; }
.agent-link { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 2px; }
.agent-link:hover { text-decoration-color: currentColor; }
.agent-link:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 2px var(--focus-ring); }
/* Відгук на відповідь (2026-11-09): дві тихі іконки; вибрана — лавандова з підкладкою. Натиск — ледь стискається (100 мс). */
.agent-feedback { display: flex; gap: 2px; margin-top: 6px; margin-left: -6px; }
.agent-vote { width: 30px; height: 30px; display: grid; place-items: center; border: none; border-radius: var(--r-full); background: none; color: var(--text-3);
  cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform 100ms var(--ease); }
.agent-vote svg { width: 16px; height: 16px; stroke-width: 1.7; }
.agent-vote:hover { background: var(--surface-3); color: var(--text); }
.agent-vote:active { transform: scale(.92); }
.agent-vote:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-vote[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent-text); }
@media (pointer: coarse) { .agent-vote { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .agent-vote:active { transform: none; } }
.agent-msg.is-notice { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--text-2); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 7px 12px; }

/* Картка дії: поки чекає рішення — тонка лавандова рамка (вибраний стан, DESIGN.md §2); після — нейтральна, підсумок
 * кольоровою крапкою біля статусу. */
.agent-action { max-width: 560px; background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 6px; }
.agent-action.is-pending { border-color: color-mix(in srgb, var(--violet-400) 45%, transparent); }
.agent-action-label { font-size: 12px; font-weight: 560; color: var(--text-2); }
.agent-action-summary { font-size: 14.5px; font-weight: 540; overflow-wrap: anywhere; }
.agent-action:is(.is-rejected, .is-expired) .agent-action-summary { color: var(--text-2); }
.agent-action-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.agent-action-expiry { margin-left: auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.agent-action-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.agent-action-status::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-full); background: var(--text-3); flex: none; }
.agent-action.is-confirmed .agent-action-status::before { background: var(--success); }
.agent-action.is-failed .agent-action-status::before { background: var(--danger); }

.agent-status { min-height: 30px; display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.agent-status .agent-aperture { width: 20px; height: 20px; color: var(--accent-text); }
.agent-aperture { display: block; flex: none; }
/* Бот працює — зірочка ШІ мерехтить (зменшується й тьмяніє), решта знака стоїть. */
.agent-aperture.is-busy .agent-aperture-spark { transform-box: fill-box; transform-origin: 50% 50%; animation: agent-spark 1.4s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes agent-spark { from { transform: scale(1); opacity: 1; } to { transform: scale(.55); opacity: .45; } }

.agent-composer { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding: 14px 0 18px; background: linear-gradient(to bottom, transparent, var(--bg) 18px); }
/* Поле як у Claude (2026-11-07): сіре заокруглене поле, текст і значки всередині; лаванда — лише на фокусі й «надіслати». */
.agent-field { background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 10px 8px 8px 14px;
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.agent-field:focus-within { border-color: var(--violet-400); box-shadow: var(--accent-glow); }
.agent-field.is-disabled { opacity: .55; }
.agent-input { display: block; width: 100%; min-height: 24px; max-height: 220px; field-sizing: content; resize: none; background: none; border: none;
  padding: 2px 6px 4px 0; color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.5; }
.agent-input::placeholder { color: var(--text-2); }
.agent-input:focus { outline: none; }
.agent-input:disabled { cursor: not-allowed; }
.agent-field-bar { display: flex; align-items: center; gap: 2px; margin: 6px 0 0 -6px; min-width: 0; }
.agent-field-spacer { flex: 1; }
.agent-tool { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: none; border-radius: var(--r-full); background: none;
  color: var(--text-2); cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.agent-tool[hidden] { display: none; }
.agent-tool svg { width: 18px; height: 18px; stroke-width: 1.7; }
.agent-tool:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.agent-tool:focus-visible, .agent-tool:focus-within { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-tool:disabled, .agent-tool.is-disabled { opacity: .5; cursor: not-allowed; }
.agent-mic.is-on { background: var(--accent-tint-2); color: var(--accent-text); }
.agent-file { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 180px; margin-left: 4px; padding: 2px 2px 2px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-full); font-size: 12.5px; color: var(--text-2); }
.agent-file[hidden] { display: none; }
.agent-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-file-clear { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: none; border-radius: var(--r-full); background: none; color: var(--text-2); }
.agent-file-clear:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.agent-file-clear:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-file-clear svg { width: 12px; height: 12px; stroke-width: 2; }
.agent-send { width: 32px; height: 32px; flex: none; display: grid; place-items: center; margin-left: 4px; border: none; border-radius: var(--r-full);
  background: var(--accent); color: var(--text-on-accent); transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.agent-send svg { width: 18px; height: 18px; stroke-width: 2; }
.agent-send:hover { background: var(--accent-hover); }
.agent-send:active { transform: scale(.94); }
.agent-send:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-3), 0 0 0 4px var(--focus-ring); }
.agent-send:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
/* Поки нічого писати — «надіслати» тихіша (натиснути можна: сервер підкаже). */
.agent-field:has(.agent-input:placeholder-shown):not(:has(.agent-file:not([hidden]))) .agent-send:not(:disabled) { background: var(--surface-2); color: var(--text-2); }
.agent-dictation-notice { font-size: 12px; line-height: 1.45; color: var(--text-2); margin: 0 4px 8px; }
.agent-dictation-notice[hidden] { display: none; }
.agent-composer-status { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.agent-composer-status:empty { display: none; }
.agent-composer-hint { font-size: 12px; color: var(--text-2); margin-top: 8px; }

@media (pointer: coarse) {
  .agent-tool, .agent-send { width: 44px; height: 44px; }
  .agent-list-head .btn-sm { height: 44px; }
}
/* Без руху: мерехтіння з масштабом замінюємо тихою зміною яскравості — знак «бот працює» лишається. */
@media (prefers-reduced-motion: reduce) {
  .agent-aperture.is-busy .agent-aperture-spark { animation: agent-aperture-breathe 1.6s ease-in-out infinite alternate; }
  .agent-send:active { transform: none; }
}
@keyframes agent-aperture-breathe { from { opacity: 1; } to { opacity: .45; } }

/* ============ IRIS BOT · ВІКНО (бокова панель 2026-11-06, вікно 2026-11-07) ============
 * Окреме вікно поруч зі сторінкою, як розширення браузера: відступ 12 px від країв, радіус 18, своя поверхня й межа.
 * Стоїть на місці (fixed), прокручується лише розмова всередині. Від 1280 px сторінка звільняє місце (правий відступ),
 * нижче — вікно поверх із тінню, на телефоні — на весь екран. Виїзд кнопкою — transform 260 мс на кривій шухляди меню,
 * перервний; клавішами (⌘J) і в режимі «поруч» — без руху; менше руху — згасання 150 мс. Знак у шапці обертається, поки бот
 * працює. */
:root { --agent-drawer-w: 400px; --agent-drawer-gap: 12px; }
.agent-aperture-pupil { fill: var(--accent-text); }
.agent-toggle .agent-aperture { width: 23px; height: 20px; }
.agent-toggle.is-open { background: var(--accent-tint); color: var(--text); }

.agent-drawer { --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  position: fixed; top: var(--agent-drawer-gap); right: var(--agent-drawer-gap); bottom: var(--agent-drawer-gap); z-index: 50;
  width: var(--agent-drawer-w); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  transition: transform 260ms var(--ease-drawer), display 260ms allow-discrete; }
.agent-drawer[hidden] { display: none; transform: translateX(calc(100% + var(--agent-drawer-gap) * 2)); }
@starting-style { .agent-drawer:not([hidden]) { transform: translateX(calc(100% + var(--agent-drawer-gap) * 2)); } }
.agent-drawer.is-instant { transition: none; }
@media (min-width: 1280px) {
  .app:has(> .agent-drawer:not([hidden])) { padding-right: calc(var(--agent-drawer-w) + var(--agent-drawer-gap) * 2); }
  .agent-drawer { box-shadow: none; transition: none; }
  @starting-style { .agent-drawer:not([hidden]) { transform: none; } }
}
/* Сторінці лишається менше місця, а правила шапки рахують ширину вікна браузера — зсуваємо їх на ширину вікна бота. */
@media (min-width: 1280px) and (max-width: 1799px) { .app:has(> .agent-drawer:not([hidden])) .hw-lbl { display: none; } }
@media (min-width: 1280px) and (max-width: 1539px) {
  .app:has(> .agent-drawer:not([hidden])) .topbar-search { width: auto; }
  .app:has(> .agent-drawer:not([hidden])) .topbar-search .search-text { display: none; }
}
@media (max-width: 720px) { .agent-drawer { inset: 0; width: 100%; z-index: 65; border: none; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) {
  .agent-drawer { transition: opacity 150ms ease, display 150ms allow-discrete; }
  .agent-drawer[hidden] { transform: none; opacity: 0; }
  @starting-style { .agent-drawer:not([hidden]) { transform: none; opacity: 0; } }
}

.agent-drawer-bar { height: 52px; flex: none; display: flex; align-items: center; gap: 0; padding: 0 6px 0 14px; border-bottom: 1px solid var(--line); }
.agent-drawer-bar h2 { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 620; letter-spacing: -.01em; }
.agent-drawer-bar h2 .agent-aperture { width: 26px; height: 22px; }
.agent-drawer-bar .icon-btn { width: 34px; height: 34px; }
.agent-drawer-bar .icon-btn svg { width: 18px; height: 18px; }
.agent-drawer-bar .icon-btn[aria-expanded="true"] { background: var(--surface-3); color: var(--text); }
.agent-drawer-bar .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-drawer-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.agent-drawer-loading { padding: 18px; font-size: 13px; color: var(--text-2); }
.agent-drawer-view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* Історія розмов — шар поверх розмови. */
.agent-history { position: absolute; inset: 0; z-index: 4; overflow-y: auto; overscroll-behavior: contain; padding: 14px 10px 18px; background: var(--surface-2); }
.agent-history[hidden] { display: none; }
.agent-history h3 { font-size: 12.5px; font-weight: 560; color: var(--text-2); padding: 0 10px 8px; }
.agent-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.agent-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; display: flex; flex-direction: column; }
.agent-drawer-title { font-size: 13px; font-weight: 560; color: var(--text-2); padding: 14px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-drawer-body .agent-log { padding-top: 14px; gap: 18px; }
.agent-drawer-body .agent-msg.is-user { max-width: 88%; }
.agent-drawer-body .agent-bubble { background: var(--surface-3); }
.agent-drawer-body .agent-text { font-size: 14px; }
.agent-drawer-body .agent-photo img { width: 220px; max-height: 220px; }
.agent-drawer-body .agent-action { background: var(--surface-1); }
.agent-drawer-start { margin: auto 0; padding: 24px 4px; color: var(--text-2); font-size: 14px; line-height: 1.6; display: grid; gap: 12px; }
.agent-drawer-body:has(.agent-intro) .agent-drawer-start { display: none; }
.agent-drawer-start > .agent-aperture { width: 34px; height: 34px; color: var(--text); }
.agent-drawer-start .agent-notice { padding: 0; border: none; font-size: 12px; }
.agent-drawer-alert { margin-top: 12px; padding: 9px 12px; border-radius: var(--r-md); background: var(--danger-tint); color: var(--text); font-size: 13px; }
.agent-drawer .agent-composer { position: static; flex: none; margin: 0; padding: 8px 12px max(12px, env(safe-area-inset-bottom)); background: none; }
.agent-drawer .agent-input { font-size: 14px; }

/* Одноразова інструкція (рішення власника 2026-11-07). */
.agent-intro { margin: 14px 0 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-1); display: grid; gap: 10px; }
.agent-intro h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 620; }
.agent-intro h3 .agent-aperture { width: 18px; height: 18px; }
.agent-intro ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.agent-intro li { position: relative; padding-left: 14px; }
.agent-intro li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.agent-intro li.is-warning { color: var(--text); }
.agent-intro li.is-warning::before { background: var(--warning); }
.agent-intro-notice { font-size: 12px; line-height: 1.5; color: var(--text-2); }
.agent-intro .btn { justify-self: start; }
.agent-page .agent-intro { max-width: 640px; }

/* Плашка сторінки: з якої сторінки піде повідомлення. Нейтральна, бо це контекст, а не дія; хрестик її прибирає. */
.agent-page-chip { display: flex; align-items: center; gap: 7px; max-width: 100%; margin-bottom: 8px; padding: 3px 4px 3px 10px; width: fit-content;
  border: 1px solid var(--line); border-radius: var(--r-full); color: var(--text-2); font-size: 12.5px; }
.agent-page-chip[hidden] { display: none; }
.agent-page-chip > svg { width: 14px; height: 14px; flex: none; stroke-width: 1.7; }
.agent-page-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-page-chip-text b { color: var(--text); font-weight: 500; }
.agent-page-chip-remove { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: none; border-radius: var(--r-full); background: none; color: var(--text-2); }
.agent-page-chip-remove:hover { background: var(--surface-3); color: var(--text); }
.agent-page-chip-remove:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
.agent-page-chip-remove svg { width: 12px; height: 12px; stroke-width: 2; }
@media (pointer: coarse) {
  .agent-page-chip-remove { width: 44px; height: 44px; margin: -10px -4px -10px 0; }
  .agent-drawer-bar .icon-btn { width: 44px; height: 44px; }
}
.agent-msg-page { font-size: 11.5px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-msg-page a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.agent-msg-page a:hover { color: var(--text); }
.agent-msg-page a:focus-visible { outline: none; border-radius: 3px; box-shadow: 0 0 0 2px var(--focus-ring); }
@media (max-width: 900px) {
  .agent-page { grid-template-columns: 1fr; gap: 20px; }
  .agent-chat, .agent-list { grid-column: 1; grid-row: auto; }
  .agent-list { position: static; max-height: none; }
  .agent-page:has(.agent-chat:not(.is-new)) .agent-list { display: none; }
  .agent-chat { min-height: auto; }
  .agent-back { display: inline-block; }
  .agent-start { padding-top: 12px; }
  .agent-msg.is-user { max-width: 88%; }
}

/* ===== City Tour: сторінка міста у CRM (редизайн 2026-10-29, за зразком сторінки точки) =====
   Вкладки — .point-tabs; «Сторінка» — блоки в порядку сайту: мініатюра сторінки біля назви показує, де блок; тексти ES/EN
   поруч; фото блоку — під текстами, із зоною завантаження (рамка, клік, перетягування) замість системного input. */
.ct-tabs .n { margin-left: 2px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ct-tab > .panel + .panel, .ct-tab > .panel + section, .ct-block + .ct-block { margin-top: 16px; }
.ct-page-hint { margin: -6px 0 14px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
/* «Витрати» виїзду (власник 2026-11-10): три плитки, під ними форма «Додати витрату» горизонтальною смугою, нижче список до низу екрана
   (висоту від верху сторінки міряє Stimulus `fit-bottom` → --fit-top), що гортається всередині; шапка таблиці тримається. */
.ct-ex { display: flex; flex-direction: column; gap: 16px; }
.ct-ex-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ct-ex-tile { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.ct-ex-tile.is-profit { background: var(--surface-1); border-color: var(--line-strong); }
.ct-ex-value { font-size: clamp(26px, 2.8vw, 38px); font-weight: 650; line-height: 1.05; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ct-ex-value.neg { color: var(--danger); }
.ct-ex-label { font-size: 14px; color: var(--text-2); }
.ct-ex-add { margin: 0; padding: 14px 18px; }
.ct-ex-add .form, .ct-ex-table .form { max-width: none; margin: 0; }
.ct-ex-strip { display: grid; grid-template-columns: 170px 210px 150px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ct-ex-strip .form-actions { margin: 0; padding: 0; gap: 8px; }
.ct-ex-strip .form-actions .btn { min-height: 48px; }
.ct-ex-list { display: flex; flex-direction: column; margin: 0; }
.ct-ex-cats { flex: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 18px; list-style: none; border-bottom: 1px solid var(--line); }
.ct-ex-cats li { padding: 4px 12px; border-radius: var(--r-full); font-size: 13px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-variant-numeric: tabular-nums; }
.ct-ex-cats b { margin-left: 4px; font-weight: 600; color: var(--text); }
.ct-ex-scroll { flex: 1; min-height: 0; max-height: min(70dvh, 720px); overflow: auto; scrollbar-gutter: stable; }
.iris-table.ct-ex-table { table-layout: auto; }
.iris-table.ct-ex-table thead th:nth-child(n), .iris-table.ct-ex-table tbody td:nth-child(n) { width: auto; text-align: left; }
.iris-table.ct-ex-table thead th.num:nth-child(n), .iris-table.ct-ex-table tbody td.num:nth-child(n) { text-align: right; }
.ct-ex-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); white-space: nowrap; }
.ct-ex-table tr.editing td { padding: 14px 18px; background: var(--surface-1); }
@media (min-width: 900px) and (min-height: 600px) {
  .content:has(.ct-tab:not([hidden]) > .ct-ex) { padding-bottom: 24px; }
  .ct-ex-list { height: max(calc(100dvh - var(--fit-top, 520px) - 24px), 260px); }
  .ct-ex-scroll { max-height: none; }
}
@media (max-width: 900px) { .ct-ex-tiles { grid-template-columns: minmax(0, 1fr); } .ct-ex-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ct-ex-strip .form-actions { grid-column: 1 / -1; } }
.ct-page-form { display: none; }
.ct-block-head { align-items: center; }
.ct-map { flex: none; width: 26px; height: 40px; padding: 3px; border-radius: 5px; background: var(--surface-1); border: 1px solid var(--line); box-sizing: border-box; }
.ct-map rect { fill: var(--line-strong); }
.ct-map rect.on { fill: var(--accent); }
.ct-block-body { padding: 4px 18px 18px; }
/* Вкладка виїзду «Фотографи» (правка власника 2026-11-10): без зовнішньої панелі — ліворуч «Точки», праворуч «Команда» (рівної
   висоти, довгі списки гортаються всередині вікон), знизу «Умови для фотографів» горизонтальним блоком. Форма умов — display:
   contents, щоб її панелі стали клітинками тієї самої сітки; форма запрошення лишається окремою. Рух не потрібен. */
.ct-team { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: clamp(380px, calc(100dvh - 430px), 560px) auto auto auto; gap: 16px; }
.ct-team-form { display: contents; }
.ct-pane { display: flex; flex-direction: column; min-height: 0; }
.ct-pane-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 4px 18px 12px; }
.ct-pane-points { grid-column: 1; grid-row: 1; }
.ct-pane-crew { grid-column: 2; grid-row: 1; }
.ct-pane-desk { grid-column: 1 / -1; }
.ct-pane-terms { grid-column: 1 / -1; grid-row: 2; }
.ct-team-save { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin: 0; }
.ct-team-conflicts { grid-column: 1 / -1; grid-row: 4; margin: 0; }
.ct-pane-note { margin: 10px 18px 0; font-size: 12.5px; }
.ct-pane-points .check-line { align-items: center; min-height: 44px; padding: 0; border-bottom: 1px solid var(--line-faint); }
.ct-pane-points .check-line:last-child { border-bottom: 0; }
/* «Пакети» виїзду (власник 2026-11-10): без зовнішньої панелі — два вікна однакової висоти (пакети виїзду ліворуч, доплати праворуч),
   список кожного — стовпцем і гортається всередині; одна «Зберегти» під обома. Форма display: contents, щоб вікна були клітинками
   однієї сітки. Поля «своя ціна / свої хвилини» — з підписами всередині (.ct-float). */
.ct-pk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: clamp(380px, calc(100dvh - 330px), 640px) auto; gap: 16px; }
.ct-pk-form { display: contents; }
.ct-pane-packages { grid-column: 1; grid-row: 1; }
.ct-pane-extras { grid-column: 2; grid-row: 1; }
.ct-pk-save { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin: 0; }
.ct-pk-item { padding: 12px 0 14px; border-bottom: 1px solid var(--line-faint); }
.ct-pk-item:last-child { border-bottom: 0; }
.ct-pk-item .check-line, .ct-pk-extra { align-items: center; min-height: 44px; padding: 0; border-bottom: 0; }
.ct-pk-extra { border-bottom: 1px solid var(--line-faint); }
.ct-pk-extra:last-child { border-bottom: 0; }
.ct-pk-base { margin-left: auto; padding-left: 12px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-pk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 0 34px; }
.ct-pk-none { margin: 0; padding: 14px 0; font-size: 14px; color: var(--text-3); }
/* Числові поля пакетів (правка власника 2026-11-15, знімок «Шаблон City Tour → Пакети й ціни»: у вузькій клітинці ціна «50.00» показувала
   одну цифру, стрілки number-поля налазили на число). .ct-num — і в шаблоні, і в «своя ціна / свої хвилини» виїзду: цифри однакової
   ширини, поле може стискатись, стрілки не перекривають значення (клавіші ↑↓ працюють). .ct-money — ціна з «€» всередині поля. */
.ct-num { min-width: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.ct-num::-webkit-inner-spin-button, .ct-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ct-money { position: relative; display: block; }
.ct-money .tinput { padding-right: 30px; }
.ct-money > i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13.5px; color: var(--text-3); pointer-events: none; }
/* Таблиця пакетів шаблону на всю ширину панелі: назва гнучка, числа фіксованої ширини з запасом під «1189.00», «Популярний» вузько по центру.
   Нижче 880 px таблиця гортається вбік усередині панелі, значення лишаються повними. */
.ct-tpl-pk-form.form { max-width: none; padding: 0; gap: 0; }
.ct-pk-table-wrap { overflow-x: auto; scrollbar-width: thin; }
.iris-table.ct-pk-table { table-layout: fixed; min-width: 820px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(n) { width: auto; text-align: right; white-space: nowrap; padding: 10px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(1) { text-align: left; padding-left: 18px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(2) { width: 108px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(3) { width: 132px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(4) { width: 116px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(5) { width: 156px; }
.iris-table.ct-pk-table :is(thead th, tbody td):nth-child(6) { width: 140px; text-align: center; padding-right: 18px; }
.iris-table.ct-pk-table thead th { overflow: hidden; text-overflow: ellipsis; }
.iris-table.ct-pk-table td:nth-child(6) .check { vertical-align: middle; }
.ct-pk-table .ct-num { text-align: right; }
@media (max-width: 900px) { .ct-pk { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; } .ct-pane-packages, .ct-pane-extras, .ct-pk-save { grid-column: 1; grid-row: auto; }
  .ct-pane-packages { max-height: 560px; } .ct-pane-extras { max-height: 420px; } .ct-pk-fields { margin-left: 0; } }
.ct-invite { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; max-width: none; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ct-invite .form-actions { grid-column: 3; grid-row: 1 / span 2; align-self: end; margin: 0; }
.ct-pane-crew .ct-pane-scroll { padding-top: 0; }
.ct-pane-crew .iris-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.form-field.ct-float > .tselect { height: 48px; padding: 20px 34px 4px 13px; }
.form-field.ct-float > select ~ label { transform: translateY(-13px) scale(.86); }
.ct-terms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 2fr); gap: 12px 24px; align-items: start; padding: 14px 18px 18px; }
.ct-terms-checks { display: flex; flex-direction: column; }
.ct-terms-checks .check-line { align-items: center; min-height: 44px; padding: 0; }
.form-field.ct-float.ct-terms-note > .tinput { height: 88px; padding-top: 24px; resize: vertical; }
@media (max-width: 1100px) {
  .ct-team { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .ct-pane-points, .ct-pane-crew, .ct-pane-terms, .ct-team-save, .ct-team-conflicts, .ct-pane-desk { grid-column: 1; grid-row: auto; }
  .ct-pane-points { max-height: 360px; }
  .ct-pane-crew { max-height: 560px; }
  .ct-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-terms-note { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .ct-invite, .ct-terms { grid-template-columns: minmax(0, 1fr); } .ct-invite .form-actions { grid-column: 1; grid-row: auto; } }
.ct-text-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 18px; padding: 12px 0; border-top: 1px solid var(--line-faint); align-items: start; }
.ct-text-row:first-child { border-top: 0; }
.ct-text-label { font-size: 13px; font-weight: 560; color: var(--text); padding-top: 9px; line-height: 1.35; }
.ct-text-label .hint { display: block; font-weight: 400; margin-top: 3px; }
.ct-text-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-field { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; align-items: start; }
.ct-lang { font-size: 11.5px; font-weight: 640; color: var(--text-3); letter-spacing: .04em; padding-top: 11px; }
.ct-field .tinput { font-size: 13.5px; }
.ct-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; padding: 14px 0 6px; border-top: 1px solid var(--line-faint); }
.ct-extras .form-field { margin: 0; }
.ct-extras .check-line { margin-top: 24px; padding: 0; }
.ct-media { padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line-faint); }
.ct-media-head { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.ct-media-head b { font-size: 13.5px; font-weight: 600; }
.ct-media-head .hint { margin: 0; }
.ct-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.ct-thumb { position: relative; width: 168px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-thumb img { display: block; width: 168px; height: 168px; object-fit: contain; background: #0d0d12; border-radius: var(--r-md); border: 1px solid var(--line); }
.ct-thumb.tpl img { opacity: .8; }
.ct-thumb.off img { opacity: .3; }
.ct-thumb .tag { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 7px; border-radius: var(--r-full); color: var(--text-2);
  background: color-mix(in srgb, var(--surface-1) 88%, transparent); border: 1px solid var(--line); }
.ct-thumb .tag-display { left: auto; right: 8px; }
.ct-thumb-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-thumb-tools .btn, .ct-thumb-actions .btn { padding-inline: 10px; }
.iris .ct-thumb-delete { color: var(--danger); }
.ct-thumb-form { display: flex; flex-direction: column; gap: 4px; }
.ct-thumb .tinput { font-size: 12.5px; padding: 6px 8px; }
.ct-thumb-actions { display: flex; gap: 6px; align-items: center; }
.ct-thumb-actions .tinput { width: 64px; }
.ct-upload { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ct-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 560px; min-height: 112px; padding: 18px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-3); color: var(--text-2); cursor: pointer; text-align: center;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
@media (hover: hover) and (pointer: fine) { .ct-drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface-3)); } }
.ct-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-3)); }
.ct-drop:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-drop svg { width: 22px; height: 22px; stroke-width: 1.8; color: var(--accent-text); }
.ct-drop b { color: var(--text); font-weight: 600; }
.ct-drop-t { font-size: 13px; }
.ct-drop-t span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ct-drop-preview { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ct-drop-preview:empty { display: none; }
.ct-drop-preview figure { margin: 0; width: 72px; font-size: 11px; color: var(--text-2); }
.ct-drop-preview img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.ct-drop-preview figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.ct-savebar { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 18px;
  background: color-mix(in srgb, var(--surface-1) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ct-savebar .hint { margin: 0; }
.ct-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ct-next .cell { padding: 14px 18px; border-right: 1px solid var(--line); }
.ct-next .cell:last-child { border-right: 0; }
.ct-next .k { font-size: 12px; color: var(--text-2); }
.ct-next .v { font-size: 14.5px; font-weight: 560; margin-top: 5px; }
@media (max-width: 900px) {
  .ct-text-row { grid-template-columns: 1fr; gap: 6px; }
  .ct-text-label { padding-top: 0; }
  .ct-text-fields { grid-template-columns: 1fr; }
}

/* ============ ОГЛЯД (редизайн 2026-10-30) ============
   Ліворуч — гроші місяця й стан платформи, праворуч — «Зараз». ≥1440 px: дві колонки, «Зараз» липне під шапкою;
   900–1439: «Зараз» — ряд карток під основною частиною; вужче — одна колонка. Руху немає: сторінку відкривають
   десятки разів на день, анімація тут лише заважала б. */
/* Огляд — сторінка карток, а не довгих таблиць: на дуже широких моніторах займає ширину й далі 1680 px. */
.content:has(> .dash) { max-width: 2240px; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-main > .panel { margin: 0 !important; }
.dash-main .ribbon { margin: 0; }
@media (min-width: 1440px) {
  .dash { grid-template-columns: minmax(0, 1fr) clamp(320px, 23vw, 400px); }
  .dash-rail { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin; }
}
@media (min-width: 900px) and (max-width: 1439px) {
  .dash-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}

.dash-money-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; padding: 20px 22px 4px; flex-wrap: wrap; }
.dash-money-title { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.dash-figure { font-family: var(--font-brand); font-size: clamp(30px, 2.1rem + 1.3vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04;
  margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-figure-sub { color: var(--text-2); font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.dash-more { flex: none; }
.dash-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 3px; height: 84px; padding: 14px 22px 0; }
.dash-day { display: block; height: max(var(--h), 3px); background: linear-gradient(180deg, var(--metric-cash), color-mix(in srgb, var(--metric-cash) 62%, transparent)); border-radius: 4px 4px 1px 1px; }
.dash-day.is-empty { background: var(--line-strong); opacity: 1; }
.dash-day.is-today { box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--accent-text); }
@media (hover: hover) and (pointer: fine) { .dash-day:hover { opacity: 1; } }
.dash-days-axis { display: flex; justify-content: space-between; padding: 6px 22px 2px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* Ряд показників (2026-11-07): окремі плитки в кольорі показника (див. «Плитки показників» нижче) — рівний ряд із п'яти;
   на телефоні дві колонки, остання плитка на всю ширину, щоб не лишалось «сироти». */
.dash-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 18px 18px 0; }
.dash-stats > div { padding: 12px 14px 0; min-width: 0; border-radius: var(--r-md); border: 1px solid var(--line-faint); background: var(--surface-1); }
.dash-stats dt { font-size: 12px; color: var(--text-2); }
.dash-stats dd { margin: 4px 0 0; font-size: 19px; font-weight: 620; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  /* 2026-11-11: у Safari плитка без тренду (немає SVG у третьому рядку subgrid) рахувала висоту числа як 0 — цифри ріжуться знизу
     (дашборд City Tour: Повернення, Витрати, IVA, Прибуток). Явна мін. висота рядка це виправляє; у Chrome нічого не міняє. */
  min-height: 1.4em; }
.dash-stats > div:not(:has(.metric-spark)) dd { margin-bottom: 12px; }
@media (max-width: 720px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.dash-note { color: var(--text-3); font-size: 12px; padding: 10px 18px 0; }
.dash-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 4px 28px; padding: 6px 18px 16px; }
.dash-split > div { min-width: 0; container-type: inline-size; }
.dash-sub { font-size: 12.5px; font-weight: 500; color: var(--text-2); margin: 8px 0 6px; }
.dash-split .iris-table { width: 100%; table-layout: auto; }
.dash-split .iris-table td { padding-left: 8px; padding-right: 8px; }
.mini-name, .iris-table.auto td.mini-name { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 460px) { .mini-ph { display: none; } }
@container (max-width: 340px) { .mini-meta { display: none; } }

.dash-ribbon a.cell { color: inherit; text-decoration: none; border-radius: 0; }
@media (hover: hover) and (pointer: fine) { .dash-ribbon a.cell:hover { background: var(--surface-3); } }
.dash-ribbon a.cell:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.dash-ribbon .cell.is-alert .v { color: var(--danger); }
@media (max-width: 720px) { .ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ribbon .cell:nth-child(2n) { border-right: none; } }

/* Без видимої шапки «Зараз» (2026-11-07): перша картка колонки стоїть на одній лінії з карткою каси. */
.dash-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.dash-card-head h3 { font-size: 14px; font-weight: 600; }
.dash-count { font-family: var(--font-brand); font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.dash-card.tone-warning .dash-count { color: var(--warning); }
.dash-card.tone-danger .dash-count { color: var(--danger); }
.dash-card.tone-muted .dash-count { color: var(--text-3); }
.dash-list { list-style: none; margin: 0; padding: 0 6px 8px; }
.dash-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: inherit; text-decoration: none; min-width: 0; }
a.dash-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { a.dash-item:hover { background: var(--surface-3); } }
.dash-item-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item-main b { font-weight: 560; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.dash-item-main span { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.dash-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-item-value { font-size: 13px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dash-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-tint); }
.dash-dot.warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-tint); }
.dash-empty { color: var(--text-3); font-size: 12.5px; padding: 0 16px 14px; }

/* ============ ПЛИТКИ ПОКАЗНИКІВ · «Колір за змістом» (рішення власника 2026-11-07) ============
   Тон (`data-metric-tone`) — колір показника з токенів --metric-*: ледь тоноване тло згори вниз, тонка межа того самого
   кольору, крапка біля підпису й тренд за період унизу. Число й підпис — чорнилом тексту (контраст ≥ 4.5:1 на будь-якому
   тлі плитки); колір несе лише позначки. Однаково на «Дашборді», в «Аналітиці» й у картці людини. */
[data-metric-tone="cash"] { --m: var(--metric-cash); }
[data-metric-tone="hours"] { --m: var(--metric-hours); }
[data-metric-tone="print"] { --m: var(--metric-print); }
[data-metric-tone="shifts"] { --m: var(--metric-shifts); }
.kpi[data-metric-tone], .dash-stats > [data-metric-tone] {
  position: relative; overflow: hidden; display: grid; row-gap: 0; align-content: start;
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 10%, var(--surface-1)), color-mix(in srgb, var(--m) 3%, var(--surface-1)) 75%);
  border-color: color-mix(in srgb, var(--m) 22%, var(--line-faint));
}
/* Рядки плиток спільні для всього ряду (subgrid): підпис у два рядки («Каса за годину») не зсуває числа сусідів, тренди
   стоять на одній лінії. Без subgrid — звичайна сітка в кожній плитці. */
.kpi-grid:has(> .kpi[data-metric-tone]) { grid-auto-rows: auto; row-gap: 0; }
.kpi-grid > .kpi[data-metric-tone] { grid-row: span 4; grid-template-rows: subgrid; margin-bottom: 12px; }
.kpi-grid > .kpi[data-metric-tone] > .metric-spark { grid-row: 4; align-self: end; }
.dash-stats { grid-auto-rows: auto; row-gap: 0; }
.dash-stats > [data-metric-tone] { grid-row: span 3; grid-template-rows: subgrid; margin-bottom: 10px; }
.dash-stats > [data-metric-tone] > .metric-spark { grid-row: 3; align-self: end; }
.kpi[data-metric-tone] { padding-bottom: 0; }
.kpi[data-metric-tone]:not(:has(.metric-spark)) { padding-bottom: 14px; }
.kpi[data-metric-tone] .label, .kpi[data-metric-tone] .subtle { color: var(--text-2); }
.kpi[data-metric-tone] .label::before, .dash-stats > [data-metric-tone] dt::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--m); margin-right: 7px; vertical-align: 1px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--m) 18%, transparent);
}
/* Тренд — на всю ширину плитки, притиснутий до низу: однакова лінія основи в усьому ряду, навіть коли в сусіда є підпис. */
.metric-spark { display: block; width: calc(100% + 32px); height: 28px; margin: 0 -16px; padding-top: 10px; box-sizing: content-box; overflow: visible; }
.dash-stats .metric-spark { width: calc(100% + 28px); margin: 0 -14px; }
/* «Разом за період» — шість плиток рівними рядами: 3 × 2 від середньої ширини, 2 × 3 на телефоні (без «сироти» 5 + 1);
   широка плитка лишає місце великим сумам — числа не обрізаються. */
.kpi-wrap { container-type: inline-size; }
.kpi-grid.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 560px) { .kpi-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpi-grid .value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.page-head .actions[data-section="analytics-actions"] { flex-wrap: wrap; }
.metric-spark .spark-line { fill: none; stroke: var(--m); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.metric-spark .spark-stop-top { stop-color: var(--m); stop-opacity: .28; }
.metric-spark .spark-stop-bottom { stop-color: var(--m); stop-opacity: 0; }
/* Останній відрізок — колір напрямку (вгору/вниз); рівно — тон плитки. Лінія декоративна: значення — число в плитці. */
.metric-spark .spark-tail { fill: none; stroke: var(--m); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.metric-spark[data-trend="up"] .spark-tail { stroke: var(--trend-up); }
.metric-spark[data-trend="down"] .spark-tail { stroke: var(--trend-down); }
@media (forced-colors: active) { .metric-spark .spark-line, .metric-spark .spark-tail { stroke: CanvasText; } .kpi[data-metric-tone] .label::before, .dash-stats > [data-metric-tone] dt::before { background: CanvasText; } }

/* ============ СПИСОК У БЛОЦІ (рішення власника 2026-11-07) ============
   Видно п'ять рядків, решта гортається всередині — картка не росте (точну висоту задає Stimulus `scroll-rows`, тут — запас
   без JS). Шапка таблиці й рядок «Разом» липнуть до країв; поки нижче є рядки — легке затухання знизу. */
.scroll-rows { position: relative; max-height: 320px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  scroll-padding-block: var(--head-h, 0px) var(--foot-h, 0px); }
.scroll-rows:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--r-sm); }
.scroll-rows thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.scroll-rows tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); }
.scroll-rows::after { content: ""; position: sticky; bottom: var(--foot-h, 0px); z-index: 1; display: block; height: 32px; margin-top: -32px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--scroll-fade-to, var(--surface-2))); opacity: 0; transition: opacity var(--dur-2) var(--ease); }
.scroll-rows[data-more]::after { opacity: 1; }
.iris-table tfoot td { padding: 13px 18px; font-size: 13.5px; vertical-align: middle; }
.iris-table.auto tfoot td:nth-child(4) { text-align: right; }
/* Назва точки чи ім'я — один рядок із трикрапкою й повним текстом у підказці (`.mini-name`: колонка бере лише залишок ширини),
   рядки однакової висоти. Щільніші колонки й короткі заголовки («За год», «Друк») у половинних блоках «Аналітики» — шість колонок уміщаються
   без горизонтального гортання. */
.analytics-grid .scroll-rows .iris-table :is(th, td) { padding-left: 10px; padding-right: 10px; }
.analytics-grid .scroll-rows .iris-table :is(th, td):first-child { padding-left: 18px; }
.analytics-grid .scroll-rows .iris-table :is(th, td):last-child { padding-right: 18px; }
.scroll-rows thead th { font-size: 11px; letter-spacing: .02em; vertical-align: bottom; }


/* ============ АГЕНТ · НАЛАШТУВАННЯ (docs/INTERNAL_AGENT.md етап 6) ============
 * Стеля витрат — тонка шкала без кольору, поки до стелі далеко; з 80 % (поріг сповіщення) — жовта, на стелі — червона,
 * і щоразу з поясненням текстом: колір лише підсилює, а не несе зміст. */
.agent-settings-note { padding: 12px 18px 16px; color: var(--text-2); font-size: 13px; max-width: 72ch; }
.agent-caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; padding: 18px 18px 4px; }
.agent-cap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.agent-cap-label { font-size: 13px; color: var(--text-2); }
.agent-cap-sum { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.agent-cap-sum b { font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -.02em; margin-right: 2px; }
.agent-meter { margin-top: 10px; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.agent-meter > span { display: block; height: 100%; width: var(--share); background: var(--text-2); border-radius: inherit; }
.agent-cap.is-near .agent-meter > span { background: var(--warning); }
.agent-cap.is-over .agent-meter > span { background: var(--danger); }
.agent-cap-state { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.agent-settings-foot { margin-top: 14px; color: var(--text-2); font-size: 12.5px; line-height: 1.6; max-width: 80ch; }
.agent-settings-foot p + p { margin-top: 4px; }
/* Журнал «хто відкривав розмови» (Агент клієнтів): на вузькому екрані таблиця гортається в панелі, не розпирає сторінку. */
.cc-access-scroll { overflow-x: auto; }
.iris-table.auto.cc-access-table .cc-access-wide { width: 1%; padding-right: 40px; }
.cc-access-table td:nth-child(2) { overflow-wrap: anywhere; }
.cc-access-table .subtle { margin-left: 8px; }
/* «Шаблони Meta» (Агент клієнтів, docs/CLIENT_AGENT.md §4.5): точні тексти — джерело, з якого власник створює шаблон у Bird. */
.ca-template { padding: 14px 18px; border-top: 1px solid var(--line-faint); }
.ca-template-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ca-template-name { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.ca-template-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 8px 0 12px; font-size: 13px; }
.ca-template-facts dt { color: var(--text-3); }
.ca-template-facts dd { margin: 0; color: var(--text); }
.ca-template-text { margin: 0 0 10px; }
.ca-template-text figcaption { font-size: 12.5px; color: var(--text-2); margin-bottom: 4px; }
.ca-template-text figcaption .subtle { margin-left: 6px; }
.ca-template-text blockquote { margin: 0; padding: 10px 12px; max-width: 72ch; border-left: 2px solid var(--line-strong); border-radius: var(--r-sm);
                               background: var(--surface-2); color: var(--text); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.cc-access-code { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: -.02em; }
span.cc-access-code { color: var(--text-2); }
.cc-access-meta { display: none; }
@media (max-width: 640px) {
  .iris-table.auto.cc-access-table .cc-access-wide { display: none; }
  .cc-access-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
}
@media (max-width: 640px) { .agent-caps { grid-template-columns: 1fr; } }

/* ===== Головна City Tour (редизайн 2026-10-30): міста зверху, статистика знизу ===== */
/* «Усі бронювання» в шапці головної — помітніша (зауваження власника 2026-10-30): іконка й світліша рамка. */
.ct-all-bookings { border-color: var(--line-strong); font-weight: 600; }
.ct-city-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ct-city-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ct-all-bookings svg { width: 16px; height: 16px; margin-right: 6px; }
.ct-home-cities .panel-head { gap: 10px 14px; }
.ct-home-cities .panel-head h3 .n, .ct-chips .chip .n { margin-left: 6px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ct-search { position: relative; flex: 1 1 200px; max-width: 300px; }
.ct-search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.ct-search .tinput { padding-left: 34px; height: 34px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chips .chip { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: var(--r-full); border: 1px solid var(--line);
  background: var(--surface-input); color: var(--text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.ct-chips .chip:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); }
.ct-chips .chip.on { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.ct-chips .chip:disabled { opacity: .45; cursor: default; }
.ct-chips .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ct-chips .chip:has(input:focus-visible), .ct-chips .chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-home-cities .segmented button { padding: 6px 9px; }
/* Вікно міст: обмежена висота, власна прокрутка — зверху список не росте в нескінченність. */
.ct-scroll { max-height: 460px; overflow: auto; padding: 16px 18px 18px; scrollbar-gutter: stable; }
.ct-scroll:has(> table) { padding: 0; }
.ct-scroll .ct-none { padding: 6px 0 0; }
.ct-city-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ct-city { background: var(--surface-1); cursor: pointer; animation: tile-rise .3s cubic-bezier(.23, 1, .32, 1) backwards; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
.ct-city .top { align-items: flex-start; }
.ct-city .top .org-card-body { flex: 1 1 auto; min-width: 0; }
.ct-city .top .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-city-when .status-dot { margin-bottom: 6px; }
.ct-city.st-open { border-color: color-mix(in srgb, var(--success) 38%, var(--line)); }
.ct-city.st-off { opacity: .7; }
.ct-city-when { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ct-city-when b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ct-city-when span { font-size: 12px; color: var(--text-3); }
/* Позначка дизайну сторінки на плитці (бриф HQ 2026-11-04 §A.7). */
.ct-city-when .ct-city-design { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.form-field .hint.warn { color: var(--warning); }
.ct-city-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-faint); }
.ct-city-nums b { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-city-nums span { font-size: 11.5px; color: var(--text-3); line-height: 1.3; }
.status-dot.muted { color: var(--text-3); }
.iris-table.tour-cities-table :is(thead th, tbody td):nth-child(n) { width: auto; }
.iris-table.tour-cities-table :is(thead th, tbody td):nth-child(4) { text-align: right; }
.iris-table.tour-cities-table .mono.subtle { margin-left: 6px; font-size: 12px; }

/* Статистика: фільтри в шапці панелі, картки, графік, чотири колонки розбивок. */
.ct-dash .panel-head { border-bottom: none; padding-bottom: 8px; }
.ct-dash .panel-head h3 .sub { margin-left: 8px; font-weight: 500; }
.ct-dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 0 18px 14px; border-bottom: 1px solid var(--line); }
.ct-dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ct-dates label, .ct-select { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.ct-dates .tinput { height: 34px; width: 150px; }
.ct-select .tselect { height: 34px; width: auto; min-width: 160px; max-width: 280px; }
.ct-kpis { padding: 16px 18px 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .ct-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Нижня частина статистики (зауваження власника 2026-10-30: «блоки напливають один на один»): кожен блок — своя картка
   на темнішому тлі, графік і реклама — на всю ширину; кольори за змістом — перегляди сині, оплати й гроші зелені,
   витрати червоні, «почали оплату» бурштинові. */
.ct-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 16px 18px 6px; }
.ct-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px 12px; min-width: 0; }
.ct-card > h4 { font-size: 13px; font-weight: 600; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ct-card-chart, .ct-card-ads { grid-column: 1 / -1; }
.kpi .value.pos { color: var(--success); }
.kpi .value.cost { color: var(--danger); }
.ct-dash-col .plain-list li b.cost { color: var(--danger); }
.ct-dash-chart { padding: 12px 18px 0; }
.ct-dash-sub { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.ct-dash-sub h4, .ct-dash-col h4 { font-size: 13px; font-weight: 600; }
.ct-dash-sub .legend { font-size: 12px; color: var(--text-3); display: inline-flex; gap: 12px; align-items: center; }
.ct-dash-sub .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: color-mix(in srgb, var(--info) 75%, transparent); }
.ct-dash-sub .legend i.dot { border-radius: 50%; background: var(--success); }
.ct-chart { width: 100%; height: auto; display: block; max-height: 220px; }
.ct-chart .grid { stroke: var(--line); stroke-width: 1; }
.ct-chart .axis { fill: var(--text-3); font-size: 10px; font-family: inherit; }
.ct-chart .bar { fill: color-mix(in srgb, var(--info) 65%, transparent); transition: fill var(--dur-1) var(--ease); }
.ct-chart .bar:hover { fill: var(--info); }
.ct-chart .line { fill: none; stroke: var(--success); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ct-chart .dot { fill: var(--success); stroke: var(--surface-1); stroke-width: 2; }
.ct-dash-col h4 { margin-bottom: 8px; }
.ct-dash-col .ct-dash-h4 { margin-top: 14px; }
.ct-dash-col .plain-list { list-style: none; padding: 0; margin: 0 0 6px; }
.ct-dash-col .plain-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; margin: 0; border-bottom: 1px solid var(--line-faint); font-size: 13px; }
.ct-dash-col .plain-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-dash-more { margin-top: 10px; }
/* Глибина перегляду: частка переглядів, що дійшли до розділу, смужкою під підписом. */
.ct-depth { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ct-depth li { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; font-size: 13px; }
.ct-depth li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-depth li b em { font-style: normal; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.ct-depth li i { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.ct-depth li i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); background: var(--info); border-radius: 3px; }
.ct-funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-funnel li { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-faint); border-left-width: 3px; }
.ct-funnel li.step-views { border-left-color: var(--info); }
.ct-funnel li.step-checkouts { border-left-color: var(--warning); }
.ct-funnel li.step-paid { border-left-color: var(--success); }
.ct-funnel li.step-paid b { color: var(--success); }
.ct-funnel b { font-size: 18px; font-weight: 600; min-width: 44px; font-variant-numeric: tabular-nums; }
.ct-funnel span { color: var(--text-2); font-size: 13px; }
.ct-funnel em { margin-left: auto; font-style: normal; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ct-dash-hint { padding: 8px 18px 16px; margin: 0; }
/* Реклама Meta: смуга під розбивками — шість малих карток і таблиця кампаній з вибором виїзду. */
.ct-card-ads .ct-dash-sub { justify-content: space-between; }
.ct-ads-hint { margin: 0 0 8px; }
.ct-kpis-ads { padding: 6px 0 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ct-kpis-ads .kpi { padding: 10px 12px; background: var(--surface-2); }
.ct-kpis-ads .kpi .value { font-size: 18px; }
@media (max-width: 900px) { .ct-kpis-ads { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.iris-table.tour-ads-table :is(thead th, tbody td):nth-child(n) { width: auto; }
.iris-table.tour-ads-table :is(thead th, tbody td):nth-child(4) { text-align: right; }
.iris-table.tour-ads-table tbody tr.ct-ads-unassigned td:first-child { border-left: 3px solid var(--warning); }
.ct-ads-map .tselect { height: 32px; min-width: 200px; width: auto; }
@media (max-width: 720px) {
  .ct-scroll { max-height: 540px; }
  .ct-search { max-width: none; flex-basis: 100%; }
  .ct-select .tselect { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ct-city { animation: none; } }

/* Оголошення Meta (2026-10-31): широка таблиця прокручується вбік, не ламаючи картку. */
.ct-scroll-x { overflow-x: auto; max-width: 100%; }
.tour-creatives-table { min-width: 880px; }
.tour-creatives-table .ct-untagged td { border-top: 1px dashed var(--line); }

/* Відвідувачі City Tour (2026-10-31): статистика, як на сайті. Головне — кроки бронювання зі «сходинками» й найбільшим
   відтоком; решта — тихі смуги й стовпчики в тих самих картках. */
.ct-aud { padding: 18px 18px 6px; border-top: 1px solid var(--line); margin-top: 12px; }
.ct-aud-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
.ct-aud-head h4 { font-size: 15px; font-weight: 600; margin: 0; }
.ct-aud-head .hint { margin: 0; }
.ct-aud-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; }
.ct-aud-kpis .kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 900px) { .ct-aud-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ct-aud-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
/* Ряди по 4 колонки без порожніх клітинок: кроки + джерела, години + дні тижня, далі чотири списки. */
.ct-aud-steps, .ct-aud-hours, .ct-aud-wide { grid-column: span 2; }
.ct-aud-recent { grid-column: 1 / -1; }
@media (max-width: 1100px) { .ct-aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .ct-aud-wide { grid-column: auto; } }
@media (max-width: 640px) { .ct-aud-grid { grid-template-columns: minmax(0, 1fr); } .ct-aud-steps, .ct-aud-hours { grid-column: auto; } }
.ct-aud .ct-card .hint { margin: 8px 0 0; font-size: 12px; }
.ct-aud-empty { margin: 0 0 10px; }
.ct-aud-foot { margin: 12px 0 0; }

.ct-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-steps li { display: grid; grid-template-columns: 22px 1fr auto; column-gap: 10px; row-gap: 4px; align-items: baseline; font-size: 13px; }
.ct-steps .n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.ct-steps b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-steps b em { font-style: normal; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.ct-steps i { grid-column: 2 / -1; display: block; height: 6px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.ct-steps i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); background: var(--accent); border-radius: 3px; }
.ct-steps small { grid-column: 2 / -1; color: var(--text-3); font-size: 12px; }
.ct-steps li.worst .n { background: var(--danger-tint); color: var(--danger); }
.ct-steps li.worst small strong { color: var(--danger); font-weight: 600; }
.ct-steps li.paid .n { background: var(--success-tint); color: var(--success); }
.ct-steps li.paid b { color: var(--success); font-size: 15px; }

.ct-bars { width: 100%; height: auto; display: block; max-height: 140px; }
.ct-bars .bar { fill: color-mix(in srgb, var(--accent) 55%, transparent); }
.ct-bars .bar.peak { fill: var(--accent-text); }
.ct-bars .axis { fill: var(--text-3); font-size: 10px; font-family: inherit; }

.ct-visits { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.ct-visits > li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 120px; column-gap: 14px; row-gap: 6px; padding: 10px 0;
  border-bottom: 1px solid var(--line-faint); font-size: 13px; }
.ct-visits > li > time { color: var(--text-3); font-variant-numeric: tabular-nums; grid-row: span 2; }
.ct-visits .who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-visits .tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-faint); color: var(--text-2); }
.ct-visits .trail { grid-column: 2; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--text-2); font-size: 12px; }
.ct-visits .trail li + li::before { content: "›"; margin: 0 6px; color: var(--text-3); }
.ct-visits .trail.none { color: var(--text-3); }
.ct-visits .stay { grid-column: 3; grid-row: 1 / span 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ct-visits .stay b { font-variant-numeric: tabular-nums; }
.ct-visits .stay i { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--surface-3); position: relative; overflow: hidden; }
.ct-visits .stay i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); background: var(--info); }
.ct-visits .stay em { font-style: normal; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .ct-visits > li { grid-template-columns: minmax(0, 1fr) 84px; }
  .ct-visits > li > time { grid-row: auto; grid-column: 1; }
  .ct-visits .trail { grid-column: 1 / -1; }
  .ct-visits .stay { grid-column: 2; grid-row: 1 / span 2; }
}

/* ===== City Tour: версії сайту з редактора (docs/CITY_TOUR_SITE_EDITOR.md, 2026-11-04) ===== */
/* Вигляд 2026-11-15 (зауваження власника: блоки налазили, забагато дрібного сірого): заголовки колонок і всі підписи — не дрібніше
   13px; «Де показується» — чотири міста й «ще N»; «В архів» — своя колонка. */
.ct-layouts thead th, .ct-people-table thead th { font-size: 13px; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.ct-layouts tbody td, .ct-people-table tbody td { vertical-align: top; }
.iris-table.auto.ct-layouts td:first-child { min-width: 170px; }
.iris-table.auto.ct-layouts td:nth-child(4) { width: 42%; min-width: 260px; }
.ct-layouts .status-dot { font-size: 13.5px; white-space: normal; }
.ct-layouts-empty { color: var(--text-3); }
.ct-usage { display: grid; gap: 6px; line-height: 1.5; }
.ct-usage-none { color: var(--text-2); }
.ct-usage-more > summary { display: inline-block; margin-top: 2px; color: var(--text-2); cursor: pointer; list-style: none; border-bottom: 1px dashed var(--line-strong); }
.ct-usage-more > summary::-webkit-details-marker { display: none; }
.ct-usage-more > summary:hover { color: var(--text); }
.ct-usage-more > summary:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 2px var(--focus-ring); }
.ct-usage-more[open] > summary { display: none; }
.ct-usage-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--text-2); font-size: 13px; }
.ct-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 16px; }
.ct-editor-side { display: grid; gap: 16px; }
.ct-editor-form.form { max-width: none; }
.ct-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-code { min-height: 520px; white-space: pre; overflow-wrap: normal; overflow-x: auto; tab-size: 2; }
.ct-check-warnings { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--warning); font-size: 13px; }
.ct-preview-form { display: flex; gap: 8px; align-items: center; }
.ct-preview-form .tselect { width: 180px; }
.ct-publish-form.form { padding: 0; }
.ct-block-body .status-dot { display: flex; margin: 10px 0; }

/* ===== City Tour: доступ через конектор і картка людини (рішення власника й HQ 2026-11-15) ===== */
.ct-people-table .ct-people-name { font-size: 14px; }
.ct-perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ct-perms li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.ct-perms b { font-weight: 560; }
.ct-perms span { color: var(--text-2); }
.ct-people-granted span { display: block; margin-top: 2px; color: var(--text-2); font-size: 13px; }
.iris-table.auto .ct-people-go { width: 44px; color: var(--text-3); vertical-align: middle; }
.ct-people-go svg { width: 16px; height: 16px; stroke-width: 1.8; transition: transform var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.ct-people-table tr:hover .ct-people-go svg { color: var(--text); transform: translateX(2px); }
.ct-people-empty { margin: 0; padding: 18px; color: var(--text-2); font-size: 13.5px; }

.ct-popover { width: min(420px, calc(100vw - 32px)); margin: auto; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-1); color: var(--text); box-shadow: var(--shadow-2); opacity: 1; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete; }
.ct-popover:not(:popover-open) { opacity: 0; transform: translateY(6px) scale(.985); transition-duration: var(--dur-1); }
@starting-style { .ct-popover:popover-open { opacity: 0; transform: translateY(6px) scale(.985); } }
.ct-popover::backdrop { background: rgba(0, 0, 0, .55); }
.ct-popover h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ct-popover p, .ct-grant-page p { margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.ct-grant-form { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-grant-form .tselect { flex: 1 1 200px; width: auto; }
.ct-grant-page { max-width: 520px; padding: 20px; }

.ct-card-warning { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-md); background: var(--warning-tint); color: var(--warning); font-size: 13.5px; line-height: 1.5; }
.ct-card-summary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 0; }
.ct-card-summary dl > div { padding: 16px 18px; }
.ct-card-summary dt { margin-bottom: 8px; color: var(--text-2); font-size: 13px; }
.ct-card-summary dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13.5px; }
.ct-card-summary .status-dot, .ct-switch-line .status-dot { font-size: 13.5px; }
.ct-card-when { color: var(--text-2); font-size: 13px; }
.ct-role { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-full); background: var(--surface-3); font-size: 13px; }
.ct-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.ct-access-form { display: flex; flex-direction: column; padding: 6px 18px 18px; }
.ct-access-form .check-line { align-items: center; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line-faint); }
.ct-access-form .check-line:first-of-type { border-bottom-color: var(--line); }
/* Права, що залежать від «Читання», — з відступом: видно, що без нього вони не діють. */
.ct-access-form .check-line + .check-line { padding-left: 30px; }
.ct-access-form .check-line .check { margin-top: 0; }
.ct-access-form .check-line .t b { font-size: 14px; }
.ct-access-form .check-line .t span { margin-top: 2px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.ct-access-form .check-line.is-off { cursor: default; }
.ct-access-form .check-line.is-off .t, .ct-access-form .check-line.is-off .t span { color: var(--text-3); }
.check input:disabled { cursor: not-allowed; }
.check input:disabled + .box { opacity: .45; }
.ct-switch-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 14px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.ct-access-form .form-actions { padding-top: 16px; }
.ct-tool-groups { list-style: none; margin: 0; padding: 6px 18px 0; }
.ct-tool-groups li { padding: 11px 0; border-bottom: 1px solid var(--line-faint); font-size: 14px; }
.ct-tool-groups li:last-child { border-bottom: none; }
.ct-tool-pending { display: block; margin-top: 2px; color: var(--text-2); font-size: 13px; }
.ct-card-note { margin: 0; padding: 12px 18px 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.ct-history-list { list-style: none; margin: 0; padding: 4px 18px 10px; }
.ct-history-list li { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line-faint); }
.ct-history-list li:last-child { border-bottom: none; }
.ct-history-list b { font-weight: 560; font-size: 14px; }
.ct-history-list li span { display: block; color: var(--text); font-size: 13.5px; }
.ct-history-meta { color: var(--text-2); font-size: 13px; }
@media (max-width: 900px) { .ct-card-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  /* Таблиці версій і людей — рядки-картки: без горизонтальної прокрутки й без накладань на телефоні. */
  .ct-layouts thead, .ct-people-table thead { display: none; }
  .ct-layouts, .ct-layouts tbody, .ct-layouts tr, .ct-people-table, .ct-people-table tbody, .ct-people-table tr { display: block; width: auto; }
  .ct-layouts tr, .ct-people-table tr { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--line-faint); }
  .ct-layouts tr:last-child, .ct-people-table tr:last-child { border-bottom: none; }
  .iris-table.auto.ct-layouts tbody td, .iris-table.auto.ct-people-table tbody td { display: block; width: auto; min-width: 0; padding: 3px 0; border: none; text-align: left; white-space: normal; }
  .ct-layouts td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-top: 6px; color: var(--text-2); font-size: 13px; }
  .ct-layouts td:first-child { font-size: 15px; }
  .ct-layouts td.ct-layouts-empty { display: none; }
  .iris-table.auto.ct-people-table .ct-people-go { position: absolute; top: 16px; right: 16px; width: auto; padding: 0; }
  .ct-people-table .ct-people-name { padding-right: 28px; font-size: 15px; }
  .ct-access-form .check-line + .check-line { padding-left: 22px; }
}
.ct-history { margin-top: 0; }
@media (max-width: 1100px) { .ct-editor { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .ct-editor-grid { grid-template-columns: 1fr; }
  .ct-code { min-height: 320px; }
  .ct-preview-form { width: 100%; }
  .ct-preview-form .tselect { flex: 1; width: auto; }
}

/* ============ ПІДКЛЮЧЕННЯ API (редизайн 2026-11-06, рішення власника) ============
 * Сітка однакових плиток: знак у чорному «гнізді», назва, стан, категорія й опис. Колір на сторінці — у знаках сервісів (фірмові кольори, власник 2026-11-07)
 * (фірмовий колір із Simple Icons), решта монохром; лаванда — тільки фокус і первинні дії. Плитка фіксованої висоти,
 * назва в один рядок з трикрапкою — жодного переповнення на будь-якій ширині. Клік — компактна картка в діалозі,
 * звідти — повна сторінка сервісу з історією. */
/* Одна сітка однакових плиток (власник 2026-11-07: більші, без груп і фільтра). На телефоні — одна колонка. */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.int-tile { display: flex; flex-direction: column; gap: 12px; height: 190px; min-width: 0; padding: 18px 18px 16px; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
@media (hover: hover) and (pointer: fine) { .int-tile:hover { border-color: var(--line-strong); background: var(--surface-3); } }
.int-tile:active { transform: scale(.985); }
.int-tile:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.int-tile[aria-busy="true"] { border-color: var(--line-strong); }
.int-tile-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.int-tile-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.int-tile-cat { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
/* Опис — до трьох рядків, далі трикрапка; висота плитки однакова. */
.int-tile-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin-top: -6px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
/* Назва — до двох рядків («Support Assistant (Claude)» на вузькій плитці), далі трикрапка; висота плитки не змінюється. */
.int-tile-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--text); letter-spacing: -.01em; overflow-wrap: anywhere; }

/* Стан: суцільна крапка — є ключі; порожнє кільце — «не підключено» (різниця формою, а не лише кольором). */
.int-status { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, transparent); box-shadow: inset 0 0 0 1.5px var(--dot-ring, var(--dot, transparent)); }
.int-status.is-connected { --dot: var(--success); color: var(--text); }
.int-status.is-error { --dot: var(--danger); color: var(--danger); }
.int-status.is-paused { --dot: var(--text-3); }
.int-status.is-none { --dot-ring: var(--text-3); }

/* Знак сервісу: чорне «гніздо» з волосяною межею; сірий, доки сервіс не підключено. */
/* Знаки — завжди у фірмовому кольорі (власник 2026-11-07); чорно-білі бренди (Apple, Revolut, DeepL) і монограми — білим. */
.int-logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); color: var(--logo, var(--text)); }
.int-logo svg { width: 20px; height: 20px; display: block; }
.int-logo.is-live { border-color: var(--line-strong); }
.int-logo-letter { font: 650 16px/1 var(--font-brand); letter-spacing: -.01em; }
.int-logo-lg { width: 52px; height: 52px; border-radius: var(--r-md); }
.int-logo-lg svg { width: 26px; height: 26px; }
.int-logo-lg .int-logo-letter { font-size: 21px; }
.int-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px; color: var(--text-2); font-size: 13.5px; }

/* Діалог — компактна картка над сіткою. Відкриття — коротке проявлення з легким підйомом (180 мс); з «менше руху» — лише проявлення. */
.int-dialog { width: min(460px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-1); color: var(--text); box-shadow: var(--shadow-2); opacity: 1; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete; }
.int-dialog:not([open]) { opacity: 0; transform: translateY(6px) scale(.985); transition-duration: var(--dur-1); }
@starting-style { .int-dialog[open] { opacity: 0; transform: translateY(6px) scale(.985); } }
.int-dialog::backdrop { background: rgba(0, 0, 0, .6); opacity: 1; transition: opacity var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete; }
.int-dialog:not([open])::backdrop { opacity: 0; }
@starting-style { .int-dialog[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .int-dialog, .int-dialog:not([open]) { transform: none; }
  @starting-style { .int-dialog[open] { transform: none; } }
  .int-tile, .int-tile:active { transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); transform: none; }
}
.int-card { padding: 20px; }
.int-card-head { display: flex; align-items: center; gap: 14px; }
.int-card-who { flex: 1; min-width: 0; }
.int-card-who h2 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere; text-wrap: balance; }
.int-card-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.int-card-sub > span:not(.int-status) { overflow-wrap: anywhere; }
.int-close { flex: none; align-self: flex-start; width: 32px; height: 32px; margin: -4px -6px 0 0; display: grid; place-items: center; border-radius: var(--r-sm); border: none; background: none; color: var(--text-2); cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.int-close svg { width: 16px; height: 16px; }
.int-close:hover { background: var(--surface-3); color: var(--text); }
.int-close:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus-ring); }
@media (pointer: coarse) { .int-close { width: 44px; height: 44px; margin: -8px -10px 0 0; } .int-open-full { padding: 12px 2px; } }
.int-card-text { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); max-width: 68ch; overflow-wrap: anywhere; }
.int-panel-body > .int-card-text:first-child { margin-top: 0; }
.int-alert { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--danger-tint); color: var(--text); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.int-facts { margin: 16px 0 0; border-top: 1px solid var(--line-faint); }
.int-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-faint); font-size: 13px; }
.int-fact dt { color: var(--text-2); min-width: 0; flex: 1 1 auto; }
.int-fact dd { margin: 0; flex: 0 1 55%; min-width: 0; text-align: right; color: var(--text); overflow-wrap: anywhere; }
.int-fact dd.is-empty { color: var(--text-2); }
.int-fact dd.is-set::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--success); vertical-align: 1px; }
.int-value { font-family: var(--font-mono); font-size: 12px; letter-spacing: -.02em; }
.int-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; }
.int-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.int-card-foot form, .int-hero-actions form { margin: 0; }
.int-open-full { margin-left: auto; font-size: 13px; padding: 6px 2px; }
.int-card .form { padding: 18px 0 0; max-width: none; }

/* Повна сторінка сервісу */
.int-crumb { margin: -6px 0 14px -10px; }
.int-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 18px; padding: 20px 22px; }
.int-hero-who { flex: 1 1 260px; min-width: 0; }
.int-hero-who h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.int-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.int-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.int-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.int-panel-body { padding: 16px 18px 18px; }
.int-panel-body > .int-facts:first-child { margin-top: 0; border-top: none; }
.int-note { margin-top: 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
p.int-note.int-panel-body { margin-top: 0; }
.int-form-panel { margin-top: 16px; padding: 20px 22px 4px; }
.int-form-panel > .int-card-text { margin-top: 0; }
.int-form-panel .form { padding: 18px 0 20px; }
.int-secrets { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 16px 0 0; border: none; border-top: 1px solid var(--line-faint); min-width: 0; }
.int-secrets legend { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.int-history { list-style: none; margin: 0; padding: 4px 18px 8px; }
.int-event { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-faint); }
.int-event:last-child { border-bottom: none; }
.int-event-mark { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--text-3); }
.int-event.is-ok .int-event-mark { background: var(--success); }
.int-event.is-bad .int-event-mark { background: var(--danger); }
.int-event-title { font-size: 13.5px; font-weight: 560; color: var(--text); }
.int-event-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 12px; color: var(--text-2); }
.int-event-keys { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.int-event-keys li { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border-radius: var(--r-sm); background: var(--surface-3); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.int-fp { font-family: var(--font-mono); font-size: 11.5px; color: var(--text); letter-spacing: .02em; }
.int-event-message { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; overflow-wrap: anywhere; }
/* Вхідні токени (редизайн 2026-11-09): ті самі плитка й діалог; у картці скоупу — одноразовий токен, список токенів
 * волосяними лініями (як «Поля» сервісу) і форма нового токена. Стан «замінюється» — жовта крапка. */
.int-status.is-warning { --dot: var(--warning); color: var(--text); }
.int-reveal { margin: 16px 0 0; padding: 14px 16px; }
.int-reveal h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.int-reveal p { overflow-wrap: anywhere; }
.int-reveal .invite-link { flex-wrap: wrap; }
.int-reveal .invite-link input { flex: 1 1 220px; min-width: 0; }
.int-tokens { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line-faint); }
.int-token { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line-faint); min-width: 0; }
.int-token-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.int-token-name { min-width: 0; font-size: 13.5px; font-weight: 560; color: var(--text); overflow-wrap: anywhere; }
.int-token.is-revoked .int-token-name, .int-token.is-expired .int-token-name { color: var(--text-2); }
.int-token-head .int-status { flex: none; }
.int-token-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 12px; line-height: 1.5; }
.int-token-meta > div { display: contents; }
.int-token-meta dt { color: var(--text-2); }
.int-token-meta dd { margin: 0; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.int-token-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.int-token-actions form { margin: 0; }
p.int-token-empty { margin-top: 16px; }
.int-token-new { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-faint); }
.int-tokens + .int-token-new { margin-top: 0; border-top: none; }
.int-token-new-label { font-size: 13px; font-weight: 600; color: var(--text); }
.int-token-new-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.int-token-new-row .tinput { flex: 1 1 200px; min-width: 0; }
.int-token-page { max-width: 640px; }
@media (pointer: coarse) { .int-token-actions .btn, .int-token-new-row .btn, .int-token-new-row .tinput, .int-reveal .invite-link .btn, .int-reveal .invite-link input { height: 44px; } }
.int-token-page .int-card-who h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
@media (max-width: 960px) { .int-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .int-hero { padding: 18px; }
  .int-hero-actions { width: 100%; }
  .int-card { padding: 18px 16px; }
  .int-fact { flex-direction: column; gap: 2px; }
  .int-fact dd { flex-basis: auto; text-align: left; }
  .int-open-full { margin-left: 0; width: 100%; }
}

/* City Tour, правки власника 2026-11-09. Фільтри міст: насиченіші чіпи й пошук — увімкнений чіп у лавандовому акценті, чіткіші
   межі й лічильники, миттєвий відгук на натискання (transform/opacity, 120–180 мс). */
.ct-home-cities .panel-head { gap: 10px; }
/* «Міста й виїзди» (2026-11-11): робоче вікно до низу екрана. Шапка з пошуком і фільтрами лишається, плитки/список гортаються
   всередині (висоту від верху сторінки міряє Stimulus `tour-home` → --ct-home-top). Вужче 900 px чи нижче 600 px — як було
   (обмежена висота блоку). */
@media (min-width: 900px) and (min-height: 600px) {
  .content:has(> .ct-home-cities) { padding-bottom: 24px; }
  .ct-home-cities { display: flex; flex-direction: column; height: max(calc(100dvh - var(--ct-home-top, 146px) - 24px), 420px); }
  .ct-home-cities > .panel-head { flex: none; }
  .ct-home-cities > .ct-scroll:not([hidden]) { flex: 1; min-height: 0; max-height: none; }
}
/* Вкладка «Бронювання» виїзду (власник 2026-11-10): одне вікно до низу екрана, таблиця гортається всередині, шапка таблиці
   тримається зверху. Стан — крапка-форма + текст (не лише колір): кільце (заброньовано) → суцільна (прийшов) → риска
   (скасовано, повернено, не оплачено). Висоту від верху сторінки міряє Stimulus `fit-bottom` → --fit-top. */
.ct-bk { display: flex; flex-direction: column; }
.ct-bk-head { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ct-bk-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.ct-bk-filters .tselect { width: auto; min-width: 150px; min-height: 40px; }
.ct-bk-count { margin-right: auto; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ct-bk-csv { min-height: 40px; padding-inline: 20px; font-weight: 600; }
.ct-bk-scroll { flex: 1; min-height: 0; max-height: min(70dvh, 720px); overflow: auto; scrollbar-gutter: stable; }
.ct-bk-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); white-space: nowrap; }
.iris-table.ct-bk-table { table-layout: auto; }
.iris-table.ct-bk-table thead th:nth-child(n), .iris-table.ct-bk-table tbody td:nth-child(n) { width: auto; text-align: left; }
.ct-bk-table tbody td { vertical-align: top; }
.ct-bk-table .ct-bk-sub { display: block; margin-top: 2px; font-size: 12px; }
.ct-bk-table .ct-bk-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-bk-table .ct-bk-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-bk-eyes { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
  color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ct-bk-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ct-bk-state::before { content: ""; flex: none; box-sizing: border-box; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--violet-400); }
.ct-bk-state.s-checked_in::before { border-color: var(--success); background: var(--success); }
.ct-bk-state.s-cancelled::before, .ct-bk-state.s-refunded::before, .ct-bk-state.s-expired::before { width: 10px; height: 2px; border: 0; border-radius: 1px; background: var(--text-3); }
.ct-bk-more { margin: 0; padding: 14px 18px; font-size: 13px; color: var(--text-2); }
@media (min-width: 900px) and (min-height: 600px) {
  .content:has(.ct-tab:not([hidden]) > .ct-bk) { padding-bottom: 24px; }
  .ct-bk { height: max(calc(100dvh - var(--fit-top, 240px) - 24px), 420px); }
  .ct-bk-scroll { max-height: none; }
}
@media (max-width: 760px) { .ct-bk-filters, .ct-bk-filters .tselect { width: 100%; } .ct-bk-csv { width: 100%; } }
.ct-search .tinput { background: var(--surface-2); border-color: var(--line-strong); }
.ct-search .tinput:focus { border-color: var(--accent); box-shadow: var(--accent-glow); }
.ct-chips .chip { background: var(--surface-2); border-color: var(--line-strong); color: var(--text-2); font-weight: 550;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.ct-chips .chip .n { color: var(--text-3); }
.ct-chips .chip:hover:not(:disabled) { background: var(--accent-tint); border-color: var(--violet-400); color: var(--text); transform: translateY(-1px); }
.ct-chips .chip:active:not(:disabled) { transform: scale(.96); }
.ct-chips .chip.on { background: var(--accent-tint-2); border-color: var(--accent); color: var(--violet-200); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-1); }
.ct-chips .chip.on .n { color: var(--violet-300); }
.ct-home-cities .segmented a, .ct-home-cities .segmented button { transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.ct-home-cities .segmented a:active, .ct-home-cities .segmented button:active { transform: scale(.94); }

/* «Історія виїздів» на «Огляді» міста: вікно на 5 рядків із власною прокруткою; вибраний виїзд підсвічено, минулі — тихіше. */
.ct-history .panel-head h3 .n, #visit-bookings .panel-head h3 .n { margin-left: 6px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ct-history-scroll { max-height: calc(44px + 3 * 62px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ct-history-scroll:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ct-history-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-1); }
.ct-history-table tbody tr { height: 62px; transition: background var(--dur-1) var(--ease); }
.ct-history-table tbody tr:hover { background: var(--surface-2); }
.ct-history-table tbody tr.on { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.ct-history-table tbody tr.past { color: var(--text-2); }
.ct-visit-link { color: var(--text); text-decoration: none; font-weight: 600; }
.ct-visit-link:hover { color: var(--accent-text); }
.ct-visit-link[aria-current="true"] { color: var(--violet-200); }

/* Фотографи тегами (як позначки в Instagram): аватар + ім'я. */
.ct-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ct-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 3px; border-radius: var(--r-full);
  background: var(--accent-tint); border: 1px solid var(--accent-tint-2); color: var(--violet-200); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.avatar-xs { width: 20px; height: 20px; border-radius: var(--r-full); background: linear-gradient(150deg, var(--violet-500), var(--violet-700));
  display: grid; place-items: center; font-weight: 650; font-size: 9.5px; color: #fff; flex: none; overflow: hidden; }
.avatar-xs.has-photo { background: var(--line-faint); }

/* Перемикач статусу в рядку: чернетка / опубліковано / скасовано. */
.ct-status { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--line); }
.ct-status-form { display: contents; }
.ct-status-btn { height: 26px; padding: 0 10px; border: 0; border-radius: var(--r-full); background: none; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 550;
  cursor: pointer; white-space: nowrap; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.ct-status-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
.ct-status-btn:active:not(:disabled) { transform: scale(.94); }
.ct-status-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.ct-status-btn:disabled { cursor: default; }
.ct-status-btn:disabled:not(.on) { opacity: .4; }
.ct-status-btn.on.s-published { background: rgba(53,163,121,.18); color: #7fd3b1; }
.ct-status-btn.on.s-draft { background: var(--surface-3); color: var(--text); }
.ct-status-btn.on.s-cancelled { background: rgba(210,90,76,.18); color: #f0a196; }

/* Бронювання вибраного виїзду: дії рядка й WhatsApp. */
.ct-booking-actions { display: flex; gap: 6px; justify-content: flex-end; }
.ct-wa { gap: 6px; }
.ct-wa svg { width: 14px; height: 14px; color: #25d366; }
.ct-wa.is-off { opacity: .45; cursor: not-allowed; }
.tour-bookings-table tr.past { color: var(--text-3); }

/* Діалог «Змінити» броні. */
.ct-booking-card .int-card-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ct-dialog-block { padding: 14px 18px; border-top: 1px solid var(--line); }
.ct-dialog-block h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.ct-dialog-block .form-actions { margin-top: 10px; }
.ct-cancel-what { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.ct-booking-card .int-card-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .ct-chips .chip, .ct-status-btn, .ct-history-table tbody tr, .ct-home-cities .segmented a, .ct-home-cities .segmented button { transition: none; }
  .ct-chips .chip:hover:not(:disabled), .ct-chips .chip:active:not(:disabled), .ct-status-btn:active:not(:disabled),
  .ct-home-cities .segmented a:active, .ct-home-cities .segmented button:active { transform: none; }
}

/* Сітка бронювань «час × точки» (рішення власника 2026-11-09): стовпчик часу і стовпчик на кожну точку; плитка займає рядки
   за тривалістю пакета; порожня клітинка — «+»; колір плитки — стан броні. Рух лише transform/opacity, prefers-reduced-motion. */
.ct-grid-days { margin: 0 18px 12px; }
.ct-grid-scroll { overflow: auto; max-height: calc(44px + 10 * 60px); overscroll-behavior: contain; padding: 0 18px 14px; }
.ct-grid-scroll:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ct-grid { display: grid; grid-template-columns: 72px repeat(var(--cols), minmax(170px, 1fr)); grid-auto-rows: minmax(60px, auto); gap: 6px; min-width: min-content; }
.ct-grid-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); font-size: 13.5px; font-weight: 600; color: var(--text); }
.ct-grid-head.ct-grid-time { padding: 0 6px; border-color: transparent; background: var(--surface-1); color: var(--text-2); font-size: 12.5px; }
.ct-grid-time { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 6px; border: 1px solid var(--line-faint); border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1)); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ct-grid-time small { font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.ct-grid-time.is-past, .ct-grid-cell.is-past { opacity: .55; }
.ct-grid-cell { display: flex; flex-direction: column; gap: 4px; min-height: 60px; border-radius: var(--r-md); border: 1px solid var(--line-faint); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.ct-grid-cell.is-pause { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line-faint) 6px 12px); border-style: solid; }
.ct-grid-cell:has(.ct-tile) { border: 0; }
.ct-grid-cell.is-free.is-over { border: 1px solid var(--accent); background: var(--accent-tint); }
.ct-add { flex: 1; border: 0; border-radius: var(--r-md); background: none; color: var(--text-3); font-size: 20px; font-weight: 400; cursor: pointer; opacity: 0;
  transition: opacity var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.ct-grid-cell:hover .ct-add, .ct-add:focus-visible { opacity: 1; background: var(--accent-tint); color: var(--violet-200); }
.ct-add:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
@media (hover: none) { .ct-add { opacity: 1; } }
.ct-tile { --tile: var(--text-3); flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border-radius: var(--r-md); text-align: left;
  border: 1px solid color-mix(in srgb, var(--tile) 55%, transparent); background: color-mix(in srgb, var(--tile) 24%, var(--surface-2)); color: var(--text); font: inherit; cursor: pointer;
  box-shadow: inset 3px 0 0 var(--tile); transition: transform var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); }
.ct-tile:hover { border-color: var(--tile); transform: translateY(-1px); }
.ct-tile:active { transform: scale(.98); }
.ct-tile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-tile[draggable="true"] { cursor: grab; }
.ct-tile.is-dragging { opacity: .45; }
.ct-tile.s-pending { --tile: var(--violet-300); }
.ct-tile.s-confirmed { --tile: var(--violet-500); }
.ct-tile.s-paid { --tile: var(--violet-600); }
.ct-tile.s-in { --tile: var(--success); }
.ct-tile-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-tile-meta { font-size: 12px; color: var(--text-2); }
.ct-grid-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0; padding: 0 18px 14px; font-size: 12px; color: var(--text-3); }
.ct-tile-dot { display: inline-block; box-sizing: border-box; width: 12px; height: 12px; border-radius: 4px; margin-right: -8px; }
.ct-tile-dot.s-pending { border: 1.5px dashed var(--violet-400); }
.ct-tile-dot.s-confirmed { border: 1.5px solid var(--violet-400); background: color-mix(in srgb, var(--violet-600) 34%, var(--surface-2)); }
.ct-tile-dot.s-paid { background: var(--violet-300); } .ct-tile-dot.s-in { background: var(--success); }
/* Плитка сітки (правка власника 2026-11-10): головне — КОД броні (великий, контрастний — читати на планшеті на сонці), кількість
   очей — чип, ім'я (якщо є) — другорядно. Чотири стани розрізняються не лише відтінком: порожня пунктирна рамка (не підтверджено) →
   фіолетова напівзаливка (підтверджено) → суцільна світла лаванда (оплачено) → суцільний зелений (прийшов). Текст на суцільних
   заливках — чорнило #0B0B0C (≈ 10 : 1 на лаванді, ≈ 6 : 1 на зеленому), на темних — основний текст (≥ 12 : 1). Табло
   (`.ct-flask`) — без змін, тому всі правила з :not(.ct-flask). */
.ct-tile:not(.ct-flask) { justify-content: center; gap: 3px; padding: 6px 10px 6px 12px; border-width: 1.5px; box-shadow: none; }
.ct-tile-code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-size: 18px; font-weight: 700; line-height: 21px;
  letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.ct-tile-sub { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.ct-tile-eyes { flex: none; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: color-mix(in srgb, currentColor 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 34%, transparent); }
.ct-tile-sub .ct-tile-name { min-width: 0; font-size: 12.5px; font-weight: 500; line-height: 18px; color: inherit; }
.ct-tile.s-pending:not(.ct-flask) { --tile: var(--violet-400); border-style: dashed; background: transparent; color: var(--text); }
.ct-tile.s-confirmed:not(.ct-flask) { --tile: var(--violet-400); background: color-mix(in srgb, var(--violet-600) 34%, var(--surface-2)); color: var(--text); }
.ct-tile.s-paid:not(.ct-flask) { --tile: var(--violet-200); border-color: var(--violet-200); background: var(--violet-300); color: #0B0B0C; }
.ct-tile.s-in:not(.ct-flask) { --tile: var(--success); border-color: color-mix(in srgb, var(--success) 60%, #fff); background: var(--success); color: #0B0B0C; }
.ct-tile.is-late:not(.ct-flask) { border-color: var(--danger); animation: ct-late-flask 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ct-tile.is-late:not(.ct-flask) { animation: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 55%, transparent); } }
.ct-booking-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0 0 12px; }
.ct-booking-facts dt { font-size: 11.5px; color: var(--text-3); }
.ct-booking-facts dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.ct-booking-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-booking-qr { margin: 0 0 10px; }
.ct-booking-qr summary { cursor: pointer; font-size: 13px; color: var(--accent-text); }
/* QR брендований: тиха зона вже в SVG (власних полів нема); 230 px — модуль ≈4,7 px, не менший за колишні 4,6 (M, 33 модулі, 152 px). */
.ct-booking-qr .qr { display: block; width: 230px; max-width: 100%; margin-top: 8px; padding: 0; border-radius: var(--r-md); background: #fff; }
/* «Лист очікування» виїзду (власник 2026-11-10): одне вікно до низу екрана (висоту від верху сторінки міряє Stimulus `fit-bottom` → --fit-top),
   таблиця гортається всередині, шапка таблиці тримається зверху; WhatsApp — зелена кнопка з номером. */
.ct-wl { display: flex; flex-direction: column; }
.ct-wl-head { flex: none; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ct-wl-scroll { flex: 1; min-height: 0; max-height: min(70dvh, 720px); overflow: auto; scrollbar-gutter: stable; }
.ct-wl-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); white-space: nowrap; }
.iris-table.ct-wl-table { table-layout: auto; }
.iris-table.ct-wl-table thead th:nth-child(n), .iris-table.ct-wl-table tbody td:nth-child(n) { width: auto; text-align: left; }
.ct-wl-eyes { display: inline-block; padding: 0 8px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (min-width: 900px) and (min-height: 600px) {
  .content:has(.ct-tab:not([hidden]) > .ct-wl) { padding-bottom: 24px; }
  .ct-wl { height: max(calc(100dvh - var(--fit-top, 240px) - 24px), 420px); }
  .ct-wl-scroll { max-height: none; }
}

/* Огляд міста й картка броні (правки власника 2026-11-10). Блоки огляду — колонкою з відступом, а не впритул. */
.ct-overview { display: flex; flex-direction: column; gap: 16px; }
.ct-overview > .panel { margin: 0; }
/* «Огляд» виїзду (власник 2026-11-10): мінімальний дашборд. Три великі числа (надійшло, витрати, прибуток), під ними одним рядком
   люди, далі два вікна однакової висоти — дні (заповненість) і пакети; смуги — довжина + число поруч (не лише колір).
   Налаштування (статус, оплата, дизайн) — вузька смуга з підписами в полях під дашбордом. */
.ct-ov { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.ct-ov-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ct-ov-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
a.ct-ov-tile:hover { border-color: var(--violet-400); }
a.ct-ov-tile:active { transform: scale(.985); }
a.ct-ov-tile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-ov-value { font-size: clamp(28px, 3.2vw, 44px); font-weight: 650; line-height: 1.05; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ct-ov-label { font-size: 14px; color: var(--text-2); }
.ct-ov-tile.is-profit { background: var(--surface-1); border-color: var(--line-strong); }
.ct-ov-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.ct-ov-facts > div { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 14px 20px; }
.ct-ov-facts > div + div { border-left: 1px solid var(--line-faint); }
.ct-ov-facts dd { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ct-ov-facts dt { font-size: 13.5px; color: var(--text-2); }
.ct-ov-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ct-ov-card { display: flex; flex-direction: column; margin: 0; }
.ct-ov-card .panel-head { flex: none; }
.ct-ov-total { margin-left: auto; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ct-ov-rows { list-style: none; margin: 0; padding: 6px 18px 12px; }
.ct-ov-rows li { display: grid; grid-template-columns: minmax(64px, 96px) minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 44px; border-bottom: 1px solid var(--line-faint); }
.ct-ov-rows li:last-child { border-bottom: 0; }
.ct-ov-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ct-ov-bar { display: block; height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.ct-ov-bar i { display: block; height: 100%; border-radius: inherit; background: var(--violet-300); }
.ct-ov-num { min-width: 64px; text-align: right; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-ov-none { margin: 0; padding: 18px; font-size: 14px; color: var(--text-3); }
.ct-ov-settings .ct-block-body { padding: 16px 18px; }
.form.ct-ov-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 16px; max-width: none; margin: 0; }
.ct-ov-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ct-ov-form .form-actions { margin: 0; padding: 0; }
.ct-ov-form .form-actions .btn { min-height: 48px; }
.ct-ov-form > .hint { grid-column: 1 / -1; margin: 0; }
@media (max-width: 900px) { .ct-ov-money, .ct-ov-pair { grid-template-columns: minmax(0, 1fr); } .ct-ov-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-ov-facts > div:nth-child(3) { border-left: 0; } .ct-ov-facts > div:nth-child(n+3) { border-top: 1px solid var(--line-faint); } .ct-ov-status, .form.ct-ov-form { grid-template-columns: minmax(0, 1fr); } }
/* Картка броні: горизонтальна (ліворуч — хто й що, праворуч — дії), ширше за звичайні діалоги. Класи .ct-manage-* — лише ця
   картка: .ct-booking-card і .ct-dialog-block спільні з табло виїзду. */
.int-dialog.ct-manage-dialog:has(.ct-manage-card) { width: min(940px, calc(100vw - 32px)); }
.ct-manage-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ct-manage-main { border-right: 1px solid var(--line); }
.ct-manage-side { min-width: 0; }
@media (max-width: 760px) { .ct-manage-cols { grid-template-columns: minmax(0, 1fr); } .ct-manage-main { border-right: 0; } }
/* Кнопка WhatsApp — зелена, з логотипом (фірмовий #25D366; чорнило на ньому — контраст ≈ 9:1). */
.btn.ct-wa-btn { min-height: 40px; gap: 8px; border: 0; background: #25d366; color: #0b0b0c; font-weight: 600; }
.btn.ct-wa-btn svg { width: 18px; height: 18px; color: inherit; }
@media (hover: hover) and (pointer: fine) { .btn.ct-wa-btn:hover { background: #4be085; } }
.btn.ct-wa-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* Перенесення — один блок: «День · час · станція» і під ним лише інша точка; вибір і кнопка в один рядок. */
.ct-move .ct-move-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 0; padding: 0; }
.ct-move .ct-move-form .form-actions { margin: 0; }
.ct-move .ct-move-form + .ct-move-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-faint); }
.ct-move .form-field label { font-size: 12px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) {
  .ct-tile, .ct-add { transition: none; }
  .ct-tile:hover, .ct-tile:active { transform: none; }
}

/* «Не прийшов» понад 10 хв (власник 2026-11-09): лише контур плитки м'яко пульсує червоним — без заливки й тексту. */
.ct-tile.is-late { border-color: color-mix(in srgb, var(--danger) 70%, transparent); animation: ct-late 2.8s ease-in-out infinite; }
@keyframes ct-late {
  0%, 100% { box-shadow: inset 3px 0 0 var(--tile), 0 0 0 0 color-mix(in srgb, var(--danger) 0%, transparent); }
  50% { box-shadow: inset 3px 0 0 var(--tile), 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .ct-tile.is-late { animation: none; box-shadow: inset 3px 0 0 var(--tile), 0 0 0 2px color-mix(in srgb, var(--danger) 40%, transparent); }
}
/* Скасування виїзду чи дня (PR F, 2026-11-09): варіанти з цифрами до натискання, наслідки списком, «Розумію», підсумок повернень. */
.ct-cancel-options { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ct-cancel-options legend { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ct-cancel-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.ct-cancel-option:hover { border-color: var(--line-strong); }
.ct-cancel-option:has(input:checked) { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: var(--danger-tint); }
.ct-cancel-option input { margin-top: 3px; accent-color: var(--danger); }
.ct-cancel-option-text { display: grid; gap: 2px; min-width: 0; }
.ct-cancel-option-label { font-size: 14px; font-weight: 600; }
.ct-cancel-option-facts { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.ct-cancel-effects { margin: 4px 0 14px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.ct-ack { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
.ct-ack input { margin-top: 3px; accent-color: var(--danger); }
.ct-refund-summary { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.ct-refund-summary.has-failed { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-tint); }
.ct-refund-summary p { margin: 0; }
.ct-refund-summary ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ct-refund-summary li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ct-inline-form { display: inline; }
@media (prefers-reduced-motion: reduce) { .ct-cancel-option { transition: none; } }

/* Друк на виїзді в шаблоні туру (2026-11-09, docs/CITY_TOUR.md §14.6.2): формати й папір — рядком прапорців. */
.ct-print-label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.ct-print-choices { display: flex; flex-wrap: wrap; gap: 0 18px; }
.ct-print-choices .check-line { padding: 6px 0; }

/* Табло виїзду біля принтера (рішення власника 2026-11-09, docs/CITY_TOUR.md §14.6.1). Плитка-«колба»: та сама плитка
   сітки, але стан — заливкою зліва направо (знято → надруковано → видано), база зелена, з доплатою — фіолетова; без підписів
   кроків. «На зйомці» — м'яка пульсуюча рамка й номер точки; запізнення — червоний контур; нове фото — заливка дотікає й
   плитка один раз світиться. Готові плитки лишаються. */
.ct-board-head { align-items: center; }
.ct-board-wait { margin: 0 0 0 auto; display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 16px; border-radius: var(--r-full);
  border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.ct-board-wait strong { font-size: 22px; font-weight: 650; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.ct-board-wait.is-zero strong { color: var(--text-3); }
.ct-board-days { margin: 0 0 16px; }
.ct-board-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ct-board-row { display: flex; min-height: 80px; }
.ct-tile-time { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ct-tile-station { margin-top: 2px; padding: 2px 8px; border-radius: var(--r-full); background: var(--surface-3); font-size: 11.5px; font-weight: 600; color: var(--text); }
.ct-tile.ct-flask { --tile: var(--success); position: relative; isolation: isolate; overflow: hidden; background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.ct-tile.ct-flask::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--tile) 34%, var(--surface-2));
  transform: scaleX(var(--fill, 0)); transform-origin: left center; transition: transform 900ms cubic-bezier(.22, 1, .36, 1); }
.ct-tile.ct-flask.is-extra { --tile: var(--violet-400); }
/* Контраст ≥ 4.5:1 і на заливці (на ній --text-2 дає лише ~4.2:1). */
.ct-tile.ct-flask .ct-tile-meta, .ct-tile.ct-flask .ct-tile-time { color: color-mix(in srgb, var(--text) 45%, var(--text-2)); }
.ct-tile.ct-flask.is-done { border-color: color-mix(in srgb, var(--tile) 55%, transparent); }
.ct-tile.ct-flask:hover { border-color: var(--tile); }
.ct-tile.ct-flask.is-shooting { border-color: var(--tile); animation: ct-shoot 2.4s ease-in-out infinite; }
.ct-tile.ct-flask.is-late { border-color: color-mix(in srgb, var(--danger) 70%, transparent); animation: ct-late-flask 2.8s ease-in-out infinite; }
.ct-tile.ct-flask.is-fresh { animation: ct-fresh 1.6s cubic-bezier(.22, 1, .36, 1) 1; }
@keyframes ct-shoot {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tile) 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tile) 40%, transparent); }
}
@keyframes ct-late-flask {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent); }
}
@keyframes ct-fresh {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tile) 55%, transparent), 0 0 24px 2px color-mix(in srgb, var(--tile) 45%, transparent); }
  100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--tile) 0%, transparent), 0 0 24px 2px color-mix(in srgb, var(--tile) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .ct-tile.ct-flask::before { transition: none; }
  .ct-tile.ct-flask.is-shooting, .ct-tile.ct-flask.is-fresh { animation: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tile) 40%, transparent); }
  .ct-tile.ct-flask.is-late { animation: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 40%, transparent); }
}

/* Панель клієнта на табло: мініатюри видач (вибір — рамкою лаванди), позиції, «+ доплата», дії координатора, журнал. */
.ct-board-dialog { width: min(560px, calc(100vw - 32px)); }
.ct-board-flash { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--success-tint); font-size: 13px; color: var(--text); }
.ct-board-flash.is-alert { background: var(--danger-tint); }
.ct-board-shots { border: 0; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ct-board-shot { position: relative; display: grid; gap: 4px; cursor: pointer; font-size: 12px; color: var(--text-2); }
.ct-board-shot input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ct-board-shot img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r-md); background: #000;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.ct-board-shot:hover img { border-color: var(--line-strong); }
.ct-board-shot:has(input:checked) img { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ct-board-shot:has(input:checked) span { color: var(--text); }
.ct-board-shot:has(input:focus-visible) img { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-board-items { border: 0; margin: 0; padding: 0; }
.ct-board-items input[type="radio"] { margin: 3px 0 0; accent-color: var(--accent); }
.ct-board-items .check-line .t span .ct-board-low { display: inline; font-size: inherit; color: var(--warning); }
.ct-board-panel .form { padding: 0; gap: 12px; }
.ct-board-extra { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ct-board-extra .form-field { flex-direction: row; align-items: center; gap: 8px; }
.ct-board-extra .form-field label { font-size: 13px; color: var(--text-2); }
.ct-board-extra .form-actions { margin: 0 0 0 auto; padding: 0; }
.ct-board-override + .ct-board-override { margin-top: 8px; }
.ct-board-override summary { cursor: pointer; font-size: 13px; color: var(--accent-text); }
.ct-board-override .form { margin-top: 8px; }
.ct-board-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.ct-board-log li { display: flex; gap: 10px; }
.ct-board-log time { flex: none; color: var(--text-2); }
.ct-board-pick { margin-bottom: 16px; }
.ct-board-visits { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.ct-board-visit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px; border-radius: var(--r-md); color: var(--text); text-decoration: none;
  transition: background var(--dur-1) var(--ease); }
.ct-board-visit:hover { background: var(--surface-3); }
.ct-board-visit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ct-board-visit span { font-size: 13px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) {
  .ct-board-shot img, .ct-board-visit { transition: none; }
}
/* Шаблон на дизайн (PR E1, 2026-11-09): карусель дизайнів і мова над блоками; стара заміна міста — тихе попередження. */
.ct-design-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.ct-designs { max-width: 100%; flex-wrap: wrap; }
.ct-designs a { white-space: nowrap; }
.ct-legacy { color: var(--warning); }
/* Одна мова (перемикач над блоками): поле на всю ширину, без колонки з кодом мови. */
.ct-text-fields:has(> .ct-field:only-child) { grid-template-columns: minmax(0, 1fr); }
.ct-field:has(> label.visually-hidden) { grid-template-columns: minmax(0, 1fr); }
.segmented a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus-ring); }
@media (pointer: coarse) { .ct-design-bar .segmented a { min-height: 44px; display: inline-flex; align-items: center; } }
/* Стан мови текстів (E2, 2026-11-10): лише крапка кольором (мінімалізм власника), словами — aria-label і підказка під смужкою. */
.ct-langs a { display: inline-flex; align-items: center; gap: 5px; }
.ct-lang-dot { width: 6px; height: 6px; border-radius: 999px; flex: none; background: transparent; }
.ct-lang-dot.is-missing { background: var(--text-3); opacity: 0.6; }
.ct-lang-dot.is-machine { background: var(--warning); }
.ct-lang-dot.is-reviewed { background: var(--success); }
.ct-lang-dot.is-failed { background: var(--danger); }
.ct-lang-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex-basis: 100%; }
.ct-lang-tools .hint { margin: 0; }
.ct-inline-form { display: inline; margin: 0; }
.ct-page-more { margin: -4px 0 12px; font-size: 12.5px; color: var(--text-3); }
.ct-page-more summary { cursor: pointer; width: fit-content; }

/* City Tour · дашборд (рішення власника 2026-11-10): будова й класи — спільні .dash* з /dashboard; тут лише рівна сітка плиток
   без «сиріт» (у туру 4–6 плиток у ряду, а не 5) і відступ між рядом грошей і рядом кількостей. */
.dash-stats.ct-dash-stats { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.dash-stats.ct-dash-stats > div:last-child:nth-child(odd) { grid-column: auto; }
.dash-money .ct-dash-stats + .ct-dash-stats { margin-top: 10px; }

/* City Tour · дашборд, міста й виїзди (2026-11-11): майстер-деталь. Клік по місту лишає справа його виїзди (Stimulus `tour-month`).
   ≥1440 px і висота ≥700: блок грошей тягнеться до низу екрана, обидва списки гортаються всередині; нижче — звичайний потік,
   списки обмежені по висоті. Зона натискання рядка ≥44 px — з виїзду стоячи, з телефона. */
.ct-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4px 28px; padding: 6px 18px 16px; }
.ct-split-col { min-width: 0; display: flex; flex-direction: column; container-type: inline-size; }
.ct-split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 30px; }
.ct-split-open { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ct-split-open[hidden], .ct-split li[hidden], .ct-split-none[hidden] { display: none; }
.ct-split-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent; }
.ct-split-list li { border-bottom: 1px solid var(--line-faint); }
.ct-split-list li:last-child { border-bottom: 0; }
.ct-split-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem 7rem; align-items: center; gap: 0 12px; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: var(--r-sm); background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; }
button.ct-split-row, a.ct-split-row { cursor: pointer; transition: background var(--dur-1) var(--ease); }
button.ct-split-row:focus-visible, a.ct-split-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { button.ct-split-row:hover, a.ct-split-row:hover { background: var(--surface-3); } }
.ct-split-row[aria-pressed="true"] { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }
.ct-split-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ct-split-row .ct-split-name { color: var(--accent-text); font-weight: 550; }
.ct-split-sum, .ct-split-n { text-align: right; white-space: nowrap; }
.ct-split-n { color: var(--text-3); }
.ct-split-none { padding: 10px; }
@container (max-width: 380px) {
  .ct-split-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ct-split-n { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}
@media (max-width: 760px) { .ct-split { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1440px) and (min-height: 700px) {
  .content:has(> .ct-month) { padding-bottom: 24px; }
  .ct-month .dash-main { height: max(calc(100dvh - var(--ct-month-top, 146px) - 24px), 640px); }
  .ct-month .dash-main > .dash-money { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .ct-month .ct-split { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .ct-month .ct-split-col { min-height: 0; }
  .ct-month .ct-split-list { flex: 1; min-height: 0; max-height: none; }
}
.ct-settings-links { margin: 0; padding: 6px 10px 12px; }

/* Turnstile: розрізи на 5 колонок — вужчі відступи й прокрутка, якщо панель тісна (мобільний, довгі назви). */
.panel[data-section^="breakdown-"] { overflow-x: auto; }
.iris-table.breakdown-table th, .iris-table.breakdown-table td { padding-left: 12px; padding-right: 12px; }
.iris-table.breakdown-table th:first-child, .iris-table.breakdown-table td:first-child { padding-left: 18px; }
.iris-table.breakdown-table th:last-child, .iris-table.breakdown-table td:last-child { padding-right: 18px; }

/* Поля з підписом усередині (правка власника 2026-11-10, форма «Дні й місце» виїзду): порожнє поле — підпис по центру, як
   підказка; заповнене чи у фокусі — підпис дрібно угорі. Підпис лишається справжнім <label> (читачі екрана, клік), контраст
   --text-2 на полі ≈ 8 : 1. Потрібен placeholder=" " (на ньому тримається :placeholder-shown). Рух — лише transform. */
.form-field.ct-float { position: relative; gap: 0; }
.form-field.ct-float > .tinput { box-sizing: border-box; height: 48px; padding: 20px 13px 4px; }
.form-field.ct-float > label { position: absolute; left: 14px; top: 0; right: 14px; height: 48px; display: flex; align-items: center; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; pointer-events: none; font-size: 13.5px; font-weight: 400; color: var(--text-2); transform-origin: left center;
  transition: transform var(--dur-1) var(--ease); }
.form-field.ct-float:focus-within > label, .form-field.ct-float > .tinput:not(:placeholder-shown) ~ label { transform: translateY(-13px) scale(.86); }
.locale-block:has(.ct-float) { display: flex; flex-direction: column; gap: 12px; }
.locale-block:has(.ct-float) > .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.ct-flags { display: flex; flex-wrap: wrap; gap: 0 28px; }
.ct-flags .check-line { min-height: 44px; align-items: center; padding: 0; }
.ct-flags .check-line .check { margin-top: 0; }
@media (max-width: 640px) { .locale-block:has(.ct-float) > .form-row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .form-field.ct-float > label { transition: none; } }

/* «Каса» виїзду (правки власника 2026-11-10): без сірих пояснень, історія закриття дня — розгорнута під днем, форма закриття
   з підписами всередині полів. Таблиці — у прокручуваних вікнах, шапка липка. Склад і порядок сум не змінено. */
.ct-cs .panel-head .actions { margin-left: auto; }
.ct-cs-kpi { padding-bottom: 14px; }
.ct-cs-pair { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0 20px; align-items: start; padding: 0 18px 18px; }
.ct-cs-pair--solo { grid-template-columns: minmax(0, 1fr); }
.ct-cs-scroll { overflow: auto; max-width: 100%; min-width: 0; }
.ct-cs-pair > .ct-cs-scroll { border: 1px solid var(--line-faint); border-radius: var(--r-md); }
.ct-cs-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.ct-cs-table .ct-cs-total { text-align: left; }
.ct-cs-pair .ct-cs-table th:first-child, .ct-cs-pair .ct-cs-table td:first-child { padding-left: 14px; }
.ct-cs-pair .ct-cs-table th:last-child, .ct-cs-pair .ct-cs-table td:last-child { padding-right: 14px; }
.ct-cs-table tfoot th, .ct-cs-table tfoot td { padding: 11px 18px; font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-cs-table tfoot .ct-cs-total, .ct-cs-table tfoot td:first-child { text-align: left; }
.ct-cs-table tfoot tr:first-child th { border-top: 1px solid var(--line); }
.ct-cs-table tfoot tr.subtle td { font-weight: 400; color: var(--text-3); }
.ct-cs-channels { border: 1px solid var(--line-faint); border-radius: var(--r-md); padding: 12px 14px 6px; min-width: 0; }
.ct-cs-channels h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ct-cs-channels ul { list-style: none; margin: 0; padding: 0; }
.ct-cs-channels li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line-faint); font-size: 13.5px; }
.ct-cs-channels li:first-child { border-top: 0; }
.ct-cs-ch-n { color: var(--text-3); font-size: 12.5px; }
.ct-cs-channels b { min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
/* День з історією закриття: рядок історії — під днем, без лінії між ними. */
.ct-cs-table tbody tr.has-history td { border-bottom: 0; }
.iris-table.ct-cs-table .ct-cs-history td:last-child { padding: 0 18px 12px; text-align: left; white-space: normal; }
.ct-cs-history ul { list-style: none; margin: 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--line); display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.ct-cs-history li { margin: 0; }
.ct-cs-close { border-top: 1px solid var(--line-faint); padding: 16px 18px 18px; }
.ct-cs-close h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.ct-cs-close ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.ct-cs-form { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: flex-start; max-width: none; padding: 0; }
.ct-cs-form .form-field { margin: 0; min-width: 0; }
/* Підпис «Перераховано готівки (усі станції)» у полі з плаваючим підписом не обрізається в жодній з 5 мов: найдовший (pl) ≈ 330 px
   у порожньому полі; коли місця мало, поля переносяться на другий рядок. */
.ct-cs-form .form-field:nth-child(1) { flex: 1 1 160px; max-width: 220px; }
.ct-cs-form .form-field:nth-child(2) { flex: 2 1 350px; }
.ct-cs-form .form-field:nth-child(3) { flex: 2 1 220px; }
.ct-cs-form .btn { height: 48px; flex: 0 0 auto; }
.ct-cs-rule { margin: 12px 0 0; }
/* Звірка з Revolut (PR C, docs/PAYMENTS.md §14): стан рядками, розбіжності й «немає в платформі» — у рамці, як «Звідки гроші». */
.ct-cs-rec { padding: 0 18px 18px; display: grid; gap: 8px; }
.ct-cs-rec p { margin: 0; font-size: 13px; }
.ct-cs-rec-failed { color: var(--danger); }
.ct-cs-rec-list { border: 1px solid var(--line-faint); border-radius: var(--r-md); padding: 12px 14px 6px; min-width: 0; }
.ct-cs-rec-list h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ct-cs-rec-list ul { list-style: none; margin: 0; padding: 0; }
.ct-cs-rec-list li { padding: 8px 0; border-top: 1px solid var(--line-faint); font-size: 13px; overflow-wrap: anywhere; }
.ct-cs-rec-list li:first-child { border-top: 0; }
@media (max-width: 899px) {
  .ct-cs-pair { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ct-cs-form { flex-direction: column; align-items: stretch; }
  .ct-cs-form .form-field:nth-child(n) { flex: 0 0 auto; max-width: none; }
  .ct-cs-form .btn { width: 100%; }
  .ct-cs-form .form-field.ct-float > label { font-size: 12.5px; }
}

/* «Статистика» виїзду, підсумок (власник 2026-11-10): без повторів дашборда; лічильники, гроші й способи оплати на станції —
   рівними рядами компактних плиток, між групами — тонка лінія. */
.ct-st .ct-st-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px 18px; }
.ct-st .ct-st-grid + .ct-st-grid { border-top: 1px solid var(--line-faint); }
.ct-st .ct-st-grid .kpi { padding: 11px 14px; }
.ct-st .ct-st-grid .kpi .value { font-size: 20px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ct-st .ct-st-hint { margin: 0; padding: 0 18px 16px; }

/* === Діалог броні: «Замовлення», номер талона, WhatsApp біля телефону (власник 2026-11-11). Окремий блок у кінці — плитку
   сітки (.ct-tile) і решту картки не чіпає. Номер талона — головне в шапці: за ним людина на принтері звіряє клієнта. === */
.ct-manage-title { display: grid; gap: 2px; }
.ct-manage-title .ct-ticket-code { font-family: var(--font-mono); font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; color: var(--text); }
.ct-manage-title .ct-manage-name { font-size: 14px; font-weight: 500; color: var(--text-2); }
.ct-manage-phone { grid-column: 1 / -1; }
.ct-manage-phone dd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.ct-wa-off { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.ct-wa-off .subtle { font-size: 12px; }
.btn.ct-wa-btn.is-off { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; opacity: 1; }
@media (hover: hover) and (pointer: fine) { .btn.ct-wa-btn.is-off:hover { background: var(--surface-3); } }
/* «Написати в WhatsApp» від номера компанії (PR-C, DECISIONS №24). Вікно закрите — розкривний перегляд шаблону Meta: текст —
   тією ж «нашою бульбашкою», що в «Розмовах клієнтів» (клієнт отримає рівно його), ціна й «перший контакт» — смугою
   попередження, надсилання — окремою кнопкою підтвердження. Відкритий перегляд займає весь рядок телефону. */
.ct-wa-compose[open] { flex-basis: 100%; }
.ct-wa-compose > summary { list-style: none; width: max-content; cursor: pointer; }
.ct-wa-compose > summary::-webkit-details-marker { display: none; }
.ct-wa-panel { display: grid; gap: 10px; max-width: 560px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); }
.ct-wa-panel-title { font-size: 13px; line-height: 1.45; color: var(--text-2); }
.ct-wa-preview { justify-self: end; max-width: 46ch; padding: 9px 13px; border: 1px solid var(--line-faint); border-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-sm); background: var(--surface-1); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.ct-wa-cost { padding: 8px 12px; border-radius: var(--r-sm); background: var(--warning-tint); font-size: 12.5px; line-height: 1.45; color: var(--text); }
.ct-wa-limit { font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.ct-wa-confirm { margin: 0; }
.ct-wa-note { font-size: 12px; }
.ct-wa-flash { flex-basis: 100%; margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--success-tint); font-size: 13px; color: var(--text); }
.ct-wa-flash.is-alert { background: var(--danger-tint); }
@media (prefers-reduced-motion: no-preference) { .ct-wa-compose[open] .ct-wa-panel { animation: ct-wa-in var(--dur-2) var(--ease); } }
@keyframes ct-wa-in { from { opacity: 0; transform: translateY(-4px); } }
.ct-order-lines { list-style: none; margin: 0; padding: 0; }
.ct-order-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-faint); }
.ct-order-name { font-size: 13.5px; overflow-wrap: anywhere; }
.ct-order-qty { font-weight: 650; color: var(--text); }
.ct-order-meta { font-size: 12px; color: var(--text-3); }
.ct-order-sum { font-variant-numeric: tabular-nums; font-size: 13.5px; text-align: right; }
.ct-order-remove { grid-column: 1 / -1; font-size: 12.5px; }
.ct-order-remove summary { cursor: pointer; color: var(--text-3); width: max-content; }
.ct-order-remove .form { margin-top: 8px; }
.ct-order-totals { display: grid; gap: 4px; margin: 10px 0 0; }
.ct-order-totals > div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.ct-order-totals dt { font-size: 12.5px; color: var(--text-2); }
.ct-order-totals dd { margin: 0; font-size: 13.5px; }
.ct-order-due { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.ct-order-due dt, .ct-order-due dd { font-size: 15px; font-weight: 650; color: var(--text); }
.ct-order-due.is-due dd { color: var(--warning); }
.ct-order-add { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ct-order-pick { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.ct-order-method { margin-top: 10px; }
.ct-order-empty { margin: 12px 0 0; }
@media (max-width: 480px) { .ct-order-pick { grid-template-columns: minmax(0, 1fr); } .ct-manage-title .ct-ticket-code { font-size: 24px; } }

/* «Видалити виїзд разом із бронями» (TourVisitPurge, дизайн за словом власника 2026-11-15): один блок стану кольором стану
   (успіх / попередження / небезпека — наявні токени), лічильники `kpi` (нулі приглушені), гроші, підтвердження з двома кнопками. */
.purge-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.purge-page { display: flex; flex-direction: column; gap: 16px; max-width: 1080px; }
.purge-state { padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); }
.purge-state-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 620; letter-spacing: -.01em; }
.purge-state-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.purge-state p { margin-top: 6px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.purge-state-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.purge-state.is-ok { background: var(--success-tint); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.purge-state.is-ok .purge-state-title { color: var(--success); }
.purge-state.is-force { background: var(--warning-tint); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.purge-state.is-force .purge-state-title { color: var(--warning); }
.purge-state.is-blocked { background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.purge-state.is-blocked .purge-state-title { color: var(--danger); }
.purge-banner { padding: 12px 16px; border-radius: var(--r-md); background: var(--warning-tint); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  color: var(--text); font-size: 13.5px; font-weight: 560; line-height: 1.5; }
.purge-banner-in { margin: 0 18px 14px; font-weight: 450; }
.purge-banner-in strong { font-weight: 620; }
.purge-grid { padding-bottom: 16px; }
.purge-grid .kpi.is-zero { background: transparent; }
.purge-grid .kpi.is-zero .value { color: var(--text-3); font-weight: 500; }
.purge-grid .kpi.is-alert { background: var(--warning-tint); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.purge-grid .kpi.is-alert .value { color: var(--warning); }
.purge-note { padding-top: 0; }
.purge-confirm .tinput { max-width: 420px; height: 44px; font-size: 14.5px; }
.purge-force { align-items: flex-start; margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--line); }
.purge-force .check { margin-top: 1px; }
.purge-force > span:last-child { font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.purge-force b { color: var(--text); font-weight: 600; }
.purge-hint { font-size: 12.5px; color: var(--text-2); }
.purge-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.purge-submit { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.purge-submit:hover { background: color-mix(in srgb, var(--danger) 85%, #fff); }
.purge-submit:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.purge-notes { margin: 16px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
@media (max-width: 640px) {
  .purge-grid { grid-template-columns: 1fr; }
  .purge-actions .btn { width: 100%; }
  .purge-confirm .tinput { max-width: none; }
}

/* Повернення за арти (PLT-038, /finance/art_refunds): на ширших екранах — таблиця iris-table; на вузьких (≤ 640 px) рядок
   стає карткою — номер і дата, сума, причина повністю, кнопка «Позначити вирішеним» на всю ширину під ними. */
.refund-table-wrap { overflow-x: auto; border-radius: inherit; }
.iris-table.refund-table { min-width: 600px; }
.refund-resolve { display: inline; margin: 0; }
.refund-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  .iris-table.refund-table { min-width: 0; }
  .iris-table.refund-table, .iris-table.refund-table tbody, .iris-table.refund-table tbody tr, .iris-table.refund-table tbody td { display: block; width: auto; }
  .iris-table.refund-table thead { display: none; }
  .iris-table.refund-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line-faint); }
  .iris-table.refund-table tbody tr:last-child { border-bottom: none; }
  .iris-table.refund-table tbody td { padding: 0; border-bottom: none; text-align: left; white-space: normal; }
  .iris-table.refund-table tbody td + td { margin-top: 8px; }
  .iris-table.refund-table tbody td:last-child { margin-top: 14px; }
  .iris-table.refund-table .status-dot { white-space: normal; align-items: baseline; }
  .refund-actions { flex-direction: column; }
  .refund-resolve, .refund-resolve .btn { display: block; width: 100%; }
}

/* «Журнал помилок» (/errors, редизайн 2026-11-23, макет planner/briefs/platform-redesign/error-log): замість екрана гему
   solid_errors. Два вікна однакової висоти до низу екрана — список і картка, кожне гортається всередині (висоту від верху
   сторінки міряє Stimulus `fit-bottom` → --fit-top); шапка картки з дією не гортається. < 1100 px — одна колонка; ≤ 900 px —
   спершу список, по натисканню картка окремим екраном (картку з адреси /errors/:id позначає data-explicit). Усі класи — `ej-`. */
.ej-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--text-2); font-size: 13px; border-radius: var(--r-sm); transition: color var(--dur-1) var(--ease); }
.ej-back:hover { color: var(--text); }
.ej-back:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.ej-back svg { width: 14px; height: 14px; flex: none; }
.ej-back-list { display: none; }
.ej-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 16px; }
.ej-filters .segmented a { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ej-chips { display: inline-flex; gap: 6px; }
.ej-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-full); color: var(--text-2); font-size: 12.5px; font-weight: 550; white-space: nowrap;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.ej-chip:hover { color: var(--text); border-color: var(--line-strong); }
.ej-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ej-chip .c { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ej-chip.on { background: var(--accent-tint-2); border-color: color-mix(in srgb, var(--violet-500) 45%, transparent); color: var(--text); }
.ej-chip.on .c { color: var(--text-2); }
.ej-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0; min-width: 0; }
.ej-search-form { display: flex; margin: 0 0 0 auto; min-width: 0; }
.tselect.ej-select { width: auto; max-width: 100%; height: 36px; padding-right: 34px; font-size: 13px; }
.ej-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 260px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-input); color: var(--text-3);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.ej-search:focus-within { border-color: var(--focus-ring); box-shadow: var(--accent-glow); }
.ej-search svg { width: 15px; height: 15px; flex: none; }
.ej-search input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 13px; appearance: none; }
.ej-search input::placeholder { color: var(--text-3); }
.ej-search input::-webkit-search-cancel-button { appearance: none; }

.ej-md { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: stretch; }
.ej-md > .panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.ej-frame, .ej-card { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.ej-window { position: relative; flex: 1 1 auto; min-height: 0; }
.ej-window::after { content: ""; position: absolute; left: 1px; right: 12px; bottom: 0; height: 28px; background: linear-gradient(to bottom, transparent, var(--surface-2)); pointer-events: none; }
.ej-list, .ej-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 18%, transparent) transparent; }
.ej-list:focus-visible, .ej-scroll:focus-visible, .ej-trace:focus-visible, .ej-code:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ej-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 6px 22px; border-radius: var(--r-lg); }
.ej-scroll { padding: 2px 0 26px; }
.ej-more { display: contents; }
.ej-more > .btn { align-self: center; margin: 8px 0 2px; }

.ej-sev { width: 18px; height: 18px; flex: none; }
.ej-sev.error { color: var(--danger); }
.ej-sev.warning { color: var(--warning); }
.ej-sev.info { color: var(--info); }
.ej-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; flex: none; padding: 11px 12px; border-radius: var(--r-md); text-align: left; transition: background var(--dur-1) var(--ease); }
.ej-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.ej-row.on { background: var(--accent-tint); }
.ej-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ej-row .cls { overflow: hidden; color: var(--text); font-family: var(--font-mono); font-size: 13px; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; }
.ej-row .meta { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.ej-row .count { min-width: 26px; padding: 1px 7px; border-radius: var(--r-full); background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ej-row .msg { grid-column: 2 / -1; overflow: hidden; color: var(--text-2); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.ej-row .src { grid-column: 2 / -1; color: var(--text-3); font-size: 12px; }

.ej-card-head { display: flex; flex: none; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.ej-card-head .ej-sev { width: 20px; height: 20px; margin-top: 3px; }
.ej-card-head .t { flex: 1 1 180px; min-width: 0; }
.ej-card-head h2 { font-family: var(--font-mono); font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; overflow-wrap: break-word; outline: none; }
.ej-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--text-2); font-size: 12.5px; }
.ej-state i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--warning); }
.ej-state i.resolved { background: var(--success); }
.ej-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ej-acts form { display: contents; }
.ej-acts .btn { white-space: nowrap; }
.btn.ej-delete:hover { background: var(--danger-tint); color: var(--danger); }
.ej-code { max-height: min(40dvh, 320px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 18%, transparent) transparent; margin: 16px 20px 0; padding: 12px 14px; border: 1px solid var(--line-faint); border-radius: var(--r-md); background: var(--surface-1); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; letter-spacing: -.02em; white-space: pre-wrap; overflow-wrap: anywhere; }
.ej-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 20px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.ej-facts div { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); }
.ej-facts div:last-child { border-right: none; }
.ej-facts dt { color: var(--text-3); font-size: 12px; }
.ej-facts dd { margin-top: 1px; overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ej-where { margin: 10px 20px 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.ej-where .mono { color: var(--text); }

.ej-tabs { display: flex; gap: 4px; margin-top: 18px; padding: 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ej-tabs button { position: relative; flex: none; padding: 11px 8px 10px; border: 0; background: none; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: color var(--dur-1) var(--ease); }
.ej-tabs button:hover, .ej-tabs button[aria-selected="true"] { color: var(--text); }
.ej-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); }
.ej-tabs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -3px; border-radius: var(--r-sm); }
.ej-tabs .c { margin-left: 5px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ej-pane { padding: 12px 20px 6px; }
.ej-note { margin: 2px 0 8px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.ej-trace { overflow-x: auto; font-family: var(--font-mono); font-size: 12px; line-height: 1.75; letter-spacing: -.02em; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 18%, transparent) transparent; }
.ej-line { color: var(--text-2); white-space: nowrap; }
.ej-line b { font-weight: 400; }
.ej-line.own { color: var(--text); }
.ej-line.own b { color: var(--violet-300); font-weight: 500; }
.ej-libs summary { display: inline-flex; align-items: center; gap: 7px; margin: 4px 0; color: var(--text-2); font-family: var(--font-ui); font-size: 12.5px; font-weight: 550; letter-spacing: -.011em; list-style: none; cursor: pointer; border-radius: var(--r-sm); }
.ej-libs summary::-webkit-details-marker { display: none; }
.ej-libs summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--dur-1) var(--ease); }
.ej-libs[open] summary::before { transform: rotate(45deg); }
.ej-libs summary:hover { color: var(--text); }
.ej-libs summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ej-context div { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line-faint); }
.ej-context div:last-child { border-bottom: none; }
.ej-context dt { color: var(--text-3); overflow-wrap: anywhere; }
.ej-context dd { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.ej-occs { display: flex; flex-direction: column; gap: 2px; margin: 0 -10px; }
.ej-occ { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; transition: background var(--dur-1) var(--ease); }
.ej-occ:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.ej-occ.on { background: var(--accent-tint); }
.ej-occ:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ej-empty { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 320px; padding: 34px 20px; color: var(--text-2); text-align: center; }
.ej-list > .ej-empty { margin-top: -6px; }
.ej-empty svg { width: 26px; height: 26px; margin-bottom: 6px; color: var(--text-3); stroke-width: 1.5; }
.ej-empty b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.ej-empty span { max-width: 36ch; color: var(--text-2); font-size: 12.5px; }
.ej-empty .btn { margin-top: 10px; }
.ej-empty form { display: contents; }

@media (min-width: 1101px) {
  .content:has(> .ej) { padding-bottom: 24px; }
  .ej-md { height: max(calc(100dvh - var(--fit-top, 262px) - 24px), 480px); }
}
@media (max-width: 1100px) {
  .ej-md { grid-template-columns: minmax(0, 1fr); }
  .ej-md > .ej-detail { display: block; overflow: visible; }
  .ej-list { height: auto; max-height: 420px; }
  .ej-scroll { height: auto; overflow: visible; }
  .ej-detail .ej-window::after { display: none; }
  .ej-frame { scroll-margin-top: 84px; }
}
@media (max-width: 900px) {
  .ej:not(:has(.ej-card[data-explicit])) .ej-detail { display: none; }
  .ej:has(.ej-card[data-explicit]) :is(.ej-list-panel, .ej-filters, .ej-head, .ej-back-settings) { display: none; }
  .ej:has(.ej-card[data-explicit]) .ej-back-list { display: inline-flex; }
  .ej-md > .ej-list-panel { overflow: visible; }
  .ej-list { max-height: none; overflow: visible; padding-bottom: 6px; }
  .ej-row.on:not(:hover) { background: none; } /* на телефоні картку не видно поруч — рядок не виділяємо */
  .ej-list-panel .ej-window::after { display: none; }
}
@media (max-width: 720px) {
  .ej-filters { gap: 8px; }
  .ej-filters .segmented { width: 100%; }
  .ej-filters .segmented a { flex: 1 1 0; padding: 7px 8px; text-align: center; }
  .ej-chips { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ej-form { gap: 8px; }
  .ej-search-form { width: 100%; margin-left: 0; }
  .ej-search { width: 100%; min-width: 0; }
  .ej-row { padding: 11px 10px; }
  .ej-card-head { padding: 14px 14px 12px; }
  .ej-card-head h2 { font-size: 15px; }
  .ej-acts { width: 100%; }
  .ej-acts .btn { flex: 1 1 0; padding: 0 10px; }
  .ej-code { margin: 14px 14px 0; }
  .ej-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 14px 0; }
  .ej-facts div:nth-child(2) { border-right: none; }
  .ej-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ej-where { margin-left: 14px; margin-right: 14px; }
  .ej-pane { padding: 12px 14px 6px; }
  .ej-context div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ej-back, .ej-chip, .ej-search, .ej-row, .ej-occ, .ej-tabs button, .ej-libs summary::before { transition: none; }
}

/* ============ «Підтримка» як месенджер (власник 2026-11-23, варіант C) ============
   Одне вікно до низу екрана (Stimulus fit-bottom → --fit-top): ліворуч папки й список чатів, праворуч — розмова й панель
   відомостей, що закривається хрестиком (відкривається кліком на ім'я в шапці). Кожна колонка гортається всередині.
   ≤ 900 px — або список, або відкрите (клас is-open) зі стрілкою «до списку»; ≤ 1100 px панель відомостей — поверх розмови. */
.sm { --sm-h: max(calc(100dvh - var(--fit-top, 120px) - 20px), 520px);
  display: grid; grid-template-columns: 340px minmax(0, 1fr); height: var(--sm-h); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sm > * { min-width: 0; min-height: 0; }
.sm-ibtn { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border-radius: 10px; color: var(--text-2);
  background: none; border: none; cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.sm-ibtn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.sm-ibtn:focus-visible, .sm-chat:focus-visible, .sm-who:focus-visible, .sm-folders a:focus-visible, .sm-swatch:focus-visible, .sm-send:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.sm-ibtn svg { width: 19px; height: 19px; }
.sm-ibtn[aria-expanded="true"] { background: var(--accent-tint-2); color: var(--text); }

/* Список */
.sm-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-2); }
.sm-list-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; }
.sm-list-head h1 { flex: 1; font-size: 17px; font-weight: 640; letter-spacing: -.02em; }
.sm-menu { position: relative; }
.sm-menu > summary { list-style: none; }
.sm-menu > summary::-webkit-details-marker { display: none; }
.sm-menu[open] > summary { background: var(--accent-tint-2); color: var(--text); }
.sm-menu-list { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 236px; padding: 6px; border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); }
.sm-menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); }
.sm-menu-item:hover, .sm-menu-item:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.sm-menu-item svg { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.sm-search { display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 12px 8px; padding: 0 12px; border-radius: 10px;
  background: var(--surface-input); border: 1px solid var(--line); color: var(--text-3); }
.sm-search:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--accent-tint); }
.sm-search svg { width: 15px; height: 15px; flex: none; }
.sm-search-input { flex: 1; min-width: 0; height: 100%; border: none; background: none; color: var(--text); font: inherit; font-size: 13.5px; outline: none; }
.sm-folders { display: flex; gap: 2px; padding: 0 24px 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.sm-folders::-webkit-scrollbar { display: none; }
.sm-folders a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px 10px; font-size: 13px;
  font-weight: 600; color: var(--text-3); white-space: nowrap; border-radius: 6px 6px 0 0; }
.sm-folders a:hover { color: var(--text-2); }
.sm-folders a.on { color: var(--text); }
.sm-folders a.on::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.sm-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--text-on-accent); font-size: 11px;
  font-weight: 650; display: inline-grid; place-items: center; line-height: 1; font-variant-numeric: tabular-nums; }
.sm-n.quiet { background: rgba(255,255,255,.12); color: var(--text-2); }
.sm-chats { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.sm-chat { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 1px 12px; align-items: center; padding: 9px 10px; border-radius: 12px;
  color: var(--text); transition: background var(--dur-1) var(--ease); }
.sm-chat + .sm-chat { margin-top: 1px; }
.sm-chat:hover { background: rgba(255,255,255,.035); }
.sm-chat.on { background: var(--accent-tint-2); }
.sm-chat[hidden] { display: none; }
.sm-ava { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3);
  border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 14px; letter-spacing: 0; }
.sm-chat .sm-ava { grid-row: 1 / span 2; }
.sm-ava.is-group { border-radius: 14px; }
.sm-ava svg { width: 20px; height: 20px; }
.sm-ava.is-big { width: 64px; height: 64px; font-size: 20px; margin-bottom: 6px; }
.sm-chat-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sm-chat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-lock { width: 12px; height: 12px; flex: none; color: var(--text-3); }
.sm-chat-time { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-chat-sub { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-chat-badge { justify-self: end; min-height: 18px; }
.sm-empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.sm-more { display: block; margin: 6px 4px 4px; padding: 9px 10px; border-radius: 10px; text-align: center; color: var(--text-2); font-size: 13px; font-weight: 550; }
.sm-more:hover, .sm-more:focus-visible { background: rgba(255,255,255,.04); color: var(--text); outline: none; }

/* Праворуч */
.sm-pane { display: flex; flex-direction: column; background: var(--surface-1); }
.sm-placeholder { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 24px; max-width: 360px; color: var(--text-3); font-size: 13px; }
.sm-placeholder svg { width: 28px; height: 28px; stroke-width: 1.5; margin-bottom: 4px; }
.sm-placeholder b { color: var(--text); font-size: 14.5px; font-weight: 600; }
.sm-placeholder.is-inline { margin: 8px auto 16px; }
.sm-dialog { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.sm-dialog.info-closed { grid-template-columns: minmax(0, 1fr); }
.sm-conv { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.sm-conv-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; min-height: 58px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sm-back { display: none; }
.sm-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px 8px; margin: -4px 0; border-radius: 10px;
  background: none; border: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.sm-who:hover:not(.is-static) { background: rgba(255,255,255,.04); }
.sm-who.is-static { cursor: default; }
.sm-who .sm-ava { width: 38px; height: 38px; font-size: 13.5px; }
.sm-who-text { min-width: 0; display: grid; }
.sm-who-text b { font-weight: 620; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-who-text span { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-resolve { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sm-feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px clamp(12px, 3vw, 40px) 12px;
  display: flex; flex-direction: column; gap: 6px; max-height: none; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.sm-pane-scroll { display: block; }
.sm[data-background="black"] .sm-feed { background: #000; }
.sm[data-background="iris"] .sm-feed { background: radial-gradient(circle at 18% 12%, rgba(138,120,238,.10), transparent 42%),
  radial-gradient(circle at 86% 78%, rgba(138,120,238,.07), transparent 46%),
  repeating-radial-gradient(circle at 50% 120%, transparent 0 22px, rgba(255,255,255,.022) 22px 23px), var(--surface-1); }
.sm[data-background="dusk"] .sm-feed { background: linear-gradient(170deg, #1B1930, var(--surface-1) 70%); }
.sm-day { align-self: center; margin: 8px 0 4px; padding: 3px 10px; border-radius: var(--r-full); background: rgba(255,255,255,.06); color: var(--text-2); font-size: 12px; font-weight: 550; }
.sm-note { align-self: center; max-width: min(560px, 92%); }
.sm-note .support-bubble { text-align: center; font-size: 12.5px; color: var(--text-3); background: rgba(0,0,0,.25); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 8px 14px; }
.sm-msg { display: flex; align-items: flex-end; gap: 6px; max-width: min(600px, 82%); align-self: flex-start; }
.sm-msg.is-hq { align-self: flex-end; flex-direction: row-reverse; }
.sm-pick { flex: none; align-self: center; padding: 0; opacity: .35; transition: opacity var(--dur-1) var(--ease); }
.sm-msg:hover .sm-pick, .sm-pick:focus-within, .sm-msg.is-picked .sm-pick { opacity: 1; }
.sm-pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.sm-bubble { padding: 7px 12px 6px; border-radius: 16px; border-bottom-left-radius: 6px; background: var(--surface-3); border: 1px solid var(--line-faint);
  font-size: 14px; line-height: 1.45; min-width: 0; }
.sm-msg.is-hq .sm-bubble { background: #26214A; border-color: rgba(138,120,238,.22); border-radius: 16px; border-bottom-right-radius: 6px; }
.sm-msg.is-assistant .sm-bubble { background: #1B1930; }
.sm-msg.is-resolved .sm-bubble { border-color: var(--success); }
.sm-msg.is-picked .sm-bubble { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-by { font-size: 12px; margin-bottom: 2px; }
.sm-by b { color: var(--violet-300); font-weight: 600; }
.sm-text p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sm-text p + p { margin-top: 6px; }
.sm-photo { display: block; max-width: min(280px, 100%); max-height: 320px; border-radius: 10px; margin: 2px 0 6px; }
.sm-ft { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 2px; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.sm-ft svg { width: 14px; height: 14px; }
.sm-ft .sm-seen { color: var(--violet-300); }
.sm-ft .pill { height: 20px; font-size: 11px; }
.sm-selbar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; flex-wrap: wrap; }
.sm-selbar[hidden] { display: none; }
.sm-sel-title { flex: 1 1 200px; min-width: 0; height: 34px; }
.sm-selbar .btn svg { width: 15px; height: 15px; }
.sm-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; margin: 0; border-top: 1px solid var(--line); background: var(--surface-2); }
.sm-composer[hidden] { display: none; }
.sm-composer .sm-ibtn { width: 40px; height: 40px; border-radius: 50%; }
.sm-attach { position: relative; cursor: pointer; }
.sm-attach:focus-within { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring); }
.sm-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 9px 14px; border-radius: 20px; background: var(--surface-input); border: 1px solid var(--line); }
.sm-field:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--accent-tint); }
.sm-field textarea { border: none; background: none; resize: none; outline: none; color: var(--text); font: inherit; font-size: 14px; line-height: 1.45; min-height: 21px; max-height: 180px; padding: 0; }
.sm-file { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-file[hidden] { display: none; }
.sm-send { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--text-on-accent); border: none; cursor: pointer;
  transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.sm-send:hover { background: var(--accent-hover); }
.sm-send:active { transform: scale(.95); }
.sm-send svg { width: 18px; height: 18px; stroke-width: 1.9; }
.sm-locked { display: grid; justify-items: center; gap: 6px; text-align: center; margin: 24px auto 18px; max-width: 420px; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.sm-locked svg { width: 28px; height: 28px; stroke-width: 1.5; }
.sm-locked b { color: var(--text); font-size: 14.5px; }
.sm-card { max-width: 720px; margin: 0 auto 14px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sm-card h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.sm-card > .subtle { margin-bottom: 10px; font-size: 13px; }
.sm-card .iris-table { margin: 4px -18px 0; width: calc(100% + 36px); }

/* Панель відомостей */
.sm-info { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; overscroll-behavior: contain; }
.sm-info[hidden] { display: none; }
.sm-info-top { position: relative; display: grid; justify-items: center; gap: 3px; padding: 22px 16px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.sm-info-top b { font-size: 15.5px; font-weight: 630; overflow-wrap: anywhere; }
.sm-info-top > span:not(.sm-ava) { color: var(--text-3); font-size: 12.5px; }
.sm-info-top .btn { margin-top: 8px; }
.sm-info-close { position: absolute; top: 8px; right: 8px; }
.sm-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-faint); font-size: 13px; }
.sm-facts dt { color: var(--text-3); }
.sm-facts dd { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-facts.is-wide { max-width: 720px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.sm-info-block { padding: 14px 16px; border-bottom: 1px solid var(--line-faint); }
.sm-info-block h4 { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.sm-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sm-swatch { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.sm-swatch[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-swatch.is-plain { background: var(--surface-1); }
.sm-swatch.is-black { background: #000; }
.sm-swatch.is-iris { background: radial-gradient(circle at 30% 20%, rgba(138,120,238,.35), transparent 60%),
  repeating-radial-gradient(circle at 50% 130%, transparent 0 6px, rgba(255,255,255,.08) 6px 7px), var(--surface-1); }
.sm-swatch.is-dusk { background: linear-gradient(160deg, #1B1930, var(--surface-1)); }
.sm-count { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 4px 0; }
.sm-count svg { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.sm-info-note { padding: 14px 16px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }

@media (max-width: 1100px) {
  .sm { grid-template-columns: 300px minmax(0, 1fr); }
  .sm-dialog, .sm-dialog.info-closed { grid-template-columns: minmax(0, 1fr); position: relative; }
  .sm-info { position: absolute; inset: 0 0 0 auto; width: min(320px, 100%); z-index: 5; box-shadow: var(--shadow-2); }
}
@media (max-width: 900px) {
  .sm { grid-template-columns: minmax(0, 1fr); --sm-h: max(calc(100dvh - var(--fit-top, 80px) - 12px), 480px); }
  .sm:not(.is-open) .sm-pane { display: none; }
  .sm.is-open .sm-list { display: none; }
  .sm-back { display: inline-grid; }
  .sm-list { border-right: none; }
  .sm-msg { max-width: 90%; }
  .sm-info { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-ibtn, .sm-chat, .sm-send, .sm-pick { transition: none; }
}
.content:has(> .sm) { padding-bottom: 16px; }
