/* Оформление кабинета повторяет сайт ofoms.ru: те же цвета, шрифты (Golos Text, Unbounded) и скругления. */
:root { --ink: #0e2433; --muted: #4a6375; --line: #d9e4ec; --line-2: #c3d3de; --bg: #eef3f7; --card: #fff;
  --brand: #0b5394; --brand-strong: #0a4378; --deep: #07355f; --night: #062742; --accent: #18a7c9; --green: #2fa371;
  --aurora: linear-gradient(108deg, #18a7c9 0%, #2fa371 58%, #92d36e 100%); --chip: #e3eef8; --warn: #8a5a00;
  --font: "Golos Text", "Segoe UI", Tahoma, sans-serif; --display: "Unbounded", "Golos Text", sans-serif;
  --r: 14px; --r-lg: 22px; --shadow: 0 1px 2px rgba(7, 53, 95, .06), 0 8px 28px -12px rgba(7, 53, 95, .18); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(24, 167, 201, .55); outline-offset: 2px; }
.shell { width: min(100% - 32px, 1120px); margin-inline: auto; }

/* Шапка — как на сайте: белая, липкая, с цветной линией снизу. */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: var(--aurora); }
.top .shell { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; line-height: 1.2; }
.brand img { width: 44px; height: auto; flex: none; }
.brand b { display: block; font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand small { display: block; font-size: .8rem; color: var(--muted); }
.top nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .93rem; }
.top nav a, .top .link { padding: 7px 13px; border-radius: 99px; color: var(--ink); font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.top nav a:hover, .top .link:hover { background: var(--chip); color: var(--brand-strong); }
.top form { margin: 0; }
.who { margin-right: 8px; padding: 5px 12px; border-radius: 99px; background: var(--chip); color: var(--brand-strong); font-size: .85rem; font-weight: 600; }

/* Полоса заголовка — тот же тёмно-синий градиент, что у страниц сайта. */
.hero { position: relative; overflow: hidden; padding: 30px 0 34px; color: #fff;
  background: radial-gradient(700px 300px at 90% -40%, rgba(24, 167, 201, .38), transparent 60%),
    radial-gradient(520px 260px at -6% 130%, rgba(47, 163, 113, .3), transparent 60%),
    linear-gradient(150deg, var(--night), var(--deep) 70%, var(--brand-strong)); }
.hero h1 { color: #fff; margin: 0 0 8px; }
.hero p { margin: 0 0 6px; max-width: 78ch; }
.hero .muted { color: #cfe2f0; }
.hero a { color: #fff; }
.hero .back { margin-bottom: 12px; font-size: .92rem; }
.hero .back a { opacity: .85; text-decoration: none; }
.hero .back a:hover { opacity: 1; text-decoration: underline; }
.hero .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.eyebrow { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #8fd6e8; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 20px; }
.tiles a { display: block; padding: 14px 16px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08);
  text-decoration: none; font-size: .9rem; line-height: 1.3; transition: background .15s, transform .15s; }
.tiles a:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.tiles b { display: block; margin-bottom: 4px; font: 600 1.6rem/1.1 var(--display); }
.tiles a.go { background: var(--aurora); border-color: transparent; color: #062a35; font-weight: 700; }

main { padding: 26px 0 56px; }
h1 { font: 600 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 12px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin: 0 0 20px; box-shadow: var(--shadow); }
.narrow { max-width: 440px; margin: 5vh auto 0; padding: 32px; }
.narrow .mark { display: block; margin: 0 0 14px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--muted); }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-divider span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 11px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:first-child > td, tr:first-child > th { border-top: 0; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
tr:has(> td):hover { background: #f6fafc; }
.r { text-align: right; white-space: nowrap; }
tr.off { opacity: .5; }
label { display: block; font-weight: 600; margin: 0 0 16px; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; font: inherit; color: inherit;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(24, 167, 201, .2); }
/* Панель действий прилипает к низу экрана: на длинной странице кнопка сохранения всегда под рукой. */
.bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  margin: 20px -24px -24px; padding: 14px 24px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -10px 22px -14px rgba(7, 53, 95, .4); }
.bar .cancel { margin-left: auto; }
.help { margin: 0 0 20px; padding: 16px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.help summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; color: var(--brand-strong); }
.help[open] { background: linear-gradient(180deg, #f1f9fc, #fff 70%); border-color: #bfe0ea; }
ol.steps { counter-reset: st; list-style: none; padding: 0; margin: 16px 0 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; }
ol.steps li { counter-increment: st; position: relative; padding: 2px 0 2px 48px; min-height: 36px; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--aurora); color: #062a35; font: 600 .95rem var(--display); display: grid; place-items: center; }
.lead { margin: -4px 0 14px; font-size: .93rem; }
.filter { max-width: 420px; margin: 0 0 10px; border-radius: 99px; padding-left: 18px; }
.ext { margin-left: 8px; font-size: .86rem; white-space: nowrap; }
dialog.paste { width: min(720px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 26px; border: 0; border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -20px rgba(6, 39, 66, .6); color: var(--ink); }
dialog.paste::backdrop { background: rgba(6, 39, 66, .55); backdrop-filter: blur(3px); }
dialog.paste h2 { font: 600 1.25rem var(--display); }
.pastebox { min-height: 180px; max-height: 42vh; overflow: auto; margin: 12px 0 14px; padding: 12px 14px; border: 2px dashed #9cc9d8;
  border-radius: var(--r); background: #f5fafc; }
.pastebox:focus { outline: 0; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(24, 167, 201, .2); }
.pastebox:empty::before { content: "Вставьте или напечатайте текст здесь"; color: var(--muted); }
.field { margin: 0 0 16px; }
.hint { margin: 8px 0 12px; padding: 12px 16px; border-radius: var(--r); border-left: 4px solid var(--accent); background: #eef7fa; color: #2c4658; font-size: .93rem; }
iframe.inline { display: block; width: 100%; min-height: 240px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 22px; border: 0;
  border-radius: var(--r); background: var(--brand); color: #fff; font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { background: var(--brand-strong); transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(7, 53, 95, .6); }
.btn:active { transform: none; }
.btn.small { min-height: 36px; padding: 6px 16px; font-size: .9rem; border-radius: 99px; }
.btn.ghost { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn.ghost:hover { background: var(--chip); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
td .link { margin-left: 10px; font-size: .9rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1 1 260px; margin: 0; }
.badge { display: inline-block; min-width: 28px; padding: 2px 10px; border-radius: 99px; background: var(--chip); color: var(--brand-strong);
  font: 700 .8rem var(--font); letter-spacing: 0; text-align: center; vertical-align: middle; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 99px; background: #fff3d6; color: var(--warn); font-size: .8rem; font-weight: 600; }
.flash { margin: 0 0 20px; padding: 13px 18px; border-radius: var(--r); background: var(--chip); border: 1px solid #b9d2ec; color: var(--brand-strong); font-weight: 600; }
.warn { display: block; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r); background: #fff6e0; border: 1px solid #f0d89a; color: var(--warn); font-weight: 400; }
.was { color: #8a1f1f; } .now { color: #14602b; }
code { padding: 2px 8px; border-radius: 6px; background: var(--chip); font-size: 1.05em; }
.diff { overflow-x: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.pair.head { border-top: 0; padding-top: 0; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pair .was, .pair .now { color: var(--ink); }
del { background: #f9d7d7; color: #7a1717; text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
ins { background: #d9f2de; color: #14602b; text-decoration: none; border-radius: 3px; padding: 0 2px; }
.diff_add { background: #d9f2de; } .diff_chg { background: #fff1b8; } .diff_sub { background: #f9d7d7; }
/* Карта сайта: разделы меню, в каждом — группы колонками, как в меню самого сайта. */
.sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sec > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.sec:not([open]) > summary::after { transform: rotate(-90deg); }
.sec > summary:hover h3 { background: var(--brand-strong); }
.sec[open] > summary { margin-bottom: 12px; }
.sec h3 { display: inline-block; margin: 0; padding: 4px 14px; border-radius: 99px; background: var(--night); color: #fff; font: 600 .82rem var(--display); letter-spacing: .02em; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; align-items: start; }
.grp { border: 1px solid var(--line); border-radius: var(--r); background: #f8fbfd; overflow: hidden; }
.grp h4 { margin: 0; padding: 10px 16px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); background: var(--chip); }
.pg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; transition: background .15s; }
.pg:first-child { border-top: 0; }
.pg:hover { background: #f1f8fb; }
.pg b { line-height: 1.35; }
.pg .btn { flex: none; }
.meta { display: block; margin-top: 3px; font-size: .82rem; color: var(--muted); }
.meta .ext { margin: 0; font-size: inherit; }
/* Широкие сводные таблицы прокручиваются на узком экране. */
.card:has(> table th) { overflow-x: auto; }
td b { font-weight: 700; }
/* Телефон: шапка в одну-две строки, панель действий — по ширине карточки. */
@media (max-width: 640px) {
  .pair { grid-template-columns: 1fr; gap: 6px; } .pair.head { display: none; }
  td, th { padding: 9px 4px; } .r { white-space: normal; }
  .card { padding: 16px; border-radius: var(--r); } .narrow { padding: 22px; margin-top: 0; }
  .top .shell { padding: 8px 0; }
  .brand img { width: 36px; } .brand small { display: none; }
  .top nav { gap: 0; font-size: .88rem; margin-inline: -8px; } .top nav a, .top .link { padding: 6px 9px; }
  .who { display: none; }
  .hero { padding: 20px 0 24px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; } .tiles a.go { grid-column: 1 / -1; }
  .bar { margin: 16px -16px -16px; padding: 10px 16px; border-radius: 0 0 var(--r) var(--r); }
  .bar .btn { flex: 1 1 auto; }
  .bar .cancel { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.tiles a[data-tab] { cursor: pointer; }
.tiles a.on { background: #fff; color: var(--night); border-color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.sec { margin-top: 14px; padding-top: 14px; }
/* Карта сайта — компактный список: одна страница в одной строке. */
.map .grp { border: 0; background: none; border-radius: 0; overflow: visible; margin: 0 0 10px; }
.map .grp h4 { padding: 6px 0 4px; background: none; font-size: .74rem; color: var(--muted); }
.map .pg { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 4px 16px; padding: 9px 10px; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.map .grp h4 + .pg { border-top-color: var(--line-2); }
.map .pg:hover { background: #f1f8fb; }
.map .t a { font-weight: 700; color: var(--ink); text-decoration: none; }
.map .t a:hover { color: var(--brand); text-decoration: underline; }
.map .t small { display: block; color: var(--muted); font-size: .8rem; }
.map .o { width: 210px; color: var(--muted); font-size: .85rem; line-height: 1.3; }
.map .d { width: 112px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.map .ext { margin: 0; font-size: .85rem; }
.map .btn.small { min-height: 32px; padding: 4px 14px; font-weight: 600; }
.sec[open] { padding-bottom: 6px; }
@media (max-width: 760px) { .map .pg { grid-template-columns: minmax(0, 1fr) auto; } .map .o, .map .d { grid-column: 1; width: auto; } .map .ext { grid-column: 1; } .map .btn { grid-column: 2; grid-row: 1; } }
iframe.preview { min-height: 90px; border-style: dashed; }
.btn.ghost.danger { color: #a82c2c; box-shadow: inset 0 0 0 1.5px #c43e3e; }
.btn.ghost.danger:hover { background: #fdeaea; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.top nav a[aria-current="page"] { background: var(--night); color: #fff; }
/* Разделы администратора: поиск, список, листание. */
select { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; font: inherit; color: inherit; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.find { margin-bottom: 14px; } .find select { width: auto; margin: 0; flex: 0 0 auto; } .find input { margin: 0; }
.pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 18px 0 0; }
.btn.aurora { background: var(--aurora); color: #062a35; }
.hero .btn.aurora:hover { background: var(--aurora); filter: brightness(1.06); }
.upload { padding: 16px 18px; border: 2px dashed #9cc9d8; border-radius: var(--r); background: #f5fafc; }
.upload input[type=file] { border: 0; padding: 6px 0; background: none; }
.upload progress { display: block; width: 100%; height: 10px; margin-top: 8px; accent-color: var(--accent); }
.upstate { margin: 8px 0 0; font-weight: 600; color: #14553a; } .upstate.bad { color: #a82c2c; }
.danger-zone { border-color: #efc4c4; background: #fffafa; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; } .check input { width: auto; margin: 0; }
/* Телефон: таблицы с шапкой — карточками, без прокрутки вбок. */
@media (max-width: 640px) {
  .card:has(> table.stack) { overflow-x: visible; }
  table.stack, table.stack tbody, table.stack tr { display: block; }
  table.stack tr:has(> th) { display: none; }
  table.stack tr { padding: 12px 0; border-top: 1px solid var(--line); }
  table.stack tr:nth-child(2) { border-top: 0; }
  table.stack td { display: inline-block; border: 0; padding: 0; margin: 3px 14px 0 0; vertical-align: top; font-size: .92rem; }
  table.stack td:first-child { display: block; margin: 0 0 4px; font-size: 1rem; }
  table.stack td[data-l]:not(:first-child)::before { content: attr(data-l) ": "; color: var(--muted); font-size: .8rem; text-transform: lowercase; }
  table.stack td.r { display: block; margin-top: 8px; text-align: left; }
  table.stack td.r::before { content: none !important; }
  table.stack tr:has(> td):hover { background: none; }
  .hero p.muted { font-size: .92rem; line-height: 1.45; }
  .hero h1 { font-size: 1.35rem; }
  .filter { max-width: none; }
  .find { gap: 8px; } .find input { flex: 1 1 100%; }
  .map .pg .btn.small { align-self: start; }
  .tiles b { font-size: 1.3rem; }
}
h2 .add { float: right; font-weight: 600; }

/* ---------- Оформление и движение (07.10.2026) ---------- */
.ic { width: 22px; height: 22px; flex: none; vertical-align: -4px; margin-right: 8px; }
h1 .ic { width: 30px; height: 30px; vertical-align: -5px; margin-right: 10px; color: #8fd6e8; }
h2 .ic { color: var(--accent); }
/* плитки разделов: значок, число, название, пояснение */
.tiles a { position: relative; padding: 16px 16px 14px; overflow: hidden; }
.tiles a .ic { display: block; margin: 0 0 10px; width: 26px; height: 26px; color: #8fd6e8; transition: transform .2s, color .2s; }
.tiles a span { display: block; font-weight: 700; }
.tiles a small { display: block; margin-top: 2px; font-size: .8rem; opacity: .75; }
.tiles a:hover .ic { transform: scale(1.12) rotate(-4deg); color: #fff; }
.tiles a.on .ic { color: var(--brand); }
.tiles a.on small { opacity: .7; }
.tiles a::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--aurora); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.tiles a:hover::after, .tiles a.on::after { transform: scaleX(1); }
.tiles a.go .ic, .tiles a.go::after { display: none; }
/* блоки появляются мягко и по очереди */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hero .shell > * { animation: rise .45s both; }
.hero .shell > *:nth-child(2) { animation-delay: .05s; } .hero .shell > *:nth-child(3) { animation-delay: .1s; } .hero .shell > *:nth-child(4) { animation-delay: .15s; }
.tiles a { animation: rise .45s both; }
.tiles a:nth-child(1) { animation-delay: .08s; } .tiles a:nth-child(2) { animation-delay: .13s; } .tiles a:nth-child(3) { animation-delay: .18s; }
.tiles a:nth-child(4) { animation-delay: .23s; } .tiles a:nth-child(5) { animation-delay: .28s; } .tiles a:nth-child(n+6) { animation-delay: .33s; }
main > * { animation: rise .45s both; }
main > *:nth-child(1) { animation-delay: .1s; } main > *:nth-child(2) { animation-delay: .16s; } main > *:nth-child(3) { animation-delay: .22s; } main > *:nth-child(n+4) { animation-delay: .28s; }
main > form.card { animation-name: fade; }                         /* у формы закреплённая панель — её нельзя сдвигать */
.flash { animation: drop .4s both; border-left: 4px solid var(--accent); }
details[open] > *:not(summary) { animation: fade .3s both; }
dialog.paste[open] { animation: rise .25s both; }
/* кнопки и строки отзываются на нажатие */
.btn:active { transform: scale(.97); }
.btn.small:hover { box-shadow: 0 6px 14px -8px rgba(7, 53, 95, .7); }
.map .pg, table tr { transition: background .15s; }
.map .pg:hover .t a { color: var(--brand); }
.card { transition: box-shadow .2s, border-color .2s; }
.card:focus-within { border-color: #bfe0ea; box-shadow: 0 2px 4px rgba(7, 53, 95, .08), 0 18px 40px -18px rgba(7, 53, 95, .32); }
label:focus-within { color: var(--brand-strong); }
/* полоса хода под шапкой при переходе и сохранении */
@keyframes run { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
body.busy .top::after { background: linear-gradient(90deg, transparent, #18a7c9, #92d36e, transparent); animation: run 1s linear infinite; }
/* отсчёт публикации после сохранения */
.publish { margin: 10px 0 0; height: 6px; border-radius: 99px; background: rgba(11, 83, 148, .14); overflow: hidden; }
.publish i { display: block; height: 100%; width: 100%; background: var(--aurora); transform-origin: left; animation: grow 18s linear both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.flash .after { display: block; margin-top: 6px; font-weight: 400; font-size: .9rem; color: var(--muted); }
.flash.done { border-left-color: var(--green); background: #e2f3ea; border-color: #b4dcc6; color: #14553a; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
/* Учётные записи: люди по подразделениям */
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stats .stat { appearance: none; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: inherit; font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.stats .stat:hover, .stats .stat:focus-visible { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .36); transform: translateY(-1px); }
.stats .stat.is-active { background: #fff; border-color: #fff; color: var(--night); box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .7); }
.stats b { font: 600 1rem var(--display); margin-right: 4px; }
.person { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 12px 8px; border-top: 1px solid var(--line); transition: background .15s; }
.person:hover { background: #f1f8fb; }
.person.off { opacity: .6; }
.ava { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--chip); color: var(--brand-strong); font: 600 .82rem var(--display); }
.pn b { display: block; line-height: 1.3; } .pn small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; } .pn .mail { color: var(--brand); }
.chip { padding: 3px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: #eef2f6; color: var(--muted); }
.chip.ok { background: #e2f3ea; color: #14553a; } .chip.wait { background: #fff3d6; color: var(--warn); } .chip.off { background: #fdeaea; color: #8a1f1f; }
.acts { display: flex; gap: 8px; margin: 0; } .acts .btn.small { min-height: 32px; padding: 4px 12px; font-size: .84rem; }
@media (max-width: 760px) {
  .person { grid-template-columns: 44px minmax(0, 1fr); }
  .person .chip { grid-column: 2; justify-self: start; } .person .acts { grid-column: 2; }
}

/* ---------- Боковое меню, поиск, рабочий стол (07.10.2026) ---------- */
.top { z-index: 30; }
.top .shell { width: auto; margin: 0; padding: 10px 20px; }
.burger { display: none; padding: 6px 12px; border-radius: 10px; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.kbtn { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff;
  color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.kbtn:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(24, 167, 201, .15); }
.kbtn .ic { width: 18px; height: 18px; margin: 0; } kbd { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); font: 600 .72rem var(--font); }
.side { position: fixed; z-index: 25; top: 67px; bottom: 0; left: 0; width: 248px; overflow-y: auto; padding: 14px 12px 24px; background: #fff; border-right: 1px solid var(--line); }
.side p { margin: 18px 12px 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.side a { display: flex; align-items: center; padding: 9px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.25; text-decoration: none;
  transition: background .15s, color .15s, transform .15s; }
.side a .ic { width: 20px; height: 20px; margin-right: 10px; color: var(--muted); transition: color .15s, transform .2s; }
.side a:hover { background: var(--chip); color: var(--brand-strong); transform: translateX(2px); } .side a:hover .ic { color: var(--brand); transform: scale(1.1); }
.side a[aria-current="page"] { background: var(--night); color: #fff; } .side a[aria-current="page"] .ic { color: #8fd6e8; }
.content.with-side { margin-left: 248px; }
.shade { display: none; }
@media (max-width: 1000px) {
  .burger { display: inline-block; }
  .kbtn span, .kbtn kbd { display: none; } .kbtn { padding: 7px 9px; margin-right: 4px; }
  .content.with-side { margin-left: 0; }
  .side { top: 0; transform: translateX(-102%); transition: transform .25s; box-shadow: 0 0 40px rgba(6, 39, 66, .35); padding-top: 22px; z-index: 40; }
  .navtoggle:checked ~ .side { transform: none; }
  .navtoggle:checked ~ .shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(6, 39, 66, .5); }
}
/* окно поиска */
dialog.kdlg { width: min(640px, calc(100% - 24px)); margin-top: 12vh; padding: 14px; border: 0; border-radius: var(--r-lg); box-shadow: 0 30px 80px -20px rgba(6, 39, 66, .7); }
dialog.kdlg::backdrop { background: rgba(6, 39, 66, .55); backdrop-filter: blur(3px); }
dialog.kdlg[open] { animation: rise .2s both; }
.kdlg input { margin: 0; font-size: 1.05rem; padding: 13px 16px; }
.kres { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.kres a { display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.kres a small { flex: none; width: 150px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kres a.cur, .kres a:hover { background: var(--chip); color: var(--brand-strong); }
.kres p { margin: 14px 12px; color: var(--muted); } .khint { margin: 10px 4px 0; font-size: .8rem; }
/* рабочий стол */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpis a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.kpis a:hover { transform: translateY(-3px); border-color: #bfe0ea; box-shadow: 0 2px 4px rgba(7, 53, 95, .08), 0 22px 44px -20px rgba(7, 53, 95, .35); }
.kpis b { display: block; font: 600 1.9rem/1.1 var(--display); color: var(--brand-strong); } .kpis span { font-size: .86rem; color: var(--muted); }
.feed a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background .15s; }
.feed a:first-child { border-top: 0; } .feed a:hover { background: #f1f8fb; }
.feed .ava { width: 34px; height: 34px; } .feed time { color: var(--muted); font-size: .82rem; white-space: nowrap; } .feed em { color: var(--muted); font-style: normal; font-size: .85rem; }
@media (max-width: 640px) { .feed a { grid-template-columns: 34px minmax(0, 1fr); } .feed time { grid-column: 2; } .kres a { flex-direction: column; gap: 0; } .kres a small { width: auto; } }
/* Телефон: нижняя панель правки — компактно: «Сохранить» во всю ширину, остальные кнопки в один ряд. */
@media (max-width: 640px) {
  .bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
  .bar .btn { min-height: 40px; padding: 6px 6px; font-size: .82rem; line-height: 1.15; text-align: center; }
  .bar > .btn:first-child { grid-column: 1 / -1; min-height: 46px; font-size: 1rem; }
  .bar .muted { grid-column: 1 / 3; font-size: .85rem; }
  .bar .cancel { grid-column: 3; justify-self: end; margin: 0; font-size: .9rem; }
}
/* Телефон: строка списка — цельная карточка: название во всю ширину и не длиннее двух строк, вместо кнопки стрелка. */
@media (max-width: 760px) {
  .map .pg { position: relative; display: block; padding: 12px 34px 12px 4px; }
  .map .pg::after { content: "›"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--line-2); }
  .map .pg .t a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .96rem; line-height: 1.3; }
  .map .pg .t a::before { content: ""; position: absolute; inset: 0; }          /* нажимается вся строка */
  .map .pg .t small { margin-top: 3px; }
  .map .pg > .btn.small { display: none; }
  .map .pg .o, .map .pg .d, .map .pg > .ext { display: inline-block; width: auto; margin: 4px 12px 0 0; font-size: .8rem; position: relative; z-index: 1; }
  .map .pg > span:empty { display: none; }
  .map .pg .tag { position: relative; z-index: 1; }
  .sec h3 { font-size: .76rem; }
  section.card > table:not(.stack) td { display: block; padding: 2px 0; } section.card > table:not(.stack) tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  section.card > table:not(.stack) td.r { text-align: left; margin-top: 6px; }
  h2 .add { float: none; display: inline-flex; margin-left: 8px; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
}
.map .t small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map .t small:empty { display: none; }
/* Настройка подразделений и учёток */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; margin-top: 8px; }
.checks.tall { max-height: 320px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #f8fbfd; }
.checks .check { font-weight: 500; padding: 5px 6px; border-radius: 8px; align-items: baseline; flex-wrap: wrap; transition: background .12s; }
.checks .check:hover { background: var(--chip); } .checks .check:has(input:checked) { background: #e2f3ea; }
.checks small { font-size: .78rem; }
.addbox > summary { cursor: pointer; font-weight: 800; color: var(--brand-strong); } .addbox[open] > summary { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
/* Рабочий стол: разделы — компактной лентой (подробное меню теперь сбоку). */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.tiles a { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon count" "icon label"; align-items: center; column-gap: 10px; row-gap: 2px; min-height: 58px; padding: 10px 13px; border-radius: 12px; font-size: .9rem; animation-duration: .3s; }
.tiles a .ic { grid-area: icon; display: block; width: 20px; height: 20px; margin: 0; }
.tiles a b { grid-area: count; display: block; margin: 0; font: 600 1.08rem/1 var(--display); }
.tiles a span { grid-area: label; display: block; font-size: .82rem; font-weight: 600; line-height: 1.2; }
.tiles a small { display: none; }
.tiles a::after { display: none; }
.tiles a:hover { transform: translateY(-1px); }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpis a { padding: 14px 16px; } .kpis b { font-size: 1.6rem; }
@media (max-width: 760px) {
  .tiles { flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tiles::-webkit-scrollbar { display: none; }
  .tiles a { flex: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis a { padding: 12px 14px; border-radius: var(--r); } .kpis b { font-size: 1.35rem; } .kpis span { font-size: .78rem; line-height: 1.3; display: block; }
  ol.steps { grid-template-columns: 1fr; }
}
/* Окна создания */
.toolbar { margin: 0 0 16px; }
dialog.modal { width: min(600px, calc(100% - 24px)); padding: 26px; border: 0; border-radius: var(--r-lg); box-shadow: 0 30px 80px -20px rgba(6, 39, 66, .7); color: var(--ink); }
dialog.modal::backdrop { background: rgba(6, 39, 66, .55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: rise .22s both; }
dialog.modal h2 { font: 600 1.25rem var(--display); margin-bottom: 16px; }
dialog.modal form.row input { flex: 1 1 100%; }
dialog.modal .closer { margin: 14px 0 0; }
/* Группы (отделы, разделы меню): лёгкая строка вместо тёмной «таблетки» */
.sec { margin-top: 8px; padding: 0; border-top: 0; }
.sec > summary { padding: 12px 14px; border-radius: 14px; background: #f4f8fb; transition: background .15s; }
.sec > summary:hover, .sec[open] > summary { background: var(--chip); }
.sec[open] > summary { margin-bottom: 6px; }
.sec h3, .sec > summary:hover h3 { background: none; color: var(--ink); padding: 0; font: 700 1rem var(--font); letter-spacing: 0; }
.sec[open] { padding-bottom: 10px; }
.sec .badge { background: #fff; }
.person { padding: 12px 10px; border-radius: 12px; border-top-color: transparent; }
.person + .person { border-top-color: var(--line); border-radius: 0; }
@media (max-width: 760px) { .stats .stat { font-size: .8rem; padding: 5px 11px; } .sec h3 { font-size: .95rem; } dialog.modal { padding: 20px; } }
/* Телефон: разделы на рабочем столе — сеткой в две колонки, без прокрутки вбок. */
@media (max-width: 760px) {
  .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex-wrap: wrap; overflow: visible; margin: 14px 0 0; padding: 0; }
  .tiles a { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 0 10px; padding: 10px 12px; border-radius: 14px; flex: initial; }
  .tiles a .ic { grid-row: 1 / 3; width: 22px; height: 22px; }
  .tiles a b { font-size: 1.05rem; line-height: 1.1; }
  .tiles a span { font-size: .8rem; font-weight: 500; line-height: 1.25; opacity: .9; }
}
/* Шапка: всё на одной линии; на телефоне — три одинаковые круглые кнопки со значками. */
.top nav { align-items: center; gap: 8px; margin: 0; }
.top .out { display: inline-flex; align-items: center; gap: 6px; } .top .out .ic { width: 18px; height: 18px; margin: 0; }
.burger .ic { width: 22px; height: 22px; margin: 0; display: block; }
@media (max-width: 1000px) {
  .top .shell { flex-wrap: nowrap; }
  .top nav { gap: 8px; margin: 0; flex-wrap: nowrap; }
  .burger, .kbtn, .top .out { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; margin: 0; border: 1px solid var(--line-2); border-radius: 50%;
    background: #fff; color: var(--ink); line-height: 1; cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
  .burger:active, .kbtn:active, .top .out:active { transform: scale(.94); }
  .top .out span, .kbtn span, .kbtn kbd { display: none; }
  .kbtn .ic, .top .out .ic { width: 20px; height: 20px; }
  .top form { display: flex; }
  .burger { border-color: var(--night); background: var(--night); color: #fff; }
}

/* ---------- Больше движения (07.10.2026) ---------- */
/* живой отлив в синей полосе — как на главной странице сайта */
.hero::before { content: ""; position: absolute; inset: -60% -20% auto; height: 170%; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(24, 167, 201, .2) 42%, rgba(146, 211, 110, .16) 52%, rgba(47, 163, 113, .14) 60%, transparent 75%);
  filter: blur(34px); transform: rotate(-7deg); animation: aurora 14s ease-in-out infinite alternate; }
@keyframes aurora { from { transform: translateX(-12%) rotate(-7deg); } to { transform: translateX(12%) rotate(-4deg); } }
.hero .shell { position: relative; }
/* блоки ниже экрана проявляются при прокрутке */
.reveal { opacity: 0; transform: translateY(18px); animation: none !important; transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
main > form.card.reveal { transform: none; }
/* строки списков появляются по очереди */
.map .pg, .person, .feed a, table.stack tr, .checks .check { animation: rise .35s both; }
.map .pg:nth-child(2), .person:nth-child(3), .feed a:nth-child(2) { animation-delay: .03s; }
.map .pg:nth-child(3), .person:nth-child(4), .feed a:nth-child(3) { animation-delay: .06s; }
.map .pg:nth-child(4), .person:nth-child(5), .feed a:nth-child(4) { animation-delay: .09s; }
.map .pg:nth-child(5), .person:nth-child(6), .feed a:nth-child(5) { animation-delay: .12s; }
.map .pg:nth-child(6), .person:nth-child(7), .feed a:nth-child(6) { animation-delay: .15s; }
.map .pg:nth-child(7), .feed a:nth-child(7) { animation-delay: .18s; }
.map .pg:nth-child(n+8), .feed a:nth-child(n+8) { animation-delay: .21s; }
.side a { animation: rise .35s both; }
.side a:nth-of-type(2) { animation-delay: .03s; } .side a:nth-of-type(3) { animation-delay: .06s; } .side a:nth-of-type(4) { animation-delay: .09s; }
.side a:nth-of-type(5) { animation-delay: .12s; } .side a:nth-of-type(6) { animation-delay: .15s; } .side a:nth-of-type(n+7) { animation-delay: .18s; }
/* блик по кнопке при наведении */
.btn { position: relative; overflow: hidden; }
.btn:not(.ghost)::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .5s; pointer-events: none; }
.btn:not(.ghost):hover::after { left: 120%; }
/* отклик карточек, значков и кружков */
.kpis a b { transition: color .2s, transform .2s; display: inline-block; } .kpis a:hover b { color: var(--accent); transform: scale(1.06); }
.tiles a { transition: background .2s, transform .2s, box-shadow .2s; } .tiles a:active { transform: scale(.97); }
.ava { transition: transform .2s, background .2s; } .person:hover .ava, .feed a:hover .ava { transform: scale(1.1) rotate(-4deg); background: #cfe6f5; }
.sec > summary h3 { transition: transform .2s; } .sec > summary:hover h3 { transform: translateX(3px); }
.chip, .tag, .badge { transition: transform .15s; } .person:hover .chip { transform: scale(1.04); }
input[type=checkbox] { accent-color: var(--brand); transition: transform .12s; } input[type=checkbox]:checked { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(1.3); } }
.brand img { transition: transform .4s; } .brand:hover img { transform: rotate(-8deg) scale(1.06); }
.burger .ic, .kbtn .ic, .top .out .ic { transition: transform .2s; } .kbtn:hover .ic { transform: scale(1.15) rotate(-8deg); } .top .out:hover .ic { transform: translateX(2px); }
/* переход на другую страницу: текущая чуть гаснет, пока грузится следующая */
main, .hero { transition: opacity .25s; } body.busy main, body.busy .hero { opacity: .55; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- Журнал лентой ---------- */
.jday h3 { margin: 18px 0 6px; font: 700 .8rem var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.jday:first-of-type h3 { margin-top: 4px; }
.jrow { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 12px 10px; border-top: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; transition: background .15s, transform .15s; animation: rise .35s both; }
.jrow:hover { background: var(--hover); transform: translateX(2px); }
.jmain { display: block; min-width: 0; } .jwho, .jwhat { display: block; } .jwhat { margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.jwhat .ic { width: 18px; height: 18px; color: var(--accent); margin-right: 6px; }
.jmain small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.jrow time { color: var(--muted); font-size: .85rem; white-space: nowrap; padding-top: 2px; }
.act { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--chip); color: var(--brand-strong); }
.act.new { background: #e2f3ea; color: #14553a; } .act.del { background: #fdeaea; color: #8a1f1f; } .act.back { background: #fff3d6; color: var(--warn); }
.empty { display: flex; align-items: center; gap: 10px; padding: 26px 10px; color: var(--muted); } .empty .ic { width: 28px; height: 28px; }
.btn .ic { width: 18px; height: 18px; margin-right: 6px; }
.themebtn { display: flex; align-items: center; width: 100%; margin-top: 14px; padding: 9px 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: none; color: var(--muted);
  font: 600 .9rem var(--font); cursor: pointer; transition: background .15s, color .15s; }
.themebtn:hover { background: var(--chip); color: var(--brand-strong); } .themebtn .ic { width: 20px; height: 20px; margin-right: 10px; transition: transform .4s; } .themebtn:hover .ic { transform: rotate(-25deg); }
:root { --hover: #f1f8fb; }

/* ---------- Тёмная тема ---------- */
:root[data-theme="dark"] { color-scheme: dark; --ink: #e4edf5; --muted: #9db2c4; --line: #21384d; --line-2: #2f4a63; --bg: #0a1826; --card: #10243a; --chip: #18364f;
  --brand: #6cb8ef; --brand-strong: #a9d6f7; --hover: #16304a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --warn: #f1c46a; }
[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
[data-theme="dark"] .top { background: rgba(13, 30, 48, .92); }
[data-theme="dark"] .side, [data-theme="dark"] .kpis a, [data-theme="dark"] .help, [data-theme="dark"] dialog.modal, [data-theme="dark"] dialog.kdlg, [data-theme="dark"] dialog.paste,
[data-theme="dark"] .bar, [data-theme="dark"] .kbtn, [data-theme="dark"] .top .out { background: var(--card); color: var(--ink); }
[data-theme="dark"] .help[open] { background: linear-gradient(180deg, #14304a, var(--card) 70%); border-color: var(--line-2); }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select, [data-theme="dark"] .pastebox { background: #0c1d2f; color: var(--ink); border-color: var(--line-2); }
[data-theme="dark"] .btn { background: #1f6fb5; } [data-theme="dark"] .btn:hover { background: #2a82cc; }
[data-theme="dark"] .btn.ghost { background: transparent; color: var(--brand-strong); box-shadow: inset 0 0 0 1.5px var(--line-2); }
[data-theme="dark"] .btn.ghost.danger { color: #ff9c9c; box-shadow: inset 0 0 0 1.5px #7d3636; } [data-theme="dark"] .btn.ghost:hover { background: var(--hover); }
[data-theme="dark"] .btn.aurora { background: var(--aurora); color: #062a35; }
[data-theme="dark"] .sec > summary, [data-theme="dark"] .checks.tall, [data-theme="dark"] .upload, [data-theme="dark"] .grp, [data-theme="dark"] .hint { background: #13293f; color: var(--ink); }
[data-theme="dark"] .sec > summary:hover, [data-theme="dark"] .sec[open] > summary, [data-theme="dark"] .map .pg:hover, [data-theme="dark"] .person:hover, [data-theme="dark"] .feed a:hover,
[data-theme="dark"] tr:has(> td):hover, [data-theme="dark"] .pg:hover { background: var(--hover); }
[data-theme="dark"] .pg, [data-theme="dark"] .map .pg { background: none; }
[data-theme="dark"] .sec .badge, [data-theme="dark"] .badge, [data-theme="dark"] .ava, [data-theme="dark"] code, [data-theme="dark"] kbd, [data-theme="dark"] .chip { background: var(--chip); color: var(--brand-strong); }
[data-theme="dark"] .tag, [data-theme="dark"] .warn, [data-theme="dark"] .chip.wait, [data-theme="dark"] .act.back { background: #3a2f12; color: #f1c46a; border-color: #5c4a1c; }
[data-theme="dark"] .flash { background: #143049; border-color: var(--line-2); color: var(--ink); } [data-theme="dark"] .flash.done, [data-theme="dark"] .chip.ok, [data-theme="dark"] .act.new,
[data-theme="dark"] .checks .check:has(input:checked) { background: #12372b; color: #9be0bd; border-color: #1f5a45; }
[data-theme="dark"] .chip.off, [data-theme="dark"] .act.del, [data-theme="dark"] .danger-zone, [data-theme="dark"] .del-note { background: #3a1818; color: #ffb1b1; border-color: #6b2c2c; }
[data-theme="dark"] .side a { color: var(--ink); } [data-theme="dark"] .side a[aria-current="page"] { background: #1f6fb5; }
[data-theme="dark"] .burger { background: #1f6fb5; border-color: #1f6fb5; }
[data-theme="dark"] a { color: var(--brand); } [data-theme="dark"] .map .t a, [data-theme="dark"] .jrow, [data-theme="dark"] .feed a, [data-theme="dark"] .kpis a, [data-theme="dark"] .brand { color: var(--ink); }
[data-theme="dark"] .kpis b, [data-theme="dark"] .help summary, [data-theme="dark"] .addbox > summary { color: var(--brand-strong); }
[data-theme="dark"] .tiles a.on { background: #e4edf5; color: #0a1826; }
[data-theme="dark"] .was { color: #ffb1b1; } [data-theme="dark"] .now { color: #9be0bd; } [data-theme="dark"] .pair .was, [data-theme="dark"] .pair .now { color: var(--ink); }
[data-theme="dark"] del { background: #4a1f1f; color: #ffc2c2; } [data-theme="dark"] ins { background: #164030; color: #b6ebcf; }
[data-theme="dark"] iframe.inline { border-color: var(--line-2); }
[data-theme="dark"] .card:focus-within { border-color: var(--line-2); }
/* Плавность у всего, на что можно нажать или навести. */
a, button, summary, input, select, textarea, label.check, .card, .badge, .tag { transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .2s ease, opacity .2s ease; }
a.ext:hover { transform: translateX(2px); display: inline-block; }
.map .pg:hover { transform: translateX(3px); }
section.card h2 .ic { transition: transform .3s; }
html { scroll-behavior: smooth; }

/* ---------- Нижняя панель на телефоне и «бенто»-карточка с кольцом ---------- */
.tabbar { display: none; }
.ringcard { grid-column: span 2; display: flex !important; align-items: center; gap: 18px; }
.ring { --p: 0; flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--chip) 0); position: relative; animation: fade .8s both; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.ring i { position: relative; font: 600 .95rem var(--display); font-style: normal; color: var(--brand-strong); }
.ringtext { display: block; font-size: 1rem; color: var(--ink) !important; } .ringtext b { display: inline !important; font-size: 1.6rem !important; }
.ringtext span { display: block; margin-top: 2px; }
@media (max-width: 1000px) {
  body { padding-bottom: 70px; }
  .tabbar { position: fixed; z-index: 32; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(7, 53, 95, .5); }
  .tabbar a, .tabbar button, .tabbar label { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--muted);
    font: 600 .7rem var(--font); text-decoration: none; cursor: pointer; }
  .tabbar .ic { width: 22px; height: 22px; margin: 0; }
  .tabbar a:active, .tabbar button:active, .tabbar label:active { transform: scale(.92); background: var(--chip); }
  .tabbar a[aria-current="page"] { color: var(--brand); } .tabbar a[aria-current="page"] .ic { transform: translateY(-2px) scale(1.1); }
  .top .burger, .top .kbtn { display: none; }                 /* на телефоне меню и поиск — в нижней панели */
  .bar { bottom: 62px; }
  [data-theme="dark"] .tabbar { background: rgba(13, 30, 48, .94); }
}

/* ---------- Карточки показателей: подпись, число, значок в квадрате (обе темы) ---------- */
.kpis a { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
.kpis a > span:not(.sq) { grid-column: 1; grid-row: 1; font-size: .8rem; }
.kpis a > b { grid-column: 1; grid-row: 2; }
.kpis .sq { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; transition: transform .25s; }
.kpis .sq .ic { width: 22px; height: 22px; margin: 0; color: #fff; }
.kpis a:hover .sq { transform: rotate(-8deg) scale(1.08); }
.ringcard { grid-template-columns: auto minmax(0, 1fr) !important; }

/* ---------- «Стекло»: основная тёмная тема (образец — тёмно-синий дашборд с синим свечением) ---------- */
:root[data-theme="dark"] { --ink: #fff; --muted: #a0aec0; --line: rgba(255, 255, 255, .09); --line-2: rgba(226, 232, 240, .22); --bg: #060b28; --card: #0b1238; --chip: rgba(255, 255, 255, .08);
  --brand: #0075ff; --brand-strong: #7fb6ff; --accent: #2cd9ff; --green: #01b574; --hover: rgba(255, 255, 255, .06); --night: #0075ff;
  --glass: linear-gradient(127deg, rgba(6, 11, 40, .94) 19%, rgba(10, 14, 35, .49) 77%); --r: 15px; --r-lg: 20px;
  --shadow: 0 20px 40px -24px rgba(0, 0, 0, .8); --aurora: linear-gradient(97deg, #0075ff, #2cd9ff); }
[data-theme="dark"] body { color: var(--ink); background: #030519 fixed;
  background-image: radial-gradient(900px 520px at 88% -8%, rgba(0, 117, 255, .42), transparent 62%), radial-gradient(700px 480px at -6% 38%, rgba(67, 24, 255, .3), transparent 60%),
    radial-gradient(900px 600px at 60% 110%, rgba(44, 217, 255, .16), transparent 60%), linear-gradient(159deg, #0f123b 14%, #090d2e 56%, #020515 86%); background-attachment: fixed; }
[data-theme="dark"] .top { background: rgba(6, 11, 40, .55); backdrop-filter: blur(24px); border-bottom-color: var(--line); }
[data-theme="dark"] .top::after { height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 117, 255, .9), rgba(44, 217, 255, .7), transparent); }
[data-theme="dark"] .brand, [data-theme="dark"] .brand small { color: #fff; } [data-theme="dark"] .brand small { opacity: .6; }
[data-theme="dark"] .who { background: var(--chip); color: #fff; }
[data-theme="dark"] .card, [data-theme="dark"] .kpis a, [data-theme="dark"] .help, [data-theme="dark"] .help[open], [data-theme="dark"] .side, [data-theme="dark"] .danger-zone {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); backdrop-filter: blur(40px); color: var(--ink); }
[data-theme="dark"] .danger-zone { border-color: rgba(255, 99, 99, .35); }
[data-theme="dark"] .card:hover { border-color: rgba(0, 117, 255, .35); }
/* боковое меню — парящая стеклянная панель, значки в скруглённых квадратах */
[data-theme="dark"] .side { top: 83px; bottom: 16px; left: 16px; width: 232px; padding: 14px 12px 18px; }
[data-theme="dark"] .content.with-side { margin-left: 264px; }
[data-theme="dark"] .side p { color: #fff; opacity: .55; }
[data-theme="dark"] .side a { color: #fff; padding: 7px 10px; border-radius: 15px; font-weight: 500; }
[data-theme="dark"] .side a .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: #1a1f37; color: var(--brand); margin-right: 12px; }
[data-theme="dark"] .side a:hover { background: rgba(255, 255, 255, .05); transform: translateX(2px); }
[data-theme="dark"] .side a[aria-current="page"] { background: #1a1f37; box-shadow: 0 10px 24px -14px rgba(0, 117, 255, .9); }
[data-theme="dark"] .side a[aria-current="page"] .ic { background: var(--brand); color: #fff; }
[data-theme="dark"] .themebtn { color: var(--muted); border-color: var(--line-2); }
/* заголовок страницы — приветственная карточка с синим свечением */
[data-theme="dark"] .hero { margin: 16px 16px 0; border-radius: var(--r-lg); border: 1px solid var(--line); padding: 26px 0 28px;
  background: radial-gradient(520px 320px at 92% 0%, rgba(44, 217, 255, .5), transparent 62%), radial-gradient(520px 360px at 70% 120%, rgba(67, 24, 255, .65), transparent 62%),
    linear-gradient(120deg, #0b1437 0%, #12287a 55%, #0075ff 100%); box-shadow: 0 30px 60px -34px rgba(0, 117, 255, .9); }
[data-theme="dark"] .hero .shell { width: auto; margin: 0 26px; }
[data-theme="dark"] .hero .muted { color: rgba(255, 255, 255, .78); }
[data-theme="dark"] .eyebrow { color: rgba(255, 255, 255, .72); }
[data-theme="dark"] main { padding-top: 20px; } [data-theme="dark"] main.shell { width: auto; margin: 0 16px; }
[data-theme="dark"] .tiles a { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); color: #fff; }
[data-theme="dark"] .tiles a:hover { background: rgba(255, 255, 255, .2); } [data-theme="dark"] .tiles a.on { background: #fff; color: #0b1437; }
[data-theme="dark"] .tiles a .ic { color: #fff; } [data-theme="dark"] .tiles a.on .ic { color: var(--brand); }
/* показатели */
[data-theme="dark"] .kpis b { color: #fff; } [data-theme="dark"] .kpis a > span:not(.sq) { color: var(--muted); }
[data-theme="dark"] .kpis .sq { background: var(--brand); box-shadow: 0 8px 20px -8px rgba(0, 117, 255, .9); }
[data-theme="dark"] .ring { background: conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); box-shadow: 0 0 30px -6px rgba(0, 117, 255, .8); }
[data-theme="dark"] .ring::before { background: #0b1238; } [data-theme="dark"] .ring i { color: #fff; }
/* формы и кнопки */
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select, [data-theme="dark"] .pastebox { background: #0f1535; color: #fff; border: 1px solid var(--line-2); border-radius: 15px; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: rgba(160, 174, 192, .8); }
[data-theme="dark"] input:focus, [data-theme="dark"] textarea:focus, [data-theme="dark"] select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 117, 255, .35); }
[data-theme="dark"] .btn { background: var(--brand); border-radius: 12px; box-shadow: 0 10px 22px -12px rgba(0, 117, 255, .95); }
[data-theme="dark"] .btn:hover { background: #2389ff; } [data-theme="dark"] .btn.small { border-radius: 10px; }
[data-theme="dark"] .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); } [data-theme="dark"] .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .btn.ghost.danger { color: #ff8f8f; box-shadow: inset 0 0 0 1px rgba(255, 99, 99, .5); }
[data-theme="dark"] .btn.aurora { background: #fff; color: #0b1437; box-shadow: 0 12px 26px -14px rgba(255, 255, 255, .7); }
[data-theme="dark"] .kbtn, [data-theme="dark"] .top .out { background: #0f1535; border-color: var(--line-2); color: #fff; }
[data-theme="dark"] .top .link, [data-theme="dark"] .top nav a { color: #fff; } [data-theme="dark"] .top .link:hover { background: var(--chip); color: #fff; }
[data-theme="dark"] .bar { background: rgba(11, 18, 56, .92); border-top-color: var(--line); }
/* списки, группы, метки */
[data-theme="dark"] .sec > summary, [data-theme="dark"] .checks.tall, [data-theme="dark"] .upload, [data-theme="dark"] .hint, [data-theme="dark"] .grp { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .sec > summary:hover, [data-theme="dark"] .sec[open] > summary { background: rgba(0, 117, 255, .18); }
[data-theme="dark"] .hint { border-left-color: var(--brand); }
[data-theme="dark"] .map .pg, [data-theme="dark"] .person, [data-theme="dark"] .jrow, [data-theme="dark"] .feed a, [data-theme="dark"] td, [data-theme="dark"] th { border-color: var(--line); }
[data-theme="dark"] .map .pg:hover, [data-theme="dark"] .person:hover, [data-theme="dark"] .jrow:hover, [data-theme="dark"] .feed a:hover, [data-theme="dark"] tr:has(> td):hover { background: var(--hover); }
[data-theme="dark"] .map .t a, [data-theme="dark"] .jrow, [data-theme="dark"] .feed a, [data-theme="dark"] .sec h3 { color: #fff; }
[data-theme="dark"] a, [data-theme="dark"] .pn .mail { color: var(--brand-strong); }
[data-theme="dark"] .badge, [data-theme="dark"] .sec .badge, [data-theme="dark"] code, [data-theme="dark"] kbd { background: rgba(255, 255, 255, .1); color: #fff; }
[data-theme="dark"] .ava { background: linear-gradient(135deg, #0075ff, #4318ff); color: #fff; }
[data-theme="dark"] .chip { background: rgba(255, 255, 255, .08); color: var(--muted); }
[data-theme="dark"] .chip.ok, [data-theme="dark"] .act.new, [data-theme="dark"] .flash.done { background: rgba(1, 181, 116, .18); color: #4be3a8; border-color: rgba(1, 181, 116, .4); }
[data-theme="dark"] .chip.wait, [data-theme="dark"] .act.back, [data-theme="dark"] .tag, [data-theme="dark"] .warn { background: rgba(255, 181, 71, .16); color: #ffc46b; border-color: rgba(255, 181, 71, .35); }
[data-theme="dark"] .chip.off, [data-theme="dark"] .act.del, [data-theme="dark"] .del-note { background: rgba(227, 26, 26, .18); color: #ff9a9a; border-color: rgba(227, 26, 26, .4); }
[data-theme="dark"] .act { background: rgba(0, 117, 255, .2); color: #9cc8ff; }
[data-theme="dark"] .flash { background: rgba(0, 117, 255, .16); border-color: rgba(0, 117, 255, .4); color: #fff; }
[data-theme="dark"] .checks .check:hover { background: rgba(255, 255, 255, .06); } [data-theme="dark"] .checks .check:has(input:checked) { background: rgba(0, 117, 255, .22); color: #fff; }
[data-theme="dark"] ol.steps li::before { background: var(--aurora); color: #fff; }
[data-theme="dark"] .help summary, [data-theme="dark"] h2 { color: #fff; } [data-theme="dark"] h2 .ic, [data-theme="dark"] .jwhat .ic { color: var(--accent); }
[data-theme="dark"] dialog.modal, [data-theme="dark"] dialog.kdlg, [data-theme="dark"] dialog.paste { background: #0b1238; color: #fff; border: 1px solid var(--line); box-shadow: 0 40px 100px -30px rgba(0, 117, 255, .7); }
[data-theme="dark"] dialog::backdrop { background: rgba(2, 5, 21, .7); }
[data-theme="dark"] .kres a { color: #fff; } [data-theme="dark"] .kres a.cur, [data-theme="dark"] .kres a:hover { background: rgba(0, 117, 255, .25); color: #fff; }
[data-theme="dark"] iframe.inline { border-color: var(--line-2); border-radius: 15px; }
[data-theme="dark"] .narrow { margin-top: 9vh; }
[data-theme="dark"] .burger { background: var(--brand); border-color: var(--brand); }
[data-theme="dark"] .publish { background: rgba(255, 255, 255, .12); }
@media (max-width: 1000px) {
  [data-theme="dark"] .side { top: 0; bottom: 0; left: 0; width: 264px; border-radius: 0 20px 20px 0; background: #0b1238; }
  [data-theme="dark"] .content.with-side { margin-left: 0; }
  [data-theme="dark"] .hero { margin: 12px 12px 0; padding: 20px 0 22px; } [data-theme="dark"] .hero .shell { margin: 0 18px; }
  [data-theme="dark"] main.shell { margin: 0 12px; }
  [data-theme="dark"] .tabbar { left: 12px; right: 12px; bottom: 10px; border: 1px solid var(--line); border-radius: 20px; background: rgba(11, 18, 56, .88); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9); }
  [data-theme="dark"] .tabbar a, [data-theme="dark"] .tabbar button, [data-theme="dark"] .tabbar label { color: var(--muted); }
  [data-theme="dark"] .tabbar a[aria-current="page"] { color: #fff; } [data-theme="dark"] .tabbar a[aria-current="page"] .ic { color: var(--brand); filter: drop-shadow(0 0 8px rgba(0, 117, 255, .9)); }
  [data-theme="dark"] body { padding-bottom: 88px; } [data-theme="dark"] .bar { bottom: 78px; border-radius: 16px; border: 1px solid var(--line); }
}
/* правки по снимкам */
.kpis .ring { display: grid !important; } .kpis .ring i { display: block; font-size: .95rem !important; }
.kpis .ringtext span { display: block; font-size: .86rem; color: var(--muted); }
.tabbar label { margin: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .ringcard { grid-column: 1 / -1; } .kpis .sq { width: 38px; height: 38px; } }

/* ---------- Инструкция: три шага карточками и список «что ещё можно» ---------- */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 14px; }
.guide > div { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--hover); transition: transform .2s, border-color .2s; }
.guide > div:hover { transform: translateY(-3px); border-color: var(--brand); }
.guide .sq { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px; border-radius: 12px; background: var(--brand); color: #fff; }
.guide .sq .ic { width: 22px; height: 22px; margin: 0; color: #fff; }
.guide b { display: block; font-size: 1.02rem; margin-bottom: 4px; } .guide p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 24px; }
.tips li { position: relative; padding-left: 20px; font-size: .92rem; color: var(--muted); } .tips li b { color: var(--ink); }
.tips li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* переключатель темы в шапке; выдвижное меню на телефоне закрывает всё и умеет закрываться */
.kbtn.tbtn { padding: 7px 9px; margin-right: 4px; } .kbtn.tbtn .ic { width: 18px; height: 18px; margin: 0; }
.sideclose { display: none; }
@media (max-width: 1000px) {
  .top .kbtn.tbtn { display: grid; }
  .side { width: min(86vw, 320px) !important; z-index: 60; }
  .sideclose { display: block; margin: 0 4px 12px; padding: 10px 12px; border-radius: 12px; background: var(--chip); color: var(--ink); font-weight: 700; text-align: center; cursor: pointer; }
  .navtoggle:checked ~ .shade { z-index: 55; background: rgba(2, 5, 21, .72); backdrop-filter: blur(4px); }
  .navtoggle:checked ~ .tabbar { display: none; }
}
/* Подсказка над текстом: четыре коротких действия, а не сплошной абзац. */
.tips.how { margin: 8px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--hover); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tips.how li { font-size: .9rem; line-height: 1.4; }
label { line-height: 1.35; } .field > b { display: block; margin-bottom: 6px; }
.acts { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .acts { justify-content: flex-start; } }

/* ---------- Блок удаления: заголовок, пояснение, галочка рядом с текстом, кнопка «оживает» после отметки ---------- */
.check input, .row .check input, .danger-zone .check input { flex: none; width: 20px; height: 20px; margin: 0; padding: 0; }
.danger-zone, .danger-zone.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 18px 20px; border-radius: var(--r-lg); }
.danger-zone::before { content: "Удаление"; grid-column: 1 / -1; font: 800 1rem var(--font); color: #a82c2c; }
.danger-zone .muted { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: .88rem; line-height: 1.45; }
.danger-zone .check { grid-column: 1; grid-row: 3; display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; line-height: 1.3; cursor: pointer; }
.danger-zone .btn { grid-column: 2; grid-row: 3; min-height: 42px; background: #c43e3e; color: #fff; box-shadow: none; transition: opacity .2s, background .2s, transform .12s; }
.danger-zone .btn:hover { background: #a82c2c; }
.danger-zone:has(.check input:not(:checked)) .btn { opacity: .4; }
[data-theme="dark"] .danger-zone::before { color: #ff9a9a; }
[data-theme="dark"] .danger-zone .btn.ghost.danger { background: #c43e3e; color: #fff; box-shadow: none; }
@media (max-width: 640px) {
  .danger-zone, .danger-zone.row { grid-template-columns: 1fr; padding: 16px; }
  .danger-zone .btn { grid-column: 1; grid-row: 4; width: 100%; }
}
.danger-zone .btn.ghost.danger, [data-theme="dark"] .danger-zone .btn.ghost.danger { background: #c43e3e; color: #fff; box-shadow: none; }
.danger-zone .btn.ghost.danger:hover { background: #a82c2c; }
.danger-zone .check input:focus-visible { outline: 3px solid rgba(196, 62, 62, .45); outline-offset: 2px; box-shadow: none; }
.danger-zone .check input { accent-color: #c43e3e; box-shadow: none; }

/* сплошная проверка 08.10 */
.ref + .ref::before { content: " · "; }
main section[id] { scroll-margin-top: 84px; }
.upload input[type=file] { width: 100%; font: inherit; color: var(--muted); }
.upload input[type=file]::file-selector-button { margin-right: 12px; padding: 9px 18px; border: 0; border-radius: 99px; background: var(--brand); color: #fff; font: 700 .92rem var(--font); cursor: pointer; transition: filter .15s; }
.upload input[type=file]::file-selector-button:hover { filter: brightness(1.12); }
[data-theme="dark"] .upload input[type=file]::file-selector-button { border-radius: 10px; }
[data-theme="dark"] a.btn:not(.ghost):not(.aurora) { color: #fff; }
.person .pn small .tag { margin-top: 4px; }

/* заголовок раздела: значок, название, счётчик и «Создать» стоят на одной линии; на телефоне кнопка — отдельной строкой от левого края */
section.card > h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
section.card > h2 .ic { flex: none; margin: 0; }
section.card > h2 .add { float: none; margin-left: auto; }
@media (max-width: 760px) { section.card > h2::after { content: ""; flex-basis: 100%; order: 4; height: 0; margin-top: -8px; } section.card > h2 .add { order: 5; margin-left: 0; } }
/* на сенсорном экране «наведение» залипает после нажатия — наклоны и увеличения там не нужны */
@media (hover: none) { .tiles a:hover .ic, .person:hover .ava, .feed a:hover .ava, .brand:hover img, .kbtn:hover .ic, .themebtn:hover .ic, .kpis a:hover .sq, .jrow:hover, .top .out:hover .ic { transform: none; } }

/* редактор текста и фото */
.fmt { order: -2; flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; animation: rise .2s both; }
.fmt button { min-width: 44px; min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; transition: background .15s, border-color .15s, transform .12s; }
.fmt button:hover { border-color: var(--brand); } .fmt button:active { transform: scale(.94); }
.fmt button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fmt button:disabled { opacity: .4; cursor: default; }
.fmt-note { order: -1; flex: 1 1 100%; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--chip); color: var(--muted); font-size: .88rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.seg label { position: relative; display: block; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; height: 100%; padding: 12px 14px; border: 2px solid var(--line-2); border-radius: 14px; transition: border-color .15s, background .15s; }
.seg b { display: block; } .seg small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; line-height: 1.35; font-weight: 400; }
.seg input:checked + span { border-color: var(--brand); background: var(--chip); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(24, 167, 201, .25); }
.small { font-size: .85rem; }
dialog.imged { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; }
.stage { display: grid; place-items: center; padding: 10px; border-radius: 14px; background: repeating-conic-gradient(#e9eef3 0 25%, #f7f9fb 0 50%) 0 0 / 18px 18px; }
.stage canvas { max-width: 100%; max-height: 42vh; border-radius: 8px; cursor: grab; touch-action: none; box-shadow: 0 8px 24px -12px rgba(6, 39, 66, .6); }
.stage canvas:active { cursor: grabbing; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tools.chips button { min-height: 36px; padding: 5px 14px; border: 1.5px solid var(--line-2); border-radius: 99px; background: transparent; color: var(--ink); font: 600 .86rem var(--font); cursor: pointer; transition: background .15s, border-color .15s; }
.tools.chips button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
dialog.imged input[type=range] { width: 100%; padding: 0; border: 0; background: none; accent-color: var(--brand); }
dialog.modal label { display: block; margin-top: 10px; }
[data-theme="dark"] .fmt button { background: rgba(255, 255, 255, .06); color: #fff; }
[data-theme="dark"] .fmt button.on, [data-theme="dark"] .tools.chips button.on { background: var(--brand); color: #fff; }
[data-theme="dark"] .tools.chips button { color: #fff; }
[data-theme="dark"] .stage { background: repeating-conic-gradient(#1a2350 0 25%, #121a44 0 50%) 0 0 / 18px 18px; }
@media (max-width: 760px) {
  .fmt, .fmt-note { grid-column: 1 / -1; }
  .fmt { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; } .fmt::-webkit-scrollbar { display: none; }
  .fmt button { flex: none; padding: 6px 12px; font-size: .84rem; }
  .seg { grid-template-columns: 1fr; }
  .map .pg { padding-left: 0; }
}
.fmt[hidden], .fmt-note[hidden], dialog [hidden] { display: none; }
dialog.imged .row, dialog.paste .row, dialog[data-linkdlg] .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
dialog.imged .tools { margin: 8px 0; } dialog.imged p.small { margin: 6px 0; }
@media (max-width: 760px) {
  .fmt { display: grid; grid-template-columns: 1fr 1fr 2.5fr 1.9fr 1.6fr 1.9fr; gap: 5px; overflow: visible; margin: 0; padding: 0; }
  .fmt button { min-width: 0; padding: 6px 0; font-size: .8rem; }
  .stage canvas { max-height: 28vh; }
  dialog.imged { padding: 16px; } dialog.imged h2 { margin-bottom: 10px; }
  dialog.imged .tools { gap: 6px; } dialog.imged .tools .btn.small, .tools.chips button { min-height: 34px; padding: 4px 11px; font-size: .82rem; }
  dialog.imged .row .btn, dialog.paste .row .btn { flex: 1 1 0; padding-left: 8px; padding-right: 8px; }
}
/* нижняя панель правки не должна закрывать текст, к которому прокручивает браузер (курсор, найденное слово) */
html:has(form.card .bar) { scroll-padding: 90px 0 250px; }
@media (max-width: 760px) { html:has(form.card .bar) { scroll-padding: 80px 0 330px; } }
dialog.ask [data-text] p { margin: 0 0 10px; line-height: 1.5; } dialog.ask [data-text] p:first-child { font-weight: 600; }
/* кнопки в строке учётки на телефоне: цель для пальца не меньше 44px */
@media (max-width: 760px) { .person .acts .btn.small { min-height: 44px; display: inline-flex; align-items: center; } }
/* страница «Меню сайта» */
.menued .mtop { margin-bottom: 16px; }
.menued .mhead, .menued .mlink { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.menued .mhead { margin-bottom: 10px; }
.menued .mhead > input { flex: 1 1 220px; min-width: 0; font-weight: 600; }
.menued .mgroup { border: 1px solid rgba(128, 128, 128, .28); border-radius: 14px; padding: 14px; margin: 0 0 12px; }
.menued .mlink { padding: 8px 0; border-top: 1px dashed rgba(128, 128, 128, .28); }
.menued .mlink > input, .menued .mlink > select, .menued .mhead > select { flex: 1 1 200px; min-width: 0; }
.menued input, .menued select { min-height: 44px; }
.menued .mv { display: inline-flex; gap: 4px; margin-left: auto; }
.menued .mv .btn { min-width: 44px; min-height: 44px; justify-content: center; padding-left: 0; padding-right: 0; }
form.undo { margin-top: 18px; }
.menued .mlink > [data-f="desc"] { order: 3; flex: 1 1 100%; }
.menued [data-add] { min-height: 44px; display: inline-flex; align-items: center; }
/* страница «Шапка и подвал» */
.menued.nodesc [data-f="desc"] { display: none; }
.menued .chromed { margin-bottom: 16px; } .menued .chromed label { display: block; margin: 0 0 14px; font-weight: 600; }
.menued .chromed label input { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
.menued .mtop > h2, .menued .chromed > h2 { font: 600 1.15rem var(--display); margin: 0 0 14px; }
/* карточка сотрудника: сведения из телефонного справочника (только показ) */
.dirinfo dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 0; }
.dirinfo dt { opacity: .72; } .dirinfo dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .dirinfo dl { grid-template-columns: 1fr; gap: 2px; } .dirinfo dd { margin-bottom: 8px; } }
/* KPI: спокойные компактные карточки без скачка чисел при загрузке. */
.kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 22px;
}
.kpis a {
  min-height: 86px;
  padding: 14px 15px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card), var(--hover));
  box-shadow: 0 8px 22px -16px rgba(7, 53, 95, .55);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kpis a:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 12px 26px -17px rgba(7, 53, 95, .7);
}
.kpis a > span:not(.sq) {
  font-size: .78rem;
  line-height: 1.3;
  font-weight: 650;
}
.kpis a > b {
  font-size: 1.75rem;
  line-height: 1;
  transition: none;
}
.kpis a:hover > b { transform: none; }
.kpis .sq {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 5px 12px -8px rgba(7, 53, 95, .8);
}
.kpis a:hover .sq { transform: none; }
.kpis .ringcard {
  grid-column: span 2;
  min-height: 86px;
  gap: 14px;
  padding: 11px 15px;
}
.kpis .ring {
  width: 64px;
  height: 64px;
  animation: none;
}
.kpis .ring::before { inset: 8px; }
.kpis .ringtext { font-size: .95rem; line-height: 1.25; }
.kpis .ringtext b { font-size: 1.55rem !important; }
.kpis .ringtext span { font-size: .82rem; line-height: 1.35; }
.builder-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}
.builder-links > b {
  margin-right: 3px;
  color: var(--brand-strong);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.builder-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--ink);
  background: var(--chip);
  font-size: .82rem;
  font-weight: 650;
  text-decoration: none;
}
.builder-links a:hover { background: #fff; color: var(--brand-strong); border-color: var(--brand); }
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .ringcard { grid-column: 1 / -1; }
  .kpis a { min-height: 76px; padding: 12px 13px; border-radius: 14px; }
  .kpis a > b { font-size: 1.45rem; }
  .builder-links > b { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .kpis .ringcard { grid-column: auto; }
}
/* Быстрые ссылки конструктора находятся в теле рабочего стола. */
.builder-links {
  margin-top: 0;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.filelist{list-style:none;margin:.5rem 0;padding:0}
.filelist li{display:flex;gap:.75rem;align-items:center;justify-content:space-between;padding:.4rem 0;border-bottom:1px solid var(--line,rgba(128,128,128,.25))}
.filelist a{overflow-wrap:anywhere}
.draft-note a{margin-left:.4rem}


/* Center the sign-in header and action, with labels aligned to the fields. */
.login-card { text-align: center; }
.login-card .mark { margin-inline: auto; }
.login-card form { text-align: start; }
.login-card form > .btn { display: block; margin-inline: auto; }

.bear-wrap { display: grid; place-items: center; margin-bottom: 12px; }
.bear { width: 96px; height: auto; overflow: visible; }
.bear__ear { fill: #7a5940; }
.bear__ear-in { fill: #b98d68; }
.bear__head { fill: #8d6748; }
.bear__muzzle { fill: #e0c9ae; }
.bear__nose { fill: #402f22; }
.bear__mouth { fill: none; stroke: #402f22; stroke-width: 2.4; stroke-linecap: round; transition: opacity .12s ease-out; }
.bear__mouth-o { fill: #402f22; opacity: 0; transition: opacity .12s ease-out; }
.bear__brow {
  fill: none; stroke: #5f452f; stroke-width: 3.2; stroke-linecap: round;
  opacity: 0; transition: opacity .12s ease-out;
}
.bear__eye-white { fill: #fff; }
.bear__pupil { fill: #2b1f16; transition: transform .18s ease-out; }
.bear__spark { fill: #fff; opacity: .95; transition: transform .18s ease-out; }
.bear__eye-white, .bear__pupil, .bear__spark { transition: opacity .12s ease-out; }
/* Закрытые глаза — две дуги. Появляются вместо открытых, без движения
   деталей: любая трансформация внутри SVG на разных браузерах ведёт себя
   по-разному, а смена непрозрачности выглядит одинаково везде. */
.bear__lid {
  fill: none; stroke: #2b1f16; stroke-width: 3.4; stroke-linecap: round;
  opacity: 0;
  transition: opacity .12s ease-out;
}

/* Ввод логина: зрачки следуют за набираемым текстом. */
.bear.is-look-0 .bear__pupil, .bear.is-look-0 .bear__spark { transform: translateX(-3.6px); }
.bear.is-look-1 .bear__pupil, .bear.is-look-1 .bear__spark { transform: translateX(-2.7px); }
.bear.is-look-2 .bear__pupil, .bear.is-look-2 .bear__spark { transform: translateX(-1.8px); }
.bear.is-look-3 .bear__pupil, .bear.is-look-3 .bear__spark { transform: translateX(-0.9px); }
.bear.is-look-4 .bear__pupil, .bear.is-look-4 .bear__spark { transform: translateX(0.0px); }
.bear.is-look-5 .bear__pupil, .bear.is-look-5 .bear__spark { transform: translateX(0.9px); }
.bear.is-look-6 .bear__pupil, .bear.is-look-6 .bear__spark { transform: translateX(1.8px); }
.bear.is-look-7 .bear__pupil, .bear.is-look-7 .bear__spark { transform: translateX(2.7px); }
.bear.is-look-8 .bear__pupil, .bear.is-look-8 .bear__spark { transform: translateX(3.6px); }
/* Взгляд опускается на поле, а не остаётся стеклянным. */
.bear.is-watching .bear__pupil, .bear.is-watching .bear__spark { translate: 0 2px; }

/* Стёрли букву — медведь удивляется: брови вверх, рот приоткрыт. */
.bear.is-surprised .bear__brow { opacity: 1; }
.bear.is-surprised .bear__mouth-o { opacity: 1; }
.bear.is-surprised .bear__mouth { opacity: 0; }

/* Ввод пароля: медведь закрывает глаза. */
.bear.is-hiding .bear__eye-white,
.bear.is-hiding .bear__pupil,
.bear.is-hiding .bear__spark { opacity: 0; }
.bear.is-hiding .bear__lid { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bear__pupil, .bear__spark, .bear__lid, .bear__eye-white,
  .bear__brow, .bear__mouth, .bear__mouth-o { transition: none; }
}

/* Asymmetric expression after a rejected sign-in. */
.bear__mouth-skeptical { display: none; }
.bear.is-suspicious { transform: rotate(-9deg); }
.bear.is-suspicious .bear__eye { transform-box: fill-box; transform-origin: center; }
.bear.is-suspicious .bear__eye--l { transform: scaleY(.48); }
.bear.is-suspicious .bear__eye--r { transform: scaleY(.78); }
.bear.is-suspicious .bear__pupil, .bear.is-suspicious .bear__spark { transform: translateX(4px); translate: none; }
.bear.is-suspicious .bear__brow { opacity: 1; }
.bear.is-suspicious .bear__brow--l { transform: translateY(6px) rotate(13deg); transform-box: fill-box; transform-origin: center; }
.bear.is-suspicious .bear__brow--r { transform: translateY(-4px); }
.bear.is-suspicious .bear__mouth:not(.bear__mouth-skeptical),
.bear.is-suspicious .bear__mouth-o { display: none; }
.bear.is-suspicious .bear__mouth-skeptical { display: block; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .bear.is-suspicious { animation: bear-double-take .72s ease-out both; }
  .bear.is-suspicious .bear__pupil, .bear.is-suspicious .bear__spark { animation: bear-side-eye .72s ease-out both; }
  @keyframes bear-double-take {
    0% { transform: none; }
    28% { transform: translateY(-5px) rotate(5deg); }
    72% { transform: rotate(-12deg); }
    100% { transform: rotate(-9deg); }
  }
  @keyframes bear-side-eye {
    0% { transform: none; }
    28% { transform: translateX(-3px); }
    72%, 100% { transform: translateX(4px); }
  }
}


.bear__smile, .bear__happy-lid { display: none; }
.bear.is-happy .bear__eye, .bear.is-happy .bear__mouth, .bear.is-happy .bear__mouth-o { display: none; }
.bear.is-happy .bear__smile { display: block; fill: #402f22; }
.bear.is-happy .bear__happy-lid { display: block; fill: none; stroke: #2b1f16; stroke-width: 3.4; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .bear.is-happy { animation: bear-nod .9s ease-in-out both; transform-origin: 50% 60%; }
  @keyframes bear-nod {
    0%, 42%, 100% { transform: none; }
    23% { transform: translateY(8px) scaleY(.88); }
    65% { transform: translateY(5px) scaleY(.93); }
  }
}

.login-card > h1 { margin-bottom: 12px; }
.login-card > h1 + .muted { margin-top: 0; }
@media (max-width: 640px) {
  .login-card { padding: 24px; }
}


.bear.is-hiding.is-peeking-left .bear__eye--l,
.bear.is-hiding.is-peeking-right .bear__eye--r { transform-box: fill-box; transform-origin: center; transform: scaleY(.65); }
.bear.is-hiding.is-peeking-left .bear__eye--l :is(.bear__eye-white, .bear__pupil, .bear__spark),
.bear.is-hiding.is-peeking-right .bear__eye--r :is(.bear__eye-white, .bear__pupil, .bear__spark) { opacity: 1; }
.bear.is-hiding.is-peeking-left .bear__lid--l,
.bear.is-hiding.is-peeking-right .bear__lid--r { opacity: 0; }

.bear.is-hiding.is-surprised .bear__eye {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.09, 1.16);
}
.bear.is-hiding.is-surprised :is(.bear__eye-white, .bear__pupil, .bear__spark) { opacity: 1; }
.bear.is-hiding.is-surprised .bear__lid { opacity: 0; }
