/* Кабинет pavos.ru — фирменный стиль: глубокий зелёный, латунь, медь; Unbounded + Manrope.
   Всегда на зелёном фоне, независимо от темы системы. */
:root {
  --bg: #13261E; --side: #0E1D16; --card: #0E1D16; --raised: #1B3429; --line: #2C4A3C;
  --text: #EFE6D2; --muted: #A9B8A8; --dim: #6F8176;
  --brass: #CFAE62; --copper: #C4733F; --on-brass: #13261E;
  --ok: #8CC49A; --bad: #E07A5A; --warn: #CFAE62;
  --code-bg: #0A1611; --code-text: #D9D2C0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font: 600 1.45rem/1.25 Unbounded, sans-serif; letter-spacing: -.01em; margin: 0 0 1rem; }
h2 { font: 600 .98rem/1.3 Unbounded, sans-serif; margin: 0 0 .8rem; }
code { font-size: .86em; background: color-mix(in srgb, var(--brass) 12%, transparent); padding: .05em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); margin-bottom: 2px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.emoji { display: inline-block; text-align: center; line-height: 1; }

/* ---------- логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-word { font: 700 1.25rem/1 Unbounded, sans-serif; letter-spacing: -.04em; color: var(--brass); }
.logo-tld { font: 500 .75rem/1 Unbounded, sans-serif; color: var(--copper); margin-left: -5px; align-self: flex-end; padding-bottom: 3px; }

/* ---------- каркас ---------- */
body.admin { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line);
  padding: 22px 14px; display: flex; flex-direction: column; }
.side-logo { padding: 0 8px 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.side nav a .i { color: var(--dim); transition: color .15s; }
.side nav a:hover { background: color-mix(in srgb, var(--brass) 7%, transparent); color: var(--text); text-decoration: none; }
.side nav a:hover .i { color: var(--brass); }
.side nav a.on { background: color-mix(in srgb, var(--brass) 13%, transparent); color: var(--text); font-weight: 700;
  box-shadow: inset 3px 0 0 var(--copper); }
.side nav a.on .i { color: var(--brass); }
.side .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .group { margin: 18px 10px 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.side-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.side-foot a, .side-foot .link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.side-foot .i { width: 16px; height: 16px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.dot.warn { background: var(--warn); }
.content { padding: 30px 36px 64px; max-width: 1240px; width: 100%; min-width: 0; }
.mobile-bar, .scrim { display: none; }

/* ---------- блоки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 16px; }
.card-head { margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.two-col .card { margin: 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.more { display: inline-flex; align-items: center; gap: 4px; }
.more .i { width: 14px; height: 14px; }

/* плитка-иконка в стиле «аватара» логотипа */
.tile { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px;
  border: 2px solid var(--brass); background: var(--side); color: var(--brass); }
.tile .i { width: 26px; height: 26px; }
.tile .emoji { font-size: 1.5rem; }
.tile.sm { width: 40px; height: 40px; border-radius: 12px; border-width: 1.5px; }
.tile.sm .i { width: 20px; height: 20px; }

.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 24px; margin-bottom: 22px; }
.hello h1 { margin: 0; font-size: 1.9rem; }
.motto { color: var(--dim); font-size: .82rem; letter-spacing: .04em; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--dim); }
.stat-top .i { color: var(--brass); opacity: .8; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font: 700 1.9rem/1.2 Unbounded, sans-serif; margin-top: 6px; letter-spacing: -.02em; }
.stat-value .muted { font: 500 .95rem Manrope, sans-serif; }
.small-value { font-size: 1.15rem; padding-top: 8px; }
.stat.warn { border-color: color-mix(in srgb, var(--copper) 55%, var(--line)); }
.stat.warn .stat-value { color: var(--copper); }
.meter { height: 6px; border-radius: 3px; background: var(--raised); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--copper)); border-radius: 3px; }

.plist { display: flex; flex-direction: column; }
.pitem { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-top: 1px solid var(--line); color: var(--text); }
.pitem:first-child { border-top: 0; }
a.pitem { border-radius: 12px; }
a.pitem:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); text-decoration: none; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; gap: 12px; padding: 8px 0 8px 14px; position: relative; }
.events li::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.events li::after { content: ""; position: absolute; left: 3px; top: 24px; bottom: -8px; width: 1px; background: var(--line); }
.events li:last-child::after { display: none; }
.events li.alert::before { background: var(--bad); } .events li.ok::before { background: var(--ok); } .events li.info::before { background: var(--brass); }
.events .time { color: var(--dim); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700;
  white-space: nowrap; background: var(--raised); color: var(--muted); }
.badge .dot { width: 7px; height: 7px; box-shadow: none; }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

.page-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head .title { display: flex; gap: 16px; align-items: center; min-width: 0; }
.page-head h1 { margin: 0; }
.page-head .actions { margin: 0; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 600; }
.tabs a .i { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-color: var(--copper); }
.tabs a.on .i { color: var(--brass); }

/* ---------- формы ---------- */
button, .button { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 700; border: 0; border-radius: 10px;
  cursor: pointer; padding: 9px 15px; background: var(--brass); color: var(--on-brass); }
button .i, .button .i { width: 16px; height: 16px; }
button:hover, .button:hover { filter: brightness(1.08); text-decoration: none; }
button.secondary, .button.secondary { background: transparent; color: var(--brass); border: 1px solid var(--brass); }
button.danger { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 70%, transparent); }
button.link { background: none; color: var(--muted); padding: 0; font-weight: 500; border-radius: 0; }
button.link:hover { color: var(--text); }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions.sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }

input, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brass) 45%, transparent); outline-offset: 0; border-color: var(--brass); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; resize: vertical; }
textarea[name="about"], textarea[name="links"], textarea[name="welcome"] { font-family: inherit; font-size: .95rem; }
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: .88rem; font-weight: 600; }
label input, label textarea { margin-top: 5px; color: var(--text); font-weight: 400; }
.inline-check { display: inline-flex; gap: 7px; align-items: center; margin: 0; white-space: nowrap; color: var(--text); font-weight: 500; }
.inline-check input { width: auto; margin: 0; accent-color: var(--brass); }
.row input { width: auto; flex: 1 1 180px; }
.row label { margin: 0; display: flex; gap: 6px; align-items: center; }

.flash { display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--brass) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); border-radius: 14px; padding: 11px 16px; margin-bottom: 20px; }
.error { color: var(--bad); font-weight: 600; }

pre.log { background: var(--code-bg); color: var(--code-text); padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  font-size: .8rem; max-height: 68vh; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
details summary { cursor: pointer; margin: 10px 0; color: var(--muted); font-weight: 600; }

table.env { width: 100%; border-collapse: collapse; }
table.env th { text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; font-weight: 500; color: var(--brass);
  padding: 6px 10px 6px 0; width: 30%; word-break: break-all; }
table.env td { padding: 4px 0; }
table.env td.val { display: flex; gap: 6px; }
button.eye { background: transparent; border: 1px solid var(--line); padding: 4px 10px; color: var(--brass); }

.steps li { margin-bottom: 16px; }
.steps li::marker { color: var(--copper); font-weight: 700; }
.note textarea { margin: 8px 0; font-family: inherit; font-size: .95rem; }
.note-form textarea { margin: 10px 0; font-family: inherit; }
.search { margin-bottom: 14px; justify-content: flex-start; }
.narrow { max-width: 440px; }

/* ---------- статистика ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--side); }
.seg a { padding: 6px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--brass); color: var(--on-brass); }
.chart-scroll { overflow-x: auto; margin-top: 6px; }
svg.chart { width: 100%; min-width: 300px; height: auto; max-height: 300px; display: block; overflow: visible; }
svg.chart .nodata { stroke: var(--dim); stroke-width: 2; stroke-dasharray: 3 3; }
svg.chart .bar.approx .mark { fill: color-mix(in srgb, var(--brass) 42%, var(--card)); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted); font-size: .82rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--brass); flex: none; }
.legend .sw.approx { background: color-mix(in srgb, var(--brass) 42%, var(--card)); }
table.data tr.approx td { color: var(--muted); }
svg.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
svg.chart .base { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--dim); font: 600 15px Manrope, sans-serif; }   /* в единицах viewBox: ~12px на экране */
svg.chart .mark { fill: var(--brass); transition: fill .15s; }
svg.chart .hit { fill: transparent; }
svg.chart .bar { cursor: default; outline: none; }
svg.chart .bar:hover .mark, svg.chart .bar:focus .mark { fill: var(--copper); }
svg.chart .bar:focus .hit { fill: color-mix(in srgb, var(--brass) 8%, transparent); }
.chart-tip { position: fixed; z-index: 20; pointer-events: none; background: var(--raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: .82rem; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); white-space: nowrap; }
.toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toplist li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; border-radius: 8px; }
.toplist li i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; z-index: 0;
  background: color-mix(in srgb, var(--brass) 16%, transparent); }
.toplist .t-name, .toplist .t-val { position: relative; z-index: 1; }
.toplist .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist .t-val { font-weight: 700; font-variant-numeric: tabular-nums; }
table.data { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; color: var(--muted); font-size: .8rem; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); vertical-align: top; }
/* широкие таблицы (Референт: приглашения, доступы) прокручиваются внутри карточки, а не ломают страницу */
.table-scroll { overflow-x: auto; margin-top: 10px; }
.table-scroll table.data { margin-top: 0; min-width: 680px; }
.cell-actions { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.cell-actions form { margin: 0; }
.cell-actions.stack { flex-direction: column; align-items: stretch; }
.cell-actions.stack button { width: 100%; }
.cell-actions button, .cell-actions .button { padding: 5px 10px; font-size: .85rem; white-space: nowrap; }
table.data td.nowrap { white-space: nowrap; }
table.data td.nowrap .link { white-space: nowrap; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.grid-3 .card { margin: 0; }
/* форма в строке таблицы: поле ID фиксированной ширины, галочка без растягивания */
.acc-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.acc-form input[type=number] { width: 120px; flex: 0 0 120px; }
.acc-form .inline-check input { flex: none; }
.pub-item { display: grid; grid-template-columns: 240px 1fr 1fr; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }

/* ---------- вход и служебные страницы ---------- */
body.brand-bg { background:
    radial-gradient(900px 500px at 50% -10%, rgba(207, 174, 98, .10), transparent 60%), var(--bg); }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; text-align: center; padding: 30px 28px; }
.login-mark { margin-bottom: 10px; }
.login-title { display: inline-flex; align-items: center; }
.login-title .logo-word { font-size: 1.7rem; }
.login-sub { margin: 4px 0 22px; }
.login label { text-align: left; }
.login button { width: 100%; justify-content: center; margin-top: 4px; }
.login .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.login .pow-status { margin: 12px 0 0; font-size: .78rem; color: var(--dim); }
.login button:disabled { opacity: .7; cursor: progress; }
.login .back { display: inline-block; margin-top: 16px; color: var(--dim); font-size: .85rem; }
.prose { max-width: 720px; margin: 0 auto; padding: 28px 16px 60px; }
.prose h1 { margin-top: 24px; }
.prose h2 { margin-top: 28px; color: var(--brass); }

/* ---------- дежурства ---------- */
select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 8px; max-width: 100%; }
select:focus { outline: 2px solid color-mix(in srgb, var(--brass) 45%, transparent); border-color: var(--brass); }
.sheets { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.sheets a { padding: 8px 13px; border-radius: 10px 10px 0 0; color: var(--muted); font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; border-bottom: 0; }
.sheets a.past { color: var(--dim); }
.sheets a:hover { color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--brass) 6%, transparent); }
.sheets a.on { color: var(--text); background: var(--card); border-color: var(--line); box-shadow: inset 0 2px 0 var(--copper); }
.duty-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat.mini { padding: 12px 14px; border-radius: 14px; }
.stat.mini .stat-value { font-size: 1.35rem; margin-top: 2px; }
.grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.grid-wrap.flush { padding: 0; }
table.duty { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.duty th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim);
  padding: 10px 10px; border-bottom: 1px solid var(--line); background: var(--side); position: sticky; top: 0; z-index: 1; }
table.duty td { padding: 5px 10px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); white-space: nowrap; }
table.duty td.d { width: 70px; }
table.duty .wd { color: var(--dim); font-size: .82rem; }
table.duty .vac { text-align: center; width: 80px; }
table.duty .vac input { width: 18px; height: 18px; accent-color: var(--brass); }
table.duty tr.t-weekend td, table.duty tr.t-holiday td { background: color-mix(in srgb, var(--copper) 8%, transparent); }
table.duty tr.t-holiday .d b { color: var(--copper); }
table.duty tr.t-off td { background: color-mix(in srgb, var(--dim) 10%, transparent); color: var(--dim); }
table.duty tr.today td.d { box-shadow: inset 3px 0 0 var(--brass); }
table.duty tr.gap select.js-person { border-color: color-mix(in srgb, var(--warn) 70%, transparent); }
table.duty tr.clash td { background: color-mix(in srgb, var(--bad) 14%, transparent); }
table.duty .num { text-align: right; }
table.pay td { padding: 9px 10px; vertical-align: top; }
table.pay tfoot th { position: static; border-top: 1px solid var(--line); border-bottom: 0; font-size: .85rem; color: var(--text); text-transform: none; letter-spacing: 0; }
.tag { margin-left: 6px; font-size: .75rem; color: var(--copper); }

/* таблица начислений: группы колонок, рамки ячеек, закреплённые шапка и месяц, итог */
.paywrap { overflow: auto; max-height: 78vh; border: 1px solid var(--line); border-radius: 18px; background: var(--card); margin-bottom: 10px; }
.paytable { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; font-variant-numeric: tabular-nums; }
.paytable col.c-month { width: 170px; }
.paytable col.c-person { min-width: 118px; }
.paytable th, .paytable td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent); white-space: nowrap; }
.paytable td + td, .paytable th + th, .paytable th.month + td { border-left: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.paytable thead th { position: sticky; top: 0; z-index: 2; background: var(--side); color: var(--muted); font-size: .74rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.paytable thead tr + tr th { top: 38px; }
.paytable thead tr.grp th { font-size: .68rem; letter-spacing: .2em; color: var(--copper); border-bottom-color: var(--line); }
.paytable thead th.person { color: var(--brass); font: 600 .9rem/1.2 Unbounded, sans-serif; letter-spacing: 0; text-transform: none; }
.paytable .num { text-align: right; }
.paytable th.month { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; font-weight: 600;
  box-shadow: 1px 0 0 var(--line); }
.paytable thead th.month { z-index: 3; background: var(--side); vertical-align: bottom; }
.paytable th.month a { color: var(--text); }
.paytable th.month a:hover { color: var(--brass); }
.paytable td.first, .paytable th.first, .paytable th.g-people { border-left: 2px solid color-mix(in srgb, var(--brass) 45%, var(--line)) !important; }
.paytable tbody tr:nth-child(even) td, .paytable tbody tr:nth-child(even) th.month { background: color-mix(in srgb, var(--raised) 45%, var(--card)); }
.paytable tbody tr:hover td, .paytable tbody tr:hover th.month { background: color-mix(in srgb, var(--brass) 7%, var(--card)); }
.paytable tbody tr.now th.month { box-shadow: inset 3px 0 0 var(--copper), 1px 0 0 var(--line); }
.paytable .amount { font-weight: 700; color: var(--text); font-size: .98rem; }
.paytable .meta { color: var(--dim); font-size: .76rem; margin-top: 2px; }
.paytable .none { color: var(--dim); }
.paytable .gap { display: block; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--copper); }
.paytable tfoot th, .paytable tfoot td { position: sticky; bottom: 0; background: var(--raised); border-top: 2px solid var(--brass);
  border-bottom: 0; }
.paytable tfoot th.month { z-index: 2; background: var(--raised); font-family: Unbounded, sans-serif; font-size: .85rem; color: var(--brass); }
.paytable tfoot .amount { color: var(--brass); }
.budget-row { justify-content: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.budget-row input { flex: 0 1 160px; }
.budget-row input.short, .budget-row label input.short { flex: 0 1 130px; width: 130px; }
.budget-row label input.short[inputmode] { width: 70px; }
.person .pname { flex: 1 1 200px; font-weight: 700; }
.person.inactive { opacity: .6; }
.person .links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.person .links input { font-size: .9rem; }
.steps-plain { margin: 0 0 10px; padding-left: 18px; }
.steps-plain li { margin-bottom: 8px; }
.duty-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: var(--side); }
.duty-main { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- кабинет обращений ---------- */
.inquiry-columns { grid-template-columns: minmax(270px,.85fr) minmax(0,1.5fr); }
.inquiry-list, .inquiry-detail { min-width: 0; }
.inquiry-items { list-style: none; margin: 12px 0 0; padding: 0; }
.inquiry-items li { border-top: 1px solid var(--line); }
.inquiry-item { display: grid; gap: 6px; width: 100%; padding: 12px 9px; border-radius: 10px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.inquiry-item:hover, .inquiry-item.selected { background: color-mix(in srgb, var(--brass) 7%, transparent); text-decoration: none; }
.inquiry-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; }
.inquiry-item-head b { overflow-wrap: anywhere; }
.inquiry-preview { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.inquiry-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.inquiry-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inquiry-contact > .muted { flex-basis: 100%; }
.inquiry-contact strong { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.inquiry-contact .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.inquiry-reply { margin-top: 18px; }
.inquiry-reply label { display: grid; gap: 6px; margin: 0; color: var(--muted); }
.inquiry-reply textarea { display: block; width: 100%; min-height: 140px; margin-top: 0; font: 400 .95rem/1.55 Manrope,system-ui,sans-serif; }
.inquiry-reply > p { margin: 8px 0; }
.inquiry-reply .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inquiry-status { display: grid; grid-template-columns: minmax(170px,260px) auto; align-items: end; gap: 10px; margin: 18px 0 10px; }
.inquiry-status label { display: grid; gap: 5px; min-width: 0; margin: 0; color: var(--muted); }
.inquiry-status select { display: block; width: 100%; min-height: 42px; padding: 8px 10px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.inquiry-status select:focus { outline: 2px solid color-mix(in srgb, var(--brass) 45%, transparent); border-color: var(--brass); }
.inquiry-detail > form[action$="/delete"] { margin-top: 6px; }

/* ---------- адаптив ---------- */
@media (max-width: 1050px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  body.admin { display: block; }
  .mobile-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--side);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .burger { display: grid; place-items: center; cursor: pointer; margin: 0; color: var(--brass); }
  .burger .i { width: 24px; height: 24px; }
  .side { display: none; position: fixed; inset: 0 auto 0 0; z-index: 10; width: 280px; }
  .menu-toggle:checked ~ .side { display: flex; }
  .menu-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: rgba(5, 12, 9, .6); margin: 0; }
  .content { padding: 20px 16px 48px; }
  .hello h1 { font-size: 1.5rem; }
  .motto { display: none; }
  .page-head .tile { width: 44px; height: 44px; }
  table.env, table.env tr, table.env th, table.env td { display: block; width: 100%; }
  table.env tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.duty td, table.duty th { padding-left: 6px; padding-right: 6px; }
  table.duty .vac { width: 56px; }
  .person .links { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  /* в списке проектов от статуса остаётся только точка */
  .pitem .badge { font-size: 0; gap: 0; padding: 7px; }
  .pitem .badge .dot { width: 9px; height: 9px; }
  .inquiry-status { grid-template-columns: minmax(0,1fr); }
}
