/* ARGENT admin — чёрное «стекло» и хром (по образцу админки HIMARY) */
@font-face { font-family: 'Argent Flex'; src: url('/assets/fonts/ArgentFlex-VF.woff2') format('woff2'); font-weight: 200 700; font-stretch: 25% 151%; font-display: swap; }

:root {
  --bg: #0b0b0c;
  --ink: #ededea;
  --ink-2: rgba(237, 237, 234, .68);
  --ink-3: rgba(237, 237, 234, .44);
  --glass: rgba(22, 22, 25, .58);
  --glass-2: rgba(38, 39, 43, .55);
  --glass-hi: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  /* «amber» в именах классов остался от HIMARY: здесь это хром */
  --amber: #d9dce1;
  --amber-2: #8e939a;
  --amber-ink: #0b0b0c;
  --metal: linear-gradient(180deg, #fdfdfd 0%, #c9ccd1 22%, #8d9198 46%, #e9eaec 58%, #a9adb3 76%, #fbfbfb 100%);
  --metal-x: linear-gradient(100deg, #f7f7f7 0%, #aeb2b8 30%, #fdfdfd 48%, #6d7177 70%, #dfe1e4 100%);
  --green: #7ddc9a;
  --red: #ff8a7a;
  --blue: #9ec5ff;
  --violet: #c9a7ff;
  --r: 26px;
  --r-s: 16px;
  --blur: blur(26px) saturate(150%);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .07);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 14px/1.45 'Argent Flex', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.bg { position: fixed; inset: -60px; z-index: -1; background:
  radial-gradient(1100px 680px at 10% -12%, rgba(225, 230, 238, .16), transparent 60%),
  radial-gradient(900px 600px at 110% 18%, rgba(150, 156, 166, .14), transparent 60%),
  linear-gradient(180deg, rgba(11, 11, 12, .55), rgba(11, 11, 12, .92)),
  url('/assets/products/argent-silver/1-1440.jpg') center 40% / cover no-repeat; filter: blur(34px) saturate(60%) brightness(.8); transform: scale(1.08); }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(transparent 40%, rgba(0, 0, 0, .55)); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
::selection { background: rgba(214, 219, 226, .35); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 54px; border-radius: 14px; opacity: .6; animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .15; transform: scale(.92); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- стекло ---------- */
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; position: relative; min-width: 0; animation: rise .5s var(--ease) both; }
.card--warm { background: linear-gradient(150deg, rgba(150, 155, 164, .5), rgba(62, 64, 70, .5) 52%, rgba(22, 22, 25, .6)); border-color: rgba(235, 238, 243, .22); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .18); }
.card--flat { animation: none; }
.card__h { display: flex; align-items: center; gap: 10px; margin: -2px 0 16px; min-height: 34px; }
.card__h h2, .card__h h3 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .01em; }
.card__h small { color: var(--ink-3); font-size: 12.5px; }
.card__h .sp { flex: 1; }
.grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 84px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail__logo { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: #0b0b0c; border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 30px -8px rgba(0, 0, 0, .8); margin-bottom: 10px; overflow: hidden; }
.rail__logo img { width: 100%; height: 100%; }
.rail nav { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 30px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); }
.rail a { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.rail a:hover { background: var(--glass-hi); color: var(--ink); }
.rail a.is-on { background: var(--ink); color: #0b0b0c; box-shadow: 0 6px 20px -6px rgba(255, 255, 255, .5); }
.rail a svg { width: 20px; height: 20px; }
.rail a .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--amber); color: var(--amber-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.rail a::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%); white-space: nowrap; padding: 6px 10px; border-radius: 10px; background: rgba(12, 12, 14, .92); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); opacity: 0; pointer-events: none; transition: .18s var(--ease); z-index: 30; }
.rail a:hover::after { opacity: 1; transform: translate(0, -50%); }
.rail .sp { flex: 1; }
.rail__me { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-2); display: grid; place-items: center; font-weight: 600; }

.main { padding: 18px 26px 60px 8px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; position: sticky; top: 0; z-index: 20; padding: 8px 0; }
.crumbs { display: flex; align-items: center; gap: 4px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); white-space: nowrap; min-width: 0; }
.crumbs b { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 4px 10px 4px 4px; }
.crumbs b i { width: 30px; height: 30px; border-radius: 50%; background: var(--metal); display: grid; place-items: center; font-style: normal; color: var(--amber-ink); font-size: 13px; font-weight: 700; font-stretch: 130%; }
.crumbs b em { font-style: normal; letter-spacing: .22em; font-weight: 600; font-stretch: 140%; background: var(--metal-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crumbs span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.crumbs span::before { content: '›'; margin: 0 8px 0 2px; }
.search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); color: var(--ink-3); cursor: text; transition: border-color .2s; }
.search:hover { border-color: var(--line-2); }
.search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search kbd { font: 500 11px/1 'Argent Flex', system-ui; padding: 6px 8px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--line); color: var(--ink-2); }
.top__r { display: flex; align-items: center; gap: 10px; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--ink); font-weight: 500; white-space: nowrap; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--amber { background: var(--metal); border-color: rgba(255, 255, 255, .5); color: var(--amber-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 30px -12px rgba(220, 225, 232, .55); }
.btn--amber:hover { background: var(--metal-x); }
.btn--light { background: var(--ink); color: #0b0b0c; border-color: transparent; }
.btn--light:hover { background: #fff; }
.btn--ghost { background: transparent; border-color: transparent; backdrop-filter: none; }
.btn--danger { color: var(--red); }
.btn--sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn--icon { width: 42px; padding: 0; }
.btn--sm.btn--icon { width: 34px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--ink) transparent var(--ink) transparent; animation: spin .7s linear infinite; }
.btn--amber.is-busy::after { border-color: var(--amber-ink) transparent var(--amber-ink) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); background: rgba(255, 255, 255, .03); transition: .2s; flex: none; }
.arrow:hover { background: var(--ink); color: #0b0b0c; }
.arrow svg { width: 15px; height: 15px; }
.card--warm .arrow { background: var(--ink); color: #0b0b0c; border-color: transparent; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.field > small { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); outline: none; transition: border-color .2s, background .2s; min-width: 0; }
.textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(214, 219, 226, .7); background: rgba(0, 0, 0, .3); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ededea' stroke-opacity='.6' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.select option { background: #151517; }
.input--sm, .select--sm { height: 36px; border-radius: 11px; padding: 0 12px; font-size: 13px; }
.select--sm { padding-right: 32px; background-position: right 11px center; }
.input--num { text-align: center; padding: 0 6px; }
input[type=number]::-webkit-inner-spin-button { opacity: .3; }
input[type=color] { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .22); padding: 6px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 9px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 160px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .12); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.check input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .25s var(--ease); }
.check input:checked { background: var(--amber); }
.check input:checked::after { transform: translateX(18px); background: #0b0b0c; }
.box { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); background: rgba(0, 0, 0, .2); display: inline-grid; place-items: center; cursor: pointer; margin: 0; vertical-align: middle; }
.box:checked { background: var(--amber); border-color: var(--amber); }
.box:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--amber-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

/* ---------- плитки и пилюли ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: rgba(255, 255, 255, .08); color: var(--ink-2); border: 1px solid var(--line); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill--plain::before { display: none; }
.st-new { color: #eef0f3; background: rgba(214, 219, 226, .14); border-color: rgba(214, 219, 226, .3); }
.st-awaiting_payment { color: #e6d6a6; background: rgba(230, 214, 166, .1); }
.st-paid { color: var(--green); background: rgba(125, 220, 154, .12); border-color: rgba(125, 220, 154, .25); }
.st-processing { color: var(--blue); background: rgba(158, 197, 255, .12); border-color: rgba(158, 197, 255, .25); }
.st-shipped { color: var(--violet); background: rgba(201, 167, 255, .12); border-color: rgba(201, 167, 255, .25); }
.st-delivered { color: #d8f5e2; background: rgba(125, 220, 154, .2); }
.st-canceled { color: var(--ink-3); background: rgba(255, 255, 255, .05); }
.st-returned { color: var(--red); background: rgba(255, 138, 122, .1); border-color: rgba(255, 138, 122, .25); }
.seg-vip { color: #eef0f3; background: rgba(214, 219, 226, .16); border-color: rgba(214, 219, 226, .35); }
.seg-loyal { color: var(--green); background: rgba(125, 220, 154, .12); }
.seg-new { color: var(--blue); background: rgba(158, 197, 255, .12); }
.seg-sleeping { color: var(--violet); background: rgba(201, 167, 255, .1); }
.seg-lead, .seg-lost { color: var(--ink-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
.delta--up { color: var(--green); border-color: rgba(125, 220, 154, .35); background: rgba(125, 220, 154, .08); }
.delta--down { color: var(--red); border-color: rgba(255, 138, 122, .35); background: rgba(255, 138, 122, .08); }
.delta--flat { color: var(--ink-3); border-color: var(--line-2); }
.card--warm .delta--up { color: #eaffef; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); font-size: 12px; }
.tag button { border: 0; background: none; padding: 0; color: var(--ink-3); font-size: 15px; line-height: 1; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { color: var(--ink-3); text-align: center; padding: 30px 10px; margin: 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty-state b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 6px; font-weight: 500; }

/* ---------- заголовок страницы ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.ph h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
.ph p { margin: 6px 0 0; color: var(--ink-2); }
.ph .sp { flex: 1; }
.ph__r { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); white-space: nowrap; font-size: 13px; transition: .2s; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--ink); color: #0b0b0c; font-weight: 500; }
.seg button em { font-style: normal; font-size: 11px; opacity: .6; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; min-height: 168px; }
.kpi__t { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kpi__t span { color: var(--ink-2); font-size: 13.5px; }
.card--warm .kpi__t span { color: rgba(245, 246, 248, .85); }
.kpi__v { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kpi__v b { font-size: clamp(26px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.kpi small { display: block; margin-top: 8px; color: var(--ink-3); font-size: 12px; }
.card--warm .kpi small { color: rgba(235, 238, 243, .7); }
.kpi .spark { width: 100%; height: 30px; margin-top: 10px; opacity: .85; }

/* ---------- сетки страниц ---------- */
.g { display: grid; gap: 16px; margin-bottom: 16px; }
.g-dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.span-2 { grid-column: span 2; }
.big-stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.big-stat__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2); }
.big-stat__ico svg { width: 18px; height: 18px; }
.big-stat b { font-size: 40px; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.big-stat b small { font-size: 18px; color: var(--ink-2); font-weight: 400; margin-left: 6px; }
.big-stat p { margin: 10px 0 0; color: var(--ink-3); }
.big-stat p em { color: var(--amber); font-style: normal; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- графики ---------- */
.chart { position: relative; height: var(--h); margin-bottom: 26px; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .bar { transition: opacity .2s, filter .2s; }
.chart .bar.is-zero { opacity: .25; }
.chart:hover .bar:not(.is-on) { opacity: .55; }
.chart .bar.is-on { filter: brightness(1.4); }
.chart .cursor { stroke: rgba(255, 255, 255, .35); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.chart__x { position: absolute; left: 0; right: 0; bottom: -24px; height: 18px; }
.chart__x span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.chart__tip { position: absolute; top: -10px; transform: translate(-50%, -100%); padding: 7px 12px; border-radius: 12px; background: var(--ink); color: #0b0b0c; font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.chart__tip.is-left { transform: translate(-100%, -100%); }
.chart__tip.is-right { transform: translate(0, -100%); }
.chart script { display: none; }
.legend-inline { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.donut-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut { position: relative; width: 170px; aspect-ratio: 1; }
.donut svg { width: 100%; height: 100%; }
.donut__track { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 18; }
.donut__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__c b { font-size: 26px; font-weight: 500; line-height: 1; }
.donut__c small { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 42px; gap: 10px; align-items: center; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.legend em { font-style: normal; color: var(--ink-3); text-align: right; font-size: 12px; }
.gauge { position: relative; width: 100%; max-width: 240px; margin: 0 auto; }
.gauge svg { width: 100%; display: block; }
.gauge__track { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 14; stroke-linecap: round; }
.gauge__c { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.gauge__c b { display: block; font-size: 30px; font-weight: 500; line-height: 1; }
.gauge__c small { color: var(--ink-3); font-size: 12px; }
.funnel { display: grid; gap: 12px; }
.funnel__label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.funnel__label em { font-style: normal; color: var(--amber); font-size: 12px; }
.funnel__bar { position: relative; height: 34px; border-radius: 12px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.funnel__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 12px; background: linear-gradient(90deg, rgba(214, 219, 226, .85), rgba(214, 219, 226, .25)); transition: width .8s var(--ease); }
.funnel__bar b { position: relative; line-height: 34px; padding-left: 12px; font-weight: 500; font-size: 13.5px; }
.heat { display: grid; gap: 4px; font-size: 10.5px; color: var(--ink-3); overflow-x: auto; }
.heat__h, .heat__r { display: grid; grid-template-columns: 26px repeat(24, minmax(12px, 1fr)); gap: 4px; align-items: center; }
.heat__r i { aspect-ratio: 1; border-radius: 5px; background: rgba(214, 219, 226, var(--a)); outline: 1px solid rgba(255, 255, 255, .04); min-width: 12px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.hbars div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.hbars div span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars i { display: block; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hbars s { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--amber-2), #eef0f3); }
.hbars small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }

/* ---------- списки и таблицы ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -22px -22px; padding: 0 22px 10px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.tbl th { text-align: left; font-weight: 400; font-size: 12px; color: var(--ink-3); padding: 0 12px 12px; white-space: nowrap; letter-spacing: .02em; }
.tbl th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; display: inline-flex; gap: 4px; align-items: center; }
.tbl th button.is-on { color: var(--ink); }
.tbl td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr.is-link { cursor: pointer; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, .035); }
.tbl tbody tr:hover td:first-child { border-radius: 14px 0 0 14px; }
.tbl tbody tr:hover td:last-child { border-radius: 0 14px 14px 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl .w1 { width: 1%; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > div { min-width: 0; }
.who b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.who small { display: block; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #0b0b0c; background: linear-gradient(145deg, hsl(var(--hue, 220) 14% 88%), hsl(var(--hue, 220) 8% 60%)); }
.av--lg { width: 72px; height: 72px; font-size: 24px; }
.thumbs { display: flex; }
.thumbs img, .thumb { width: 40px; height: 48px; border-radius: 10px; object-fit: cover; background: #2a2b2f; border: 2px solid rgba(12, 12, 14, .9); flex: none; }
.thumbs img + img { margin-left: -14px; }
.thumbs em { margin-left: -14px; width: 40px; height: 48px; border-radius: 10px; border: 2px solid rgba(12, 12, 14, .9); background: #1d1e21; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.thumb--lg { width: 64px; height: 78px; border-radius: 14px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li > .sp { flex: 1; min-width: 0; }
.list a.li-link { display: contents; }
.list b { font-weight: 500; }
.bulk { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 20px; border-radius: 999px; background: rgba(20, 20, 23, .9); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: rise .3s var(--ease); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; color: var(--ink-3); font-size: 13px; }

/* ---------- канбан ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.kcol { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 420px; border-radius: var(--r); background: rgba(12, 12, 14, .35); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: background .2s, border-color .2s; }
.kcol.is-over { background: rgba(214, 219, 226, .12); border-color: rgba(214, 219, 226, .45); }
.kcol__h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.kcol__h small { color: var(--ink-3); }
.kcard { padding: 14px; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--line); cursor: grab; transition: transform .15s var(--ease), border-color .2s; }
.kcard:hover { border-color: var(--line-2); }
.kcard.is-drag { opacity: .4; }
.kcard__t { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.kcard__t b { font-weight: 500; }
.kcard p { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------- заказ ---------- */
.o-lines .list > li { padding: 14px 0; }
.totals { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.totals div:last-child { color: var(--ink); font-size: 18px; font-weight: 500; padding-top: 6px; }
.status-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pick button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink-2); font-size: 13px; transition: .2s; }
.status-pick button:hover { border-color: var(--line-2); color: var(--ink); }
.status-pick button.is-on { background: var(--ink); color: #0b0b0c; border-color: transparent; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: -6px; width: 1px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--glass-2); border: 2px solid var(--amber); }
.timeline li.is-note::after { border-color: var(--blue); }
.timeline b { font-weight: 500; }
.timeline small { display: block; color: var(--ink-3); font-size: 12px; }
.timeline p { margin: 6px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); white-space: pre-wrap; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 18px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy { border: 0; background: none; padding: 0 0 0 6px; color: var(--ink-3); vertical-align: middle; }
.copy:hover { color: var(--amber); }
.copy svg { width: 13px; height: 13px; }

/* ---------- клиент ---------- */
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile h2 { margin: 0; font-size: 24px; font-weight: 500; }
.profile .acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 20px; }
.mini { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.mini span { display: block; font-size: 12px; color: var(--ink-3); }
.mini b { display: block; margin-top: 6px; font-size: 20px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags input { width: 140px; }

/* ---------- товары ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { padding: 12px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.pcard__img { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--tone, #1d1e21); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__img .pill { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(10px); background: rgba(12, 12, 14, .6); }
.pcard__img .dots { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; padding: 5px; border-radius: 99px; background: rgba(12, 12, 14, .55); backdrop-filter: blur(8px); }
.pcard__img .dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); }
.pcard h3 { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.pcard__m { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pcard__m s { color: var(--ink-3); font-size: 12.5px; margin-left: 6px; }
.pcard__s { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pcard__s div { padding: 8px 6px; border-radius: 12px; background: rgba(255, 255, 255, .04); text-align: center; }
.pcard__s span { display: block; font-size: 10.5px; color: var(--ink-3); }
.pcard__s b { font-size: 14px; font-weight: 500; }
.pcard.is-hidden .pcard__img img { opacity: .4; filter: grayscale(1); }
.stockbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.stockbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--amber-2), #eef0f3); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.editor__side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 16px; }
.sec h3 { margin: 0 0 16px; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.sec h3 small { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.sec + .sec { margin-top: 16px; }
.sizes-ed { display: grid; gap: 8px; }
.sizes-ed > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.color-ed { padding: 16px; border-radius: 20px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); }
.color-ed + .color-ed { margin-top: 12px; }
.color-ed__h { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }
.imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.imgs figure { position: relative; margin: 0; width: 76px; height: 94px; border-radius: 12px; overflow: hidden; background: #1d1e21; cursor: grab; }
.imgs figure img { width: 100%; height: 100%; object-fit: cover; }
.imgs figure button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(12, 12, 14, .75); color: #fff; font-size: 14px; line-height: 1; opacity: 0; transition: .15s; }
.imgs figure:hover button { opacity: 1; }
.imgs figure em { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(12, 12, 14, .75); }
.imgs .add { width: 76px; height: 94px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: none; color: var(--ink-3); display: grid; place-items: center; font-size: 22px; }
.imgs .add:hover { border-color: var(--amber); color: var(--amber); }
.stock-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.stock-row label { display: grid; gap: 4px; text-align: center; font-size: 11.5px; color: var(--ink-3); width: 64px; }
.margin-box { display: flex; justify-content: space-between; padding: 12px 16px; border-radius: 14px; background: rgba(125, 220, 154, .08); color: var(--green); font-size: 13px; }

.matrix { border-collapse: separate; border-spacing: 6px; }
.matrix th { font-weight: 400; font-size: 12px; color: var(--ink-3); padding: 0 4px; }
.matrix th:first-child { text-align: left; }
.matrix td input { width: 64px; height: 38px; border-radius: 11px; text-align: center; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); outline: none; transition: .2s; }
.matrix td input:focus { border-color: var(--amber); }
.matrix td input.is-low { border-color: rgba(214, 219, 226, .55); background: rgba(214, 219, 226, .1); }
.matrix td input.is-out { border-color: rgba(255, 138, 122, .45); background: rgba(255, 138, 122, .08); color: var(--red); }
.matrix td input.is-changed { box-shadow: 0 0 0 2px var(--amber); }
.matrix td.cname { padding-right: 14px; white-space: nowrap; }
.matrix td.cname i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, .3); }
.stock-block { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.stock-block:first-of-type { border-top: 0; padding-top: 0; }
.stock-block > img { width: 90px; height: 110px; border-radius: 14px; object-fit: cover; background: #2a2b2f; }
.stock-block h3 { margin: 0 0 8px; font-weight: 500; font-size: 15px; }
.stock-block .matrix-wrap { overflow-x: auto; }

/* ---------- модалка, палитра, тосты ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(4, 4, 5, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal__box { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: 28px; background: rgba(24, 24, 27, .92); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); animation: rise .3s var(--ease); }
.modal__box--wide { width: min(980px, 100%); }
.modal__h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.modal__h h2 { margin: 0; font-size: 20px; font-weight: 500; flex: 1; }
.modal__f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.lib button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; background: #1d1e21; aspect-ratio: 4 / 5; transition: border-color .15s; }
.lib button img { width: 100%; height: 100%; object-fit: cover; }
.lib button.is-on { border-color: var(--amber); }
.lib button.is-on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.lib button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drop { display: grid; place-items: center; gap: 6px; padding: 22px; border-radius: 18px; border: 1.5px dashed var(--line-2); color: var(--ink-3); text-align: center; margin-bottom: 16px; transition: .2s; cursor: pointer; }
.drop.is-over, .drop:hover { border-color: var(--amber); color: var(--ink); background: rgba(214, 219, 226, .06); }
.palette { position: fixed; inset: 0; z-index: 70; background: rgba(4, 4, 5, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .15s; }
.palette__box { width: min(640px, 100%); border-radius: 26px; background: rgba(24, 24, 27, .94); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); overflow: hidden; animation: rise .25s var(--ease); }
.palette__in { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.palette__in input { flex: 1; height: 60px; border: 0; background: none; outline: none; font-size: 17px; }
.palette__res { max-height: 60vh; overflow: auto; padding: 8px; }
.palette__res h4 { margin: 10px 12px 6px; font-size: 11px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.palette__res a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.palette__res a:hover, .palette__res a.is-sel { background: rgba(255, 255, 255, .07); }
.palette__res a .sp { flex: 1; min-width: 0; }
.palette__res a small { display: block; color: var(--ink-3); font-size: 12px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 10px; }
.toast { padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #0b0b0c; font-weight: 500; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: rise .3s var(--ease); max-width: 360px; }
.toast--err { background: #ffb1a6; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login__box { width: min(420px, 100%); padding: 34px; }
.login__logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login__logo .rail__logo { margin: 0; }
.login__logo b { display: block; font-weight: 600; font-stretch: 145%; font-size: 21px; letter-spacing: .24em; background: var(--metal-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login__logo small { display: block; color: var(--ink-3); font-size: 12.5px; }
.login form { display: grid; gap: 14px; }
.login .err { color: var(--red); margin: 0; font-size: 13px; }

/* ---------- настройки ---------- */
.set-nav { display: flex; flex-direction: column; gap: 4px; }
.set-nav button { text-align: left; border: 0; background: none; padding: 11px 14px; border-radius: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.set-nav button:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.set-nav button.is-on { background: rgba(255, 255, 255, .09); color: var(--ink); }
.set-nav svg { width: 17px; height: 17px; }
.int { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.int:first-child { border-top: 0; }
.int b { font-weight: 500; }
.int .sp { flex: 1; }
.banner-ed { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px; border-radius: 20px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); }
.banner-ed + .banner-ed { margin-top: 12px; }
.banner-ed__img { display: flex; gap: 4px; height: 120px; border-radius: 14px; overflow: hidden; }
.banner-ed__img img { flex: 1; min-width: 0; object-fit: cover; }

@media print {
  body { background: #fff; color: #000; }
  .bg, .rail, .top, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .card { background: none; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; color: #000; animation: none; }
  .muted, .kv dt { color: #555; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1280px) {
  .g-dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-dash > :first-child { grid-column: span 2; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__side { position: static; }
}
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 50; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: center; }
  .rail .rail__logo, .rail .sp, .rail .rail__me { display: none; }
  .rail nav { flex-direction: row; gap: 2px; padding: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; background: rgba(16, 16, 18, .86); }
  .rail nav::-webkit-scrollbar { display: none; }
  .rail a { width: 46px; height: 46px; flex: none; }
  .rail a::after { display: none; }
  .main { padding: 10px 16px 120px; }
  .top { gap: 8px; margin-bottom: 14px; }
  .crumbs { display: none; }
  .search { height: 44px; }
  .search kbd { display: none; }
  .top__r .btn span, .top__r .hide-sm { display: none; }
  .top__r .btn--amber { width: 44px; padding: 0; }
  .kpis { gap: 10px; }
  .kpi { min-height: 140px; padding: 16px; }
  .kpi__v b { font-size: 24px; }
  .card { padding: 18px; --r: 22px; }
  .tbl-wrap { margin: 0 -18px -18px; padding: 0 18px 10px; }
  .g-dash, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .g-dash > :first-child, .span-2 { grid-column: auto; }
  .big-stat { min-height: 200px; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-wrap .legend { width: 100%; }
  .ph { margin-bottom: 16px; }
  .ph__r { width: 100%; }
  .color-ed__h { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .color-ed__h .hide-sm { display: none; }
  .sizes-ed > div { grid-template-columns: 80px minmax(0, 1fr) auto auto; }
  .banner-ed { grid-template-columns: minmax(0, 1fr); }
  .stock-block { grid-template-columns: minmax(0, 1fr); }
  .stock-block > img { display: none; }
  .bulk { bottom: 92px; left: 16px; right: 16px; transform: none; justify-content: space-between; }
  .toasts { left: 16px; right: 16px; bottom: 96px; }
  .modal { padding: 0; align-items: end; }
  .modal__box { border-radius: 26px 26px 0 0; max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .chart__x span:nth-child(even) { display: none; }
}

[hidden] { display: none !important; }

/* ================= телефон: удобная админка ================= */
.nav-t, .nav-more { display: none; }
.more-nav { display: grid; gap: 4px; margin: 4px 0 8px; }
.more-nav a { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border-radius: 16px; color: var(--ink-2); }
.more-nav a svg { width: 20px; height: 20px; flex: none; }
.more-nav a.is-on, .more-nav a:active { background: rgba(255, 255, 255, .08); color: var(--ink); }
.o-sum { display: flex; align-items: baseline; gap: 14px; margin-left: auto; white-space: nowrap; }
.o-sum b { min-width: 90px; text-align: right; }

@media (max-width: 760px) {
  /* без зума: поля ввода не меньше 16px — иначе iPhone приближает страницу при фокусе */
  input, select, textarea, .input, .select, .textarea { font-size: 16px !important; }
  html { touch-action: manipulation; }
  html, body { overflow-x: hidden; max-width: 100%; }
  @supports (overflow: clip) { html, body { overflow-x: clip; } }

  /* нижняя панель: 4 главных раздела + «Ещё», с подписями */
  .rail nav { overflow: visible; gap: 0; padding: 6px; width: 100%; max-width: 460px; justify-content: space-between; }
  .rail nav > .nav-x { display: none; }
  .rail nav > a, .rail nav > .nav-more { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; flex: 1 1 0; width: auto; height: 56px; border-radius: 18px; }
  .rail nav > .nav-more { border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
  .rail nav svg { width: 21px; height: 21px; }
  .nav-t { display: block; font-style: normal; font-size: 10.5px; line-height: 1; letter-spacing: .01em; }
  .rail nav .dot { top: 6px; right: calc(50% - 20px); }

  /* верх: только поиск и «+» */
  .top { position: sticky; top: 0; z-index: 40; margin: 0 -16px 14px; padding: 10px 16px; background: linear-gradient(rgba(11, 11, 12, .94), rgba(11, 11, 12, .6) 70%, transparent); }
  .ph h1 { font-size: 26px; }

  /* переключатели периода и фильтры — листаются пальцем, без обрезанных краёв */
  .seg, .tabs-row, [data-tabs] { max-width: calc(100% + 32px); margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; border-radius: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; overflow-x: auto; scroll-snap-type: x proximity; }
  .seg button { flex: none; scroll-snap-align: start; background: var(--glass); border: 1px solid var(--line); }
  .seg button.is-on { border-color: transparent; }
  .seg { gap: 6px; }

  /* заказы — карточками */
  .tbl--orders thead, .tbl--cust thead { display: none; }
  .tbl--orders, .tbl--orders tbody, .tbl--cust, .tbl--cust tbody { display: block; width: 100%; min-width: 0; }
  .tbl-wrap:has(.tbl--orders), .tbl-wrap:has(.tbl--cust) { margin: 0; padding: 0; overflow: visible; }
  .tbl--orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id st" "who sum" "th sum"; gap: 8px 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
  .tbl--orders tr:last-child { border-bottom: 0; }
  .tbl--orders td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  .tbl--orders .c-sel, .tbl--orders .c-del { display: none; }
  .tbl--orders .c-id { grid-area: id; }
  .tbl--orders .c-st { grid-area: st; justify-self: end; }
  .tbl--orders .c-who { grid-area: who; }
  .tbl--orders .c-th { grid-area: th; }
  .tbl--orders .c-sum { grid-area: sum; align-self: center; text-align: right; }
  .tbl--orders .c-sum b { font-size: 16px; }
  .tbl--orders .who b, .tbl--cust .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* клиенты — карточками */
  .tbl--cust tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who sum" "meta seg"; gap: 6px 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
  .tbl--cust tr:last-child { border-bottom: 0; }
  .tbl--cust td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; text-align: left; }
  .tbl--cust .c-who { grid-area: who; }
  .tbl--cust .c-sum { grid-area: sum; text-align: right; align-self: center; }
  .tbl--cust .c-city { grid-area: meta; font-size: 13px; padding-left: 50px !important; }
  .tbl--cust .c-seg { grid-area: seg; justify-self: end; }
  .tbl--cust .c-ord, .tbl--cust .c-aov, .tbl--cust .c-last { display: none; }

  /* остальные таблицы листаются вбок внутри карточки, а не тянут страницу */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  /* заказ: товар на всю ширину, сумма под названием */
  .o-lines .list > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
  .o-lines .list > li > img { grid-row: span 2; }
  .o-sum { grid-column: 2; margin: 0; justify-content: space-between; }
  .o-sum b { min-width: 0; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .kv dd { min-width: 0; overflow-wrap: anywhere; }
  .note-form { flex-direction: column; align-items: stretch; }
  .note-form .btn { width: 100%; }

  /* настройки: разделы — горизонтальными вкладками */
  .set-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; margin-bottom: 14px; position: sticky; top: 64px; z-index: 30; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav button { flex: none; white-space: nowrap; padding: 10px 14px; min-height: 44px; }

  /* кнопки и поля — под палец */
  .btn { min-height: 44px; }
  .btn--sm { min-height: 38px; }
  .ph__r { display: flex; flex-wrap: wrap; gap: 8px; }
  .modal__box { max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
  .modal__f { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); margin: 18px -18px calc(-22px - env(safe-area-inset-bottom)); padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: rgba(20, 20, 23, .96); }
  .modal__f .btn { flex: 1; }
}

/* ---------- ARGENT: дополнения ---------- */
.ed-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 110px 110px auto; gap: 8px; align-items: center; }
.ed-row + .ed-row { margin-top: 8px; }
.ed-head { font-size: 11.5px; color: var(--ink-3); }
.ed-row .stock-cell { display: flex; align-items: center; gap: 6px; }
.ed-row .stock-cell .input { text-align: center; }
.plug-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-size: 11.5px; color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
.chrome-text { background: var(--metal-x); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 760px) {
  .ed-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ed-row.ed-head { display: none; }
}

/* Настройки → СДЭК — отправка */
.ship-points { max-height: 340px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; }
.ship-points > li { padding: 0; }
.ship-points > li:first-child { padding-top: 0; }
.ship-points > li.muted { padding: 10px 0; }
.ship-points__b { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; background: none; border: 0; color: inherit; text-align: left; font: inherit; cursor: pointer; border-radius: 10px; }
.ship-points__b:hover:not(:disabled) { background: var(--glass-hi); }
.ship-points__b:disabled { opacity: .5; cursor: default; }
.ship-points__b > b { min-width: 64px; font-weight: 500; }
.ship-points__b > .sp { flex: 1; min-width: 0; }
.ship-points > li.is-on .ship-points__b { background: rgba(255, 255, 255, .07); }
.ship-hint { margin: 8px 0 0; font-size: 12.5px; }
.ship-hint a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px dashed var(--line-2); }
.ship-hint a:hover { color: var(--ink); }
