/* Кабинет оптовика — та же дизайн-система, что и админка (control-h7k9m4q):
   токены, сайдбар, топбар, таблица остатков .inv-*. Только светлая тема, как в админке. */
:root {
    --accent: #00B22D; --accent-hover: #00A028; --accent-glow: rgba(0,178,45,.15); --accent-soft: #ECFDF5;
    --text: #111827; --text-secondary: #4B5563; --text-muted: #9CA3AF;
    --border: #E5E7EB; --border-strong: #D1D5DB; --bg: #F7F8FA; --bg-card: #FFFFFF; --bg-soft: #F4F6F8;
    --radius: 10px; --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
    --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.06);
    --amber: #B45309; --amber-bg: #FEF3C7; --red: #DC2626; --red-bg: #FEE2E2; --blue: #2563EB; --blue-bg: #DBEAFE;
    --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --sidebar-w: 240px; --topbar-h: 64px; --dur: .18s; --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
    background: var(--bg); font-family: var(--font-body); color: var(--text);
    font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
    overflow-x: hidden; min-height: 100vh; min-height: 100dvh;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.015em; font-weight: 700; }
[hidden] { display: none !important; }

/* ===== Вход / регистрация (как .adm-login) ===== */
.adm-login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(0,178,45,.08) 0%, transparent 70%), var(--bg);
}
.adm-login {
    width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px 30px; box-shadow: var(--shadow-card);
}
.adm-login--wide { max-width: 520px; }
.adm-login__brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 26px; }
.adm-login__brand img { width: 36px; height: 36px; border-radius: 8px; }
.adm-login__brand-text { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.adm-login__brand-text span {
    display: block; font-size: 11px; font-weight: 600; color: var(--accent);
    letter-spacing: .08em; text-transform: uppercase; margin-top: 1px;
}
.adm-login h1 { font-size: 20px; margin-bottom: 4px; text-align: center; }
.adm-login__sub { text-align: center; color: var(--text-secondary); font-size: 13.5px; margin: 0 0 22px; }
.adm-login__error {
    background: var(--red-bg); border: 1px solid #FCA5A5; color: var(--red);
    padding: 10px 14px; border-radius: 10px; font-size: 13px;
}
.adm-login__note {
    background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; font-size: 13px;
    color: var(--text-secondary); margin-top: 16px;
}
.adm-login__links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.adm-login__links button { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; }
.adm-login__links button:disabled { color: var(--text-muted); cursor: default; }
.opt-reg-top { margin: 0 0 14px; color: var(--text-muted); align-items: center; }
.opt-form { display: flex; flex-direction: column; gap: 12px; }
.opt-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .opt-form__row { grid-template-columns: 1fr; } .adm-login { padding: 26px 20px; } }
.opt-status-ic {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: flex;
    align-items: center; justify-content: center; font-size: 26px; background: var(--amber-bg);
}
.opt-status-ic--red { background: var(--red-bg); }

/* ===== Поля и кнопки (как .adm-field / .adm-btn) ===== */
.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-field label {
    font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary);
}
.adm-field label i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-weight: 500; }
.adm-field input, .adm-field select, .adm-field textarea, .opt-search, .opt-select {
    width: 100%; padding: 10px 12px; font: inherit; font-size: 14.5px; color: var(--text);
    border: 1.5px solid var(--border); border-radius: 9px; background: #fff; outline: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.adm-field textarea { resize: vertical; min-height: 64px; }
/* Своя стрелка у списков: системная в Safari прижата к самому краю и смотрится криво */
.adm-field select, .opt-select {
    -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
}
.opt-form__row { align-items: end; }
.opt-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .opt-checks { grid-template-columns: 1fr; } }
.adm-field .opt-check {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; user-select: none;
    border: 1.5px solid var(--border); border-radius: 9px; background: #fff;
    font-size: 14.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.adm-field .opt-check:hover { border-color: var(--border-strong); }
.adm-field .opt-check:has(input:checked) { border-color: var(--accent); background: #f0fdf4; }
.adm-field .opt-check input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus, .opt-search:focus, .opt-select:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.opt-code-input { font-size: 26px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.adm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px;
    border-radius: 9px; border: 1px solid transparent; font-family: var(--font-display); font-weight: 600;
    font-size: 14px; transition: all var(--dur) var(--ease); white-space: nowrap;
}
.adm-btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0,178,45,.2), 0 4px 12px -4px rgba(0,178,45,.4); }
.adm-btn--primary:hover { background: var(--accent-hover); }
.adm-btn--primary:disabled { opacity: .6; cursor: default; }
.adm-btn--ghost { background: #fff; color: var(--text); border-color: var(--border); }
.adm-btn--ghost:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.adm-btn--sm { padding: 7px 12px; font-size: 13px; }

/* ===== Каркас: сайдбар + основная область ===== */
.adm-shell { display: flex; min-height: 100vh; }
.adm-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); background: #fff;
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    transition: transform .25s var(--ease); z-index: 30;
}
.adm-sidebar__brand { padding: 18px 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.adm-sidebar__brand img { width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px; }
.adm-sidebar__brand-text { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; }
.adm-sidebar__brand-text span {
    display: block; font-size: 10.5px; font-weight: 600; color: var(--accent);
    letter-spacing: .1em; text-transform: uppercase; margin-top: 2px;
}
.adm-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.adm-nav__group-label {
    font-family: var(--font-display); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--text-muted); padding: 12px 12px 6px; margin-top: 8px;
}
.adm-nav__item {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
    font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--text-secondary);
    transition: all var(--dur) var(--ease);
}
.adm-nav__item:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.adm-nav__item svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.7; }
.adm-nav__item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.adm-nav__item-badge {
    margin-left: auto; background: var(--bg-soft); font-size: 11px; font-weight: 600;
    padding: 1px 7px; border-radius: 99px; color: var(--text-secondary);
}
.adm-nav__item.is-active .adm-nav__item-badge { background: var(--accent); color: #fff; }
/* Блоки «Из наличия» и «Под заказ с завода»: свой цвет и пояснение — чтобы было видно,
   что это два разных способа купить (у второго нет цен и срок от 4 недель) */
.opt-nav-sec { margin-top: 12px; padding: 4px 4px 6px; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.opt-nav-sec__head { padding: 8px 10px 8px; margin-bottom: 2px; }
.opt-nav-sec__title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text); }
.opt-nav-sec__hint { font-size: 11.5px; line-height: 1.35; color: var(--text-muted); margin-top: 2px; }
.opt-nav-sec .adm-nav__item { padding: 8px 10px; font-size: 13.5px; }
.opt-nav-sec--stock { border-color: #bbf7d0; background: #f7fdf9; }
.opt-nav-sec--stock .opt-nav-sec__title { color: #15803d; }
.opt-nav-sec--prod { border-color: #fde68a; background: #fffbeb; }
.opt-nav-sec--prod .opt-nav-sec__title { color: #b45309; }
.opt-nav-sec--prod .adm-nav__item:hover { background: #fef3c7; }
.opt-nav-sec--prod .adm-nav__item.is-active { background: #fde68a; color: #92400e; }
.opt-nav-sec--prod .adm-nav__item.is-active .adm-nav__item-badge { background: #b45309; color: #fff; }
.opt-nav-sec--prod .adm-nav__item-badge--cart { background: #b45309 !important; }
.opt-nav-sep { height: 1px; background: var(--border); margin: 12px 8px 6px; }
.opt-sidebar__contacts { padding: 12px 20px; font-size: 12.5px; color: var(--text-secondary); border-top: 1px solid var(--border); line-height: 1.7; }
.adm-sidebar__user { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 10px; }
.adm-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-soft) 0%, #D1FAE5 100%); color: var(--accent);
    font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.adm-sidebar__user-info { flex: 1; min-width: 0; }
.adm-sidebar__user-name { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-sidebar__user-email { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-sidebar__logout {
    background: transparent; border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex: 0 0 32px;
    transition: all var(--dur) var(--ease);
}
.adm-sidebar__logout:hover { border-color: #FCA5A5; color: var(--red); background: #FEF2F2; }
.adm-sidebar__logout svg { width: 16px; height: 16px; stroke-width: 1.8; }
.adm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 25; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
body.adm-sidebar-open .adm-overlay { opacity: 1; pointer-events: auto; }

.adm-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.adm-topbar {
    position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border);
    min-height: var(--topbar-h); display: flex; align-items: center; padding: 0 28px; gap: 16px;
}
.adm-burger {
    display: none; background: transparent; border: 1px solid var(--border); border-radius: 8px;
    width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--text); flex: 0 0 36px;
}
.adm-burger svg { width: 18px; height: 18px; stroke-width: 2; }
.adm-topbar__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0; }
.adm-topbar__sub { font-size: 12.5px; color: var(--text-muted); }
.adm-topbar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.adm-page { padding: 28px 32px 56px; flex: 1; }

@media (max-width: 860px) {
    .adm-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(15,23,42,.15); }
    body.adm-sidebar-open .adm-sidebar { transform: translateX(0); }
    .adm-main { margin-left: 0; }
    .adm-burger { display: inline-flex; }
    .adm-topbar { padding: 10px 16px; }
    .adm-page { padding: 18px 16px 48px; }
}

/* ===== Пилюля «обновлено» (как .inv-stat-pill) ===== */
.inv-stat-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; background: var(--bg-soft); color: var(--text-secondary); white-space: nowrap;
}
.inv-stat-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.inv-stat-pill.is-fresh { background: #ecfdf5; color: #047857; }
.inv-stat-pill.is-stale { background: #fff7ed; color: #c2410c; }

/* ===== Кнопка Telegram ===== */
.opt-tg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px;
    border-radius: 9px; background: #229ED9; color: #fff; font-family: var(--font-display); font-weight: 600;
    font-size: 13.5px; white-space: nowrap; transition: background var(--dur) var(--ease);
}
.opt-tg-btn:hover { background: #1c8cc2; text-decoration: none; }
.opt-tg-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.opt-tg-btn--block { width: 100%; }
.opt-sidebar__contacts { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.opt-sidebar__mail { text-align: center; font-size: 12.5px; color: var(--text-secondary); }

/* ===== Прайс во всю высоту: таблица скроллится внутри, шапка липкая (как #inventory) ===== */
.adm-page.opt-page-full { display: flex; flex-direction: column; min-height: 0; height: calc(100vh - var(--topbar-h)); padding-bottom: 20px; }

/* ===== Вкладки (как .inv-tabs + .pay-tab) ===== */
.inv-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
/* На десктопе разделы прайса уже есть в боковом меню — вкладки дублировали бы его.
   На телефоне меню спрятано под бургер, поэтому там вкладки остаются. */
@media (min-width: 861px) { .opt-page-full > .inv-tabs { display: none; } }
.pay-tab {
    border: 0; background: transparent; padding: 7px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; font-family: inherit;
}
.pay-tab:hover { color: #1e293b; }
.pay-tab.is-active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.inv-tabs .pay-tab b { margin-left: 6px; font-size: 11px; padding: 0 5px; border-radius: 7px; background: #f1f5f9; color: #64748b; font-weight: 800; }

/* ===== Плашки групп (как .inv-groups / .inv-chip) ===== */
.inv-groups { display: flex; flex-wrap: wrap; gap: 5px; margin: -4px 0 12px; }
.inv-groups:empty { display: none; }
.inv-chip {
    border: 1px solid #e2e8f0; background: #fff; border-radius: 7px; padding: 4px 9px; font-size: 12px;
    font-family: inherit; color: #475569; cursor: pointer; line-height: 1.5; white-space: nowrap;
    transition: background .1s ease, border-color .1s ease;
}
.inv-chip:hover { border-color: #cbd5e1; background: #f8fafc; color: #1e293b; }
.inv-chip b { margin-left: 5px; font-size: 11px; font-weight: 700; color: #94a3b8; }
.inv-chip.is-active { background: #0f172a; border-color: #0f172a; color: #fff; }
.inv-chip.is-active b { color: #94a3b8; }
/* второй уровень: типы внутри выбранного семейства пластика */
.inv-groups__sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; padding: 7px 8px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; }
.inv-groups__sub .inv-chip { font-size: 11.5px; padding: 3px 8px; }
.inv-groups__sub .inv-chip.is-active { background: #334155; border-color: #334155; }

/* ===== Тулбар (как .inv-toolbar) ===== */
.inv-toolbar {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px; margin-bottom: 14px; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.inv-search { position: relative; flex: 1; min-width: 240px; }
.inv-search input {
    width: 100%; padding: 10px 14px 10px 40px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 15px;
    font-family: inherit; background: #f8fafc; color: var(--text); transition: all .15s;
}
.inv-search input:focus { outline: none; border-color: #00B22D; background: #fff; box-shadow: 0 0 0 3px rgba(0,178,45,.12); }
.inv-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94a3b8; pointer-events: none; }
.inv-filter-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #475569; cursor: pointer; user-select: none; white-space: nowrap; }
.inv-filter-toggle input { width: 16px; height: 16px; accent-color: #00B22D; margin: 0; }
.inv-seg { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 2px; gap: 2px; }
.inv-seg[hidden] { display: none !important; }
.inv-seg__btn {
    border: 0; background: transparent; border-radius: 6px; padding: 5px 11px; font-size: 12.5px; font-family: inherit;
    font-weight: 500; color: #64748b; cursor: pointer; white-space: nowrap; line-height: 1.5;
}
.inv-seg__btn:hover { color: #1e293b; }
.inv-seg__btn.is-active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,.07); font-weight: 600; }
.inv-toolbar .inv-stat-pill { font-weight: 500; }

/* ===== Таблица (как .inv-table) ===== */
.inv-table-wrap {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
    flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.inv-table-scroll { flex: 1 1 0; min-height: 0; overflow: auto; position: relative; -webkit-overflow-scrolling: touch; }
.inv-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.inv-table thead th {
    position: sticky; top: 0; background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .02em; padding: 11px 14px; text-align: left; white-space: nowrap;
    border-bottom: 2px solid #e2e8f0; box-shadow: 0 1px 0 #e2e8f0; z-index: 5;
}
.inv-table thead th.is-num { text-align: right; }
.inv-table thead th.is-center { text-align: center; }
.inv-table thead th.is-sortable { cursor: pointer; user-select: none; transition: color .1s, background .1s; }
.inv-table thead th.is-sortable:hover { color: #0f172a; background: #eef2f6; }
.inv-sort-ic {
    display: inline-block; width: 0; height: 0; margin-left: 5px; vertical-align: middle;
    border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: .25;
    border-top: 5px solid currentColor;
}
.inv-sort-ic.asc { border-top: 0; border-bottom: 5px solid currentColor; }
.inv-table thead th.is-sorted { color: #00B22D; background: #ecfdf5; }
.inv-table thead th.is-sorted .inv-sort-ic { opacity: 1; }
.inv-table tbody td { padding: 8px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; background: #fff; transition: background .12s ease; }
.inv-table td.is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-table td.is-center { text-align: center; white-space: nowrap; }
/* наведение — зелёное, как в «Ценах» (просил владелец) */
.inv-table tbody tr.inv-row:hover td { background: #c7efd0; box-shadow: inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
.inv-table tbody tr.inv-row:hover td:first-child { box-shadow: inset 5px 0 0 var(--accent), inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
/* без жирного шрифта при наведении: он переносил название на новую строку и строка «прыгала» */

.inv-row-name { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.inv-row-name__text { min-width: 0; }
.inv-row-name__img { width: 40px; height: 40px; border-radius: 8px; background: #f1f5f9; object-fit: contain; flex-shrink: 0; }
.inv-row-name__placeholder {
    width: 40px; height: 40px; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center;
    justify-content: center; color: #94a3b8; font-size: 10.5px; font-weight: 600; flex-shrink: 0; text-align: center; line-height: 1.1;
}
.inv-row-name__title { font-weight: 500; color: #0f172a; line-height: 1.3; word-break: break-word; }
.inv-row-name__meta { font-size: 12px; color: #64748b; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.inv-row-name__meta code {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; background: #f1f5f9; color: #475569;
    padding: 1px 5px; border-radius: 4px;
}
.opt-code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; color: #334155; font-variant-numeric: tabular-nums; }
.opt-color { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.opt-swatch { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px; border: 1px solid rgba(15,23,42,.15); background: #f1f5f9; }
.rst-variant { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); white-space: nowrap; }
.rst-variant.is-refill { background: #fef3c7; color: #92400e; }
.opt-price { font-family: var(--font-display); font-weight: 700; color: #0f172a; }
.opt-rrp { color: #64748b; }
.inv-qty {
    display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 3px 10px;
    border-radius: 999px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap;
}
.inv-qty.is-zero { background: #f1f5f9; color: #94a3b8; }
.inv-qty.is-low { background: #fff7ed; color: #c2410c; }
.inv-qty.is-ok { background: #ecfdf5; color: #047857; }
.inv-qty.is-way { background: #dbeafe; color: #1d4ed8; }

/* Группы (тип пластика / серия) — сворачиваются кликом, с суммой остатка */
.inv-table tbody tr.inv-group { cursor: pointer; }
.inv-table tbody tr.inv-group td { background: #f1f5f9; border-top: 1px solid #dbe3ec; border-bottom: 1px solid #dbe3ec; padding: 7px 14px; }
.inv-table tbody tr.inv-group:hover td { background: #e8eef6; }
.inv-group__name { font-size: 12.5px; font-weight: 700; color: #0f172a; letter-spacing: .01em; white-space: nowrap; }
.inv-group__meta { margin-left: 8px; font-size: 11px; font-weight: 500; color: #64748b; }
.inv-group__qty { font-size: 12.5px; font-weight: 700; color: #334155; font-variant-numeric: tabular-nums; }
.inv-group__qty.is-zero { color: #94a3b8; font-weight: 500; }
.inv-group__caret {
    display: inline-block; width: 0; height: 0; margin-right: 7px; border-left: 4.5px solid #64748b;
    border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; vertical-align: middle; transition: transform .12s ease;
}
.inv-group__caret.is-open { transform: rotate(90deg) translateX(1px); }
.inv-table tfoot td {
    background: #f8fafc; border-top: 2px solid #e2e8f0; font-weight: 700; color: #0f172a; padding: 9px 14px;
    position: sticky; bottom: 0; z-index: 4;
}
.inv-foot-label { font-size: 12px; font-weight: 600; color: #475569; }
.inv-empty { padding: 56px 20px; text-align: center; color: #64748b; }
.opt-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.opt-st--ok { background: #dcfce7; color: #16a34a; }
.opt-st--wait { background: #fef3c7; color: #b45309; }
.opt-st--req { background: #f1f5f9; color: #64748b; }

/* ===== Карточки (условия) ===== */
.adm-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 22px 24px; margin-bottom: 16px; }
.adm-card h3 { font-size: 16px; margin-bottom: 12px; }
.adm-card ul { margin: 0; padding-left: 18px; color: var(--text-secondary); line-height: 1.8; }
.adm-card .opt-tg-btn { margin-top: 14px; }
.opt-foot-note { font-size: 12.5px; color: var(--text-muted); margin: 10px 2px 0; line-height: 1.6; flex-shrink: 0; }
.adm-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: optspin .8s linear infinite; margin: 0 auto; }
@keyframes optspin { to { transform: rotate(360deg); } }

/* ===== Телефон ===== */
@media (max-width: 860px) {
    .adm-page.opt-page-full { height: auto; min-height: calc(100vh - var(--topbar-h)); padding: 12px 12px 40px; }
    .inv-table-wrap { flex: none; overflow: visible; }
    .inv-table-scroll { flex: none; overflow: visible; }
    .inv-table thead th { top: var(--topbar-h); }
    .inv-table tfoot td { position: static; }
}
@media (max-width: 720px) {
    .adm-topbar__sub { display: none; }
    .adm-topbar__title { font-size: 16px; }
    .inv-stat-pill { font-size: 11.5px; padding: 4px 9px; }
    .opt-tg-btn__label { display: none; }
    .opt-tg-btn { padding: 8px 10px; }
    .opt-tg-btn--block .opt-tg-btn__label { display: inline; }
    /* 40 плашек пластика на телефоне заняли бы пол-экрана — ограничиваем и скроллим */
    .inv-groups { max-height: 92px; overflow-y: auto; margin-bottom: 10px; }
    .inv-toolbar { padding: 12px; gap: 10px; }
    .inv-search { min-width: 0; flex-basis: 100%; }
    .inv-row-name { min-width: 0; }
    .inv-table thead th, .inv-table tbody td, .inv-table tfoot td { padding: 8px 8px; }
    .inv-table thead th { font-size: 10.5px; white-space: normal; }
    .opt-swatch { width: 14px; height: 14px; flex-basis: 14px; }
    .inv-row-name__img, .inv-row-name__placeholder { width: 32px; height: 32px; }
    .inv-row-name { gap: 8px; }
    /* фиксированная раскладка: наличие и цена узкими колонками, название забирает остальное */
    .inv-table { table-layout: fixed; }
    .inv-table thead th.is-center { width: 92px; }
    .inv-table thead th.is-num { width: 78px; }
    .inv-table tbody td.is-center, .inv-table tbody td.is-num { white-space: normal; }
    .opt-st { font-size: 11px; padding: 2px 6px; white-space: normal; text-align: center; }
    .inv-qty { min-width: 0; padding: 3px 8px; font-size: 12.5px; }
    .inv-row-name__title { word-break: normal; overflow-wrap: anywhere; }
    .inv-row-name__meta code { overflow-wrap: anywhere; }
    /* тулбар компактнее: поиск, под ним «только в наличии» и катушка в одну строку */
    .inv-toolbar { gap: 8px 10px; }
    .inv-seg__btn { padding: 5px 8px; font-size: 12px; }
    .inv-toolbar #optCountPill { display: none; }
}

/* ===== Заказ: кнопка «В заказ», счётчик, плашка корзины ===== */
.opt-add {
    border: 1px solid #bbf7d0; background: #f0fdf4; color: #047857; border-radius: 8px; padding: 5px 10px;
    font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.opt-add:hover { background: #dcfce7; border-color: #86efac; }
.opt-step { display: inline-flex; align-items: center; border: 1px solid #86efac; border-radius: 8px; background: #fff; overflow: hidden; }
.opt-step button {
    border: 0; background: #f0fdf4; color: #047857; width: 28px; height: 28px; font-size: 16px; font-weight: 700;
    cursor: pointer; font-family: inherit; line-height: 1;
}
.opt-step button:hover { background: #dcfce7; }
.opt-step button:disabled { color: #cbd5e1; background: #f8fafc; cursor: default; }
.opt-step span { min-width: 44px; text-align: center; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: #0f172a; padding: 0 4px; }
.opt-step small { font-weight: 500; color: #64748b; font-size: 11px; margin-left: 2px; }
/* поле + «шт» — одной группой по центру между «−» и «+» */
.opt-step span.opt-qty { display: flex; align-items: baseline; justify-content: center; gap: 2px; padding: 0 2px; cursor: text; }
.opt-qty-in { flex: 0 0 auto; min-width: 1.4ch; max-width: 5ch; border: 0; background: transparent; padding: 0; margin: 0;
    font: inherit; font-weight: 700; font-size: 13px; line-height: 1; color: #0f172a; text-align: center; font-variant-numeric: tabular-nums;
    -moz-appearance: textfield; appearance: textfield; }
.opt-qty-in::-webkit-outer-spin-button, .opt-qty-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.opt-qty-in:focus { outline: none; }
.opt-step span.opt-qty:focus-within { background: #f0fdf4; box-shadow: inset 0 -2px 0 #22c55e; }
.opt-step span.opt-qty small { margin-left: 0; }
.inv-table tbody tr.inv-row.is-in-cart td { background: #f0fdf4; }
.opt-row-order { margin-top: 6px; }
.adm-nav__item-badge--cart { background: var(--accent) !important; color: #fff !important; }

.opt-cartbar {
    position: sticky; bottom: 0; z-index: 15; margin: 0 -32px; padding: 12px 32px;
    background: #0f172a; color: #fff; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    box-shadow: 0 -6px 20px rgba(15,23,42,.18);
}
.opt-cartbar__sum { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.opt-cartbar__meta { font-size: 13px; color: #cbd5e1; }
.opt-cartbar .adm-btn { margin-left: auto; }

/* ===== Страница заказа и «Мои заказы» ===== */
.opt-cart-table td .inv-row-name { min-width: 0; }
.opt-remove { border: 0; background: none; color: #94a3b8; font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.opt-remove:hover { background: #fee2e2; color: #b91c1c; }
.opt-order-foot { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.opt-order-foot .adm-field { flex: 1; min-width: 260px; }
.opt-order-total { margin-left: auto; text-align: right; }
.opt-order-total__sum { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.opt-order-total__meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.opt-alert { border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.opt-alert--err { background: var(--red-bg); color: var(--red); border: 1px solid #fca5a5; }
.opt-alert--ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.opt-alert--warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.opt-alert ul { margin: 6px 0 0; padding-left: 18px; }
.opt-empty-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 20px; text-align: center; color: var(--text-muted); }
.opt-empty-card .adm-btn { margin-top: 14px; }
.opt-empty-card--panda { padding: 28px 20px 36px; }
/* картинка на белом фоне: multiply прячет едва заметную подложку на белой карточке */
.opt-empty-panda { display: block; width: 240px; height: 240px; max-width: 70%; margin: 0 auto 6px; object-fit: contain; mix-blend-mode: multiply; }
.opt-empty-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text); }
.opt-empty-text { max-width: 440px; margin: 6px auto 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.opt-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.opt-empty-actions .adm-btn { margin-top: 0; }
.opt-btn-prod { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.opt-btn-prod:hover { background: #fef3c7; color: #78350f; text-decoration: none; }
.wso-badge { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wso-badge--new { background: #dbeafe; color: #1d4ed8; }
.wso-badge--confirmed { background: #fef3c7; color: #b45309; }
.wso-badge--invoiced { background: #ede9fe; color: #6d28d9; }
.wso-badge--done { background: #dcfce7; color: #16a34a; }
.wso-badge--cancelled { background: #f1f5f9; color: #64748b; }
.opt-orders tr.inv-group td { cursor: pointer; }
.opt-order-items td { background: #fafbfc !important; font-size: 13px; }
.opt-order-note { font-size: 12.5px; color: #475569; margin-top: 4px; }

@media (max-width: 860px) {
    .opt-cartbar { margin: 0 -12px; padding: 10px 12px; position: sticky; bottom: 0; }
}
@media (max-width: 720px) {
    .opt-cartbar { gap: 8px 12px; }
    .opt-cartbar__sum { font-size: 16px; }
    .opt-cartbar .adm-btn { padding: 8px 12px; }
    .opt-order-total { margin-left: 0; text-align: left; width: 100%; }
    .opt-order-total .adm-btn { width: 100%; }
}

/* Корзина и «Мои заказы» — обычные страницы: таблица по высоте содержимого.
   (Растягивание flex:1 нужно только прайсу во всю высоту, иначе таблица схлопывается в 0.) */
.adm-page:not(.opt-page-full) .inv-table-wrap { flex: none; }
.adm-page:not(.opt-page-full) .inv-table-scroll { flex: none; overflow-x: auto; overflow-y: visible; }
.adm-page:not(.opt-page-full) .inv-table thead th { position: static; }
@media (max-width: 720px) {
    /* на узком экране «Обновлено …» нужно только в прайсе — иначе в шапке не помещается кнопка Telegram */
    body:not(.opt-sec-catalog) #optUpdated { display: none; }
    .adm-topbar__actions { flex-shrink: 0; }
}
@media (max-width: 860px) {
    /* sticky не работает из-за overflow-x: hidden у body — на телефоне плашку закрепляем */
    .opt-cartbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
    body.opt-has-cart.opt-sec-catalog .adm-page.opt-page-full { padding-bottom: 96px; }
}

/* Колонка «Заказ» фиксированной ширины, кнопка и счётчик одного размера —
   иначе при добавлении в корзину колонка расширялась и таблица «дёргалась» */
.inv-table th.col-order, .inv-table td.col-order { width: 150px; min-width: 150px; }
.opt-add, .opt-step { width: 128px; height: 30px; box-sizing: border-box; }
.opt-add { display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.opt-step { justify-content: space-between; }
.opt-step button { flex: 0 0 30px; height: 100%; }
.opt-step span { flex: 1; min-width: 0; white-space: nowrap; }
@media (min-width: 721px) {
    /* узкие колонки — по содержимому, всё свободное место отдаём названию товара */
    /* заголовки и названия цветов переносятся — иначе они съедали ширину у названия товара */
    .inv-table th.is-num, .inv-table th.is-center, .inv-table th.col-color { width: 1%; white-space: normal; line-height: 1.3; }
    .inv-table td.col-color .opt-color { white-space: normal; min-width: 110px; }
    .inv-table th.col-order { width: 150px; min-width: 150px; }
    .inv-table thead th:first-child { width: 100%; }
}

/* группы внутри раскрытого заказа */
.inv-table tr.opt-order-grp td { background: #f1f5f9 !important; font-size: 11.5px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .04em; padding: 6px 14px; }
.opt-order-items .inv-row-name { min-width: 0; }
.opt-cart-table tr.inv-group { cursor: default; }

/* ===== Главная кабинета ===== */
.opt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.opt-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
a.opt-stat:hover { border-color: #86efac; text-decoration: none; }
.opt-stat__label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.opt-stat__value { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 4px; color: var(--text); }
.opt-stat__hint { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.opt-stat.is-stale .opt-stat__value { color: #c2410c; }
.opt-ann { border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 16px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; display: flex; gap: 12px; }
.opt-ann__ic { font-size: 22px; line-height: 1; }
.opt-ann__text { white-space: pre-line; font-size: 14.5px; line-height: 1.55; }
.opt-ann__date { font-size: 12px; color: #a16207; margin-top: 6px; }
.opt-home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.opt-card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.opt-card-head h3 { margin: 0; }
.opt-card-sub { font-size: 12.5px; color: var(--text-muted); }
.opt-news-grp { margin-top: 14px; }
.opt-news-grp__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.opt-news-grp__title.is-down { color: #047857; }
.opt-news-grp__title.is-up { color: #b91c1c; }
.opt-news-grp__title.is-new { color: #1d4ed8; }
.opt-news-grp__title.is-stock { color: #047857; }
.opt-news-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; cursor: pointer; }
.opt-news-row:hover .opt-news-row__name { color: var(--accent); }
.opt-news-row .inv-row-name__img, .opt-news-row .inv-row-name__placeholder { width: 32px; height: 32px; }
.opt-news-row__name { flex: 1; min-width: 0; }
.opt-news-row__price { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.opt-news-row__price s { color: #94a3b8; font-weight: 400; margin-right: 6px; }
.opt-news-more { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; padding: 6px 0; cursor: pointer; }
.opt-news-empty { color: var(--text-muted); font-size: 13.5px; padding: 10px 0; }
.opt-steps { margin: 0; padding-left: 20px; color: var(--text-secondary); line-height: 1.8; }
.opt-home-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.opt-home-actions .adm-btn { text-decoration: none; }
@media (max-width: 1100px) { .opt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .opt-home-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .opt-stats { grid-template-columns: 1fr 1fr; gap: 8px; } .opt-stat { padding: 10px 12px; } .opt-stat__value { font-size: 18px; } }

.opt-invite-note { background: #ecfdf5 !important; color: #047857 !important; border: 1px solid #a7f3d0; }
#optRegister .opt-alert { text-align: left; margin-bottom: 16px; }

.opt-min-note { flex-basis: 100%; margin: 0; }

/* ===== Курс ₽/$ ===== */
.opt-rate { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; white-space: nowrap; }
.opt-rate input { width: 104px; padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 9px; font: inherit; font-size: 14px; background: #f8fafc; text-align: right; }
.opt-rate input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(0,178,45,.12); }
body.opt-has-rate .opt-rate input { border-color: #86efac; background: #f0fdf4; font-weight: 700; color: #047857; }
.opt-rate-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 16px; margin-bottom: 14px; }
.opt-rate-hint { font-size: 12.5px; color: var(--text-muted); }
.opt-rub { color: #1d4ed8; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .opt-rub { font-size: 13px; }
.inv-table th.col-rub { color: #1d4ed8; }
.opt-order-total__rub { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #1d4ed8; }
.opt-order-total__rub small { font-size: 12px; font-weight: 500; color: var(--text-muted); }

.opt-dl { text-decoration: none; white-space: nowrap; }
.opt-dl:hover { text-decoration: none; }

/* поля в паре — по нижнему краю, даже если подпись соседа в две строки */
.opt-form__row { align-items: end; }

/* Просмотр владельцем из админки (/opt/?admin=1) */
.opt-preview-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000;
    background: #1e293b; color: #fff; font-size: 13px; padding: 9px 14px; border-radius: 10px;
    box-shadow: 0 6px 24px rgba(15,23,42,.25); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.opt-preview-bar[hidden] { display: none; }
.opt-preview-bar button { background: #fff; color: #0f172a; border: 0; border-radius: 7px; padding: 5px 10px;
    font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* ===== Запасные части ===== */
.opt-model { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; white-space: nowrap; }
.opt-model .opt-select { height: 36px; min-width: 150px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.opt-compat { font-size: 12.5px; color: #475569; }
/* фото запчастей с белым фоном магазина Bambu — вписываем, а не обрезаем */
.inv-row-name__img.opt-part-img { object-fit: contain; background: #fff; }

/* Увеличение фото по клику */
.inv-row-name__img { cursor: zoom-in; }
.opt-zoom { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .78); display: flex;
    align-items: center; justify-content: center; padding: 56px 16px 24px; cursor: zoom-out; animation: optZoomIn .12s ease-out; }
.opt-zoom__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.opt-zoom__fig img { max-width: min(92vw, 900px); max-height: calc(100vh - 140px); object-fit: contain; background: #fff;
    border-radius: 12px; padding: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); cursor: default; }
.opt-zoom__fig figcaption { color: #fff; font-size: 14px; font-weight: 600; text-align: center; max-width: 90vw; cursor: default; }
.opt-zoom__close { position: fixed; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .95); color: #0f172a; font-size: 26px; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.opt-zoom__close:hover { background: #fff; }
body.opt-zoom-open { overflow: hidden; }
@keyframes optZoomIn { from { opacity: 0; } to { opacity: 1; } }
body.opt-zoom-open .opt-preview-bar { display: none; }

/* ===== Главная кабинета (23.10.2026) ===== */
.opt-hero { display: flex; align-items: flex-end; gap: 12px; background: linear-gradient(120deg, #f0fdf4 0%, #fff 55%); border: 1px solid #dcfce7;
    border-radius: var(--radius-lg); padding: 28px 8px 0 32px; margin-bottom: 16px; overflow: hidden; }
.opt-hero__text { flex: 1; min-width: 0; padding-bottom: 28px; }
.opt-hero__hello { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.opt-hero__company { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.opt-hero__lead { max-width: 560px; margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.opt-hero__meta { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 13px; color: var(--text-secondary);
    background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; }
.opt-hero__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.opt-hero__dot.is-stale { background: #f59e0b; }
.opt-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.opt-hero__actions .adm-btn { text-decoration: none; }
.opt-hero__panda { flex: 0 0 auto; width: 320px; height: auto; display: block; mix-blend-mode: multiply; }

.opt-orders-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
    padding: 12px 18px; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14px; }
.opt-orders-strip:hover { border-color: #cbd5e1; text-decoration: none; }
.opt-orders-strip__go { color: var(--accent); font-weight: 600; white-space: nowrap; }

.opt-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.opt-path { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-lg); padding: 20px 22px; border: 1px solid; }
.opt-path--stock { background: #f7fdf9; border-color: #bbf7d0; }
.opt-path--prod { background: #fffbeb; border-color: #fde68a; }
.opt-path__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.opt-path__ic { font-size: 26px; line-height: 1; }
.opt-path__head h3 { margin: 0; font-size: 18px; }
.opt-path--stock h3 { color: #15803d; }
.opt-path--prod h3 { color: #b45309; }
.opt-path__sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.opt-path__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #fff;
    border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; }
.opt-path__row:hover { border-color: #cbd5e1; text-decoration: none; }
.opt-path__row b { font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-path__btn { align-self: flex-start; margin-top: 6px; text-decoration: none; }

.opt-home-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.opt-home-cols .adm-card, .opt-news { margin-bottom: 0; }
.opt-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-term { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px;
    font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
.opt-term__ic { font-size: 17px; line-height: 1.2; flex: 0 0 auto; }
.opt-howto { list-style: none; counter-reset: st; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.opt-howto li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
.opt-howto li::before { content: counter(st); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft);
    color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); }
.opt-howto b { color: var(--text); font-size: 14px; }
.opt-news { margin-bottom: 16px; }
.opt-contacts { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 13px; color: var(--text-secondary); padding: 4px 4px 8px; }
.opt-contacts__note { flex-basis: 100%; color: var(--text-muted); font-size: 12.5px; }
@media (max-width: 1100px) { .opt-home-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .opt-hero { padding: 20px 0 0 18px; }
    .opt-hero__hello { font-size: 22px; }
    .opt-hero__lead { font-size: 14px; }
    .opt-hero__panda { width: 140px; align-self: flex-end; }
    .opt-hero__text { padding-bottom: 20px; }
    .opt-paths, .opt-terms { grid-template-columns: 1fr; }
}
/* меню: пункты в блоках чуть плотнее; где купить — говорит заголовок блока */
.opt-nav-sec .adm-nav__item { gap: 10px; font-size: 13px; }
/* нечётное последнее условие — на всю ширину, без пустой клетки рядом */
.opt-term:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* в приветствии подпись кнопки Telegram видна и на телефоне */
.opt-hero .opt-tg-btn__label { display: inline !important; }

/* вес брутто в строках прайса и корзин */
.opt-weight { color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== Прайс завода на филамент + корзина (кабинет с 12.11.2026, корзина с 13.11.2026) =====
   Шапка, вводный блок, слева — навигация «тип пластика → серия», справа — таблицы серий;
   корзина — плашка внизу и выезжающая панель. Подложки — только серые, зелёный — акцент. */
.optf { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
/* overflow-x: hidden у html/body ломает position: sticky (меню и шапка уезжали вверх) — на этом экране clip */
html.optf-page, html.optf-page body { overflow-x: clip; }
body.optf-lock { overflow: hidden; }
body.optf-has-dock .optf-main { padding-bottom: 120px; }
.optf-top { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.optf-top__in, .optf-main { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.optf-top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.optf-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.15; }
.optf-brand img { width: 34px; height: 34px; border-radius: 8px; }
.optf-brand span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.optf-top__me { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--text-secondary); min-width: 0; }
.optf-top__me > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.optf-link { background: none; border: 0; padding: 6px 0; color: var(--text); font-weight: 600; font-size: 13.5px; }
.optf-link:hover { color: var(--accent); }
.optf-cartbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 9px;
    border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13.5px; }
.optf-cartbtn:hover { border-color: var(--border-strong); }
.optf-cartbtn svg { width: 18px; height: 18px; }
.optf-cartbtn em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent);
    color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.optf-main { padding-top: 24px; padding-bottom: 56px; }
.optf-hero { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 30px; box-shadow: var(--shadow-sm); }
.optf-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.optf-hero h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; }
.optf-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.optf-xlsx { flex: none; white-space: nowrap; }
.optf-terms { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px;
    font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
.optf-terms li { position: relative; padding-left: 16px; }
.optf-terms li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 760px) { .optf-terms { grid-template-columns: 1fr; } }
.optf-order__eta { margin: 10px 20px 0; padding: 10px 14px; border-radius: 10px; background: var(--bg-soft); font-size: 13.5px; color: var(--text-secondary); }
.optf-order__eta b { color: var(--text); }
.optf-steps small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--text-muted); }
.optf-lead { margin: 10px 0 0; max-width: 72ch; color: var(--text-secondary); font-size: 15px; }

.optf-content { min-width: 0; }
.optf-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; margin-top: 22px; align-items: start; }
.optf-nav { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 8px; box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.optf-nav button { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left;
    border-radius: 8px; padding: 8px 10px; font-size: 14px; color: var(--text); min-height: 36px; }
.optf-nav button:hover { background: var(--bg-soft); }
.optf-nav button span { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.optf-nav__all { font-weight: 700; margin-bottom: 4px; }
.optf-nav__g { font-weight: 600; }
.optf-nav__caret { width: 0; height: 0; border-left: 4px solid var(--text-muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
    transition: transform var(--dur); flex: none; margin-right: 2px; }
.optf-nav__grp.is-open .optf-nav__caret { transform: rotate(90deg); }
.optf-nav__types { margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--border); }
.optf-nav__t { font-size: 13.5px !important; padding: 6px 10px !important; min-height: 32px !important; color: var(--text-secondary) !important; }
.optf-nav button.is-on { background: var(--text); color: #fff !important; }
.optf-nav button.is-on span { color: rgba(255,255,255,.6); }
.optf-nav button.is-on .optf-nav__caret { border-left-color: #fff; }
.optf-incart { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: #fff;
    border: 1px solid var(--accent); border-radius: 999px; padding: 0 6px; line-height: 17px; }

.optf-mnav { display: none; }
.optf-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.optf-chips::-webkit-scrollbar { display: none; }
.optf-chips button { flex: none; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px;
    font-size: 13px; font-weight: 600; color: var(--text); min-height: 36px; }
.optf-chips button.is-on { background: var(--text); border-color: var(--text); color: #fff; }
.optf-chips--sub { margin-top: 8px; }
.optf-chips--sub button { font-weight: 500; font-size: 12.5px; min-height: 32px; }
.optf-chips--sub button.is-on { background: var(--bg-soft); color: var(--text); border-color: var(--text); }

.optf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.optf-crumb { font-size: 14px; color: var(--text-muted); }
.optf-crumb button { border: 0; background: none; padding: 0; color: var(--text-secondary); font-size: 14px; }
.optf-crumb button:hover { color: var(--accent); }
.optf-crumb b { color: var(--text); font-family: var(--font-display); font-size: 18px; }
.optf-bar__right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.optf-seg { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.optf-seg button { border: 0; background: none; border-radius: 6px; padding: 6px 11px; font-size: 13px; font-weight: 600; color: var(--text-secondary); min-height: 30px; }
.optf-seg button.is-on { background: var(--bg-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.optf-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; height: 38px; }
.optf-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.optf-search svg { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.optf-search input { border: 0; outline: none; font: inherit; font-size: 14px; width: 200px; background: none; }

.optf-sec { margin-top: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.optf-sec__head { display: flex; align-items: baseline; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.optf-sec__head h2 { font-size: 17px; }
.optf-sec__head span { font-size: 12.5px; color: var(--text-muted); }
.optf-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.optf-c-sku { width: 230px; }
.optf-table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); padding: 9px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.optf-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.optf-table tbody tr:last-child td { border-bottom: 0; }
.optf-table tbody tr:hover td { background: #fafafa; }
.optf-table tbody tr.is-in td { background: #f6f7f9; }
.optf-table tbody tr.is-in td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.optf-c-img { width: 72px; padding-left: 18px !important; }
.optf-c-img img, .optf-swatch, .optf-ci > img, .optf-ci > .optf-swatch { display: block; width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: var(--bg-soft); flex: none; }
img.optf-zoomable { cursor: zoom-in; transition: transform var(--dur); }
img.optf-zoomable:hover { transform: scale(1.06); }
.optf-swatch { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.optf-name { font-weight: 600; color: var(--text); }
.optf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.optf-chip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-secondary); font-size: 11.5px; font-weight: 600; }
.optf-chip--refill { border-style: dashed; }
.optf-code { font-variant-numeric: tabular-nums; }
.optf-chip--dia { border-color: var(--amber); color: var(--amber); background: #fff; }
.optf-sec__dia { margin-left: auto; font-size: 12.5px !important; font-weight: 600; color: var(--amber) !important; }
.optf-sku-m { display: none; }
.optf-c-sku code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.optf-c-p { text-align: right !important; white-space: nowrap; width: 112px; font-variant-numeric: tabular-nums; font-weight: 400; font-size: 15px; color: var(--text-secondary); }
th.optf-c-p { font-weight: 600; }
.optf-pl { display: none; }
.optf-c-3000 { color: var(--accent); }
th.optf-c-3000 { color: var(--accent); }
/* действующая градация корзины — цена ярче, вторая приглушена */
.optf-table.is-tier-1500 td.optf-c-1500, .optf-table:not(.is-tier-3000) td.optf-c-1500 { color: var(--text); }
.optf-table.is-tier-3000 td.optf-c-1500 { color: var(--text-muted); font-weight: 400; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.optf-na { font-weight: 500; font-size: 13px; color: var(--text-muted); text-decoration: none; }
.optf-c-qty { width: 176px; text-align: right !important; padding-right: 18px !important; position: relative; }
.optf-add { width: 140px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--accent); background: #fff; color: var(--accent);
    font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: background var(--dur), color var(--dur); }
.optf-add:hover { background: var(--accent); color: #fff; }
.optf-qty { display: inline-flex; align-items: stretch; width: 140px; height: 36px; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: #fff; }
.optf-qty button { width: 34px; border: 0; background: var(--bg-soft); font-size: 18px; font-weight: 600; color: var(--text); }
.optf-qty button:hover { background: var(--border); }
.optf-qty input { flex: 1; min-width: 0; width: 64px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center;
    font: inherit; font-weight: 700; font-size: 15px; outline: none; font-variant-numeric: tabular-nums; }
.optf-qty:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.optf-qty.is-bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.optf-qty.is-bad input { color: var(--red); background: var(--red-bg); }
.optf-err { position: absolute; right: 18px; top: calc(100% - 6px); z-index: 5; width: max-content; max-width: 220px;
    padding: 5px 9px; border-radius: 7px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; white-space: normal;
    text-align: left; box-shadow: 0 6px 16px -6px rgba(220,38,38,.55); pointer-events: none; }
.optf-err::before { content: ''; position: absolute; top: -5px; right: 60px; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--red); }
.optf-empty { margin-top: 14px; padding: 40px 20px; text-align: center; color: var(--text-secondary); background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.optf-foot { margin-top: 24px; font-size: 13px; color: var(--text-secondary); }
.optf-foot p { margin: 0 0 6px; max-width: 90ch; }

/* плашка корзины */
.optf-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -12px rgba(15,23,42,.18); padding-bottom: env(safe-area-inset-bottom); }
.optf-dock__in { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 260px auto; gap: 18px; align-items: center; }
.optf-dock__sum b { display: block; font-family: var(--font-display); font-size: 17px; }
.optf-dock__sum span { font-size: 13px; color: var(--text-secondary); }
.optf-dock__sum span.is-bad { color: var(--red); font-weight: 600; }
.optf-dock__bar, .optf-prog__bar { position: relative; height: 8px; border-radius: 4px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border); }
.optf-dock__bar i, .optf-prog__bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); transition: width .25s var(--ease); }
.optf-dock__bar s, .optf-prog__bar s { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--text-muted); }
body.optf-lock .opt-preview-bar, body.optf-has-dock .opt-preview-bar { bottom: 86px; }

/* выезжающая корзина */
.optf-drawer { position: fixed; inset: 0; z-index: 60; }
.optf-drawer__bg { position: absolute; inset: 0; background: rgba(15,23,42,.45); animation: optZoomIn .15s ease-out; }
.optf-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: #fff; display: flex; flex-direction: column;
    box-shadow: -12px 0 40px rgba(15,23,42,.2); animation: optfSlide .2s var(--ease); }
@keyframes optfSlide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.optf-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.optf-drawer__head h2 { font-size: 20px; }
.optf-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-soft); font-size: 22px; line-height: 1; color: var(--text); flex: none; }
.optf-x:hover { background: var(--border); }
.optf-x--sm { width: 28px; height: 28px; font-size: 18px; background: none; color: var(--text-muted); }
.optf-drawer__body { flex: 1; overflow: auto; padding: 8px 20px 16px; }
.optf-cg__h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 14px 0 4px; }
.optf-ci { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.optf-ci__info { flex: 1; min-width: 0; }
.optf-ci__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.optf-ci .optf-c-qty { width: auto; padding: 0 !important; text-align: left !important; }
.optf-ci .optf-c-qty { position: relative; }
.optf-ci .optf-err { left: 0; right: auto; top: calc(100% + 6px); }
.optf-ci .optf-err::before { left: 18px; right: auto; }
.optf-ci__sum { text-align: right; font-variant-numeric: tabular-nums; }
.optf-ci__sum small { display: block; font-size: 12px; color: var(--text-muted); }
.optf-ci__sum b { font-size: 15px; font-weight: 400; }
/* широкая корзина (14.11.2026): название слева, количество и сумма — в той же строке справа; позиций на экране больше */
@media (min-width: 640px) {
    .optf-ci { align-items: center; padding: 8px 0; }
    .optf-ci__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
    .optf-ci__info > .optf-name { grid-column: 1; grid-row: 1; }
    .optf-ci__info > .optf-meta { grid-column: 1; grid-row: 2; }
    .optf-ci__row { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; flex-wrap: nowrap; gap: 14px; }
    .optf-ci__sum { min-width: 104px; }
}
.optf-drawer__foot { border-top: 1px solid var(--border); padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); background: #fff; }
.optf-prog { margin-bottom: 12px; }
.optf-prog__lbl { display: flex; justify-content: flex-end; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.optf-prog__lbl span:first-child { position: relative; margin-right: auto; left: calc(50% - 24px); }
.optf-prog__lbl .is-ok { color: var(--accent); font-weight: 700; }
.optf-tot { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; color: var(--text-secondary); }
.optf-tot b { color: var(--text); font-variant-numeric: tabular-nums; }
.optf-tot--big { font-size: 16px; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--border); }
.optf-tot--big b { font-family: var(--font-display); font-size: 22px; }
.optf-warn { margin: 10px 0 0; font-size: 13px; color: var(--amber); font-weight: 600; }
.optf-warn--bad { color: var(--red); }
.optf-note { margin: 10px 0 0; font-size: 12px; color: var(--text-muted); }
.optf-empty--cart { margin-top: 20px; }

@media (max-width: 1024px) {
    .optf-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .optf-nav { display: none; }
    .optf-mnav { display: block; margin-bottom: 12px; }
    .optf-crumb { display: none; }
    .optf-c-sku { display: none; }
    .optf-sku-m { display: block; width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; word-break: break-all; }
}
@media (max-width: 640px) {
    .optf-top__in, .optf-main, .optf-dock__in { padding-left: 16px; padding-right: 16px; }
    .optf-top__me > span, .optf-cartbtn b { display: none; }
    .optf-main { padding-top: 14px; }
    .optf-hero { padding: 18px; }
    .optf-lead { font-size: 14px; }
    .optf-bar__right, .optf-search { width: 100%; }
    .optf-search input { width: 100%; }
    .optf-seg { width: 100%; }
    .optf-seg button { flex: 1; }
    .optf-mnav .optf-chips { margin: 0 -16px; padding: 0 16px 2px; }
    /* строка таблицы — карточка: фото | название, ниже цены и количество */
    .optf-table, .optf-table tbody { display: block; }
    .optf-table thead { display: none; }
    .optf-table tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; padding: 12px 14px;
        border-bottom: 1px solid var(--border); align-items: center; }
    .optf-table tbody tr:last-child { border-bottom: 0; }
    .optf-table td { display: block; padding: 0 !important; border: 0; background: none !important; width: auto; min-width: 0; }
    .optf-table td.optf-c-sku { display: none; }
    .optf-table tbody tr.is-in { background: #f6f7f9; box-shadow: inset 3px 0 0 var(--accent); }
    .optf-table tbody tr.is-in td:first-child { box-shadow: none; }
    .optf-c-img { grid-row: 1 / span 2; align-self: start; }
    .optf-c-img img, .optf-swatch { width: 52px; height: 52px; }
    .optf-c-name { grid-column: 2 / -1; }
    .optf-c-1500, .optf-c-3000 { grid-row: 2; text-align: left !important; font-size: 14px; }
    .optf-c-1500 { grid-column: 2; }
    .optf-c-3000 { grid-column: 3; text-align: right !important; }
    .optf-pl { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); text-decoration: none; }
    .optf-c-qty { grid-column: 1 / -1; text-align: left !important; }
    .optf-c-qty .optf-add { width: 100%; }
    .optf-c-qty .optf-qty { width: 100%; }
    .optf-c-qty .optf-qty input { flex: 1; }
    .optf-c-qty .optf-qty button { width: 52px; }
    .optf-err { left: 0; right: auto; }
    .optf-err::before { left: 18px; right: auto; }
    .optf-add, .optf-qty { width: 100%; }
    .optf-table tr { position: relative; }
    .optf-dock__in { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
    .optf-dock__bar { grid-column: 1 / -1; grid-row: 2; }
    .optf-dock__sum b { font-size: 14px; }
    .optf-dock__sum span { font-size: 12px; }
    .optf-ci .optf-qty button { width: 40px; }
}
body.optf-has-dock .optf-nav { max-height: calc(100vh - 92px - 84px); }

/* вкладки «Прайс / Мои заказы», оформление и заказы (13.11.2026) */
.optf-top__l { display: flex; align-items: center; gap: 28px; min-width: 0; }
.optf-tabs { display: flex; gap: 4px; }
.optf-tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--text-secondary);
    font-weight: 600; font-size: 14px; text-decoration: none; }
.optf-tabs a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.optf-tabs a.is-on { background: var(--bg-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.optf-tabs em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--text); color: #fff;
    font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.optf-comment { display: block; margin-top: 12px; }
.optf-comment span { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.optf-comment textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; }
.optf-comment textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.optf-checkout { width: 100%; justify-content: center; margin-top: 12px; height: 46px; font-size: 15px; }
.optf-checkout:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.optf-err-box { margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: var(--red-bg); color: var(--red); font-size: 13px; font-weight: 600; }
.optf-orders h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
.optf-order { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.optf-order summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 160px auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; }
.optf-order summary::-webkit-details-marker { display: none; }
.optf-order[open] summary { border-bottom: 1px solid var(--border); }
.optf-order__n b { display: block; font-family: var(--font-display); font-size: 17px; }
.optf-order__n span, .optf-order__q span { display: block; font-size: 12.5px; color: var(--text-muted); }
.optf-order__q { font-size: 14px; }
.optf-order__sum { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-align: right; white-space: nowrap; }
.optf-st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg-soft); color: var(--text-secondary); border: 1px solid var(--border); white-space: nowrap; }
.optf-st.is-new { color: var(--blue); border-color: var(--blue-bg); background: #fff; }
.optf-st.is-ok { color: var(--accent); border-color: var(--accent); background: #fff; }
.optf-st.is-done { color: #fff; background: var(--text); border-color: var(--text); }
.optf-st.is-cancel { color: var(--red); border-color: var(--red-bg); background: #fff; }
.optf-order__note, .optf-order__cm { padding: 10px 20px 0; font-size: 13.5px; color: var(--text-secondary); }
.optf-otable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.optf-otable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; padding: 8px 12px; }
.optf-otable td { padding: 8px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.optf-otable .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.optf-otable .optf-c-img { width: 64px; padding-left: 20px !important; }
.optf-otable .optf-c-img img, .optf-otable .optf-swatch { width: 44px; height: 44px; }
@media (max-width: 860px) {
    .optf-top__l { gap: 12px; }
    .optf-brand > div { display: none; }
}
@media (max-width: 640px) {
    .optf-tabs a { padding: 0 9px; font-size: 13px; }
    .optf-order summary { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 16px; }
    .optf-order .optf-st { justify-self: end; }
    .optf-order__q { grid-column: 1; }
    .optf-order__sum { grid-column: 2; }
    .optf-otable th:nth-child(5), .optf-otable td:nth-child(5), .optf-otable .optf-ow { display: none; }
    .optf-otable .optf-c-img { padding-left: 12px !important; width: 52px; }
}
.optf-order__sum span { display: block; font-family: var(--font-body); font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
.optf-steps { display: flex; padding: 14px 20px 4px; gap: 0; overflow-x: auto; scrollbar-width: none; }
.optf-steps::-webkit-scrollbar { display: none; }
.optf-steps span { flex: 1 0 96px; position: relative; padding-top: 18px; font-size: 11.5px; color: var(--text-muted); text-align: center; line-height: 1.25; }
.optf-steps span::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--border); }
.optf-steps span:first-child::before { left: 50%; } .optf-steps span:last-child::before { right: 50%; }
.optf-steps i { position: absolute; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--border-strong); z-index: 1; }
.optf-steps .is-done { color: var(--text-secondary); }
.optf-steps .is-done::before, .optf-steps .is-cur::before { background: var(--accent); }
.optf-steps .is-cur::before { right: 50%; }
.optf-steps .is-cur:first-child::before { display: none; }
.optf-steps .is-done i { background: var(--accent); border-color: var(--accent); }
.optf-steps .is-cur i { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.optf-steps .is-cur { color: var(--text); font-weight: 700; }
.optf-order__tot { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; justify-content: end; padding: 12px 20px 16px;
    border-top: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); max-width: 420px; margin-left: auto; }
.optf-order__tot b { text-align: right; font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.optf-order__tot .is-total { font-weight: 700; color: var(--text); font-size: 16px; }
.optf-was { display: block; font-size: 12px; color: var(--text-muted); }

/* Вход звонком оптовика (с 19.11.2026): номер-кнопка, второй номер, QR на компьютере */
.opt-tel { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; font-size: 21px; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.opt-callin__alt { margin: 10px 0 0; text-align: center; color: var(--text-secondary); font-size: 13px; }
.opt-callin__alt a { color: var(--text-primary, #0f172a); font-weight: 600; white-space: nowrap; }
.opt-callin__qr { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.opt-callin__qr[hidden] { display: none; }
.opt-callin__qr div { flex: none; width: 96px; height: 96px; }
.opt-callin__qr svg { display: block; width: 100%; height: 100%; }
.opt-callin__qr span { color: var(--text-secondary); font-size: 12.5px; line-height: 1.4; }
.opt-callin__state { margin: 16px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); text-align: center; font-size: 13.5px; }
#optCallinRetry { width: 100%; margin-bottom: 12px; }
#optCallinRetry[hidden] { display: none; }
#optCallinErr { margin-bottom: 12px; }
.opt-callin__back { margin-top: 14px; }
@media (hover: none) and (pointer: coarse), (max-width: 600px) { .opt-callin__qr { display: none !important; } }
