/* TNA Admin — design system.
   Same face as the catalog: white surfaces, ink type, ember only on the
   action that matters. Numbers are Onest so a zero stays a zero.
   Mood themes still repaint --bg / --ink / --accent / --sidebar-bg. */

:root {
  /* Canvas & ink — cool stone, not cream paper */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --paper-2: #f7f8fa;
  --elevated: #eef0f3;
  --ink: #121722;
  --ink-2: #3a4258;
  --subtle: #667085;

  /* Accent + semantic, each with a tint for backgrounds */
  --accent: #e85d2c;
  --accent-ink: #c2410c;       /* accent as text on paper (contrast) */
  --accent-weak: rgba(232, 93, 44, 0.13);
  --red: #d4364a;      --red-weak: rgba(212, 54, 74, 0.12);
  --green: #0e8f62;    --green-weak: rgba(14, 143, 98, 0.13);
  --blue: #2f5bd0;     --blue-weak: rgba(47, 91, 208, 0.12);
  --amber: #c47b08;    --amber-weak: rgba(232, 168, 40, 0.18);
  --mint: var(--green);
  --yellow: var(--amber);

  /* Departure statuses — the same colours everywhere (tickets, season board, print) */
  --st-pre: #3d62d6;
  --st-open: #0e8f62;
  --st-full: #d4920a;
  --st-live: #121722;
  --st-done: #9aa3b5;
  --st-off: #d4364a;

  /* Lines */
  --stroke: rgba(18, 23, 34, 0.10);
  --divider: rgba(18, 23, 34, 0.07);
  --field-border: rgba(18, 23, 34, 0.16);

  /* Radii — small for controls, larger for surfaces, largest for photos */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;
  --radius: var(--r-lg);

  /* Cards lift off the canvas; overlays keep the deep shadow */
  --sh-1: 0 1px 2px rgba(16, 20, 36, 0.04);
  --sh-card: 0 1px 2px rgba(16, 20, 36, 0.04);
  --sh-2: 0 24px 64px rgba(16, 20, 36, 0.28);
  --sh-photo: 0 16px 36px -16px rgba(16, 20, 36, 0.5);

  --sidebar-bg: #10141f;

  /* LocalHands pair: Inter for everything you read, Onest for titles and big numbers. */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Onest", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  font-feature-settings: "tnum" 0;
}

input, select, textarea, button { font-family: inherit; font-size: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Author `display` (`.field` is flex) beats the user-agent `[hidden]` rule,
   so a hidden field stayed on screen. The attribute has to win. */
.hidden, [hidden] { display: none !important; }
.muted { color: var(--subtle); font-size: 13px; }
.dep-sublabel { font-size: 12px; margin-top: 2px; }
.sm { font-size: 12px; }
.error { color: var(--red); font-size: 13px; margin-top: 10px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.neg { color: var(--red); }
.ok { color: var(--green); }
.pre { white-space: pre-wrap; }

/* ── Login ─────────────────────────────────────────────────────────── */
.login {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(232, 118, 63, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(62, 95, 180, .12), transparent 60%),
    var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  padding: 34px;
  width: 380px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--sh-2);
}
/* Login card modes: login | forgot | set (new password from an e-mail link). */
.login-card:not([data-mode="login"]) .only-login,
.login-card:not([data-mode="forgot"]) .only-forgot,
.login-card:not([data-mode="set"]) .only-set,
.login-card[data-mode="set"] .not-set { display: none; }
.link-btn {
  align-self: flex-start; background: none; border: 0; padding: 0;
  color: var(--ink-2); font-size: 13px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.brand { text-align: left; margin-bottom: 10px; }
.brand h1 { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; margin-top: 14px; }
.brand-badge {
  display: inline-block;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; font-size: 13px;
  padding: 6px 10px; border-radius: var(--r-sm);
}

/* ── Form controls ─────────────────────────────────────────────────── */
input, select, textarea {
  border: 1px solid var(--field-border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:disabled, select:disabled, textarea:disabled { background: var(--paper-2); color: var(--ink-2); cursor: default; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--subtle) 75%, transparent); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
input[type="number"] { font-variant-numeric: tabular-nums; }
/* Own chevron: the native one sits ~6px from the border and looks glued to it. */
select:not([multiple]):not(.st-select) {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23858ba0' fill='none' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent);
  color: #fff; border: none;
  padding: 10px 16px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: filter .12s ease, transform .04s ease;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: default; filter: none; }
.btn-primary.sm { padding: 8px 13px; font-size: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: 1px solid var(--stroke);
  color: var(--ink-2); border-radius: var(--r-md);
  padding: 9px 14px; cursor: pointer; font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--field-border); }

.btn-small {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--stroke);
  padding: 5px 10px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-small:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-small:disabled { opacity: 0.4; cursor: default; }
.btn-small .ic { width: 14px; height: 14px; }
.btn-small.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-small.primary:hover { filter: brightness(1.12); background: var(--ink); color: #fff; }
.btn-small.warn { background: none; border-color: transparent; color: var(--red); }
.btn-small.warn:hover { background: var(--red-weak); border-color: transparent; color: var(--red); }

/* ── Icon row actions ──────────────────────────────────────────────── */
.row-actions { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

.btn-icon {
  position: relative;
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  background: none; color: var(--subtle);
  border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; font-size: 14px;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-icon svg {
  width: 17px; height: 17px; display: block; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn-icon:hover, .btn-icon:focus-visible {
  color: var(--accent-ink); background: var(--accent-weak); outline: none;
}
.btn-icon.warn:hover, .btn-icon.warn:focus-visible { color: var(--red); background: var(--red-weak); }
.btn-icon.on { color: var(--accent); }
.btn-icon:disabled { opacity: .32; cursor: default; }
.btn-icon:disabled:hover { color: var(--subtle); background: none; border-color: transparent; }
.btn-icon .icount {
  position: absolute; top: -1px; right: -1px;
  min-width: 15px; height: 15px; padding: 0 3px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 1;
  border-radius: var(--r-pill); pointer-events: none;
}

/* Tooltip: pure CSS, above the control, never eats pointer events. `.hint`
   draws its own wide bubble below and is excluded here. */
[data-tip] { position: relative; }
[data-tip]:not(.hint)::before, [data-tip]:not(.hint)::after {
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .12s ease .03s, transform .12s ease .03s;
}
[data-tip]:not(.hint)::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translate(-50%, 3px);
  background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 500; line-height: 1.3;
  white-space: nowrap; padding: 5px 9px; border-radius: 7px;
  box-shadow: 0 4px 14px rgba(43, 54, 85, 0.22);
}
[data-tip]:not(.hint)::before {
  content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%;
  transform: translate(-50%, 3px);
  border: 5px solid transparent; border-top-color: var(--ink);
}
[data-tip]:not(.hint):hover::before, [data-tip]:not(.hint):hover::after,
[data-tip]:not(.hint):focus-visible::before, [data-tip]:not(.hint):focus-visible::after {
  opacity: 1; transform: translate(-50%, 0);
}
[data-tip].tip-left::after {
  bottom: auto; top: 50%; left: auto; right: calc(100% + 7px);
  transform: translate(3px, -50%);
}
[data-tip].tip-left::before {
  bottom: auto; top: 50%; left: auto; right: calc(100% + 2px);
  transform: translate(3px, -50%);
  border-top-color: transparent; border-left-color: var(--ink);
}
[data-tip].tip-left:hover::before, [data-tip].tip-left:hover::after,
[data-tip].tip-left:focus-visible::before, [data-tip].tip-left:focus-visible::after {
  transform: translate(0, -50%);
}
[data-tip].tip-note::after {
  white-space: normal; width: 240px; max-width: 60vw;
  font-weight: 400; line-height: 1.4; text-align: left;
}
.btn-icon-gap { display: inline-block; width: 30px; height: 30px; }

/* ── Shell ─────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100dvh; align-items: flex-start; }
.sidebar {
  width: 236px; flex: none;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 18px 12px 14px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100dvh;
}
.brand-row { display: flex; align-items: center; gap: 10px; padding: 2px 8px 0; }
.sidebar .brand-badge { background: var(--accent); color: #fff; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.01em; }
.env-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; margin-left: auto; }
.env-badge.beta { background: rgba(245,199,82,0.18); color: #f5c752; }
.env-badge.prod { background: rgba(124,197,175,0.2); color: #7cc5af; }

/* Caution tape. Only beta (html.is-beta, set in init). Prod has no bar.
   Kept short and low-contrast so it marks the environment without shouting. */
html.is-beta { --beta-bar: calc(26px + env(safe-area-inset-top)); }
html.is-beta body { padding-top: var(--beta-bar); }
html.is-beta .sidebar { top: var(--beta-bar); height: calc(100dvh - var(--beta-bar)); }
html.is-beta .login { min-height: calc(100dvh - var(--beta-bar)); }
html.is-beta .m-topbar { top: var(--beta-bar); }
.beta-banner { display: none; }
html.is-beta .beta-banner { display: flex; }
.beta-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  align-items: center; justify-content: center;
  height: var(--beta-bar, 26px);
  padding: env(safe-area-inset-top) 16px 0;
  background: repeating-linear-gradient(-45deg, #2a261f 0 8px, #6e5c38 8px 16px);
}
.beta-banner p {
  margin: 0; max-width: min(920px, 100%);
  padding: 1px 10px;
  background: #241f18; color: #e4d7b0;
  font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0.01em;
  border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.beta-banner strong { margin-right: 7px; letter-spacing: 0.08em; font-weight: 700; color: #f0e2bc; }
.env-select-row { display: flex; align-items: center; gap: 10px; }
.env-select-row label { font-size: 13px; color: var(--subtle); }
.env-select-row select { flex: 1; }

.sidebar nav { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-end { margin-top: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: rgba(255,255,255,0.68);
  text-align: left; padding: 7px 10px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.nav-item .ni {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  opacity: .85;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.10); color: #fff; }
.nav-item.active .ni { color: var(--accent); opacity: 1; }
.nav-label {
  font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,0.48);
  padding: 8px 10px 4px;
}
/* Mood themes carry their own emoji in the label — the line icon steps aside. */
body[data-anya-theme]:not([data-anya-theme="normal"]) .nav-item .ni { display: none; }

@media (max-height: 760px) {
  .sidebar { gap: 8px; padding: 12px 10px; }
  .sidebar nav { gap: 6px; }
  .nav-item { padding: 5px 10px; font-size: 13px; }
  .nav-label { padding: 4px 10px 1px; }
}
@media (max-height: 640px) {
  .nav-item { padding: 4px 10px; font-size: 12.5px; }
  .nav-label { font-size: 10.5px; }
}
.nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: var(--r-pill); line-height: 1;
}
.nav-item.active .nav-badge { background: #fff; color: var(--accent-ink); }
.ceo-tag {
  font-size: 12px; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-weak); padding: 3px 10px; border-radius: var(--r-pill);
  vertical-align: middle; margin-left: 6px;
}
.sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer .muted { color: rgba(255,255,255,0.5); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sidebar-footer .btn-ghost { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.14); padding: 5px 10px; font-size: 12.5px; }
.sidebar-footer .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

main { flex: 1; min-width: 0; padding: 26px 36px 64px; max-width: 1480px; }
h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 18px; line-height: 1.15; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; color: var(--ink); }

/* ── Аня's mood switcher — a quiet strip, not a header ─────────────── */
.anya-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  margin: -6px 0 14px; flex-wrap: wrap; min-height: 32px;
}
.anya-greeting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-right: auto; }
.anya-greeting:empty { display: none; }
.anya-hi { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.anya-mascots { display: inline-flex; gap: 3px; }
.anya-mascots .mascot { font-size: 18px; display: inline-block; }
.anya-themes { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--elevated); border-radius: var(--r-pill); }
.anya-themes-label { font-size: 12px; color: var(--subtle); margin: 0 6px 0 8px; }
.anya-theme-btn {
  font-size: 14px; line-height: 1; background: none; border: none;
  border-radius: var(--r-pill); width: 28px; height: 28px; cursor: pointer; transition: background .12s;
}
.anya-theme-btn:hover { background: var(--surface); }
.anya-theme-btn.active { background: var(--surface); box-shadow: 0 1px 2px rgba(43,54,85,.14); }

body[data-anya-theme="anya-slava"] {
  --bg: #fdeff6; --surface: #ffffff; --paper-2: #fdf5f9; --elevated: #f6e3ee;
  --ink: #5b3a5f; --ink-2: #7a5680; --subtle: #b47fa8; --accent: #e07aa6; --accent-ink: #c4588a; --accent-weak: rgba(224,122,166,0.14);
  --stroke: rgba(180,120,160,0.18); --sidebar-bg: #7a5c86;
}
body[data-anya-theme="happy"] {
  --bg: #fff7e0; --surface: #ffffff; --paper-2: #fffbef; --elevated: #fbeecb;
  --ink: #6e4e1a; --ink-2: #8a6a33; --subtle: #c19a3e; --accent: #f0932a; --accent-ink: #c56f10; --accent-weak: rgba(240,147,42,0.15);
  --stroke: rgba(200,150,50,0.2); --sidebar-bg: #b9701f;
}
body[data-anya-theme="sad"] {
  --bg: #edf1f7; --surface: #ffffff; --paper-2: #f5f7fb; --elevated: #e0e6f0;
  --ink: #3f4d66; --ink-2: #5a6884; --subtle: #8794ad; --accent: #5f7cc0; --accent-ink: #4762a6; --accent-weak: rgba(95,124,192,0.14);
  --stroke: rgba(80,100,140,0.14); --sidebar-bg: #46566f;
}
body[data-anya-theme="angry"] {
  --bg: #fff0ed; --surface: #ffffff; --paper-2: #fff7f5; --elevated: #ffe0da;
  --ink: #5a2626; --ink-2: #7a3b3b; --subtle: #c07a72; --accent: #e6432d; --accent-ink: #c22e1a; --accent-weak: rgba(230,67,45,0.14);
  --red: #e6432d; --stroke: rgba(255,110,90,0.2); --sidebar-bg: #5a1e1e;
}

/* ── Cards & panels ────────────────────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg);
  margin-bottom: 16px; overflow: hidden;
}
.card {
  background: transparent; border: 0; border-radius: 0; padding: 16px 18px;
  box-shadow: inset -1px 0 0 var(--divider), inset 0 -1px 0 var(--divider);
}
.card .value { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.card .label { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-top: 6px; }
.card .value.red { color: var(--red); }

#bonus-review { margin-bottom: 14px; }
#bonus-review h3 { margin: 0 0 6px; }
.panel {
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px;
  box-shadow: var(--sh-card);
}
/* Dashboard lives in dashboard.css. */
.toolbar { margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Tables ────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--subtle); font-size: 12px; font-weight: 600;
  padding: 8px 12px 10px; border-bottom: 1px solid var(--stroke);
  background: transparent;
}
td { padding: 12px; border-bottom: 1px solid var(--divider); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s ease; }
tbody tr:hover td { background: var(--paper-2); }

th.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable-th:hover { color: var(--ink); }
.sort-caret { color: var(--accent); font-size: 11px; }

.more-row { display: flex; justify-content: center; padding: 14px 0 4px; }
.load-more { background: var(--elevated); border-color: transparent; color: var(--ink-2); }
.load-more:hover { color: var(--accent-ink); background: var(--accent-weak); border-color: transparent; }

td .btn-small { white-space: nowrap; }

/* ── Badges ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; background: var(--elevated); color: var(--ink-2);
}
.phone {
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.phone:hover { color: var(--accent-ink); text-decoration: underline; }
.row-off { color: var(--subtle); text-decoration: line-through; }
.badge.requested   { background: var(--amber-weak);  color: var(--amber); }
.badge.confirmed   { background: var(--blue-weak);   color: var(--blue); }
.badge.prepaid     { background: var(--accent-weak); color: var(--accent-ink); }
.badge.paid        { background: var(--green-weak);  color: var(--green); }
.badge.completed   { background: var(--elevated);    color: var(--subtle); }
.badge.cancelled   { background: var(--red-weak);    color: var(--red); }
.badge.open        { background: var(--green-weak);  color: var(--green); }
.badge.full        { background: var(--amber-weak);  color: var(--amber); }
.badge.in_progress { background: var(--blue-weak);   color: var(--blue); }

.spots-input { width: 60px; padding: 6px 8px; }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500; max-width: min(640px, 90vw);
  box-shadow: var(--sh-2); z-index: 400;
}
.toast.err { background: var(--red); }

/* ── View head (title + action) ────────────────────────────────────── */
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.view-head h2 { margin-bottom: 0; }

code {
  background: var(--elevated); padding: 2px 7px; border-radius: 6px;
  font-family: "SF Mono", ui-monospace, monospace; font-size: 12px; color: var(--ink);
}

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(35, 44, 69, 0.42);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: var(--r-xl); width: 560px; max-width: 100%; box-shadow: var(--sh-2); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--stroke);
}
.modal-head h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-body .btn-primary { margin-top: 6px; }
#confirm-overlay { z-index: 260; align-items: center; }
#confirm-overlay .modal-body .btn-primary { margin-top: 0; }
#confirm-overlay #confirm-text { margin: 0; line-height: 1.5; color: var(--ink); }
.modal.narrow { width: 440px; }
.btn-ghost.danger-text, .danger-text { color: var(--red); }

/* ── Forms ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { resize: vertical; line-height: 1.5; }
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }

.panel > .field { margin-bottom: 14px; }
.panel > .field + .btn-primary { margin-top: 2px; }
.panel > .btn-primary + .muted { margin-top: 10px; }

.icon-cell { display: inline-flex; align-items: center; gap: 10px; }
.icon-cell .icon-glyph { font-size: 22px; line-height: 1; }
.icon-cell code { color: var(--subtle); }

.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: auto; accent-color: var(--accent); }

.hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  background: var(--elevated); color: var(--subtle);
  font-size: 10px; font-weight: 700; cursor: help;
  position: relative; outline: none;
}
.hint:hover, .hint:focus { background: var(--accent); color: #fff; }
.hint::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: calc(100% + 8px); right: auto; bottom: auto;
  width: 250px; max-width: 60vw;
  background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.45;
  padding: 8px 11px; border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 60; pointer-events: none; white-space: normal;
}
.hint::before {
  content: ""; position: absolute; left: 5px; top: calc(100% + 3px); right: auto; bottom: auto;
  border: 5px solid transparent; border-bottom-color: var(--ink);
  opacity: 0; visibility: hidden; transition: opacity .15s ease; z-index: 60;
}
.hint:hover::after, .hint:focus::after { opacity: 1; visibility: visible; transform: translateY(0); }
.hint:hover::before, .hint:focus::before { opacity: 1; visibility: visible; }
/* The bubble hangs over the control below. Lift the label so the input
   does not paint on top of it. */
.field > label:has(.hint:hover),
.field > label:has(.hint:focus) { position: relative; z-index: 5; }

.field input[type="color"] { height: 42px; padding: 4px; cursor: pointer; }

/* ── Место на карте: поиск + выбранная точка ──────────────────────── */
.place-field { display: flex; flex-direction: column; gap: 8px; }
.place-search { display: flex; gap: 8px; align-items: center; }
.place-search > input { flex: 1; min-width: 0; }
.place-results { display: flex; flex-direction: column; gap: 6px; }
.place-result {
  display: flex; align-items: baseline; gap: 8px; text-align: left; width: 100%;
  padding: 8px 12px; border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: var(--paper-2); cursor: pointer; font: inherit; color: var(--ink);
}
.place-result:hover { border-color: var(--accent); background: var(--accent-weak); }
.place-picked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.place-picked .place-label { font-weight: 600; color: var(--ink); }
.place-picked a { color: var(--accent-ink); }

/* ── flatpickr calendar (TNA accent) ───────────────────────────────── */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange { background: var(--accent); border-color: var(--accent); color: #fff; }
.flatpickr-day.today { border-color: var(--accent); }
.flatpickr-day:hover { background: var(--accent-weak); }
.flatpickr-weekday { color: var(--subtle); font-weight: 700; }
.flatpickr-current-month, .flatpickr-monthDropdown-months, .flatpickr-time input { color: var(--ink); }
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: var(--accent); }

/* ── Tour photo gallery ────────────────────────────────────────────── */
.gallery-field { display: flex; flex-direction: column; gap: 10px; }
.gallery-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-item { position: relative; width: 96px; height: 70px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--stroke); }
.gallery-item.cover { border: 2px solid var(--accent); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-badge { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 6px; }
.gallery-cover { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(46,58,92,0.72); border: none; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.gallery-del { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; }
.gallery-add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-weak); padding: 8px 14px; border-radius: var(--r-md); border: none; }

/* ── Tour carousel video ───────────────────────────────────────────── */
.video-field { display: flex; flex-direction: column; gap: 10px; }
.video-box { display: flex; align-items: flex-end; gap: 10px; }
.video-item { position: relative; width: 96px; height: 132px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--stroke); background: var(--ink); }
.video-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-video-mark { font-size: 14px; vertical-align: middle; }

#customer-search { width: 320px; max-width: 100%; }

/* ── Achievement badge with revoke ─────────────────────────────────── */
.ach-badge { display: inline-flex; align-items: center; gap: 6px; }
.ach-revoke { background: none; border: none; color: var(--subtle); cursor: pointer; font-size: 12px; padding: 0; line-height: 1; }
.ach-revoke:hover { color: var(--red); }

/* ── Departure group chats + ЛС ────────────────────────────────────── */
/* One messenger card: chat list on the left (paper-2), the thread on the right.
   The thread mirrors the phone: soft bubbles that hug their text, the company
   voice on an ember tint, cards for polls / albums / voice. */
.chats-layout {
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  height: max(560px, calc(100vh - 170px));
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-card);
}
.chats-list-panel {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--paper-2); border-right: 1px solid var(--divider);
}
.chats-list-head { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 8px; }
.chats-search-wrap { position: relative; display: block; }
.chats-search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--subtle); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.chats-search { width: 100%; margin: 0; padding-left: 36px; border-radius: var(--r-pill); }
.chat-tabs { display: flex; gap: 2px; padding: 3px; background: var(--elevated); border-radius: var(--r-md); }
.chat-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; background: none; border-radius: var(--r-sm); padding: 6px 4px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--subtle); white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.chat-tab:hover { color: var(--ink); }
.chat-tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 54, 85, .12); }
.chat-tab-n { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.chat-tab.hot .chat-tab-n {
  opacity: 1; min-width: 18px; padding: 0 5px; line-height: 17px; text-align: center;
  background: var(--accent); color: #fff; border-radius: var(--r-pill);
}
.chats-list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 14px; }
.chats-list-empty { padding: 40px 16px; text-align: center; color: var(--subtle); font-size: 13px; }

.chat-group, .chat-archive > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 5px; font-size: 11.5px; font-weight: 600; color: var(--subtle);
}
.chat-group span, .chat-archive > summary span { font-variant-numeric: tabular-nums; opacity: .8; }

/* Архив чатов — свёрнутый блок внизу списка. Прошлые заезды не мешаются, но
   переписка по ним доступна в один клик. */
.chat-archive { margin-top: 6px; border-top: 1px solid var(--divider); }
.chat-archive > summary { list-style: none; cursor: pointer; justify-content: flex-start; gap: 6px; }
.chat-archive > summary::-webkit-details-marker { display: none; }
.chat-archive > summary::before {
  content: ""; width: 6px; height: 6px; margin-right: 2px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease;
}
.chat-archive[open] > summary::before { transform: rotate(45deg); }
.chat-archive > summary:hover { color: var(--accent-ink); }
.chat-archive .chat-item { opacity: .7; }
.chat-archive .chat-item:hover, .chat-archive .chat-item.active { opacity: 1; }

.chat-item {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 12px; padding: 9px 10px; margin-bottom: 1px;
  cursor: pointer; font-size: 14px; color: var(--ink);
  transition: background .12s ease, box-shadow .12s ease;
}
.chat-item:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.chat-item.active {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(43, 54, 85, .10), inset 3px 0 0 var(--accent);
}
.chat-av {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; line-height: 1;
  background: linear-gradient(145deg, color-mix(in srgb, var(--av, var(--accent)) 72%, #fff), var(--av, var(--accent)));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.chat-av.dm { border-radius: 50%; }
.chat-av.grp { border-radius: 14px; }
.chat-av.lg { width: 42px; height: 42px; }
.chat-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item-top, .chat-item-bottom { display: flex; align-items: center; gap: 8px; }
.chat-item-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-time { flex: 0 0 auto; font-size: 11.5px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.chat-item-preview {
  flex: 1; min-width: 0; font-size: 13px; color: var(--subtle);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-item-you { font-weight: 600; color: var(--ink-2); }
.chat-item.unread .chat-item-title { font-weight: 700; }
.chat-item.unread .chat-item-preview { color: var(--ink); }
.chat-item.unread .chat-item-time { color: var(--accent-ink); font-weight: 600; }
.chat-dot {
  flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}

/* Thread column */
.chats-thread-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#chat-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 320px; text-align: center;
}
.chat-empty svg { width: 120px; height: auto; }
.chat-empty .ce-a { fill: var(--accent-weak); }
.chat-empty .ce-b { fill: var(--surface); stroke: var(--field-border); stroke-width: 1.5; }
.chat-empty .ce-d { fill: var(--subtle); opacity: .55; animation: ce-dot 1.4s ease-in-out infinite; }
.chat-empty .ce-d:nth-of-type(2) { animation-delay: .18s; }
.chat-empty .ce-d:nth-of-type(3) { animation-delay: .36s; }
@keyframes ce-dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .chat-empty .ce-d { animation: none; } }
.chat-empty p { font-size: 14px; }

/* Thread chrome */
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-head-text { display: flex; flex-direction: column; min-width: 0; }
.chat-head-title {
  font-weight: 700; font-size: 15.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-head-sub { font-size: 12.5px; color: var(--subtle); }
.chat-back {
  display: none; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; margin-left: -6px;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
}
.chat-back:hover { background: var(--elevated); }
.chat-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#chat-thread .chat-head { padding: 14px 22px; border-bottom: 1px solid var(--divider); }

.pinbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 8px 12px; border-radius: var(--r-md);
  background: var(--amber-weak); font-size: 13px; color: var(--ink);
}
.pinbar-icon { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linejoin: round; }
.pinbar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinbar-text b { color: var(--amber); font-weight: 600; margin-right: 4px; }
.pinbar-count {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--subtle);
  background: var(--surface); border-radius: var(--r-pill); padding: 1px 7px;
}
#chat-thread .pinbar { margin: 10px 22px 0; }

/* Подгрузка старых сообщений — вверху ленты, по центру. */
.chat-more {
  display: block; margin: 0 auto 6px; align-self: center;
  background: var(--surface); border-color: var(--stroke); color: var(--subtle); border-radius: var(--r-pill);
}
.chat-more:hover { color: var(--accent-ink); }

.msg-list {
  flex: 1; max-height: 58vh; overflow-y: auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 16px; margin-bottom: 12px;
  background-color: var(--paper-2);
  background-image: radial-gradient(var(--stroke) 1px, transparent 1.3px);
  background-size: 20px 20px;
  border-radius: var(--r-lg);
}
#chat-thread .msg-list { max-height: none; min-height: 0; margin: 0; border-radius: 0; padding: 20px 28px; }

/* Day separator */
.day { align-self: center; margin: 6px 0 2px; }
.day span {
  font-size: 11px; font-weight: 600; color: var(--subtle);
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: var(--r-pill); padding: 3px 10px;
}

/* A row is avatar + bubble; `mine` flips it to the right edge. */
.row { display: flex; gap: 8px; align-items: flex-end; max-width: min(78%, 620px); }
.row.mine { align-self: flex-end; flex-direction: row-reverse; }
.row.grouped { margin-top: -7px; }
.ava {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700;
}

.msg {
  min-width: 0; background: var(--surface); border: 0;
  border-radius: 18px 18px 18px 6px; padding: 8px 13px 6px;
  box-shadow: 0 1px 1.5px rgba(43, 54, 85, .09);
}
.row.grouped .msg { border-radius: 18px 18px 18px 6px; }
.row.mine .msg { background: color-mix(in srgb, var(--blue) 13%, var(--surface)); border-radius: 18px 18px 6px 18px; }
.row.mine.grouped .msg { border-radius: 18px 18px 6px 18px; }
.row.company .msg { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); }
.msg.wide { min-width: 320px; }

.msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.msg-head .who { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }
.row.mine .msg-head .who { color: var(--blue); }
.row.company .msg-head .who { color: var(--accent-ink); }
.role-chip {
  font-size: 10px; font-weight: 600; color: var(--subtle);
  background: var(--elevated); border-radius: var(--r-pill); padding: 1px 6px;
}
.msg-text { font-size: 14px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-foot {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  margin-top: 2px; font-size: 10.5px; color: var(--subtle); font-variant-numeric: tabular-nums;
}
.pin-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--subtle); text-decoration: underline; opacity: 0;
  transition: opacity .12s ease;
}
.msg:hover .pin-toggle, .pin-toggle:focus-visible { opacity: 1; }
.pin-toggle:hover { color: var(--accent); }
.pin-toggle:disabled { opacity: .4; cursor: default; }

/* Reply quote */
.msg-reply {
  display: flex; flex-direction: column; gap: 1px; margin-bottom: 5px;
  padding: 4px 8px; border-left: 2px solid var(--accent);
  background: var(--bg); border-radius: 0 8px 8px 0; font-size: 12px;
}
.msg-reply-who { font-weight: 700; color: var(--accent); }
.msg-reply-text { color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Reactions */
.msg-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.react {
  font-size: 11px; background: var(--elevated); border: 1px solid var(--stroke);
  border-radius: var(--r-pill); padding: 1px 7px;
}

/* Media */
.msg-album { display: block; }
.msg-album.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.msg-img {
  display: block; width: 100%; max-width: 240px; max-height: 260px;
  object-fit: cover; border-radius: 10px; cursor: zoom-in;
}
.msg-album.grid .msg-img { max-width: none; height: 110px; }
.msg-media { font-size: 14px; color: var(--ink); }
.msg-media a { color: var(--accent); }
.msg-voice { display: flex; align-items: center; gap: 8px; }
.msg-voice audio { height: 32px; max-width: 220px; }
.voice-len { font-size: 11px; color: var(--subtle); }

/* Poll card */
.poll { display: flex; flex-direction: column; gap: 6px; min-width: 280px; }
.poll-q { font-weight: 700; color: var(--ink); }
.poll-d { font-size: 13px; color: var(--subtle); }
.poll-meta { font-size: 11px; font-weight: 600; color: var(--subtle); }
.poll-opt { display: flex; flex-direction: column; gap: 3px; }
.poll-opt-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink); }
.poll-pct { font-weight: 700; color: var(--subtle); }
.poll-bar { height: 6px; border-radius: var(--r-pill); background: var(--elevated); overflow: hidden; }
.poll-bar i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.poll-opt.correct .poll-bar i { background: var(--green); }
.poll-voters { font-size: 11px; color: var(--subtle); }
.poll-total { font-size: 12px; font-weight: 600; color: var(--subtle); margin-top: 2px; }

/* Composer: one rounded field with the tools inside, «от имени TNA» under it. */
.chat-composer { display: flex; flex-direction: column; gap: 8px; }
#chat-thread .chat-composer { padding: 12px 22px 14px; border-top: 1px solid var(--divider); background: var(--surface); }
#chat-thread .upload-strip { margin: 8px 22px 0; }
.chat-send {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 4px 4px 6px; background: var(--surface);
  border: 1px solid var(--field-border); border-radius: 24px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.chat-send:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.chat-send input[type="text"] {
  flex: 1; min-width: 0; width: auto; margin: 0; padding: 8px 8px;
  border: 0; background: none; box-shadow: none; outline: none; font-size: 14.5px;
}
.chat-send input[type="text"]:focus { box-shadow: none; }
.composer-btn {
  flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: none; border: 0; cursor: pointer; color: var(--subtle);
  transition: background .12s ease, color .12s ease;
}
.composer-btn:hover { background: var(--accent-weak); color: var(--accent-ink); }
.composer-btn svg, .chat-send-btn svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.chat-send-btn {
  flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(232, 118, 63, .7);
  transition: transform .12s ease, filter .12s ease;
}
.chat-send-btn:hover { filter: brightness(.95); }
.chat-send-btn:active { transform: scale(.94); }
.chat-company {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 12.5px; color: var(--subtle); cursor: pointer; user-select: none; padding-left: 6px;
}
.chat-company input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chat-switch {
  position: relative; width: 28px; height: 16px; border-radius: var(--r-pill);
  background: var(--field-border); transition: background .15s ease;
}
.chat-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s ease;
}
.chat-company input:checked + .chat-switch { background: var(--accent); }
.chat-company input:checked + .chat-switch::after { transform: translateX(12px); }
.chat-company input:focus-visible + .chat-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-company:has(input:checked) { color: var(--accent-ink); }
.upload-strip {
  margin-bottom: 8px; padding: 7px 12px; border-radius: var(--r-md);
  background: var(--accent-weak); font-size: 13px; color: var(--ink);
}

/* Poll composer (modal) */
.poll-opt-row { display: flex; gap: 8px; margin-bottom: 6px; }
.poll-opt-row input { flex: 1; }
.poll-opt-del { flex: 0 0 auto; width: 34px; padding: 0; }
.poll-flags { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink); }
.poll-flags label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.poll-flags input { width: auto; margin: 0; accent-color: var(--accent); }

/* Fullsize photo */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(46, 58, 92, .72); cursor: zoom-out; padding: 40px;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: var(--sh-2); }

@media (max-width: 900px) {
  .row { max-width: 92%; }
}

/* ── FAQ / О платформе (manager help centre) ─────────────────────────── */
.faq-item { margin-bottom: 10px; padding: 0; }
.faq-item > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; font-weight: 700; color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "⌄"; margin-left: auto; color: var(--subtle); font-size: 18px;
  transition: transform .15s ease;
}
.faq-item[open] > summary::after { transform: rotate(180deg); }
.faq-title { font-size: 15px; }
.faq-badge {
  font-size: 10px; font-weight: 700; 
  letter-spacing: 0; padding: 2px 7px; border-radius: 999px;
}
.faq-badge.new { color: #fff; background: var(--accent); }
.faq-badge.upd { color: var(--accent); background: var(--accent-weak); }
.faq-body { padding: 0 16px 16px; color: var(--ink); line-height: 1.55; }
.faq-body ul { margin: 8px 0; padding-left: 20px; }
.faq-body li { margin: 4px 0; }
.faq-body p { margin: 8px 0; }
/* Two-column reference tables inside a FAQ topic (roles, automation). */
.faq-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.faq-table td { padding: 6px 10px 6px 0; vertical-align: top; border-bottom: 1px solid var(--divider); }
.faq-table td:first-child { width: 38%; white-space: normal; }
.faq-actions { margin-top: 14px; }


/* ── Reviews (cards with photos + TNA reply) ─────────────────────────── */
.review-card { margin-bottom: 12px; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.review-head .review-stars { color: var(--accent); margin-left: auto; }
.review-head .row-actions { margin-left: 8px; }
.review-text { margin: 0 0 10px; color: var(--ink); white-space: pre-wrap; }
.review-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.review-photo { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; cursor: pointer; }
.review-reply { display: flex; gap: 8px; align-items: flex-start; }
.review-reply-text { flex: 1; resize: vertical; }

/* ── «Куда хотят»: flag + the people modal ───────────────────────────── */
.country-cell { display: inline-flex; align-items: center; gap: 9px; }
.country-cell .flag { font-size: 18px; line-height: 1; width: 22px; text-align: center; }

/* Wider modal for list-and-act content (people + a broadcast form). */
.modal.wide { width: 720px; }

.wl-sub { margin: 0; }
.wl-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--divider);
}
.wl-list { max-height: 46vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.wl-row {
  display: grid; grid-template-columns: 24px minmax(90px, 1.2fr) minmax(120px, 1fr) auto auto;
  align-items: center; gap: 10px;
  padding: 9px 6px; border-bottom: 1px solid var(--divider);
}
.wl-row:last-child { border-bottom: 0; }
.wl-row:hover { background: var(--elevated); border-radius: var(--r-sm); }
.wl-pick-wrap { margin: 0; }
.wl-name { font-weight: 600; color: var(--ink); }
.wl-phone { color: var(--subtle); font-size: 14px; white-space: nowrap; }
.wl-phone a { color: var(--subtle); }
.wl-phone a:hover { color: var(--accent); }
.wl-tags .badge { font-size: 10.5px; }
.wl-actions { display: flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }

.wl-blast {
  border-top: 1px solid var(--stroke); padding-top: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.wl-blast h4 {
  margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0;
   color: var(--subtle);
}
.wl-blast .btn-primary { margin-top: 0; }
#wl-result:empty { display: none; }

@media (max-width: 640px) {
  .wl-row { grid-template-columns: 24px 1fr; row-gap: 4px; }
  .wl-row .wl-phone, .wl-row .wl-tags { grid-column: 2; }
  .wl-actions { grid-column: 2; justify-content: flex-start; }
}

/* ── Danger: deleting a customer (owner-only) ────────────────────────── */
.danger-zone {
  margin-top: 26px; padding-top: 16px;
  border-top: 1px dashed var(--red); 
}
.danger-zone h3 { color: var(--red); margin-bottom: 4px; }
.danger-zone .muted { margin-bottom: 10px; }

.btn-danger {
  background: var(--red); color: #fff; border: 0;
  padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn-danger:hover { filter: brightness(1.08); }
.btn-danger:disabled { opacity: 0.45; cursor: default; filter: none; }

.alert-danger {
  background: var(--red-weak); border: 1px solid var(--red);
  border-radius: var(--r-lg); padding: 16px 18px; color: var(--ink);
}
.alert-danger .ad-title { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.alert-danger p { margin: 8px 0; line-height: 1.5; }
.alert-danger ul { margin: 6px 0 8px; padding-left: 20px; }
.alert-danger li { margin: 3px 0; }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.roster-hint { margin-top: 8px; }

/* ── Analytics ─────────────────────────────────────────────────────── */
/* Tabs and filters share one row: tabs are underlined text on a hairline
   (sections, not actions), filters sit on the right as a segmented control
   and a select. The old row of identical bordered buttons read as a 2000s
   toolbar and mixed «what to look at» with «for which period». */
.an-bar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--stroke); margin-bottom: 20px;
}
.an-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.an-tabs::-webkit-scrollbar { display: none; }
.an-tab {
  background: none; border: none; cursor: pointer; white-space: nowrap;
  padding: 10px 12px 12px; margin-bottom: -1px;
  font-size: 14px; font-weight: 500; color: var(--subtle);
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}
.an-tab:hover { color: var(--ink); }
.an-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.an-filters { display: flex; gap: 8px; align-items: center; padding-bottom: 8px; flex-shrink: 0; }
.an-filters select { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.an-seg { display: inline-flex; gap: 2px; background: var(--elevated); padding: 3px; border-radius: var(--r-pill); }
.an-seg button {
  background: none; border: none; cursor: pointer; white-space: nowrap;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.an-seg button:hover { color: var(--ink); }
.an-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* KPI strip: one surface split by hairlines instead of six boxes. */
.an-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg);
  margin-bottom: 18px; overflow: hidden;
}
.an-kpis .card {
  background: none; border: none; border-radius: 0; padding: 16px 20px;
  box-shadow: -1px 0 0 var(--divider);
}
.an-kpis .card .value { font-size: 26px; line-height: 1.1; }
.an-kpis .card .label { font-size: 12.5px; }

.an-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.an-panel-head h3 { margin: 0; }
.an-col-hint { font-size: 12px; color: var(--subtle); }
.an-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.an-legend span { display: inline-flex; align-items: center; gap: 6px; }
.an-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.an-dot-users { background: var(--accent); }
.an-dot-sessions { background: color-mix(in srgb, var(--ink) 24%, transparent); }
/* Fixed height + maintainAspectRatio:false: the canvas never re-flows the page. */
.an-chart-box { position: relative; height: 260px; }

.an-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.an-split > .panel { margin-bottom: 18px; }
.an-bars { display: flex; flex-direction: column; gap: 12px; }
.an-bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 5px; }
.an-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-bar-val b { font-weight: 600; }
.an-bar-val span { color: var(--subtle); font-size: 12.5px; }
.an-bar-track { height: 6px; background: var(--paper-2); border-radius: var(--r-pill); overflow: hidden; }
.an-bar-fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); opacity: .85; }

/* Поясняющая строка. Отдельным классом, а не .hint: тот в этом проекте —
   круглый значок «?» 15×15, и абзац в нём сплющивался в вертикальную колонку
   поверх панели. */
.an-note {
  color: var(--subtle); font-size: 12.5px; line-height: 1.45;
  max-width: 60ch; margin: 0;
}
.view-head .an-note { text-align: right; max-width: 46ch; }
.an-note code {
  background: var(--elevated); padding: 1px 6px; border-radius: 5px;
  font-size: 12px;
}
.an-pane .panel > .an-note { margin-top: 12px; }

/* Ступеньки воронки. Ширина полосы — доля от ПЕРВОЙ ступени, поэтому форма
   лестницы читается с одного взгляда, а проценты рядом отвечают на два разных
   вопроса: «где рвётся» (от предыдущей) и «сколько доходит» (от начала). */
.fn-step { margin-bottom: 18px; }
.fn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.fn-head span { font-size: 12.5px; color: var(--subtle); }
.fn-bar { height: 26px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.fn-fill { height: 100%; background: var(--accent); border-radius: 8px; transition: width 0.3s ease; }
.fn-drop { font-size: 12px; color: var(--subtle); margin-top: 5px; display: flex; align-items: center; gap: 8px; }

/* Лента событий сессии: моноширинный отступ времени держит колонку ровной,
   чтобы шаги читались как список, а не как каша. */
.tl { max-height: 60vh; overflow-y: auto; }
.tl-row { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; }
.tl-row:last-child { border-bottom: none; }
.tl-time { font-variant-numeric: tabular-nums; color: var(--subtle); min-width: 56px; font-size: 12px; }
.tl-extra { color: var(--subtle); }

/* ── Заявки: список + карточка ───────────────────────────────────────── */
/* Раздел заявок раньше был одной широкой таблицей, где в колонку «Тур» падал
   весь note с паспортами попутчиков — строка вырастала на пол-экрана. Здесь
   всё держится на правиле «в списке одна строка одной высоты, подробности в
   карточке». */

/* Переключатель вида — сегментированная кнопка в тулбаре. */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--elevated); border-radius: var(--r-md); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--ink-2);
  padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 8px;
}
.seg button:hover { color: var(--ink); }
.seg button .ic { width: 15px; height: 15px; }
.seg button.active, .seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 20, 36, .14); }

/* The white pill is one sliding piece (the same runner as catalog tabs).
   The option itself stays clear, so the pill can glide under the label. */
:is(.seg, .an-seg, .ly-seg, .dm-seg, .chat-tabs, .bk-tabs-row, .rl-switch, .cu-segctl) {
  position: relative;
}
:is(.seg, .an-seg, .ly-seg, .dm-seg, .chat-tabs, .bk-tabs-row, .rl-switch, .cu-segctl) > :is(button, a, label) {
  position: relative; z-index: 1;
}
:is(.seg, .an-seg, .ly-seg, .dm-seg, .chat-tabs, .bk-tabs-row, .rl-switch, .cu-segctl):has(> .tab-runner) > :is(button, a, label) {
  transition: color .15s ease;
}
:is(.seg, .an-seg, .ly-seg, .dm-seg, .chat-tabs, .bk-tabs-row, .rl-switch):has(> .tab-runner) > button.on,
:is(.seg, .an-seg, .ly-seg, .dm-seg, .chat-tabs, .bk-tabs-row, .rl-switch):has(> .tab-runner) > button.active,
.cu-segctl:has(> .tab-runner) > label:has(input:checked) {
  background: none; box-shadow: none;
}

/* ── Карточка заявки ─────────────────────────────────────────────────── */
.bk-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bk-card-headline { min-width: 0; }
.bk-card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.2px; }
.bk-card-sub { font-size: 12.5px; color: var(--subtle); margin-top: 3px; }
.bk-contacts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.bk-contacts .phone { font-weight: 600; }
.bk-people { font-size: 12.5px; color: var(--subtle); }

.bk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--stroke); margin-top: 14px; flex-wrap: wrap; }
.bk-tab {
  background: none; border: none; cursor: pointer; color: var(--subtle);
  font-size: 13px; font-weight: 700; padding: 9px 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.bk-tab:hover { color: var(--ink); }
.bk-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.bk-tab-body { padding-top: 16px; }
.bk-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0; 
  color: var(--subtle); margin: 18px 0 8px;
}

/* Путь заявки: пройденные ступени залиты, текущая обведена, будущие бледные.
   Клик по ступени — это и есть смена статуса, отдельного селекта больше нет. */
.bk-pipeline { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-pipeline.off { opacity: .5; }
.bk-step {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-pill);
  padding: 6px 13px 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--subtle);
  transition: border-color .12s ease, color .12s ease;
}
.bk-step:hover { border-color: var(--accent); color: var(--ink); }
.bk-step-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stroke); }
.bk-step.done { color: var(--ink); }
.bk-step.done .bk-step-dot { background: var(--green); }
.bk-step.now { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.bk-step.now .bk-step-dot { background: var(--accent); }
.bk-pipeline-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

.bk-summary {
  margin-top: 16px; font-size: 14px; font-weight: 600;
  background: var(--elevated); border-radius: var(--r-md); padding: 11px 14px;
}
.bk-quote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 12px;
  color: var(--ink); white-space: pre-wrap;
}

/* Попутчик — свёрнутая карточка: паспорта не должны лезть в глаза, пока их не
   спросили, но и уходить в отдельное окно им незачем. */
.bk-companion {
  border: 1px solid var(--stroke); border-radius: var(--r-md);
  padding: 10px 14px; margin-bottom: 8px; background: var(--surface);
}
.bk-companion > summary { cursor: pointer; font-weight: 700; list-style: none; }
.bk-companion > summary::-webkit-details-marker { display: none; }
.bk-companion > summary::before {
  content: "▸"; display: inline-block; margin-right: 8px; color: var(--subtle);
  transition: transform .12s ease;
}
.bk-companion[open] > summary::before { transform: rotate(90deg); }
.bk-facts {
  display: grid; grid-template-columns: minmax(120px, auto) 1fr;
  gap: 4px 14px; margin: 10px 0 2px; font-size: 13px;
}
.bk-facts dt { color: var(--subtle); }
.bk-facts dd { margin: 0; }

/* ── Деньги ──────────────────────────────────────────────────────────── */
.bk-money-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bk-money-sum { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.bk-money-sum span { color: var(--subtle); font-size: 15px; font-weight: 600; }
.bk-money-left { font-size: 12.5px; color: var(--subtle); }
.bk-bar { height: 8px; border-radius: var(--r-pill); background: var(--elevated); margin: 12px 0 16px; overflow: hidden; }
.bk-bar-fill { height: 100%; background: var(--green); border-radius: var(--r-pill); transition: width .2s ease; }
.bk-money-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.bk-bonus { margin-top: 18px; }
#bk-bonus-amount { width: 140px; }
#cust-ref-code { width: 220px; }
.bk-money-note { margin-top: 14px; line-height: 1.5; }

/* ── Заметки ─────────────────────────────────────────────────────────── */
.bk-note-add { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.bk-note-add textarea { flex: 1; resize: vertical; }
.bk-note {
  border-left: 3px solid var(--stroke); padding: 2px 0 2px 12px; margin-bottom: 12px;
}
.bk-note-head { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--subtle); }
.bk-note-del {
  background: none; border: none; cursor: pointer; color: var(--subtle); padding: 0 2px;
}
.bk-note-del:hover { color: var(--red); }
.bk-note-text { white-space: pre-wrap; margin-top: 2px; }

.bk-client-cards { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 12px; }
.bk-client-cards .card { padding: 12px 14px; }
.bk-client-cards .card .value { font-size: 22px; }

/* Чат внутри карточки: своя шапка тут лишняя — имя и статус уже сверху. */
.bk-chat { display: flex; flex-direction: column; }
.bk-chat .chat-head { display: none; }
.bk-chat .msg-list { max-height: 46vh; }
.bk-chat-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.35; }

/* ── Inline add rows («Команда») ───────────────────────────────────── */
.roster-add { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.roster-add input, .roster-add select { flex: 1; min-width: 140px; }

/* ── Аудит (0095) ──────────────────────────────────────────────────── */
.au-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 18px; }
.au-filters select { min-width: 200px; }
.au-filters input[type="search"] { flex: 1 1 220px; max-width: 360px; }
.au-day + .au-day { margin-top: 20px; }
.au-day-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; text-transform: none; }
.au-day-title::first-letter { text-transform: uppercase; }
.au-panel { padding: 4px 18px; }
.au-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.au-row + .au-row { border-top: 1px solid var(--divider); }
.au-time { font-size: 12.5px; color: var(--subtle); font-variant-numeric: tabular-nums; padding-top: 2px; }
.au-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.au-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }
.au-who { font: inherit; font-weight: 600; color: var(--ink); background: none; border: none; padding: 0; cursor: pointer; }
button.au-who:hover { color: var(--accent-ink); }
.au-op { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.au-add { background: var(--green-weak); color: var(--green); }
.au-upd { background: var(--blue-weak); color: var(--blue); }
.au-del { background: var(--red-weak); color: var(--red); }
.au-act { background: var(--elevated); color: var(--ink-2); }
.au-what { color: var(--ink); }
.au-ctx { font-size: 12.5px; color: var(--subtle); }
.au-changes { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13px; }
.au-changes > div { display: contents; }
.au-changes dt { color: var(--subtle); }
.au-changes dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.au-changes s { color: var(--subtle); text-decoration-color: color-mix(in srgb, var(--subtle) 60%, transparent); }
.au-arrow { color: var(--subtle); margin: 0 6px; }
.au-more { margin-top: 14px; }
@media (max-width: 640px) {
  .au-row { grid-template-columns: 1fr; gap: 4px; }
  .au-changes { grid-template-columns: 1fr; }
  .au-changes dt { margin-top: 4px; }
}
