@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.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: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.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: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-latin-700-normal.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 {
  /* stecpoint.ru look: white surfaces, orange accent, charcoal controls, Open Sans.
     layout: white sidebar with the logo + fluid workspace on a peach-to-white wash; cards carry the site's soft blue-grey shadow */
  --bg: #ffffff;
  --wash: #fff5ef;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --line: #eceef1;
  --line-2: #d3d6dd;
  --ink: #1e1e1e;
  --ink-2: #4b4b55;
  --ink-3: #74748b;
  --accent: #fa6d21;
  --accent-text: #dd5510;
  --accent-soft: #fff5ef;
  --accent-ink: #ffffff;
  --grad-accent: linear-gradient(45deg, #f3521f 2.56%, #f78720 100%);
  --grad-dark: linear-gradient(263.3deg, #6b6b71 0%, #323236 100%);
  --info: #38527a;
  --info-soft: #e9eef5;
  --good: #17784c;
  --good-soft: #e2f4e9;
  --warn: #8f5a00;
  --warn-soft: #fdf0cf;
  --bad: #c0362c;
  --bad-soft: #fde7e4;
  --s1: #fa6d21;
  --s2: #2a78d6;
  --s3: #1baf7a;
  --s4: #eda100;
  --grid: #eceef1;
  --shadow-card: 0 8px 16px rgba(56, 82, 122, .08);
  --shadow: 0 8px 24px rgba(56, 82, 122, .16);
  --font-display: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: 22px; line-height: 1.25; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }

/* ---------- shell */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 20px 12px 24px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 6px; }
.brand svg { display: block; width: 150px; height: 28px; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px 6px; }
.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.nav-item:hover { color: var(--accent-text); text-decoration: none; }
.nav-item.on { background: var(--wash); color: var(--accent-text); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.nav-badge { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 9px; background: var(--bad-soft); color: var(--bad); font-variant-numeric: tabular-nums; }
.nav-badge.w { background: var(--warn-soft); color: var(--warn); }
.side-foot { margin-top: auto; font-size: 12px; color: var(--ink-3); padding: 10px 10px 0; border-top: 1px solid var(--line); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; z-index: 2; }
.top h1 { margin-right: auto; }
.btn.burger { display: none; }
.period { display: flex; align-items: center; gap: 4px; }
.period select { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 7px 8px; font-weight: 700; }
.view { flex: 1; overflow: auto; padding: 24px 28px 56px; display: flex; flex-direction: column; gap: 18px; background: linear-gradient(180deg, var(--wash) 0, #ffffff 340px) local; }
.lead { color: var(--ink-2); max-width: 80ch; }

/* ---------- controls: outline orange by default, gradient orange for the main action, charcoal for the selected state */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: transparent; border-radius: 8px; padding: 7px 16px; font-weight: 600; font-size: 14px; line-height: 1.4; cursor: pointer; white-space: nowrap; color: var(--accent-text); transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--wash); text-decoration: none; }
.btn.primary { background: var(--grad-accent); border-color: transparent; color: var(--accent-ink); padding: 8px 20px; }
.btn.primary:hover { box-shadow: 0 6px 14px rgba(243, 82, 31, .28); }
.btn.sm { padding: 3px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.icon { padding: 7px 10px; border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn.icon:hover { border-color: var(--ink-3); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 13px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--accent-text); }
.seg button.on { background: var(--grad-dark); color: #ffffff; }
.bar-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bar-tools .sp { margin-left: auto; }
.inp, select.inp { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 7px 10px; min-width: 0; }
.inp:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(250, 109, 33, .16); }
.inp.search { width: 240px; max-width: 100%; }
td .inp { padding: 3px 6px; width: 84px; text-align: right; font-variant-numeric: tabular-nums; border-radius: 6px; }
td select.inp { width: auto; text-align: left; }
td .inp:disabled { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }

/* ---------- cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; box-shadow: var(--shadow-card); }
.panel-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h .sub { color: var(--ink-3); font-size: 13px; }
.panel-h .sp { margin-left: auto; }
.panel-b { padding: 16px 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: var(--shadow-card); }
.kpi .l { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi .v { font: 700 22px/1.3 var(--font-body); }
.kpi .d { font-size: 12.5px; color: var(--ink-2); }
.up { color: var(--good); font-weight: 700; } .down { color: var(--bad); font-weight: 700; } .flat { color: var(--ink-3); }

/* ---------- chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.plain::before { display: none; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; } .b { font-weight: 700; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); color: var(--ink); border-radius: 8px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow-card); }
.note.warn { border-left-color: #eda100; background: #fffaf0; } .note.bad { border-left-color: var(--bad); background: #fff7f6; }
.note .sp { margin-left: auto; }

/* ---------- tables */
.tw { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.t th { text-align: left; font-weight: 700; color: var(--ink-3); font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.t th.s { cursor: pointer; user-select: none; }
.t th.s:hover { color: var(--accent-text); }
.t th.g { text-align: center; border-left: 1px solid var(--line); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; padding-bottom: 4px; border-bottom: 0; }
.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t td.n, .t th.n { text-align: right; white-space: nowrap; }
.t td.gl, .t th.gl { border-left: 1px solid var(--line); }
.t tbody tr:last-child td { border-bottom: 0; }
.t tr.c { cursor: pointer; }
.t tr.c:hover td { background: var(--wash); }
.t tr.grp td { background: var(--surface-2); font-weight: 700; color: var(--ink-2); font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; }
.t tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); border-bottom: 0; background: var(--surface); }
.t .lv1 td:first-child { padding-left: 28px; color: var(--ink-2); }
.t tr.tot td { font-weight: 700; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.t tr.sec td { font-weight: 700; }
.t td.st, .t th.st { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.t tr.grp td.st, .t tr.tot td.st { background: var(--surface-2); }
.t tr.c:hover td.st { background: var(--wash); }
.t tr.sel td { background: var(--wash); }
.neg { color: var(--bad); } .pos { color: var(--good); }
.cellbar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-left: 6px; }
.more { padding: 12px 16px; border-top: 1px solid var(--line); text-align: center; }
.util { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--grid); width: 140px; gap: 2px; }
.util i { display: block; height: 100%; }

/* ---------- charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font-size: var(--fs, 11px); fill: var(--ink-3); font-family: var(--font-body); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); padding: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; }
.legend .ln { display: inline-block; width: 14px; height: 2px; margin-right: 6px; background: var(--ink-2); }
.tip { position: absolute; pointer-events: none; background: #1e1e1e; color: #ffffff; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; z-index: 5; opacity: 0; transition: opacity .1s; box-shadow: var(--shadow); }
.tip b { font-weight: 700; } .tip .dot { border-radius: 50%; }
.spark { display: inline-block; vertical-align: middle; }

/* ---------- drawer, modal, toast */
.scrim { position: fixed; inset: 0; background: rgba(27, 27, 30, .45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(700px, 100%); background: var(--surface); z-index: 41; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-h h2 { font-size: 20px; }
.drawer-h .tt { flex: 1; min-width: 0; }
.drawer-h .tt .sub { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.drawer-b { padding: 18px 22px 28px; overflow: auto; display: flex; flex-direction: column; gap: 18px; background: linear-gradient(180deg, var(--wash) 0, #ffffff 220px) local; }
.modal { position: fixed; z-index: 51; left: 50%; top: 8%; transform: translateX(-50%); width: min(580px, calc(100% - 32px)); max-height: 84%; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-h h2 { flex: 1; font-size: 18px; }
.modal-b { padding: 18px 20px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; min-width: 0; }
.fld.w { grid-column: 1 / -1; }
.fld .inp { width: 100%; font-size: 14px; color: var(--ink); font-weight: 400; padding: 9px 12px; }
.fld .hint { color: var(--ink-3); font-weight: 400; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 2px 8px; border-radius: 8px; }
.x:hover { background: var(--wash); color: var(--accent-text); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 7px 12px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--grad-dark); color: #ffffff; padding: 11px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); max-width: 420px; }
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.step:last-child { border-bottom: 0; }
.step .ic { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.step.ok .ic { background: var(--good-soft); color: var(--good); }
.step.no .ic { background: var(--wash); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.step .tx { flex: 1; min-width: 0; }
.step .tx .d { color: var(--ink-2); font-size: 13px; }
.prog { height: 6px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--grad-accent); transition: width .35s ease; }
.list { display: flex; flex-direction: column; }
.list .li { display: flex; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.list .li:last-child { border-bottom: 0; }
.list .li .sp { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.tabs button { border: 0; background: none; padding: 12px 12px; font-weight: 700; font-size: 14px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--accent-text); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: 268px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .btn.burger { display: inline-flex; }
  .top { padding: 10px 16px; } .view { padding: 16px 16px 40px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .modal-b { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 120px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- дополнения рабочей системы */
[x-cloak] { display: none !important; }
.t tr.hid { display: none; }
.t th.s .ar { color: var(--accent-text); }
.est { color: var(--warn); font-size: 11px; font-weight: 700; margin-left: 4px; }
.err { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.fld .err { font-weight: 600; }
.user-menu { position: relative; }
.user-menu .dd { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 220px; z-index: 30; padding: 6px; display: flex; flex-direction: column; }
.user-menu .dd a, .user-menu .dd button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; color: var(--ink); font-weight: 600; cursor: pointer; }
.user-menu .dd a:hover, .user-menu .dd button:hover { background: var(--wash); color: var(--accent-text); text-decoration: none; }
.user-menu .dd .who { padding: 6px 10px 8px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.login-wrap { min-height: 100%; display: grid; place-items: center; background: linear-gradient(180deg, var(--wash) 0, #ffffff 420px); padding: 24px 16px; }
.login { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-card); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.login .fld .inp { padding: 10px 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.sheet td { white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.sheet td.rn { color: var(--ink-3); background: var(--surface-2); text-align: right; }
.sheet mark { background: #fdf0cf; }
.loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--grad-accent); z-index: 70; }
textarea.inp { resize: vertical; }
.inp.w100 { width: 100%; }
td .inp.wide { width: 120px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pg { display: flex; flex-direction: column; min-width: 0; height: 100%; min-height: 0; }
