/* НИКТРЕЙД · портал корпоративных клиентов: чёрно-золотая тема поверх каркаса v3 */
.v3.biz {
    --navy: #0c0c10;
    --navy-2: #1c1b24;
    --primary: #c9a24a;
    --primary-dark: #a9852f;
    --gold-light: #e8cc7d;
    --lav: #f6efdb;
    --mint: #f4ecd6;
    --ink: #16151b;
    --muted: #6d6755;
    --line: #e8e1cf;
    --bg: #f7f4ec;
}
.v3.biz :is(a, button, input, select, textarea):focus-visible { outline: 3px solid rgba(201, 162, 74, .7); outline-offset: 2px; }
.v3.biz .v3-tool:hover { color: var(--gold-light); }
.v3.biz .v3-nav-link .i { color: var(--primary); }
.v3.biz .v3-nav-link:hover { color: var(--primary-dark); }
.v3.biz .v3-footer a:hover { color: var(--gold-light); }
.v3.biz .v3-footer { background: linear-gradient(90deg, #0c0c10, #1c1b24); }
.v3.biz .v3-copy { color: #a9a590; }

/* Шапка */
.biz-top-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 24px; min-height: 68px; padding: 10px 0; }
.biz-badge { justify-self: start; padding: 7px 14px; border: 1px solid rgba(201, 162, 74, .55); border-radius: 999px; color: var(--gold-light); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.biz-shop-link .i { transform: rotate(180deg); }

/* Первый экран */
.biz-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 40px; padding: 48px; border-radius: 26px; background: radial-gradient(900px 420px at 85% -10%, rgba(201, 162, 74, .28), transparent 60%), linear-gradient(135deg, #0c0c10 0%, #1c1b24 70%); color: #f3eddb; }
.biz-eyebrow { display: block; margin-bottom: 10px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.biz-hero h1 { margin: 0 0 16px; color: #fff; font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; line-height: 1.08; }
.biz-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--gold-light), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.biz-hero-copy p { max-width: 560px; margin: 0 0 20px; color: #d8d1bb; font-size: 17px; line-height: 1.5; }
.biz-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.biz-points li { position: relative; padding-left: 28px; color: #f3eddb; font-weight: 700; }
.biz-points li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 6px; height: 11px; border-right: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: rotate(45deg); }

/* Карточка входа и регистрации */
.biz-auth { padding: 24px; border: 1px solid rgba(201, 162, 74, .45); border-radius: 20px; background: #fffdf8; color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.biz-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: var(--lav); }
.biz-tabs button { min-height: 42px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.biz-tabs button.is-active { background: #0c0c10; color: var(--gold-light); }
.biz-form { display: grid; gap: 10px; }
.biz-form[hidden] { display: none; }
.biz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.biz-field { display: grid; gap: 5px; min-width: 0; }
.biz-field[hidden] { display: none; }
.biz-field > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.biz-field input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; }
.biz-field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(201, 162, 74, .25); }
.biz-field input:disabled { background: #f1eee3; }
.biz-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.biz-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.biz-error { margin: 0; color: #c0392b; font-size: 13px; font-weight: 700; }
.biz-hint { margin: 0; color: var(--muted); font-size: 12px; }
.biz-hint[hidden] { display: none; }
.biz-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.biz-link { padding: 0; border: 0; background: none; color: var(--primary-dark); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

.biz-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 12px; background: linear-gradient(180deg, var(--gold-light), var(--primary)); color: #17130a; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; transition: filter .15s ease, transform .1s ease; }
.biz-btn:hover { filter: brightness(1.06); }
.biz-btn:active { transform: translateY(1px); }
.biz-btn.is-ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.biz-btn.is-ghost:hover { border-color: var(--primary); filter: none; }

/* Разделы витрины */
.biz-section { margin-top: 40px; scroll-margin-top: 16px; }
.biz-section h2 { margin: 0 0 18px; color: var(--ink); font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.biz-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.biz-steps li { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.biz-steps .n { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; margin-bottom: 12px; border-radius: 50%; background: #0c0c10; color: var(--gold-light); font-weight: 800; }
.biz-steps strong { display: block; margin-bottom: 6px; font-size: 16px; }
.biz-steps p { margin: 0; color: var(--muted); font-size: 14px; }
.biz-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.biz-cards article { padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 18px; background: #fff; }
.biz-cards h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.biz-cards p { margin: 0; color: var(--muted); font-size: 14px; }
.biz-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.biz-terms > div { padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.biz-terms dt { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.biz-terms dd { margin: 0; color: var(--ink); font-size: 17px; font-weight: 800; }

/* Кабинет компании */
.biz-account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.biz-account-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.biz-account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.biz-card { padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 18px; background: #fff; }
.biz-card h2 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.biz-card dl { display: grid; gap: 10px; margin: 0; }
.biz-card dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.biz-card dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.biz-soon { margin: 20px 0 0; padding: 16px 20px; border: 1px dashed var(--primary); border-radius: 14px; background: #fffaf0; color: var(--muted); }

@media (max-width: 1000px) {
    .biz-hero { grid-template-columns: 1fr; padding: 32px 24px; }
    .biz-steps, .biz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .biz-account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .biz-top-row { grid-template-columns: auto 1fr auto; gap: 10px; min-height: 60px; }
    .biz-badge { display: none; }
    .biz-top-row .v3-logo, .biz-top-row .v3-tool.is-user, .biz-top-row .biz-shop-link { grid-area: auto; }
    .biz-shop-link { justify-self: end; font-size: 12px; }
    .biz-shop-link span { display: none; }
    .biz-hero { padding: 24px 16px; border-radius: 20px; gap: 24px; }
    .biz-hero-copy p { font-size: 15px; }
    .biz-auth { padding: 16px; }
    .biz-row { grid-template-columns: 1fr; }
    .biz-steps, .biz-cards, .biz-terms { grid-template-columns: 1fr; }
    .biz-account-head { flex-direction: column; align-items: stretch; }
}

/* --- A2: каталог для бизнеса --- */
.v3.biz :is(.shop-input, .shop-select) { background-color: var(--bg); }
.v3.biz :is(.shop-input, .shop-select):hover { border-color: var(--primary); }
.v3.biz :is(.shop-input, .shop-select):focus { box-shadow: 0 0 0 3px rgba(201, 162, 74, .18); }
.v3.biz :is(.nik-product-chip, .nik-product-thumb, .nik-product-spec, .nik-product-detail, .nik-product-image-prompt a, .nik-product-image-prompt button) { background: var(--lav); }
.v3.biz .nik-product-doc-link:hover { background: var(--lav); }
.biz-pcard .biz-card-buy { display: block; }
.biz-pcard .biz-price { display: block; font-size: 20px; font-weight: 800; color: var(--ink); }
.biz-pcard .biz-price del { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.biz-price-label { margin-top: 2px; font-size: 13px; color: var(--muted); }
.biz-pcard .biz-price-label { color: #7a5c14; font-weight: 600; }
.biz-product-price { margin: 12px 0 4px; }
.biz-price-rows { display: grid; gap: 6px; margin-top: 12px; max-width: 420px; }
.biz-price-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--mint); font-size: 14px; color: var(--muted); }
.biz-price-rows strong { color: var(--ink); }
.biz-request-note { display: grid; gap: 4px; margin: 14px 0; padding: 14px 16px; border: 1px dashed var(--primary); border-radius: 12px; background: var(--mint); color: var(--ink); font-size: 14px; }
.biz-request-note span { color: var(--muted); }

/* --- A3: заявки --- */
.v3.biz [data-biz-item] [hidden] { display: none; }
.v3.biz :is(.v3-qty, .v3-qty-btn, .nik-product-tab.is-active, .catalog-pagination-links .is-current) { color: #17130a; }
.v3.biz :is(.v3-card-brand, .nik-product-brand, .biz-page .biz-eyebrow) { color: #7a5c14; }
.v3.biz :is(.v3-stock.is-in, .nik-product-status) { color: #1f6b2c; }
.v3.biz :is(.v3-stock.is-wait, .nik-product-status.is-out, .nik-product-status.is-discontinued) { color: #8a4b06; }
.v3.biz .nik-product-discount { background: #b72f3a; }
.biz-cart-link { position: relative; }
.biz-cart-badge { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #17130a; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.biz-cart-badge[hidden], .biz-bar[hidden] { display: none; }
.biz-top-row { grid-template-columns: auto 1fr auto auto auto; }
@media (max-width: 760px) { .biz-top-row { grid-template-columns: auto 1fr auto auto; } }

.biz-flash { margin: 16px 0 0; padding: 12px 16px; border: 1px solid #b99a45; border-radius: 12px; background: #fff8e1; color: #4b3a0a; font-weight: 600; }
.biz-flash.is-error { border-color: #c0392b; background: #fdeceb; color: #7a1d14; }
.biz-toast { position: fixed; left: 50%; bottom: 88px; z-index: 60; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 12px; background: #16151b; color: #f3eddb; font-weight: 600; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.biz-toast[hidden] { display: none; }

.biz-pcard .biz-card-buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.biz-pcard .biz-price { display: block; }
.biz-pcard .v3-add { background: var(--primary); color: #17130a; }
.biz-pcard .v3-add:hover { background: var(--gold-light); }
.biz-actions .shop-btn:not(:disabled) { background: linear-gradient(180deg, var(--gold-light), var(--primary)); color: #17130a; }
.biz-min-hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
[data-biz-item].is-busy { opacity: .7; pointer-events: none; }

.biz-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: linear-gradient(90deg, #0c0c10, #1c1b24); border-top: 2px solid var(--primary); color: #f3eddb; }
.biz-bar-inner { display: flex; align-items: center; gap: 20px; max-width: 1240px; margin: 0 auto; padding: 10px 16px; }
.biz-bar-sum { display: grid; line-height: 1.2; }
.biz-bar-sum span { color: #a9a590; font-size: 12px; }
.biz-bar-sum strong { color: var(--gold-light); font-size: 20px; }
.biz-bar-note { flex: 1; color: #d9d2bb; font-size: 14px; }
.biz-bar-note.is-ok { color: #9ad8a2; }
body.biz { padding-bottom: 72px; }
@media (max-width: 560px) { .biz-bar-inner { gap: 10px; } .biz-bar-note { display: none; } .biz-bar-inner .biz-btn { margin-left: auto; padding: 0 16px; } }

.biz-page { padding: 8px 0 32px; }
.biz-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 24px 0 20px; }
.biz-page-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.biz-eyebrow a { color: inherit; text-decoration: none; }
.biz-account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.biz-empty { padding: 40px 24px; border: 1px dashed var(--primary); border-radius: 18px; background: #fffaf0; text-align: center; }
.biz-empty h2 { margin: 0 0 8px; }
.biz-empty p { margin: 0 0 18px; color: var(--muted); }

.biz-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
.biz-cart-list { display: grid; gap: 12px; }
.biz-row-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 110px 32px; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.biz-row-item.is-unavailable { border-color: #c0392b; background: #fdf4f3; }
.biz-row-img img { display: block; width: 72px; height: 72px; object-fit: contain; }
.biz-row-name { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.biz-row-name:hover { color: var(--primary-dark); }
.biz-row-meta { margin-top: 2px; color: var(--muted); font-size: 13px; }
.biz-row-warn { margin-top: 4px; color: #a93226; font-size: 13px; font-weight: 600; }
.biz-row-sum { text-align: right; font-weight: 800; white-space: nowrap; }
.biz-row-remove { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.biz-row-remove:hover { background: var(--mint); color: var(--ink); }

.biz-summary { position: sticky; top: 16px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: 18px; background: #fff; }
.biz-summary h2 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.biz-summary h3 { margin: 20px 0 8px; font-size: 15px; font-weight: 800; }
.biz-summary dl { display: grid; gap: 8px; margin: 0; }
.biz-summary dl > div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.biz-summary dd { margin: 0; color: var(--ink); font-weight: 700; text-align: right; }
.biz-summary .is-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 17px; font-weight: 800; }
.biz-summary .biz-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.biz-min-note { margin: 12px 0; padding: 8px 12px; border-radius: 10px; background: #fff3d6; color: #6b4e0c; font-size: 14px; font-weight: 700; }
.biz-min-note.is-ok { background: #e6f4e8; color: #1f6b2c; }
.biz-label { display: block; margin: 4px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.biz-textarea { width: 100%; resize: vertical; }
.biz-submit { width: 100%; margin-top: 12px; }
.biz-submit:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; filter: none; }
.biz-note.is-left { margin: 8px 0; text-align: left; }

.biz-req-list { display: grid; gap: 10px; }
.biz-req { display: grid; grid-template-columns: 160px 150px 160px 1fr auto; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
.biz-req:hover { border-color: var(--primary); }
.biz-req-num { font-weight: 800; }
.biz-req-date, .biz-req-count { color: var(--muted); font-size: 14px; }
.biz-req-total { text-align: right; white-space: nowrap; }

.biz-status { display: inline-block; justify-self: start; padding: 4px 12px; border-radius: 999px; background: var(--mint); color: #5c4710; font-size: 13px; font-weight: 800; white-space: nowrap; }
.biz-status.is-large { padding: 8px 16px; font-size: 15px; }
.biz-status.is-new { background: #e3eefc; color: #1d4e89; }
.biz-status.is-in_progress { background: #fff0cc; color: #7a5200; }
.biz-status.is-invoiced { background: #f3e6c1; color: #5c4710; }
.biz-status.is-paid, .biz-status.is-shipped { background: #e1f3e4; color: #1f6b2c; }
.biz-status.is-cancelled { background: #ececec; color: #55524a; }

.biz-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.biz-table { width: 100%; border-collapse: collapse; }
.biz-table th, .biz-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.biz-table tr:last-child td { border-bottom: 0; }
.biz-table th { color: var(--muted); font-size: 13px; font-weight: 700; }
.biz-table .num { text-align: right; white-space: nowrap; }
.biz-table a { color: var(--ink); font-weight: 700; text-decoration: none; }
.biz-block { margin-top: 20px; }
.biz-block p { margin: 0; overflow-wrap: anywhere; }
.biz-timeline { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.biz-timeline li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }

@media (max-width: 960px) { .biz-cart-layout { grid-template-columns: 1fr; } .biz-summary { position: static; } }
@media (max-width: 760px) {
    .biz-page-head { flex-direction: column; align-items: stretch; }
    .biz-row-item { grid-template-columns: 56px minmax(0, 1fr) 32px; grid-template-areas: "img main rm" "qty sum sum"; gap: 10px; }
    .biz-row-img { grid-area: img; } .biz-row-img img { width: 56px; height: 56px; }
    .biz-row-main { grid-area: main; } .biz-row-remove { grid-area: rm; }
    .biz-row-item .v3-qty { grid-area: qty; justify-self: start; } .biz-row-sum { grid-area: sum; }
    .biz-req { grid-template-columns: 1fr auto; grid-template-areas: "num status" "date total" "count count"; }
    .biz-req-num { grid-area: num; } .biz-req .biz-status { grid-area: status; justify-self: end; }
    .biz-req-date { grid-area: date; } .biz-req-total { grid-area: total; } .biz-req-count { grid-area: count; }
}

/* --- A3: ручной ввод количества, стабильная высота карточки --- */
.biz-qty-input { width: 56px; min-width: 0; height: 42px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.biz-qty-input:focus { outline: 2px solid rgba(23, 19, 10, .55); outline-offset: -3px; }
.biz-pcard .biz-card-buy { display: grid; gap: 10px; align-items: stretch; }
.biz-pcard .biz-buy-slot { display: flex; min-height: 42px; }
.biz-pcard .biz-buy-slot form { flex: 1; }
.biz-pcard .biz-buy-slot .v3-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; border-radius: 10px; font-size: 14px; font-weight: 800; }
.biz-pcard .biz-buy-slot .v3-qty { width: 100%; }
.biz-pcard .biz-buy-slot .v3-qty-btn { flex: 0 0 44px; width: 44px; }
.biz-pcard .biz-qty-input { flex: 1; width: auto; }
.biz-pcard .biz-price-label { white-space: nowrap; }
.biz-row-item .biz-qty-input { width: 48px; }

/* Фикс: поле количества не растягивает колонку карточки */
.biz-pcard .biz-card-buy { grid-template-columns: minmax(0, 1fr); }
.biz-pcard .biz-buy-slot { min-width: 0; }
.biz-pcard .biz-buy-slot .v3-qty { min-width: 0; overflow: hidden; }
.biz-pcard .biz-qty-input { flex: 1 1 0; width: 0; min-width: 0; }

/* Фокус поля количества: без внешней золотой рамки, подсветка внутри степпера */
.v3.biz .biz-qty-input:focus,
.v3.biz .biz-qty-input:focus-visible { outline: 0; background: rgba(255, 255, 255, .3); border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(23, 19, 10, .55); }
