@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url(fonts/golos-text-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url(fonts/golos-text-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:700 900;font-display:swap;src:url(fonts/unbounded-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:700 900;font-display:swap;src:url(fonts/unbounded-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root {
  --bg: #16100c; --panel: #241912; --panel2: #1f1510; --line: #3d2c20; --line2: #4a3627;
  --text: #fbf3e6; --muted: #b9a58c; --dim: #94806b;
  --accent: #ff8a2b; --accent2: #ffb547; --teal: #a6dd74; --mint: #7cc96a; --gold: #ffc54a; --red: #ff6a55;
  --lavash: #f3dcae; --ink: #1a0f08;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Golos Text", Arial, sans-serif; font-size: 14px; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
.pos { color: var(--teal); }
.neg { color: var(--red); }
.warn-t { color: var(--gold); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 24px;
  padding: 0 28px; background: rgba(26, 16, 9, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.6px; font-size: 17px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; border: 1px solid #7c5d46; border-radius: 10px; width: 40px; height: 40px; color: var(--accent); font-size: 26px; }
.brand-light { color: var(--accent); }
.brand small { display: block; font-size: 8px; letter-spacing: 2.5px; color: #ad9c85; margin-top: 2px; }
.top-nav { display: flex; gap: 4px; margin-left: 12px; }
.top-nav a { padding: 8px 12px; border-radius: 8px; font-size: 12px; color: #c4b29a; }
.top-nav a:hover { color: var(--accent); background: #332114; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top-actions form { margin: 0; }
.ghost { cursor: pointer; background: transparent; color: #eae0d2; border: 1px solid #543d2c; border-radius: 8px; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn { cursor: pointer; background: var(--accent); color: #1b110a; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.wide { width: 100%; padding: 13px; font-size: 15px; }

/* ---------- Раскладка ---------- */
.layout { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 22px; max-width: 1760px; margin: 0 auto; padding: 22px 28px 40px; }
.controls { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #4f3928 transparent; }
.results { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
section, #summary { scroll-margin-top: 84px; }

/* ---------- Карточки параметров ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 12px; }
.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 15px 18px; font-weight: 700; font-size: 15px; }
.card > summary::-webkit-details-marker { display: none; }
.card > summary::after { content: '▾'; margin-left: 8px; color: var(--dim); transition: transform .2s; }
.card:not([open]) > summary::after { transform: rotate(-90deg); }
.card .sum { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #2f2218; color: var(--accent); font-size: 12px; font-weight: 800; flex: none; }
.card-body { padding: 0 18px 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #bfad95; }
.field.inline { margin-top: 14px; }
input[type=number], input[type=text], input[type=password] {
  width: 100%; min-width: 0; background: #22150b; border: 1px solid var(--line2); color: #f6f3ef; border-radius: 8px; padding: 10px; outline: 0; font-size: 14px;
}
input:focus { border-color: var(--accent); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
.hint { font-size: 12px; color: #a38975; line-height: 1.6; margin: 12px 0 0; }
.hint.top { margin: 0 0 10px; }
.msg { font-size: 12px; color: var(--accent); min-height: 0; margin-top: 6px; }
.msg:empty { display: none; }
.msg.bad { color: var(--red); }

.slider-box { margin-bottom: 14px; }
.slider-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #d5c7b4; }
.slider-head b { color: var(--accent); font-size: 26px; font-weight: 800; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 8px 0 2px; background: transparent; cursor: pointer; --pct: 20%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--pct), #4c3626 var(--pct)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--accent); border: 4px solid #19100a; box-shadow: 0 0 0 1px var(--accent); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: #4c3626; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 4px solid #19100a; }
.endpoints { display: flex; justify-content: space-between; color: #9d8069; font-size: 11px; }

.stepper-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: #d5c7b4; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 44px; height: 42px; border: 0; background: #312013; color: var(--accent); font-size: 22px; cursor: pointer; }
.stepper button:hover { background: #3d291a; }
.stepper output { min-width: 52px; text-align: center; font-size: 22px; font-weight: 800; }
.mini-tables { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; min-height: 16px; }
.mini-tables i { width: 30px; height: 16px; border-radius: 50%; background: #3d2614; border: 2px solid #8e6546; }

.list { display: flex; flex-direction: column; gap: 6px; }
.list-head { display: grid; gap: 6px; font-size: 11px; color: var(--dim); margin-bottom: 4px; padding: 0 2px; }
.list-head.staff, .list-row.staff { grid-template-columns: minmax(0, 1fr) 54px 96px 30px; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 30px; gap: 6px; align-items: center; }
.list-row input { padding: 8px 9px; font-size: 13px; }
.del { width: 30px; height: 34px; border: 1px solid transparent; background: transparent; color: #a2846d; border-radius: 7px; cursor: pointer; font-size: 18px; line-height: 1; }
.del:hover { color: var(--red); border-color: #4a302d; background: #261e18; }
.empty { font-size: 12px; color: var(--dim); padding: 8px 2px; line-height: 1.5; }
.add { margin-top: 8px; width: 100%; background: transparent; border: 1px dashed #614835; color: var(--accent); padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.add:hover { border-color: var(--accent); background: #251a12; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { background: #312013; border: 1px solid var(--line2); color: #cbbba5; border-radius: 100px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.chips button::before { content: '+ '; color: var(--accent); }
.chips button:hover { border-color: var(--accent); color: var(--text); }
.auto-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #bfad95; background: #22150b; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; }
.auto-row b { color: var(--text); font-weight: 600; text-align: right; }

.save-row { display: flex; gap: 8px; }
.scenario-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.scenario { display: flex; align-items: center; gap: 4px; background: #22150b; border: 1px solid var(--line); border-radius: 9px; }
.scenario:hover { border-color: #5f4938; }
.sc-open { flex: 1; min-width: 0; text-align: left; background: transparent; border: 0; padding: 9px 10px; cursor: pointer; }
.sc-open b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-open small { display: block; font-size: 11px; color: var(--dim); margin-top: 3px; }

/* ---------- Итоги ---------- */
.verdict { background: linear-gradient(120deg, #2c1e13, #291b10); border: 1px solid #4f3b2b; border-radius: 13px; padding: 18px 22px; font-size: 16px; line-height: 1.6; color: #eae1d5; }
.verdict.bad { background: linear-gradient(120deg, #2a1c1a, #291b10); border-color: #5a3733; }
.verdict b { color: var(--text); }
.verdict b.pos { color: var(--teal); }
.verdict b.neg { color: var(--red); }
.verdict .warn { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; color: var(--gold); }

.kpis { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.kpi, .panel { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.kpi { padding: 18px; min-width: 0; }
.main-kpi { background: linear-gradient(120deg, #392617, #291e15); border-color: #6e5441; }
.main-kpi.loss { background: linear-gradient(120deg, #3a221f, #261e18); border-color: #6a3f3a; }
.main-kpi.loss .big-num { color: var(--red); }
.cap { font-size: 11px; color: #baab98; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.big-num { font-size: clamp(26px, 2.4vw, 38px); font-weight: 800; color: var(--teal); letter-spacing: -1.5px; margin: 12px 0 6px; white-space: nowrap; }
.kpi-num { font-size: clamp(20px, 1.7vw, 28px); font-weight: 800; letter-spacing: -1px; margin: 14px 0 6px; white-space: nowrap; }
.unit { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.sub { font-size: 12px; color: #b4a48e; line-height: 1.45; }

.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.sc-card { text-align: left; cursor: pointer; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.sc-card:hover { border-color: var(--mint); }
.sc-card.base { border-color: #5f4938; background: #231911; }
.sc-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); font-weight: 700; }
.sc-g { font-size: 13px; color: #d5c7b4; }
.sc-card b { font-size: 20px; color: var(--teal); letter-spacing: -.5px; }
.sc-card.loss b { color: var(--red); }
.sc-card small { font-size: 11px; color: var(--dim); }

/* ---------- Панели и графики ---------- */
.panel { padding: 22px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 19px; letter-spacing: -.5px; margin-top: 5px; }
.eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.subdued { color: #aa967c; font-size: 12px; }
.sub-h { font-size: 15px; margin: 24px 0 10px; color: #e2d7c9; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #bbab97; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.pos { background: var(--teal); }
.dot.neg { background: var(--red); }
.dash { width: 16px; border-top: 2px dashed var(--gold); display: inline-block; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: "Golos Text", Arial, sans-serif; }
.chart .grid { stroke: #452f1e; stroke-dasharray: 3 5; }
.chart .axis { fill: #aa9478; font-size: 11px; }
.chart .axis.cur-t { fill: var(--accent); font-weight: 800; font-size: 13px; }
.chart .axis-title { fill: #9a7d67; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.chart .lbl { fill: var(--text); font-size: 12px; font-weight: 700; }
.chart .lbl.dim { fill: #bfad95; font-weight: 600; }
.chart .lbl.gold { fill: var(--gold); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: rgba(255, 255, 255, .04); }
.chart .bar { cursor: pointer; }
.chart .bar:hover rect:nth-child(2) { fill-opacity: .8; }
.chart .cbar:hover { fill-opacity: 1; }

.waterfall { display: flex; flex-direction: column; gap: 7px; }
.wf-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 74px; gap: 10px; align-items: center; font-size: 12px; }
.wf-name { color: #cbbba5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-row.rev .wf-name, .wf-row.profit .wf-name, .wf-row.loss .wf-name { color: var(--text); font-weight: 700; }
.wf-track { position: relative; height: 20px; background: #22160c; border-radius: 4px; }
.wf-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: #7fc8f8; }
.wf-row.rev .wf-bar { background: #956a49; }
.wf-row.profit .wf-bar { background: var(--teal); }
.wf-row.loss .wf-bar { background: var(--red); }
.wf-row.cost .wf-bar { opacity: .85; }
.wf-zero { position: absolute; top: -2px; bottom: -2px; width: 1px; background: #8a6d56; }
.wf-val { text-align: right; font-weight: 700; white-space: nowrap; }
.wf-row.cost .wf-val { color: #c5a6a3; }
.wf-row.profit .wf-val { color: var(--teal); }
.wf-row.loss .wf-val { color: var(--red); }

.donut-wrap { display: flex; gap: 24px; align-items: center; }
.donut-box { position: relative; width: 210px; flex: none; }
#donut { width: 100%; display: block; }
#donut .seg { cursor: pointer; transition: stroke-width .15s; }
#donut .seg:hover { stroke-width: 36; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center small { font-size: 10px; color: #b9a68e; letter-spacing: 1.2px; }
.donut-center strong { font-size: 20px; margin-top: 4px; }
.cost-legend { flex: 1; min-width: 0; }
.cost-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px auto; align-items: center; gap: 8px; font-size: 12px; padding: 7px 0; border-bottom: 1px solid #392719; }
.cost-row .cn { display: flex; align-items: center; gap: 8px; color: #cbbba5; line-height: 1.35; }
.cost-row b { white-space: nowrap; }
.cost-row .pct { color: var(--dim); text-align: right; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

.hall-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 24px; align-items: center; }
.floor-box { background: radial-gradient(ellipse at center, #2c1d11, #21150c); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.floor { width: 100%; max-height: 420px; display: block; }
.ptable { cursor: default; }
.ptable .felt { fill: #3d2614; stroke: #8e6546; stroke-width: 3; }
.ptable .felt-in { fill: none; stroke: #5a3e28; stroke-width: 1.5; }
.ptable.over .felt { stroke: var(--red); }
.ptable .seat { fill: #362417; stroke: #634935; stroke-width: 1.5; }
.ptable .seat.on { fill: var(--accent); stroke: #6f5039; }
.ptable.over .seat.on { fill: var(--red); stroke: #7a403a; }
.ptable .dealer { fill: var(--gold); }
.ptable .tname { fill: #c8ae8b; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; font-family: "Golos Text", Arial, sans-serif; }
.ptable:hover .felt { fill: #4a2e19; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #d5c7b4; }
.gauge-head b { font-size: 30px; font-weight: 800; }
.gauge-track { position: relative; height: 14px; background: #22160c; border-radius: 10px; margin: 10px 0 6px; overflow: hidden; }
.gauge-track .band { position: absolute; left: 40%; width: 40%; top: 0; bottom: 0; background: rgba(166, 221, 116, .09); border-left: 1px dashed #5f4938; border-right: 1px dashed #5f4938; }
.gauge-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; background: linear-gradient(90deg, var(--mint), var(--teal)); }
.gauge-track i.over { background: linear-gradient(90deg, var(--gold), var(--red)); }
.gauge-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.stats div { background: #22160c; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.stats dt { font-size: 11px; color: var(--dim); }
.stats dd { margin: 4px 0 0; font-size: 17px; font-weight: 800; }
.legend-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: 4px; }
.seat-ic { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #362417; border: 1px solid #634935; }
.seat-ic.on { background: var(--accent); }
.dealer-ic { width: 12px; height: 8px; border-radius: 2px; display: inline-block; background: var(--gold); }

.per-guest .pg-head { font-size: 16px; line-height: 1.55; margin: 0 0 16px; color: #eae1d5; }
.pg-bar { position: relative; display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: #22160c; }
.pg-bar i { display: block; height: 100%; border-right: 2px solid var(--panel); }
.pg-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; background: #fff; box-shadow: 0 0 0 2px var(--panel); }
.pg-legend { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.pg-legend div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid #392719; }
.pg-legend span { display: flex; align-items: center; gap: 8px; color: #cbbba5; }
.pg-legend b { white-space: nowrap; }

.table-scroll { overflow-x: auto; }
.heatmap { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; min-width: 520px; }
.heatmap th { color: #b09d84; font-weight: 600; padding: 8px 6px; white-space: nowrap; }
.heatmap tbody th { width: 56px; }
.heatmap th.corner { text-align: left; font-size: 11px; color: var(--dim); }
.heatmap th.cur-col { color: var(--accent); }
.heatmap td { text-align: center; padding: 11px 6px; border-radius: 6px; font-weight: 700; cursor: pointer; white-space: nowrap; color: #f9f6f2; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.heatmap td:hover { outline: 2px solid rgba(255, 255, 255, .5); }
.heatmap td.cur { outline: 3px solid #fff; outline-offset: -1px; }

.report { width: 100%; border-collapse: collapse; font-size: 13px; }
.report td, .report th { padding: 10px 6px; border-bottom: 1px solid #3f2b1c; }
.report td:last-child, .report th:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.report td:first-child { color: #c5b49e; }
.report th { text-align: left; color: #b09d84; font-weight: 600; font-size: 12px; }
.report .group td { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding-top: 16px; border-bottom-color: #4f3928; }
.report .subtotal { background: #342214; }
.report .subtotal td { color: #f0eae1; font-weight: 800; }
.report .final { background: #3b2a1d; }
.report .final td { color: var(--teal); font-weight: 800; font-size: 15px; }
.report .final.loss { background: #3a221f; }
.report .final.loss td { color: var(--red); }
.report .muted td { color: var(--dim); }
.staff-table { min-width: 440px; }
.tag { font-size: 10px; color: var(--accent); border: 1px solid #5c4432; border-radius: 100px; padding: 2px 7px; margin-left: 4px; white-space: nowrap; }

footer { display: flex; gap: 24px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 18px; }
footer div { white-space: nowrap; font-weight: 800; font-size: 12px; }
footer span { color: var(--accent); }
footer p { color: #9e836f; font-size: 12px; line-height: 1.6; max-width: 760px; margin: 0; }

.tip { position: fixed; z-index: 50; pointer-events: none; background: #110a04; border: 1px solid #5f4938; color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: 12px; line-height: 1.55; white-space: pre-line; max-width: 280px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.mobile-bar { display: none; }
.menu-btn, .m-nav { display: none; }
button, summary, a, input[type=range] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stepper.small { border-radius: 9px; }
.stepper.small button { width: 36px; height: 34px; font-size: 20px; }
.stepper.small b { min-width: 52px; text-align: center; color: var(--accent); font-size: 24px; font-weight: 800; }

/* ---------- Вход ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #2c1e13, var(--bg) 60%); }
.login-box { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; }
.login-box h1 { font-size: 28px; letter-spacing: -1px; margin: 28px 0 6px; }
.login-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }
.login-box input { padding: 13px; font-size: 16px; }
.login-error { background: #3a221f; border: 1px solid #6a3f3a; color: #ffc8c2; border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1400px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .main-kpi { grid-column: span 3; }
  .top-nav { display: none; }
}
@media (max-width: 1250px) {
  .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .topbar { height: 60px; padding: 0 12px; gap: 8px; }
  .menu-btn { display: inline-flex; margin-left: auto; width: 46px; height: 42px; align-items: center; justify-content: center; font-size: 20px; }
  .top-actions {
    display: none; position: absolute; right: 12px; top: calc(100% + 6px); flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 220px; padding: 6px; background: #24170d; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  }
  .top-actions.open { display: flex; }
  .top-actions form { width: 100%; }
  .top-actions .ghost { width: 100%; text-align: left; border: 0; padding: 13px 14px; font-size: 15px; border-radius: 8px; }
  .top-actions .ghost:hover, .top-actions .ghost:active { background: #332114; }

  .layout { grid-template-columns: 1fr; padding: 12px 12px calc(86px + env(safe-area-inset-bottom)); gap: 0; }
  body[data-view=results] .controls { display: none; }
  body[data-view=params] .results { display: none; }
  .controls { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .hall-grid { grid-template-columns: 1fr; }
  section, #summary { scroll-margin-top: 122px; }

  .m-nav {
    display: flex; position: sticky; top: 60px; z-index: 15; gap: 6px; overflow-x: auto; margin: -12px -12px 0; padding: 10px 12px;
    background: rgba(26, 16, 9, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .m-nav::-webkit-scrollbar { display: none; }
  .m-nav a { flex: none; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line2); font-size: 14px; color: #cbbba5; }
  .m-nav a.on { background: var(--accent); border-color: var(--accent); color: #1b110a; font-weight: 700; }

  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 12px; align-items: center;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(22, 14, 8, .97); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
  }
  .mb-num { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .mb-num small:first-child { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; }
  .mb-num b { font-size: 20px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
  #mbBreak { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-tabs { display: flex; gap: 3px; padding: 3px; background: #22150b; border: 1px solid var(--line2); border-radius: 12px; flex: none; }
  .mb-tabs button { border: 0; background: transparent; color: #cbbba5; height: 44px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 15px; cursor: pointer; }
  .mb-tabs button[aria-selected=true] { background: var(--accent); color: #1b110a; }

  /* крупные поля и кнопки под палец; 16px — чтобы iPhone не приближал страницу при вводе */
  input[type=number], input[type=text], input[type=password] { font-size: 16px; padding: 11px 10px; min-height: 46px; }
  .list-row input { font-size: 16px; padding: 10px 8px; }
  .card > summary { padding: 16px; min-height: 56px; font-size: 16px; }
  .card-body { padding: 0 14px 16px; }
  .field { font-size: 13px; }
  .del { width: 40px; height: 46px; font-size: 22px; }
  .add { padding: 13px; font-size: 15px; }
  .chips { gap: 8px; }
  .chips button { padding: 10px 14px; font-size: 14px; }
  .stepper button { width: 52px; height: 48px; }
  .stepper.small button { width: 44px; height: 42px; }
  .btn { padding: 12px 16px; font-size: 15px; }
  .sc-open { padding: 12px; }
  .sc-open b { font-size: 15px; }
  .sc-open small { font-size: 12px; }
  .hint { font-size: 13px; }
  input[type=range] { height: 40px; }
  input[type=range]::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -12px; }
  input[type=range]::-moz-range-thumb { width: 22px; height: 22px; }
}
@media (max-width: 700px) {
  .brand small { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 22px; }
  .brand { font-size: 15px; gap: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  .main-kpi { grid-column: span 2; }
  .kpi { padding: 14px; }
  .kpi-num { font-size: 22px; margin: 10px 0 4px; }
  .big-num { font-size: 32px; margin: 8px 0 4px; }
  .sub { font-size: 12px; }
  .scenarios { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .sc-card { padding: 12px 14px; }
  .verdict { font-size: 15px; padding: 14px 15px; margin-top: 12px; }
  .results { gap: 12px; }
  .row2 { gap: 12px; }
  .panel { padding: 16px 14px; }
  .panel-head { margin-bottom: 12px; }
  .panel-head h2 { font-size: 18px; }
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .donut-box { margin: 0 auto; width: 200px; }
  .cost-row { font-size: 13px; padding: 8px 0; }
  .wf-row { grid-template-columns: minmax(84px, 36%) 1fr 62px; gap: 6px; font-size: 12px; }
  .wf-track { height: 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .floor-box { padding: 8px; }
  .heatmap { min-width: 0; border-spacing: 2px; font-size: 11px; }
  .heatmap th { padding: 6px 2px; font-size: 11px; }
  .heatmap tbody th { width: 34px; }
  .heatmap td { padding: 10px 2px; }
  .report { font-size: 13px; }
  .report td, .report th { padding: 10px 4px; }
  .staff-table { min-width: 0; font-size: 12px; }
  .staff-table td, .staff-table th { padding: 9px 3px; }
  .tag { display: none; }
  .pg-head { font-size: 15px; }
  footer { display: block; padding-bottom: 8px; }
  footer p { margin-top: 10px; }
  .grid2 { gap: 10px; }
  .list-row { grid-template-columns: minmax(0, 1fr) 108px 40px; gap: 5px; }
  .list-head.staff, .list-row.staff { grid-template-columns: minmax(0, 1fr) 50px 92px 40px; gap: 5px; }
}

/* ---------- Печать / PDF ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .controls, .mobile-bar, .tip, .hint { display: none !important; }
  .layout { display: block; padding: 0; }
  .results { gap: 12px; }
  .panel, .kpi, .verdict, .sc-card { break-inside: avoid; }
  .row2 { grid-template-columns: 1fr; }
}
.hint.top-sub { margin: 6px 0 0; }


/* ---------- ШАВА: фирменное ---------- */
body { background:
  radial-gradient(900px 420px at 12% -120px, rgba(255, 138, 43, .13), transparent 70%),
  radial-gradient(700px 380px at 100% 0, rgba(255, 181, 71, .06), transparent 70%), var(--bg); background-attachment: fixed; }
.brand, .panel-head h2, .big-num, .kpi-num, .login-box h1, .slider-head b, .stepper output, .stepper.small b, .gauge-head b, .sc-card b, footer div {
  font-family: Unbounded, "Golos Text", Arial, sans-serif; }
.brand { font-weight: 900; letter-spacing: -.2px; font-size: 16px; }
.brand-mark { background: radial-gradient(circle at 50% 35%, #3b2414, #21140c); border-color: #6b4327; }
.brand-light { color: var(--accent); }
.panel-head h2 { font-size: 17px; letter-spacing: -.3px; font-weight: 800; }
.big-num { letter-spacing: -1px; font-weight: 900; }
.kpi-num { letter-spacing: -.6px; font-weight: 800; font-size: clamp(18px, 1.5vw, 25px); }
.sc-card b { font-size: 18px; }
.btn { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: var(--ink); }
.eyebrow { color: var(--accent2); }
.num { background: #3a2312; }
.main-kpi { background: linear-gradient(120deg, #26311a, #22190f); border-color: #4f6a36; }
.verdict { background: linear-gradient(120deg, #2e2014, #241912); border-color: #5a3d24; }
.verdict.bad { background: linear-gradient(120deg, #36191a, #241912); }
.wf-row.rev .wf-bar { background: var(--lavash); }
.top-gap { margin-top: 12px; margin-bottom: 0; }
.top-gap b { color: var(--accent2); }
#payback { white-space: normal; line-height: 1.15; }

.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.formats button { cursor: pointer; text-align: left; background: #2b1c11; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
.formats button b { font-size: 13px; }
.formats button small { font-size: 11px; color: var(--dim); }
.formats button:hover { border-color: var(--accent); }
.formats button.on { border-color: var(--accent); background: #3a2414; box-shadow: inset 0 0 0 1px var(--accent); }

.mini-spits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; min-height: 34px; }
.mini-spits i { position: relative; width: 16px; height: 32px; border-radius: 8px 8px 6px 6px; background: linear-gradient(180deg, #c4733a, #8a4b25 60%, #6d3a1c); box-shadow: inset -3px 0 0 rgba(0, 0, 0, .18); }
.mini-spits i::before { content: ''; position: absolute; left: 7px; top: -5px; bottom: -5px; width: 2px; background: #b9a58c; border-radius: 2px; z-index: -1; }
.mini-spits i::after { content: ''; position: absolute; left: -5px; right: -5px; bottom: -6px; height: 4px; border-radius: 2px; background: var(--accent); filter: blur(1.5px); opacity: .8; }

.legend.under { margin-top: 10px; }
.dot.ok { background: var(--accent2); }
.dash.fire { border-top-color: var(--accent); }
.chart .lbl.fire { fill: var(--accent); }
.chart .hbar { cursor: default; }
.kitchen-tip { margin-top: 12px; }
.sc-card:hover { border-color: var(--accent); }
.tip { border-color: #6b4327; background: #0f0905; }
.login-page { background: radial-gradient(ellipse at top, #3a2414, var(--bg) 60%); }
.login-box h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.4px; }
@media (max-width: 700px) {
  .formats { grid-template-columns: 1fr 1fr; }
  .brand { font-size: 14px; }
}

/* Unbounded шире Golos — крупные цифры чуть меньше, легенда расходов под кольцом на средних экранах */
.big-num { font-size: clamp(24px, 2vw, 32px); letter-spacing: -.5px; }
@media (max-width: 1700px) and (min-width: 701px) {
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 16px; }
  .donut-box { margin: 0 auto; width: 190px; }
}
