/* PLATFORMA — дизайн-система прототипа (светлая тема из UI-направлений) */

:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #FAF8F2;
  --ink: #1C1E22;
  --ink-2: #4A4A44;
  --muted: #8E897B;
  --line: #E6E2D4;
  --accent: #E07B10;
  --accent-dark: #B96309;
  --accent-soft: #FBEFDB;
  --green: #2E8F62;
  --green-soft: #E4F1E9;
  --red: #C44F46;
  --red-soft: #F7E5E3;
  --amber: #C28F0E;
  --amber-soft: #F8EFD2;
  --blue: #447FB5;
  --blue-soft: #E4EDF5;
  --radius: 14px;
  --radius-sm: 9px;
  --font-ui: 'Manrope', 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.warn { color: var(--amber); }
.muted { color: var(--muted); }

/* ── Каркас ─────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 228px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; }
.logo-mark::after { content: ''; width: 12px; height: 3px; background: #fff; border-radius: 2px;
  box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff; }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; }

.nav-group { padding: 10px 12px 2px; }
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 600; font-size: 13.5px; margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-dark); }
.nav-item .ico { width: 18px; text-align: center; flex-shrink: 0; opacity: 0.85; font-size: 14px; }
.nav-item .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.nav-item.active .cnt { color: var(--accent-dark); }

.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 16px 26px;
  border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }

.content { padding: 22px 26px 40px; max-width: 1340px; }

/* ── Компоненты ─────────────────────────────── */
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: #d5d0bf; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.icon-btn { padding: 6px; width: 30px; height: 30px; justify-content: center; color: var(--accent-dark); }
.btn.icon-btn svg { width: 17px; height: 17px; }
.btn.icon-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn.icon-btn:disabled { opacity: .6; cursor: default; }
.btn.icon-btn.spinning svg { animation: spin .8s linear infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { font-size: 14px; font-weight: 800; }
.card-head .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card-head .link { margin-left: auto; color: var(--accent-dark); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.card-body { padding: 14px 18px 16px; }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.kpi .val { font-family: var(--font-mono); font-size: 24px; font-weight: 700; letter-spacing: -0.04em; margin-top: 5px; }
.kpi .val small { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.kpi .trend { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; }
.kpi svg { position: absolute; right: 10px; bottom: 8px; opacity: 0.9; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

/* Таблицы */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl td.num, .tbl .num { font-size: 13px; }

.deal-title { font-weight: 700; }
.deal-id { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.bar { height: 5px; border-radius: 3px; background: #EEEBDF; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: 3px; }

/* Канбан */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 252px; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.kcol-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.kcol-head b { font-size: 13px; }
.kcol-head .sum { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; margin-bottom: 10px; cursor: pointer; }
.kcard:hover { border-color: #d8d2bf; box-shadow: 0 2px 8px rgba(28,30,34,0.06); }
.kcard .t { font-weight: 700; font-size: 13px; margin: 5px 0 2px; }
.kcard .c { color: var(--muted); font-size: 11.5px; }
.kcard .row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.kcard .foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.kcard .foot .due { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* Этапы сделки (таймлайн) */
.stage-line { display: flex; align-items: center; gap: 3px; }
.stage-line i { flex: 1; height: 4px; border-radius: 2px; background: #EAE6D8; }
.stage-line i.done { background: var(--green); }
.stage-line i.cur { background: var(--accent); }

.vtimeline { position: relative; padding-left: 22px; }
.vtimeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.vstep { position: relative; padding: 6px 0 10px; }
.vstep .pt { position: absolute; left: -22px; top: 10px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid #D8D3C2; }
.vstep.done .pt { border-color: var(--green); background: var(--green); }
.vstep.cur .pt { border-color: var(--accent); }
.vstep .nm { font-weight: 700; font-size: 13px; }
.vstep.todo .nm { color: var(--muted); font-weight: 600; }
.vstep .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* Экономика заказа */
.econ { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.econ-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.econ-row.head { font-weight: 800; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.econ-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; }
.econ-row .nm { color: var(--ink-2); }
.econ-row.total .nm { color: var(--ink); }

/* Светофор направлений */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.dir-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; position: relative; }
.dir-card:hover { box-shadow: 0 3px 12px rgba(28,30,34,0.07); }
.dir-card .org { font-size: 11px; color: var(--muted); font-weight: 600; }
.dir-card h3 { font-size: 15px; font-weight: 800; margin: 1px 0 10px; }
.dir-kpis { display: flex; gap: 18px; margin-bottom: 10px; }
.dir-kpis .k .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.dir-kpis .k .v { font-family: var(--font-mono); font-size: 17px; font-weight: 700; }
.status-pill { position: absolute; top: 16px; right: 16px; }

.factor { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-2); padding: 3px 0; }
.factor::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); margin-top: 7px; flex-shrink: 0; }

.reco { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; font-size: 13px; margin-top: 10px; }

/* Логистика */
.ship-steps { display: flex; align-items: flex-start; gap: 0; margin-top: 12px; }
.ship-step { flex: 1; text-align: center; position: relative; }
.ship-step::before { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 3px; background: #EAE6D8; z-index: 0; }
.ship-step:first-child::before { display: none; }
.ship-step.done::before { background: var(--green); }
.ship-step .pt { width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 3px solid #D8D3C2; margin: 0 auto; position: relative; z-index: 1; }
.ship-step.done .pt { background: var(--green); border-color: var(--green); }
.ship-step.cur .pt { border-color: var(--accent); background: var(--accent-soft); }
.ship-step .nm { font-size: 11px; font-weight: 700; margin-top: 6px; }
.ship-step.todo .nm { color: var(--muted); font-weight: 600; }
.ship-step .dt { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

.tk-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; }
.tk-ДЛ { background: #E4EDF5; color: #2D5E8C; }
.tk-ПЭК { background: #F8EFD2; color: #8C6A0B; }
.tk-СДЭК { background: #E4F1E9; color: #1F6B47; }

/* Сверка */
.recon-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.bank-op { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bank-op:last-child { border-bottom: none; }

/* Финплан */
.fin-section { margin-bottom: 4px; }
.fin-row { display: grid; grid-template-columns: 1fr 130px 110px 110px 90px; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.fin-row.head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 1px solid var(--line); }
.fin-row.section { background: var(--surface-2); font-weight: 800; font-size: 12.5px; }
.fin-row.total { font-weight: 800; background: var(--accent-soft); border-radius: 8px; border-bottom: none; }
.fin-row:last-child { border-bottom: none; }
.fin-row .fund { font-size: 11px; color: var(--muted); }

/* Чат / комментарии */
.cmt { display: flex; gap: 10px; padding: 9px 0; }
.cmt .body { flex: 1; }
.cmt .who { font-weight: 700; font-size: 12.5px; }
.cmt .time { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; margin-left: 6px; }
.cmt .txt { font-size: 13px; margin-top: 1px; }
.cmt .file { display: inline-flex; gap: 6px; margin-top: 5px; padding: 3px 10px; background: var(--amber-soft); color: #8C6A0B;
  border-radius: 6px; font-size: 11.5px; font-weight: 700; }

.cmt-input { display: flex; gap: 8px; margin-top: 10px; }
.cmt-input input { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; font-family: inherit; font-size: 13px; background: var(--surface-2); }
.cmt-input input:focus { outline: none; border-color: var(--accent); background: #fff; }

/* Сегмент-переключатель */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; }
.seg button { border: none; background: transparent; padding: 6px 14px; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }

/* Заявка — карточка сделки */
.deal-layout { display: grid; grid-template-columns: 1fr 360px; gap: 14px; align-items: start; }

.empty { color: var(--muted); text-align: center; padding: 30px 0; font-size: 13px; }

/* ── Экран входа (сплит) ───────────────────────────────── */
.auth { display: grid; grid-template-columns: minmax(420px, 1fr) 1.15fr; min-height: 100vh; }

.af { display: flex; flex-direction: column; padding: clamp(26px, 4vw, 50px) clamp(26px, 5vw, 72px); }
.af-brand { display: flex; align-items: center; gap: 12px; }
.af-brand .logo-mark { width: 42px; height: 42px; border-radius: 13px; }
.af-brand .logo-mark::after { width: 18px; height: 4px; box-shadow: 0 -7px 0 #fff, 0 7px 0 #fff; }
.af-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.03em; line-height: 1.05; }
.af-brand-name b { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.af-main { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 392px; width: 100%; margin: 0 auto; padding: 40px 0; }
.af-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); padding: 5px 13px; border-radius: 99px; width: fit-content; margin-bottom: 18px; }
.af-eyebrow svg { width: 14px; height: 14px; }
.af-title { font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.af-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 10px; line-height: 1.55; }

.af-form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.lg-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; display: block; }
.lg-field { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 13px; padding: 0 15px; height: 52px; transition: border-color .15s, box-shadow .15s; }
.lg-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lg-field.err { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.lg-field > svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.lg-field input { flex: 1; border: none; outline: none; background: none; font-size: 15px; font-family: inherit; color: var(--ink); min-width: 0; }
.lg-field input::placeholder { color: var(--muted); }
.lg-eye { width: 30px; height: 30px; border: none; background: none; border-radius: 8px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.lg-eye:hover { background: var(--surface-2); color: var(--ink); }
.lg-eye svg { width: 18px; height: 18px; }

.lg-btn { height: 52px; border: none; border-radius: 13px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 800;
  font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 9px; transition: .16s; margin-top: 6px; cursor: pointer; }
.lg-btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 20px -6px rgba(28,30,34,.25); }
.lg-btn .spin { width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lg-error { display: none; align-items: center; gap: 9px; background: var(--red-soft); border: 1px solid #E8C5C1;
  color: var(--red); border-radius: 11px; padding: 11px 14px; font-size: 13.5px; font-weight: 600; }
.lg-error.show { display: flex; }
.lg-error svg { width: 17px; height: 17px; flex-shrink: 0; }

.af-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding-top: 24px; }

/* правая витрина */
.show { background: linear-gradient(150deg, #E8890C 0%, #9A5407 58%, #5C3204 100%); color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 4vw, 58px); }
.show::after { content: ''; position: absolute; top: -120px; right: -120px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, transparent 66%); opacity: .15; pointer-events: none; }
.show::before { content: ''; position: absolute; bottom: -160px; left: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, #000 0%, transparent 66%); opacity: .18; pointer-events: none; }
.show-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.show-top .dot { width: 7px; height: 7px; border-radius: 99px; background: #fff; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.show-mid { position: relative; z-index: 2; margin: auto 0; }
.show-h { font-family: var(--font-display); font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; max-width: 15ch; }
.show-p { font-size: 15.5px; color: rgba(255,255,255,.72); margin-top: 18px; max-width: 44ch; line-height: 1.55; }
.show-feats { margin-top: 32px; display: flex; flex-direction: column; gap: 15px; }
.show-feat { display: flex; align-items: center; gap: 14px; font-size: 14.5px; font-weight: 600; }
.show-feat .fi { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.show-feat .fi svg { width: 21px; height: 21px; }

.show-card { position: absolute; right: clamp(36px, 4vw, 60px); bottom: clamp(110px, 15vw, 170px); z-index: 3;
  background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: 0 30px 70px -16px rgba(40,22,4,.5);
  padding: 18px; width: 252px; transform: rotate(-3deg); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-10px); } }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-lbl { font-size: 11.5px; color: var(--muted); font-weight: 700; display: block; margin-bottom: 5px; }
.sc-big { font-family: var(--font-mono); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.sc-big small { font-size: .5em; color: var(--muted); }
.sc-delta { font-size: 12px; font-weight: 700; color: var(--green); margin-top: 6px; }
.sc-ring { width: 50px; height: 50px; position: relative; flex-shrink: 0; }
.sc-ring svg { transform: rotate(-90deg); }
.sc-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--accent-dark); }
.sc-bars { display: flex; align-items: flex-end; gap: 3px; height: 32px; margin-top: 14px; }
.sc-bars span { flex: 1; background: var(--accent-soft); border-radius: 3px; }
.sc-bars span.on { background: var(--accent); }

.show-bars { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 30px; }
.show-bars span { flex: 1; background: rgba(255,255,255,.26); border-radius: 99px; min-height: 6px; }

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .show { display: none; }
}

/* ── Сворачиваемый навибар ─────────────────────────────── */
.sidebar { transition: width .18s ease; }
.nav-item svg, .nav-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .ico { display: flex; align-items: center; justify-content: center; width: 20px; }
.nav-toggle { position: absolute; top: 24px; right: -12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 20; }
.nav-toggle:hover { color: var(--accent-dark); border-color: var(--accent); }
.nav-toggle svg { width: 13px; height: 13px; transition: transform .18s; }
.sidebar { position: sticky; }
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .logo-name, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-item .txt,
.sidebar.collapsed .nav-item .cnt, .sidebar.collapsed .sidebar-foot .uinfo, .sidebar.collapsed .sidebar-foot .uout { display: none; }
.sidebar.collapsed .logo { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .nav-group { padding: 10px 8px 2px; }
.sidebar.collapsed .sidebar-foot { justify-content: center; padding: 14px 8px; }
.sidebar.collapsed .nav-toggle svg { transform: rotate(180deg); }

.stage-controls { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }

/* Редактирование финплана и настройки */
.fin-inp { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-family: var(--font-mono);
  font-size: 12.5px; background: var(--surface-2); width: 110px; color: var(--ink); }
.fin-inp:focus { outline: none; border-color: var(--accent); background: #fff; }
select.fin-inp { font-family: var(--font-ui); width: auto; }
.fin-del { color: var(--red); cursor: pointer; font-size: 16px; font-weight: 700; padding: 0 6px; }
.fin-del:hover { opacity: .7; }

@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-even, .deal-layout { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr; }
}
