/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"Onest","arguments":[{"subsets":["latin","cyrillic"],"display":"swap","variable":"--font-onest"}],"variableName":"onest"} ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/be4f912c06e1e110-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/6961d055d00ff7ec-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* math */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/1dd116e7162c5f47-s.woff2) format('woff2');
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/25408a68d73c6c69-s.woff2) format('woff2');
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/a2a4a14ada96f862-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/c1b02c1a57568c67-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Onest_3acdb7';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/cd87a8f174d93ac6-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Onest_Fallback_3acdb7';src: local("Arial");ascent-override: 92.20%;descent-override: 28.99%;line-gap-override: 0.00%;size-adjust: 105.20%
}.__className_3acdb7 {font-family: '__Onest_3acdb7', '__Onest_Fallback_3acdb7';font-style: normal
}.__variable_3acdb7 {--font-onest: '__Onest_3acdb7', '__Onest_Fallback_3acdb7'
}

/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/*
 * Стили B2B-кабинета. Обычный CSS на токенах.
 *
 * Основа светлая и нейтральная, акцент один — фирменный цвет клиента
 * (--brand / --brand-text приходят из брендирования в <html style>).
 * Семантические цвета — только для статусов. Тёмная тема — те же токены.
 *
 * Ширины: ≥1280 — сайдбар развёрнут; 600–1279 — свёрнут до иконок;
 * <600 — сайдбара нет, навигация в нижних вкладках.
 */

:root {
  --brand: #1f5fd1;
  --brand-text: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, var(--surface));
  --brand-strong: color-mix(in srgb, var(--brand) 82%, var(--text));
  --brand-ring: color-mix(in srgb, var(--brand) 32%, transparent);

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eceef2;
  --border: #e2e5ea;
  --border-strong: #cdd2da;
  --text: #1a1d23;
  --text-2: #3d4450;
  --muted: #677183;
  --faint: #99a1ae;

  --danger: #c4312b;
  --danger-soft: #fdeceb;
  --danger-border: #f4c4c1;
  --warning: #a86300;
  --ok: #1d7a45;
  --ok-soft: #e7f5ec;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-pop: 0 10px 28px rgba(16, 24, 40, 0.14), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);

  --topbar-h: 56px;
  --side-w: 248px;
  --side-w-collapsed: 64px;
  --tabs-h: 60px;

  --font: var(--font-onest), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-soft: color-mix(in srgb, var(--brand) 22%, var(--surface));
    --brand-strong: color-mix(in srgb, var(--brand) 60%, #ffffff);
    --brand-ring: color-mix(in srgb, var(--brand) 45%, transparent);

    --bg: #101216;
    --surface: #181b21;
    --surface-2: #1e2229;
    --surface-3: #272c35;
    --border: #2b3039;
    --border-strong: #3a414d;
    --text: #e8ebf0;
    --text-2: #c7cdd6;
    --muted: #9aa3b1;
    --faint: #6d7684;

    --danger: #f06a62;
    --danger-soft: #3a1c1b;
    --danger-border: #6b2c29;
    --warning: #e0a13a;
    --ok: #4cc27f;
    --ok-soft: #173424;

    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-card: none;

    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.icon {
  flex: none;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.link {
  color: var(--brand-strong);
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link--quiet {
  font-size: 13px;
}

/* ----- Кнопки ----- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}

.button--primary {
  background: var(--brand);
  color: var(--brand-text);
}

.button--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 88%, #000000);
}

.button--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button--secondary:hover:not(:disabled) {
  background: var(--surface-2);
}

.button--sm {
  height: 36px;
  padding: 0 12px;
  font-size: 13.5px;
}

.button--block {
  width: 100%;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ----- Формы ----- */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form__legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form__section + .form__section {
  margin-top: 8px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.form__row--2-1 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.form__footnote {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
}

.field__optional {
  color: var(--faint);
  font-weight: 400;
}

.field__error {
  color: var(--danger);
  font-size: 13px;
}

.field__hint {
  color: var(--muted);
  font-size: 13px;
}

.field__hint--ok {
  color: var(--ok);
}

.input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.input::placeholder {
  color: var(--faint);
}

.input:hover {
  border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text));
}

.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.input--invalid,
.input--invalid:hover {
  border-color: var(--danger);
}

.input--invalid:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent);
}

.input--textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.45;
  resize: vertical;
}

.input--mono {
  font-family: var(--mono);
  font-size: 15px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group .button {
  height: 42px;
  flex: none;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.alert .icon {
  margin-top: 1px;
}

.alert--error {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger);
}

.alert--banner {
  margin-bottom: 16px;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.success__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.success__title {
  font-size: 17px;
  font-weight: 600;
}

.success__text {
  color: var(--text-2);
}

/* ----- Бренд ----- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
}

.brand__name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand__logo {
  display: block;
  max-width: 180px;
  height: 30px;
  object-fit: contain;
}

/* ----- Вход, регистрация, приглашение ----- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  min-height: 100vh;
  background: var(--surface);
}

.auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth__inner {
  width: 100%;
  max-width: 400px;
}

.auth__inner--wide {
  max-width: 560px;
}

.auth__brand {
  margin-bottom: 32px;
}

.auth__title {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.auth__subtitle {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.auth__aside {
  display: flex;
  align-items: center;
  padding: 56px;
  background: var(--brand);
  background-image:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(0, 0, 0, 0.16), transparent 60%);
  color: var(--brand-text);
}

.auth__aside-inner {
  max-width: 440px;
}

.auth__aside-kicker {
  opacity: 0.8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth__aside-title {
  margin: 12px 0 28px;
  font-size: 26px;
  text-wrap: balance;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.auth__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.auth__features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth__features .icon {
  opacity: 0.85;
}

.auth__banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

/* ----- Оболочка ----- */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: calc(var(--side-w) - 16px) minmax(0, 1fr) auto;
  grid-template-areas: 'brand le actions';
  align-items: center;
  grid-gap: 16px;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar__le {
  grid-area: le;
  min-width: 0;
}

.topbar__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__quick .icon {
  margin-left: -2px;
}

.cartlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}

.cartlink:hover {
  background: var(--surface-2);
}

.cartlink__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

.cartlink__count--filled {
  background: var(--brand);
  color: var(--brand-text);
}

/* Переключатель юрлица */

.le {
  position: relative;
  max-width: 440px;
}

.le--empty {
  color: var(--muted);
}

.le__button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
}

.le__button:hover {
  border-color: var(--border-strong);
}

.le__button[aria-haspopup] {
  cursor: pointer;
}

.le__button:not([aria-haspopup]) {
  cursor: default;
}

.le__button--pending {
  opacity: 0.6;
}

.le__text {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.le__name {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.le__inn {
  color: var(--muted);
  font-size: 12px;
}

.le__chevron {
  color: var(--muted);
}

.popover {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 40;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.le__popover {
  left: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  padding: 6px;
}

.le__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-bottom: 4px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.le__search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.le__search-input {
  flex: 1 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.le__list {
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.le__option {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px 32px 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.le__option:hover {
  background: var(--surface-2);
}

.le__option--active {
  background: var(--brand-soft);
}

.le__option-name {
  font-weight: 600;
}

.le__option-meta {
  color: var(--muted);
  font-size: 12.5px;
}

.le__option-check {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--brand-strong);
  transform: translateY(-50%);
}

.le__empty {
  padding: 12px 10px;
  color: var(--muted);
}

/* Профиль */

.profile {
  position: relative;
}

.profile__button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 3px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
}

.profile__button:hover,
.profile__button[aria-expanded='true'] {
  background: var(--surface-2);
}

.profile__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.profile__avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.profile__name {
  font-weight: 600;
}

.profile__chevron {
  color: var(--muted);
}

.profile__popover {
  right: 0;
  width: 290px;
  max-width: calc(100vw - 32px);
  padding: 6px;
}

.profile__head {
  display: flex;
  gap: 12px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.profile__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile__fullname {
  font-weight: 600;
}

.profile__meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--surface-2);
}

.menu-item--danger {
  color: var(--danger);
}

/* Тело: сайдбар + содержимое */

.app__body {
  display: flex;
  flex: 1 1;
  min-width: 0;
}

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: var(--topbar-h);
  display: flex;
  flex: none;
  flex-direction: column;
  width: var(--side-w);
  height: calc(100vh - var(--topbar-h));
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: width 0.18s ease;
}

.sidebar[data-collapsed='true'] {
  width: var(--side-w-collapsed);
}

.sidebar__scroll {
  flex: 1 1;
  min-height: 0;
  padding: 12px 10px;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.sidebar__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
}

.sidebar__toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar[data-collapsed='true'] .sidebar__toggle {
  justify-content: center;
  padding: 0;
}

.sidebar[data-collapsed='true'] .sidebar__toggle-label,
.sidebar[data-collapsed='true'] .nav__label {
  display: none;
}

.sidebar[data-collapsed='true'] .nav__caption {
  height: 1px;
  margin: 8px 6px;
  padding: 0;
  overflow: hidden;
  background: var(--border);
  color: transparent;
}

.sidebar[data-collapsed='true'] .nav__link {
  justify-content: center;
  padding: 0;
}

/* Навигация */

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav__caption {
  padding: 8px 12px 4px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}

.nav__link .icon {
  color: var(--muted);
}

.nav__link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav__link--active,
.nav__link--active:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.nav__link--active .icon {
  color: var(--brand-strong);
}

.nav__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Меню «Ещё» на телефоне — плитки в две колонки */

.nav--sheet {
  gap: 4px;
}

.nav--sheet .nav__caption {
  padding: 10px 2px 6px;
}

.nav--sheet .nav__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.nav--sheet .nav__link {
  height: 44px;
  padding: 0 12px;
  gap: 10px;
  background: var(--surface-2);
  white-space: normal;
  line-height: 1.2;
}

.nav--sheet .nav__link--active {
  background: var(--brand-soft);
}

/* Менеджер */

.manager {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.manager__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.manager__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-text);
  font-size: 12.5px;
  font-weight: 700;
}

.manager__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.manager__caption {
  color: var(--muted);
  font-size: 12px;
}

.manager__name {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.manager__line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-2);
  font-size: 13px;
}

.manager__line .icon {
  color: var(--muted);
}

.manager__email {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.manager--compact {
  align-items: center;
  padding: 6px 0;
  border: 0;
  background: transparent;
}

/* Содержимое */

.content {
  flex: 1 1;
  min-width: 0;
  padding: 24px 28px 48px;
}

.page {
  max-width: 1320px;
}

.page__head {
  margin-bottom: 20px;
}

.page__title {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.page__subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card--pad {
  padding: 16px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.card__title {
  font-size: 15px;
  font-weight: 600;
}

.card--pad .card__title {
  margin-bottom: 10px;
}

.card__pad-x {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

.empty--inline {
  padding: 36px 20px 32px;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.empty__icon--muted {
  background: var(--surface-3);
  color: var(--muted);
}

.empty__title {
  font-size: 16px;
  font-weight: 600;
}

.empty__text {
  max-width: 380px;
  margin-bottom: 8px;
  color: var(--muted);
}

.lines {
  margin: 0;
  padding-left: 22px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.8;
}

/* Таблицы */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
}

/* Главная */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

.kpis--error {
  display: block;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.kpi__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.kpi--danger .kpi__label::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.kpi__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.kpi__value {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.kpi--danger .kpi__value {
  color: var(--danger);
}

.kpi__note {
  color: var(--muted);
  font-size: 12.5px;
}

.meter {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
}

.meter__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.meter--warn .meter__fill {
  background: var(--warning);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: start;
  grid-gap: 16px;
  gap: 16px;
}

.home-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.quick__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.quick__hint {
  color: var(--muted);
  font-size: 12.5px;
}

.skeleton {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.skeleton--label {
  width: 45%;
  height: 12px;
}

.skeleton--value {
  width: 70%;
  height: 24px;
  margin: 4px 0;
}

.skeleton--note {
  width: 55%;
  height: 10px;
}

.skeleton--row {
  width: 100%;
  height: 18px;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* Нижние вкладки и меню «Ещё» — только на телефоне */

.tabs {
  display: none;
}

.sheet {
  position: fixed;
  inset: 0 0 calc(var(--tabs-h) + env(safe-area-inset-bottom)) 0;
  z-index: 50;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 15, 20, 0.42);
}

.sheet__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: calc(100% - 24px);
  padding: 6px 16px 16px;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 2px;
}

.sheet__title {
  font-size: 16px;
  font-weight: 650;
}

.sheet__manager {
  margin-top: 16px;
}

/* ----- Средняя ширина: сайдбар свёрнут, подписи в шапке короче ----- */

@media (max-width: 1279px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 1023px) {
  .topbar__quick-label,
  .cartlink__label,
  .profile__name,
  .profile__chevron {
    display: none;
  }

  .topbar__quick {
    width: 36px;
    padding: 0;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth__aside {
    display: none;
  }
}

/* ----- Телефон ----- */

@media (max-width: 599px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'brand actions'
      'le le';
    row-gap: 8px;
    height: auto;
    padding: 8px 16px 10px;
    /* На телефоне шапка в две строки: не держим её над содержимым, навигация — во вкладках. */
    position: relative;
  }

  .brand__name {
    font-size: 15px;
  }

  .le {
    max-width: none;
  }

  .le__popover {
    right: 0;
    width: auto;
    max-width: none;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 16px 16px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom));
  }

  .page__title {
    font-size: 20px;
  }

  .kpis {
    gap: 8px;
  }

  .kpi {
    padding: 12px;
  }

  .kpi__value {
    font-size: 17px;
  }

  .kpi__note {
    font-size: 12px;
  }

  .form__row,
  .form__row--2-1 {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth__main {
    align-items: flex-start;
    padding: 28px 16px 40px;
  }

  .auth__brand {
    margin-bottom: 24px;
  }

  .auth__title {
    font-size: 22px;
  }

  .tabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .tabs__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
  }

  .tabs__item--active {
    color: var(--brand-strong);
    font-weight: 600;
  }

  .tabs__icon {
    position: relative;
  }

  .tabs__badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--brand);
    color: var(--brand-text);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }

  .skeleton {
    animation: none;
  }
}

.fallback {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}

.fallback .empty {
  width: 100%;
  max-width: 440px;
}

.le__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ===================== Закупка: общие элементы ===================== */

.page--wide {
  max-width: 1320px;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: -0.01em;
}

.select {
  height: 36px;
  min-width: 0;
  max-width: 100%;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23677183' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 8 4.5 4.5L14.5 8'/%3E%3C/svg%3E")
    no-repeat right 6px center / 18px;
  font-size: 13.5px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
}

.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.select--sm {
  height: 36px;
}

.button--danger {
  background: var(--danger);
  color: #ffffff;
}

.button--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 88%, #000000);
}

.icon-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-button--danger:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-button[aria-pressed='true'],
.icon-button[aria-expanded='true'] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--brand {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-text);
  font-size: 11.5px;
  font-weight: 700;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.notice .icon {
  margin-top: 1px;
}

.notice--ok {
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -4px 0 10px -4px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text);
}

/* Степпер количества */

.stepper {
  display: inline-flex;
  align-items: stretch;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.stepper:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.stepper__button {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
}

.stepper__button:hover:not(:disabled) {
  background: var(--surface-3);
}

.stepper__button:disabled {
  color: var(--faint);
  cursor: default;
}

.stepper__input {
  width: 64px;
  min-width: 0;
  padding: 0 4px;
  border: 0;
  border-inline: 1px solid var(--border);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.stepper__input:focus {
  outline: none;
}

.stepper__input::placeholder {
  color: var(--faint);
  font-weight: 400;
}

.stepper--compact {
  height: 30px;
}

.stepper--compact .stepper__button {
  width: 26px;
}

.stepper--compact .stepper__input {
  width: 56px;
  font-size: 14px;
}

/* Пилюли остатка и статусы */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill__num {
  font-weight: 500;
  opacity: 0.85;
}

.pill--in_stock {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill--low {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning);
}

.pill--out {
  background: var(--surface-3);
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status--found {
  background: var(--ok-soft);
  color: var(--ok);
}

.status--ambiguous {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning);
}

.status--not_found,
.status--invalid {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ===================== Каталог ===================== */

.catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ctool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.ctool__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ctool__cats.is-open {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.csearch {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.csearch:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.csearch__input {
  flex: 1 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.csearch__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.cfilter__stock {
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.cfilter__stock input {
  margin: 0;
}

.ctool__brand .select {
  width: 150px;
}

.ctool__views {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.ctool__views .icon-button {
  width: 30px;
  height: 30px;
}

.ctool__pop {
  position: relative;
}

.ctool__menu {
  width: 240px;
  padding: 6px;
}

.ctool__menu--right {
  right: 0;
}

.ctool__menu-title {
  padding: 6px 10px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ctool__menu-item {
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
}

.ctool__menu-item:hover {
  background: var(--surface-2);
}

.ctool__menu-item input {
  margin: 0;
}

/* Чипы активных фильтров */

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 4px 0 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
}

.fchip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.fchip button:hover {
  background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.chips__reset {
  margin-left: 4px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Панель категорий: справа от сайдбара, на телефоне — фильтры на весь экран */

.catpanel {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: var(--side-w);
  z-index: 35;
  display: flex;
  flex-direction: column;
  width: 320px;
  max-width: calc(100vw - 16px);
  border-right: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.catpanel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px 16px;
}

.catpanel__title {
  font-size: 15px;
  font-weight: 650;
}

.catpanel__body {
  flex: 1 1;
  min-height: 0;
  padding: 0 10px 16px;
  overflow-y: auto;
}

.catpanel__filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 6px;
}

.catpanel__filters .select {
  width: 100%;
  height: 42px;
}

.catpanel__caption {
  margin-top: 8px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.catpanel__foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.cattree__groups,
.cattree__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cattree__list {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.cattree__groups > li + li {
  margin-top: 4px;
}

.cattree__node {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.cattree__node:hover {
  background: var(--surface-2);
  color: var(--text);
}

.cattree__node--d0,
.cattree__node--all {
  color: var(--text);
  font-weight: 600;
}

.cattree__node--active,
.cattree__node--active:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

/* Таблица каталога */

.ctable-card {
  overflow: hidden;
}

.ctable th {
  height: 38px;
  padding: 0 10px;
  background: var(--surface-2);
}

.ctable td {
  height: var(--row-h, 44px);
  padding: 3px 10px;
  vertical-align: middle;
}

.ctable tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.ctable tbody tr.is-checked td {
  background: var(--brand-soft);
}

.th-note {
  color: var(--faint);
  font-weight: 500;
}

.ctable__check {
  width: 36px;
  padding-right: 0 !important;
}

.ccheck {
  display: block;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.ctable__photo {
  width: 48px;
  padding-right: 0 !important;
}

.cphoto {
  display: grid;
  place-items: center;
  width: calc(var(--row-h, 44px) - 10px);
  height: calc(var(--row-h, 44px) - 10px);
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--faint);
}

.cphoto {
  position: relative;
}

/* Фото строго в рамке превью: и на экране, и для масок снимков. */
.cphoto img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ctable__sku {
  color: var(--text-2);
  white-space: nowrap;
}

.ctable__name {
  min-width: 200px;
}

.ctable__link {
  font-weight: 500;
}

.ctable__link:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ctable__brand {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.ctable__unit {
  color: var(--text-2);
  white-space: nowrap;
}

.ctable__price {
  font-weight: 600;
}

.ctable__qty {
  width: 150px;
}

.ctable__sum {
  min-width: 110px;
  font-weight: 600;
}

.cqty {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cqty__line {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cqty__add {
  width: 30px;
  height: 30px;
}

.cqty__hint {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
}

.cqty__hint--ok {
  color: var(--ok);
}

.cqty__hint--warn {
  color: var(--warning);
}

.cqty__hint--error {
  color: var(--danger);
}

/* Плитка */

.ctiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.ctile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.ctile__check {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
}

.ctile__photo .cphoto {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
}

.ctile__name {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ctile__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.ctile__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ctile__amount {
  font-size: 16px;
  font-weight: 650;
}

.ctile__order {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.ctile__sum {
  padding-top: 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* Пагинация и строка выбора */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.pager__info {
  color: var(--muted);
  font-size: 13.5px;
}

.selbar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 10px 12px 10px 18px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-pop);
}

.selbar__text strong {
  font-weight: 650;
}

.selbar__actions {
  display: flex;
  gap: 8px;
}

.selbar__clear {
  background: transparent;
  color: inherit;
  border-color: color-mix(in srgb, var(--surface) 35%, transparent);
}

.selbar__clear:hover {
  background: color-mix(in srgb, var(--surface) 12%, transparent);
}

/* ===================== Карточка товара ===================== */

.product__top {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  align-items: start;
  grid-gap: 24px;
  gap: 24px;
  margin-bottom: 20px;
}

.product__gallery {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.product__gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__noimage {
  color: var(--faint);
}

.product__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.product__desc {
  color: var(--text-2);
}

.poffers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.poffer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'main order'
    'facts stock';
  grid-gap: 10px 20px;
  gap: 10px 20px;
  padding: 14px 16px;
}

.poffer__main {
  grid-area: main;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  min-width: 0;
}

.poffer__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.poffer__title {
  font-weight: 600;
}

.poffer__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}

.poffer__amount {
  font-size: 18px;
  font-weight: 650;
}

.poffer__base {
  color: var(--faint);
  font-size: 13px;
}

.poffer__facts {
  grid-area: facts;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  font-size: 13px;
}

.poffer__facts div {
  display: flex;
  gap: 6px;
}

.poffer__facts dt {
  color: var(--muted);
}

.poffer__facts dd {
  margin: 0;
  font-weight: 500;
}

.poffer__stock {
  grid-area: stock;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13px;
}

.poffer__stock-title {
  color: var(--muted);
}

.poffer__stock ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.poffer__stock li {
  display: flex;
  gap: 6px;
}

.poffer__stock .num {
  font-weight: 600;
}

.poffer__order {
  grid-area: order;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.poffer__note {
  flex-basis: 100%;
  text-align: right;
}

.tabbar {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.tabbar__tab {
  position: relative;
  height: 46px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.tabbar__tab[aria-selected='true'] {
  color: var(--text);
}

.tabbar__tab[aria-selected='true']::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.product__tabpanel {
  padding: 16px;
}

.props {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 0 32px;
  gap: 0 32px;
  margin: 0;
}

.props__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.props__row dt {
  color: var(--muted);
}

.props__row dd {
  margin: 0;
  text-align: right;
}

.analogs {
  margin: 0;
  padding-left: 18px;
}

/* ===================== Быстрый заказ ===================== */

.quickorder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.segmented {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.segmented__item {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  cursor: pointer;
}

.segmented__item[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card), 0 1px 3px rgba(16, 24, 40, 0.08);
}

.qpaste {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qpaste__actions {
  display: flex;
  justify-content: flex-end;
}

.qtable td {
  padding: 9px 12px;
}

.qtable th {
  padding: 10px 12px;
}

.qtable__sku {
  white-space: nowrap;
}

.qtable__name .select {
  width: 100%;
  max-width: 420px;
}

.qtable__note {
  display: block;
  color: var(--warning);
  font-size: 11.5px;
  white-space: normal;
}

.qresults__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.qresults .notice {
  margin: 0 16px 16px;
}

.qcart {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.qcart__label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.qcart .select {
  flex: 0 1 260px;
  width: 260px;
  min-width: 0;
}

.qfile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qfile__steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding-left: 20px;
}

.qfile__steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.qfile__steps li::marker {
  color: var(--muted);
  font-weight: 600;
}

.qfile__pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.qfile__choose {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qreport {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.qreport .table-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ===================== Корзины и шаблоны ===================== */

.carts__bar {
  margin-bottom: 14px;
}

.carts__create {
  display: flex;
  gap: 8px;
  max-width: 640px;
  padding: 10px;
}

.carts__create .input {
  height: 40px;
}

.cartlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cartrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 12px 12px 16px;
}

.cartrow--active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: inset 3px 0 0 var(--brand);
}

.cartrow__main {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.cartrow__name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
}

a.cartrow__name:hover {
  color: var(--brand-strong);
}

.cartrow__meta {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 13px;
}

.cartrow__total {
  color: var(--text);
  font-weight: 600;
}

.cartrow__actions,
.cartrow__confirm,
.cartrow__rename {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cartrow__rename .input {
  width: 260px;
  height: 36px;
}

.cartrow__confirm {
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
}

.cartpage__head {
  margin-bottom: 16px;
}

.cartpage__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cartpage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  grid-gap: 16px;
  gap: 16px;
}

.cartpage__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cbulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
}

.cbulk__all {
  align-items: center;
  font-weight: 500;
}

.cbulk__all input {
  margin: 0;
}

.cbulk__actions,
.cbulk__move {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cbulk__move .select {
  width: 180px;
}

.cbulk__template {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.cbulk__template .input {
  flex: 1 1 220px;
  width: auto;
  height: 36px;
  font-size: 14px;
}

.cbulk__template .checkbox {
  align-items: center;
}

.cbulk__template .checkbox input {
  margin: 0;
}

.citems td {
  height: 52px;
}

.citems tr.has-issue td {
  background: color-mix(in srgb, var(--warning) 5%, var(--surface));
}

.citems__name {
  display: block;
  font-weight: 500;
}

.citems__unit {
  display: block;
  margin-top: 2px;
}

.citems__remove {
  width: 44px;
}

.cissue {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 3px;
}

.cissue__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--warning);
  font-size: 12.5px;
  font-weight: 600;
}

.cissue__fix {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ctotals {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.ctotals__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.ctotals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
}

.ctotals__row dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}

.ctotals__row--gross {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.ctotals__row--gross dd {
  font-weight: 700;
}

.ctotals__issues {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  color: var(--warning);
  font-size: 13px;
  font-weight: 500;
  list-style: none;
}

.ctotals__issues li {
  display: flex;
  gap: 6px;
}

.ctotals__issues .icon {
  margin-top: 2px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
}

.toast__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.toast__action {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 14%, transparent);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ----- Закупка: средняя ширина ----- */

@media (max-width: 1023px) {
  .cartpage__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ctotals {
    position: static;
  }

  .product__top {
    grid-template-columns: minmax(0, 1fr);
  }

  .product__gallery {
    max-width: 360px;
  }
}

/* ----- Закупка: телефон ----- */

@media (max-width: 599px) {
  .ctool__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-gap: 8px;
    gap: 8px;
  }

  .csearch {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 42px;
  }

  .csearch__input {
    font-size: 16px;
  }

  .ctool__sort {
    width: 100%;
  }

  .ctool__views,
  .ctool__columns,
  .ctool__price-label {
    display: none;
  }

  .ctool__price-button {
    width: 36px;
    padding: 0;
  }

  .catpanel {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: auto;
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  .catpanel__head {
    padding: 12px 12px 8px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }

  .cattree__node {
    min-height: 40px;
    font-size: 15px;
  }

  /* Каталог — список карточек */
  .ctable-card {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .ctable,
  .ctable tbody {
    display: block;
  }

  .ctable thead {
    display: none;
  }

  .ctable tbody tr {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      'photo name name'
      'photo sku unit'
      'price price stock'
      'qty qty sum';
    align-items: center;
    grid-gap: 4px 12px;
    gap: 4px 12px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .ctable tbody tr:hover td,
  .ctable tbody tr.is-checked td {
    background: transparent;
  }

  .ctable td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .ctable .ctable__check {
    display: none;
  }

  .ctable .ctable__photo {
    grid-area: photo;
    align-self: start;
    width: auto;
  }

  .ctable .cphoto {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
  }

  .ctable .ctable__name {
    grid-area: name;
    min-width: 0;
  }

  .ctable .ctable__sku {
    grid-area: sku;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ctable .ctable__unit {
    grid-area: unit;
    justify-self: end;
    color: var(--muted);
    font-size: 12.5px;
  }

  .ctable .ctable__price {
    grid-area: price;
    margin-top: 4px;
    font-size: 16px;
    text-align: left;
  }

  .ctable .ctable__stock {
    grid-area: stock;
    justify-self: end;
    margin-top: 4px;
  }

  .ctable .ctable__qty {
    grid-area: qty;
    width: auto;
    margin-top: 6px;
  }

  .ctable .ctable__sum {
    grid-area: sum;
    align-self: start;
    min-width: 0;
    margin-top: 12px;
  }

  .ctable .stepper--compact {
    height: 40px;
  }

  .ctable .stepper--compact .stepper__button {
    width: 36px;
  }

  .ctable .stepper--compact .stepper__input {
    width: 64px;
    font-size: 16px;
  }

  .cqty__add {
    width: 40px;
    height: 40px;
  }

  .selbar {
    bottom: calc(var(--tabs-h) + 12px);
  }

  .pager {
    justify-content: space-between;
  }

  .product__top {
    gap: 14px;
  }

  .product__gallery {
    max-width: none;
    aspect-ratio: 4 / 3;
  }

  .poffer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'main'
      'facts'
      'stock'
      'order';
    padding: 12px;
  }

  .poffer__order {
    justify-content: flex-start;
  }

  .poffer__note {
    text-align: left;
  }

  .props {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Быстрый заказ: таблицы — карточки строк */
  .segmented {
    align-self: stretch;
  }

  .segmented__item {
    flex: 1 1;
  }

  .qtable,
  .qtable tbody,
  .qtable tr,
  .qtable td {
    display: block;
  }

  .qtable thead {
    display: none;
  }

  .qtable tr {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
  }

  .qtable tbody tr:last-child {
    border-bottom: 0;
  }

  .qtable td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    border: 0;
    text-align: right;
  }

  .qtable td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12.5px;
    text-align: left;
  }

  .qtable td.num {
    white-space: normal;
  }

  .qtable__name {
    flex-wrap: wrap;
  }

  .qresults__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .qresults__foot .button {
    width: 100%;
  }

  .qcart {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }

  /* Длинное название корзины не распирает строку: ширина — от строки, не от текста. */
  .qcart .select {
    flex: 1 1;
    width: 0;
  }

  /* Корзины */
  .carts__create {
    flex-wrap: wrap;
  }

  .carts__create .input {
    flex-basis: 100%;
  }

  .cartrow__main {
    flex-basis: 100%;
  }

  .citems,
  .citems tbody {
    display: block;
  }

  .citems thead {
    display: none;
  }

  .citems tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      'check name remove'
      'check sku sku'
      'check price price'
      'check qty sum';
    align-items: center;
    grid-gap: 4px 10px;
    gap: 4px 10px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
  }

  .citems tbody tr:last-child {
    border-bottom: 0;
  }

  .citems td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .citems tr.has-issue td {
    background: transparent;
  }

  .citems tr.has-issue {
    background: color-mix(in srgb, var(--warning) 5%, var(--surface));
  }

  .citems .ctable__check {
    grid-area: check;
    align-self: start;
    display: block;
    width: auto;
    padding-top: 2px !important;
  }

  .citems .ctable__name {
    grid-area: name;
    min-width: 0;
  }

  .citems .ctable__sku {
    grid-area: sku;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .citems .ctable__price {
    grid-area: price;
    color: var(--muted);
    font-weight: 500;
    text-align: left;
  }

  .citems .ctable__qty {
    grid-area: qty;
    width: auto;
  }

  .citems .ctable__sum {
    grid-area: sum;
    align-self: start;
    min-width: 0;
    padding-top: 6px;
  }

  .citems__remove {
    grid-area: remove;
    align-self: start;
    width: auto;
  }

  .citems .stepper--compact {
    height: 40px;
  }

  .citems .stepper--compact .stepper__button {
    width: 36px;
  }

  .citems .stepper--compact .stepper__input {
    width: 64px;
    font-size: 16px;
  }

  /* Итог корзины закреплён над нижними вкладками: пока позиции уходят ниже
     экрана, он висит у вкладок, в конце списка встаёт на своё место и ничего
     не закрывает. */
  .ctotals {
    position: -webkit-sticky;
    position: sticky;
    top: auto;
    bottom: calc(var(--tabs-h) + 8px + env(safe-area-inset-bottom));
    z-index: 25;
    gap: 8px;
    padding: 10px 14px 12px;
    box-shadow: 0 -4px 18px rgba(16, 24, 40, 0.1);
  }

  .ctotals__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-gap: 2px 12px;
    gap: 2px 12px;
  }

  .ctotals__row:not(.ctotals__row--gross) {
    font-size: 12.5px;
  }

  .ctotals__row--gross {
    grid-column: 1 / -1;
    padding-top: 4px;
    border-top: 1px solid var(--border);
    font-size: 15px;
  }

  .ctotals__issues {
    order: -1;
    padding: 6px 10px;
    font-size: 12px;
  }

  .cbulk__actions {
    width: 100%;
  }

  .cbulk__move {
    order: 3;
    flex-basis: 100%;
  }

  .cbulk__move .select {
    flex: 1 1;
    width: 0;
  }

  .toast {
    bottom: calc(var(--tabs-h) + 96px + env(safe-area-inset-bottom));
    width: calc(100vw - 32px);
    justify-content: space-between;
  }
}

