/* =====================================================================
   Проект V2 · швейный цех — Liquid Glass
   Единая дизайн-система: токены → типографика → стекло → компоненты.
   Предыдущая версия: style_v2.css.bak
   ===================================================================== */

/* ---------- токены ---------- */
:root {
  color-scheme: light;

  /* шрифты: SF Pro на Apple, Segoe/Roboto в остальных системах */
  --f-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --f-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font: var(--f-text);

  /* текст */
  --ink: #0b0c10;
  --ink-2: #474c58;
  --ink-3: #7b8190;
  --ink-inv: #ffffff;

  /* линии и подложки */
  --line: rgba(15, 20, 35, .09);
  --line-2: rgba(15, 20, 35, .055);
  --fill: rgba(120, 125, 140, .12);
  --fill-2: rgba(120, 125, 140, .2);
  --bg: #eceff5;
  --card: rgba(255, 255, 255, .62);

  /* системные цвета (Apple) */
  --blue: #0a7cff;
  --blue-ink: #0062d1;
  --blue-soft: rgba(10, 124, 255, .12);
  --green: #1f9d4c;
  --green-soft: rgba(52, 199, 89, .16);
  --orange: #c26100;
  --orange-soft: rgba(255, 149, 0, .16);
  --red: #e0352b;
  --red-soft: rgba(255, 59, 48, .13);
  --purple: #8e44c9;
  --purple-soft: rgba(175, 82, 222, .14);

  /* стекло */
  --glass: rgba(255, 255, 255, .6);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-thin: rgba(255, 255, 255, .38);
  --glass-brd: rgba(255, 255, 255, .72);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px rgba(255, 255, 255, .28),
                inset 0 -1px 0 rgba(255, 255, 255, .35);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .9);
  --sheen: linear-gradient(155deg, rgba(255, 255, 255, .65) 0%, rgba(255, 255, 255, .12) 32%, rgba(255, 255, 255, 0) 55%);
  --blur: blur(28px) saturate(185%);
  --blur-heavy: blur(48px) saturate(200%);

  --shadow: 0 1px 2px rgba(16, 24, 48, .05), 0 10px 30px -12px rgba(16, 24, 48, .16);
  --shadow-lg: 0 30px 70px -24px rgba(16, 24, 48, .35), 0 6px 18px -8px rgba(16, 24, 48, .12);

  --radius: 26px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  /* Apple: окна, меню и подсказки не «пружинят» — без перелёта (damping 1.0) */
  --spring: cubic-bezier(.2, .9, .25, 1);

  /* фон — цветные «лужи» под стеклом */
  --mesh-1: rgba(96, 150, 255, .55);
  --mesh-2: rgba(255, 140, 190, .42);
  --mesh-3: rgba(80, 220, 190, .38);
  --mesh-4: rgba(255, 196, 120, .38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f5f6fa;
    --ink-2: #b4b9c6;
    --ink-3: #848a99;
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .06);
    --fill: rgba(140, 145, 165, .18);
    --fill-2: rgba(140, 145, 165, .28);
    --bg: #07080c;
    --card: rgba(36, 38, 46, .58);

    --blue: #3d9bff;
    --blue-ink: #6cb4ff;
    --blue-soft: rgba(61, 155, 255, .18);
    --green: #40d26c;
    --green-soft: rgba(48, 209, 88, .17);
    --orange: #ffad3b;
    --orange-soft: rgba(255, 159, 10, .17);
    --red: #ff6157;
    --red-soft: rgba(255, 69, 58, .18);
    --purple: #c98bff;
    --purple-soft: rgba(191, 90, 242, .2);

    --glass: rgba(34, 36, 44, .58);
    --glass-strong: rgba(44, 46, 56, .76);
    --glass-thin: rgba(34, 36, 44, .32);
    --glass-brd: rgba(255, 255, 255, .1);
    --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .05),
                  inset 0 -1px 0 rgba(255, 255, 255, .04);
    --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .1);
    --sheen: linear-gradient(155deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .02) 34%, rgba(255, 255, 255, 0) 55%);

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);

    --mesh-1: rgba(40, 90, 230, .45);
    --mesh-2: rgba(190, 50, 140, .32);
    --mesh-3: rgba(20, 150, 130, .3);
    --mesh-4: rgba(200, 120, 40, .22);
  }
}

/* ---------- основа ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, label, summary, [role="button"], [data-act], [data-shop] { touch-action: manipulation; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 14px;
  line-height: 1.47;
  letter-spacing: -.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "ss01";
  overscroll-behavior-y: none;
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(36% 40% at 14% 12%, var(--mesh-1), transparent 62%),
    radial-gradient(32% 38% at 86% 6%, var(--mesh-2), transparent 60%),
    radial-gradient(44% 46% at 74% 88%, var(--mesh-3), transparent 62%),
    radial-gradient(34% 40% at 20% 86%, var(--mesh-4), transparent 60%);
  filter: blur(40px) saturate(140%);
}
/* тонкая «зернистость», чтобы стекло читалось как материал */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 650; letter-spacing: -.022em; }
::selection { background: rgba(10, 124, 255, .22); }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 10px; }

.nav, .top, .tabs, .btn, .gsel-btn, .pill, .avatar, .tabbar, h1, h2, h3 { -webkit-user-select: none; user-select: none; }
input, textarea, .wh-found, table { -webkit-user-select: text; user-select: text; }

/* скроллбары потоньше */
* { scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- типографика ---------- */
.eyebrow {
  font-family: var(--f-text); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.mono, code, kbd { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

/* ---------- стеклянный материал ----------
   Размытие (backdrop-filter) — только у плавающих слоёв поверх контента.
   Карточки внутри страницы лежат на уже размытом статичном фоне, поэтому
   им хватает полупрозрачной заливки: так в разы легче для телефонов и TC15. */
.glass, .top, .tabbar, .sheet, .gsel-panel, .toast, .undo-bar, .cart-fab {
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* ---------- загрузка ---------- */
.boot { display: grid; place-items: center; height: 100vh; gap: 16px; align-content: center; }
.boot-mark {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(160deg, #2a2d36, #0b0c10);
  color: #fff; display: grid; place-items: center;
  font-family: var(--f-round); font-weight: 700; font-size: 20px; letter-spacing: -.02em;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: bootPulse 1.6s var(--ease) infinite alternate;
}
.boot-text { color: var(--ink-3); font-size: 13px; letter-spacing: .01em; }
@keyframes bootPulse { from { transform: scale(.96); } to { transform: scale(1.03); } }

/* ---------- вход ---------- */
.login, .login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  position: relative; width: 100%; max-width: 440px;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 34px;
  box-shadow: var(--shadow-lg), var(--glass-edge);
  padding: 36px 32px 30px;
  animation: rise .5s var(--ease) both;
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
}
.login-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sheen); pointer-events: none; }
.login-card > * { position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.login-mark {
  width: 56px; height: 56px; border-radius: 17px; margin-bottom: 22px;
  background: linear-gradient(160deg, #2a2d36, #0b0c10); color: #fff;
  display: grid; place-items: center; font-family: var(--f-round); font-weight: 700; font-size: 18px;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.login h1 {
  font-size: 34px; line-height: 1.04; font-weight: 750; letter-spacing: -.045em; margin-bottom: 8px;
}
.login .sub { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; margin-bottom: 24px; max-width: 34ch; }
.login form { display: grid; gap: 14px; }
.login form .btn.primary { height: 50px !important; font-size: 16px; margin-top: 6px !important; }
.company-list { display: grid; gap: 8px; margin-bottom: 20px; }
.company {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--glass-thin); cursor: pointer; text-align: left;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.company:hover { background: var(--glass); transform: translateY(-1px); }
.company:active { transform: scale(.985); }
.company.on {
  border-color: transparent; background: var(--glass-strong);
  box-shadow: 0 0 0 2px var(--blue), 0 10px 24px -12px rgba(10, 124, 255, .55);
}
.company i {
  width: 38px; height: 38px; border-radius: 12px; background: var(--fill); display: grid; place-items: center;
  font-style: normal; font-family: var(--f-round); font-weight: 700; color: var(--ink-2); font-size: 14px; flex: none;
}
.company.on i { background: var(--blue); color: #fff; }
.company b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; }
.company span { font-size: 12px; color: var(--ink-3); }
.demo { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.demo .t { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.demo .row { display: flex; flex-wrap: wrap; gap: 6px; }
.demo button {
  border: 0; background: var(--fill); color: var(--ink-2); border-radius: 980px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: background .18s var(--ease);
}
.demo button:hover { background: var(--fill-2); color: var(--ink); }

/* ---------- оболочка ---------- */
.shell {
  display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh;
}
/* плавающая стеклянная боковая панель (как в iPadOS) */
.side {
  position: sticky; top: 0; z-index: 5; height: 100vh; padding: 12px 0 12px 12px;
  display: flex; flex-direction: column;
  background: transparent; border: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.side::before {
  content: ""; position: absolute; inset: 12px 0 12px 12px; z-index: -1;
  border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow), var(--glass-edge);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; }
.brand i {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: linear-gradient(160deg, #2a2d36, #0b0c10); color: #fff;
  display: grid; place-items: center; font-style: normal; font-family: var(--f-round); font-weight: 700; font-size: 13px;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.brand b { font-family: var(--f-display); font-size: 15px; font-weight: 700; letter-spacing: -.025em; display: block; line-height: 1.15; }
.brand span { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 1px; }
.nav { display: grid; gap: 2px; overflow-y: auto; padding: 4px 10px; align-content: start; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 14px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; letter-spacing: -.012em;
  transition: background .2s var(--ease), color .2s var(--ease), transform .16s var(--ease), box-shadow .2s var(--ease);
}
.nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.55; flex: none; opacity: .85; }
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a:active { transform: scale(.98); }
.nav a.on {
  background: var(--glass-strong); color: var(--blue); font-weight: 600;
  box-shadow: 0 4px 14px -6px rgba(16, 24, 48, .22), var(--glass-edge);
}
.nav a.on svg { opacity: 1; stroke-width: 1.8; }
.side .foot {
  margin: auto 10px 0; padding: 14px 12px 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.side .foot .who { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; min-width: 0; flex: 1; }
.side .foot .who b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot button {
  border: 0; background: var(--fill); border-radius: 980px; flex: none;
  padding: 7px 13px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.side .foot button:hover { background: var(--red-soft); color: var(--red); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 12px; z-index: 20; margin: 12px 24px 0; height: 54px;
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 22px;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 980px;
  box-shadow: var(--shadow), var(--glass-edge);
}
.top h2 {
  font-family: var(--f-text); font-size: 11.5px; font-weight: 650; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3);
}
.top .crumb { color: var(--ink-3); font-size: 12.5px; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top .right .pill { height: 30px; padding: 0 12px; }
@media (min-width: 821px) {
  /* на компьютере «Выйти» есть внизу боковой панели */
  #logout-top { display: none; }
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(150deg, #7ab4ff, #3d6dff); color: #fff;
  display: grid; place-items: center; font-family: var(--f-round); font-size: 12.5px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px -4px rgba(61, 109, 255, .6);
}
.page { padding: 28px 32px 72px; max-width: 1240px; width: 100%; }

/* ---------- заголовок страницы ---------- */
.hero { display: flex; align-items: flex-end; gap: 18px; margin: 6px 0 26px; flex-wrap: wrap; }
.hero h1 {
  font-family: var(--f-display); font-size: 46px; line-height: 1.02; font-weight: 750;
  letter-spacing: -.048em; text-wrap: balance;
}
.hero h1 em, .hero h1 .serif {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--blue) 0%, #8a5cff 60%, #e0559b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
.hero .sub { color: var(--ink-2); font-size: 15px; margin-top: 10px; line-height: 1.45; max-width: 62ch; }
.hero .sub::first-letter { text-transform: uppercase; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- показатели ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 24px;
  padding: 18px 20px 16px; box-shadow: var(--shadow), var(--glass-edge);
  transition: transform .3s var(--spring), box-shadow .3s var(--ease);
}
.kpi::before { content: ""; position: absolute; inset: 0; background: var(--sheen); pointer-events: none; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), var(--glass-edge); }
.kpi .k {
  position: relative; font-size: 11px; font-weight: 650; color: var(--ink-3);
  letter-spacing: .075em; text-transform: uppercase;
}
.kpi .v {
  position: relative; font-family: var(--f-round); font-size: 36px; font-weight: 650; line-height: 1.05;
  letter-spacing: -.04em; margin: 10px 0 6px; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi .m { position: relative; font-size: 12.5px; color: var(--ink-3); }
.kpi.ok .v { color: var(--green); }
.kpi.bad .v { color: var(--red); }
.kpi.warn .v { color: var(--orange); }

/* ---------- карточки ---------- */
.card {
  position: relative; overflow: hidden; margin-bottom: 16px;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glass-edge);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--sheen); opacity: .8;
}
.card > * { position: relative; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px 12px; flex-wrap: wrap; }
.card-h h3 { font-size: 18px; font-weight: 700; letter-spacing: -.028em; }
.card-h .spacer { margin-left: auto; }
.card-h .more {
  font-size: 13px; font-weight: 500; color: var(--blue); padding: 5px 11px; border-radius: 980px;
  transition: background .18s var(--ease);
}
.card-h .more:hover { background: var(--blue-soft); }
.card-b { padding: 0 22px 20px; }
.card-b.tight { padding-bottom: 10px; }
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }

/* ---------- таблицы ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
th {
  font-size: 10.5px; font-weight: 650; color: var(--ink-3); background: transparent; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .07em; padding-top: 10px; padding-bottom: 10px;
  border-bottom-color: var(--line);
}
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: var(--fill); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-weight: 500; white-space: nowrap; }
.cell-main { font-weight: 600; letter-spacing: -.012em; }
.cell-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.tablescroll { overflow-x: auto; }

/* ---------- метки ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 980px;
  font-size: 11.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  background: var(--fill); color: var(--ink-2);
}
.pill.blue { background: var(--blue-soft); color: var(--blue-ink); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.grey { background: var(--fill); color: var(--ink-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border-radius: 980px;
  font-size: 14px; font-weight: 600; letter-spacing: -.012em; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  background: var(--glass-strong); color: var(--ink);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 2px 8px -3px rgba(16, 24, 48, .18), var(--glass-edge);
  transition: transform .25s var(--spring), box-shadow .22s var(--ease), background .22s var(--ease), filter .2s var(--ease);
}
.btn:hover { background: var(--glass-strong); filter: brightness(1.03); box-shadow: 0 6px 16px -6px rgba(16, 24, 48, .25), var(--glass-edge); }
.btn:active { transform: scale(.96); }
.btn.primary {
  background: linear-gradient(180deg, #2a94ff 0%, #0a7cff 55%, #006ae6 100%); color: #fff;
  border-color: rgba(0, 90, 200, .35);
  box-shadow: 0 8px 22px -8px rgba(10, 124, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 12px 28px -8px rgba(10, 124, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.dark {
  background: linear-gradient(180deg, #30333c, #0b0c10); color: #fff; border-color: rgba(0, 0, 0, .4);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.ghost {
  background: transparent; color: var(--blue); border-color: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 12px;
}
.btn.ghost:hover { background: var(--blue-soft); filter: none; box-shadow: none; }
.btn.sm { min-height: 32px; padding: 0 13px; font-size: 13px; }
.btn.tiny { min-height: 26px; padding: 0 10px; font-size: 12px; }
.btn.primary.sm, .btn.primary.tiny { color: #fff; }
.btn:disabled, .btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; filter: grayscale(.3); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- переключатели ---------- */
.seg { display: inline-flex; background: var(--fill); border-radius: 980px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; border-radius: 980px; padding: 7px 15px;
  font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all .25s var(--ease);
}
.seg button.on { background: var(--glass-strong); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(16, 24, 48, .2), var(--glass-edge); font-weight: 600; }

.tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin-bottom: 18px;
  background: var(--glass-thin); border: 1px solid var(--glass-brd); border-radius: 24px;
  box-shadow: var(--glass-edge), 0 8px 24px -14px rgba(16, 24, 48, .3);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab {
  border: 0; background: transparent; cursor: pointer; text-decoration: none;
  padding: 8px 18px; border-radius: 980px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; transition: background .25s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease);
}
.tabs .tab:hover { color: var(--ink); background: var(--fill); }
.tabs .tab.on {
  background: var(--glass-strong); color: var(--ink); font-weight: 650;
  box-shadow: 0 3px 12px -4px rgba(16, 24, 48, .25), var(--glass-edge);
}
.tabs .tab.back { margin-left: auto; color: var(--blue); font-weight: 600; }

.chiprow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chipbtn {
  border: 1px solid var(--line); background: var(--glass-thin); color: var(--ink-2); border-radius: 980px;
  padding: 7px 15px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--spring);
}
.chipbtn:hover { background: var(--glass); color: var(--ink); }
.chipbtn:active { transform: scale(.95); }
.chipbtn.on { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 600; }
.checkline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkline input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- формы ---------- */
.field { display: grid; gap: 7px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; letter-spacing: -.005em; padding-left: 2px; }
.input {
  width: 100%; min-height: 44px; padding: 10px 15px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--glass-strong); outline: none;
  font-size: 15px; color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(16, 24, 48, .05);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.input::placeholder { color: var(--ink-3); opacity: .8; }
.input:hover { border-color: var(--fill-2); }
.input:focus {
  border-color: var(--blue); background: var(--glass-strong);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
textarea.input { resize: vertical; min-height: 92px; line-height: 1.45; }
select.input { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237b8190' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 14px;
}
input[type="date"].input, input[type="time"].input { font-variant-numeric: tabular-nums; }
input[list]::-webkit-calendar-picker-indicator { opacity: .35; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row .grow { flex: 1 1 160px; min-width: 0; }

/* ---------- стеклянный выпадающий список ---------- */
.gsel { position: relative; display: block; width: 100%; }
.gsel select.gsel-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.gsel-btn {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong);
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left;
  box-shadow: inset 0 1px 2px rgba(16, 24, 48, .05);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.gsel-btn::after {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 1.7px solid var(--ink-3); border-bottom: 1.7px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease);
}
.gsel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsel-btn:hover { border-color: var(--fill-2); }
.gsel.open > .gsel-btn, .gsel-btn.open { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.gsel-btn.open::after, .gsel.open > .gsel-btn::after { transform: rotate(-135deg) translate(-2px, -2px); }
.gsel.disabled > .gsel-btn { opacity: .45; cursor: default; }
.gsel-panel {
  position: absolute; z-index: 90; top: calc(100% + 8px); left: 0; right: 0; max-height: 320px; overflow: auto;
  padding: 6px; border-radius: 20px;
  background: var(--glass-strong); border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-lg), var(--glass-edge);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; pointer-events: none;
  transition: opacity .18s var(--ease), transform .22s var(--spring);
}
.gsel.open > .gsel-panel, .gsel-panel.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; display: block; }
.gsel-panel.gsel-float {
  position: fixed; z-index: 9999; max-height: 340px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  animation: panelIn .22s var(--spring);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.gsel-opt {
  display: block; width: 100%; text-align: left; padding: 10px 13px; border: 0; border-radius: 13px;
  background: transparent; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .14s var(--ease);
}
.gsel-opt:hover { background: var(--fill); }
.gsel-opt.on { background: var(--blue); color: #fff; font-weight: 600; }

/* ---------- задачи ---------- */
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.task {
  position: relative; display: grid; gap: 10px; padding: 18px;
  background: var(--glass-strong); border: 1px solid var(--glass-brd); border-radius: 22px;
  box-shadow: var(--shadow), var(--glass-edge);
  transition: transform .3s var(--spring), box-shadow .3s var(--ease);
}
.task:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--glass-edge); }
.task .th { display: flex; align-items: flex-start; gap: 8px; }
.task .th b { font-family: var(--f-display); font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.task .meta { font-size: 13px; color: var(--ink-2); display: flex; gap: 12px; flex-wrap: wrap; }
.task .meta b { color: var(--ink); font-weight: 600; }
.task .timer {
  font-family: var(--f-round); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600;
  color: var(--orange); background: var(--orange-soft); padding: 1px 9px; border-radius: 980px;
}

/* ---------- список партий ---------- */
.blist { display: grid; gap: 8px; }
.bitem {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 18px; color: inherit;
  background: var(--glass-thin); border: 1px solid var(--line-2); cursor: pointer;
  transition: background .2s var(--ease), transform .25s var(--spring), box-shadow .2s var(--ease);
}
.bitem:hover { background: var(--glass-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.bitem:active { transform: scale(.99); }
.bitem .top-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bitem .top-line b { font-family: var(--f-display); font-size: 15.5px; font-weight: 700; letter-spacing: -.025em; }
.bitem .sub { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.bitem .cell-main { font-family: var(--f-round); font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
.progress { height: 6px; border-radius: 6px; background: var(--fill); overflow: hidden; margin-top: 11px; }
.progress > i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #5aa9ff, var(--blue));
  box-shadow: 0 0 10px rgba(10, 124, 255, .45);
  transition: width .6s var(--ease);
}
.progress.done > i { background: linear-gradient(90deg, #5ee08a, var(--green)); box-shadow: 0 0 10px rgba(52, 199, 89, .45); }

/* ---------- разделы и этапы ---------- */
.sections { display: grid; gap: 12px; }
.section {
  border-radius: 22px; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-brd); box-shadow: var(--shadow), var(--glass-edge);
}
.section-h { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; transition: background .18s var(--ease); }
.section-h:hover { background: var(--fill); }
.swatch { width: 34px; height: 34px; border-radius: 11px; border: 1px solid rgba(0, 0, 0, .08); flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.section-h .t { flex: 1; min-width: 0; }
.section-h .t b { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.section-h .t div { font-size: 12.5px; color: var(--ink-3); }
.chev { color: var(--ink-3); transition: transform .3s var(--spring); }
.section.open .chev { transform: rotate(90deg); }
.section-b { display: none; padding: 4px 18px 18px; }
.section.open .section-b { display: block; animation: fade .3s var(--ease); }
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 2px; border-radius: 2px; background: var(--line); }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  font-family: var(--f-round); font-size: 12px; font-weight: 700; background: var(--fill); color: var(--ink-3);
}
.step.done .n { background: var(--green-soft); color: var(--green); }
.step.done:not(:last-child)::before { background: var(--green-soft); }
.step.active .n { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.step .body b { font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.step .body .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.step .act { align-self: center; }
.step.waiting { opacity: .5; }

/* ---------- окна ---------- */
#modal-root { position: relative; z-index: 1000; }
.overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 12, 24, .3);
  -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
  animation: ovIn .25s var(--ease);
}
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; z-index: 1001; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto;
  background: var(--glass-strong); border: 1px solid var(--glass-brd); border-radius: 30px;
  box-shadow: var(--shadow-lg), var(--glass-edge);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
  animation: modalIn .38s var(--spring);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 640px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 22px 24px 8px; }
.modal-h h3 { font-size: 22px; font-weight: 750; letter-spacing: -.035em; }
.modal-h .x {
  margin-left: auto; border: 0; background: var(--fill); width: 32px; height: 32px; flex: none;
  border-radius: 50%; cursor: pointer; color: var(--ink-2); font-size: 18px; line-height: 1;
  transition: background .18s var(--ease), transform .2s var(--spring);
}
.modal-h .x:hover { background: var(--fill-2); color: var(--ink); }
.modal-h .x:active { transform: scale(.9); }
.modal-b { padding: 10px 24px 20px; display: grid; gap: 14px; }
.modal-f {
  display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px 22px;
  position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--glass-strong) 40%);
}
.modal-f .btn { min-width: 110px; min-height: 44px; }

/* ---------- уведомления ---------- */
.toasts {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  display: grid; gap: 8px; justify-items: center; z-index: 2000; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px 12px 14px; border-radius: 980px;
  background: rgba(22, 24, 30, .78); color: #fff; font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
  animation: toastIn .45s var(--spring);
}
.toast::before {
  content: "i"; width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--f-serif); font-style: italic; font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, .18);
}
.toast.ok::before { content: "✓"; font-family: var(--f-text); font-style: normal; background: #34c759; }
.toast.err::before { content: "!"; font-family: var(--f-text); font-style: normal; background: #ff3b30; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- мелочи ---------- */
.notice {
  border-radius: 16px; background: var(--blue-soft); color: var(--blue-ink); padding: 13px 16px;
  font-size: 13.5px; font-weight: 500; margin-bottom: 14px; border: 1px solid rgba(10, 124, 255, .12);
}
.empty { padding: 40px 16px; text-align: center; color: var(--ink-3); font-size: 14px; }
.ann { display: grid; gap: 12px; }
.ann .item {
  position: relative; padding: 16px 18px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--glass-brd); box-shadow: var(--shadow), var(--glass-edge);
}
.ann .item .h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ann .item .h b { font-size: 14px; font-weight: 650; }
.ann .item .h span { font-size: 12px; color: var(--ink-3); }
.ann .item p { margin: 0; font-family: var(--f-serif); font-size: 16px; color: var(--ink); line-height: 1.55; letter-spacing: -.005em; }
.sep { height: 1px; background: var(--line); margin: 12px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-2); }
.kv b { font-variant-numeric: tabular-nums; }

.need-net { display: grid; place-items: center; gap: 14px; padding: 48px 22px; text-align: center; }
.need-net svg { width: 56px; height: 56px; stroke: var(--ink-3); fill: none; stroke-width: 1.4; }
.need-net h3 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.03em; }
.need-net p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 340px; line-height: 1.5; }

/* ---------- чип синхронизации ---------- */
.sync-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 980px;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); white-space: nowrap;
  border: 1px solid var(--line); background: var(--glass-thin);
  transition: transform .2s var(--spring), background .2s var(--ease);
}
.sync-chip:active { transform: scale(.95); }
.sync-chip i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 8px rgba(52, 199, 89, .8); }
.sync-chip.off { color: var(--orange); background: var(--orange-soft); }
.sync-chip.off i { background: #ff9500; box-shadow: 0 0 8px rgba(255, 149, 0, .8); }
.sync-chip.wait { color: var(--blue-ink); background: var(--blue-soft); }
.sync-chip.wait i { background: var(--blue); box-shadow: 0 0 8px rgba(10, 124, 255, .8); animation: blink 1s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: .3; } }
.qrow {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 13px; border-radius: 13px;
  background: var(--fill); margin-bottom: 6px; font-size: 13px;
}
.qrow.bad { background: var(--red-soft); color: var(--red); }

/* ---------- магазин ---------- */
.shop-filters { padding: 16px 22px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.product {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 24px;
  box-shadow: var(--shadow), var(--glass-edge);
  transition: transform .35s var(--spring), box-shadow .3s var(--ease);
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--glass-edge); }
.product.out { opacity: .58; filter: saturate(.6); }
.product .ph { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10px; margin: 6px 6px 0; border-radius: 19px; overflow: hidden; }
.product .ph .art { width: 68%; height: 68%; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .14)); transition: transform .4s var(--spring); }
.product:hover .ph .art { transform: scale(1.05) rotate(-1deg); }
.product .ph img.photo, .cl-art img.photo { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.product .cat {
  position: absolute; top: 8px; left: 8px; font-size: 10.5px; padding: 3px 9px;
  background: rgba(255, 255, 255, .9); color: #1d1f26;
}
.price-edit {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: #474c58; cursor: pointer; font-size: 12px; line-height: 1;
  transition: transform .2s var(--spring);
}
.price-edit:hover { color: var(--blue); transform: scale(1.08); }
.product .pbody { padding: 11px 13px 13px; display: grid; gap: 4px; flex: 1; align-content: start; }
.pname { font-size: 13.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.28; }
.pmeta { font-size: 11.5px; color: var(--ink-3); }
.prow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.prow b { font-family: var(--f-round); font-size: 17px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stock { font-size: 11.5px; font-weight: 600; color: var(--green); }
.stock.zero { color: var(--red); }
.product .btn { width: 100%; margin-top: 6px; min-height: 34px; font-size: 13px; }
/* размеры внутри карточки — как на Wildberries */
.szrow { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.szbtn {
  position: relative; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-thin); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--spring);
}
.szbtn:hover { border-color: var(--ink-3); }
.szbtn:active { transform: scale(.94); }
.szbtn.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.szbtn.none { color: var(--ink-3); text-decoration: line-through; opacity: .6; }
.szbtn i {
  position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--blue); color: #fff; font-style: normal; font-size: 10px; line-height: 16px; text-align: center;
}

.cart-fab[hidden] { display: none; }
.cart-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 900; display: flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 20px 0 22px; border-radius: 980px; cursor: pointer;
  background: rgba(16, 18, 24, .82); color: #fff; font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
  transition: transform .3s var(--spring), background .2s var(--ease);
  animation: toastIn .45s var(--spring);
}
.cart-fab:hover { transform: translateY(-2px) scale(1.02); }
.cart-fab:active { transform: scale(.96); }
.cart-fab b { font-family: var(--f-round); font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-fab i {
  font-style: normal; background: var(--blue); border-radius: 980px; min-width: 24px; height: 24px; padding: 0 7px;
  display: grid; place-items: center; font-family: var(--f-round); font-size: 12px; font-weight: 700;
}
.cartline { display: grid; grid-template-columns: 56px 1fr auto auto 26px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cartline .cl-art { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.cartline .cl-art svg { width: 76%; height: 76%; }
.cl-body b { font-size: 13.5px; font-weight: 600; }
.cl-qty { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.cl-qty span { min-width: 22px; text-align: center; font-family: var(--f-round); font-size: 15px; font-weight: 650; }
.cl-sum { font-family: var(--f-round); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-del { border: 0; background: var(--fill); width: 26px; height: 26px; border-radius: 50%; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; }
.cl-del:hover { color: var(--red); background: var(--red-soft); }

.undo-bar {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; z-index: 950;
  padding: 8px 8px 8px 20px; border-radius: 980px;
  background: rgba(16, 18, 24, .8); color: #fff; font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
}
.undo-bar b { font-weight: 650; }
.undo-bar .btn { min-height: 34px; }
.undo-bar .undo-x { border: 0; background: rgba(255, 255, 255, .16); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* ---------- склад ---------- */
.input.scan { min-height: 50px; font-size: 16px; font-family: var(--f-mono); letter-spacing: .02em; }
.input.scan.big, .input.big { min-height: 60px; font-size: 19px; border-radius: 18px; }
.btn.big { width: 100%; min-height: 60px; font-size: 17px; margin-top: 16px; border-radius: 20px; }
.wh-weight {
  margin: 12px 0; padding: 13px 16px; border-radius: 16px; background: var(--fill);
  font-size: 14px; color: var(--ink-2); border: 1px solid var(--line-2);
}
.wh-found {
  margin-top: 10px; padding: 15px 17px; border-radius: 18px; background: var(--blue-soft);
  font-size: 14px; color: var(--ink); line-height: 1.5; border: 1px solid rgba(10, 124, 255, .16);
  animation: fade .3s var(--ease);
}
.wh-found b { font-size: 15.5px; font-weight: 650; }
.wh-found.good { background: var(--green-soft); border-color: rgba(52, 199, 89, .3); }
.wh-found.bad { background: var(--red-soft); border-color: rgba(255, 59, 48, .3); }
.wh-found:empty, .wh-weight:empty { display: none; }
.wh-art { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; overflow: hidden; flex: none; }
.wh-art svg { width: 80%; height: 80%; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 14px 0; }
.size-cell { display: grid; gap: 6px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass-thin); }
.size-cell span { font-family: var(--f-round); font-size: 14px; color: var(--ink-2); font-weight: 700; text-align: center; }
.size-cell input { min-height: 52px; font-size: 20px; text-align: center; font-family: var(--f-round); font-weight: 650; }
.wh-headline { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.wh-headline b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.wh-total { font-size: 15px; color: var(--ink-2); margin: 6px 0 2px; }
.wh-total b { color: var(--ink); font-family: var(--f-round); font-size: 18px; }

.order-card {
  position: relative; padding: 14px 16px; margin-bottom: 10px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--glass-brd); box-shadow: var(--shadow), var(--glass-edge);
}
.order-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.order-head b { font-family: var(--f-display); font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }
.order-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.order-row span:first-child { overflow-wrap: anywhere; }
.order-row.done { opacity: .5; }
.order-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* ---------- сборка заказа ---------- */
.picker { max-height: 92vh; display: flex; flex-direction: column; padding-bottom: 0; }
.pick-tools { display: grid; grid-template-columns: 1fr 220px; gap: 10px; padding: 12px 18px 8px; }
.pick-list { overflow: auto; padding: 4px 18px 4px; display: grid; gap: 8px; }
.pick-page { padding: 4px 0 0; }
.pick-page .pick-tools { grid-template-columns: 1fr 240px; padding: 12px 18px 10px; }
.pick-page .pick-list { padding: 0 18px 6px; }
.pick-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 92px;
  grid-template-areas: "code name qty" "code hit meta";
  column-gap: 10px; row-gap: 3px; align-items: center;
  padding: 9px 12px; border-radius: 18px;
  background: var(--glass-thin); border: 1px solid var(--line);
  transition: background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pick-left { display: grid; gap: 4px; min-width: 0; }
.pick-right { display: grid; gap: 4px; }
.pick-code { grid-area: code; min-height: 46px; font-size: 14.5px; font-family: var(--f-mono); }
.pick-code.bad { border-color: var(--red) !important; background: var(--red-soft) !important; }
.pick-name { grid-area: name; font-size: 13px; line-height: 1.32; color: var(--ink-2); overflow-wrap: anywhere; word-break: break-word; }
.pick-qty { grid-area: qty; min-height: 46px; font-size: 18px; text-align: center; font-family: var(--f-round); font-weight: 700; }
.pick-meta { grid-area: meta; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.pick-hit { grid-area: hit; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; color: var(--green); font-weight: 500; }
.pick-hit:empty { display: none; }
.pick-row.ok { background: var(--green-soft); border-color: rgba(52, 199, 89, .45); box-shadow: 0 0 0 3px rgba(52, 199, 89, .12); }
.pick-row.ok .pick-name { color: var(--green); }
.pick-row.bad { background: var(--red-soft); border-color: rgba(255, 59, 48, .5); box-shadow: 0 0 0 3px rgba(255, 59, 48, .12); }
.pick-row.bad .pick-hit { color: var(--red); }
.pick-row.bad .pick-qty { border-color: var(--red); }
.pick-row.partial { background: var(--orange-soft); border-color: rgba(255, 149, 0, .45); }
.pick-row.partial .pick-hit { color: var(--orange); }
.pick-row.sub { background: var(--purple-soft); border-color: rgba(175, 82, 222, .5); box-shadow: 0 0 0 3px rgba(175, 82, 222, .12); }
.pick-row.sub .pick-hit { color: var(--purple); }
/* фильтр сборки как автофильтр Excel */
.pick-xf { position: relative; }
.pick-xf > summary { list-style: none; width: 100%; justify-content: center; }
.pick-xf > summary::-webkit-details-marker { display: none; }
.pick-xf-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, calc(100vw - 32px));
  display: grid; gap: 8px; padding: 12px; border-radius: 18px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.pick-xf-pop .btn { justify-content: flex-start; }
.pick-xf-list { max-height: 46vh; overflow: auto; display: grid; gap: 2px; padding: 6px 4px; border-top: 1px solid var(--line-2); }
.pick-xf-list label { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13.5px; cursor: pointer; }
.pick-row.done { opacity: .5; }
.pick-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--glass-strong); border-radius: 0 0 28px 28px;
}
.pick-foot .btn-row { margin-left: auto; }
.pick-ship-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px 22px; }
.pick-ship-zone .btn { min-width: 220px; min-height: 52px; font-size: 16px; }

.scan-sink { display: none; }
.scan-zone { padding: 12px 18px 4px; display: grid; gap: 7px; }
.scan-bar {
  min-height: 60px; font-size: 17px; text-align: center; border-radius: 20px;
  font-family: var(--f-mono); letter-spacing: .04em;
  background: var(--glass-strong); border: 1.5px solid rgba(10, 124, 255, .45);
  box-shadow: 0 0 0 5px var(--blue-soft); caret-color: transparent;
}
.scan-bar:focus { border-color: var(--blue); box-shadow: 0 0 0 6px var(--blue-soft), 0 12px 30px -10px rgba(10, 124, 255, .45); }
.scan-state { font-size: 12.5px; font-weight: 500; color: var(--ink-3); text-align: center; min-height: 16px; }
.scan-state.got { color: var(--blue); }
.scan-state.ok { color: var(--green); }
.scan-state.bad { color: var(--red); }

.shell.pickmode .side, .shell.pickmode .tabbar { display: none; }
.shell.pickmode { grid-template-columns: minmax(0, 1fr); }
.shell.pickmode .main { padding-bottom: 0; }

/* логотип компании вместо «V2» */
.login-mark, .brand i { overflow: hidden; }
.login-mark img, .brand i img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }

#cab-form.cab-active {
  background: var(--blue-soft); border-radius: 0 0 26px 26px;
  box-shadow: inset 0 0 0 2px rgba(10, 124, 255, .25);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

/* ---------- нижняя стеклянная панель (телефон) ---------- */
.tabbar { display: none; }
.sheet-wrap { display: none; }

/* ---------- появление страницы ---------- */
#page > * { animation: pageIn .5s var(--ease) both; }
#page > *:nth-child(2) { animation-delay: .04s; }
#page > *:nth-child(3) { animation-delay: .08s; }
#page > *:nth-child(4) { animation-delay: .12s; }
#page > *:nth-child(5) { animation-delay: .16s; }
#page > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes pageIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.994); }
  to   { opacity: 1; transform: none; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding-bottom: 110px; }

  .top {
    top: 8px; margin: calc(8px + env(safe-area-inset-top, 0px)) 12px 0; height: 50px; padding: 0 6px 0 18px;
  }
  .top .right .pill { display: none; }
  .avatar { width: 32px; height: 32px; }
  .page { padding: 20px 16px 48px; }

  .hero { margin-bottom: 20px; gap: 14px; }
  .hero h1 { font-size: 34px; letter-spacing: -.045em; }
  .hero .sub { font-size: 14.5px; margin-top: 7px; }
  .hero .actions { margin-left: 0; width: 100%; }
  .hero .actions .btn { flex: 1; min-height: 46px; }
  .hero .actions .input { flex: 1; width: auto !important; }

  .kpis { gap: 10px; }
  .kpi { padding: 14px 15px 13px; border-radius: 22px; }
  .kpi .v { font-size: 26px; margin: 8px 0 4px; }
  .kpi .m { font-size: 11.5px; }

  .card { border-radius: 24px; }
  .card-h { padding: 16px 18px 10px; }
  .card-b { padding: 0 18px 18px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  th, td { padding: 11px 16px; }

  table.resp thead { display: none; }
  table.resp tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--line-2);
  }
  table.resp tbody tr:last-child { border-bottom: 0; }
  table.resp td { border: 0; padding: 2px 0; }
  table.resp td::before {
    content: attr(data-l); display: block; color: var(--ink-3); font-size: 10px; font-weight: 650;
    text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1px;
  }
  table.resp td.num { text-align: left; }

  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .input, .gsel-btn { min-height: 48px; font-size: 16px; }
  .gsel-opt { padding: 13px; font-size: 16px; }

  /* окна — снизу, как шторка iOS */
  .overlay { place-items: end center; padding: 0; }
  .modal, .modal.wide {
    max-width: none; border-radius: 30px 30px 0 0; max-height: 92vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetUp .42s var(--spring);
  }
  .modal::before {
    content: ""; display: block; width: 40px; height: 5px; border-radius: 5px;
    background: var(--fill-2); margin: 8px auto 0;
  }
  .modal-h { padding-top: 12px; }
  .modal-f .btn { flex: 1; }
  .modal.wide.picker {
    position: fixed; left: 0; right: 0; top: calc(10px + env(safe-area-inset-top, 0px)); bottom: 0;
    margin: 0; max-height: none; border-radius: 30px 30px 0 0;
  }
  .modal.wide.picker::before { display: none; }

  .toasts { top: calc(12px + env(safe-area-inset-top, 0px)); }

  .login-card { padding: 28px 22px 24px; border-radius: 30px; }
  .login h1 { font-size: 30px; }

  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-filters { padding: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { border-radius: 22px; }
  .product .ph { margin: 5px 5px 0; border-radius: 17px; padding: 8px; }
  .product .pbody { padding: 9px 10px 11px; }
  .pname { font-size: 13px; line-height: 1.25; }
  .pmeta { font-size: 11px; }
  .prow b { font-size: 15.5px; }
  .product .btn { min-height: 36px; font-size: 13px; padding: 0 8px; }
  .cart-fab { right: 14px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .cartline { grid-template-columns: 48px 1fr auto 26px; }
  .cartline .cl-art { width: 48px; height: 48px; }
  .cartline .cl-sum { grid-column: 2 / 4; text-align: left; }
  .undo-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

  .tabs .tab { padding: 9px 14px; font-size: 13.5px; }
  .btn.big { min-height: 64px; font-size: 18px; }
  .input.scan.big, .input.big { min-height: 64px; font-size: 20px; }

  .pick-tools, .pick-page .pick-tools { grid-template-columns: 1fr; }
  .pick-row { grid-template-columns: 1fr 78px; grid-template-areas: "code qty" "name qty" "hit meta"; }
  .pick-code, .pick-qty { min-height: 50px; font-size: 16px; }
  .pick-name { font-size: 13.5px; }
  .pick-foot { position: sticky; bottom: 0; }
  .pick-foot .btn-row { width: 100%; margin: 0; }
  .pick-foot .btn { flex: 1; }
  .pick-ship-zone { flex-direction: column; align-items: stretch; }
  .pick-ship-zone .btn { width: 100%; min-width: 0; min-height: 58px; font-size: 17px; }

  /* плавающая панель вкладок iOS */
  .tabbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 800; max-width: 540px; margin: 0 auto;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; gap: 2px;
    padding: 6px; border-radius: 34px;
    background: var(--glass); border: 1px solid var(--glass-brd);
    box-shadow: 0 20px 50px -14px rgba(16, 24, 48, .35), var(--glass-edge);
    -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
  }
  .tabbtn {
    display: grid; place-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 28px; border: 0;
    background: transparent; color: var(--ink-2); text-decoration: none; cursor: pointer;
    font-size: 10.5px; font-weight: 600; letter-spacing: 0;
    transition: transform .3s var(--spring), background .25s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease);
    touch-action: manipulation;
  }
  .tabbtn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.55; transition: transform .3s var(--spring); }
  .tabbtn span { line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .tabbtn.on {
    color: var(--blue); background: var(--glass-strong);
    box-shadow: 0 6px 16px -6px rgba(10, 124, 255, .35), var(--glass-edge);
  }
  .tabbtn.on svg { stroke-width: 1.85; transform: translateY(-1px); }
  .tabbtn:active { transform: scale(.92); }
  .tabbtn.press {
    background: var(--glass-strong); transform: scale(1.1);
    box-shadow: 0 12px 30px -8px rgba(10, 124, 255, .45), var(--glass-edge);
  }
  .tabbtn.press svg { transform: scale(1.1); }

  /* шторка «Ещё» */
  .sheet-wrap { display: block; position: fixed; inset: 0; z-index: 900; }
  .sheet-wrap[hidden] { display: none; }
  .sheet-scrim {
    position: absolute; inset: 0; background: rgba(8, 12, 24, .3);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    opacity: 0; transition: opacity .28s var(--ease);
  }
  .sheet {
    position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-width: 540px; margin: 0 auto; max-height: 80vh; overflow: auto;
    padding: 8px 8px 10px; border-radius: 34px;
    background: var(--glass-strong); border: 1px solid var(--glass-brd);
    box-shadow: var(--shadow-lg), var(--glass-edge);
    -webkit-backdrop-filter: var(--blur-heavy); backdrop-filter: var(--blur-heavy);
    transform: translateY(110%); transition: transform .42s var(--spring);
  }
  .sheet-grab { width: 40px; height: 5px; border-radius: 5px; background: var(--fill-2); margin: 4px auto 10px; }
  .sheet-row {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px; border: 0; border-radius: 20px;
    font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; background: transparent; text-align: left; cursor: pointer;
  }
  .sheet-row svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.55; color: var(--blue); }
  .sheet-row:active { background: var(--fill); }
  .sheet-row.danger { color: var(--red); margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; justify-content: center; font-weight: 600; }
  .sheet-wrap.open .sheet-scrim { opacity: 1; }
  .sheet-wrap.open .sheet { transform: none; }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 420px) {
  .top .avatar { display: none; }
  .top { padding-left: 16px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 30px; }
  .kpi .v { font-size: 22px; }
  .tabbtn span { font-size: 9.5px; }
}

/* меньше движения — по желанию системы */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body::before { animation: none; }
  /* окна, подсказки и смена страницы — короткое проявление без сдвига, чтобы было видно, что что-то открылось */
  .overlay, .modal, .toast, .sheet, .gsel-panel, .undo-bar, .cart-fab, #page > * { animation: rmFade .2s ease both !important; }
}
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }

/* отклик в момент нажатия, без задержки (Apple: response на pointer-down) */
.btn:active, .chipbtn:active, .szbtn:active, .nav a:active, .bitem:active, .company:active,
.sync-chip:active, .cart-fab:active, .modal-h .x:active { transition-duration: 80ms; }

/* система просит меньше прозрачности — плотные панели без размытия */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, .95); --glass-strong: #fff; --glass-thin: rgba(255, 255, 255, .88); --blur: none; --blur-heavy: none; }
  body::before { display: none; }
}
@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --glass: #1f2128; --glass-strong: #2a2c34; --glass-thin: #1a1c22; --blur: none; --blur-heavy: none; }
}

/* система просит больше контраста — чёткие границы и тёмный вторичный текст */
@media (prefers-contrast: more) {
  :root { --ink-2: #2b2f38; --ink-3: #4a4f5c; --line: rgba(0, 0, 0, .28); --line-2: rgba(0, 0, 0, .18); --glass-brd: rgba(0, 0, 0, .35); --glass: rgba(255, 255, 255, .94); --glass-strong: #fff; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink-2: #d6d9e0; --ink-3: #b0b5c0; --line: rgba(255, 255, 255, .3); --line-2: rgba(255, 255, 255, .2); --glass-brd: rgba(255, 255, 255, .4); --glass: #1f2128; --glass-strong: #2a2c34; }
}

/* более слабые устройства (сканеры TC15 и т.п.): без размытия, но со стеклянным видом */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, .9); --glass-strong: rgba(255, 255, 255, .96); --glass-thin: rgba(255, 255, 255, .7); }
}

/* быстрый вход: аккаунты этого устройства */
.acc-list { margin: 4px 0 14px; }
.acc-h { font-size: 12px; color: var(--ink-3); margin: 0 2px 6px; }
.acc { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; cursor: pointer; background: var(--fill); }
.acc:hover { border-color: var(--fill-2); }
.acc.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.acc > i { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto; }
.acc > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc > span b { font-size: 14px; }
.acc > span span { font-size: 12px; color: var(--ink-3); }
.acc-x { border: 0; background: transparent; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.acc-x:hover { color: var(--red); background: var(--red-soft); }

/* аккаунты устройства: меню и быстрый вход */
.v2acc-anchor { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: 13px; padding: 3px 10px 3px 3px; border-radius: 999px; cursor: pointer; }
.v2acc-anchor:hover { background: var(--line-2); }
.v2acc-anchor .avatar { margin: 0; }
.v2acc-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .v2acc-name { display: none; } }
.v2acc-menu { position: fixed; z-index: 500; width: min(320px, calc(100vw - 16px)); background: var(--glass-strong, #fff); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px rgba(0,0,0,.22); padding: 6px; -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); color: var(--ink); }
.v2acc-h { font-size: 12px; color: var(--ink-3); padding: 8px 10px 6px; }
.v2acc-load { padding: 10px; color: var(--ink-3); font-size: 13px; }
.v2acc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.v2acc-row:hover { background: var(--blue-soft); }
.v2acc-row.cur { cursor: default; background: var(--fill); }
.v2acc-row > i { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto; }
.v2acc-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v2acc-row > span b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2acc-row > span span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2acc-row em { font-style: normal; font-size: 11px; color: var(--green); font-weight: 600; }
.v2acc-x { border: 0; background: transparent; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.v2acc-x:hover { color: var(--red); background: var(--red-soft); }
.v2acc-btn { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; padding: 10px; border-radius: 10px; cursor: pointer; margin-top: 2px; }
.v2acc-btn:hover { background: var(--blue-soft); }
.v2acc-btn.danger { color: var(--red); }
.v2acc-btn.danger:hover { background: var(--red-soft); }
.acc.quick { background: var(--green-soft); border-color: var(--green); }
.acc.quick em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--green); }

/* карточка товара магазина */
.shop-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.sc-main { border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; }
.sc-main img { width: 100%; height: 100%; object-fit: cover; }
.sc-main .art { width: 70%; }
.sc-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.sc-thumbs img { width: 56px; height: 74px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .6; border: 2px solid transparent; flex: none; }
.sc-thumbs img.on { opacity: 1; border-color: var(--accent, #2f6bff); }
@media (max-width: 720px) { .shop-card { grid-template-columns: 1fr; } }
