/* ============================================================
   Натурпродукт · кабинет операционного директора
   Основа — Compo Design System v2.0 (как srm-demo), без логотипа Compo.
   Palette: --primary #3A5CCC · Navy #171D45 · slate-нейтрали · Montserrat
   Правила: без градиентов, без emoji, плоские карточки, ховер сплошным
   цветом, фокус-кольцо 2px, радиусы 8/12.
   ============================================================ */

:root {
  --primary:       #3A5CCC;
  --primary-hover: #4C6EDB;
  --primary-soft:  #EEF2FF;
  --navy:          #171D45;
  --navy-hover:    #232A5C;

  --ink:    #0F172A;
  --ink-2:  #334155;
  --ink-3:  #64748B;
  --line:   #E2E8F0;
  --line-strong: #CBD5E1;
  --surface: #F8FAFC;
  --card:    #FFFFFF;

  --ok:      #15803D;
  --ok-bg:   #E9F7EE;
  --warn:    #B45309;
  --warn-bg: #FDF3DC;
  --bad:     #B91C1C;
  --bad-bg:  #FBEAEA;
  --gray:    #64748B;
  --gray-bg: #F1F5F9;
  --info:    var(--primary);
  --info-bg: var(--primary-soft);

  --sidebar-w: 208px;
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --shadow-1: 0 1px 3px rgba(23, 29, 69, 0.08);
  --shadow-2: 0 4px 12px rgba(23, 29, 69, 0.06);
  --shadow-3: 0 12px 28px rgba(23, 29, 69, 0.08);
  --font: "Montserrat", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 13px; }
body {
  font-family: var(--font); background: var(--surface); color: var(--ink);
  line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.96rem; }
h4 { font-size: 0.86rem; }
a { color: var(--primary); text-decoration: none; transition: color 150ms var(--ease); }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; color: inherit; }
:is(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ic { display: inline-flex; vertical-align: -0.18em; flex: none; }
.ic svg { display: block; }

/* ---------- Утилиты ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.small { font-size: 0.8rem; }
.tiny { font-size: 0.72rem; }
.strong { font-weight: 600; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upper { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; font-weight: 600; color: var(--ink-3); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); } .brand-t { color: var(--primary); }
.hidden { display: none !important; }
.no-print {}

/* ---------- Каркас ---------- */
body.nav-rail { --sidebar-w: 64px; }
body.nav-rail .brand-name, body.nav-rail .brand-sub, body.nav-rail .nav-group-title, body.nav-rail .sidebar-foot, body.nav-rail .nav-item .lbl { display: none; }
body.nav-rail .sidebar { padding: 14px 10px; }
body.nav-rail .brand { justify-content: center; padding: 4px 0 14px; }
body.nav-rail .nav-item { justify-content: center; padding: 9px 0; position: relative; }
body.nav-rail .nav-item .cnt { position: absolute; top: 2px; right: 6px; font-size: 0.58rem; padding: 0 4px; min-width: 14px; height: 14px; line-height: 14px; }
body.nav-rail .nav-toggle { justify-content: center; }
.nav-toggle { margin-top: auto; }
body.nav-rail .nav-toggle { margin-top: auto; }
.nav-toggle .ic { transition: transform 200ms var(--ease); }
body.nav-rail .nav-toggle .ic { transform: rotate(180deg); }
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff; padding: 18px 12px;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--navy-hover); }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: var(--r-sm);
  background: #fff; color: var(--navy); display: grid; place-items: center;
  font-weight: 700; font-size: 0.78rem; letter-spacing: -0.02em;
}
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub { font-size: 0.62rem; color: rgba(255,255,255,0.68); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }

.nav-group-title { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); padding: 12px 10px 4px; font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm);
  color: rgba(255,255,255,0.86); font-size: 0.86rem; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; transition: background 150ms var(--ease);
}
.nav-item:hover { background: var(--navy-hover); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item .ico { width: 18px; display: inline-flex; flex: none; }
.nav-item .cnt { margin-left: auto; background: #fff; color: var(--navy); font-size: 0.66rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.nav-item .cnt.hot { background: #F87171; color: #fff; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 0.66rem; color: rgba(255,255,255,0.55); line-height: 1.45; }
.sidebar-foot a { color: inherit; text-decoration: underline; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 20px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; min-height: 52px;
}
.topbar .crumb { font-size: 0.82rem; color: var(--ink-3); }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.burger { display: none; }
.gsearch { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; min-width: 300px; color: var(--ink-3); position: relative; }
.gsearch input { border: none; background: none; font-family: inherit; font-size: 0.84rem; flex: 1; color: var(--ink); outline: none; }
.gsearch-drop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-3); z-index: 60; max-height: 380px; overflow: auto; }
.gsearch-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 0.82rem; cursor: pointer; }
.gsearch-item:hover { background: var(--primary-soft); }
.gsearch-item .k { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); width: 82px; flex: none; }
.period { display: flex; gap: 2px; background: var(--gray-bg); border-radius: 999px; padding: 3px; }
.period button { border: none; background: none; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; cursor: pointer; color: var(--ink-2); font-weight: 500; transition: background 150ms var(--ease); }
.period button:hover { background: var(--line); }
.period button.active { background: var(--navy); color: #fff; font-weight: 600; }
.period.inpage { display: none; }
.demo-date { font-size: 0.78rem; color: var(--ink-2); text-align: right; line-height: 1.2; }
.demo-date b { display: block; font-size: 0.9rem; color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); }
.user-chip .ava { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.76rem; }
.user-chip .nm { font-size: 0.8rem; font-weight: 600; line-height: 1.15; }
.user-chip .rl { font-size: 0.68rem; color: var(--ink-3); }
.btn-bell { position: relative; border: none; background: none; cursor: pointer; padding: 7px; border-radius: var(--r-sm); color: var(--ink-2); display: inline-flex; }
.btn-bell:hover { background: var(--gray-bg); }
.btn-bell .dot { position: absolute; top: 0; right: 0; min-width: 15px; height: 15px; background: var(--bad); color: white; font-size: 0.6rem; font-weight: 700; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; }
.demo-flag { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 8px; }

.content { padding: 16px 20px 40px; width: 100%; }
.content > * + * { margin-top: 12px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); font-size: 0.86rem; margin-top: 4px; max-width: 760px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--ink-3); margin-bottom: 6px; }
.back:hover { color: var(--primary); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 7px 13px; border-radius: var(--r-sm); font-size: 0.82rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn:hover { background: var(--gray-bg); border-color: var(--line-strong); color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn.accent { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.btn.accent:hover { background: #000; border-color: #000; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.okb { color: var(--ok); }
.btn.okb:hover { background: var(--ok-bg); border-color: var(--ok); }
.btn.sm { padding: 4px 9px; font-size: 0.76rem; gap: 5px; }
.btn.xs { padding: 2px 7px; font-size: 0.7rem; gap: 4px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--gray-bg); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-icon { padding: 6px; }

/* ---------- Карточки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 14px; min-width: 0; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card.pad-s { padding: 12px 14px; }
.card.tone-bad { border-color: #F3B4B4; background: #FFF7F7; }
.card.tone-warn { border-color: #F1D9A6; background: #FFFBF2; }
.card.tone-brand { border-color: #B9C6F2; background: #F5F7FF; }
.card.tone-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.card.tone-navy h2, .card.tone-navy h3 { color: #fff; }
.card.link { cursor: pointer; transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.card.link:hover { border-color: var(--primary); box-shadow: var(--shadow-2); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title h2, .card-title h3 { flex: 1; min-width: 0; }
.card-title .hint { font-size: 0.74rem; color: var(--ink-3); }
.card-title .more { font-size: 0.78rem; white-space: nowrap; }
.card-title .ic.lead { color: var(--primary); }
.card-body > * + * { margin-top: 10px; }

.grid { display: grid; gap: 10px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.fixed2 { grid-template-columns: 1fr 1fr; }
.grid.side { grid-template-columns: minmax(0, 1fr) 340px; }
.grid.side-l { grid-template-columns: 320px minmax(0, 1fr); }
.grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------- Таблицы ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.tbl th { text-align: left; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; padding: 9px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.tbl td { padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.rowlink { cursor: pointer; transition: background 150ms var(--ease); }
.tbl tbody tr.rowlink:hover { background: var(--primary-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .main-cell { font-weight: 600; }
.tbl .sub-cell { font-size: 0.72rem; color: var(--ink-3); font-weight: 400; }
.tbl.dense td, .tbl.dense th { padding: 6px 9px; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--ink); }

/* ---------- Бейджи ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok   { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad  { background: var(--bad-bg); color: var(--bad); }
.badge.gray { background: var(--gray-bg); color: var(--gray); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.navy { background: var(--navy); color: #fff; }
.badge.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 500; border-radius: var(--r-xs); padding: 1px 7px; background: var(--gray-bg); color: var(--ink-2); white-space: nowrap; }
.tag.fact { background: var(--ok-bg); color: var(--ok); }
.tag.hyp { background: var(--warn-bg); color: var(--warn); }
.tag.fcst { background: var(--info-bg); color: var(--info); }
.tag.src { background: var(--gray-bg); color: var(--ink-3); }
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: -1px; }
.light.ok { background: var(--ok); } .light.warn { background: #D97706; } .light.bad { background: var(--bad); } .light.gray { background: var(--line-strong); }

/* ---------- Формы ---------- */
.form { display: grid; gap: 12px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-size: 0.74rem; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea, .inp {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: inherit; font-size: 0.86rem; background: var(--card); color: var(--ink); transition: border-color 150ms var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.field input[type=radio], .field input[type=checkbox] { width: auto; margin-right: 4px; vertical-align: -1px; }
.field .hint { color: var(--ink-3); font-size: 0.72rem; margin-top: 4px; }
.field .err { color: var(--bad); font-size: 0.72rem; margin-top: 4px; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--bad); }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.searchbar input, .searchbar select { padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: inherit; font-size: 0.82rem; background: var(--card); color: var(--ink); }
.searchbar input[type="search"] { min-width: 220px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 11px; font-size: 0.76rem; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.chip:hover { border-color: var(--line-strong); background: var(--gray-bg); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Табы ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { border: none; background: none; padding: 9px 14px; font-size: 0.84rem; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs a.active, .tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs .cnt { background: var(--gray-bg); color: var(--ink-2); border-radius: 999px; padding: 0 6px; font-size: 0.68rem; font-weight: 600; }

/* ---------- Списки, KV, таймлайн ---------- */
.kv { display: grid; grid-template-columns: minmax(130px, 190px) 1fr; gap: 6px 14px; font-size: 0.84rem; }
.kv dt { color: var(--ink-3); }
.kv dd { font-weight: 500; min-width: 0; }
.timeline { display: grid; }
.tl-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--primary-soft); border: 3px solid var(--primary); margin-top: 3px; }
.tl-item.muted .tl-dot { border-color: var(--line-strong); background: var(--gray-bg); }
.tl-item.ok .tl-dot { border-color: var(--ok); background: var(--ok-bg); }
.tl-when { font-size: 0.7rem; color: var(--ink-3); }
.tl-what { font-size: 0.82rem; }
.list { display: grid; }
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item.link { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--r-sm); }
.list-item.link:hover { background: var(--primary-soft); }
.list-item .ttl { font-weight: 600; font-size: 0.84rem; }
.list-item .sub { font-size: 0.74rem; color: var(--ink-3); margin-top: 2px; }
.list-item .idx { width: 22px; height: 22px; border-radius: 50%; background: var(--gray-bg); color: var(--ink-2); font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 2px; }
.empty { text-align: center; padding: 32px 20px; color: var(--ink-3); font-size: 0.84rem; }
.empty .big { margin-bottom: 8px; color: var(--primary); display: inline-flex; }
.callout { background: var(--primary-soft); padding: 11px 15px; border-radius: var(--r-sm); font-size: 0.82rem; color: var(--ink); }
.callout.warn { background: var(--warn-bg); }
.callout.bad { background: var(--bad-bg); }
.callout.ok { background: var(--ok-bg); }
.proto-note { background: var(--surface); border: 1px dashed var(--line-strong); padding: 8px 13px; border-radius: var(--r-sm); font-size: 0.74rem; color: var(--ink-2); }

/* ---------- Модалка и тосты ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(23, 29, 69, 0.45); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--card); border-radius: var(--r-md); max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 22px; box-shadow: var(--shadow-3); }
.modal.wide { max-width: 860px; }
.modal h3 { margin-bottom: 12px; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--navy); color: white; padding: 11px 16px; border-radius: var(--r-sm); font-size: 0.82rem; box-shadow: var(--shadow-2); animation: toast-in 220ms var(--ease); max-width: 400px; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Печать ---------- */
@media print {
  .sidebar, .topbar, .no-print, .btn { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .grid.side, .grid.side-l, .grid.two-one { grid-template-columns: 1fr; }
  .grid.c6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 80; transform: translateX(-100%); transition: transform 200ms var(--ease); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-3); }
  .sidebar-back { position: fixed; inset: 0; background: rgba(23,29,69,.4); z-index: 70; }
  .burger { display: inline-flex; }
  .gsearch { min-width: 0; flex: 1; }
  .demo-date, .user-chip .nm, .user-chip .rl, .topbar .crumb { display: none; }
  .content { padding: 16px 16px 50px; }
  .grid.fixed2, .form .row2 { grid-template-columns: 1fr; }
  .grid.c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 6px; }
}
@media (max-width: 700px) {
  .topbar .period, .demo-flag { display: none; }
  .period.inpage { display: inline-flex; }
  .content > .period.inpage + * { margin-top: 12px; }
  .grid.c6 { grid-template-columns: 1fr; }
  .user-chip { padding-left: 6px; }
}
@media (max-width: 480px) {
  .period button { padding: 4px 8px; }
}
