/* =============================================================================
   Восход — отчётность. Оформление в стиле сайта voshod71.ru: синий, голубой, белый;
   тёмно-синяя боковая панель; Unbounded для заголовков, Golos Text для текста.
   Печать — строгая: белый фон, тонкие чёрные рамки.
   ========================================================================== */
:root {
  --bg: #f4f7fb; --card: #fff; --ink: #0c1e38; --ink-2: #55688a; --ink-3: #8a9bb6;
  --line: #dbe5f1; --line-2: #e9f0f8; --blue: #1856c4; --blue-d: #0f3d92; --blue-soft: #eaf1fd;
  --sky: #3fbdee; --sky-soft: #d9f0fb; --deep: #071628; --deep-2: #0d2947;
  --ok: #126b3f; --ok-soft: #e3f4ea; --warn: #b4540a; --warn-soft: #fdf0e1; --bad: #b3261e; --bad-soft: #fbe9e7;
  --r: 12px; --r-sm: 8px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Unbounded', 'Golos Text', sans-serif; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 23px; margin: 0 0 18px; }
h2 { font-size: 16px; margin: 30px 0 12px; }
h3 { font-size: 14px; margin: 20px 0 10px; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code { background: var(--blue-soft); color: var(--blue-d); padding: 1px 6px; border-radius: 5px; font-size: .95em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* --- Каркас ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px; background: var(--deep); color: #eaf4ff; overflow: hidden auto; }
.side .tri { position: absolute; left: -30px; bottom: 64px; width: 300px; opacity: .55; pointer-events: none; }
.side > *:not(.tri) { position: relative; z-index: 1; }
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; text-decoration: none; color: inherit; }
.mark { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--blue); background: #fff; display: grid; place-items: center; flex: none; }
.mark svg { width: 24px; height: 24px; }
.logo b { font-family: 'Unbounded'; font-size: 15px; letter-spacing: .06em; display: block; line-height: 1.1; }
.logo small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8fb0d6; }
.nav { display: grid; gap: 2px; }
.nav .grp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8fb0d6; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: #d6e6f8; text-decoration: none; font-weight: 500; }
.nav a svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.on { background: rgba(63,189,238,.14); color: #fff; box-shadow: inset 3px 0 0 var(--sky); }
.nav a.on svg { opacity: 1; }
.nav .count { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 2px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--deep-2); color: var(--sky); display: grid; place-items: center; font-weight: 600; flex: none; }
.side-foot .who { min-width: 0; }
.side-foot .who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who a { color: #8fb0d6; font-size: 12px; }
.side-foot form { margin-left: auto; }
.side-foot button { background: none; border: 1px solid rgba(255,255,255,.2); color: #d6e6f8; font-size: 12px; padding: 4px 9px; }
.side-foot button:hover { border-color: var(--sky); color: #fff; background: none; }
main { padding: 26px 34px 56px; min-width: 0; max-width: 1320px; }
.demo-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #f3d6b4; padding: 7px 34px; font-size: 13px; }

/* --- Шапка страницы и навигация по периодам ---------------------------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; margin-bottom: 20px; }
.top h1 { margin: 0; }
.top .sub, .sub-title { color: var(--ink-2); margin-top: 4px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.periodnav { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; margin-bottom: 16px; flex-wrap: wrap; }
.periodnav a, .periodnav .cur { padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.periodnav .cur { background: var(--blue-soft); color: var(--blue); }
.periodnav a:hover { color: var(--blue); }

/* --- Сообщения ---------------------------------------------------------- */
.flash, .error, .warn, .info { border-radius: var(--r-sm); padding: 11px 14px; margin: 0 0 16px; border: 1px solid; }
.flash { background: var(--ok-soft); border-color: #bfe3cc; color: #0d4f2e; }
.error { background: var(--bad-soft); border-color: #f2c7c2; color: #7d1a14; }
.warn { background: var(--warn-soft); border-color: #f3d6b4; color: #6b3306; }
.info { background: var(--blue-soft); border-color: #cbdcf7; color: var(--blue-d); }
.warn ul, .info ul { margin: 6px 0 0; padding-left: 18px; }
.hint, p.hint { color: var(--ink-2); font-size: 13px; }

/* --- Карточки и показатели --------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h2 a { font: 500 13px 'Golos Text'; text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi .label { font-size: 13px; color: var(--ink-2); }
.kpi .value { font: 600 24px/1.25 'Unbounded'; letter-spacing: -.03em; margin: 6px 0 6px; white-space: nowrap; }
.kpi .sub { font-size: 12.5px; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; align-content: start; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 20px; align-items: start; }
.pos { color: var(--ok); } .neg { color: var(--bad); } .muted { color: var(--ink-2); }
.prog { height: 8px; background: var(--line-2); border-radius: 4px; position: relative; margin: 10px 0 6px; }
.prog > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 4px; max-width: 100%; }
.prog > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.prog-l { display: flex; justify-content: space-between; gap: 2px 8px; flex-wrap: wrap; white-space: nowrap; font-size: 12px; color: var(--ink-3); }
.delta { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--bad-soft); color: var(--bad); }

/* --- Таблицы ------------------------------------------------------------ */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.card .scroll { border: 0; border-radius: 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: 12.5px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfcfe; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 600; border-top: 1px solid var(--line); background: #fbfcfe; }
tr.sub td { background: var(--bg); font-weight: 600; }
tr.memo td { color: var(--ink-3); }
tbody tr:hover td, table tr:hover td { background-color: #fafcff; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.tag.closed, .tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.amb { background: var(--warn-soft); color: var(--warn); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.red { background: var(--bad-soft); color: var(--bad); }
.bar { height: 9px; background: var(--line-2); border-radius: 5px; position: relative; min-width: 60px; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 5px; }
.bar > span.exp { background: #e7a29c; }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.heat td { text-align: center; font-size: 12px; padding: 5px 2px; min-width: 34px; border-bottom: 1px solid #fff; }
.fb { height: 10px; border-radius: 5px; background: var(--line-2); position: relative; min-width: 120px; }
.fb i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--sky); }
.fb em { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--blue); }

/* --- Формы -------------------------------------------------------------- */
form.inline { display: inline; margin: 0; }
.formrow { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; }
.formrow label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-2); font-weight: 500; gap: 5px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; min-height: 38px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
input[type=checkbox] { min-height: 0; width: 17px; height: 17px; accent-color: var(--blue); }
input[type=number] { width: 96px; }
input.money { width: 128px; text-align: right; }
input.wide { min-width: 240px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 600 14px 'Golos Text', sans-serif; padding: 8px 15px; min-height: 38px; border-radius: var(--r-sm); border: 1.5px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--blue-d); border-color: var(--blue-d); }
button.light, .btn.light { background: #fff; color: var(--blue); border-color: var(--line); }
button.light:hover, .btn.light:hover { border-color: var(--blue); background: #fff; }
button.sm, .btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
button.link { background: none; border: none; color: var(--ink-3); padding: 0; min-height: 0; font-weight: 500; font-size: 13px; text-decoration: underline; }
button.link:hover { color: var(--bad); background: none; }
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin: 12px 0; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 13px; border: 1.5px solid var(--line); border-radius: 20px; font-size: 14px; font-weight: 500; background: #fff; color: var(--ink); cursor: pointer; }
.chip input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.qf { display: grid; gap: 7px; }
.qf > .lbl { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.qrow { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }

/* --- Страница входа ---------------------------------------------------- */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--deep); padding: 16px; position: relative; overflow: hidden; }
.login-page .tri { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45vh; opacity: .6; }
.login { position: relative; width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 28px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login .logo { color: var(--ink); padding: 0 0 18px; }
.login .logo small { color: var(--ink-2); }
.login label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.login input { width: 100%; margin: 6px 0 14px; }
.login button { width: 100%; }

/* --- Прочее ------------------------------------------------------------- */
.sign { margin-top: 28px; display: none; }
.cb { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cbx { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: #fff; }
.cbx .ph { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; display: block; margin: 2px 0; }
.cbx .w { font-size: 12.5px; color: var(--ink-2); }
.cbx .bt { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.attn { display: grid; gap: 10px; }
.attn a { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); border: 1px solid var(--line-2); }
.attn a:hover { border-color: var(--line); background: var(--bg); }
.attn .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.attn .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.attn .t { font-weight: 600; font-size: 14px; } .attn .d { font-size: 12.5px; color: var(--ink-2); }
.attn .arr { margin-left: auto; color: var(--ink-3); }
.ic.red { background: var(--bad-soft); color: var(--bad); } .ic.amb { background: var(--warn-soft); color: var(--warn); } .ic.blue { background: var(--blue-soft); color: var(--blue); } .ic.ok { background: var(--ok-soft); color: var(--ok); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wday { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 140px; }
.wday.today { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.wday.weekend { background: #fbfcfe; }
.wday h3 { margin: 0 0 8px; font-size: 12.5px; display: flex; justify-content: space-between; }
.sh { border-radius: var(--r-sm); padding: 7px 9px; margin-bottom: 6px; font-size: 13px; background: var(--blue-soft); border-left: 3px solid var(--blue); }
.sh.confirmed { background: var(--ok-soft); border-left-color: var(--ok); }
.sh.past { background: var(--warn-soft); border-left-color: var(--warn); }
.sh b { display: block; font-weight: 600; }
.sh .t { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; font-family: 'Golos Text'; font-weight: 400; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

/* --- Мобильная версия -------------------------------------------------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px 12px; }
  .side .tri, .side .nav .grp { display: none; }
  .logo { padding: 2px 4px 8px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav a { flex: none; padding: 7px 10px; }
  .nav a.on { box-shadow: inset 0 -3px 0 var(--sky); }
  .side-foot { margin-top: 6px; padding-top: 8px; }
  main { padding: 18px 16px 48px; }
  .demo-banner { padding: 7px 16px; }
  .cols { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .wday { min-height: 0; }
  .kpi .value { font-size: 20px; }
  input.wide { min-width: 0; width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
}

/* --- Печать: строго, как в ваших документах ---------------------------- */
@media print {
  body { background: #fff; color: #000; font: 11pt/1.4 'Golos Text', Arial, sans-serif; }
  .app { display: block; }
  .side, .noprint, .formrow, .periodnav, .demo-banner, .flash, .error, .warn, .info, button, form, .actions { display: none !important; }
  main { padding: 0; max-width: none; }
  h1, h2, h3 { font-family: 'Golos Text', Arial, sans-serif; letter-spacing: 0; color: #000; }
  .scroll, .card, .kpi { border: 0; border-radius: 0; padding: 0; background: #fff; overflow: visible; }
  table { font-size: 10.5pt; }
  th, td { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; padding: 4px 6px; }
  .tag { background: none !important; color: #000 !important; border: 1px solid #000; }
  .sheet { page-break-inside: avoid; margin-bottom: 18pt; }
  .sign { display: block; }
  a { color: #000; text-decoration: none; }
}

/* --- v0.4 ---------------------------------------------------------------- */
a.sh { display: block; color: inherit; text-decoration: none; }
a.sh:hover { box-shadow: 0 0 0 2px var(--blue-soft); }
.sh .tag { margin-top: 4px; }
.sh.mine b::after { content: " · я"; font-weight: 400; color: var(--ink-3); }
.reqrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.reqrow:first-of-type { border-top: 0; }
.cbline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cbline input { width: 18px; height: 18px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; margin: 0 0 10px; }
.backlink:hover { color: var(--blue); }
.list a.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); background: #fff; }
.list a.row:hover { border-color: var(--line); background: var(--bg); }
.list { display: grid; gap: 8px; }
.list .row .m { font-size: 13px; color: var(--ink-2); }
.sec { margin-bottom: 18px; }
.task { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; background: #fff; margin-bottom: 8px; }
.task .h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.task .h b { font-size: 15px; }
.task .d { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.task.overdue { border-left: 3px solid var(--bad); }
.app > div { min-width: 0; }
@media (max-width: 900px) {
  .qrow { gap: 10px 12px; }
  .qrow > .qf, .qrow > label.qf { flex: 1 1 140px; min-width: 0 !important; }
  .qf input:not([type=checkbox]):not([type=radio]), .qf select { width: 100%; }
  .qrow > input[type=text] { min-width: 0 !important; flex: 1 1 100%; }
  .top { flex-wrap: wrap; }
  .cbx select, .cbx input { min-width: 0; }
  .task .h { flex-direction: column; gap: 2px; }
}
.cols > *, .grid2 > *, .stack > * { min-width: 0; }
.qf { min-width: 0; }
.qf > input, .qf > select { max-width: 100%; }
@media (max-width: 600px) {
  .qrow { flex-direction: column; align-items: stretch; }
  .qrow > .qf, .qrow > label.qf { flex: none; }
}

/* --- v0.5: сообщения, всплывающие карточки, тона разделов -------------------- */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 50; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(8, 24, 48, .18); font-size: 14px; font-weight: 500; transition: opacity .4s; }
.toast.ok { background: #e8f6ef; color: #155c3d; border: 1px solid #bfe5d0; }
.toast.bad { background: #fdecea; color: #8f2219; border: 1px solid #f3c2bc; }
.toast.hide { opacity: 0; pointer-events: none; }
.toast-x { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; padding: 0 2px; min-height: 0; cursor: pointer; }
.toast-x:hover { background: none; }
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  box-shadow: 0 24px 60px rgba(8, 24, 48, .35); background: var(--bg); overflow: hidden; }
dialog.modal::backdrop { background: rgba(10, 22, 40, .45); }
dialog.modal .modal-body { padding: 22px 24px 24px; overflow-y: auto; max-height: calc(100vh - 40px); }
dialog.modal .modal-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); z-index: 2; }
dialog.modal .modal-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
dialog.modal .modal-x:hover { color: var(--ink); background: #fff; }
.modal-content .backlink { display: none; }
.modal-content .top { padding-right: 40px; }
.modal-content .cols { grid-template-columns: 1fr; }
/* Тона разделов: неброская подложка и цветная полоса слева, чтобы блоки не сливались. */
.card.tone-blue { background: #f4f8ff; border-color: #d6e3fa; box-shadow: inset 4px 0 0 var(--blue); }
.card.tone-amb { background: #fffaf1; border-color: #f2dfbd; box-shadow: inset 4px 0 0 var(--warn); }
.card.tone-green { background: #f3fbf7; border-color: #cfeadc; box-shadow: inset 4px 0 0 var(--ok); }
.card.tone-red { background: #fff6f5; border-color: #f3cfca; box-shadow: inset 4px 0 0 var(--bad); }
.card { box-shadow: 0 1px 2px rgba(8, 24, 48, .04); }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.sec-title h2 { margin: 0; }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸"; color: var(--ink-3); font-size: 14px; transition: transform .15s; }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card > summary h2 { margin: 0; }
details.card[open] > summary { margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; font-weight: 600; font-size: 14px; color: var(--ink-2); text-decoration: none; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--blue); border-bottom-color: var(--blue); }
.tabs a .tag { margin-left: 6px; }
.big { font: 600 30px/1.15 'Unbounded'; letter-spacing: -.03em; }
.pp { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.pp .chips { gap: 4px; }
.pp .custom { display: flex; gap: 6px; align-items: center; }
.pp .custom input { width: 150px; }
.selfilter { display: grid; gap: 6px; }
.selfilter select { width: 100%; }
@media (max-width: 600px) { .pp .custom { flex-wrap: wrap; } .pp .custom input { width: 100%; } dialog.modal .modal-body { padding: 18px 16px; } }
.thread { margin-top: 8px; border-left: 2px solid var(--line); padding-left: 10px; display: grid; gap: 6px; }
.cmt { font-size: 13.5px; }
.cmt b { font-weight: 600; }
details.card .task { background: #fff; }
.sh .shlink { color: inherit; text-decoration: none; display: block; }
.sh .parts { display: block; font-size: 12px; margin-top: 2px; }
.sh .parts a { color: var(--blue-d); }
.sh.compact { padding: 4px 6px; font-size: 12px; margin-bottom: 4px; }
.sh.compact b { display: inline; font-size: 12px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .mh { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.mday { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; min-height: 96px; min-width: 0; }
.mday.other { opacity: .45; }
.mday.today { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.mday.weekend { background: #fbfcfe; }
.mday .mn { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.mday .mn a { color: var(--ink-2); text-decoration: none; }
@media (max-width: 900px) { .month { grid-template-columns: repeat(7, minmax(44px, 1fr)); overflow-x: auto; } .sh.compact b { display: block; } }
.periodnav a.cur { background: var(--blue-soft); color: var(--blue); }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--bg); }

/* v0.6: структура выручки и расходов, изменение в % */
.split { display: grid; gap: 10px; }
.split .sp { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-areas: "nm am pc" "br br br"; gap: 4px 12px; align-items: baseline; }
.split .nm { grid-area: nm; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split .am { grid-area: am; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.split .pc { grid-area: pc; text-align: right; font-size: 12.5px; color: var(--ink-2); }
.split .br { grid-area: br; height: 6px; background: rgba(8, 24, 48, .06); border-radius: 3px; overflow: hidden; }
.split .br i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.tone-amb .split .br i { background: var(--warn); }
.dl { font-weight: 600; white-space: nowrap; margin-left: 4px; }
.periodnav .off { opacity: .3; padding: 0 10px; }
.card h2 .muted { font: 500 14px 'Golos Text'; }
.grid2.gapped { row-gap: 16px; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 18px; white-space: normal; }
}
/* v0.6: сотрудники карточками (зарплата) */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.person { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(8, 24, 48, .04); transition: border-color .15s, transform .15s; }
.person:hover { border-color: var(--blue); transform: translateY(-1px); }
.person .nm { font-weight: 600; }
.person .tt { font: 600 20px/1.3 'Unbounded'; letter-spacing: -.02em; }
.person .dt { font-size: 12.5px; color: var(--ink-2); }
.person.memo { opacity: .65; }
.printonly { display: none; }
@media print { .printonly { display: block; } .people { display: none !important; } }
.heat-legend { display: inline-flex; align-items: center; gap: 8px; font: 400 12px 'Golos Text'; color: var(--ink-2); }
.heat-legend i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, hsl(210,78%,93%), hsl(160,78%,75%), hsl(60,78%,65%), hsl(5,78%,50%)); }
.heat td { border: 2px solid #fff; border-radius: 6px; }
.grid2.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid2.two { grid-template-columns: 1fr; } }
.scroll.tall { max-height: 460px; overflow: auto; }
/* v0.6: календарь мероприятий */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.evcal .mday { min-height: 92px; }
.ev { display: block; margin-top: 4px; padding: 5px 7px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 12px; line-height: 1.3;
  border-left: 3px solid; overflow: hidden; }
.ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { color: var(--ink-2); }
.ev.st-planned, .legend i.st-planned { background: #eaf1ff; border-color: var(--blue); }
.ev.st-held, .legend i.st-held { background: #e7f6ee; border-color: var(--ok); }
.ev.st-cancelled, .legend i.st-cancelled { background: #f1f2f4; border-color: #b7bfcb; }
.ev.st-cancelled b { text-decoration: line-through; color: var(--ink-2); }
.legend i.st-planned, .legend i.st-held, .legend i.st-cancelled { width: 14px; height: 12px; border-radius: 3px; border-left: 3px solid; }
.evcal .wdm { display: none; }
@media (max-width: 600px) {
  .evcal { grid-template-columns: 1fr; gap: 8px; }
  .evcal .mh, .evcal .mday:not(:has(.ev)) { display: none; }
  .evcal .mday { min-height: 0; }
  .evcal .wdm { display: inline; font-weight: 400; color: var(--ink-2); }
}
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.rules ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 14px; line-height: 1.5; }
@media (max-width: 600px) { .rules { grid-template-columns: 1fr; } }
/* v0.7: отпуска и больничные в графике */
.away { font-size: 12px; padding: 4px 7px; margin: 4px 0; border-radius: 6px; background: #f3effc; color: #5b3f9e; border-left: 3px solid #8a6ad8; }
.away.clash { background: #fff1ef; color: var(--bad); border-left-color: var(--bad); font-weight: 600; }

/* v0.7: памятка */
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.guide section { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; }
.guide h2 { margin: 0 0 10px; font-size: 17px; }
.guide ol, .guide ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; font-size: 14.5px; }
@media (max-width: 600px) { .guide { grid-template-columns: 1fr; } }
@media print { .guide { display: block; } .guide section { border: 0; padding: 0 0 8pt; page-break-inside: avoid; } }
/* v0.8: каналы уведомлений */
.channels { display: grid; gap: 10px; }
.channels .ch { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
.channels .ch > b { min-width: 80px; }
.code { font: 600 18px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; }
