/* Штаб — оформление по образцу КП Профилюкс (22.10.2026): тёмно-синее меню, шрифт Golos, сине-голубая палитра.
   Первая часть — стили КП как есть (на них работают экраны раздела «КП Профилюкс»),
   вторая — то, что нужно только Штабу. Свои классы Штаба не пересекаются с классами КП. */
@font-face { font-family: 'Golos'; src: url('/assets/golos-cyr.woff2') format('woff2'); font-weight: 400 700; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos'; src: url('/assets/golos-lat.woff2') format('woff2'); font-weight: 400 700; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
:root {
  --navy: #1c2040; --blue: #6091be; --blue-2: #3f74a8; --blue-soft: #eaf1f8; --ink: #1d2233; --muted: #636a7c; --line: #e1e6ee;
  --bg: #f4f6fa; --card: #fff; --red: #c0392b; --red-soft: #fdecea; --green: #2f7d5b; --green-soft: #e6f4ec; --amber: #9a6700; --amber-soft: #fff4d6;
  --r: 10px;
  /* акцент данных (графики, тепловая карта) — свой у организации, ставит app.js */
  --accent: #3f74a8;
  --c-full: #5b9a76; --c-mark: #e0a243; --c-wo: #d0543a; --c-staff: #b9c0cc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 'Golos', 'Segoe UI', Roboto, Arial, sans-serif; }
a { color: var(--blue-2); }
h1 { font-size: 22px; margin: 0; color: var(--navy); }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 14px; margin: 0 0 8px; color: var(--navy); }
.muted { color: var(--muted); } .small { font-size: 12px; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ===== Стили КП Профилюкс ===== */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: #c7d0dd; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #2a3060; }
.btn.big { padding: 12px 22px; font-size: 15px; }
.btn.small { padding: 4px 9px; font-size: 12px; font-weight: 500; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue-2); }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.f.req > span::after { content: ' *'; color: var(--red); }
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid #cfd7e3; border-radius: 7px; padding: 7px 9px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(96,145,190,.35); border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: auto; }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-new { background: var(--blue-soft); color: var(--blue-2); }
.st-kp_sent { background: #efe9fb; color: #5b3fa0; }
.st-negotiation { background: var(--amber-soft); color: var(--amber); }
.st-won { background: var(--green-soft); color: var(--green); }
.st-lost { background: #eef0f3; color: #6b7280; }
.st-paused { background: #f1f1f1; color: #555; }
.late { color: var(--red); font-weight: 600; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: #f8fafd; }
table.list tr:last-child td { border-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: inherit; }
.tile b { display: block; font-size: 26px; color: var(--navy); }
.tile span { font-size: 12px; color: var(--muted); }
.dash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.todo-item, .feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.todo-item:last-child, .feed-item:last-child { border-bottom: 0; }
.todo-item a, .feed-item a { text-decoration: none; color: var(--ink); font-weight: 600; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters input { max-width: 260px; margin-left: auto; }
.deal-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.deal-head h1 { flex: 1; min-width: 200px; }
.deal { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; align-items: center; justify-content: center; margin-right: 8px; }
.items { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 70px 100px 110px 30px; gap: 8px; align-items: end; }
.item-row .note { grid-column: 1 / 2; }
.item-row .note2 { grid-column: 2 / -1; }
.item-main { border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.est { margin-top: 12px; background: var(--navy); color: #fff; border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.est b { font-size: 18px; }
.extras-grp { border-top: 1px solid var(--line); padding: 8px 0; }
.extras-grp summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 4px 0; }
.ex-row { display: grid; grid-template-columns: 22px minmax(0,1fr) 60px 100px; gap: 8px; align-items: center; padding: 3px 0; }
.ex-row input[type=number] { padding: 4px 7px; }
.ex-row.off { color: var(--muted); }
.obj-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 30px; gap: 8px; }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 6px; }
.x:hover { color: var(--red); }
.savebar { position: sticky; bottom: 0; margin-top: 14px; background: rgba(244,246,250,.95); backdrop-filter: blur(4px); padding: 12px 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); }
.checks { flex: 1; font-size: 12px; min-width: 200px; }
.checks .e { color: var(--red); } .checks .w { color: var(--amber); }
.saved { font-size: 12px; color: var(--muted); }
.side-col .card { padding: 14px; }
.kp-ver { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.kp-ver.cur { border-color: var(--blue); }
.kp-ver .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kp-ver .acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.kp-ver .stat { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kp-ver .reply { margin-top: 6px; background: var(--green-soft); color: var(--green); border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.ev { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ev .when { font-size: 11px; color: var(--muted); }
.ev.t-kp_viewed, .ev.t-kp_reply { color: var(--green); }
.ev.t-status { color: var(--navy); font-weight: 600; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,24,48,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.modal.wide { width: min(1100px, 100%); height: calc(100vh - 32px); display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 16px; }
.modal iframe { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px; background: #f3f5f9; }
.modal .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.modal.wide .acts { margin-top: 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.err { background: var(--red); }
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.funnel { display: grid; gap: 6px; }
.funnel .bar { display: grid; grid-template-columns: 160px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.funnel .bar i { display: block; height: 18px; background: var(--blue); border-radius: 4px; min-width: 2px; }
.guide { margin-bottom: 10px; font-size: 13px; }
.guide summary { cursor: pointer; color: var(--blue-2); font-weight: 600; }
.guide tr.cur td { background: var(--blue-soft); }
.ex-row input:disabled { background: #f4f6fa; color: #9aa1ad; border-color: var(--line); }

/* ===== Каркас Штаба: меню в стиле КП ===== */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #cfd6e6; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.org-switch { position: relative; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; width: 100%; background: #fff; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.brand .mark { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 34px; }
.brand .mark img { max-width: 100%; max-height: 40px; display: block; }
.brand .word { font-weight: 700; color: var(--navy); font-size: 16px; line-height: 1.15; }
.brand .word small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.caret { color: var(--muted); font-size: 12px; }
.org-sub { font-size: 11.5px; color: #9fb0cf; padding: 6px 4px 0; }
.orgs { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.orgs[hidden] { display: none; }
.orgs button { display: flex; gap: 10px; align-items: center; padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.orgs button:hover { background: var(--bg); }
.orgs button.on { background: var(--blue-soft); }
.orgs button > span:nth-child(2) { flex: 1; min-width: 0; }
.orgs b { display: block; color: var(--navy); }
.orgs small { display: block; color: var(--muted); font-size: 12px; }
.orgs .check { color: var(--blue-2); font-weight: 700; }
.logo-tile { width: 30px; height: 30px; flex: none; border-radius: 8px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
nav#nav { display: flex; flex-direction: column; gap: 2px; }
nav#nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8391b3; margin: 12px 12px 4px; }
nav#nav a { color: #cfd6e6; text-decoration: none; padding: 8px 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
nav#nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
nav#nav a.on { background: rgba(96,145,190,.28); color: #fff; font-weight: 600; }
nav#nav a.soon { color: #7d89a8; pointer-events: none; }
nav#nav .tag { color: #9fb0cf; border-color: rgba(255,255,255,.18); font-weight: 400; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 12px; padding-top: 12px; }
#sync-box { display: flex; flex-direction: column; gap: 8px; color: #9fb0cf; }
#sync-box[hidden] { display: none; }
.btn-ghost { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #e3e8f3; border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost:disabled { opacity: .5; cursor: wait; }
.me { border-top: 1px solid rgba(255,255,255,.12); padding: 8px 4px 0; color: #cfd6e6; }
.me a { color: #9fb0cf; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 28px 10px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar h1 { flex: 1 1 auto; }
.topbar.bare { padding-bottom: 0; position: static; }
.burger { display: none; border: 0; background: none; font-size: 22px; color: var(--navy); padding: 0 4px; cursor: pointer; }
.period { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.period button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 5px 10px; font: inherit; cursor: pointer; }
.period button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.period input { width: auto; padding: 4px 6px; }
#view { padding: 8px 28px 60px; }
#view.stack { display: flex; flex-direction: column; gap: 16px; }
#view.stack > .card + .card { margin-top: 0; }
.scrim { display: none; }

/* ===== Страницы Штаба ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--navy); margin: 4px 0 2px; }
.stat .s { font-size: 12px; color: var(--muted); }
.stat.hl { border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-up { color: var(--green); } .d-down { color: var(--red); }
.card .sub { color: var(--muted); font-size: 12.5px; margin: -6px 0 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.grid2 > .card + .card { margin-top: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.warn { background: var(--amber-soft); border: 1px solid #f0d29a; color: #6b4a10; border-radius: var(--r); padding: 10px 14px; }
.scroll { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
table.tbl th, table.tbl td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; background: #fafbfd; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl td.name { max-width: 300px; }
table.tbl tr:last-child td { border-bottom: 0; }
.heat { border-collapse: separate; border-spacing: 3px; }
.heat td, .heat th { border: 0; padding: 0; text-align: center; }
.heat td { width: 44px; height: 30px; border-radius: 6px; font-size: 11.5px; }
.heat th { padding: 0 4px; font-weight: 400; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #edf0f5; min-width: 120px; }
.fbar span { display: block; height: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.fact b { display: block; font-size: 20px; color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
span.chip { cursor: default; font-size: 12px; padding: 2px 9px; }
.chip.spoil { border-color: var(--c-wo); } .chip.staff { border-color: var(--c-staff); } .chip.compliment { border-color: var(--c-mark); }
svg text { fill: var(--muted); font-family: inherit; }
.loading { color: var(--muted); padding: 30px 0; }

/* задачник */
.task-add { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 8px; align-items: center; }
.task-add input[type=date], .task-add input[type=time], .task-add select { width: auto; }
.tasks { display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); cursor: pointer; }
.task .t { min-width: 0; }
.task .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.task .note { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.task .note.open { -webkit-line-clamp: unset; white-space: pre-line; }
.task.sub { padding-left: 22px; }
.task.done .t > span:first-child { text-decoration: line-through; color: var(--muted); }
.task .acts { display: flex; gap: 4px; }
.task .acts button { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 6px; padding: 2px 7px; font-size: 12px; cursor: pointer; }
.task .acts button:hover { color: var(--ink); border-color: var(--blue); }
.task .acts input { width: auto; }
.due-over { color: var(--red); font-weight: 600; }
.tag-j { border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
details.card summary { cursor: pointer; color: var(--navy); }

/* вход */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { width: min(400px, 100%); display: grid; gap: 12px; }
.login-card .logos { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 4px; }
.login-card .logos img { max-height: 42px; max-width: 160px; }
.login-card h2 { text-align: center; margin: 0; }
.login-card .err { color: var(--red); font-size: 13px; min-height: 18px; }
body.plain { display: grid; place-items: center; min-height: 100vh; padding: 16px; }

@media (max-width: 1100px) {
  .deal { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 20; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(20,24,48,.45); z-index: 15; }
  .burger { display: block; }
  .topbar { padding: 12px 14px 8px; }
  .topbar h1 { font-size: 19px; }
  #view { padding: 4px 14px 40px; }
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 11px 12px; } .stat .v { font-size: 19px; }
  .g2, .g3, .g4, .kpi { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row > :first-child { grid-column: 1 / -1; }
  .item-row .note, .item-row .note2 { grid-column: 1 / -1; }
  table.list .hide-m { display: none; }
  .filters input { max-width: none; margin-left: 0; }
  .task-add { grid-template-columns: 1fr 1fr; } .task-add input[name=title] { grid-column: 1 / -1; }
}

/* ===== Хлебник — своё оформление, как было до 22.10.2026 (решение владельца): тёплый фон, белое меню,
   оранжевый акцент, Century Gothic. Включается классом org-hlebnik на <body>, остальное — стиль КП. ===== */
body.org-hlebnik {
  --bg: #f6f3ee; --card: #ffffff; --line: #ebe4da; --ink: #2b2621; --muted: #8a7f73;
  --h-accent: #E85730; --h-accent-2: #E5451A; --h-soft: #fbe3da; --h-surface-2: #faf7f3;
  --green: #2f8a57; --red: #c8412a;
  --accent: #E85730; --c-full: #6b9e78; --c-staff: #b9ada0;
  font-family: "Century Gothic", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
body.org-hlebnik h1, body.org-hlebnik h2, body.org-hlebnik h3, body.org-hlebnik .stat .v, body.org-hlebnik .fact b,
body.org-hlebnik details.card summary { color: var(--ink); }
body.org-hlebnik .side { background: var(--card); color: var(--ink); border-right: 1px solid var(--line); }
body.org-hlebnik .brand { background: none; border: 1px solid transparent; }
body.org-hlebnik .brand:hover, body.org-hlebnik .brand[aria-expanded="true"] { background: var(--h-surface-2); border-color: var(--line); }
body.org-hlebnik .brand .word { color: var(--ink); }
body.org-hlebnik .org-sub { color: var(--muted); }
body.org-hlebnik .orgs { border: 1px solid var(--line); box-shadow: 0 8px 28px #0002; }
body.org-hlebnik .orgs button.on { background: var(--h-soft); }
body.org-hlebnik .orgs b { color: var(--ink); }
body.org-hlebnik .orgs .check { color: var(--h-accent-2); }
body.org-hlebnik nav#nav .group { color: var(--muted); }
body.org-hlebnik nav#nav a { color: var(--ink); }
body.org-hlebnik nav#nav a:hover { background: var(--h-surface-2); color: var(--ink); }
body.org-hlebnik nav#nav a.on { background: var(--h-soft); color: var(--h-accent-2); font-weight: 700; }
body.org-hlebnik nav#nav a.soon { color: var(--muted); }
body.org-hlebnik nav#nav .tag { color: var(--muted); border-color: var(--line); }
body.org-hlebnik #sync-box { color: var(--muted); }
body.org-hlebnik .btn-ghost { border-color: var(--line); background: var(--h-surface-2); color: var(--ink); }
body.org-hlebnik .btn-ghost:hover { border-color: var(--h-accent); background: var(--h-surface-2); }
body.org-hlebnik .me { border-top-color: var(--line); color: var(--ink); }
body.org-hlebnik .me a { color: var(--h-accent); }
body.org-hlebnik .burger { color: var(--ink); }
body.org-hlebnik .card, body.org-hlebnik .stat { border-radius: 14px; box-shadow: 0 1px 2px #2b26210d, 0 2px 8px #2b262108; }
body.org-hlebnik .stat.hl { border-color: var(--h-accent); box-shadow: 0 1px 2px #2b26210d, 0 2px 8px #2b262108; }
body.org-hlebnik .period button, body.org-hlebnik .tabs button { background: var(--card); }
body.org-hlebnik .period button.on { background: var(--h-accent); border-color: var(--h-accent); color: #fff; }
body.org-hlebnik .tabs button.on { background: var(--h-surface-2); border-color: var(--h-accent); color: var(--h-accent-2); font-weight: 700; }
body.org-hlebnik .btn.primary { background: var(--h-accent); border-color: var(--h-accent); }
body.org-hlebnik .btn.primary:hover { background: var(--h-accent-2); }
body.org-hlebnik table.tbl th { background: none; font-weight: 400; }
body.org-hlebnik .fbar { background: var(--h-surface-2); }
body.org-hlebnik .warn { background: #fff4e0; border-color: #f0d29a; color: #6b4a10; }
body.org-hlebnik a { color: var(--h-accent); }
body.org-hlebnik nav#nav a, body.org-hlebnik .orgs button { text-decoration: none; }
@media (prefers-color-scheme: dark) {
  body.org-hlebnik {
    --bg: #171513; --card: #211e1b; --line: #34302b; --ink: #ece6de; --muted: #9b9085;
    --h-soft: #4a2a20; --h-surface-2: #1c1a17; --c-staff: #5d554d;
  }
  body.org-hlebnik .stat, body.org-hlebnik .card { box-shadow: none; }
  body.org-hlebnik input, body.org-hlebnik select, body.org-hlebnik textarea { background: var(--card); color: var(--ink); border-color: var(--line); }
  body.org-hlebnik .orgs { background: var(--card); }
  body.org-hlebnik .orgs button:hover { background: var(--h-surface-2); }
  body.org-hlebnik .warn { background: #3a2d14; border-color: #6b5222; color: #f0d9a8; }
  body.org-hlebnik .chip, body.org-hlebnik .period button, body.org-hlebnik .tabs button { color: var(--ink); }
}

/* «Смены и зарплата» внутри окна: админка «Смен» в рамке на всю высоту */
.topbar.hidden-bar { display: none; }
#view.embed-view { padding: 0; }
iframe.embed { display: block; width: 100%; height: 100vh; border: 0; background: var(--bg); }
@media (max-width: 860px) {
  .topbar.hidden-bar { display: flex; padding: 8px 14px; }
  iframe.embed { height: calc(100vh - 48px); }
}
