/*
 * Кабинет продавца
 * Стиль: белый фон, серые скруглённые карточки без рамок и теней, жёлтые кнопки с чёрным текстом.
 * Сетка: боковое меню на компьютере, нижняя панель вкладок на телефоне, колонка контента до 1000px.
 * Все цвета — токены ниже; тёмная тема переопределяет только токены. Жёлтый никогда не цвет текста: для ссылок --link.
 */
:root {
  --bg: #ffffff;
  --surface: #f5f4f2;
  --field: #ffffff;
  --ink: #21201f;
  --muted: #75726c;
  --line: #e8e6e1;
  --accent: #fce000;
  --accent-ink: #21201f;
  --accent-soft: #fff6c2;
  --link: #21201f;
  --ok: #1f9d48;
  --warn: #b25e09;
  --warn-soft: #fdf0dc;
  --bad: #e2392b;
  --bad-soft: #fdeceb;
  --info: #2f6fdc;
  --info-soft: #e8f0fd;
  --bar2: #e4e1da;
  --shadow: 0 8px 28px rgba(33,32,31,.12);
  --f-display: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #202020; --field: #2a2a2a; --ink: #f2f1ee; --muted: #a3a19c; --line: #2e2e2e;
    --accent: #fce000; --accent-ink: #21201f; --accent-soft: #3a3410; --link: #f2f1ee; --ok: #4cc671;
    --warn: #f0a85a; --warn-soft: #3a2a17; --bad: #ff6b5e; --bad-soft: #3d1d1b; --info: #8ab4f0; --info-soft: #1c2a3d; --bar2: #3a3a3a;
    --shadow: 0 8px 28px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #202020; --field: #2a2a2a; --ink: #f2f1ee; --muted: #a3a19c; --line: #2e2e2e;
  --accent: #fce000; --accent-ink: #21201f; --accent-soft: #3a3410; --link: #f2f1ee; --ok: #4cc671;
  --warn: #f0a85a; --warn-soft: #3a2a17; --bad: #ff6b5e; --bad-soft: #3d1d1b; --info: #8ab4f0; --info-soft: #1c2a3d; --bar2: #3a3a3a;
  --shadow: 0 8px 28px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* shell */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100%; }
.rail { position: sticky; top: env(safe-area-inset-top, 0px); align-self: start; height: 100vh; padding: 20px 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; background: var(--surface); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 4px 10px 18px; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-align: left; color: var(--muted); font-weight: 500; }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-btn:hover { background: var(--bg); color: var(--ink); }
.nav-btn[aria-current="page"] { background: var(--accent-soft); color: var(--link); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.rail-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.status-dot.off { background: var(--bad); }

.main { min-width: 0; padding-block: 24px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.content { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 4vw, 28px); margin: 2px 0 0; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 17px; margin: 0; font-weight: 600; }
h3 { font-size: 15px; margin: 0; font-weight: 600; }
.tabs { display: none; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; font-weight: 600; white-space: nowrap; min-height: 40px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--link); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.danger.armed { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13.5px; border-radius: 9px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-weight: 700; font-size: 17px; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.err { font-size: 12.5px; color: var(--bad); }
.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; min-height: 42px; }
.input:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.input.invalid { border-color: var(--bad); }
textarea.input { min-height: 84px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.suffix { position: relative; }
.suffix .input { padding-right: 48px; }
.suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--link); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel.tight { padding: 0; overflow: hidden; }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi b { font-family: var(--f-display); font-size: clamp(17px, 2.4vw, 22px); font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi.hero { background: var(--accent); border-color: var(--link); color: var(--accent-ink); }
.kpi.hero span { color: var(--accent-ink); opacity: .85; }
.kpi.warn b { color: var(--warn); }
.kpi.neg b { color: var(--bad); }

/* toolbar, chips */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 220px; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search .input { padding-left: 38px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 500; white-space: nowrap; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip b { font-weight: 700; }

/* product list */
.plist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow-main { display: contents; }
.prow .open { border: 0; background: none; padding: 0; text-align: left; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; grid-column: 1 / 3; min-width: 0; }
.thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; font-size: 26px; flex: none; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.price { font-weight: 600; text-align: right; white-space: nowrap; }
.price s { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.price small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper b { min-width: 34px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--link); white-space: nowrap; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.off { background: var(--bg); color: var(--muted); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty b { color: var(--ink); font-size: 16px; }

/* orders */
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--line); }
.order.s-new { border-left-color: var(--bad); }
.order.s-accepted { border-left-color: var(--warn); }
.order.s-ready { border-left-color: var(--info); }
.order.s-done { border-left-color: var(--link); }
.order ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.order li { display: flex; justify-content: space-between; gap: 10px; }
.order .total { display: flex; justify-content: space-between; font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; }
.order .who { font-size: 13px; color: var(--muted); }
.order .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* chart */
.chart { display: flex; flex-direction: column; gap: 8px; }
.bars { height: 180px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); position: relative; }
.bars .b { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; border: 0; background: none; padding: 0; border-radius: 5px 5px 0 0; position: relative; }
.bars .b i { display: block; width: 100%; background: var(--bar2); border-radius: 4px 4px 0 0; position: relative; }
.bars .b i em { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.bars .b:hover i, .bars .b[aria-pressed="true"] i { filter: brightness(.92); outline: 2px solid var(--ink); outline-offset: 1px; }
.axis { display: flex; gap: 3px; font-size: 11px; color: var(--muted); }
.axis span { flex: 1 1 0; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { min-height: 22px; font-size: 13.5px; }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--bg); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
td .neg { color: var(--bad); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(8,16,14,.45); z-index: 40; }
.sheet { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow); padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.sheet-foot { padding: 14px 20px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos .ph { width: 84px; height: 84px; border-radius: 12px; background: var(--accent-soft); overflow: hidden; position: relative; display: grid; place-items: center; font-size: 34px; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 1; }
.photos .ph .main { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 6px; }
.photos label.ph { border: 2px dashed var(--line); background: none; color: var(--muted); font-size: 13px; text-align: center; cursor: pointer; padding: 6px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.switch input { width: 44px; height: 24px; accent-color: var(--link); flex: none; }
.hintline { font-size: 13px; color: var(--muted); }
.hintline b { color: var(--link); }
.hintline b.neg { color: var(--bad); }
.variants { display: flex; flex-direction: column; gap: 8px; }
.variant { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--link); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 14px; }
.sale-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sale-line .thumb { width: 44px; height: 44px; font-size: 20px; }

/* хиты и таблицы товаров */
.hitrow { display: grid; grid-template-columns: 26px 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 0 0; text-align: left; width: 100%; }
.hitrow:first-of-type { border-top: 0; padding-top: 0; }
.rank { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--muted); text-align: center; }
.hitrow:nth-of-type(-n+3) .rank { color: var(--link); }
.linkrow { border: 0; background: none; padding: 0; font-weight: 600; text-align: left; color: var(--ink); }
.linkrow:hover { color: var(--link); }
.onum { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
@media (max-width: 800px) { .prow.compact .open { grid-column: 1; } .prow.compact .stepper { grid-column: 2; grid-row: 1; } }
.prow.compact { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 800px) { .hitrow { grid-template-columns: 22px 44px minmax(0, 1fr) auto; } .hitrow .thumb { width: 44px; height: 44px; font-size: 20px; } }

/* storefront */
.store-hero { display: flex; gap: 16px; align-items: center; }
.store-logo { width: 72px; height: 72px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-size: 28px; overflow: hidden; flex: none; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 1; background: var(--accent-soft); display: grid; place-items: center; font-size: 56px; max-width: 100%; position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .tags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.card .tags span { background: var(--surface); color: var(--ink); font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.card .tags span.sale { background: var(--bad); color: #fff; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .t { font-weight: 600; font-size: 14px; }
.card .d { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .pr { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 6px; gap: 6px; }
.card .pr s { font-size: 12px; color: var(--muted); display: block; }
.card .add { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 20px; line-height: 1; flex: none; }

.checklist { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.dot.ok { background: var(--accent); border-color: var(--link); color: var(--accent-ink); }
.bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-radius: var(--r); padding: 12px 16px; font-size: 14px; background: var(--warn-soft); }
.alert.bad { background: var(--bad-soft); }
.alert.info { background: var(--info-soft); }
.morelist { display: flex; flex-direction: column; }
.morelist button { display: flex; align-items: center; gap: 12px; padding: 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font-weight: 600; }
.morelist button:first-child { border-top: 0; }
.morelist svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.morelist small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.sched { display: grid; grid-template-columns: 110px auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; }

/* auth: соглашение, три шага, вход */
.auth { min-height: 100%; display: grid; place-items: center; padding-block: 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth-card { max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: clamp(24px, 6vw, 30px); }
.auth-card p { margin: 0; color: var(--muted); }
.terms { max-height: 46vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.terms h3 { font-size: 14.5px; margin-top: 4px; }
.terms p { color: var(--ink); }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.agree input { width: 22px; height: 22px; accent-color: var(--link); flex: none; margin: 0; }
.slide-art { aspect-ratio: 4 / 3; max-width: 100%; border-radius: 22px; background: var(--accent-soft); display: grid; place-items: center; position: relative; overflow: hidden; }
.slide-art svg { width: 46%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slide-art .big { position: absolute; right: 18px; bottom: 14px; font-family: var(--f-display); font-size: 44px; font-weight: 700; color: var(--link); }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .2s; }
.dots i.on { width: 24px; background: var(--accent); }
.phone { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.phone:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--accent-soft); }
.phone span { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--bg); border-right: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; }
.phone input { border: 0; outline: 0; background: none; padding: 12px; font-size: 18px; letter-spacing: .04em; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.code { font-size: 28px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: .5em; }
.testnote { background: var(--info-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.linkbtn { border: 0; background: none; color: var(--link); font-weight: 600; padding: 0; }
.linkbtn:disabled { color: var(--muted); font-weight: 500; cursor: default; }

/* баланс */
.ledger td:first-child { white-space: normal; }
.plus { color: var(--link); }

/* welcome */
.welcome { min-height: 100%; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.welcome-card { max-width: 540px; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.welcome-card h1 { font-size: clamp(26px, 6vw, 36px); }
.welcome-card p { color: var(--muted); margin: 0; max-width: 60ch; }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--link); font-weight: 700; display: grid; place-items: center; flex: none; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 500; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); padding-top: 16px; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabs .nav-btn { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 2px; justify-content: center; align-items: center; text-align: center; }
  .tabs .badge { position: absolute; top: 0; right: calc(50% - 22px); margin: 0; height: 17px; min-width: 17px; font-size: 10.5px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .prow .open { grid-template-columns: 48px minmax(0, 1fr); grid-column: 1 / -1; gap: 12px; }
  .prow .thumb { width: 48px; height: 48px; font-size: 22px; }
  .prow .price { grid-column: 2; grid-row: 2; }
  .prow .stepper { grid-column: 1; grid-row: 2; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .bars { height: 150px; gap: 2px; }
  .sched { grid-template-columns: 1fr auto; }
  .sched .t { grid-column: span 1; }
}
@media (max-width: 440px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } .variant { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; } .variant .vn { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: slide .22s ease-out; }
  @keyframes slide { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* иконки внутри элементов управления */
.btn svg, .iconbtn svg, .dot svg, .noimg svg, .ocomment svg, .photos .ph button svg, .chip .btn svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.dot svg { width: 13px; height: 13px; stroke-width: 3; }
.chip .btn svg { width: 14px; height: 14px; stroke-width: 2.2; }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--link); opacity: .5; }
.noimg svg { width: 44%; height: 44%; stroke-width: 1.6; }
.ocomment { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-soft); padding: 8px 10px; border-radius: 8px; }
.ocomment svg { width: 16px; height: 16px; stroke-width: 2; flex: none; margin-top: 2px; }
.photos .ph button svg { width: 12px; height: 12px; stroke-width: 2.6; }
.photos .ph .mk { left: 4px; right: auto; top: auto; bottom: 4px; }
.photos .ph .mk svg { fill: #fff; stroke: none; }

/* состояния */
.btn, .chip, .nav-btn, .iconbtn, .prow, .linkrow, .hitrow, .input { transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out; }
.btn:active:not(:disabled), .iconbtn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.iconbtn:hover { border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* мастер регистрации магазина */
.wizard { min-height: 100%; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wiz-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.wiz-head .brand { padding: 0; }
.wiz-prog { display: flex; gap: 6px; }
.wiz-prog i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); transition: background-color .2s ease-out; }
.wiz-prog i.on { background: var(--accent); }
.wiz-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-block: 4px 24px; }
.wiz-body h1 { font-size: clamp(22px, 5.5vw, 28px); }
.wiz-body > p { margin: 0; }
.wiz-foot { position: sticky; bottom: 0; background: var(--bg); padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 10px; border-top: 1px solid var(--line); }
.wiz-foot .btn { flex: 1; min-height: 48px; }
.wiz-foot .btn.primary { flex: 2; }

.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kind { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: border-color .15s ease-out, background-color .15s ease-out; }
.kind:hover { border-color: var(--muted); }
.kind[aria-checked="true"] { border-color: var(--link); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.kind svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kind b { font-size: 15px; font-weight: 600; }
.kind small { font-size: 12.5px; color: var(--muted); }

.logo-row { display: flex; gap: 14px; align-items: center; }
.logo-pick { width: 84px; height: 84px; flex: none; border-radius: 20px; border: 2px dashed var(--muted); background: var(--surface); color: var(--link); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 12.5px; font-weight: 600; cursor: pointer; overflow: hidden; }
.logo-pick svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo-pick img { width: 100%; height: 100%; object-fit: cover; }

.map-box { position: relative; }
.map { height: 280px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; background: var(--surface); z-index: 0; }
.map-fail { height: 100%; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 14px; }
.gps { position: absolute; right: 10px; bottom: 10px; z-index: 500; box-shadow: var(--shadow); }
.gps svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; }
.pin-icon { background: none; border: 0; }

.daypick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { position: relative; cursor: pointer; }
.day input { position: absolute; opacity: 0; inset: 0; }
.day span { display: grid; place-items: center; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.day input:checked + span { background: var(--accent); border-color: var(--link); color: var(--accent-ink); }
.day input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-child { border-top: 0; }
.switch-row input { width: 44px; height: 24px; accent-color: var(--link); }

.rev-head { display: flex; gap: 14px; align-items: center; }
.rev-head .store-logo { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; object-fit: cover; }
.rev-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.rev-row:first-child { border-top: 0; }

/* единицы товара чипами */
.unit-chip { cursor: pointer; position: relative; }
.unit-chip input { position: absolute; opacity: 0; pointer-events: none; }
.unit-chip:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.unit-chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }


/* ===== стиль: как в приложениях доставки — белый фон, серые карточки, жёлтые кнопки ===== */
body { font-family: var(--f-body); }
h1 { font-weight: 800; letter-spacing: -.025em; }
h2 { font-weight: 800; letter-spacing: -.015em; }
.eyebrow { color: var(--muted); }

/* карточки: серые, без рамок и теней */
.panel, .kpi, .plist, .order, .card, .morelist, .terms, .switch, .opt { background: var(--surface); border: 0; box-shadow: none; }
.panel { border-radius: var(--r); }
.plist { border-radius: var(--r); }
.prow { border-top-color: var(--line); }
.thumb, .photos .ph, .card .pic { background: var(--bg); }
.noimg { color: var(--muted); opacity: .7; }
.order { border-left: 0; border-radius: var(--r); }
.kpi { border-radius: var(--r); padding: 16px 18px; }
.kpi b { font-weight: 800; }
.kpi.hero { background: var(--surface); color: var(--ink); }
.kpi.hero span { color: var(--muted); opacity: 1; }
.kpi.hero b { font-size: clamp(22px, 3.4vw, 30px); }

/* поля: на белом — серые, внутри серых карточек — белые */
.input, .phone { background: var(--surface); border: 2px solid transparent; border-radius: 14px; }
.panel .input, .card .input, .kpi .input, .panel .phone, .terms .input { background: var(--field); }
.input:focus, .phone:focus-within { border-color: var(--ink); box-shadow: none; }
.input.invalid { border-color: var(--bad); }
.search .input { background: var(--surface); }

/* кнопки */
.btn { border: 0; background: var(--surface); border-radius: 16px; font-weight: 700; min-height: 44px; }
.btn:hover { border: 0; filter: brightness(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger.armed { background: var(--bad); color: #fff; }
.iconbtn { border: 0; background: var(--bg); border-radius: 12px; }
.panel .iconbtn, .plist .iconbtn { background: var(--bg); }

/* чипы и сегментный переключатель */
.chip { border: 0; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 8px 14px; font-weight: 600; }
.chip[aria-pressed="true"], .unit-chip:has(input:checked) { background: var(--ink); color: var(--bg); }
.seg { display: flex; background: var(--surface); border-radius: 16px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg .chip { flex: 1; background: transparent; color: var(--muted); border-radius: 12px; justify-content: center; text-align: center; }
.seg .chip[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* плашки */
.pill { border-radius: 10px; font-weight: 700; }
.pill:not(.warn):not(.bad):not(.info):not(.off) { background: var(--accent-soft); color: var(--ink); }
.alert { border-radius: 18px; font-weight: 500; }
.alert.bad { background: var(--accent); color: var(--accent-ink); }
.alert.bad .btn, .alert .btn.primary { background: var(--ink); color: var(--bg); }
.alert.info { background: var(--surface); }
.dot.ok { color: var(--accent-ink); }
.bar { background: var(--bg); }
.panel .bar, .card .bar { background: var(--bg); }

/* навигация */
.rail { background: var(--bg); border-right: 1px solid var(--line); }
.nav-btn { border-radius: 14px; font-weight: 600; }
.nav-btn[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 700; }
.nav-btn[aria-current="page"] svg { stroke-width: 2.3; }
.tabs { background: var(--bg); border-top: 1px solid var(--line); }
.tabs .nav-btn[aria-current="page"] { background: transparent; }
.badge { background: var(--bad); }
.brand-mark { border-radius: 10px; }

/* боковая панель (форма товара и т. п.) — белая, поля серые */
.sheet { background: var(--bg); border-radius: 24px 0 0 24px; }
.sheet .input, .sheet .phone { background: var(--surface); }
.sheet .panel .input { background: var(--field); }
.sheet-head, .sheet-foot { border-color: var(--line); }
@media (max-width: 800px) { .sheet { border-radius: 24px 24px 0 0; top: auto; max-height: 92vh; width: 100%; } }

/* переключатель «в наличии» */
.tgl { width: 46px; height: 28px; flex: none; border: 0; padding: 0; border-radius: 14px; background: var(--bar2); position: relative; cursor: pointer; transition: background-color .15s ease-out; }
.tgl::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease-out; }
.tgl[aria-checked="true"] { background: var(--accent); }
.tgl[aria-checked="true"]::after { transform: translateX(18px); }
.tgl:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* плавающая кнопка добавления на телефоне */
.fab { display: none; }
@media (max-width: 800px) {
  .fab { display: inline-flex; position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 25; box-shadow: var(--shadow); border-radius: 18px; min-height: 50px; padding-inline: 18px; }
  .hide-m { display: none !important; }
}

/* мастер: крупные строки-карточки типа магазина */
.kinds { grid-template-columns: 1fr; }
.kind { flex-direction: row; justify-content: flex-start; text-align: left; gap: 16px; padding: 18px; border: 2px solid transparent; background: var(--surface); border-radius: var(--r); }
.kind svg { width: 34px; height: 34px; flex: none; }
.kind span { display: flex; flex-direction: column; gap: 2px; }
.kind b { font-size: 17px; }
.kind small.units { font-weight: 600; color: var(--ink); }
.wiz-head, .wiz-foot { background: var(--bg); }
.wiz-prog i.on { background: var(--ink); }
.logo-pick { background: var(--surface); color: var(--ink); }
.day span { border: 0; background: var(--surface); }
.day input:checked + span { background: var(--ink); color: var(--bg); }
.map { border: 0; }
.rev-row, .switch-row { border-color: var(--line); }
.store-logo { background: var(--accent); color: var(--accent-ink); }
.brand-mark { background: var(--accent); color: var(--accent-ink); }

/* графики: выручка серым, прибыль жёлтым */
.bars .b i em { background: var(--accent); }
.hitrow .rank { color: var(--muted); }
.hitrow:nth-of-type(-n+3) .rank { color: var(--ink); }
.plus { color: var(--ok); }

/* галочки-настройки выглядят как переключатели */
.switch input[type="checkbox"], .switch-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--bar2); position: relative; cursor: pointer; margin: 0; flex: none; transition: background-color .15s ease-out; }
.switch input[type="checkbox"]::after, .switch-row input[type="checkbox"]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease-out; }
.switch input[type="checkbox"]:checked, .switch-row input[type="checkbox"]:checked { background: var(--accent); }
.switch input[type="checkbox"]:checked::after, .switch-row input[type="checkbox"]:checked::after { transform: translateX(18px); }
.switch input[type="checkbox"]:focus-visible, .switch-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch { border-radius: var(--r); padding: 14px 16px; }
/* поиск вне строки фильтров не растягивается по высоте */
.content > .search { flex: none; }
/* крупные кнопки действий в карточке заказа */
.order .acts .btn { flex: 1; min-height: 46px; font-size: 15px; }
.order .acts .btn.primary { flex: 2; }
/* 3D-иконки типов магазина: фон картинки совпадает с серым карточек, поэтому даём им плитку того же цвета */
.kind-img { width: 72px; height: 72px; flex: none; border-radius: 18px; background: #f5f4f2; object-fit: cover; }
@media (min-width: 520px) { .kind-img { width: 84px; height: 84px; } }
