/* СМ Планер — базовые стили интерфейса (ядро), палитра «Небо» из SM Сметы, запечённая в токены.
   Каркас с боковым меню, типографика, карточки, формы, кнопки, таблицы, бейджи, подсказки, тосты,
   мобильное меню. Стили разделов — в app.css. Компоненты знают только токены. */

:root {
  /* боковой отступ страницы (решение 2026-10-19): растёт с шириной экрана — 48 на 1440 и шире, около 40 на ноутбуке
     1280, не меньше 28; доске, ганту и таблицам на узких экранах ширина нужнее воздуха. На телефоне — 14 (ниже) */
  --page-x: clamp(28px, 3.35vw, 48px);
  /* высоты элементов управления: обычные (кнопки, поля), малые (.small, чипы), строчные иконки */
  --ctl-h: 40px;
  --ctl-h-sm: 32px;
  /* «Небо», светлая */
  --paper: #f7f9fc;
  --ink: #172033;
  --ink-rgb: 23, 32, 51;
  --muted: #66708a;
  --faint: #98a1b6;
  --card: #ffffff;
  --card-solid: #ffffff;
  --hover-solid: #f0f3f9;
  --border: rgba(23, 32, 51, .08);
  --border-strong: rgba(23, 32, 51, .16);
  --accent: #2b7de9;
  --accent-dark: #1f68c8;
  --accent-rgb: 43, 125, 233;
  --accent-soft: rgba(43, 125, 233, .11);
  --second: #22b8cf;
  --radius: 12px;
  --sidebar-bg: rgba(255, 255, 255, .85);
  --glass-edge: rgba(255, 255, 255, 0);
  --blob-1: #d7e6fb;
  --blob-2: #d3f1f5;
  --blob-3: #e6edf7;
  --head: "Golos Text", -apple-system, "Segoe UI", sans-serif;
  /* семантические цвета */
  --ok: #196b43;
  --ok-bg: #e2f2e4;
  --ok-dot: #2c9e60;
  --warn: #8f5307;
  --warn-bg: #faeed3;
  --warn-dot: #e19410;
  --crit: #a92c1c;
  --crit-bg: #fbe5df;
  --crit-bg-strong: #f8d7ce;
  --crit-dot: #e04d33;
  --unknown: #5d6470;
  --unknown-bg: #ebeae4;
  --unknown-dot: #a3a496;
  --info: #395a86;
  --info-bg: #e7edf7;
  --info-dot: #5b82b8;
  --violet: #58527e;
  --violet-bg: #eae7f3;
  --violet-dot: #8b83b8;
  --ms: #7458e8; --ms-bg: #efeafe;          /* вехи проекта: ромб, подпись, прогресс */
  --tpl: #0f8f84; --tpl-bg: #e3f4f2;        /* шаблоны задач (ТЗ-30): пилюля «по шаблону», поля из шаблона */
  --star: #f0a81a;                          /* избранное (бэклог-38): звёздочки */
  --shadow: 0 1px 2px rgba(23, 32, 51, .06), 0 4px 14px -6px rgba(23, 32, 51, .08);
  --shadow-lg: 0 18px 40px -16px rgba(23, 32, 51, .25);
  --toast-bg: rgba(23, 32, 51, .94);
  --toast-border: transparent;
}
/* Токены стилей оформления (2026-10-14): здесь — значения «Классического», style-calm.css / style-contrast.css
   переопределяют их. Новый элемент интерфейса берёт фон, тень, радиус и цвета отсюда — тогда он сам подходит ко всем
   стилям: --blk-* — блок с содержимым, --well — поверхность внутри блока, --track — дорожка полосы/прогресса,
   --r-ctl / --r-ctl-sm — радиус элементов управления (высота 40 / 32), --btn / --btn-h — главная кнопка. */
:root { --blk-bg: var(--card); --blk-shadow: var(--shadow); --blk-radius: var(--radius); --well: rgba(var(--ink-rgb), .04);
  --track: rgba(var(--ink-rgb), .07); --r-ctl: 12px; --r-ctl-sm: 9px; --btn: var(--accent); --btn-h: var(--accent-dark); }

:root { color-scheme: light; }
/* ── «Небо», тёмная ── */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f141c;
  --ink: #e6eaf2;
  --ink-rgb: 230, 234, 242;
  --muted: #8f99ad;
  --faint: #66708a;
  --card: #161c26;
  --card-solid: #161c26;
  --hover-solid: #1e2532;
  --border: rgba(230, 234, 242, .08);
  --border-strong: rgba(230, 234, 242, .18);
  --accent: #63a3ff;
  --accent-dark: #86b8ff;
  --accent-rgb: 99, 163, 255;
  --accent-soft: rgba(99, 163, 255, .15);
  --second: #4fd0e6;
  --sidebar-bg: rgba(19, 25, 34, .8);
  --glass-edge: rgba(255, 255, 255, .05);
  --blob-1: #162a48;
  --blob-2: #133a42;
  --blob-3: #172236;
  --ok: #79c79b;
  --ok-bg: rgba(44, 158, 96, .18);
  --ok-dot: #3aa96b;
  --warn: #e2b25b;
  --warn-bg: rgba(225, 148, 16, .16);
  --warn-dot: #d99a26;
  --crit: #e88a74;
  --crit-bg: rgba(224, 77, 51, .18);
  --crit-bg-strong: rgba(224, 77, 51, .3);
  --crit-dot: #d95940;
  --unknown: #9b9c90;
  --unknown-bg: rgba(163, 164, 150, .14);
  --unknown-dot: #83847a;
  --info: #9db8dd;
  --info-bg: rgba(91, 130, 184, .18);
  --info-dot: #6d92c4;
  --violet: #b3abd8;
  --violet-bg: rgba(139, 131, 184, .18);
  --violet-dot: #948cc0;
  --ms: #a48bff; --ms-bg: rgba(164, 139, 255, .16);
  --tpl: #3cc7b9; --tpl-bg: rgba(60, 199, 185, .14);
  --star: #f5bd3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px -6px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 40px -16px rgba(0, 0, 0, .65);
  --toast-bg: rgba(30, 37, 50, .97);
  --toast-border: rgba(255, 255, 255, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

/* ── Цветные блюр-пятна на фоне ────────────────────── */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.ambient .blob-1 { width: 520px; height: 520px; top: -180px; left: -120px; background: var(--blob-1); }
.ambient .blob-2 { width: 460px; height: 460px; top: -140px; right: -100px; background: var(--blob-2); }
.ambient .blob-3 { width: 560px; height: 560px; bottom: -240px; left: 34%; background: var(--blob-3); opacity: .5; }

a { color: var(--accent); text-decoration: none; }
/* ссылка при наведении — темнее, без подчёркивания (2026-10-14: подчёркивание по наведению — приём из 2000-х).
   :where() обнуляет вес — элементы-ссылки со своим оформлением (плашка, плитка, строка, кнопка) решают сами.
   В сплошном тексте (описание, сообщения, справка) ссылки подчёркнуты всегда — тонкой линией, иначе их отличает
   только цвет (доступность) — см. .rich a / .hp-body a / .bubble a в app.css */
a:where(:hover) { color: var(--accent-dark); }

/* ── Баннер режима призрака ────────────────────────── */
.ghost-top { position: sticky; top: 0; z-index: 140; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; border-bottom: 1px solid rgba(var(--ink-rgb), .08); }
.ghost-top form { margin: 0; }
@media (min-width: 992px) { .layout.has-ghost .sidebar { top: 41px; height: calc(100vh - 41px); } }

/* ── Каркас: боковое меню + контент ────────────────── */
.layout { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 260px; flex: none;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 18px 18px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-right: 1px solid var(--border);
  z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: .01em;
  color: var(--ink); padding: 4px 8px 16px;
}
.brand:hover { text-decoration: none; }
.brand .mark { flex: none; }
/* знак «полосы Гантта»: в тёмной теме тёмно-синяя полоса иначе сливается с фоном */
[data-theme="dark"] .mark rect:first-child { fill: #4d8fe3; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
/* кнопка создания задачи — первый пункт меню */
.nav-create { margin-bottom: 8px; }
.nav-create svg { flex: none; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 14px; font-weight: 480;
  padding: 9px 12px; border-radius: 10px;
  transition: color .15s, background .15s;
}
.nav-link svg { flex: none; opacity: .75; }
.nav-link:hover { color: var(--ink); background: rgba(var(--ink-rgb), .05); text-decoration: none; }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-link.active svg { opacity: 1; }

.tm-avatar.initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.tm-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; font-size: 12px; }

/* основная область резиновая на всю ширину; вспомогательная правая колонка (если есть) — фиксированная */
main { flex: 1; min-width: 0; margin: 30px 0; padding: 0 var(--page-x); }

/* ── Хлебные крошки ────────────────────────────────── */
.breadcrumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); transition: color .15s; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs .sep { color: var(--faint); user-select: none; }
.breadcrumbs .current { color: var(--ink); font-weight: 560; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Типографика ───────────────────────────────────── */
h1 { font-family: var(--head); font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 20px; }
h1 .badge, h1 .pill { vertical-align: 6px; }
h2 { font-family: var(--head); font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin: 30px 0 12px; }
.card > h2:first-child, .card > form:first-child > h2:first-child { margin-top: 0; }
.small { font-size: 12.5px; }
code.key {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; font-weight: 600;
  background: rgba(var(--ink-rgb), .06); padding: 2px 7px; border-radius: 6px; letter-spacing: .02em;
}

/* ── Карточки ──────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--glass-edge);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  position: relative;
}
.card:has(details.menu[open]), .toolbar:has(details.menu[open]), tr:has(details.menu[open]) { z-index: 80; position: relative; }
.section-intro { color: var(--muted); font-size: 13.5px; line-height: 1.5; max-width: 760px; margin: -6px 0 18px; }

/* ── Панель фильтров и чипы ───────────────────────── */
.chips { display: inline-flex; gap: 4px; background: rgba(var(--ink-rgb), .06); padding: 4px; border-radius: 13px; flex-wrap: wrap; }
.chip {
  border: none; cursor: pointer; background: transparent;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--ctl-h-sm); padding: 0 13px; border-radius: 9px;
  font-size: 13px; font-weight: 560; color: var(--muted); font-family: inherit;
  transition: background .18s, color .18s, box-shadow .18s;
}
label.chip { margin-bottom: 0; letter-spacing: normal; }   /* у <label> общие отступ и разрядка — пункт съезжал вверх */
.chip:hover { color: var(--ink); text-decoration: none; }
.chip.active { background: var(--card-solid); color: var(--ink); box-shadow: var(--shadow); }
.chip .n { font-variant-numeric: tabular-nums; font-weight: 650; margin-left: 4px; opacity: .7; }

/* ── Вкладки — один компонент на весь сервис (решение 2026-10-11) ──────────
   Подчёркивание выезжает из центра: у активной — синее, при наведении на другую — короткое серое.
   Разметка: <nav class="tabs"> или <nav class="view-tabs"> с <a class="tab|vt">; активная — .active или .on. */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-strong); margin-bottom: 18px; flex-wrap: wrap; }
.view-tabs { display: flex; gap: 4px; }
.tab, .vt { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 12px; font-size: 15px; font-weight: 600;
  color: var(--muted); white-space: nowrap; transition: color .15s; }
.tab:hover, .vt:hover { color: var(--ink); text-decoration: none; }
.tab::after, .vt::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent); transform: scaleX(0); transition: transform .2s cubic-bezier(.3, .9, .3, 1); }
.tab.active, .vt.on { color: var(--accent); } .tab.active::after, .vt.on::after { transform: none; }
.tab:hover:not(.active)::after, .vt:hover:not(.on)::after { transform: scaleX(.6); background: var(--border-strong); }
@media (max-width: 720px) { .tab, .vt { padding: 10px 10px 12px; font-size: 14px; gap: 6px; } }

/* ── Формы ─────────────────────────────────────────── */
select, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=url], textarea {
  min-height: var(--ctl-h); padding: 8px 13px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--card-solid);
  transition: border-color .15s, box-shadow .15s;
}
input[readonly] { color: var(--muted); background: rgba(var(--ink-rgb), .03); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .14); }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 920px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid p { margin: 0; }
.form-grid p .muted.small { display: block; margin-top: 5px; }
.checks { display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 8px; align-items: center; margin: 0; color: var(--ink); font-size: 14px; font-weight: 450; cursor: pointer; }
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: none; padding: 0;
  border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--card-solid); color: #fff;
  display: inline-grid; place-items: center; vertical-align: -4px; cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--accent); }
input[type=checkbox]:checked, input[type=radio]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::before { content: ""; width: 5px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
input[type=radio]:checked::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
input[type=checkbox]:disabled, input[type=radio]:disabled { cursor: not-allowed; opacity: .55; background: rgba(var(--ink-rgb), .05); border-color: var(--border); }
input[type=checkbox]:checked:disabled, input[type=radio]:checked:disabled { background: var(--faint); border-color: var(--faint); }
label.checks { gap: 8px; font-size: 14px; font-weight: 450; cursor: pointer; }

/* ── Кнопки ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  min-height: var(--ctl-h); padding: 0 19px; border-radius: 12px;
  font-size: 14px; font-weight: 570; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .12s, box-shadow .18s;
  box-shadow: 0 2px 6px -1px rgba(var(--accent-rgb), .4);
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; box-shadow: 0 6px 16px -4px rgba(var(--accent-rgb), .5); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(var(--accent-rgb), .35); }
.btn.secondary { background: var(--card-solid); color: var(--ink); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.btn.secondary:hover { background: var(--hover-solid); color: var(--ink); }
.btn.small { min-height: var(--ctl-h-sm); padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn.ico { width: var(--ctl-h); padding: 0; } .btn.small.ico { width: var(--ctl-h-sm); }   /* кнопка-иконка: квадрат по высоте, подпись — в data-tip и aria-label */
.btn.ico svg { width: 16px; height: 16px; flex: none; }
td.row-actions .btn.ico + .btn.ico, td.row-actions form + .btn.ico { margin-left: 4px; }
.btn.danger { background: var(--crit-bg); color: var(--crit); border: 1px solid transparent; box-shadow: none; }
.btn.danger:hover { background: var(--crit-bg-strong); color: var(--crit); box-shadow: none; transform: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.actions { display: flex; gap: 10px; margin-top: 22px; align-items: center; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; }
.toolbar .group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Таблицы ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: -6px -8px; padding: 6px 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 12px; border-bottom: 1px solid rgba(var(--ink-rgb), .07); vertical-align: middle; }
th { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: rgba(var(--accent-rgb), .045); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td .sub { color: var(--muted); font-size: 12.5px; }
td.row-actions { text-align: right; white-space: nowrap; }
td.row-actions form { display: inline; }
.dense th, .dense td { padding: 7px 10px; }
.dense td { font-size: 13.5px; }
.dense .badge { font-size: 12px; padding: 2.5px 9px 2.5px 7px; }
.user-cell { display: inline-flex; align-items: center; gap: 9px; }

/* ── Бейджи, точки, пилюли ─────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; padding: 3.5px 11px 3.5px 9px; border-radius: 999px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.crit { background: var(--crit-bg); color: var(--crit); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; background: currentColor; opacity: .85; }
.badge.ok .dot { background: var(--ok-dot); opacity: 1; }
.badge.crit .dot { background: var(--crit-dot); opacity: 1; }
.badge.info .dot { background: var(--info-dot); opacity: 1; }
.pill { display: inline-block; padding: 2.5px 11px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--unknown-bg); color: var(--unknown); white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* ── Всплывающая подсказка (data-tip) ─────────────── */
/* Один элемент .sm-tip в body (app.js), position: fixed — окна и колонки с прокруткой его не обрезают, у края
   экрана сдвигается внутрь, сверху не помещается — показывается снизу. Стрелка — по центру элемента (--ax). */
[data-tip] { cursor: help; }
:is(a, button, label, summary, [role=button], .ed)[data-tip] { cursor: pointer; } input[data-tip] { cursor: text; }
.sm-tip {
  position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none;
  background: rgba(var(--ink-rgb), .95); color: var(--paper);
  padding: 8px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 450; line-height: 1.45;
  width: max-content; max-width: min(300px, calc(100vw - 16px)); white-space: pre-line; text-align: left;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(3px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.sm-tip.below { transform: translateY(-3px); }
.sm-tip.on { opacity: 1; visibility: visible; transform: none; transition: opacity .15s ease, transform .15s ease; }
.sm-tip::before {
  content: ""; position: absolute; top: 100%; left: var(--ax, 50%); transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgba(var(--ink-rgb), .95);
}
.sm-tip.below::before { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: rgba(var(--ink-rgb), .95); }

/* ── Меню действий (⋯) ─────────────────────────────── */
details.menu { position: relative; display: inline-block; }
details.menu summary {
  list-style: none; cursor: pointer; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card-solid);
  font-size: 17px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow);
  transition: background .15s, color .15s; user-select: none;
}
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary:hover { color: var(--ink); background: var(--hover-solid); }
details.menu[open] summary { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* ── Разделители: тонкая линия в цвете границ ───────── */
/* горизонтальный: <hr class="divider">; с отступами по умолчанию, .tight — без них */
hr.divider { border: 0; height: 1px; background: var(--border); margin: 18px 0; }
/* вертикальный: правая колонка/панель с линией слева — class="divider-left" на элементе колонки */
.divider-left { border-left: 1px solid var(--border); padding-left: 18px; }
@media (max-width: 991px) {
  .divider-left { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
}

/* ── Разное ────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 13px; }
.ts { font-variant-numeric: tabular-nums; }
.meta-grid { display: grid; grid-template-columns: 180px 1fr; gap: 9px 18px; font-size: 14px; margin: 0; }
.meta-grid dt { color: var(--muted); }
.meta-grid dd { margin: 0; font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .icon { font-size: 32px; margin-bottom: 8px; }
.empty h1 { font-size: 22px; margin-bottom: 8px; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: grayscale(1) opacity(.55); cursor: pointer; }

/* ── Тосты ─────────────────────────────────────────── */
/* уведомления — сверху справа, ниже крестика окна задачи (тот до 106 px от верха) — решение 2026-10-14 */
.toasts { position: fixed; top: 116px; right: 24px; z-index: 100; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.toast {
  background: var(--toast-bg); border: 1px solid var(--toast-border); color: #f4f6fb;
  padding: 12px 17px; border-radius: 13px; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: slide-in .28s cubic-bezier(.2, .9, .3, 1.2); max-width: 380px;
}
.toast .toast-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; margin-left: 2px; }
@keyframes slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.toast.hide { opacity: 0; transform: translateX(18px); transition: opacity .3s, transform .3s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Мобильное меню ────────────────────────────────── */
.nav-burger { display: none; }
.nav-fold { display: none; }   /* свернуть меню — только на широком экране */
.nav-backdrop { display: none; }
.side-drawer { display: contents; }
@media (max-width: 991px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; flex-direction: row; align-items: center;
    padding: 8px 14px; border-right: none; border-bottom: 1px solid var(--border); gap: 4px;
    backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); z-index: 125;
  }
  .brand { padding: 0 8px 0 0; }
  .nav-burger {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 40px; height: 40px;
    border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card-solid); color: var(--muted); cursor: pointer;
  }
  .nav-burger:active { background: var(--accent-soft); color: var(--accent); }
  .side-drawer {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 85vw);
    padding: 16px 12px; background: var(--paper); border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg); overflow-y: auto; z-index: 130;
    transform: translateX(-105%); transition: transform .2s ease;
  }
  body.nav-open .side-drawer { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(var(--ink-rgb), .35); z-index: 120; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  main { padding: 0 14px; margin: 18px 0 26px; width: auto; }
  h1 { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; gap: 2px 0; }
  .meta-grid dt { margin-top: 9px; }
  .ambient span { filter: blur(70px); }
}

/* ── Печать ────────────────────────────────────────── */
@media print {
  .ambient, .toasts, .sidebar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #d8dde6; break-inside: avoid; }
  h2 { break-after: avoid; }
}

/* ── Сжатое меню (раздел «Проекты», ТЗ-08): иконки + дерево на месте меню ───────────
   Колонка шире обычной (360px вместо 260px, решение 2026-10-11 — дерево 300px): меню плавно сужается до 60px,
   на освободившееся место выезжает дерево.
   Всё по вертикали остаётся на своих местах — подписи не прячутся, а обрезаются по ширине пункта.
   Подписи — нашими тултипами справа (не браузерными). */
:root { --rail-ease: cubic-bezier(.3, .8, .25, 1); --rail-t: .3s; }
.nl, .brand-name { min-width: 0; overflow: hidden; white-space: nowrap; transition: opacity .26s .1s; }
.nav-link .nl { flex: 1; }
/* «Создать задачу»: подпись по центру; общие стили .btn идут ниже — поэтому селектор с .side-nav */
.side-nav .nav-create { justify-content: center; gap: 10px; padding: 0 12px;
  transition: background .15s, transform .12s, box-shadow .18s, gap var(--rail-t) var(--rail-ease), padding var(--rail-t) var(--rail-ease); }
.side-nav .nav-create .nl { flex: 0 1 auto; max-width: 200px; transition: opacity .26s .1s, max-width var(--rail-t) var(--rail-ease); }
.brand { transition: padding var(--rail-t) var(--rail-ease), margin var(--rail-t) var(--rail-ease); }

/* кнопка темы в верхней панели (решение 2026-10-11): одна иконка по кругу, уходящая уезжает вверх, новая — снизу */
.tc-box { position: relative; display: block; width: 18px; height: 18px; overflow: hidden; }
.tc-box svg { position: absolute; inset: 0; display: block; opacity: 0; transform: translateY(120%); transition: transform .34s var(--rail-ease), opacity .24s; }
.tc-box svg.tc-out { transform: translateY(-120%); }
[data-theme-pref="light"] .tc-box .tc-light, [data-theme-pref="dark"] .tc-box .tc-dark,
[data-theme-pref="system"] .tc-box .tc-system { opacity: 1; transform: none; }

@media (min-width: 992px) {
  .sidebar { transition: padding var(--rail-t) var(--rail-ease), width var(--rail-t) var(--rail-ease); }
  .layout.rail .sidebar { width: 360px; padding-left: 10px; padding-right: 310px; }
  /* широкий режим (настройка nav=mini): колонка 60px, контенту — всё остальное; в «Проектах» не действует — дерево видно всегда */
  .layout.mini:not(.rail) .sidebar { width: 60px; padding-left: 10px; padding-right: 10px; }
  .layout:is(.rail, .mini) .brand { padding-left: 5px; padding-right: 0; position: relative; }
  .layout:is(.rail, .mini) .nl, .layout:is(.rail, .mini) .brand-name { opacity: 0; transition: opacity .12s; }
  .layout:is(.rail, .mini) .nav-link, .layout:is(.rail, .mini) .nav-create { position: relative; }
  .layout:is(.rail, .mini) .side-nav .nav-create { gap: 0; padding: 0; }   /* плюс ровно по центру */
  .layout:is(.rail, .mini) .side-nav .nav-create .nl { max-width: 0; transition: opacity .12s, max-width var(--rail-t) var(--rail-ease); }
  .layout:is(.rail, .mini) .side-nav .nav-create .nav-kbd { display: none; }   /* подсказка ⌘G сдвигала плюс */
  /* подсказка всегда поверх дерева и всего остального */
  .layout:is(.rail, .mini) [data-rail-tip]:hover, .layout:is(.rail, .mini) [data-rail-tip]:focus-visible { z-index: 400; }
  /* дерево — поверх правой части колонки; появляется и уходит вместе со сжатием меню */
  .ptree {
    position: absolute; top: 0; bottom: 0; left: 60px; width: 300px;
    transition: opacity .26s .08s, transform var(--rail-t) var(--rail-ease), visibility 0s;
    border-left: 1px solid var(--border); padding: 25px 10px 0;
  }
  .sidebar .ptree-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -10px; padding: 0 10px 16px; }
  .sidebar .ptree-h { position: relative; z-index: 2; }   /* меню «+» поверх списка и узкого меню слева */
  .ptree.ptree-in { animation: ptree-in .34s var(--rail-ease) .06s both; }
  .ptree.ptree-out { animation: ptree-out .2s ease both; pointer-events: none; }
  @keyframes ptree-in { from { opacity: 0; transform: translateX(-14px); } }
  @keyframes ptree-out { to { opacity: 0; transform: translateX(-10px); } }

  .nav-fold {
    position: absolute; top: 27px; left: 218px; z-index: 5; display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer;
    transition: left var(--rail-t) var(--rail-ease), top var(--rail-t) var(--rail-ease), opacity .15s, color .15s, background .15s;
  }
  .nav-fold:hover, .nav-fold:focus-visible { color: var(--ink); background: rgba(var(--ink-rgb), .06); }
  .nav-fold .nf-open { display: none; }
  /* свёрнуто: кнопка «развернуть» накрывает весь блок логотипа и проявляется при наведении на него;
     сам логотип не ловит мышь — иначе его подсказка «На главную» поднимает его поверх кнопки */
  .layout.mini .nav-fold { left: 10px; top: 22px; width: 39px; height: 38px; border-radius: 10px; opacity: 0; background: var(--card-solid); }
  .layout.mini:not(.rail) .brand { pointer-events: none; }
  .layout.rail .nav-fold { display: none; }   /* в «Проектах» дерево видно всегда — сворачивать нечего */
  .layout.mini .nav-fold:hover, .layout.mini .nav-fold:focus-visible { opacity: 1; }
  .layout.mini .nav-fold .nf-open { display: block; }
  .layout.mini .nav-fold .nf-close { display: none; }
  .layout.mini .brand .mark { transition: opacity .15s; }
  .layout.mini .sidebar:has(.nav-fold:hover) .brand .mark { opacity: 0; }
  .nav-fold::after {
    content: attr(aria-label); position: absolute; top: calc(100% + 8px); right: 0; opacity: 0; visibility: hidden;
    padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600;
    line-height: 1.3; white-space: nowrap; z-index: 300; pointer-events: none; box-shadow: var(--shadow-lg); transition: opacity .15s;
  }
  .nav-fold:hover::after { opacity: 1; visibility: visible; transition-delay: .3s; }
  .layout.mini .nav-fold::after { top: 50%; right: auto; left: calc(100% + 12px); transform: translateY(-50%); }
  .layout:is(.rail, .mini) [data-rail-tip]:hover::after, .layout:is(.rail, .mini) [data-rail-tip]:focus-visible::after {
    content: attr(data-rail-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600;
    line-height: 1.3; white-space: nowrap; z-index: 300; pointer-events: none; box-shadow: var(--shadow-lg);
  }
}

/* окно верхней панели — один компонент (2026-10-19): «Уведомления» и «Ждут ответа». Рамка с хвостиком к своей кнопке,
   шапка .tb-pop-head, прокручиваемый список .tb-pop-scroll, подвал .tb-pop-foot; место считает static/toppop.js */
.tb-pop {
  position: fixed; z-index: 260; display: flex; flex-direction: column; width: 420px;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: tb-pop-in .16s ease;
}
.tb-pop[hidden] { display: none; }
@keyframes tb-pop-in { from { opacity: 0; transform: translateY(-4px); } }
.tb-pop::before {
  content: ""; position: absolute; top: -7px; left: var(--arrow-x, 20px); width: 12px; height: 12px;
  background: var(--card-solid); border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); transform: rotate(45deg);
}
.tb-pop.from-side::before { top: 22px; left: -7px; transform: rotate(-45deg); }
.tb-pop-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px; }
.tb-pop-head b { font-family: var(--head); font-size: 15px; margin-right: auto; }
.tb-pop-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; }
.tb-pop-link:hover { color: var(--accent-dark); }
.tb-pop-ib { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); }
.tb-pop-ib:hover { color: var(--ink); background: var(--hover-solid); }
.ntf-tabs { flex: none; display: flex; gap: 4px; padding: 0 10px 8px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ntf-tab { flex: none; border: 0; background: none; padding: 5px 10px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.ntf-tab:hover { color: var(--ink); }
.ntf-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ntf-tab em { font-style: normal; font-size: 11.5px; margin-left: 2px; }
.tb-pop-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 8px; }
.tb-pop-empty { margin: 0; padding: 36px 12px; text-align: center; color: var(--muted); font-size: 13.5px; }
.tb-pop-foot { flex: none; display: block; padding: 11px; text-align: center; font-size: 13px; border-top: 1px solid var(--border); }
.tb-pop-loading { display: grid; gap: 10px; padding: 18px; }

/* строка уведомления */
.nt { position: relative; display: flex; align-items: flex-start; gap: 6px; border-radius: 12px; }
.nt:hover { background: var(--hover-solid); }
/* непрочитанное — фоном, как у наведённой строки, а под курсором чуть плотнее (2026-10-21: точку справа глаз терял);
   подряд идущие непрочитанные — один блок, без скруглений на стыках */
.nt.unread { background: var(--hover-solid); }
.nt.unread:hover { background: linear-gradient(rgba(var(--ink-rgb), .05), rgba(var(--ink-rgb), .05)) var(--hover-solid); }
.nt.unread:has(+ .nt.unread) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.nt.unread + .nt.unread { border-top-left-radius: 0; border-top-right-radius: 0; }
.nt-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; color: var(--ink); }
.nt-main:hover { text-decoration: none; }
.nt-face { position: relative; width: 32px; height: 32px; }
.nt-face .av { width: 32px; height: 32px; font-size: 13px; }
.nt-kind { position: absolute; right: -4px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 0 2px var(--card-solid); }
.nt-sys { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.nt-kind.t-acc { background: var(--accent); } .nt-kind.t-vio { background: var(--violet-dot); } .nt-kind.t-info { background: var(--info-dot); }
.nt-kind.t-ok { background: var(--ok-dot); } .nt-kind.t-warn { background: var(--warn-dot); } .nt-kind.t-crit { background: var(--crit-dot); } .nt-kind.t-unk { background: var(--unknown-dot); }
.nt-sys.t-crit { background: var(--crit-bg); color: var(--crit); } .nt-sys.t-warn { background: var(--warn-bg); color: var(--warn); }
.nt-sys.t-unk { background: var(--unknown-bg); color: var(--unknown); } .nt-sys.t-vio { background: var(--violet-bg); color: var(--violet); }
.nt-sys.t-acc, .nt-sys.t-info, .nt-sys.t-ok { background: var(--accent-soft); color: var(--accent); }
.nt-body { display: grid; gap: 3px; min-width: 0; font-size: 13.5px; line-height: 1.4; }
/* вид уведомления (2026-10-20, профиль → «Уведомления», notify.view_classes): проект — отдельной строкой над именем,
   главная подпись; ключ и текст сообщения можно скрыть. Разметка одна — части прячут классы на <html> */
.nt-pj { display: none; align-items: center; gap: 5px; min-width: 0; font-size: 12px; font-weight: 650; color: var(--ink); }
.nt-pj svg { flex: none; color: var(--muted); }
.nt-pj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.nt-pj-on .nt-pj { display: flex; }
html.nt-no-key .nt .key, html.nt-no-key .nt-toast .key { display: none; }
html.nt-no-text .nt-q, html.nt-no-text .nt-tq { display: none; }
.nt-h { color: var(--muted); } .nt-h b { color: var(--ink); font-weight: 600; }
.nt.unread .nt-h { color: var(--ink); }
.nt-task { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--ink); }
.nt-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nt-task .key { flex: none; font-size: 11px; }
.nt-q { display: block; padding: 6px 10px; border-radius: 9px; background: rgba(var(--ink-rgb), .05); font-size: 13px; line-height: 1.45; color: var(--ink); }
.nt-q > span, .nt-tq > span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }   /* две строки, без «хвоста» третьей */
.nt-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.nt-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nt-acts { position: absolute; right: 10px; top: 32px; display: none; gap: 4px; }
.nt:hover .nt-acts, .nt:has(:focus-visible) .nt-acts { display: flex; }   /* клавиатура — да, фокус после клика — нет */
.nt .nt-i-read, .nt.unread .nt-i-unread { display: none; } .nt.unread .nt-i-read { display: inline-flex; } .nt-i-unread { display: inline-flex; }
.nt-ab { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  background: var(--card-solid); color: var(--muted); box-shadow: var(--shadow); cursor: pointer; }
.nt-ab:hover { color: var(--accent); }
.nt.muted-row { opacity: .55; }
.nt-day { padding: 12px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.nt-sel { display: flex; align-items: center; padding: 16px 0 0 10px; margin: 0; cursor: pointer; }

/* страница «Уведомления» */
.ntp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ntp-search { margin-left: auto; }
.ntp-search .fl-search .input { width: 220px; }
.ntp { padding: 8px 10px 14px; }
.ntp-sel { position: sticky; top: 8px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 6px;
  border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }
.ntp-sel[hidden] { display: none; }
.ntp-sel span { margin-right: auto; font-weight: 600; }
.nt-more { display: block; margin: 12px auto 0; }

/* всплывающее сообщение о новом — справа сверху, карточкой */
.toast.nt-toast {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; width: 380px; max-width: calc(100vw - 32px);
  background: var(--card-solid); color: var(--ink); border: 1px solid var(--border-strong); padding: 12px 12px 12px 14px;
}
.toast.nt-toast.plain { grid-template-columns: minmax(0, 1fr) auto; }
.nt-tav { width: 32px; height: 32px; font-size: 13px; }
.nt-tav.nt-photo { object-fit: cover; padding: 0; }
.nt-tav.sys { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--crit-bg); color: var(--crit); font-weight: 700; }
.nt-tb { display: grid; gap: 5px; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.nt-th b { font-weight: 650; }
.nt-tt { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
.nt-tt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-tt .key { flex: none; font-size: 11px; }
.nt-tq { padding: 6px 10px; border-radius: 9px; background: rgba(var(--ink-rgb), .05); font-size: 13px; }
.nt-tacts { display: flex; gap: 8px; margin-top: 2px; }
.nt-tx { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.nt-tx:hover { background: var(--hover-solid); color: var(--ink); }

/* переключатель (наш, не браузерный): настройки уведомлений */
.tg { position: relative; flex: none; width: 36px; height: 21px; padding: 0; border: 0; border-radius: 11px; background: rgba(var(--ink-rgb), .18); cursor: pointer; transition: background .2s; }
.tg i { position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--rail-ease); }
.tg.on { background: var(--accent); } .tg.on i { transform: translateX(15px); }
.tg.locked { opacity: .55; cursor: default; }
/* профиль → «Уведомления»: таблица событий слева, звук и наблюдение справа (макет ТЗ-09, вариант 5) */
.ns-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ns-main { padding-top: 8px; padding-bottom: 8px; }
.ns-t td, .ns-t th { padding-top: 10px; padding-bottom: 10px; } .ns-t .c { text-align: center; width: 140px; }
.ns-g td { background: rgba(var(--ink-rgb), .03); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); padding-top: 8px; padding-bottom: 8px; }
.ns-side { display: grid; gap: 14px; } .ns-side .card { margin: 0; } .ns-side h3 { margin: 0 0 4px; }
/* Slack (2026-10-21): выключили «Присылать в Slack» — колонка событий бледнеет (переключатели остаются рабочими) */
.ns-page:has([data-nt-pref="notify:slack"]:not(.on)) .ns-t .c-slack .tg { opacity: .4; }
.ns-slack-who { margin: 10px 0 12px; color: var(--muted); } .ns-slack-who b { color: var(--ink); font-weight: 600; }
.ns-slack-miss { color: var(--warn); }
/* две колонки переключателей (приложение и Slack) на телефоне: уже, подписи переносятся — таблица в экран */
@media (max-width: 600px) {
  .ns-t .c { width: 64px; } .ns-t th.c { white-space: normal; font-size: 10px; line-height: 1.3; }
  .ns-t td, .ns-t th { padding-left: 8px; padding-right: 8px; }
}
.ns-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; } .ns-line .tg { margin-left: auto; }
.ns-narrow { max-width: 720px; }
@media (max-width: 991px) { .ns-page { grid-template-columns: minmax(0, 1fr); } }
/* «Вид уведомления»: переключатели слева, справа колокольчик-превью, как в онбординге */
.ns-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; margin-bottom: 20px; }
.ns-view h3 { margin: 0 0 4px; } .ns-view-set > p { margin: 0 0 6px; }
.ns-view .ns-line { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--border); }
.ns-view .ns-line:last-child { border-bottom: 0; }
.ns-view .ns-line > span { display: grid; gap: 1px; min-width: 0; } .ns-view .ns-line b { font-weight: 600; }
.ns-lock { color: var(--warn); }
.ns-view-l { display: block; margin: 0 0 8px 2px; font-size: 12.5px; font-weight: 650; color: var(--faint); }
.ns-bell { border: 1px solid var(--border-strong); border-radius: 16px; background: var(--card-solid); box-shadow: var(--shadow-lg); overflow: hidden; }
.ns-bell-h { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-family: var(--head); font-size: 14.5px; }
.ns-bell-n { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 11.5px var(--head); text-align: center; }
.ns-bell-list { padding: 4px 6px 6px; }
.ns-bell .nt { pointer-events: none; }            /* как в окне колокольчика, только без нажатий и кнопок справа */
.ns-bell .nt-acts { display: none; }
@media (max-width: 991px) { .ns-view { grid-template-columns: minmax(0, 1fr); } }   /* не «1fr» — не шире экрана */

/* сообщение, к которому пришли из уведомления */
.flash-target, .msg:target { animation: flash-target 2.4s ease; }
@keyframes flash-target { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } 100% { box-shadow: 0 0 0 6px transparent; } }

/* поля поиска без браузерного оформления и крестика очистки (свои элементы, не браузерные) */
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

.upper { text-transform: uppercase; }
