/* NullRecovery — тёплый угольный интерфейс с янтарным акцентом. Только системные шрифты. */
:root {
  --bg: #141210;
  --bg-2: #191613;
  --surface: #201c18;
  --surface-2: #28231e;
  --surface-3: #312b25;
  --line: #3b342c;
  --line-soft: #2d2822;
  --text: #f1e9dc;
  --text-2: #d3c9b9;
  --muted: #a39887;
  --amber: #e3a857;
  --amber-2: #f2c27e;
  --amber-ink: #1d160c;
  --amber-soft: rgba(227, 168, 87, 0.13);
  --ok: #9cc59a;
  --ok-soft: rgba(156, 197, 154, 0.13);
  --danger: #ef9283;
  --danger-soft: rgba(239, 146, 131, 0.13);
  --danger-fill: #a64838;
  --danger-fill-2: #b9523f;
  --info: #a3c0d4;
  --info-soft: rgba(163, 192, 212, 0.13);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.7);
  --sidebar-w: 272px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(227, 168, 87, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(163, 192, 212, 0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
a { color: var(--amber-2); }
code, pre { font-family: var(--mono); font-size: 0.86em; }
strong { font-weight: 650; }
ul, ol { margin: 0; padding: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.wrap { overflow-wrap: anywhere; word-break: break-word; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--amber-ink);
  padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Загрузка ── */
.boot {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted);
}
.boot-mark { width: 28px; height: 28px; color: var(--amber); animation: spin 2.4s linear infinite; }

/* ── Бренд ── */
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; color: var(--amber);
  background: linear-gradient(145deg, var(--surface-3), var(--surface));
  border: 1px solid var(--line);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand-tag { color: var(--muted); font-size: 0.8rem; }
.brand-lg .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
.brand-lg .brand-mark .icon { width: 26px; height: 26px; }
.brand-lg .brand-name { font-size: 1.3rem; }
.brand-sm .brand-mark { width: 32px; height: 32px; border-radius: 9px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.72rem; font-weight: 650;
  color: var(--amber);
}

/* ── Кнопки ── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--surface-3); border-color: #4a4137; }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-2); border-color: var(--amber-2); }
.btn-danger { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff7f3; }
.btn-danger:hover { background: var(--danger-fill-2); border-color: var(--danger-fill-2); }
.btn-danger-soft { background: var(--danger-soft); border-color: rgba(239, 146, 131, 0.35); color: var(--danger); }
.btn-danger-soft:hover { background: rgba(239, 146, 131, 0.2); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.btn-sm .icon { width: 17px; height: 17px; }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { background: var(--surface-2); border-color: var(--line); }
.btn-primary[aria-disabled="true"]:hover { background: var(--amber); border-color: var(--amber); }
.btn-danger[aria-disabled="true"]:hover { background: var(--danger-fill); border-color: var(--danger-fill); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.is-busy { opacity: 0.85; cursor: progress; }
.btn.is-busy > .icon { visibility: hidden; }
.btn.is-busy::after {
  content: ""; position: absolute; left: 14px; top: 50%;
  width: 16px; height: 16px; margin-top: -8px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn.is-busy:not(:has(> .icon)) { padding-left: 38px; }
.btn-sm.is-busy::after { left: 12px; width: 14px; height: 14px; margin-top: -7px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; }
.icon-btn.is-busy .icon { animation: spin 0.9s linear infinite; }
.icon-btn-sm { width: 32px; height: 32px; border-color: transparent; background: transparent; }
.icon-btn-sm .icon { width: 16px; height: 16px; }

.link-btn {
  background: none; border: 0; padding: 0 2px; color: var(--amber-2);
  font: inherit; text-decoration: underline; cursor: pointer;
}

/* ── Формы ── */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--text-2); }
input[type="text"], input[type="password"], select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit;
}
input[type="text"]:hover, input[type="password"]:hover, select:hover { border-color: #4b4238; }
input[type="text"]:focus, input[type="password"]:focus, select:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft);
}
input[readonly] { opacity: 0.7; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:disabled { opacity: 0.6; }
.form-inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.form-error {
  color: var(--danger); background: var(--danger-soft);
  border: 1px solid rgba(239, 146, 131, 0.3); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 0.92rem; overflow-wrap: anywhere;
}
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }

/* ── Вход ── */
.login-view {
  min-height: 100vh; display: grid; align-items: center; justify-content: center;
  grid-template-columns: minmax(0, 440px) minmax(0, 380px); gap: clamp(24px, 5vw, 72px);
  padding: clamp(16px, 5vw, 56px);
}
.login-card {
  background: linear-gradient(180deg, var(--surface), #1c1915);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px); display: grid; gap: 18px; min-width: 0;
}
.login-title { font-size: 1.5rem; margin-top: 6px; }
.lead { color: var(--text-2); }
.fine { color: var(--muted); font-size: 0.82rem; }
.site-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line-soft);
  font-size: 0.9rem; color: var(--text-2); overflow-wrap: anywhere;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.site-status[data-tone="ok"] .status-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.site-status[data-tone="danger"] .status-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.site-status[data-tone="danger"] { color: var(--danger); }
.notice {
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.92rem;
  background: var(--info-soft); color: var(--info); border: 1px solid rgba(163, 192, 212, 0.25);
}
.notice[data-tone="danger"] { background: var(--danger-soft); color: var(--danger); border-color: rgba(239, 146, 131, 0.3); }
.login-aside { display: grid; gap: 18px; min-width: 0; }
.feature-list { list-style: none; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list li > span:last-child { display: grid; gap: 2px; }
.feature-icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; color: var(--amber); background: var(--amber-soft);
  border: 1px solid rgba(227, 168, 87, 0.2);
}

/* ── Оболочка ── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.topbar { display: none; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 16px; background: rgba(25, 22, 19, 0.92);
  border-right: 1px solid var(--line-soft);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.only-mobile { display: none; }
.nav-list { list-style: none; display: grid; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px;
  border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 550;
  border: 1px solid transparent;
}
.nav-link .icon { color: var(--muted); }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link[aria-current="true"] { background: var(--amber-soft); color: var(--text); border-color: rgba(227, 168, 87, 0.22); }
.nav-link[aria-current="true"] .icon { color: var(--amber); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; padding: 14px 6px 0; border-top: 1px solid var(--line-soft); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip .icon { color: var(--muted); }
.user-chip > span { display: grid; min-width: 0; }
.user-name { font-weight: 600; overflow-wrap: anywhere; }
.scrim { position: fixed; inset: 0; background: rgba(8, 7, 6, 0.6); z-index: 40; }

.main {
  min-width: 0; width: 100%; max-width: 1200px;
  padding: clamp(16px, 3.5vw, 40px) clamp(16px, 4vw, 48px) 80px;
}
.main:focus { outline: none; }

.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 24px; margin-bottom: 24px;
}
.page-title-wrap { min-width: 0; }
.page-title { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-top: 4px; overflow-wrap: anywhere; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.refresh { display: flex; align-items: center; gap: 10px; }

.profile-switch { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-group {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 100%;
}
.seg { position: relative; display: inline-flex; min-width: 0; }
.seg-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-face {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: 9px; color: var(--text-2); font-weight: 600; cursor: pointer;
  overflow-wrap: anywhere;
}
.seg-face:hover { background: var(--surface-2); color: var(--text); }
.seg-input:checked + .seg-face { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(227, 168, 87, 0.35); }
.seg-input:focus-visible + .seg-face { outline: 2px solid var(--amber); outline-offset: 1px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.health-ok { background: var(--ok); }
.health-down { background: var(--danger); }

/* ── Состояния ── */
.banner {
  display: block; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 146, 131, 0.3);
  overflow-wrap: anywhere;
}
.state-block {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line-soft); color: var(--text-2);
}
.state-block > .icon { width: 26px; height: 26px; color: var(--muted); }
.state-block > div { display: grid; gap: 8px; justify-items: start; }
.state-error > .icon { color: var(--danger); }
.state-title { font-weight: 650; color: var(--text); }
.spinner {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--amber); border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.inline-state {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--bg-2); color: var(--text-2);
  border: 1px dashed var(--line); margin-bottom: 12px; overflow-wrap: anywhere;
}
.inline-error { color: var(--danger); border-style: solid; border-color: rgba(239, 146, 131, 0.3); background: var(--danger-soft); }
.inline-error .icon { color: var(--danger); }
.empty {
  padding: 22px 18px; border-radius: var(--radius-sm); text-align: center;
  border: 1px dashed var(--line); background: rgba(20, 18, 16, 0.4); display: grid; gap: 4px;
}
.empty-compact { padding: 14px; text-align: left; }
.empty-title { font-weight: 600; color: var(--text-2); }
.hint {
  font-size: 0.88rem; color: var(--amber-2); background: var(--amber-soft);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}

/* ── Разделы и карточки ── */
.section { display: grid; gap: 18px; margin-bottom: 48px; scroll-margin-top: 24px; }
.section-head { display: grid; gap: 6px; max-width: 760px; }
.section-head h2 { font-size: 1.3rem; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; max-width: none; }
.section-head-row > div { display: grid; gap: 6px; }

.card {
  background: linear-gradient(180deg, var(--surface), #1d1915);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(16px, 2.6vw, 24px);
  display: grid; gap: 16px; align-content: start; min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-head h3 { font-size: 1.05rem; }
.card-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--line);
}
.card-body { display: grid; gap: 10px; min-width: 0; }
.card-feature {
  grid-template-columns: auto minmax(0, 1fr); gap: 18px;
  border-color: rgba(227, 168, 87, 0.28);
  background: radial-gradient(600px 200px at 0% 0%, rgba(227, 168, 87, 0.09), transparent 70%), linear-gradient(180deg, var(--surface), #1d1915);
}
.card-feature .card-icon { width: 46px; height: 46px; }
.card-feature h3 { font-size: 1.15rem; }
.card-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.explain {
  padding: 12px 14px; border-left: 3px solid var(--amber); border-radius: 0 8px 8px 0;
  background: var(--bg-2); color: var(--text-2); overflow-wrap: anywhere;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }

.tone-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(156, 197, 154, 0.25); }
.tone-danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(239, 146, 131, 0.25); }
.tone-amber { color: var(--amber); background: var(--amber-soft); border-color: rgba(227, 168, 87, 0.25); }
.tone-info { color: var(--info); background: var(--info-soft); border-color: rgba(163, 192, 212, 0.25); }
.tone-muted { color: var(--muted); background: var(--surface-3); border-color: var(--line); }

/* ── Обзор ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.stat {
  display: flex; gap: 14px; align-items: flex-start; min-width: 0;
  padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line-soft);
}
.stat-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 11px; border: 1px solid;
}
.stat-body { display: grid; gap: 2px; min-width: 0; }
.stat-label { color: var(--muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.15rem; font-weight: 650; overflow-wrap: anywhere; }
.stat-sub { color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }

/* ── Шаги ── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.steps li {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line-soft);
}
.steps li > span:last-child { display: grid; gap: 2px; font-size: 0.92rem; min-width: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
  border-radius: 50%; background: var(--amber-soft); color: var(--amber);
  font-weight: 700; font-size: 0.9rem; border: 1px solid rgba(227, 168, 87, 0.3);
}

/* ── Списки ── */
.items { list-style: none; display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-soft);
  min-width: 0;
}
.item:hover { border-color: var(--line); }
.item-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); align-self: start;
}
.item-icon .icon { width: 18px; height: 18px; }
.item-main { display: grid; gap: 4px; min-width: 0; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.86rem;
  min-width: 0;
}
.item-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.id-code {
  font-size: 0.8rem; padding: 1px 6px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-soft);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
  border: 1px solid;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  padding: 2px 9px; border-radius: 999px; font-size: 0.8rem;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-soft);
  overflow-wrap: anywhere;
}

.listing { display: grid; gap: 12px; }
.listing-head { display: grid; gap: 2px; }
.listing-title { font-weight: 650; }

/* ── Ключ-значение ── */
.kv { margin: 0; display: grid; gap: 0; }
.kv-row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
}
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }

/* ── Журнал ── */
.timeline { list-style: none; position: relative; display: grid; gap: 12px; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--line), transparent);
}
.tl-item { position: relative; background: none; border: 0; color: inherit; }
.tl-dot {
  position: absolute; left: -26px; top: 18px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--muted);
}
.tl-item.tone-ok .tl-dot { border-color: var(--ok); }
.tl-item.tone-danger .tl-dot { border-color: var(--danger); }
.tl-item.tone-amber .tl-dot { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.tl-item.tone-info .tl-dot { border-color: var(--info); }
.tl-card {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; color: var(--text);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tl-title { font-weight: 650; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.85rem; }
.tl-summary { overflow-wrap: anywhere; }
.tone-text-ok { color: var(--ok); }
.tone-text-danger { color: var(--danger); }
.tone-text-amber { color: var(--amber-2); }
.tone-text-info, .tone-text-muted { color: var(--text-2); }
.tl-details summary {
  cursor: pointer; color: var(--muted); font-size: 0.86rem; width: fit-content;
  padding: 4px 0; min-height: 32px; display: flex; align-items: center;
}
.tl-details summary:hover { color: var(--text-2); }
.tl-details pre {
  margin: 8px 0 0; padding: 12px; max-height: 320px; overflow: auto;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--text-2);
}

/* ── Покрытие ── */
.plain-list { list-style: none; display: grid; gap: 10px; }
.plain-list li { position: relative; padding-left: 26px; overflow-wrap: anywhere; color: var(--text-2); }
.plain-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg);
}
.excl-list li::before {
  width: 12px; height: 2px; top: 0.7em; border: 0; background: var(--danger); transform: none;
}

/* ── Уведомления ── */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: grid; gap: 10px; width: min(420px, calc(100vw - 32px));
}
.toast {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 12px 10px 12px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  animation: rise 0.2s ease-out;
}
.toast.tone-danger { border-color: rgba(239, 146, 131, 0.45); background: #2c1f1b; color: var(--text); }
.toast.tone-ok { border-color: rgba(156, 197, 154, 0.4); background: var(--surface-2); color: var(--text); }
.toast.tone-info { background: var(--surface-2); color: var(--text); }
.toast-icon { padding-top: 1px; }
.toast.tone-danger .toast-icon { color: var(--danger); }
.toast.tone-ok .toast-icon { color: var(--ok); }
.toast.tone-info .toast-icon { color: var(--info); }
.toast-text { overflow-wrap: anywhere; font-size: 0.92rem; padding-top: 1px; }

/* ── Диалог ── */
.dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto;
  padding: 0; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
.dialog::backdrop { background: rgba(10, 8, 6, 0.72); backdrop-filter: blur(3px); }
.dlg-form { display: grid; gap: 18px; padding: clamp(18px, 4vw, 28px); }
.dlg-head { display: flex; align-items: center; gap: 14px; }
.dlg-head h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
.dlg-body { display: grid; gap: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.dlg-list { list-style: none; display: grid; gap: 8px; }
.dlg-list li {
  position: relative; padding: 10px 12px 10px 34px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
}
.dlg-list li::before {
  content: ""; position: absolute; left: 14px; top: 1.05em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
}
.phrase {
  padding: 2px 8px; border-radius: 6px; background: var(--amber-soft); color: var(--amber-2);
  border: 1px solid rgba(227, 168, 87, 0.3); white-space: nowrap; font-size: 0.9em;
}
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ── Анимации ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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

/* ── Адаптивность ── */
@media (max-width: 960px) {
  .login-view { grid-template-columns: minmax(0, 480px); }
  .login-aside { display: none; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    padding: 10px 16px; background: rgba(20, 18, 16, 0.94);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(8px);
  }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; height: 100%;
    width: min(86vw, 300px); transform: translateX(-102%); visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
    background: var(--bg-2); border-right: 1px solid var(--line);
  }
  .sidebar.open { transform: none; visibility: visible; transition: transform 0.2s ease; }
  .only-mobile { display: inline-grid; }
  .section { scroll-margin-top: 76px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .page-head { align-items: stretch; }
  .page-tools { width: 100%; justify-content: space-between; }
  .card-feature { grid-template-columns: minmax(0, 1fr); }
  .card-row { grid-template-columns: auto minmax(0, 1fr); }
  .card-row > .btn { grid-column: 1 / -1; }
  .form-inline { grid-template-columns: minmax(0, 1fr); }
  .form-inline .btn { width: 100%; }
  .item { grid-template-columns: auto minmax(0, 1fr); }
  .item-side { grid-column: 1 / -1; justify-content: space-between; }
  .item-side:empty { display: none; }
  .kv-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .state-block { padding: 20px; }
  .toasts { right: 16px; left: 16px; bottom: 16px; width: auto; }
  .dlg-actions .btn { flex: 1 1 auto; }
  .actions .btn { width: 100%; }
}
