/* Контроль звонков: единая дизайн-система.
   Токены → база → раскладка → компоненты → экраны. Тёмная тема через prefers-color-scheme. */

/* ---------- Токены ---------- */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Шкала: 12 / 13 / 15 / 17 / 21 / 28 / 40 */
  --fs-12: 12px; --fs-13: 13px; --fs-15: 15px; --fs-17: 17px; --fs-21: 21px; --fs-28: 28px; --fs-40: 40px;

  /* Отступы по сетке 8px (4 только для мелочей) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --field: #f5f5f7;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #737378;
  --sep: rgba(0, 0, 0, 0.08);
  --sep-2: rgba(0, 0, 0, 0.14);

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-tint: rgba(0, 113, 227, 0.09);
  --accent-ring: rgba(0, 113, 227, 0.2);

  --green: #34c759; --green-text: #1d7d36; --green-tint: rgba(52, 199, 89, 0.14);
  --orange: #ff9f0a; --orange-text: #b25000; --orange-tint: rgba(255, 159, 10, 0.16);
  --red: #ff3b30; --red-text: #d70015; --red-tint: rgba(255, 59, 48, 0.11);
  --gray-tint: rgba(118, 118, 128, 0.12);

  --nav-bg: rgba(251, 251, 253, 0.78);
  --menu-bg: rgba(255, 255, 255, 0.92);

  --r-card: 18px;
  --r-tile: 14px;
  --r-field: 10px;
  --r-pill: 999px;

  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-raise: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --sh-pop: 0 2px 6px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.12);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 200ms;
  --content: 1120px;
  --nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --field: #2c2c2e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.14);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8d8d93;
    --sep: rgba(255, 255, 255, 0.1);
    --sep-2: rgba(255, 255, 255, 0.18);

    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-text: #4aa3ff;
    --accent-tint: rgba(10, 132, 255, 0.16);
    --accent-ring: rgba(10, 132, 255, 0.32);

    --green: #30d158; --green-text: #4ade80; --green-tint: rgba(48, 209, 88, 0.18);
    --orange: #ff9f0a; --orange-text: #ffb340; --orange-tint: rgba(255, 159, 10, 0.18);
    --red: #ff453a; --red-text: #ff6961; --red-tint: rgba(255, 69, 58, 0.18);
    --gray-tint: rgba(118, 118, 128, 0.24);

    --nav-bg: rgba(22, 22, 23, 0.72);
    --menu-bg: rgba(44, 44, 46, 0.92);

    --sh-card: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --sh-raise: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.4);
    --sh-pop: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-15);
  line-height: 1.47;
  letter-spacing: -0.009em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }
h1 { font-size: var(--fs-28); line-height: 1.14; letter-spacing: -0.021em; }
h2 { font-size: var(--fs-17); line-height: 1.3; letter-spacing: -0.016em; }
h3 { font-size: var(--fs-15); line-height: 1.35; }
p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; background: var(--fill-2); padding: 1px 6px; border-radius: 6px; }
ul { margin: 0; padding-left: 20px; }
hr { border: 0; border-top: 1px solid var(--sep); margin: var(--s-5) 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.show-sm { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-13); line-height: 1.4; }
.caption { font-size: var(--fs-12); line-height: 1.35; color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.strong { font-weight: 600; }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--sep);
}
.nav-inner {
  max-width: calc(var(--content) + 2 * var(--s-6));
  margin: 0 auto; padding: 0 var(--s-6);
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-6);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: var(--fs-15); letter-spacing: -0.016em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  color: var(--text-2); font-size: var(--fs-13); font-weight: 500; white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--fill-2); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--text); background: var(--fill); }
.nav-right { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.avatar-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 4px;
  border-radius: var(--r-pill); color: var(--text-2); font-size: var(--fs-13); font-weight: 500;
  transition: background-color var(--dur) var(--ease);
}
.avatar-btn:hover, .menu[open] > .avatar-btn { background: var(--fill-2); }
.avatar-btn.is-active { background: var(--fill); color: var(--text); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 6px;
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--sep); border-radius: var(--r-tile); box-shadow: var(--sh-pop);
  animation: pop 160ms var(--ease);
}
.menu-head { padding: 10px 10px 12px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--sep); margin-bottom: 6px; }
.menu-head .who { font-weight: 600; font-size: var(--fs-15); line-height: 1.2; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 36px; padding: 0 10px; border-radius: 8px;
  color: var(--text); font: inherit; font-size: var(--fs-13); font-weight: 400; text-align: left;
  background: none; border: 0; cursor: pointer;
}
.menu-item .icon { color: var(--text-2); }
.menu-item:hover { background: var(--fill-2); text-decoration: none; }
.menu-item[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); }
.menu-item[aria-current="page"] .icon { color: var(--accent-text); }
.menu-sep { height: 1px; background: var(--sep); margin: 6px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

.nav-burger { display: none; }

/* ---------- Раскладка ---------- */
main { max-width: calc(var(--content) + 2 * var(--s-6)); margin: 0 auto; padding: var(--s-8) var(--s-6) var(--s-12); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-6); flex-wrap: wrap; margin-bottom: var(--s-6); }
.page-head .lead { margin: 6px 0 0; color: var(--text-2); font-size: var(--fs-15); }
.page-head .actions { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-13); font-weight: 500; margin-bottom: var(--s-2); }
.back .icon { width: 16px; height: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.grid-2 { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; align-items: start; }
.grid-3-1 { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; }
.grid-1-2 { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
.grid-auto { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.section + .section { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.row-center { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.spacer { flex: 1; }
.inline { display: inline; margin: 0; }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  padding: var(--s-6);
  min-width: 0;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head .sub { margin-top: 2px; }
.card-flush > .card-head { padding: var(--s-5) var(--s-6) 0; margin-bottom: var(--s-3); }
.card-foot { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--sep); display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.card-flush > .card-foot { margin: 0; padding: var(--s-4) var(--s-6); }
.h-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); flex: none; }
.h-ico .icon { width: 16px; height: 16px; }

/* ---------- Метрики ---------- */
.kpis { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s-4); }
.kpi { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: var(--s-5) var(--s-6); min-width: 0; display: flex; flex-direction: column; }
.kpi-label { font-size: var(--fs-13); color: var(--text-2); font-weight: 500; display: flex; align-items: flex-start; gap: 6px; flex: 1; }
.kpi-label .icon { margin-top: 1px; }
.kpi-value { font-size: var(--fs-28); font-weight: 600; letter-spacing: -0.021em; line-height: 1.15; margin-top: var(--s-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value .unit { font-size: var(--fs-15); font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.kpi-value.is-text { font-size: var(--fs-21); letter-spacing: -0.016em; }
.kpi-note { font-size: var(--fs-13); color: var(--text-2); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.delta { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-13); font-weight: 600; }
.delta.up { color: var(--green-text); }
.delta.down { color: var(--red-text); }
.delta.flat { color: var(--text-3); font-weight: 500; }

/* ---------- Кнопки ---------- */
.btn {
  --h: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h); padding: 0 16px;
  font: inherit; font-size: var(--fs-15); font-weight: 500; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  color: #fff; background: var(--accent);
  border: 0; border-radius: var(--r-pill); cursor: pointer; text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { opacity: 0.85; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn .icon { width: 16px; height: 16px; }
.btn-secondary { color: var(--accent-text); background: var(--accent-tint); }
.btn-secondary:hover { background: var(--accent-ring); }
.btn-gray { color: var(--text); background: var(--fill); }
.btn-gray:hover { background: var(--sep-2); }
.btn-plain { color: var(--accent-text); background: transparent; padding: 0 10px; }
.btn-plain:hover { background: var(--fill-2); }
.btn-danger { color: var(--red-text); background: var(--red-tint); }
.btn-danger:hover { background: var(--red-tint); filter: saturate(1.4); }
.btn-sm { --h: 30px; padding: 0 12px; font-size: var(--fs-13); }
.btn-lg { --h: 44px; padding: 0 22px; font-size: var(--fs-17); }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-tint); color: var(--red-text); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: 0.3; cursor: default; background: transparent; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: var(--s-4); }
.field-row { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.label, .field > label { font-size: var(--fs-13); font-weight: 500; color: var(--text-2); }
.hint { font-size: var(--fs-12); color: var(--text-3); line-height: 1.4; }
.input, select, textarea,
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search] {
  width: 100%; height: 40px; padding: 0 12px;
  font: inherit; font-size: var(--fs-15); color: var(--text);
  background: var(--field); border: 1px solid transparent; border-radius: var(--r-field);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
textarea { height: auto; min-height: 168px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.input:hover, select:hover, textarea:hover, input:hover:not([type=checkbox]):not([type=radio]) { border-color: var(--sep); }
.input:focus, select:focus, textarea:focus, input:focus:not([type=checkbox]):not([type=radio]) {
  background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring);
}
select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type=number] { -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=date] { font-variant-numeric: tabular-nums; min-width: 0; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.45; cursor: pointer; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
@media (prefers-color-scheme: dark) { input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); } }
.input-sm, .field-sm select, .field-sm input { height: 32px; font-size: var(--fs-13); }
.input-num { width: 72px; text-align: center; }

/* Переключатель (вместо флажка) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-15); color: var(--text); }
.switch input { -webkit-appearance: none; appearance: none; margin: 0; flex: none;
  width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--fill); cursor: pointer; position: relative;
  transition: background-color var(--dur) var(--ease); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform var(--dur) var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }

/* Переключатели-варианты (radio) списком */
.choice-list { display: flex; flex-direction: column; border-radius: var(--r-tile); background: var(--field); overflow: hidden; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer; font-size: var(--fs-15); }
.choice + .choice { border-top: 1px solid var(--sep); }
.choice:hover { background: var(--fill-2); }
.choice .choice-sub { display: block; font-size: var(--fs-13); color: var(--text-2); }
.choice input { -webkit-appearance: none; appearance: none; margin: 0; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--sep-2); background: var(--surface); display: grid; place-items: center; cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.choice input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform var(--dur) var(--ease); }
.choice input:checked { background: var(--accent); border-color: var(--accent); }
.choice input:checked::after { transform: scale(1); }
.choice input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }

/* Сегментированный переключатель */
.segmented { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--fill); gap: 0; position: relative; max-width: 100%; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label, .segmented a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 64px; height: 28px; padding: 0 12px; border-radius: 8px;
  font-size: var(--fs-13); font-weight: 500; color: var(--text); white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.segmented a:hover { text-decoration: none; background: var(--fill-2); }
.segmented input:checked + label, .segmented a[aria-current="true"] {
  background: var(--surface); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
  .segmented input:checked + label, .segmented a[aria-current="true"] { background: #636366; }
}
.segmented input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-ring); }
.segmented.full { display: flex; }
.segmented.full label { flex: 1; min-width: 0; }

/* Выбор файла */
.file-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: var(--s-8) var(--s-5); border-radius: var(--r-tile);
  border: 1.5px dashed var(--sep-2); background: var(--surface-2); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.file-drop:hover, .file-drop.is-over { border-color: var(--accent); background: var(--accent-tint); }
.file-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.file-drop .file-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); margin-bottom: 4px; }
.file-drop .file-ico .icon { width: 22px; height: 22px; }
.file-drop .file-title { font-weight: 600; font-size: var(--fs-15); }
.file-drop .file-name { font-size: var(--fs-13); color: var(--text-2); word-break: break-all; }
.file-drop.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-tint); }
.file-drop.has-file .file-name { color: var(--accent-text); font-weight: 500; }
.file-inline { position: relative; display: inline-flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.file-inline input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-inline input[type=file]:focus-visible + .btn { box-shadow: 0 0 0 4px var(--accent-ring); }
.file-inline .file-name { font-size: var(--fs-13); color: var(--text-2); }
.file-inline.has-file .file-name { color: var(--text); font-weight: 500; }

/* Формы в карточках одной высоты: кнопка прижата к низу */
.form-card { display: flex; flex-direction: column; }
.form-fill { display: flex; flex-direction: column; flex: 1; }
.push { flex: 1; min-height: var(--s-6); }

/* Панель фильтров */
.filter-grid { display: grid; gap: var(--s-3) var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr) minmax(0, 1.6fr) auto; align-items: end; }
.filter-actions { display: flex; gap: 4px; align-items: center; }
.range { display: flex; align-items: center; gap: 6px; }
.range input { min-width: 0; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { margin: 0 calc(-1 * var(--s-6)); }
.card-flush > .table-wrap { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
th {
  text-align: left; font-size: var(--fs-12); font-weight: 500; color: var(--text-2); letter-spacing: 0;
  padding: 0 var(--s-3) 10px; white-space: nowrap; border-bottom: 1px solid var(--sep);
}
td { padding: 12px var(--s-3); border-bottom: 1px solid var(--sep); vertical-align: middle; }
tr:last-child > td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: var(--s-6); }
th:last-child, td:last-child { padding-right: var(--s-6); }
th.num, td.num, th.right, td.right { text-align: right; }
tbody tr { transition: background-color 150ms var(--ease); }
.table-hover tbody tr:hover { background: var(--fill-2); }
.row-link { position: relative; }
.row-link a.stretched::after { content: ""; position: absolute; inset: 0; }
.row-link a.stretched { color: var(--text); font-weight: 500; }
.row-link a.stretched:hover { text-decoration: none; }
.table-hover tbody tr.row-link { cursor: pointer; }
.table-empty td { padding: var(--s-8) var(--s-6); }

/* ---------- Плашки ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: var(--fs-12); font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--text-2); background: var(--gray-tint);
}
.pill .icon { width: 12px; height: 12px; stroke-width: 2; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green, .risk-low, .v-yes, .st-done { color: var(--green-text); background: var(--green-tint); }
.pill-orange, .risk-medium, .v-partial { color: var(--orange-text); background: var(--orange-tint); }
.pill-red, .risk-high, .v-no, .st-failed { color: var(--red-text); background: var(--red-tint); }
.pill-blue, .st-queued, .st-transcribing, .st-scoring { color: var(--accent-text); background: var(--accent-tint); }
.pill-gray, .v-na { color: var(--text-2); background: var(--gray-tint); }
.pill-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--sep-2); color: var(--text-2); font-weight: 500; }
.st-queued.dot::before, .st-transcribing.dot::before, .st-scoring.dot::before { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Демо-режим */
.demo-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px;
  border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 600;
  color: #8944ab; background: rgba(175, 82, 222, 0.12);
}
.demo-badge .icon { width: 13px; height: 13px; stroke-width: 1.8; }
@media (prefers-color-scheme: dark) { .demo-badge { color: #da8fff; background: rgba(191, 90, 242, 0.2); } }

/* Аватар */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(180deg, #a1a1a6, #8e8e93);
}
.avatar-lg { width: 36px; height: 36px; font-size: 13px; }
.avatar.c1 { background: linear-gradient(180deg, #5ac8fa, #0a84ff); }
.avatar.c2 { background: linear-gradient(180deg, #ffb340, #ff9500); }
.avatar.c3 { background: linear-gradient(180deg, #7ad992, #30b350); }
.avatar.c4 { background: linear-gradient(180deg, #c18aff, #9a5cf0); }
.avatar.c5 { background: linear-gradient(180deg, #ff8a8a, #ff4f5e); }
.avatar.c0 { background: linear-gradient(180deg, #6ad4dd, #2fb0c0); }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Сообщения ---------- */
.flash, .notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-tile); margin-bottom: var(--s-4);
  font-size: var(--fs-15); background: var(--surface); box-shadow: var(--sh-card);
}
.flash .icon, .notice > .icon { margin-top: 1px; }
.flash.ok .icon, .notice.ok > .icon { color: var(--green); }
.flash.error, .notice.error { background: var(--red-tint); box-shadow: none; }
.flash.error .icon, .notice.error > .icon { color: var(--red-text); }
.notice.warn { background: var(--orange-tint); box-shadow: none; }
.notice.warn > .icon { color: var(--orange-text); }
.notice.info { background: var(--accent-tint); box-shadow: none; }
.notice.info > .icon { color: var(--accent-text); }
.notice .notice-body { min-width: 0; }
.notice b { font-weight: 600; }
.error-text { color: var(--red-text); font-size: var(--fs-13); display: flex; gap: 6px; align-items: flex-start; }

/* Пустое состояние */
.empty { text-align: center; padding: var(--s-8) var(--s-5); color: var(--text-2); }
.empty-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--fill-2); color: var(--text-3); margin-bottom: var(--s-3); }
.empty-ico .icon { width: 24px; height: 24px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { font-size: var(--fs-13); max-width: 360px; margin: 0 auto; }
.empty .btn { margin-top: var(--s-4); }

/* Список «ключ — значение» */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--sep); font-size: var(--fs-15); }
.kv dt { color: var(--text-2); padding-right: var(--s-4); }
.kv dd { text-align: right; font-weight: 500; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* Обычный список строк */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--sep); }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }

/* ---------- Графики ---------- */
.chart { position: relative; height: 240px; margin: var(--s-2) 0 0 34px; }
.chart svg.plot { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--sep); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .grid-line.base { stroke: var(--sep-2); }
.chart .area { fill: url(#area-grad); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .y-label { position: absolute; left: -34px; width: 26px; text-align: right; transform: translateY(-50%); font-size: var(--fs-12); color: var(--text-3); }
.chart .x-label { position: absolute; top: calc(100% + 10px); transform: translateX(-50%); font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; }
.chart .x-label.first { transform: none; }
.chart .x-label.last { transform: translateX(-100%); }
.chart .pt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2.5px var(--accent); }
.chart .pt-val { position: absolute; transform: translate(-50%, -100%); margin-top: -10px; font-size: var(--fs-12); font-weight: 600; color: var(--text); white-space: nowrap; }
.chart .pt.empty { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--sep-2); box-shadow: none; }
.chart-foot { margin-top: 36px; display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-12); color: var(--text-3); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 0; }
.legend-dot.gap { background: var(--sep-2); }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: 6px; font-size: var(--fs-13); }
.bar-top .t { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-top .v { font-weight: 600; font-variant-numeric: tabular-nums; }
svg.bar { display: block; width: 100%; height: 8px; overflow: visible; }
svg.bar .track { fill: var(--fill-2); }
svg.bar.good .val { fill: var(--green); }
svg.bar.mid .val { fill: var(--orange); }
svg.bar.bad .val { fill: var(--red); }
svg.bar.accent .val { fill: var(--accent); }
.bar-legend { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-5); font-size: var(--fs-12); color: var(--text-3); }
.bar-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.meter { display: inline-flex; align-items: center; gap: 10px; }
.meter svg { width: 64px; height: 6px; }
.meter .track { fill: var(--fill); }
.meter .val { fill: var(--accent); }

/* Кольцо балла */
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--fill-2); stroke-width: 10; }
.ring .val { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring.good .val { stroke: var(--green); }
.ring.mid .val { stroke: var(--orange); }
.ring.bad .val { stroke: var(--red); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-num { font-size: var(--fs-40); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ring-of { display: block; font-size: var(--fs-12); color: var(--text-3); font-weight: 500; margin-top: 4px; letter-spacing: 0; }

.score-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 600; font-size: var(--fs-15); font-variant-numeric: tabular-nums; }
.score-chip.good { color: var(--green-text); background: var(--green-tint); }
.score-chip.mid { color: var(--orange-text); background: var(--orange-tint); }
.score-chip.bad { color: var(--red-text); background: var(--red-tint); }

/* ---------- Экран: вход ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; padding: var(--s-6); max-width: none; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 22px; box-shadow: var(--sh-raise); padding: var(--s-10) var(--s-8) var(--s-8); }
.auth-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: var(--s-8); }
.auth-logo .brand-mark { width: 56px; height: 56px; margin-bottom: var(--s-4); }
.auth-logo h1 { font-size: var(--fs-28); }
.auth-logo p { color: var(--text-2); margin-top: 6px; font-size: var(--fs-15); }
.auth .btn { margin-top: var(--s-6); }
.auth-foot { text-align: center; margin-top: var(--s-6); font-size: var(--fs-12); color: var(--text-3); }

/* ---------- Экран: карточка звонка ---------- */
.verdict-hero { display: flex; gap: var(--s-6); align-items: center; }
.verdict-hero .body { flex: 1; min-width: 0; }
.verdict-hero .risk-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.verdict-hero .reason { color: var(--text-2); font-size: var(--fs-15); margin: 0; }
.callout { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border-radius: var(--r-tile); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--sep); }
@media (prefers-color-scheme: dark) { .callout { background: rgba(255, 255, 255, 0.04); } }
.callout + .callout { margin-top: var(--s-3); }
.callout-title { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.callout.accent { background: var(--accent-tint); box-shadow: none; }
.callout.accent .callout-title { color: var(--accent-text); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: var(--s-5); font-size: var(--fs-12); color: var(--text-3); }
.meta-line .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); opacity: 0.6; }

.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 var(--s-3); padding: var(--s-4) 0; border-top: 1px solid var(--sep); scroll-margin-top: 80px; }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.item:target { background: var(--accent-tint); border-radius: 12px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.v-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: -1px; }
.v-ico .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.v-ico.v-yes { color: #fff; background: var(--green); }
.v-ico.v-partial { color: #fff; background: var(--orange); }
.v-ico.v-no { color: #fff; background: var(--red); }
.v-ico.v-na { color: var(--text-3); background: var(--fill); }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-title { font-weight: 600; }
.item-weight { font-size: var(--fs-12); color: var(--text-3); }
.item-right { margin-left: auto; }
.quote {
  display: block; margin: var(--s-2) 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--fill-2); color: var(--text); font-size: var(--fs-15); line-height: 1.45;
  border-left: 3px solid var(--sep-2);
}
a.quote:hover { text-decoration: none; background: var(--accent-tint); border-left-color: var(--accent); }
.item-comment { margin-top: 6px; font-size: var(--fs-13); color: var(--text-2); }
.unverified { margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; color: var(--orange-text); font-size: var(--fs-13); font-weight: 500; }
.unverified .icon { width: 14px; height: 14px; }

.transcript { display: flex; flex-direction: column; gap: var(--s-2); }
.seg { display: flex; flex-direction: column; max-width: 78%; scroll-margin-top: 80px; }
.seg.manager { align-self: flex-end; align-items: flex-end; }
.seg.client, .seg.unknown { align-self: flex-start; align-items: flex-start; }
.seg .who { font-size: var(--fs-12); color: var(--text-3); margin: 0 12px 4px; display: flex; gap: 6px; align-items: center; }
.bubble { padding: 9px 14px; border-radius: 18px; font-size: var(--fs-15); line-height: 1.4; background: var(--fill-2); color: var(--text); }
.seg.manager .bubble { background: var(--accent-tint); border-bottom-right-radius: 6px; }
.seg.client .bubble, .seg.unknown .bubble { border-bottom-left-radius: 6px; }
.seg.evidence .bubble { box-shadow: inset 0 0 0 1.5px var(--accent); }
.seg:target .bubble { box-shadow: 0 0 0 4px var(--accent-ring), inset 0 0 0 1.5px var(--accent); }
.seg .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 500; color: var(--accent-text); background: var(--accent-tint); }
.tag:hover { text-decoration: none; background: var(--accent-ring); }
.tag .icon { width: 12px; height: 12px; }
audio { width: 100%; height: 40px; border-radius: var(--r-pill); margin-top: var(--s-4); }

/* ---------- Экран: чек-лист ---------- */
.ck-list { list-style: none; margin: 0; padding: 0; }
.ck-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--s-5) var(--s-6); border-top: 1px solid var(--sep); }
.ck-item:first-child { border-top: 0; }
.ck-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-2); font-size: var(--fs-13); font-weight: 600; margin-top: 6px; }
.ck-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-fields .title-input { font-weight: 600; font-size: var(--fs-17); height: 40px; }
.ck-fields .crit-input { font-size: var(--fs-13); height: 36px; color: var(--text-2); }
.ck-side { display: flex; align-items: center; gap: var(--s-5); padding-top: 4px; }
.ck-weight { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ck-weight .caption, .ck-crit .caption { font-size: 11px; color: var(--text-3); font-weight: 500; }
.ck-weight input { width: 56px; height: 32px; text-align: center; font-weight: 600; padding: 0 6px; }
.ck-crit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ck-tools { display: flex; gap: 2px; }
.save-bar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-4) var(--s-6); border-top: 1px solid var(--sep); background: var(--surface-2); }
@media (prefers-color-scheme: dark) { .save-bar { background: rgba(255, 255, 255, 0.03); } }

/* Код привязки */
.code { font-family: var(--mono); font-size: var(--fs-28); letter-spacing: 0.18em; font-weight: 600; padding: 10px 18px; border-radius: 12px; background: var(--fill-2); display: inline-block; }

/* Пагинация */
.pager { display: flex; gap: 4px; justify-content: center; padding: var(--s-4); }
.pager a, .pager span { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; font-size: var(--fs-13); font-weight: 500; padding: 0 8px; }
.pager a { color: var(--text); }
.pager a:hover { background: var(--fill-2); text-decoration: none; }
.pager span[aria-current] { background: var(--text); color: var(--surface); }

/* Отчёт */
.rank { display: flex; align-items: center; gap: var(--s-3); }
.rank .pos { width: 22px; font-size: var(--fs-13); color: var(--text-3); font-weight: 600; text-align: right; }
.report-text { white-space: pre-wrap; font-family: var(--font); font-size: var(--fs-13); line-height: 1.55; margin: var(--s-4) 0 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-tile); background: var(--fill-2); color: var(--text); }
.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--accent-text); font-size: var(--fs-15); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .chev { transition: transform var(--dur) var(--ease); }
.disclosure[open] > summary .chev { transform: rotate(90deg); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .nav-link .icon { display: none; }
  .nav-link { padding: 0 10px; }
}
@media (max-width: 1080px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3-1, .grid-1-2, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nav-links, .nav-right .menu-desktop, .nav-right .nav-upload-label { display: none; }
  .nav-burger { display: block; }
  .nav-inner { gap: var(--s-3); }
  .nav-burger > summary { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
  .nav-burger > summary:hover { background: var(--fill-2); }
  .nav-burger .menu-panel { position: fixed; left: 8px; right: 8px; top: calc(var(--nav-h) + 4px); width: auto; max-height: calc(100vh - var(--nav-h) - 16px); overflow-y: auto; }
  .nav-burger .menu-item { min-height: 44px; font-size: var(--fs-15); }
  .nav-upload { width: 36px; padding: 0; }
}
@media (max-width: 640px) {
  :root { --nav-h: 52px; }
  .nav-inner { padding: 0 var(--s-4); }
  main { padding: var(--s-6) var(--s-4) var(--s-10); }
  h1 { font-size: 26px; }
  .page-head { margin-bottom: var(--s-5); align-items: flex-start; }
  .page-head .actions { width: 100%; }
  .card { padding: var(--s-5); border-radius: 16px; }
  .card > .table-wrap { margin: 0 calc(-1 * var(--s-5)); }
  .card-flush { padding: 0; }
  .card-flush > .table-wrap { margin: 0; }
  .meter svg { display: none; }
  .card-flush > .card-head { padding: var(--s-4) var(--s-5) 0; }
  .card-flush > .card-foot { padding: var(--s-4) var(--s-5); }
  th:first-child, td:first-child { padding-left: var(--s-5); }
  th:last-child, td:last-child { padding-right: var(--s-5); }
  .kpis { gap: var(--s-3); }
  .kpi { padding: var(--s-4); border-radius: 16px; }
  .kpi-value { font-size: 24px; }
  .kpi-value.is-text { font-size: var(--fs-17); }
  .btn { --h: 40px; }
  .btn-sm { --h: 34px; }
  input[type=text], input[type=password], input[type=number], input[type=date], select, .input { height: 44px; font-size: 16px; }
  textarea { font-size: 16px; }
  .segmented label, .segmented a { height: 34px; min-width: 0; flex: 1; }
  .segmented { display: flex; width: 100%; }
  .verdict-hero { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .ring { width: 112px; height: 112px; }
  .ring-num { font-size: 34px; }
  .seg { max-width: 92%; }
  .ck-item { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) var(--s-5); }
  .ck-num { display: none; }
  .ck-side { justify-content: space-between; padding-top: 0; }
  .save-bar { padding: var(--s-4) var(--s-5); }
  .save-bar .btn { flex: 1; }
  .auth-card { padding: var(--s-8) var(--s-5) var(--s-6); box-shadow: var(--sh-card); }
  .chart { height: 200px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  td.right.nowrap { white-space: normal; }
  td.right.nowrap form { display: inline-block; margin: 2px 0; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid > .field:nth-child(4), .filter-grid > .field:nth-child(5), .filter-actions { grid-column: 1 / -1; }
  .filter-actions .btn { flex: 1; }
  .icon-btn { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
