/* Экран «Наличие по точкам». Значения — из эталона Nalichie.dc.html, цвета через токены tokens.css. */

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.errbar{position:fixed;top:0;left:0;right:0;z-index:100;background:var(--orange);color:#fff;padding:10px 16px;font-weight:600;font-size:14px}

.shell{display:flex;min-height:100vh;background:var(--bg)}

/* ---- левое меню ---- */
.side{width:240px;flex-shrink:0;background:var(--card);border-right:1px solid var(--line);padding:26px 18px 22px;display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;padding:0 6px 22px;text-decoration:none}
.brand-dot{width:34px;height:34px;border-radius:50%;background:var(--green-2);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px}
.brand-name{font-weight:800;font-size:20px;color:var(--green);letter-spacing:-0.01em}
.nav-item{display:flex;align-items:center;gap:10px;min-height:44px;padding:12px 16px;border-radius:var(--r-nav);color:var(--ink-2);font-size:15px;text-decoration:none}
a.nav-item:hover{background:var(--bg);color:var(--ink)}
.nav-item.is-active,.nav-item.is-active:hover{background:var(--green);color:#fff;font-weight:600}
.nav-item.is-soon{color:var(--muted-2);cursor:default}
.ico{width:18px;height:18px;flex-shrink:0;fill:currentColor;opacity:.85}
.ico .ico-line{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.nav-item.is-active .ico .ico-line{stroke:var(--green)}
.ico .ico-hole{fill:var(--card)}
.nav-item.is-active .ico .ico-hole{fill:var(--green)}
.badge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:11px;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.badge[hidden]{display:none}
.badge-orange{background:var(--orange);color:#fff}
.badge-grey{background:#e9ebe6;color:var(--ink-2)}
.side-note{margin-top:auto;background:var(--bg);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:3px}
.side-note-title{font-weight:700;font-size:14px;color:var(--ink)}
.side-note-sub{font-size:12.5px;color:var(--muted)}

/* ---- основная колонка ---- */
.main{flex:1;min-width:0;padding:30px 32px 24px;display:flex;flex-direction:column;gap:18px}

.head{display:flex;align-items:flex-start;gap:14px}
.head-titles{display:flex;flex-direction:column;gap:4px}
.head h1{margin:0;font-size:30px;font-weight:800;color:var(--green);letter-spacing:-0.02em}
.head-sub{font-size:13.5px;color:var(--muted)}
.demo-mark{color:var(--orange);font-weight:600}
.head-pills{margin-left:auto;display:flex;gap:10px}
.pill{display:inline-flex;align-items:center;min-height:44px;padding:11px 18px;border:1px solid var(--line-3);border-radius:var(--r-btn);background:var(--card);font-size:14px;font-weight:600;color:var(--ink);line-height:1.45;white-space:nowrap}
.pill-select{position:relative;padding:0;cursor:pointer}
.pill-select select{appearance:none;-webkit-appearance:none;border:0;background:transparent;font:inherit;font-weight:600;color:var(--ink);line-height:22px;padding:11px 30px 11px 18px;border-radius:var(--r-btn);cursor:pointer;max-width:260px}
.pill-select select:focus-visible{outline:2px solid var(--green-2);outline-offset:2px}
.pill-caret{position:absolute;right:16px;top:50%;transform:translateY(-50%);pointer-events:none}

/* ---- KPI ---- */
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:var(--r-card);padding:20px 22px;display:flex;flex-direction:column;gap:8px;min-width:0}
.kpi-label{font-size:13.5px;color:var(--muted)}
.kpi-val{font-size:34px;font-weight:800;color:var(--green);letter-spacing:-0.03em;line-height:1}
.kpi-val-orange{color:var(--orange)}
.kpi-sub{font-size:13px;color:var(--muted)}
.kpi-sub.is-good{color:var(--green-2);font-weight:600}

/* ---- карточка с таблицей ---- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-card);padding:22px 26px 18px;display:flex;flex-direction:column;gap:12px;min-width:0}
.card-head{display:flex;align-items:baseline;gap:12px}
.card-title{font-weight:700;font-size:17px}
.card-meta{margin-left:auto;font-size:12.5px;color:var(--muted)}

.tbl-wrap{overflow-x:auto;overflow-y:hidden;max-width:100%}
.tbl{width:100%;border-collapse:collapse}
.tbl th{text-align:center;font-size:12.5px;font-weight:600;color:var(--muted);padding:0 8px 10px;white-space:nowrap}
.tbl th.th-dish{text-align:left;padding:0 0 10px;min-width:220px}
.tbl tbody td{height:42px;border-top:1px solid var(--line-2);text-align:center;padding:0 8px}
.tbl tbody td.td-dish{text-align:left;font-weight:500;padding:0 12px 0 0}
.tbl tbody td.td-empty{text-align:left;color:var(--muted)}
.tbl td.n{font-weight:600}
.tbl td.none{color:var(--ghost)}
.chip{display:inline-block;min-width:34px;padding:5px 8px;border-radius:var(--r-chip);font-weight:700;line-height:1.45}
.chip-orange{background:var(--orange-soft);color:var(--orange)}
.chip-amber{background:var(--amber-soft);color:var(--amber)}
.chip-grey{background:var(--grey-soft);color:var(--muted-2)}
.tbl tr.more td{height:44px;color:var(--muted);cursor:pointer;user-select:none}
.tbl tr.more:hover td{background:var(--bg)}
.tbl tr.more td.td-dish{font-weight:400}
.tbl tfoot td{height:44px;border-top:2px solid var(--line-3);text-align:center;font-weight:800;font-size:16px;color:var(--green);padding:0 8px}
.tbl tfoot td.tf-label{text-align:left;font-weight:700;font-size:14px;color:var(--ink);padding:0 12px 0 0}

.legend{display:flex;flex-wrap:wrap;gap:18px;font-size:12.5px;color:var(--muted)}
.legend span{display:flex;align-items:center;gap:6px}
.sw{width:12px;height:12px;border-radius:4px;display:inline-block}
.sw-orange{background:var(--orange-soft);border:1px solid var(--orange)}
.sw-amber{background:var(--amber-soft);border:1px solid var(--amber)}
.sw-grey{background:var(--grey-soft)}

/* ---- узкие экраны: меню сверху, KPI в две колонки ---- */
@media (max-width:900px){
  .shell{flex-direction:column}
  .side{width:auto;height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);flex-direction:row;flex-wrap:wrap;gap:4px;padding:14px 12px}
  .brand{width:100%;padding-bottom:10px}
  .nav-item{padding:8px 12px;font-size:14px}
  .side-note{display:none}
  .main{padding:18px 14px}
  .head{flex-direction:column}
  .head-pills{margin-left:0}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpi-val{font-size:28px}
  .card{padding:16px 14px 14px}
}
