:root {
    --ink: #111827;
    --muted: #697386;
    --line: #e7eaf1;
    --line-strong: #cbd2df;
    --soft: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: var(--soft);
    --primary: #5b5cf0;
    --primary-dark: #4849d8;
    --primary-soft: #efefff;
    --purple-soft: var(--primary-soft);
    --green: #15a673;
    --green-soft: #e9f8f2;
    --orange: #e98b2a;
    --orange-soft: #fff3e6;
    --red: #dc4c64;
    --red-soft: #ffedf0;
    --blue: #3487e9;
    --blue-soft: #eaf4ff;
    --shadow-sm: 0 8px 30px rgba(28, 36, 61, .06);
    --shadow-md: 0 24px 70px rgba(25, 32, 56, .12);
    --shadow: var(--shadow-md);
    --shadow-soft: var(--shadow-sm);
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1760px;
    --font: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
    --control-height: 40px;
    --control-height-compact: 36px;
    --control-radius: 9px;
    --ui-text: 12px;
    --ui-caption: 10px;
}

/* Public landing: advantages, pricing and complete theme support. */
.landing-container { max-width: 1240px; }
.brand .brand-mark-shell { padding: 0; overflow: visible; color: transparent; background: transparent; border: 0; box-shadow: none; }
.brand-mark-shell img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(23,139,218,.16)); }
.hero-identity { width: fit-content; padding: 8px 13px 8px 9px; display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.72); border: 1px solid rgba(220,224,235,.9); border-radius: 15px; box-shadow: 0 8px 26px rgba(31,53,87,.07); }
.hero-identity-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; }
.hero-identity-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.hero-identity strong,.hero-identity small { display: block; }
.hero-identity strong { font-size: 15px; letter-spacing: -.025em; }
.hero-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.advantage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.advantage-card { min-width: 0; min-height: 156px; padding: 22px; display: flex; align-items: flex-start; gap: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); transition: transform .22s,box-shadow .22s,border-color .22s; }
.advantage-card:hover { border-color: color-mix(in srgb,var(--primary) 32%,var(--line)); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.advantage-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; }
.advantage-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.advantage-violet { color: var(--primary); background: var(--primary-soft); }
.advantage-blue { color: var(--blue); background: var(--blue-soft); }
.advantage-green { color: var(--green); background: var(--green-soft); }
.advantage-orange { color: var(--orange); background: var(--orange-soft); }
.advantage-pink { color: var(--red); background: var(--red-soft); }
.advantage-cyan { color: #168fb3; background: #e7f8fc; }
.advantage-gold { color: #a66d0e; background: #fff6dd; }
.advantage-card h3 { margin: 3px 0 8px; font-size: 15px; line-height: 1.25; letter-spacing: -.02em; }
.advantage-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.pricing-section { position: relative; overflow: hidden; padding-top: 98px; background: radial-gradient(circle at 14% 14%,rgba(91,92,240,.08),transparent 27%),linear-gradient(180deg,#f7f8fd 0%,#fbfcff 100%); border-top: 1px solid var(--line); }
.landing-price-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.landing-price-card { position: relative; min-width: 0; padding: 24px; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 21px; box-shadow: var(--shadow-sm); transition: transform .22s,box-shadow .22s,border-color .22s; }
.landing-price-card:hover { border-color: color-mix(in srgb,var(--primary) 35%,var(--line)); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.landing-price-featured { border-color: color-mix(in srgb,var(--primary) 38%,var(--line)); box-shadow: 0 18px 52px rgba(91,92,240,.12); }
.landing-price-featured::after { content: "СТАРТ"; position: absolute; top: 17px; right: -30px; width: 105px; padding: 6px 0; color: #fff; background: linear-gradient(135deg,#6b6cf5,#5051df); font-size: 8px; font-weight: 850; letter-spacing: .12em; text-align: center; transform: rotate(39deg); }
.price-miniature { height: 112px; margin-bottom: 22px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; }
.price-miniature svg { width: 154px; height: 96px; stroke-width: 2.2; }
.price-miniature-trial { color: #6768ef; background: radial-gradient(circle at 50% 40%,rgba(255,255,255,.88),transparent 46%),linear-gradient(135deg,#eeeefe,#e2e3ff); }
.price-miniature-market { color: #3184df; background: radial-gradient(circle at 50% 35%,rgba(255,255,255,.88),transparent 46%),linear-gradient(135deg,#e9f4ff,#dcecff); }
.price-miniature-store { color: #18a477; background: radial-gradient(circle at 50% 35%,rgba(255,255,255,.88),transparent 46%),linear-gradient(135deg,#e9f9f3,#d8f1e8); }
.price-miniature-connect { background: radial-gradient(circle at 50% 42%,rgba(255,255,255,.9),transparent 48%),linear-gradient(135deg,#edf4ff,#e2e7ff); }
.price-miniature-connect img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 9px 14px rgba(24,137,215,.2)); }
.landing-price-kicker { min-height: 34px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.45; letter-spacing: .055em; text-transform: uppercase; }
.landing-price-value { display: block; margin: 8px 0 10px; font-size: clamp(27px,2.5vw,38px); line-height: 1; letter-spacing: -.045em; }
.landing-price-value.landing-price-pending { font-size: 26px; }
.landing-price-card p { min-height: 43px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.landing-price-note { width: fit-content; margin-top: auto; padding: 7px 10px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 10px; font-weight: 750; }
.pricing-action { margin-top: 20px; padding: 18px 20px 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); }
.pricing-action > span { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pricing-action > span i { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 850; }

html[data-theme="dark"] .landing-page { background: #0d131d; }
html[data-theme="dark"] .brand .brand-mark-shell { background: transparent; border: 0; }
html[data-theme="dark"] .brand-mark-shell img,
html[data-theme="dark"] .hero-identity-icon img,
html[data-theme="dark"] .admin-auth-logo img { filter: brightness(1.2) saturate(1.12) drop-shadow(0 0 8px rgba(36,185,255,.26)); }
html[data-theme="dark"] .hero-identity { background: rgba(24,34,50,.82); border-color: var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
html[data-theme="dark"] .hero { background: radial-gradient(circle at 78% 35%,rgba(91,92,240,.16),transparent 34%),linear-gradient(180deg,#0d131d 0%,#101722 100%); }
html[data-theme="dark"] .logos-strip { background: #111a27; border-color: var(--line); }
html[data-theme="dark"] .market-logos { color: #aeb8c8; }
html[data-theme="dark"] .dashboard-preview,
html[data-theme="dark"] .float-card { color: var(--ink); background: rgba(24,34,50,.96); border-color: var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.42); }
html[data-theme="dark"] .preview-period,
html[data-theme="dark"] .preview-cards > div { color: var(--muted); background: #111a27; border-color: #2a3547; }
html[data-theme="dark"] .preview-chart .grid-line { stroke: #2c3749; }
html[data-theme="dark"] .pricing-section { background: radial-gradient(circle at 14% 14%,rgba(91,92,240,.14),transparent 28%),linear-gradient(180deg,#101722 0%,#0d131d 100%); border-color: var(--line); }
html[data-theme="dark"] .advantage-card,
html[data-theme="dark"] .landing-price-card,
html[data-theme="dark"] .pricing-action { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .landing-price-featured { border-color: rgba(131,132,255,.48); box-shadow: 0 18px 55px rgba(0,0,0,.28); }
html[data-theme="dark"] .advantage-cyan { color: #68d1ef; background: rgba(37,166,202,.14); }
html[data-theme="dark"] .advantage-gold { color: #f2c664; background: rgba(206,151,35,.15); }
html[data-theme="dark"] .price-miniature-trial { color: #a6a7ff; background: radial-gradient(circle at 50% 40%,rgba(40,43,83,.88),transparent 48%),linear-gradient(135deg,#27294f,#202348); }
html[data-theme="dark"] .price-miniature-market { color: #79bcff; background: radial-gradient(circle at 50% 35%,rgba(29,52,77,.9),transparent 48%),linear-gradient(135deg,#1b3048,#15283c); }
html[data-theme="dark"] .price-miniature-store { color: #6de0b8; background: radial-gradient(circle at 50% 35%,rgba(23,60,52,.9),transparent 48%),linear-gradient(135deg,#173b33,#142f2b); }
html[data-theme="dark"] .price-miniature-connect { background: radial-gradient(circle at 50% 42%,rgba(28,50,79,.9),transparent 48%),linear-gradient(135deg,#192c46,#202348); }
html[data-theme="dark"] .button-secondary { box-shadow: none; }
html[data-theme="dark"] .cta-card { box-shadow: 0 30px 70px rgba(0,0,0,.3); }

@media (max-width: 1100px) {
    .landing-price-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .advantage-grid,.landing-price-grid { grid-template-columns: 1fr; }
    .advantage-card { min-height: 0; }
    .pricing-section { padding-top: 76px; }
    .pricing-action { align-items: stretch; flex-direction: column; }
    .pricing-action .button { width: 100%; }
    .hero-identity { margin: 0 auto; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { max-width: 100%; margin: 0; overflow-wrap: anywhere; color: var(--ink); background: #fbfcff; font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { min-width: 0; max-width: 100%; font: inherit; }
button { overflow: hidden; text-overflow: ellipsis; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.ambient { position: fixed; z-index: -1; pointer-events: none; filter: blur(20px); border-radius: 50%; opacity: .45; }
.ambient-one { width: 420px; height: 420px; top: 60px; right: -260px; background: rgba(91, 92, 240, .12); }
.ambient-two { width: 340px; height: 340px; top: 580px; left: -230px; background: rgba(88, 206, 177, .1); }

.site-header { position: relative; z-index: 50; height: 76px; background: rgba(251, 252, 255, .84); border-bottom: 1px solid rgba(231, 234, 241, .75); backdrop-filter: blur(18px); }
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.55px; }
.brand > span:last-child > span { color: var(--primary); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #7172fa, #4b4cdd); border-radius: 11px; box-shadow: 0 8px 22px rgba(91, 92, 240, .28); }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 2.5; }
.brand-small { font-size: 17px; }
.brand-small .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.brand-small .brand-mark svg { width: 19px; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav form { margin: 0; }
.nav-link { color: #465065; font-size: 14px; font-weight: 600; transition: color .2s; }
.nav-link:hover { color: var(--primary); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 11px; border: 0; background: transparent; }
.nav-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

.button { min-width: 0; max-width: 100%; min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; overflow: hidden; border: 1px solid transparent; border-radius: 11px; font-weight: 700; font-size: 14px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.button svg { width: 18px; height: 18px; stroke-width: 2; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: linear-gradient(135deg, #6667f6, #5051e5); box-shadow: 0 9px 22px rgba(91, 92, 240, .22); }
.button-primary:hover { background: linear-gradient(135deg, #5d5eef, #4546d5); box-shadow: 0 12px 28px rgba(91, 92, 240, .32); }
.button-danger { color: white; background: linear-gradient(135deg, #dd5368, #c53c54); box-shadow: 0 9px 22px rgba(197,60,84,.18); }
.button-danger:hover { background: linear-gradient(135deg, #d84960, #b83249); box-shadow: 0 12px 28px rgba(197,60,84,.25); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.button-secondary { color: #343d50; background: white; border-color: var(--line); box-shadow: 0 3px 10px rgba(20, 28, 50, .03); }
.button-secondary:hover { border-color: #cfd3df; box-shadow: var(--shadow-sm); }
.button-ghost { color: #465065; background: transparent; border-color: var(--line); }
.button-white { color: var(--primary-dark); background: white; box-shadow: 0 15px 35px rgba(23, 22, 88, .2); }
.button-small { min-height: 38px; padding: 0 15px; font-size: 13px; border-radius: 9px; }
.button-large { min-height: 52px; padding: 0 25px; border-radius: 13px; }
.button-full { width: 100%; }
.button-plus { font-size: 20px; font-weight: 400; }

.hero { min-height: 690px; display: flex; align-items: center; overflow: hidden; padding: 78px 0 90px; background: radial-gradient(circle at 78% 35%, rgba(91,92,240,.08), transparent 32%), linear-gradient(180deg, #fbfcff 0%, #f7f8fd 100%); }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 74px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow > span { display: none; }
.hero h1 { margin: 21px 0 23px; font-size: clamp(47px, 5vw, 68px); line-height: 1.05; letter-spacing: -.055em; }
.hero h1 span { color: var(--primary); }
.hero-lead { max-width: 570px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin: 34px 0 27px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 19px; color: #657084; font-size: 12px; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row i { width: 17px; height: 17px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 10px; font-style: normal; }
.hero-visual { position: relative; }
.dashboard-preview { position: relative; z-index: 2; min-height: 440px; padding: 25px; background: rgba(255, 255, 255, .94); border: 1px solid rgba(220, 224, 235, .88); border-radius: 24px; box-shadow: 0 38px 90px rgba(30, 38, 70, .16); transform: perspective(1000px) rotateY(-2deg) rotateX(1deg); }
.preview-top { display: flex; justify-content: space-between; align-items: center; }
.preview-dots { display: flex; gap: 6px; }.preview-dots i { width: 7px; height: 7px; background: #daddE7; border-radius: 50%; }.preview-dots i:first-child { background: #7172fa; }
.preview-period { padding: 7px 11px; color: #697386; background: #f6f7fa; border-radius: 8px; font-size: 10px; font-weight: 600; }
.preview-title { display: flex; align-items: end; justify-content: space-between; margin-top: 26px; }
.preview-title small, .preview-cards small { display: block; margin-bottom: 7px; color: #81899a; font-size: 10px; font-weight: 600; }
.preview-title strong { font-size: 26px; letter-spacing: -.03em; }
.trend-up { padding: 6px 9px; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 10px; font-weight: 800; }
.preview-chart { height: 190px; padding-top: 22px; }.preview-chart svg { width: 100%; height: 100%; overflow: visible; }
.preview-chart .grid-line { stroke: #edf0f5; stroke-width: 1; }.preview-chart .area { fill: url(#chartFill); stroke: none; }.preview-chart .line { stroke: #6667f4; stroke-width: 3; }
.preview-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.preview-cards > div { position: relative; padding: 13px 10px 13px 39px; background: #fafbfe; border: 1px solid #eff1f6; border-radius: 11px; }
.preview-cards strong { font-size: 12px; }.metric-icon { position: absolute; top: 14px; left: 11px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; font-size: 9px; font-weight: 800; }.metric-icon.purple { color: var(--primary); background: var(--primary-soft); }.metric-icon.green { color: var(--green); background: var(--green-soft); }.metric-icon.orange { color: var(--orange); background: var(--orange-soft); }
.float-card { position: absolute; z-index: 3; padding: 14px 17px; background: rgba(255,255,255,.96); border: 1px solid #eceef4; border-radius: 13px; box-shadow: 0 18px 45px rgba(35, 43, 74, .17); animation: float 4.8s ease-in-out infinite; }
.float-profit { top: 86px; right: -44px; }.float-profit span { display: block; margin-bottom: 5px; color: #798294; font-size: 9px; }.float-profit strong { color: var(--green); font-size: 15px; }
.float-orders { bottom: 40px; left: -38px; display: flex; align-items: center; gap: 11px; animation-delay: -2s; }.float-orders strong,.float-orders small { display: block; }.float-orders strong { font-size: 15px; }.float-orders small { margin-top: 3px; color: #858d9d; font-size: 9px; }.pulse-dot { width: 11px; height: 11px; background: var(--green); border: 3px solid #c8f0e1; border-radius: 50%; box-sizing: content-box; }
@keyframes float { 50% { transform: translateY(-7px); } }

.logos-strip { padding: 27px 0; background: white; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
.logos-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }.logos-inner p { color: #8a92a2; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }.market-logos { display: flex; align-items: center; gap: 38px; color: #626c7d; font-size: 13px; font-weight: 750; }.market-logos span { display: flex; align-items: center; gap: 8px; }.market-logos i { width: 20px; height: 20px; border-radius: 6px; }.logo-wb { background: linear-gradient(135deg, #b324e4, #ef2677); }.logo-ozon { background: #1769ff; }.logo-ym { background: linear-gradient(90deg, #ffd647 50%, #f74d4d 50%); }.logo-mm { background: linear-gradient(135deg, #24cfa0, #36aeea); }
.landing-marketplace-mark { width: 24px; height: 24px; flex: 0 0 auto; display: inline-grid; place-items: center; color: #fff; border-radius: 7px; font-size: 9px; font-style: normal; font-weight: 950; line-height: 1; letter-spacing: -.04em; box-shadow: 0 5px 12px color-mix(in srgb,currentColor 12%,transparent); }
.market-logos .landing-marketplace-mark { width: 24px; height: 24px; }
.logo-wildberries { background: linear-gradient(135deg,#b324e4,#ef2677); }
.logo-ozon { background: #1769ff; }
.logo-yandex { background: linear-gradient(90deg,#ffd647 50%,#f74d4d 50%); text-shadow: 0 1px 2px rgba(90,38,22,.45); }
.logo-megamarket { background: linear-gradient(135deg,#24cfa0,#36aeea); }
.section { padding: 105px 0 115px; }.section-heading { max-width: 650px; margin: 0 auto 48px; text-align: center; }.section-heading .eyebrow { justify-content: center; }.section-heading h2, .cta-card h2 { margin: 15px 0 14px; font-size: 38px; letter-spacing: -.04em; }.section-heading p { margin: 0; color: var(--muted); line-height: 1.65; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }.feature-card { padding: 30px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }.feature-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 25px; border-radius: 13px; }.feature-icon svg { width: 24px; height: 24px; stroke-width: 2; }.feature-violet { color: var(--primary); background: var(--primary-soft); }.feature-green { color: var(--green); background: var(--green-soft); }.feature-orange { color: var(--orange); background: var(--orange-soft); }.feature-card h3 { margin: 0 0 11px; font-size: 19px; }.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.cta-section { padding: 0 0 90px; }.cta-card { padding: 52px 60px; display: flex; align-items: center; justify-content: space-between; color: white; background: radial-gradient(circle at 84% 20%, rgba(255,255,255,.15), transparent 25%), linear-gradient(135deg, #5354e2, #6d56db); border-radius: 25px; box-shadow: 0 30px 70px rgba(80, 77, 205, .24); }.eyebrow-light { color: rgba(255,255,255,.76); }.cta-card h2 { margin-top: 14px; font-size: 36px; }.cta-card p { margin: 0; color: rgba(255,255,255,.74); }
.site-footer { padding: 28px 0; background: white; border-top: 1px solid var(--line); }.footer-inner { display: flex; align-items: center; justify-content: space-between; color: #8991a0; font-size: 12px; }.footer-inner p { margin: 0; }

.auth-page { background: radial-gradient(circle at 20% 20%, rgba(91,92,240,.08), transparent 27%), radial-gradient(circle at 88% 78%, rgba(62,190,148,.08), transparent 26%), #f8f9fd; }.auth-page .site-footer { display: none; }.auth-shell { min-height: calc(100vh - 76px); padding: 55px 20px; display: grid; place-items: center; }.auth-card { width: min(100%, 470px); padding: 38px 42px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); }.auth-card-wide { width: min(100%, 660px); }.auth-heading { margin-bottom: 28px; text-align: center; }.auth-icon { width: 50px; height: 50px; margin: 0 auto 17px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 15px; font-size: 22px; font-weight: 800; }.auth-icon svg { width: 25px; height: 25px; }.auth-heading h1,.error-card h1 { margin: 0 0 9px; font-size: 27px; letter-spacing: -.035em; }.auth-heading p,.error-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }.form-stack { display: grid; gap: 18px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }.field { display: grid; gap: 8px; }.field > span:first-child,.field > label:first-child { color: #414b5e; font-size: 12px; font-weight: 700; }.field-full { grid-column: 1 / -1; }.input-wrap { position: relative; display: block; }.input-wrap > svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; color: #98a0af; transform: translateY(-50%); pointer-events: none; }.input-wrap input,.input-wrap select { width: 100%; height: 48px; padding: 0 42px; color: var(--ink); background: #fbfcfe; border: 1px solid #dfe3eb; border-radius: 11px; outline: none; transition: border .2s, box-shadow .2s, background .2s; }.input-wrap select { appearance: none; padding: 0 35px 0 13px; background-image: linear-gradient(45deg,transparent 50%,#8b93a2 50%),linear-gradient(135deg,#8b93a2 50%,transparent 50%); background-position: calc(100% - 17px) 21px,calc(100% - 12px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }.input-wrap input::placeholder { color: #a4aab6; }.input-wrap input:focus,.input-wrap select:focus { background: white; border-color: #8182f4; box-shadow: 0 0 0 4px rgba(91,92,240,.1); }.input-wrap.no-icon input { padding: 0 13px; }.password-toggle { position: absolute; top: 50%; right: 8px; width: 35px; height: 35px; padding: 8px; color: #929aaa; background: transparent; border: 0; cursor: pointer; transform: translateY(-50%); }.password-toggle svg { width: 19px; height: 19px; }.check-field { display: flex; align-items: center; gap: 9px; color: #687185; font-size: 11px; cursor: pointer; }.check-field input { width: 16px; height: 16px; accent-color: var(--primary); }.auth-divider { position: relative; margin: 23px 0 18px; border-top: 1px solid var(--line); text-align: center; }.auth-divider span { position: relative; top: -8px; padding: 0 12px; color: #9aa1af; background: white; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }.auth-note { margin: 18px 0 0; color: #959cab; font-size: 10px; line-height: 1.5; text-align: center; }.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }.auth-switch a { color: var(--primary); font-weight: 750; }.form-errors { margin-bottom: 18px; padding: 12px 14px; color: #b9364d; background: var(--red-soft); border: 1px solid #ffd6dd; border-radius: 10px; font-size: 12px; }.form-errors p { margin: 3px 0; }.error-card { text-align: center; }.error-card .button { margin-top: 24px; }

.workspace-page { background: #f6f7fb; }.workspace { min-height: calc(100vh - 76px); padding: 48px 0 80px; }.company-sections-shell { padding: 14px 0 0; background: #f6f7fb; }.company-section-nav { width: fit-content; max-width: 100%; padding: 4px; display: flex; gap: 4px; overflow-x: auto; background: #ebeef5; border: 1px solid #e2e5ed; border-radius: 14px; scrollbar-width: none; }.company-section-nav::-webkit-scrollbar { display: none; }.company-section-link { min-width: 175px; min-height: 48px; padding: 8px 11px; display: flex; align-items: center; gap: 9px; color: #6b7486; border: 1px solid transparent; border-radius: 10px; transition: color .2s, background .2s, border-color .2s, box-shadow .2s; }.company-section-link > svg { width: 19px; height: 19px; flex: 0 0 auto; stroke-width: 2; }.company-section-link > span { min-width: 0; }.company-section-link strong,.company-section-link small { display: block; white-space: nowrap; }.company-section-link strong { color: #3f485b; font-size: 10px; }.company-section-link small { margin-top: 3px; color: #929aaa; font-size: 7px; }.company-section-link > em { margin-left: auto; padding: 4px 6px; color: white; background: linear-gradient(135deg,#b324e4,#ef2677); border-radius: 6px; font-size: 7px; font-style: normal; font-weight: 850; }.company-section-link:hover { color: var(--primary); background: rgba(255,255,255,.6); }.company-section-link.active { color: var(--primary); background: white; border-color: #e0e3eb; box-shadow: 0 5px 15px rgba(31,39,64,.08); }.company-section-link.active strong { color: var(--ink); }.company-sections-shell ~ main .workspace { padding-top: 26px; }.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }.page-heading h1 { margin: 10px 0 7px; font-size: 32px; letter-spacing: -.04em; }.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }.admin-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; color: #5c6578; background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 700; }.admin-badge i,.sync-note i { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.stat-grid { display: grid; gap: 16px; margin-bottom: 20px; }.stat-grid-admin { grid-template-columns: repeat(4, 1fr); }.stat-card { padding: 20px; display: flex; align-items: center; gap: 15px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }.stat-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; font-size: 16px; font-weight: 800; }.stat-icon svg { width: 21px; height: 21px; }.stat-icon.purple { color: var(--primary); background: var(--primary-soft); }.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }.stat-icon.green { color: var(--green); background: var(--green-soft); }.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }.stat-card span { display: block; color: var(--muted); font-size: 12px; }.stat-card strong { display: block; margin-top: 4px; font-size: 24px; letter-spacing: -.03em; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }.panel-head { min-height: 76px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #eff1f5; }.panel-head h2 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.02em; }.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }.table-filter { position: relative; }.table-filter svg { position: absolute; top: 50%; left: 11px; width: 16px; color: #929aaa; transform: translateY(-50%); }.table-filter input { width: 210px; height: 38px; padding: 0 11px 0 35px; background: #fafbfc; border: 1px solid var(--line); border-radius: 9px; outline: none; font-size: 11px; }.table-filter input:focus { border-color: #8a8bf4; box-shadow: 0 0 0 3px rgba(91,92,240,.09); }.table-scroll { overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }.data-table th { padding: 12px 20px; color: #8a92a2; background: #fafbfc; border-bottom: 1px solid #edf0f4; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }.data-table td { padding: 15px 20px; border-bottom: 1px solid #f0f2f6; font-size: 12px; vertical-align: middle; }.data-table tbody tr:last-child td { border-bottom: 0; }.data-table tbody tr { transition: background .2s; }.data-table tbody tr:hover { background: #fcfcff; }.align-right { text-align: right !important; }.company-cell { display: flex; align-items: center; gap: 11px; }.company-avatar { width: 37px; height: 37px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 14px; font-weight: 800; }.company-cell strong,.contact-cell strong { display: block; font-size: 12px; }.company-cell small,.contact-cell a,.table-time { display: block; margin-top: 4px; color: #8a92a2; font-size: 10px; }.contact-cell a:hover { color: var(--primary); }.muted { color: #596377; }.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; font-size: 10px; font-weight: 750; }.status i { width: 6px; height: 6px; border-radius: 50%; }.status-pending { color: #ae6618; background: var(--orange-soft); }.status-pending i { background: var(--orange); }.status-approved { color: #16815d; background: var(--green-soft); }.status-approved i { background: var(--green); }.status-rejected { color: #b23d51; background: var(--red-soft); }.status-rejected i { background: var(--red); }.row-actions { display: flex; justify-content: flex-end; gap: 6px; }.row-actions form { margin: 0; }.icon-button { width: 33px; height: 33px; display: inline-grid; place-items: center; padding: 0; background: white; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .2s; }.icon-button svg { width: 16px; height: 16px; stroke-width: 2; }.icon-button.approve { color: var(--green); }.icon-button.approve:hover { background: var(--green-soft); border-color: #bcebdc; }.icon-button.reject { color: var(--red); }.icon-button.reject:hover { background: var(--red-soft); border-color: #ffd2da; }.icon-button.neutral { color: #8c94a3; }.icon-button.neutral:hover { color: var(--red); background: var(--red-soft); }.empty-state { padding: 65px 20px; text-align: center; }.empty-icon { width: 50px; height: 50px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 15px; }.empty-icon svg { width: 24px; height: 24px; }.empty-state h3 { margin: 0 0 7px; font-size: 15px; }.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }.empty-state.compact { padding: 40px 20px; }.empty-state.compact .button { margin-top: 16px; }
.approval-state { max-width: 720px; margin: 65px auto 30px; padding: 55px 70px; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-md); text-align: center; }.approval-visual { position: relative; width: 94px; height: 94px; margin: 0 auto 20px; display: grid; place-items: center; }.approval-icon { position: relative; z-index: 2; width: 58px; height: 58px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border: 1px solid #dedfff; border-radius: 18px; }.approval-icon svg { width: 29px; height: 29px; animation: rotate-slow 8s linear infinite; }.orbit { position: absolute; border: 1px solid rgba(91,92,240,.18); border-radius: 50%; }.orbit-one { inset: 5px; animation: pulse-ring 2.6s ease-out infinite; }.orbit-two { inset: 0; animation: pulse-ring 2.6s ease-out .9s infinite; }.approval-state h2 { margin: 17px 0 9px; font-size: 25px; letter-spacing: -.03em; }.approval-state > p { max-width: 530px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.7; }.approval-steps { margin-top: 34px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #9aa1af; font-size: 10px; font-weight: 700; }.approval-steps span { display: flex; align-items: center; gap: 6px; }.approval-steps i { width: 22px; height: 22px; display: grid; place-items: center; background: #f0f2f6; border-radius: 50%; font-style: normal; }.approval-steps b { width: 55px; height: 1px; background: #e1e4eb; }.approval-steps .done { color: var(--green); }.approval-steps .done i { color: white; background: var(--green); }.approval-steps .active { color: var(--primary); }.approval-steps .active i { color: white; background: var(--primary); }.reject-icon { color: var(--red); background: var(--red-soft); border-color: #ffd8df; font-size: 24px; font-weight: 800; }.rejected-state { margin-top: 55px; }
@keyframes pulse-ring { 0% { transform: scale(.7); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } } @keyframes rotate-slow { to { transform: rotate(360deg); } }
.dashboard-toolbar { margin: 3px 0 18px; display: flex; align-items: center; justify-content: space-between; }.period-tabs { display: inline-flex; padding: 4px; background: #e9ebf1; border-radius: 10px; }.period-tabs a { padding: 8px 13px; color: #70798a; border-radius: 7px; font-size: 11px; font-weight: 700; }.period-tabs a.active { color: var(--ink); background: white; box-shadow: 0 3px 10px rgba(32,39,61,.08); }.sync-note { display: flex; align-items: center; gap: 8px; color: #7c8495; font-size: 10px; }.dashboard-stats { grid-template-columns: repeat(4, 1fr); }.metric-card { display: block; }.stat-card-top { display: flex; align-items: center; justify-content: space-between; }.metric-card > strong { margin-top: 15px; font-size: 23px; }.metric-card > small { display: block; margin-top: 5px; color: #8a92a2; font-size: 10px; }.analytics-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; margin-bottom: 20px; }.chart-panel,.marketplace-panel { min-height: 385px; }.chart-legend { display: flex; gap: 15px; color: #7f8797; font-size: 10px; }.chart-legend span { display: flex; align-items: center; gap: 5px; }.chart-legend i { width: 16px; height: 3px; border-radius: 4px; }.legend-revenue { background: var(--primary); }.legend-profit { background: var(--green); }.chart-wrap { height: 290px; padding: 20px 18px 12px 12px; }.chart-wrap canvas { width: 100%; height: 100%; }.chart-empty { height: 285px; display: grid; place-content: center; justify-items: center; color: #a0a7b5; text-align: center; }.chart-empty svg { width: 32px; height: 32px; margin-bottom: 12px; color: #b7bcc8; }.chart-empty p { margin: 0; font-size: 11px; line-height: 1.6; }.marketplace-list { padding: 18px 20px; }.market-row { margin-bottom: 20px; }.market-row:last-child { margin-bottom: 0; }.market-row-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }.market-row-head > div { display: flex; align-items: center; gap: 9px; }.market-logo { width: 27px; height: 27px; display: grid; place-items: center; color: white; border-radius: 8px; font-size: 10px; }.market-logo-0 { background: linear-gradient(135deg,#b324e4,#ef2677); }.market-logo-1 { background: #1769ff; }.market-logo-2 { background: #ecb633; }.market-logo-3 { background: #22b994; }.market-track { height: 5px; margin: 10px 0 7px; background: #eef0f4; border-radius: 5px; overflow: hidden; }.market-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #6b6cf4, #999af8); border-radius: 5px; transition: width .8s ease; }.market-meta { display: flex; justify-content: space-between; color: #929aaa; font-size: 10px; }.mini-empty { height: 280px; display: grid; place-content: center; justify-items: center; color: #9da4b2; text-align: center; }.mini-empty span { font-size: 30px; }.mini-empty p { max-width: 180px; font-size: 11px; line-height: 1.5; }.entries-panel .expense { color: var(--red); }.entries-panel .profit { color: var(--green); font-weight: 750; }.market-chip { padding: 5px 8px; color: #4e5670; background: #f1f2f7; border-radius: 6px; font-size: 10px; font-weight: 700; }
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }.modal.open { display: flex; }.modal-backdrop { position: absolute; inset: 0; background: rgba(10,15,29,.54); backdrop-filter: blur(5px); animation: fade-in .2s; }.modal-card { position: relative; z-index: 2; width: min(100%, 660px); max-height: calc(100vh - 40px); padding: 28px; overflow-y: auto; background: white; border-radius: 22px; box-shadow: 0 35px 100px rgba(9,13,28,.28); animation: modal-in .25s ease-out; }.modal-head { display: flex; justify-content: space-between; margin-bottom: 24px; }.modal-head h2 { margin: 9px 0 5px; font-size: 23px; letter-spacing: -.03em; }.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }.modal-close { width: 38px; height: 38px; color: #798294; background: #f5f6f9; border: 0; border-radius: 10px; font-size: 22px; cursor: pointer; }.metric-form-grid { gap: 15px; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }.modal-open { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.985); } } @keyframes fade-in { from { opacity: 0; } }
.toast-stack { position: fixed; z-index: 120; top: 92px; right: 24px; width: min(calc(100% - 40px), 410px); display: grid; gap: 9px; }.toast { padding: 13px 13px; display: flex; align-items: flex-start; gap: 10px; color: #3c4659; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 45px rgba(25,33,55,.14); font-size: 11px; line-height: 1.5; animation: toast-in .35s ease-out; }.toast-icon { width: 21px; height: 21px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 11px; font-weight: 800; }.toast-error .toast-icon { background: var(--red); }.toast-info .toast-icon { background: var(--blue); }.toast-close { margin-left: auto; color: #98a0ae; background: transparent; border: 0; font-size: 19px; line-height: 1; cursor: pointer; }.toast.hiding { opacity: 0; transform: translateX(15px); transition: .25s; } @keyframes toast-in { from { opacity: 0; transform: translateX(15px); } }
.reveal { animation: reveal .32s ease-out both; }.reveal-delay-sm { animation-delay: .04s; }.reveal-delay { animation-delay: .08s; } @keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; gap: 60px; }.hero-copy { max-width: 690px; text-align: center; margin: auto; }.hero-copy .eyebrow { justify-content: center; }.hero-lead { margin: auto; }.hero-actions,.trust-row { justify-content: center; }.hero-visual { width: min(700px, 90%); margin: auto; }.market-logos { gap: 20px; }.logos-inner { align-items: flex-start; flex-direction: column; }.dashboard-stats { grid-template-columns: 1fr 1fr; }.analytics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .container { width: min(calc(100% - 28px), var(--container)); }.site-header { height: 68px; }.nav-toggle { display: block; }.main-nav { position: absolute; top: 67px; left: 14px; right: 14px; padding: 14px; display: none; align-items: stretch; flex-direction: column; gap: 5px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); }.main-nav.open { display: flex; }.main-nav .nav-link { padding: 12px; }.main-nav .button,.main-nav form .button { width: 100%; }.hero { min-height: 0; padding: 65px 0 75px; }.hero-grid { gap: 50px; }.hero h1 { font-size: 43px; }.hero-lead { font-size: 16px; }.hero-visual { width: 100%; }.dashboard-preview { min-height: 360px; padding: 17px; }.preview-chart { height: 150px; }.preview-cards > div { padding-left: 10px; }.preview-cards .metric-icon { display: none; }.float-profit { right: -8px; }.float-orders { left: -5px; bottom: 20px; }.market-logos { flex-wrap: wrap; gap: 18px 25px; }.feature-grid { grid-template-columns: 1fr; }.section { padding: 80px 0; }.cta-card { padding: 38px 28px; align-items: flex-start; flex-direction: column; gap: 28px; }.footer-inner { flex-direction: column; gap: 14px; }.auth-shell { min-height: calc(100vh - 68px); padding: 28px 14px; }.auth-card { padding: 29px 23px; }.form-grid { grid-template-columns: 1fr; }.field-full { grid-column: auto; }.workspace { padding: 32px 0 60px; }.page-heading { align-items: flex-start; flex-direction: column; }.page-heading .button { width: 100%; }.stat-grid-admin,.dashboard-stats { grid-template-columns: 1fr 1fr; }.panel-head { align-items: flex-start; flex-direction: column; }.table-filter,.table-filter input { width: 100%; }.approval-state { margin: 35px auto 20px; padding: 42px 24px; }.approval-steps b { width: 22px; }.dashboard-toolbar { align-items: flex-start; flex-direction: column; gap: 14px; }.period-tabs { width: 100%; overflow-x: auto; }.period-tabs a { flex: 1; text-align: center; white-space: nowrap; }.chart-legend { display: none; }.modal-card { padding: 23px 18px; }.metric-form-grid { grid-template-columns: 1fr 1fr; }.metric-form-grid .field-full { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
    .hero h1 { font-size: 37px; }.hero-actions { flex-direction: column; }.hero-actions .button { width: 100%; }.trust-row { gap: 10px 15px; }.dashboard-preview { min-height: 315px; }.preview-title strong { font-size: 21px; }.preview-chart { height: 125px; }.float-card { display: none; }.section-heading h2,.cta-card h2 { font-size: 30px; }.stat-grid-admin,.dashboard-stats { grid-template-columns: 1fr; }.approval-steps { gap: 6px; }.approval-steps b { width: 12px; }.approval-steps span { gap: 4px; }.metric-form-grid { grid-template-columns: 1fr; }.metric-form-grid .field-full { grid-column: auto; }.modal-actions .button { flex: 1; }.toast-stack { top: 80px; right: 14px; width: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Authenticated workspaces: use the available screen instead of a fixed desktop canvas. */
.workspace-page .container { width: calc(100% - 40px); max-width: none; }
.workspace-page .workspace { padding-left: 0; padding-right: 0; }

/* Theme switcher */
.theme-toggle { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #5e687b; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: color .2s, background .2s, border-color .2s, transform .2s; }
.theme-toggle:hover { color: var(--primary); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }

/* Compact export center */
.export-list { margin-top: 18px; }
.export-card { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.export-card-main { min-width: 0; display: flex; align-items: flex-start; gap: 16px; }
.export-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: white; border-radius: 13px; font-size: 17px; font-weight: 850; }
.export-icon-wb { background: linear-gradient(135deg,#b324e4,#ef2677); box-shadow: 0 9px 22px rgba(205,35,170,.2); }
.export-title-line { display: flex; align-items: center; gap: 12px; }
.export-title-line h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.export-card-main p { margin: 7px 0 11px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.export-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #8891a2; font-size: 10px; }
.export-meta b { color: var(--ink); }
.export-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.action-count,.export-subnav span { min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 9px; }
.journal-count { min-width: 25px; height: 19px; padding: 0 6px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 6px; font-size: 8px; font-weight: 850; line-height: 1; }
.journal-count-success { color: #147b59; background: var(--green-soft); border-color: color-mix(in srgb,var(--green) 24%,transparent); }
.journal-count-error { color: #b6324b; background: var(--red-soft); border-color: color-mix(in srgb,var(--red) 24%,transparent); }
.journal-count-other { color: #7856c6; background: color-mix(in srgb,var(--purple-soft) 75%,transparent); border-color: color-mix(in srgb,var(--primary) 24%,transparent); }
.journal-button { gap: 5px; }
.export-page-heading { margin-bottom: 17px; }
.export-subnav { width: fit-content; margin-bottom: 18px; padding: 4px; display: flex; gap: 4px; background: #e9ecf3; border-radius: 11px; }
.export-subnav a { min-height: 35px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; color: #657084; border-radius: 8px; font-size: 11px; font-weight: 750; }
.export-subnav a.active { color: var(--ink); background: var(--surface); box-shadow: 0 3px 11px rgba(32,39,61,.08); }
.scheduler-panel-compact { max-width: 1100px; }
.scheduler-form-extended { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scheduler-interval-group { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.scheduler-store-picker { grid-column: 1 / -1; padding: 0; border: 0; }
.scheduler-store-picker legend { margin-bottom: 9px; color: #697386; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.scheduler-store-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.scheduler-store-list label { min-height: 57px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.scheduler-store-list input { accent-color: var(--primary); }
.scheduler-store-list .market-logo { flex: 0 0 auto; }
.scheduler-store-list strong,.scheduler-store-list small { display: block; }
.scheduler-store-list strong { font-size: 11px; }.scheduler-store-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.parallel-option { grid-column: 1 / 3; min-height: 62px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 11px; background: var(--primary-soft); border: 1px solid #dedfff; border-radius: 11px; cursor: pointer; }
.parallel-option input { margin-top: 2px; accent-color: var(--primary); }
.parallel-option strong,.parallel-option small { display: block; }.parallel-option strong { font-size: 11px; }.parallel-option small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }

/* Connection history */
.history-filters { margin-bottom: 17px; padding: 15px; display: grid; grid-template-columns: minmax(230px, 1fr) 180px 190px auto auto; align-items: end; gap: 10px; }
.history-filters label > span { display: block; margin-bottom: 6px; color: #717b8d; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.history-filters input,.history-filters select { width: 100%; height: 38px; padding: 0 11px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; }
.history-table-panel { padding: 0; overflow: hidden; }
.connection-history-table td { vertical-align: top; }
.connection-history-table td > strong,.connection-history-table td > small,.history-store { display: block; }
.connection-history-table td > small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.history-store { width: fit-content; margin-top: 7px; padding: 4px 7px; color: #6b47c5; background: #f3edff; border-radius: 6px; font-size: 9px; font-weight: 700; }
.muted { color: var(--muted); font-size: 10px; }
.pagination { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 11px; }.pagination a { color: var(--primary); font-weight: 750; }

/* Dark theme for administrator and company workspaces. */
html[data-theme="dark"] { color-scheme: dark; --ink: #edf1f8; --muted: #9aa6b8; --line: #2b3648; --line-strong: #435064; --soft: #101722; --surface: #182232; --primary: #8384ff; --primary-dark: #a2a3ff; --primary-soft: #292b55; --green: #3bd39c; --green-soft: #173c34; --orange: #ffad55; --orange-soft: #46311e; --red: #ff7087; --red-soft: #48232d; --blue: #67aaff; --blue-soft: #1d344d; --shadow-sm: 0 8px 30px rgba(0,0,0,.22); --shadow-md: 0 24px 70px rgba(0,0,0,.35); }
html[data-theme="dark"] body,html[data-theme="dark"] .workspace-page { background: #0d131d; }
html[data-theme="dark"] .site-header { background: rgba(13,19,29,.9); border-bottom-color: #253044; }
html[data-theme="dark"] .site-footer,html[data-theme="dark"] .company-sections-shell { background: #0d131d; border-color: var(--line); }
html[data-theme="dark"] .nav-link,html[data-theme="dark"] .button-ghost,html[data-theme="dark"] .theme-toggle { color: #b5bfce; }
html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .company-card,html[data-theme="dark"] .pricing-card,html[data-theme="dark"] .billing-card,html[data-theme="dark"] .settings-card,html[data-theme="dark"] .marketplace-card,html[data-theme="dark"] .product-card,html[data-theme="dark"] .modal-card,html[data-theme="dark"] .toast,html[data-theme="dark"] .admin-badge,html[data-theme="dark"] .integration-summary article,html[data-theme="dark"] .admin-order-storage { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .button-secondary,html[data-theme="dark"] .period-tabs a.active,html[data-theme="dark"] .company-section-link.active { color: var(--ink); background: #202b3d; border-color: #354257; }
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea { color: var(--ink); background: #111a27; border-color: #334056; }
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color: #69758a; }
html[data-theme="dark"] .company-section-nav,html[data-theme="dark"] .period-tabs,html[data-theme="dark"] .export-subnav { background: #111a27; border-color: var(--line); }
html[data-theme="dark"] .company-section-link strong { color: #aeb8c8; }
html[data-theme="dark"] .company-section-link.active strong { color: var(--ink); }
html[data-theme="dark"] table,html[data-theme="dark"] .data-table { color: var(--ink); }
html[data-theme="dark"] .data-table th,html[data-theme="dark"] .data-table td,html[data-theme="dark"] .table-row,html[data-theme="dark"] .company-stores-row td { border-color: var(--line); }
html[data-theme="dark"] .data-table tbody tr:hover,html[data-theme="dark"] .scheduler-store-list label,html[data-theme="dark"] .feed-log-row,html[data-theme="dark"] .wb-source-list > div { background: #141e2c; }
html[data-theme="dark"] .export-meta,html[data-theme="dark"] .feed-form-field > span,html[data-theme="dark"] .history-filters label > span { color: #929eb0; }
html[data-theme="dark"] .parallel-option { border-color: #43477b; }
html[data-theme="dark"] .history-store { color: #c2abff; background: #332852; }
html[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.7); }
html[data-theme="dark"] .main-nav.open { background: #131d2b; border-color: var(--line); }

@media (max-width: 900px) {
    .export-card { align-items: stretch; flex-direction: column; }.export-actions { flex-wrap: wrap; }
    .scheduler-form-extended { grid-template-columns: 1fr 1fr; }.scheduler-store-list { grid-template-columns: 1fr 1fr; }
    .history-filters { grid-template-columns: 1fr 1fr; }.history-filters label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .workspace-page .container { width: calc(100% - 28px); }
    .theme-toggle { width: 100%; display: flex; }.theme-toggle::after { content: "Сменить тему"; font-size: 12px; font-weight: 700; }
    .export-actions .button { flex: 1; }.scheduler-form-extended,.scheduler-store-list,.history-filters { grid-template-columns: 1fr; }
    .history-filters label:first-child { grid-column: auto; }.parallel-option { grid-column: 1 / -1; }
}
@media (max-width: 500px) { .export-card { padding: 17px; }.export-title-line { align-items: flex-start; flex-direction: column; }.export-card-main { flex-direction: column; }.export-subnav { width: 100%; overflow-x: auto; }.export-subnav a { flex: 1; white-space: nowrap; }.scheduler-interval-group { grid-template-columns: 1fr 1fr; } }

/* Separate administrator portal */
.footer-links { display: flex; align-items: center; gap: 20px; }
.admin-auth-page { background: radial-gradient(circle at 50% 0, rgba(91,92,240,.11), transparent 34%), #f5f6fa; }
.admin-auth-card { border-top: 3px solid var(--primary); }
.admin-auth-icon { color: white; background: linear-gradient(145deg, #6869f4, #4849d8); box-shadow: 0 12px 28px rgba(91,92,240,.25); }
.admin-portal-label { display: inline-block; margin: -4px 0 10px; color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-login-footer { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); text-align: center; }
.admin-login-footer a { color: #747d8e; font-size: 11px; font-weight: 650; transition: color .2s; }
.admin-login-footer a:hover { color: var(--primary); }

@media (max-width: 760px) {
    .footer-links { flex-direction: column; gap: 9px; }
}

/* Company marketplace settings */
.settings-summary { margin-bottom: 20px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.settings-summary > div { display: flex; align-items: center; gap: 12px; }
.settings-summary-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 11px; }
.settings-summary-icon svg { width: 20px; height: 20px; }
.settings-summary p,.settings-summary small { display: block; margin: 0; }
.settings-summary p strong { display: block; margin-bottom: 4px; font-size: 12px; }
.settings-summary p small { color: var(--muted); font-size: 10px; }
.first-store-gate { margin-bottom: 18px; padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; border-color: color-mix(in srgb,var(--primary) 28%,var(--line)); background: linear-gradient(115deg,color-mix(in srgb,var(--primary) 8%,var(--surface)),var(--surface)); }
.first-store-gate-icon { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),#8d65ff); border-radius: 13px; box-shadow: 0 8px 22px color-mix(in srgb,var(--primary) 22%,transparent); font-size: 22px; }
.first-store-gate small { display: block; margin-bottom: 3px; color: var(--primary); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.first-store-gate h2 { margin: 0 0 4px; font-size: 15px; }
.first-store-gate p { max-width: 760px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.first-store-gate-state { min-height: 32px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; color: #9a6719; background: var(--orange-soft); border-radius: 9px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.first-store-gate-state i { width: 7px; height: 7px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb,var(--orange) 15%,transparent); }
.connected-total { padding: 8px 11px; color: #626b7d; background: var(--soft); border-radius: 8px; font-size: 10px; font-weight: 650; }
.connected-total strong { color: var(--primary); font-size: 13px; }
.tariff-card { margin-bottom: 20px; padding: 18px 20px; display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: 18px 28px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tariff-card-main { display: flex; align-items: center; gap: 13px; }
.tariff-plan-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: #a76716; background: var(--orange-soft); border-radius: 12px; font-size: 17px; font-weight: 850; }
.tariff-extended .tariff-plan-icon { color: var(--green); background: var(--green-soft); }
.tariff-label { display: block; margin-bottom: 3px; color: #8b93a3; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tariff-card h2 { margin: 0 0 4px; font-size: 15px; }
.tariff-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.tariff-usage { display: flex; gap: 8px; }
.tariff-usage > span { min-width: 104px; padding: 9px 12px; background: #f7f8fb; border-radius: 9px; }
.tariff-usage small,.tariff-usage strong { display: block; }
.tariff-usage small { margin-bottom: 4px; color: #8a92a2; font-size: 8px; }
.tariff-usage strong { color: var(--ink); font-size: 12px; }
.tariff-request-state { grid-column: 1 / -1; padding: 11px 13px; display: flex; align-items: center; gap: 9px; color: #8a5a16; background: #fff8e7; border: 1px solid #f4dfad; border-radius: 9px; }
.tariff-request-state i { width: 8px; height: 8px; flex: 0 0 auto; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 4px rgba(240,157,46,.13); }
.tariff-request-state strong,.tariff-request-state small { display: block; }
.tariff-request-state strong { margin-bottom: 3px; font-size: 10px; }
.tariff-request-state small { color: #97733d; font-size: 9px; }
.marketplace-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 18px; }
.marketplace-connect-card { position: relative; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.marketplace-connect-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--market-color); }
.marketplace-wb { --market-color: #c02bd4; --market-soft: #faedfc; }
.marketplace-ozon { --market-color: #1769ff; --market-soft: #edf3ff; }
.marketplace-yandex { --market-color: #efb51f; --market-soft: #fff7df; }
.marketplace-card-head { min-height: 92px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eef0f4; }
.marketplace-title { min-width: 0; display: flex; align-items: center; gap: 11px; }
.marketplace-title h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.02em; }
.marketplace-title p { margin: 0; color: #8c94a3; font-size: 9px; }
.marketplace-brand-logo { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--market-color); border-radius: 11px; font-size: 15px; font-weight: 850; box-shadow: 0 8px 20px color-mix(in srgb, var(--market-color) 25%, transparent); }
.add-store-button { min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--market-color); background: var(--market-soft); border: 1px solid transparent; border-radius: 8px; font-size: 9px; font-weight: 750; cursor: pointer; transition: transform .2s, border-color .2s; white-space: nowrap; }
.add-store-button span { font-size: 17px; font-weight: 400; line-height: 1; }
.add-store-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--market-color) 24%, transparent); }
.upgrade-inline-form { margin: 0; }
.add-store-button-upgrade { color: #805e1e; background: #fff5d9; border-color: #f1d58e; }
.add-store-button-pending,.add-store-button:disabled { color: #7f8796; background: #f2f3f6; border-color: #e5e7ec; cursor: default; }
.add-store-button:disabled:hover { border-color: #e5e7ec; transform: none; }
.stores-list { min-height: 150px; padding: 10px 15px 15px; }
.connected-store { min-height: 62px; padding: 10px 5px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f2f5; }
.connected-store:last-child { border-bottom: 0; }
.store-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--market-color); background: var(--market-soft); border-radius: 9px; }
.store-icon svg { width: 18px; height: 18px; }
.store-info { min-width: 0; flex: 1; }
.store-info strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.store-info small { display: block; margin-top: 5px; overflow: hidden; color: #8a92a2; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.secure-dot { width: 5px; height: 5px; display: inline-block; margin-right: 3px; background: var(--green); border-radius: 50%; }
.connected-store form { margin: 0; }
.connected-store .icon-button { width: 29px; height: 29px; border: 0; }
.stores-empty { min-height: 130px; display: grid; place-content: center; justify-items: center; color: #9ba2b0; text-align: center; }
.stores-empty > span { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 9px; color: var(--market-color); background: var(--market-soft); border-radius: 10px; font-size: 19px; }
.stores-empty p { margin: 0 0 4px; color: #747d8e; font-size: 10px; font-weight: 700; }
.stores-empty small { font-size: 8px; }
.store-add-form { margin: 0 14px 14px; padding: 16px; display: grid; gap: 13px; background: #fafbfe; border: 1px solid #e7eaf1; border-radius: 12px; animation: store-form-in .24s ease-out; }
.store-add-form[hidden] { display: none; }
.store-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.store-form-heading strong,.store-form-heading small { display: block; }
.store-form-heading strong { font-size: 11px; }
.store-form-heading small { margin-top: 4px; color: #8b93a2; font-size: 8px; }
.store-form-heading > button { width: 26px; height: 26px; padding: 0; color: #8c94a3; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 17px; cursor: pointer; }
.store-price-quote { padding: 12px; color: #5b6475; background: #f3f3ff; border: 1px solid #dedfff; border-radius: 10px; }
.store-price-quote.free { color: #32765f; background: #edfaf5; border-color: #cfefe2; }
.store-price-quote.unavailable { color: #a14d5d; background: #fff2f4; border-color: #f6d6dc; }
.store-price-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-price-head span { font-size: 8px; font-weight: 750; }
.store-price-head strong { color: var(--primary); font-size: 12px; }
.store-price-quote.free .store-price-head strong { color: var(--green); }
.store-price-lines { margin-top: 7px; display: grid; gap: 3px; }
.store-price-lines small { font-size: 8px; }
.store-price-quote p { margin: 8px 0 0; padding-top: 8px; color: #7b8494; border-top: 1px solid rgba(91,92,240,.11); font-size: 8px; line-height: 1.45; }
.store-add-form .field { gap: 6px; }
.store-add-form .field > span:first-child { font-size: 9px; }
.store-add-form .input-wrap input { height: 40px; font-size: 10px; }
.wb-token-check { padding: 11px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.wb-token-check > div:first-child strong,.wb-token-check > div:first-child small { display: block; }
.wb-token-check > div:first-child strong { font-size: 10px; }
.wb-token-check > div:first-child small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.wb-token-check-result { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); }
.wb-token-check-result > strong { display: block; color: var(--ink); font-size: 10px; line-height: 1.45; }
.wb-token-check-result > p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.wb-token-check.is-success { border-color: color-mix(in srgb,var(--green) 38%,var(--line)); background: color-mix(in srgb,var(--green-soft) 72%,var(--surface)); }
.wb-token-check.is-error { border-color: color-mix(in srgb,var(--red) 34%,var(--line)); background: color-mix(in srgb,var(--red-soft) 70%,var(--surface)); }
.store-form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.store-form-actions { display: flex; justify-content: flex-end; gap: 7px; padding-top: 2px; }
.store-form-actions .button { min-height: 34px; padding: 0 11px; font-size: 9px; }
.settings-security-note { margin-top: 20px; padding: 17px 20px; display: flex; align-items: flex-start; gap: 12px; color: #596377; background: #f0f1ff; border: 1px solid #dedfff; border-radius: 13px; }
.settings-security-note > svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--primary); }
.settings-security-note strong { display: block; margin-bottom: 4px; font-size: 10px; }
.settings-security-note p { margin: 0; color: #7d8495; font-size: 9px; line-height: 1.5; }
.settings-locked { max-width: 700px; margin: 50px auto; padding: 50px; text-align: center; }
.settings-lock-icon { width: 54px; height: 54px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 16px; }
.settings-lock-icon svg { width: 25px; height: 25px; }
.settings-locked h2 { margin: 0 0 9px; font-size: 21px; }
.settings-locked p { max-width: 490px; margin: 0 auto 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.pricing-panel { margin-bottom: 20px; }
.pricing-state { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: #a26418; background: var(--orange-soft); border-radius: 8px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.pricing-state i { width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
.pricing-state.configured { color: #16815d; background: var(--green-soft); }
.pricing-state.configured i { background: var(--green); }
.pricing-form { padding: 18px 20px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pricing-free-limits { grid-column: 1 / -1; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.pricing-free-limits legend { width: 100%; padding: 0 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pricing-free-limits legend strong { font-size: 11px; }
.pricing-free-limits legend small { color: var(--muted); font-size: 9px; }
.pricing-free-limit { min-width: 0; min-height: 52px; padding: 9px 10px; display: grid; grid-template-columns: 34px minmax(0,1fr) 70px; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.pricing-free-limit > i { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--primary); border-radius: 9px; font-style: normal; font-size: 11px; font-weight: 900; }
.pricing-free-limit-ozon > i { background: #1769ff; }
.pricing-free-limit-yandex > i { color: #171717; background: #f5c400; }
.pricing-free-limit span { min-width: 0; }
.pricing-free-limit strong,.pricing-free-limit small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pricing-free-limit strong { font-size: 10px; }
.pricing-free-limit small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.pricing-free-limit input { width: 70px; height: 36px; padding: 0 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 11px; text-align: right; }
.pricing-field { min-width: 0; padding: 14px; display: flex; align-items: center; gap: 11px; background: #fafbfc; border: 1px solid #e9ebf0; border-radius: 12px; }
.pricing-field-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.pricing-field-icon.marketplace { color: var(--blue); background: var(--blue-soft); }
.pricing-field-icon svg { width: 19px; height: 19px; }
.pricing-field-copy { min-width: 120px; flex: 1; }
.pricing-field-copy strong,.pricing-field-copy small { display: block; }
.pricing-field-copy strong { margin-bottom: 4px; font-size: 11px; }
.pricing-field-copy small { color: #8a92a2; font-size: 8px; line-height: 1.4; }
.price-input-wrap { width: 126px; height: 40px; flex: 0 0 auto; display: flex; align-items: center; overflow: hidden; background: white; border: 1px solid #dfe2e8; border-radius: 9px; transition: border-color .2s, box-shadow .2s; }
.price-input-wrap:focus-within { border-color: #8a8bf4; box-shadow: 0 0 0 3px rgba(91,92,240,.09); }
.price-input-wrap input { min-width: 0; width: 100%; height: 100%; padding: 0 4px 0 11px; color: var(--ink); background: transparent; border: 0; outline: 0; font: inherit; font-size: 11px; font-weight: 750; }
.price-input-wrap b { padding: 0 11px 0 5px; color: #7b8494; font-size: 11px; }
.pricing-form-footer { grid-column: 1 / -1; padding-top: 3px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pricing-form-footer > span { color: #8a92a2; font-size: 8px; }
.tariff-request-panel { margin-bottom: 20px; }
.tariff-panel-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.price-reference { padding: 7px 9px; color: #6b7382; background: #f5f6f9; border-radius: 7px; font-size: 8px; white-space: nowrap; }
.price-reference strong { margin-left: 4px; color: var(--primary); font-size: 9px; }
.price-reference-empty { color: #a26418; background: var(--orange-soft); font-weight: 700; }
.tariff-usage-cell strong,.tariff-usage-cell small { display: block; }
.tariff-usage-cell small { margin-top: 4px; color: #8a92a2; font-size: 10px; }
.company-price-cell strong,.company-price-cell small { display: block; }
.company-price-cell strong { width: fit-content; margin-bottom: 5px; padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 8px; }
.company-price-cell small { margin-top: 3px; color: #737c8c; font-size: 8px; }
.request-reason { max-width: 240px; white-space: normal; line-height: 1.35; }
.request-state-cell .status { margin-top: 7px; }
.company-discount-form { display: flex; align-items: center; gap: 6px; }
.company-discount-form > span { width: 74px; height: 34px; display: flex; align-items: center; overflow: hidden; background: #fafbfc; border: 1px solid #e0e3e9; border-radius: 8px; }
.company-discount-form input { min-width: 0; width: 100%; height: 100%; padding: 0 2px 0 9px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 10px; font-weight: 750; }
.company-discount-form b { padding: 0 8px 0 3px; color: #7c8493; font-size: 9px; }
.company-discount-form .discount-save { width: 34px; height: 34px; color: var(--primary); }
.company-discount-form .discount-save:hover { background: var(--primary-soft); border-color: #d9d9ff; }
.company-search-stores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.company-stores-toggle { min-height: 31px; padding: 0 9px; gap: 5px; color: #596377; font-size: 8px; }
.company-stores-toggle b { min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 7px; }
.company-stores-toggle svg { width: 13px; height: 13px; transition: transform .2s ease; }
.company-stores-toggle.active { color: var(--primary); border-color: #d9d9ff; background: #fafaff; }
.company-stores-toggle.active svg { transform: rotate(180deg); }
.company-stores-row[hidden] { display: none !important; }
.company-stores-row > td { padding: 0 !important; background: #f7f8fc; }
.company-stores-row:hover { background: transparent !important; }
.company-stores-panel { margin: 0 12px 12px; overflow: hidden; background: white; border: 1px solid #e2e5ed; border-radius: 12px; box-shadow: 0 8px 22px rgba(31,39,64,.06); animation: stores-panel-in .2s ease-out; }
.company-stores-panel-head { min-height: 52px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eceef3; }
.company-stores-panel-head strong,.company-stores-panel-head small { display: block; }
.company-stores-panel-head strong { font-size: 10px; }
.company-stores-panel-head small { margin-top: 3px; color: #8a92a2; font-size: 8px; }
.company-stores-panel-head > span { padding: 6px 8px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 8px; font-weight: 800; }
.company-stores-list { padding: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.company-store-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; background: #fafbfc; border: 1px solid #e7e9ee; border-radius: 10px; }
.company-store-logo { width: 31px; height: 31px; display: grid; place-items: center; color: white; background: linear-gradient(135deg,#b324e4,#ef2677); border-radius: 9px; font-size: 10px; font-weight: 900; }
.company-store-ozon .company-store-logo { background: linear-gradient(135deg,#1369ff,#064ee8); }
.company-store-yandex .company-store-logo { color: #171d2a; background: linear-gradient(135deg,#ffd21c,#ffad1c); }
.company-store-card div { min-width: 0; }
.company-store-card div > span,.company-store-card strong,.company-store-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-store-card div > span { margin-bottom: 3px; color: #8c94a3; font-size: 9px; font-weight: 750; }
.company-store-card strong { font-size: 11px; }
.company-store-card small { margin-top: 3px; color: #929aaa; font-size: 9px; }
.company-store-card > i { color: var(--green); font-size: 9px; font-style: normal; font-weight: 800; }
.company-stores-empty { padding: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.company-stores-empty > span { width: 31px; height: 31px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; font-size: 14px; }
.company-stores-empty strong,.company-stores-empty small { display: block; }
.company-stores-empty strong { font-size: 9px; }
.company-stores-empty small { margin-top: 3px; color: #8b93a2; font-size: 7px; }
@keyframes stores-panel-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.icon-button.company-delete { color: var(--red); }
.icon-button.company-delete:hover { background: var(--red-soft); border-color: #ffd2da; }
.tariff-company-groups { padding: 14px; display: grid; gap: 12px; background: #f8f9fc; }
.tariff-company-group { overflow: hidden; background: white; border: 1px solid #e7e9ef; border-radius: 13px; }
.tariff-company-head { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eceef3; }
.tariff-company-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.tariff-company-badges span { padding: 6px 8px; color: #677084; background: #f4f5f8; border-radius: 7px; font-size: 8px; font-weight: 700; }
.company-request-list { display: grid; }
.tariff-request-item { padding: 14px 15px; display: grid; grid-template-columns: minmax(190px, 1.25fr) minmax(180px, 1fr) minmax(120px, .7fr) minmax(120px, .75fr) auto; grid-template-areas: "expansion offer total decision actions"; align-items: center; gap: 14px; border-bottom: 1px solid #eff1f5; }
.tariff-request-item:last-child { border-bottom: 0; }
.request-expansion { grid-area: expansion; }
.request-expansion > span { display: inline-block; margin-bottom: 5px; padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 8px; font-weight: 750; }
.request-expansion strong,.request-expansion small { display: block; }
.request-expansion strong { font-size: 11px; }
.request-expansion small { margin-top: 5px; color: #8a92a2; font-size: 8px; line-height: 1.45; }
.request-offer { grid-area: offer; }
.request-offer > small { display: block; margin-bottom: 4px; color: #737c8c; font-size: 8px; }
.request-discount-form { margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.request-discount-form label { display: flex; align-items: center; gap: 6px; color: #747d8d; font-size: 8px; font-weight: 700; }
.request-discount-form label > span { width: 59px; height: 29px; display: flex; align-items: center; overflow: hidden; background: #fafbfc; border: 1px solid #e0e3e9; border-radius: 7px; }
.request-discount-form input { min-width: 0; width: 100%; height: 100%; padding-left: 7px; background: transparent; border: 0; outline: 0; font-size: 9px; font-weight: 750; }
.request-discount-form b { padding-right: 7px; color: #828a99; font-size: 8px; }
.request-discount-form .icon-button { width: 29px; height: 29px; color: var(--primary); }
.request-discount-value { display: inline-block; margin-top: 5px; padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 8px; font-weight: 750; }
.request-total { grid-area: total; }
.request-total small,.request-total strong,.request-total del { display: block; }
.request-total small { margin-bottom: 5px; color: #8a92a2; font-size: 8px; }
.request-total strong { color: var(--primary); font-size: 14px; }
.request-total strong.price-missing { color: #aa671b; font-size: 10px; }
.request-total del { margin-top: 4px; color: #9aa1ae; font-size: 8px; }
.request-decision { grid-area: decision; }
.request-decision small { display: block; margin-top: 5px; color: #8a92a2; font-size: 8px; }
.request-actions { grid-area: actions; display: grid; justify-items: stretch; gap: 5px; }
.request-actions form { margin: 0; }
.request-actions .button { width: 100%; min-height: 31px; padding: 0 10px; font-size: 8px; }
.request-actions > span { color: #8a92a2; font-size: 8px; }
.expansion-history-panel { margin-bottom: 20px; }
.history-count { padding: 7px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 10px; font-weight: 750; }
.history-expansion strong,.history-expansion small,.history-price strong,.history-price small,.history-action small { display: block; }
.history-expansion small,.history-price small,.history-action small { margin-top: 4px; color: #8a92a2; font-size: 9px; }
.history-price strong { color: var(--primary); }
.history-action small { line-height: 1.4; }
.company-danger-zone { margin-top: 20px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff8f9; border: 1px solid #f3d9de; border-radius: 13px; }
.company-danger-zone strong { display: block; margin-bottom: 4px; color: #9d3346; font-size: 10px; }
.company-danger-zone p { margin: 0; color: #8b7278; font-size: 10px; line-height: 1.5; }
.delete-company-modal-card { width: min(100%, 560px); }
.delete-company-form { display: grid; gap: 14px; }
.delete-warning { padding: 13px; display: grid; gap: 4px; color: #9d3346; background: var(--red-soft); border: 1px solid #ffd9df; border-radius: 10px; }
.delete-warning strong { font-size: 10px; }
.delete-warning span { color: #936875; font-size: 9px; line-height: 1.5; }
.eyebrow.danger { color: var(--red); }
.eyebrow.danger > span { background: var(--red); }
.tariff-row-actions { gap: 7px; }
.tariff-row-actions .button { min-height: 32px; padding: 0 11px; font-size: 9px; }
.empty-state-compact { padding: 36px 20px; }
.empty-state-compact .empty-icon { width: 43px; height: 43px; margin-bottom: 11px; }
@keyframes store-form-in { from { opacity: 0; transform: translateY(-6px); } }

@media (max-width: 1050px) {
    .marketplace-settings-grid { grid-template-columns: 1fr 1fr; }
    .marketplace-yandex { grid-column: 1 / -1; }
    .pricing-form { grid-template-columns: 1fr; }
    .pricing-form-footer { grid-column: auto; }
    .tariff-request-item { grid-template-columns: 1fr 1fr auto; grid-template-areas: "expansion expansion total" "offer decision actions"; }
}
@media (min-width: 761px) and (max-width: 1000px) {
    .stat-grid-admin { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .settings-summary { align-items: flex-start; flex-direction: column; }
    .tariff-card { grid-template-columns: 1fr; }
    .tariff-usage { width: 100%; }
    .tariff-usage > span { flex: 1; }
    .marketplace-settings-grid { grid-template-columns: 1fr; }
    .marketplace-yandex { grid-column: auto; }
    .marketplace-card-head { padding: 17px; }
    .settings-locked { padding: 38px 22px; }
    .pricing-form { padding: 15px; }
    .pricing-form-footer { align-items: stretch; flex-direction: column; }
    .pricing-form-footer .button { width: 100%; }
    .tariff-panel-meta { justify-content: flex-start; }
    .tariff-company-head { align-items: flex-start; flex-direction: column; }
    .tariff-company-badges { justify-content: flex-start; }
    .tariff-request-item { grid-template-columns: 1fr; grid-template-areas: "expansion" "offer" "total" "decision" "actions"; align-items: stretch; }
    .request-actions { grid-template-columns: 1fr 1fr; }
    .expansion-history-panel .table-scroll { overflow: visible; }
    .expansion-history-table,.expansion-history-table tbody,.expansion-history-table tr,.expansion-history-table td { display: block; width: 100%; white-space: normal; }
    .expansion-history-table thead { display: none; }
    .expansion-history-table tbody { padding: 4px 14px 14px; }
    .expansion-history-table tr { padding: 10px 0; border-bottom: 1px solid #edf0f4; }
    .expansion-history-table tr:last-child { border-bottom: 0; }
    .expansion-history-table td { padding: 6px 0; border: 0; }
    .expansion-history-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .companies-table,.companies-table tbody,.companies-table tr,.companies-table td { display: block; width: 100%; white-space: normal; }
    .companies-table thead { display: none; }
    .companies-table tbody { padding: 4px 14px 14px; }
    .companies-table tr { padding: 10px 0; border-bottom: 1px solid #edf0f4; }
    .companies-table tr:last-child { border-bottom: 0; }
    .companies-table td { padding: 7px 0; border: 0; text-align: left !important; }
    .companies-table td::before { content: attr(data-label); display: block; margin-bottom: 5px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .companies-table .row-actions { justify-content: flex-start; }
    .company-danger-zone { align-items: stretch; flex-direction: column; }
    .company-danger-zone .button { width: 100%; }
}

/* Reviews: compact combined WB/Ozon feed with aligned dependent filters. */
.feedback-filter-form {
    margin-bottom: 10px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns:
        minmax(125px,.7fr)
        minmax(160px,.9fr)
        minmax(125px,.68fr)
        minmax(125px,.68fr)
        minmax(110px,.58fr)
        minmax(210px,1.25fr)
        minmax(150px,.82fr)
        auto;
    align-items: end;
    gap: 7px;
}
.feedback-filter-form > * { min-width: 0; }
.feedback-filter-form label > span {
    min-height: 16px;
    margin: 0 0 5px;
    display: flex;
    align-items: flex-end;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 750;
    line-height: 1.3;
}
.feedback-filter-form input,
.feedback-filter-form select {
    width: 100%;
    height: var(--control-height);
    min-height: var(--control-height);
    padding: 0 11px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    outline: none;
    font: inherit;
}
.feedback-filter-actions { display: flex; align-items: center; gap: 6px; }
.feedback-filter-actions .button { min-height: var(--control-height); }
.marketplace-access-note {
    margin: 0 0 12px;
    padding: 11px 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #33436d;
    background: color-mix(in srgb, #1769ff 7%, var(--surface));
    border: 1px solid color-mix(in srgb, #1769ff 24%, var(--border));
    border-radius: 12px;
}
.marketplace-access-note > span {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #1769ff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}
.marketplace-access-note > div { min-width: 0; }
.marketplace-access-note strong { display: block; font-size: 11px; line-height: 1.35; }
.marketplace-access-note p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.marketplace-access-note a { color: #1769ff; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.marketplace-access-note-compact { margin: 0; padding: 9px 10px; }
html[data-theme="dark"] .marketplace-access-note {
    color: #dbe6ff;
    background: color-mix(in srgb, #1769ff 14%, var(--surface));
    border-color: color-mix(in srgb, #5591ff 32%, var(--border));
}
html[data-theme="dark"] .marketplace-access-note a { color: #8bb2ff; }
.feedback-summary {
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 7px;
}
.feedback-summary article {
    min-width: 0;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.feedback-summary article > span,
.feedback-summary small { display: block; color: var(--muted); font-size: 9px; }
.feedback-summary strong { margin: 3px 0 2px; display: block; font-size: 18px; line-height: 1.1; }
.feedback-stars { color: #f3a712; letter-spacing: 1px; }
.feedback-rating-distribution {
    margin-bottom: 8px;
    padding: 9px 12px;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
}
.feedback-rating-distribution > div {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto minmax(45px,1fr) auto;
    align-items: center;
    gap: 6px;
    font-size: 9px;
}
.feedback-rating-distribution i {
    height: 5px;
    overflow: hidden;
    background: var(--soft);
    border-radius: 999px;
}
.feedback-rating-distribution em {
    height: 100%;
    display: block;
    background: linear-gradient(90deg,#f4b52d,#f28628);
    border-radius: inherit;
}
.feedback-chart { margin-bottom: 9px; overflow: visible; }
.feedback-chart > header {
    min-height: 45px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}
.feedback-chart > header strong,
.feedback-chart > header small { display: block; }
.feedback-chart > header strong { font-size: 12px; }
.feedback-chart > header small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.feedback-chart-legend { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px 10px; }
.feedback-chart-legend span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.feedback-chart-legend i { width: 14px; height: 3px; background: var(--series-color); border-radius: 999px; }
.feedback-chart-stage { position: relative; height: 250px; padding: 7px 8px 2px; }
.feedback-chart-stage canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.feedback-chart-tooltip { position: absolute; z-index: 3; min-width: 190px; padding: 9px 10px; color: #fff; background: #171c2a; border-radius: 9px; box-shadow: 0 12px 28px rgba(10,16,32,.28); transform: translateX(-50%); pointer-events: none; }
.feedback-chart-tooltip strong { display: block; margin-bottom: 5px; font-size: 10px; }
.feedback-chart-tooltip span { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 6px; margin-top: 3px; color: #c8d0de; font-size: 9px; }
.feedback-chart-tooltip span i { width: 7px; height: 7px; border-radius: 50%; }
.feedback-chart-tooltip span b { color: #fff; font-size: 9px; }
.feedback-list { display: grid; gap: 7px; }
.feedback-card {
    padding: 0;
    display: grid;
    grid-template-columns: 66px minmax(0,1fr);
    overflow: hidden;
}
.feedback-score {
    padding: 12px 8px;
    display: grid;
    place-content: center;
    align-content: start;
    color: #946100;
    background: linear-gradient(160deg,rgba(250,189,52,.18),rgba(250,189,52,.05));
    border-right: 1px solid var(--line);
    text-align: center;
}
.feedback-score strong { font-size: 21px; line-height: 1; }
.feedback-score span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.feedback-card-body { min-width: 0; padding: 10px 12px; }
.feedback-card-body > header,
.feedback-card-body > header > div,
.feedback-product {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.feedback-card-body > header > div { justify-content: flex-start; }
.feedback-card-body > header time { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.marketplace-pill {
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 850;
}
.marketplace-pill-wildberries { color: #a21caf; background: rgba(217,70,239,.12); }
.marketplace-pill-ozon { color: #275ee7; background: rgba(45,103,255,.12); }
.feedback-product { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.feedback-product > div { min-width: 0; }
.feedback-product strong,
.feedback-product small { display: block; overflow-wrap: anywhere; }
.feedback-product strong { font-size: 11px; }
.feedback-product small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.feedback-product a { flex: 0 0 auto; color: var(--primary); font-size: 9px; font-weight: 800; }
.feedback-main-text { margin: 7px 0 0; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.feedback-muted { color: var(--muted); font-style: italic; }
.feedback-details { margin-top: 7px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.feedback-details > div { min-width: 0; padding: 9px 10px; border-radius: 8px; }
.feedback-details span { display: block; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.feedback-details p { margin: 4px 0 0; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.feedback-pros { color: #167a58; background: rgba(24,166,111,.09); }
.feedback-cons { color: #b33e4e; background: rgba(224,82,96,.09); }
.feedback-answer { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
.feedback-answer summary { color: var(--primary); cursor: pointer; font-size: 9px; font-weight: 800; }
.feedback-answer p { margin: 7px 0 0; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
html[data-theme="dark"] .feedback-score { color: #ffd56f; background: linear-gradient(160deg,rgba(250,189,52,.15),rgba(250,189,52,.03)); }
html[data-theme="dark"] .marketplace-pill-wildberries { color: #f0a4f7; }
html[data-theme="dark"] .marketplace-pill-ozon { color: #9fbbff; }
html[data-theme="dark"] .feedback-pros { color: #79d9b8; }
html[data-theme="dark"] .feedback-cons { color: #ff9ba5; }

@media (max-width: 1450px) {
    .feedback-filter-form { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .feedback-filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .feedback-search { grid-column: span 2; }
    .feedback-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .feedback-rating-distribution { grid-template-columns: 1fr; gap: 7px; }
    .feedback-chart > header { align-items: flex-start; flex-direction: column; }
    .feedback-chart-legend { justify-content: flex-start; }
}
@media (max-width: 620px) {
    .feedback-filter-form,
    .feedback-summary,
    .feedback-details { grid-template-columns: 1fr; }
    .feedback-search { grid-column: auto; }
    .feedback-filter-actions .button { flex: 1; }
    .feedback-card { grid-template-columns: 58px minmax(0,1fr); }
    .feedback-card-body > header,
    .feedback-product { align-items: flex-start; flex-direction: column; }
    .feedback-card-body > header time,
    .feedback-product a { flex: none; }
}

/* Unified workspace controls, typography and theme surfaces. */
:is(.button,.icon-button,.theme-toggle,.nav-toggle,.add-store-button,.company-stores-toggle,.store-form-heading > button):focus-visible,
:is(input,select,textarea,summary,a):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 32%, transparent);
    outline-offset: 2px;
}

.company-section-link strong { font-size: 11px; }
.company-section-link small { font-size: 9px; }

.table-filter input,
.stocks-slice-form select,
.stocks-filter-form input,
.stocks-filter-form select,
.dynamics-filter-form input[type="search"],
.dynamics-filter-form select,
.warehouse-picker summary,
.product-filter-form select,
.product-filter-form input,
.orders-filter-form select,
.orders-filter-form input,
.feed-form-field input,
.feed-form-field select,
.trial-form input,
.first-payment-form input,
.manual-payment-form input,
.manual-payment-form select,
.refund-form input,
.refund-form select,
.billing-date-form input {
    height: 40px;
}

.stocks-filter-form label > span,
.dynamics-filter-form label > span,
.dynamics-mode > span,
.product-filter-form label > span,
.orders-filter-form label > span,
.feed-form-field > span,
.trial-form label span,
.first-payment-form label span,
.manual-payment-form label > span,
.refund-form label > span,
.billing-date-form label span {
    font-size: 9px;
    line-height: 1.25;
}

.stocks-filter-form input,
.stocks-filter-form select,
.dynamics-filter-form input[type="search"],
.dynamics-filter-form select,
.product-filter-form select,
.product-filter-form input,
.orders-filter-form select,
.orders-filter-form input,
.feed-form-field input,
.feed-form-field select {
    font-size: 10px;
}

.add-store-button,
.store-form-actions .button,
.request-actions .button,
.tariff-row-actions .button,
.company-payments-link {
    min-height: 38px;
    font-size: 10px;
}

:is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0;
    display: inline-grid;
    place-content: center;
    color: white;
    background: var(--surface);
    border: 1.5px solid #bbc3d0;
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
}
:is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 5px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform .12s ease;
}
:is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
:is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"]:checked::before {
    transform: translateY(-1px) rotate(-45deg) scale(1);
}
:is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"]:disabled {
    opacity: .52;
    cursor: not-allowed;
}

.stock-value-toggle {
    min-height: 40px;
    padding: 5px 10px;
}
.stock-value-toggle b { font-size: 10px; white-space: normal; }
.stock-value-toggle small { font-size: 8px; }
.stocks-filter-actions { min-height: 40px; }
.stocks-filter-actions .button { min-height: 40px; }
.dynamics-mode b { min-height: 40px; font-size: 10px; }
.warehouse-picker span { font-size: 10px; }
.scheduler-weekdays legend,.scheduler-weekdays span { font-size: 9px; }
.feed-toggle b { color: var(--muted); font-size: 10px; }
.feed-form-field > small,.scheduler-next small,.scheduler-next span { font-size: 8px; }
.scheduler-next strong { font-size: 10px; }
.integration-summary > article > span,
.orders-stats span,
.product-stat-row span { font-size: 9px; }
.integration-summary > article > small,
.orders-stats small,
.product-stat-row small { font-size: 8px; }
.products-storage-card p { color: var(--muted); font-size: 9px; }
.tariff-usage small { font-size: 9px; }

.product-section-tabs { scrollbar-width: none; }
.product-section-tabs::-webkit-scrollbar { display: none; }

html[data-theme="dark"] .products-storage-card,
html[data-theme="dark"] .admin-order-storage {
    color: var(--ink);
    background: linear-gradient(115deg, var(--surface) 0%, #151e2c 100%);
    border-color: var(--line);
}
html[data-theme="dark"] .products-storage-card p,
html[data-theme="dark"] .admin-order-storage > div > span,
html[data-theme="dark"] .admin-order-storage > div > small { color: var(--muted); }

html[data-theme="dark"] .tariff-usage > span,
html[data-theme="dark"] .first-store-gate,
html[data-theme="dark"] .store-add-form,
html[data-theme="dark"] .company-stores-row > td,
html[data-theme="dark"] .tariff-company-groups,
html[data-theme="dark"] .scheduler-weekdays span,
html[data-theme="dark"] .product-file-drop,
html[data-theme="dark"] .charge-units > span,
html[data-theme="dark"] .payment-ledger-list,
html[data-theme="dark"] .ledger-breakdown,
html[data-theme="dark"] .input-with-suffix,
html[data-theme="dark"] .billing-notification-list,
html[data-theme="dark"] .admin-billing-companies,
html[data-theme="dark"] .orders-filter-shell {
    color: var(--ink);
    background: #111a27;
    border-color: var(--line);
}

@media (max-width: 720px) {
    .first-store-gate { grid-template-columns: auto minmax(0,1fr); padding: 15px; }
    .first-store-gate-state { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
}

html[data-theme="dark"] .stock-value-toggle,
html[data-theme="dark"] .scheduler-store-list label,
html[data-theme="dark"] .stocks-source-switches > label,
html[data-theme="dark"] .wb-source-list > div {
    color: var(--ink);
    background: #141e2c;
    border-color: var(--line);
}

html[data-theme="dark"] :is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"] {
    background: #0e1622;
    border-color: #607088;
}
html[data-theme="dark"] :is(.check-field,.scheduler-store-list,.parallel-option,.stocks-source-switches,.warehouse-picker,.stock-value-toggle) input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

html[data-theme="dark"] .marketplace-wb { --market-soft: rgba(192,43,212,.14); }
html[data-theme="dark"] .marketplace-ozon { --market-soft: rgba(23,105,255,.15); }
html[data-theme="dark"] .marketplace-yandex { --market-soft: rgba(239,181,31,.15); }
html[data-theme="dark"] .marketplace-card-head,
html[data-theme="dark"] .connected-store,
html[data-theme="dark"] .first-payment-form,
html[data-theme="dark"] .admin-payment-history,
html[data-theme="dark"] .feed-run-block,
html[data-theme="dark"] .feed-log-row,
html[data-theme="dark"] .scheduler-actions {
    border-color: var(--line);
}
html[data-theme="dark"] .settings-security-note,
html[data-theme="dark"] .store-price-quote {
    color: #c2c8ff;
    background: #202547;
    border-color: #3e4673;
}
html[data-theme="dark"] .store-price-quote.free { color: #71dcb8; background: #16372f; border-color: #285b4c; }
html[data-theme="dark"] .store-price-quote.unavailable { color: #ff9caf; background: #3c2029; border-color: #62313e; }
html[data-theme="dark"] .add-store-button-upgrade { color: #ffd080; background: #3d301d; border-color: #66502b; }
html[data-theme="dark"] .add-store-button-pending,
html[data-theme="dark"] .add-store-button:disabled { color: #9ba6b8; background: #242f40; border-color: #344157; }
html[data-theme="dark"] .scheduler-state-off,
html[data-theme="dark"] .product-status,
html[data-theme="dark"] .payment-status-cancelled,
html[data-theme="dark"] .trial-state-finished { color: #b4bfce; background: #263247; }
html[data-theme="dark"] .market-track,
html[data-theme="dark"] .trial-timeline { background: #263247; }

@media (max-width: 600px) {
    .stock-value-toggle { width: 100%; }
    .stock-value-toggle > span { flex: 1; }
    .stocks-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .stocks-filter-actions .button { width: 100%; }
    html[data-theme="dark"] :is(.stocks-table,.products-table,.orders-table,.companies-table) tr { border-color: var(--line); }
}

/* Company module access */
.company-approval-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.company-approval-form > label {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}
.company-approval-form input {
    width: 40px;
    min-height: 26px;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: center;
    font: inherit;
}
.module-control-form {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.module-control-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}
.module-control-legend div,
.module-control-main > div {
    display: grid;
    gap: 3px;
}
.module-control-legend strong,
.module-control-main strong {
    color: var(--ink);
    font-size: 13px;
}
.module-control-legend span,
.module-control-main p,
.module-control-main small {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}
.module-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}
.module-control-card {
    min-width: 0;
    display: grid;
    gap: 18px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    transition: border-color .2s ease, opacity .2s ease, transform .2s ease;
}
.module-control-card:hover { transform: translateY(-1px); }
.module-control-card.is-blocked { border-color: color-mix(in srgb, var(--orange) 48%, var(--line)); }
.module-control-card.is-disabled { opacity: .58; }
.module-control-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.module-control-icon,
.module-status-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--purple-soft);
    color: var(--primary);
    font-size: 16px;
    font-weight: 850;
}
.module-control-switches {
    display: grid;
    gap: 8px;
}
.module-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 12px;
    background: var(--surface-soft);
    cursor: pointer;
}
.module-switch-row > span {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
}
.module-switch-row strong { color: var(--ink); font-size: 11px; }
.module-switch-row small { color: var(--muted); font-size: 9px; }
.module-switch-row input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
}
.module-switch-row > i {
    position: relative;
    width: 34px;
    height: 20px;
    flex: 0 0 auto;
    border-radius: 99px;
    background: var(--line-strong);
    transition: background .2s ease;
}
.module-switch-row > i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 25%);
    transition: transform .2s ease;
}
.module-switch-row input:checked + i { background: var(--primary); }
.module-switch-row input:checked + i::after { transform: translateX(14px); }
.module-switch-row input:disabled + i { opacity: .45; }
.module-block-switch input:checked + i { background: var(--orange); }
.module-control-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 22px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
}
.module-control-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.company-section-link.is-locked { position: relative; }
.company-section-link.is-locked::after {
    content: '🔒';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 10px;
}

.company-section-link.is-locked {
    cursor: not-allowed;
    opacity: .72;
}
.company-section-link.is-locked:hover { color: var(--muted); background: transparent; }
.company-preparing-workspace {
    min-height: calc(100vh - 76px);
    padding-block: 24px;
    display: grid;
    place-items: center;
}
.company-preparing-workspace > .container {
    display: grid;
    place-items: center;
}
.company-preparing-card {
    width: min(720px,100%);
    margin-inline: auto;
    padding: clamp(28px,5vw,54px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.company-preparing-visual {
    position: relative;
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
}
.company-preparing-visual > span {
    position: absolute;
    inset: 0;
    border: 1px solid color-mix(in srgb,var(--primary) 28%,transparent);
    border-radius: 50%;
    animation: preparation-pulse 2.4s ease-out infinite;
}
.company-preparing-visual > span:nth-child(2) { animation-delay: .8s; }
.company-preparing-visual > span:nth-child(3) { animation-delay: 1.6s; }
.company-preparing-visual > i {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg,var(--primary),#7c3aed);
    border-radius: 17px;
    box-shadow: 0 14px 30px color-mix(in srgb,var(--primary) 30%,transparent);
    font-size: 25px;
    font-style: normal;
    font-weight: 900;
}
.company-preparing-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.company-preparing-status i {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--primary-soft);
}
.company-preparing-card h1 { margin: 12px 0 11px; color: var(--ink); font-size: clamp(27px,4vw,42px); line-height: 1.1; }
.company-preparing-card > p { max-width: 590px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.company-preparing-progress {
    width: min(420px,100%);
    height: 7px;
    margin: 24px 0 16px;
    overflow: hidden;
    background: var(--soft);
    border-radius: 999px;
}
.company-preparing-progress i {
    width: 42%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg,var(--primary),#8b5cf6,var(--primary));
    background-size: 200% 100%;
    border-radius: inherit;
    animation: preparation-progress 1.6s linear infinite;
}
.company-preparing-timer span,.company-preparing-timer strong,.company-preparing-timer small { display: block; }
.company-preparing-timer span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.company-preparing-timer strong { margin-top: 5px; color: var(--ink); font-size: 24px; font-variant-numeric: tabular-nums; }
.company-preparing-timer small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.company-preparing-timer.is-processing strong { font-size: 15px; }
.company-preparing-note {
    max-width: 520px;
    margin-top: 22px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    background: var(--primary-soft);
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.45;
}
.company-preparing-note i { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border-radius: 6px; font-style: normal; font-weight: 900; }
.company-preparing-sections { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 22px; text-align: left; }
.company-preparing-section { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr) 14px; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-soft); text-decoration: none; }
.company-preparing-section strong { display: block; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.company-preparing-section small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.company-preparing-section-icon { text-align: center; font-size: 14px; }
.company-preparing-section.is-ready, .company-preparing-section.is-partial { border-color: color-mix(in srgb,var(--green) 45%,var(--line)); }
.company-preparing-section.is-ready .company-preparing-section-icon, .company-preparing-section.is-partial .company-preparing-section-icon { color: var(--green); }
.company-preparing-page .company-preparing-section[aria-disabled="true"] { cursor: wait; opacity: 1; }
.company-preparing-section.is-error small { color: var(--orange); }
.company-preparing-banner { display: block; margin: 10px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .company-preparing-sections { grid-template-columns: minmax(0,1fr); } }
@keyframes preparation-pulse { 0% { transform: scale(.58); opacity: .9; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes preparation-progress { from { transform: translateX(-110%); background-position: 0 0; } to { transform: translateX(350%); background-position: 200% 0; } }
@media (max-width: 650px) {
    .company-preparing-card { padding: 28px 18px; border-radius: 18px; }
    .company-preparing-card h1 br { display: none; }
}
.module-status-page .container { display: grid; place-items: center; min-height: 68vh; }
.module-status-card {
    width: min(680px, 100%);
    display: grid;
    justify-items: center;
    gap: 13px;
    padding: clamp(32px, 6vw, 64px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}
.module-status-card .module-status-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 22px; }
.module-status-card h1 { margin: 5px 0 0; color: var(--ink); font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
.module-status-card p { max-width: 540px; margin: 0; color: var(--muted); line-height: 1.65; }
.module-status-card > small { color: var(--muted); font-size: 11px; }
@media (max-width: 1050px) { .module-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .module-control-grid,
    .module-control-legend { grid-template-columns: 1fr; }
    .module-control-footer { align-items: stretch; flex-direction: column; }
    .module-control-footer .button { width: 100%; }
}
.billing-alert-stack {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}
.billing-alert-stack .billing-alert { margin: 0; }
.payment-line-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.payment-line-list > span {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
}
.payment-line-list strong { color: var(--ink); font-size: 11px; }
.payment-line-list small { color: var(--muted); font-size: 10px; line-height: 1.4; }

/* Compact global module management */
.admin-modules-total {
    min-width: 92px;
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}
.admin-modules-total strong { color: var(--primary); font-size: 20px; line-height: 1; }
.module-compact-legend {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    color: var(--muted);
    font-size: 10px;
}
.module-compact-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.module-compact-legend > small { margin-left: auto; color: var(--muted); line-height: 1.4; }
.module-compact-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-module-enabled { background: var(--primary); }
.legend-module-blocked { background: var(--orange); }
.admin-module-companies { display: grid; gap: 11px; }
.admin-module-company {
    scroll-margin-top: 90px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.admin-module-company > header,
.admin-module-company > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 14px;
}
.admin-module-company > header { border-bottom: 1px solid var(--line); }
.admin-module-company > footer { border-top: 1px solid var(--line); background: var(--surface-soft); }
.admin-module-company > footer > span { color: var(--muted); font-size: 9px; }
.admin-module-company-summary { display: flex; align-items: center; gap: 8px; }
.admin-module-company-summary > span:not(.status) {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 9px;
    font-weight: 750;
}
.admin-module-company-summary > span.has-blocked { background: var(--orange-soft); color: var(--orange); }
.admin-module-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
}
.admin-module-compact {
    min-width: 0;
    min-height: 52px;
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
    transition: opacity .18s ease, border-color .18s ease, background .18s ease;
}
.admin-module-compact.is-disabled { opacity: .48; }
.admin-module-compact.is-blocked { border-color: color-mix(in srgb, var(--orange) 52%, var(--line)); background: color-mix(in srgb, var(--orange-soft) 42%, var(--surface)); }
.admin-module-compact-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--purple-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
}
.admin-module-compact-copy { min-width: 0; display: grid; gap: 1px; }
.admin-module-compact-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-module-compact-copy small { color: var(--muted); font-size: 8px; }
.admin-module-compact-switches { display: flex; align-items: center; gap: 5px; }
.admin-module-compact-switches label { position: relative; display: block; cursor: pointer; }
.admin-module-compact-switches input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.admin-module-compact-switches i {
    position: relative;
    width: 26px;
    height: 16px;
    display: block;
    border-radius: 99px;
    background: var(--line-strong);
    transition: background .18s ease;
}
.admin-module-compact-switches i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 24%);
    transition: transform .18s ease;
}
.admin-module-compact-switches input:checked + i { background: var(--primary); }
.admin-module-compact-switches .compact-block-switch input:checked + i { background: var(--orange); }
.admin-module-compact-switches input:checked + i::after { transform: translateX(10px); }
.admin-module-compact-switches input:disabled + i { opacity: .35; cursor: default; }

/* Manual payment for an automatically calculated period */
.period-payment-form {
    display: grid;
    grid-template-columns: minmax(190px, 1.4fr) minmax(130px, .7fr) minmax(135px, .7fr);
    gap: 9px;
}
.period-payment-form label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 750; }
.period-payment-form input,
.period-payment-form select,
.period-payment-form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--ink);
    font: inherit;
}
.period-payment-form textarea { min-height: 58px; resize: vertical; }
.period-payment-comment { grid-column: 1 / -1; }
.period-payment-preview {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--primary-soft);
}
.period-payment-preview span,
.period-payment-preview small { color: var(--muted); font-size: 8px; }
.period-payment-preview strong { overflow: hidden; color: var(--primary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.period-payment-form > .button { align-self: stretch; min-height: 42px; }
@media (max-width: 1050px) {
    .admin-module-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .period-payment-form { grid-template-columns: 1fr 1fr; }
    .period-payment-period,.period-payment-comment { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .module-compact-legend { align-items: flex-start; flex-wrap: wrap; }
    .module-compact-legend > small { width: 100%; margin-left: 0; }
    .admin-module-company > header { align-items: flex-start; flex-direction: column; }
    .admin-module-company-summary { width: 100%; flex-wrap: wrap; }
    .admin-module-compact-grid { grid-template-columns: 1fr; }
    .admin-module-company > footer { align-items: stretch; flex-direction: column; }
    .admin-module-company > footer .button { width: 100%; }
    .period-payment-form { grid-template-columns: 1fr; }
    .period-payment-period,.period-payment-comment { grid-column: auto; }
}

/* Advertising plans, product insights and embedded campaign keywords */
.advertising-summary-metric { position: relative; overflow: hidden; }
.advertising-summary-metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--metric-color, var(--primary)); border-radius: 0 4px 4px 0; }
.advertising-rate-planned { color: var(--metric-color, var(--primary)); background: color-mix(in srgb, var(--metric-color, var(--primary)) 13%, transparent); }
.advertising-product-trigger { width: 100%; padding: 0; color: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; border-radius: 10px; transition: color .2s, background .2s; }
.advertising-product-trigger:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.advertising-product-open { flex: 0 0 auto; width: 26px; height: 26px; display: grid !important; place-items: center; color: var(--primary) !important; background: var(--primary-soft); border-radius: 8px; opacity: 0; transform: translateX(-5px); transition: opacity .2s, transform .2s; }
.advertising-product-trigger:hover .advertising-product-open,.advertising-product-trigger:focus-visible .advertising-product-open { opacity: 1; transform: translateX(0); }
.advertising-budget-progress { margin: 14px 0 18px; padding: 16px 18px; display: grid; grid-template-columns: minmax(220px,.55fr) minmax(240px,1fr) minmax(220px,.55fr); align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.advertising-budget-progress > div:first-child,.advertising-budget-progress > div:last-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.advertising-budget-progress span { color: var(--muted); font-size: 12px; }
.advertising-budget-progress strong { font-size: 14px; }
.advertising-budget-track { height: 9px; overflow: hidden; background: var(--soft); border-radius: 999px; }
.advertising-budget-track i { display: block; height: 100%; background: linear-gradient(90deg,#5b5cf0,#8b5cf6); border-radius: inherit; box-shadow: 0 0 16px rgba(91,92,240,.3); }

.advertising-plan-state { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 750; }
.advertising-plan-state i { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent); }
.advertising-parameters-form { display: grid; gap: 18px; }
.advertising-parameter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.advertising-range-card,.advertising-budget-card { padding: 0; overflow: hidden; }
.advertising-range-card > header,.advertising-budget-card > header { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.advertising-range-card header > div > span,.advertising-budget-card header > div > span { display: block; margin-bottom: 5px; color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.advertising-range-card h2,.advertising-budget-card h2 { margin: 0; font-size: 18px; }
.advertising-range-card p,.advertising-budget-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.advertising-range-labels,.advertising-parameter-range { display: grid; grid-template-columns: minmax(90px,1fr) minmax(90px,1fr) minmax(132px,.8fr) 34px; gap: 10px; align-items: center; }
.advertising-range-labels { padding: 12px 22px 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.advertising-range-list { padding: 0 22px 20px; display: grid; gap: 9px; }
.advertising-parameter-range input[type="number"],.advertising-budget-item input,.advertising-total-budget input { width: 100%; height: 40px; padding: 0 11px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; outline: 0; transition: border-color .2s,box-shadow .2s,background .2s; }
.advertising-parameter-range input:focus,.advertising-budget-item input:focus,.advertising-total-budget input:focus { background: var(--surface); border-color: color-mix(in srgb,var(--primary) 55%,var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent); }
.advertising-color-field { height: 40px; padding: 5px 9px 5px 6px; display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.advertising-color-field input { width: 29px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.advertising-color-field span { color: var(--muted); font-size: 11px; font-weight: 750; }
.advertising-row-remove { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 20px; cursor: pointer; transition: color .2s,background .2s; }
.advertising-row-remove:hover { color: var(--red); background: var(--red-soft); }
.advertising-total-budget { flex: 0 0 250px; }
.advertising-total-budget > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 750; }
.advertising-total-budget > div { position: relative; }
.advertising-total-budget input { height: 44px; padding-right: 38px; font-weight: 800; }
.advertising-total-budget b { position: absolute; top: 50%; right: 14px; color: var(--muted); transform: translateY(-50%); }
.advertising-budget-toolbar { padding: 15px 22px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.advertising-budget-toolbar strong { font-size: 13px; }
.advertising-budget-labels,.advertising-budget-item { display: grid; grid-template-columns: minmax(220px,1fr) minmax(140px,.35fr) 34px; align-items: center; gap: 10px; }
.advertising-budget-labels { padding: 0 22px 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.advertising-budget-list { padding: 0 22px 20px; display: grid; gap: 9px; }
.advertising-budget-empty { padding: 20px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); border-radius: 10px; text-align: center; font-size: 12px; }
.advertising-parameters-save { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: color-mix(in srgb,var(--surface) 92%,transparent); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 45px rgba(25,32,56,.14); backdrop-filter: blur(16px); }
.advertising-parameters-save strong,.advertising-parameters-save span { display: block; }
.advertising-parameters-save strong { font-size: 13px; }
.advertising-parameters-save span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.advertising-product-dialog { width: min(1180px,calc(100% - 36px)); max-width: none; max-height: min(880px,calc(100vh - 36px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 34px 110px rgba(10,16,32,.32); overflow: hidden; }
.advertising-product-dialog.is-tour-preview[open] { max-height: calc(100vh - 36px); position: fixed; z-index: 1097; inset: 18px; margin: auto; }
.advertising-product-dialog::backdrop { background: rgba(11,17,30,.62); backdrop-filter: blur(7px); }
.advertising-dialog-shell { max-height: min(880px,calc(100vh - 36px)); overflow: auto; }
.advertising-dialog-header { position: sticky; top: 0; z-index: 5; min-height: 82px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: color-mix(in srgb,var(--surface) 94%,transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.advertising-dialog-header form { margin: 0; }
.advertising-dialog-header form button { width: 38px; height: 38px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; font-size: 23px; cursor: pointer; }
.advertising-dialog-product { min-width: 0; display: flex; align-items: center; gap: 12px; }
.advertising-dialog-product img { flex: 0 0 auto; width: 48px; height: 58px; object-fit: cover; background: var(--soft); border-radius: 10px; }
.advertising-dialog-product strong,.advertising-dialog-product span { display: block; }
.advertising-dialog-product strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.advertising-dialog-product span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.advertising-dialog-loading,.advertising-dialog-error { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.advertising-dialog-loading i,.advertising-keyword-loading i { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: button-spin .8s linear infinite; }
.advertising-dialog-error strong { color: var(--ink); }
.advertising-dialog-content { padding: 20px; display: grid; gap: 18px; }
.advertising-chart-card,.advertising-campaign-section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.advertising-chart-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.advertising-chart-head span,.advertising-chart-head strong { display: block; }
.advertising-chart-head span { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.advertising-chart-head strong { font-size: 15px; }
.advertising-chart-metrics { padding: 3px; display: flex; gap: 3px; background: var(--soft); border-radius: 10px; }
.advertising-chart-metrics button { min-height: 32px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 11px; font-weight: 750; cursor: pointer; }
.advertising-chart-metrics button.active { color: var(--primary); background: var(--surface); box-shadow: 0 3px 10px rgba(20,28,50,.07); }
.advertising-chart-wrap { position: relative; min-height: 300px; padding: 10px 12px 0; }
.advertising-chart-wrap > svg { width: 100%; height: auto; min-height: 270px; overflow: visible; }
.advertising-chart-grid { stroke: var(--line); stroke-width: 1; }
.advertising-chart-axis { fill: var(--muted); stroke: none; font: 10px var(--font); }
.advertising-chart-point { stroke: var(--surface); stroke-width: 3; cursor: crosshair; transition: r .15s; }
.advertising-chart-decline { stroke: #e5484d; stroke-width: 4; stroke-linecap: round; }
.advertising-chart-decline-arrow { fill: #e5484d; stroke: var(--surface); stroke-width: 1.5; }
.advertising-chart-point:hover,.advertising-chart-point:focus { r: 7; outline: 0; }
.advertising-chart-tooltip { position: absolute; z-index: 3; min-width: 150px; padding: 10px 12px; color: white; background: #171c2a; border-radius: 10px; box-shadow: 0 12px 30px rgba(10,16,32,.26); transform: translate(-50%,calc(-100% - 12px)); pointer-events: none; }
.advertising-chart-tooltip[data-placement="below"] { transform: translate(-50%,12px); }
.advertising-chart-tooltip strong,.advertising-chart-tooltip span,.advertising-chart-tooltip small { display: block; }
.advertising-chart-tooltip strong { font-size: 11px; }
.advertising-chart-tooltip span { margin-top: 4px; font-size: 12px; font-weight: 800; }
.advertising-chart-tooltip small { margin-top: 3px; color: #aeb7c8; font-size: 9px; }
.advertising-chart-tooltip small.is-decline { color: #ff8d91; font-weight: 800; }

/* Shared advertising charts for Statistics and Overview. */
.advertising-trends { min-width: 0; margin: 16px 0 18px; scroll-margin-top: 92px; }
.advertising-trends-heading { margin-bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.advertising-trends-heading > div { min-width: 0; }
.advertising-trends-heading span,.advertising-trends-heading h2,.advertising-trends-heading p { display: block; }
.advertising-trends-heading > div:first-child > span { color: var(--primary); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.advertising-trends-heading h2 { margin: 4px 0; font-size: 20px; }
.advertising-trends-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.advertising-trends-legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.advertising-trends-legend span { display: inline-flex; align-items: center; gap: 6px; }
.advertising-trends-legend i { width: 18px; height: 3px; background: var(--primary); border-radius: 99px; }
.advertising-trends-legend i.is-decline { background: #e5484d; }
.advertising-trends-grid { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.advertising-trend-card { min-width: 0; overflow: visible; }
.advertising-trend-card > header { min-height: 72px; padding: 12px 14px; display: grid; gap: 9px; border-bottom: 1px solid var(--line); }
.advertising-trend-card > header small,.advertising-trend-card > header strong { display: block; }
.advertising-trend-card > header small { color: var(--muted); font-size: 9px; }
.advertising-trend-card > header strong { margin-top: 3px; font-size: 14px; }
.advertising-trend-metrics { padding: 3px; display: flex; align-items: center; gap: 3px; overflow-x: auto; background: var(--soft); border-radius: 9px; scrollbar-width: thin; }
.advertising-trend-metrics button { min-width: max-content; min-height: 30px; padding: 0 9px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 10px; font-weight: 750; cursor: pointer; }
.advertising-trend-metrics button.active { color: var(--primary); background: var(--surface); box-shadow: 0 3px 9px rgba(20,28,50,.07); }
.advertising-trend-summary { padding: 9px 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; background: color-mix(in srgb,var(--soft) 58%,var(--surface)); border-bottom: 1px solid var(--line); }
.advertising-trend-summary > span { min-width: 0; color: var(--muted); font-size: 8px; }
.advertising-trend-summary strong { margin-top: 3px; display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.advertising-trend-wrap { position: relative; min-height: 250px; padding: 8px 10px 0; }
.advertising-trend-wrap > svg { width: 100%; height: auto; min-height: 230px; overflow: visible; }
.advertising-trend-line { stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }

/* Collapsible plan progress at the top of Overview. */
.dashboard-plan-progress { margin-bottom: 14px; overflow: hidden; }
.dashboard-plan-progress > summary { min-height: 72px; padding: 11px 14px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; list-style: none; cursor: pointer; }
.dashboard-plan-progress > summary::-webkit-details-marker { display: none; }
.dashboard-plan-progress-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 16px; }
.dashboard-plan-progress > summary > span:nth-child(2) { min-width: 0; }
.dashboard-plan-progress > summary small,.dashboard-plan-progress > summary strong,.dashboard-plan-progress > summary em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-plan-progress > summary small { color: var(--primary); font-size: var(--ui-font-indicator-caption,11px); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-plan-progress > summary strong { margin-top: 2px; font-size: var(--ui-font-indicator-title,17px); }
.dashboard-plan-progress > summary em { margin-top: 3px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-style: normal; line-height: 1.4; }
.dashboard-plan-progress-count { padding: 6px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; }
.dashboard-plan-progress-chevron { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border-radius: 8px; font-size: 15px; font-style: normal; transition: transform .2s; }
.dashboard-plan-progress[open] .dashboard-plan-progress-chevron { transform: rotate(180deg); }
.dashboard-plan-progress-body { padding: 11px 14px 13px; border-top: 1px solid var(--line); }
.dashboard-plan-progress-grid { display: grid; gap: 7px; }
.dashboard-plan-progress-grid > article { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(145px,.75fr) minmax(220px,1.2fr) minmax(120px,.55fr) minmax(190px,.85fr); align-items: center; gap: 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.dashboard-plan-person { min-width: 0; display: flex; align-items: center; gap: 8px; }
.dashboard-plan-person > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),#8a62f3); border-radius: 8px; font-size: var(--ui-font-indicator-text,12px); font-weight: 850; }
.dashboard-plan-person strong,.dashboard-plan-person small,.dashboard-plan-metric span,.dashboard-plan-metric strong,.dashboard-plan-metric small,.dashboard-plan-fact span,.dashboard-plan-fact strong,.dashboard-plan-fact small,.dashboard-plan-completion small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-plan-person strong,.dashboard-plan-metric strong,.dashboard-plan-fact strong { font-size: var(--ui-font-indicator-text,12px); }
.dashboard-plan-person small,.dashboard-plan-metric small,.dashboard-plan-fact small,.dashboard-plan-completion small { margin-top: 3px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); line-height: 1.4; }
.dashboard-plan-metric > span,.dashboard-plan-fact > span,.dashboard-plan-completion > div > span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; text-transform: uppercase; }
.dashboard-plan-metric strong,.dashboard-plan-fact strong { margin-top: 4px; }
.dashboard-plan-completion > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dashboard-plan-completion > div strong { font-size: var(--ui-font-indicator-text,12px); }
.dashboard-plan-completion > i { height: 6px; margin-top: 6px; display: block; overflow: hidden; background: var(--surface); border-radius: 99px; }
.dashboard-plan-completion > i b { width: var(--plan-progress); height: 100%; display: block; background: linear-gradient(90deg,var(--primary),var(--green)); border-radius: inherit; }
.dashboard-plan-progress-error,.dashboard-plan-progress-empty { padding: 12px; display: grid; gap: 4px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); border-radius: 9px; font-size: var(--ui-font-indicator-caption,11px); line-height: 1.45; }
.dashboard-plan-progress-error strong,.dashboard-plan-progress-empty strong { color: var(--ink); font-size: var(--ui-font-indicator-text,12px); }
.dashboard-plan-progress-error { margin-bottom: 8px; color: var(--red); background: var(--red-soft); border-style: solid; }
.dashboard-plan-progress-error strong { color: var(--red); }
.dashboard-plan-progress-actions { margin-top: 9px; display: flex; justify-content: flex-end; }

@media (max-width: 1100px) {
    .advertising-trends-grid { grid-template-columns: 1fr; }
    .dashboard-plan-progress-grid > article { grid-template-columns: 1fr 1.2fr .7fr; }
    .dashboard-plan-completion { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .advertising-trends-heading { align-items: flex-start; flex-direction: column; }
    .advertising-trends-legend { white-space: normal; }
    .advertising-trend-summary { grid-template-columns: 1fr 1fr; }
    .advertising-trend-wrap { overflow-x: auto; }
    .advertising-trend-wrap > svg { min-width: 620px; }
    .dashboard-plan-progress > summary { grid-template-columns: auto minmax(0,1fr) auto; }
    .dashboard-plan-progress > summary :is(strong,em) { white-space: normal; }
    .dashboard-plan-progress-count { grid-column: 2; }
    .dashboard-plan-progress-chevron { grid-column: 3; grid-row: 1 / span 2; }
    .dashboard-plan-progress-grid > article { grid-template-columns: 1fr; }
    .dashboard-plan-completion { grid-column: auto; }
    .dashboard-plan-progress-actions .button { width: 100%; }
}
.advertising-chart-empty { min-height: 280px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.advertising-campaign-heading { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.advertising-campaign-heading span,.advertising-campaign-heading strong { display: block; }
.advertising-campaign-heading span { color: var(--muted); font-size: 10px; }
.advertising-campaign-heading strong { margin-top: 3px; font-size: 15px; }
.advertising-campaign-heading > small { color: var(--muted); font-size: 10px; }
.advertising-campaign-list { padding: 12px; display: grid; gap: 9px; }
.advertising-campaign-card { min-height: 76px; padding: 11px 12px; display: grid; grid-template-columns: minmax(190px,.8fr) minmax(420px,1.5fr) auto; align-items: center; gap: 18px; background: var(--soft); border: 1px solid transparent; border-radius: 12px; transition: border-color .2s,background .2s; }
.advertising-campaign-card:hover { background: var(--surface); border-color: var(--line); }
.advertising-campaign-main span,.advertising-campaign-main strong,.advertising-campaign-main small { display: block; }
.advertising-campaign-main span { color: var(--primary); font-size: 9px; font-weight: 850; }
.advertising-campaign-main strong { margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.advertising-campaign-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.advertising-campaign-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.advertising-campaign-kpis > span { padding-left: 10px; border-left: 2px solid var(--line); }
.advertising-campaign-kpis small,.advertising-campaign-kpis strong { display: block; }
.advertising-campaign-kpis small { color: var(--muted); font-size: 9px; }
.advertising-campaign-kpis strong { margin-top: 3px; font-size: 11px; }
.advertising-campaign-kpis .advertising-campaign-rate { border-left-color: var(--metric-color,var(--line)); }
.advertising-campaign-empty { padding: 28px; color: var(--muted); text-align: center; font-size: 12px; }
.advertising-keyword-drawer { margin: 0 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.advertising-keyword-loading { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 11px; }
.advertising-keyword-loading i { width: 18px; height: 18px; }
.advertising-keyword-head { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.advertising-keyword-head span,.advertising-keyword-head strong { display: block; }
.advertising-keyword-head span { color: var(--muted); font-size: 9px; }
.advertising-keyword-head strong { margin-top: 2px; font-size: 12px; }
.advertising-keyword-table { overflow: auto; }
.advertising-keyword-row { min-width: 690px; padding: 10px 14px; display: grid; grid-template-columns: minmax(230px,1.4fr) repeat(5,minmax(78px,.5fr)); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.advertising-keyword-row:last-child { border-bottom: 0; }
.advertising-keyword-row-head { color: var(--muted); background: var(--soft); font-size: 9px; font-weight: 750; }
.advertising-keyword-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html[data-theme="dark"] .advertising-product-dialog { box-shadow: 0 34px 110px rgba(0,0,0,.52); }
html[data-theme="dark"] .advertising-chart-tooltip { background: #050a12; }
html[data-theme="dark"] .advertising-parameters-save { box-shadow: 0 16px 45px rgba(0,0,0,.32); }

@media (max-width: 1000px) {
    .advertising-budget-progress { grid-template-columns: 1fr; gap: 11px; }
    .advertising-campaign-card { grid-template-columns: 1fr auto; }
    .advertising-campaign-kpis { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 800px) {
    .advertising-parameter-grid { grid-template-columns: 1fr; }
    .advertising-range-card > header,.advertising-budget-card > header { align-items: flex-start; }
    .advertising-budget-card > header { flex-direction: column; }
    .advertising-total-budget { width: 100%; flex-basis: auto; }
    .advertising-dialog-content { padding: 12px; }
    .advertising-chart-head { align-items: flex-start; flex-direction: column; }
    .advertising-chart-metrics { width: 100%; overflow-x: auto; }
    .advertising-chart-metrics button { flex: 1 0 auto; }
}
@media (max-width: 600px) {
    .advertising-product-open { display: none !important; }
    .advertising-range-card > header { flex-direction: column; }
    .advertising-range-card > header .button { width: 100%; }
    .advertising-range-labels { display: none; }
    .advertising-range-list { padding-top: 14px; }
    .advertising-parameter-range { grid-template-columns: 1fr 1fr 42px; }
    .advertising-parameter-range .advertising-color-field { grid-column: 1 / 3; }
    .advertising-parameter-range .advertising-row-remove { grid-column: 3; grid-row: 1; }
    .advertising-budget-labels { display: none; }
    .advertising-budget-item { grid-template-columns: 1fr 38px; }
    .advertising-budget-item input[data-budget-amount] { grid-column: 1; }
    .advertising-budget-item .advertising-row-remove { grid-column: 2; grid-row: 1; }
    .advertising-parameters-save { align-items: stretch; flex-direction: column; }
    .advertising-product-dialog { width: calc(100% - 14px); max-height: calc(100vh - 14px); border-radius: 15px; }
    .advertising-dialog-shell { max-height: calc(100vh - 14px); }
    .advertising-dialog-header { min-height: 72px; padding: 10px 12px; }
    .advertising-dialog-product strong { max-width: 220px; }
    .advertising-chart-wrap { min-height: 250px; overflow-x: auto; }
    .advertising-chart-wrap > svg { min-width: 650px; min-height: 235px; }
    .advertising-campaign-heading { align-items: flex-start; flex-direction: column; }
    .advertising-campaign-card { grid-template-columns: 1fr; }
    .advertising-campaign-card > .button { width: 100%; }
    .advertising-campaign-kpis { grid-column: 1; grid-template-columns: repeat(2,1fr); }
}

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.admin-company-filters { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.admin-company-filters .table-filter input { width: min(300px,24vw); }
.admin-company-filters select { width: 180px; height: 38px; padding-left: 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; }
.admin-company-filters .button { min-height: 38px; padding: 0 12px; }
.admin-company-pagination { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); }

.cost-entry-panel { overflow: visible; }

/* Email confirmation and the isolated pre-approval screen. */
.verification-card { width: min(100%,460px); }
.verification-email { display: block; margin-top: 5px; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.verification-field > span:first-child { text-align: center; }
.verification-code-input { height: 58px !important; padding: 0 15px !important; font-size: 25px; font-weight: 850; letter-spacing: .38em; text-align: center; font-variant-numeric: tabular-nums; }
.verification-code-input::placeholder { color: #c4c9d3 !important; letter-spacing: .38em; }
.verification-actions { margin-top: 14px; display: grid; gap: 12px; text-align: center; }
.verification-actions form { margin: 0; }
.verification-restart { padding: 3px; color: var(--primary); background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 750; }
.verification-restart:hover { text-decoration: underline; }
.field-hint { color: var(--muted); font-size: 9px; line-height: 1.4; }
.approval-gate { width: min(100%,640px); margin: 0; }
.approval-gate h1 { margin: 17px 0 9px; font-size: 25px; letter-spacing: -.03em; }
.approval-gate-icon { margin: 0 auto 20px; }
.approval-refresh { margin-top: 28px; }
html[data-theme="dark"] .approval-gate { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .approval-gate .approval-icon { border-color: #3d4268; }
html[data-theme="dark"] .approval-gate .suspended-icon { color: #ffd080; background: #3d301d; border-color: #66502b; }
html[data-theme="dark"] .approval-gate .reject-icon { color: #ff9caf; background: #3c2029; border-color: #62313e; }

@media (max-width: 520px) {
    .verification-code-input { font-size: 22px; letter-spacing: .28em; }
}

/* Paid storage and sales funnel */
.storage-filter-form { grid-template-columns: minmax(220px,1.35fr) repeat(5,minmax(125px,.72fr)) auto; }
.funnel-filter-form { grid-template-columns: minmax(260px,1.5fr) repeat(3,minmax(145px,.8fr)) auto; }
.storage-table { min-width: 1180px; }
.funnel-table { min-width: 1240px; }
.storage-table td:first-child strong,.storage-table td:first-child small,
.funnel-table td:first-child strong,.funnel-table td:first-child small { display: block; }
.storage-table td:first-child small,.funnel-table td:first-child small { margin-top: 4px; color: var(--muted); }
.storage-charge { color: #c36a20; }
.funnel-flow { margin-bottom: 14px; padding: 16px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.funnel-flow > article { min-width: 0; padding: 13px 14px; display: flex; align-items: center; gap: 11px; background: linear-gradient(135deg,var(--primary-soft),rgba(91,92,240,.035)); border: 1px solid rgba(91,92,240,.12); border-radius: 11px; }
.funnel-flow > article > span { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--surface); border: 1px solid rgba(91,92,240,.16); border-radius: 8px; font-size: 10px; font-weight: 850; }
.funnel-flow small,.funnel-flow strong { display: block; }
.funnel-flow small { color: var(--muted); font-size: 8px; }
.funnel-flow strong { margin-top: 4px; color: var(--ink); font-size: 18px; }
.funnel-flow > i { color: #a8afbc; font-size: 15px; font-style: normal; }
.funnel-conversion { padding: 5px 7px; display: inline-flex; color: #554fd1; background: var(--primary-soft); border-radius: 7px; font-size: 10px; font-weight: 800; }
html[data-theme="dark"] .funnel-flow { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .funnel-flow > article { background: linear-gradient(135deg,rgba(91,92,240,.16),rgba(91,92,240,.04)); border-color: rgba(130,131,255,.2); }
html[data-theme="dark"] .funnel-conversion { color: #a6a7ff; background: rgba(91,92,240,.17); }

@media (max-width: 1250px) {
    .storage-filter-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .funnel-filter-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .storage-filter-form .stocks-search,.funnel-filter-form .stocks-search { grid-column: span 2; }
}
@media (max-width: 850px) {
    .funnel-flow { grid-template-columns: 1fr 1fr; }
    .funnel-flow > i { display: none; }
    .storage-filter-form,.funnel-filter-form { grid-template-columns: 1fr 1fr; }
    .storage-filter-form .stocks-search,.funnel-filter-form .stocks-search { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .funnel-flow,.storage-filter-form,.funnel-filter-form { grid-template-columns: 1fr; }
    .storage-filter-form .stocks-search,.funnel-filter-form .stocks-search { grid-column: auto; }
    .storage-table,.storage-table tbody,.storage-table tr,.storage-table td,
    .funnel-table,.funnel-table tbody,.funnel-table tr,.funnel-table td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .storage-table thead,.funnel-table thead { display: none; }
    .storage-table tbody,.funnel-table tbody { padding: 8px 14px; }
    .storage-table tr,.funnel-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .storage-table td,.funnel-table td { padding: 5px 0; border: 0; text-align: left !important; }
}
.cost-product-combobox { position: relative; display: block; }
.cost-product-combobox > input[type="search"] { width: 100%; padding-right: 36px; }
.cost-product-spinner { position: absolute; top: 50%; right: 12px; width: 13px; height: 13px; display: none; border: 2px solid rgba(91,92,240,.2); border-top-color: var(--primary); border-radius: 50%; transform: translateY(-50%); animation: button-spin .7s linear infinite; }
.cost-product-combobox.is-loading .cost-product-spinner { display: block; }
.cost-product-options { position: absolute; z-index: 120; top: calc(100% + 7px); left: 0; right: 0; max-height: 310px; padding: 6px; overflow-y: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); overscroll-behavior: contain; scrollbar-width: thin; }
.cost-product-options > button { width: 100%; min-height: 50px; padding: 8px 9px; display: grid; grid-template-columns: minmax(120px,.7fr) minmax(180px,1.3fr); align-items: center; gap: 10px; color: var(--ink); background: transparent; border: 0; border-radius: 7px; cursor: pointer; text-align: left; }
.cost-product-options > button:hover,.cost-product-options > button.active { background: var(--primary-soft); }
.cost-product-options strong,.cost-product-options small,.cost-product-options em { display: block; }
.cost-product-options strong { font-size: 9px; }
.cost-product-options small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.cost-product-options em { overflow: hidden; color: #606a7c; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.cost-product-empty { min-height: 48px; padding: 10px; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.cost-product-help { margin-top: 5px !important; }
html[data-theme="dark"] .cost-product-options > button:hover,
html[data-theme="dark"] .cost-product-options > button.active { background: rgba(91,92,240,.16); }
html[data-theme="dark"] .cost-product-options em { color: var(--muted); }

@media (max-width: 900px) {
    .admin-company-filters { width: 100%; display: grid; grid-template-columns: 1fr 180px auto auto; }
    .admin-company-filters .table-filter input { width: 100%; }
}
@media (max-width: 650px) {
    .admin-company-filters { grid-template-columns: 1fr 1fr; }
    .admin-company-filters .table-filter { grid-column: 1 / -1; }
    .admin-company-filters select { width: 100%; }
    .admin-company-filters .button { width: 100%; }
    .cost-product-options > button { grid-template-columns: 1fr; gap: 4px; }
}

/* Company team and role-based access management. */
.session-user-chip { max-width: 150px; padding: 7px 10px; overflow: hidden; color: var(--primary); background: var(--primary-soft); border: 1px solid rgba(91,92,240,.16); border-radius: 8px; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.company-team-shortcut { min-height: 70px; margin-bottom: 16px; padding: 13px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; color: var(--ink); background: linear-gradient(115deg,var(--surface),color-mix(in srgb,var(--primary-soft) 52%,var(--surface))); border: 1px solid rgba(91,92,240,.2); border-radius: 12px; box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .2s; }
.company-team-shortcut:hover { transform: translateY(-1px); border-color: rgba(91,92,240,.42); box-shadow: var(--shadow-md); }
.company-team-shortcut-icon { width: 39px; height: 39px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.company-team-shortcut-icon svg { width: 20px; height: 20px; }
.company-team-shortcut strong,.company-team-shortcut small { display: block; }
.company-team-shortcut strong { font-size: 11px; }
.company-team-shortcut small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.company-team-shortcut > b { color: var(--primary); font-size: 10px; white-space: nowrap; }
.access-page-heading { margin-bottom: 18px; }
.access-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.access-stats { margin-bottom: 16px; display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 10px; }
.access-stats article { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.access-stat-icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 13px; font-weight: 900; }
.access-stat-icon.active { color: var(--green); background: var(--green-soft); }
.access-stat-icon.pending { color: #be7a17; background: var(--orange-soft); }
.access-stat-icon.owner { color: #be7a17; background: var(--orange-soft); }
.access-stats small,.access-stats strong,.access-stats em { display: block; }
.access-stats small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.access-stats strong { margin-top: 5px; font-size: 18px; }
.access-stats em { margin-top: 3px; color: var(--muted); font-size: 8px; font-style: normal; }
.team-seat-pricing { margin: 0 20px 4px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; color: var(--ink); background: var(--primary-soft); border: 1px solid color-mix(in srgb,var(--primary) 22%,var(--line)); border-radius: 11px; }
.team-seat-pricing > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--surface); border-radius: 9px; font-size: 13px; font-weight: 900; }
.team-seat-pricing strong,.team-seat-pricing small { display: block; }
.team-seat-pricing strong { font-size: 10px; }
.team-seat-pricing small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.team-seat-pricing.is-free { background: var(--green-soft); border-color: color-mix(in srgb,var(--green) 24%,var(--line)); }
.team-seat-pricing.is-free > span { color: var(--green); }
.team-seat-pricing.is-unavailable { background: var(--orange-soft); border-color: color-mix(in srgb,#be7a17 24%,var(--line)); }
.team-seat-pricing.is-unavailable > span { color: #be7a17; }
.access-owner-card strong { font-size: 12px; }
.access-layout { display: grid; grid-template-columns: minmax(620px,1.12fr) minmax(440px,.88fr); align-items: start; gap: 16px; }
.access-create-panel { margin: 0; overflow: hidden; }
.access-create-panel .panel-head { min-height: 68px; padding: 14px 18px; }
.access-create-panel .panel-head h2 { font-size: 15px; }
.access-limit { padding: 6px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 9px; font-weight: 850; }
.access-form { min-width: 0; }
.access-fields { padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.access-field-wide { grid-column: 1 / -1; }
.access-data-scope { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: color-mix(in srgb,var(--primary-soft) 42%,var(--surface)); border: 1px solid color-mix(in srgb,var(--primary) 20%,var(--line)); border-radius: 10px; }
.access-data-scope > p { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.access-data-scope > p i { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--surface); border-radius: 50%; font-style: normal; font-weight: 850; }
.access-scope-badge { color: var(--primary) !important; background: var(--primary-soft) !important; }
.company-user-filter-locked { color: var(--primary) !important; background-color: var(--primary-soft) !important; border-color: color-mix(in srgb,var(--primary) 40%,var(--line)) !important; cursor: not-allowed !important; }
.access-fieldset { margin: 0; padding: 15px 18px 17px; border: 0; border-top: 1px solid var(--line); }
.access-fieldset > legend { width: 100%; padding: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.access-fieldset > legend span { color: #697386; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.access-fieldset > legend small { color: var(--muted); font-size: 8px; }
.access-permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.access-permission-card { position: relative; min-width: 0; min-height: 61px; padding: 9px 10px; display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.access-permission-card:hover { border-color: rgba(91,92,240,.35); transform: translateY(-1px); }
.access-permission-card:has(input:checked) { background: var(--primary-soft); border-color: rgba(91,92,240,.42); box-shadow: inset 0 0 0 1px rgba(91,92,240,.06); }
.access-permission-card > input { position: absolute; opacity: 0; pointer-events: none; }
.access-permission-card > input:focus-visible + .access-check { outline: 3px solid color-mix(in srgb,var(--primary) 28%,transparent); outline-offset: 2px; }
.access-check { width: 17px; height: 17px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid #c9cfda; border-radius: 5px; }
.access-check::before { width: 8px; height: 5px; content: ""; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) scale(0); transition: transform .15s; }
.access-permission-card > input:checked + .access-check { background: var(--primary); border-color: var(--primary); }
.access-permission-card > input:checked + .access-check::before { transform: rotate(-45deg) scale(1); }
.access-permission-icon { width: 29px; height: 29px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border: 1px solid rgba(91,92,240,.11); border-radius: 8px; font-size: 11px; }
.access-permission-card strong,.access-permission-card small { display: block; }
.access-permission-card strong { font-size: 9px; line-height: 1.25; }
.access-permission-card small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.access-form-actions { min-height: 65px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: color-mix(in srgb,var(--soft) 62%,transparent); border-top: 1px solid var(--line); }
.access-form-actions p { max-width: 430px; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.access-form-actions p > span { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-weight: 850; }
.access-form-actions .button { flex: 0 0 auto; }
.access-users-section { min-width: 0; }
.access-list-head { min-height: 52px; padding: 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.access-list-head h2 { margin: 0 0 4px; font-size: 16px; }
.access-list-head p { margin: 0; color: var(--muted); font-size: 9px; }
.access-list-head > span { padding: 6px 9px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 8px; font-weight: 800; }
.access-user-search { margin: 0 0 10px; padding: 8px; display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
.access-user-search input { width: 100%; min-width: 0; height: 38px; padding: 0 12px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; outline: none; }
.access-user-search input:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent); }
.access-user-search .button { min-height: 38px; height: 38px; flex: 0 0 auto; }
.access-users-list { display: grid; gap: 9px; }
.access-user-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.access-user-card.is-disabled { opacity: .72; }
.access-user-card > summary { min-height: 72px; padding: 11px 13px; display: grid; grid-template-columns: auto minmax(130px,.9fr) minmax(120px,1fr) auto auto; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.access-user-card > summary::-webkit-details-marker { display: none; }
.access-user-card[open] > summary { border-bottom: 1px solid var(--line); }
.access-avatar { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),#8a62f3); border-radius: 10px; font-size: 12px; font-weight: 850; box-shadow: 0 6px 14px rgba(91,92,240,.2); }
.access-user-identity { min-width: 0; }
.access-user-identity strong,.access-user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-identity strong { font-size: 10px; }
.access-user-identity small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.access-user-permissions { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.access-user-permissions i { padding: 4px 5px; color: #667083; background: var(--soft); border-radius: 5px; font-size: 7px; font-style: normal; font-weight: 750; }
.access-user-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.access-user-status i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.access-user-status.active { color: var(--green); }
.access-user-status.pending { color: #be7a17; }
.access-expand { color: var(--muted); font-size: 15px; transition: transform .2s; }
.access-user-card[open] .access-expand { transform: rotate(180deg); }
.access-edit-form { background: color-mix(in srgb,var(--soft) 32%,transparent); }
.access-edit-meta { min-height: 45px; padding: 9px 18px; display: flex; align-items: center; gap: 15px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 8px; }
.access-active-toggle { margin-left: auto; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.access-active-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.access-active-toggle > span { width: 34px; height: 20px; padding: 2px; background: #d3d8e2; border-radius: 99px; transition: background .2s; }
.access-active-toggle > span::before { width: 16px; height: 16px; display: block; content: ""; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(17,24,39,.2); transition: transform .2s; }
.access-active-toggle input:checked + span { background: var(--primary); }
.access-active-toggle input:checked + span::before { transform: translateX(14px); }
.access-active-toggle b { color: #697386; font-size: 8px; }
.access-fieldset.compact { padding-top: 12px; }
.access-fieldset.compact .access-permission-grid { grid-template-columns: repeat(auto-fit,minmax(115px,1fr)); }
.access-fieldset.compact .access-permission-card { min-height: 48px; grid-template-columns: auto minmax(0,1fr); }
.access-fieldset.compact .access-permission-icon,.access-fieldset.compact .access-permission-card small { display: none; }
.access-edit-actions { padding: 0 18px 14px; display: flex; justify-content: flex-end; }
.access-user-secondary-actions { padding: 0 18px 14px; display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; background: color-mix(in srgb,var(--soft) 32%,transparent); }
.access-delete-form,.access-resend-form { margin: 0; padding: 0; display: flex; justify-content: flex-end; }
.access-delete-form .button { min-height: 31px; }
.access-resend-form .button { min-height: 31px; }
.access-user-planfact { padding: 12px 18px; background: color-mix(in srgb,var(--primary-soft) 24%,var(--surface)); border-bottom: 1px solid var(--line); }
.access-user-planfact > header { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.access-user-planfact > header strong,.access-user-planfact > header small { display: block; }
.access-user-planfact > header strong { font-size: 12px; }
.access-user-planfact > header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.access-user-planfact-list { display: grid; gap: 7px; }
.access-user-planfact-list > article { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(105px,1.1fr) minmax(130px,.9fr) minmax(105px,.75fr); align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.access-user-planfact-list > article > div:first-child { min-width: 0; }
.access-user-planfact-list > article > div:first-child strong,.access-user-planfact-list > article > div:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-planfact-list > article > div:first-child strong { font-size: 11px; }
.access-user-planfact-list > article > div:first-child small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.access-user-planfact-list dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.access-user-planfact-list dl div { min-width: 0; }
.access-user-planfact-list dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.access-user-planfact-list dd { margin: 3px 0 0; overflow: hidden; font-size: 11px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.access-user-planfact-progress > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.access-user-planfact-progress > span small { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.access-user-planfact-progress > span strong { font-size: 11px; }
.access-user-planfact-progress > i { height: 6px; margin-top: 6px; display: block; overflow: hidden; background: var(--soft); border-radius: 99px; }
.access-user-planfact-progress > i b { width: var(--plan-progress); height: 100%; display: block; background: linear-gradient(90deg,var(--primary),var(--green)); border-radius: inherit; }
.access-user-planfact-empty,.access-user-planfact-error { margin: 0; padding: 9px 10px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; font-size: 10px; line-height: 1.45; }
.access-user-planfact-error { margin-top: 7px; color: var(--red); background: var(--red-soft); border-style: solid; }
.verification-team-context { margin: -4px 0 16px; padding: 11px 13px; display: grid; gap: 3px; text-align: center; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.verification-team-context strong { font-size: 12px; }
.verification-team-context span { color: var(--muted); font-size: 10px; }
.verification-resend-note { margin-top: 7px; display: block; color: var(--muted); font-size: 9px; text-align: center; }

/* Billing access gate. */
.payment-required-gate { width: min(100%,680px); }
.payment-required-details { width: min(100%,470px); margin: 25px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payment-required-details > span { padding: 14px; display: grid; gap: 5px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.payment-required-details small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.payment-required-details strong { font-size: 16px; }
.approval-state > .payment-required-note { margin-top: 20px; padding: 12px 14px; color: var(--ink); background: var(--orange-soft); border-radius: 10px; font-size: 11px; line-height: 1.55; }
html[data-theme="dark"] .payment-required-details > span { background: var(--soft); border-color: var(--line); }

/* Team plans. */
.team-plans-heading { margin-bottom: 14px; }
.team-plans-heading-side { min-width: 180px; display: grid; justify-items: stretch; gap: 8px; }
.team-plans-heading-side .global-data-actuality.is-mounted { width: 100%; min-width: 0; }
.team-plans-heading-side > .button { width: 100%; min-height: 40px; }
.team-plan-stats { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.team-plan-stats article { min-height: 67px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
.team-plan-stats article > span { width: 35px; height: 35px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; font-size: 14px; }
.team-plan-stats small,.team-plan-stats strong { display: block; }
.team-plan-stats small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.team-plan-stats strong { margin-top: 3px; font-size: 18px; }
.team-plan-create { margin-bottom: 20px; overflow: hidden; }
.team-plan-create .panel-head { min-height: 63px; padding: 12px 16px; }
.team-plan-live-note { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 9px; font-weight: 800; }
.team-plan-live-note i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.team-plan-form { padding: 14px 16px 16px; }
.team-plan-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.team-plan-options { margin-top: 10px; padding: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.team-plan-options[hidden] { display: none; }
.team-plan-period-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 10px; }
.team-plan-period-grid > [hidden] { display: none; }
.team-plan-period-grid > [data-plan-period] { grid-column: span 2; }
.team-plan-custom-period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-plan-form-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.team-plan-form-actions .button { min-width: 0; min-height: 44px; height: 44px; flex: 1 1 auto; padding-inline: 12px; }
.team-plan-create.is-editing { border-color: color-mix(in srgb,var(--primary) 48%,var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 8%,transparent); }
.team-plan-form .field { min-width: 0; align-content: end; gap: 6px; }
.team-plan-form .field > span:first-child { min-height: 16px; display: flex; align-items: flex-end; color: var(--muted); font-size: 11px; line-height: 1.3; }
.team-plan-form :is(.input-wrap,.select-wrap) { width: 100%; display: block; }
.team-plan-form :is(input:not([type="checkbox"]):not([type="radio"]),select) { width: 100%; height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; font-size: 12px; line-height: 1.25; }
.team-plan-history { min-width: 0; }
.team-plan-history-head { margin-bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.team-plan-history-head h2 { margin: 0 0 4px; font-size: 18px; }
.team-plan-history-head p { margin: 0; color: var(--muted); font-size: 10px; }
.team-plan-history-filters { display: flex; align-items: flex-end; gap: 8px; }
.team-plan-history-filters label { min-width: 180px; display: grid; align-content: end; gap: 5px; }
.team-plan-history-filters label > span { min-height: 15px; display: flex; align-items: flex-end; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.team-plan-history-filters select { width: 100%; min-width: 0; height: 40px; min-height: 40px; padding: 0 32px 0 10px; font-size: 11px; }
.team-plan-history-filters .button { height: 40px; min-height: 40px; }
.team-plan-list { display: grid; gap: 8px; }
.team-plan-card { min-width: 0; min-height: 102px; padding: 11px 12px; display: grid; grid-template-columns: minmax(170px,.75fr) minmax(210px,.9fr) minmax(410px,1.8fr) auto; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 11px; box-shadow: var(--shadow-sm); }
.team-plans-readonly .team-plan-card { grid-template-columns: minmax(170px,.75fr) minmax(210px,.9fr) minmax(410px,1.8fr); }
.team-plan-card.is-completed { border-left-color: var(--green); }
.team-plan-card.is-finished { border-left-color: var(--muted); }
.team-plan-card.is-future { border-left-color: #be7a17; }
.team-plan-person { min-width: 0; display: flex; align-items: center; gap: 9px; }
.team-plan-person > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),#8a62f3); border-radius: 9px; font-weight: 850; }
.team-plan-person strong,.team-plan-person small,.team-plan-main > strong,.team-plan-main > small,.team-plan-progress > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-person strong { font-size: 11px; }
.team-plan-person small,.team-plan-main > small,.team-plan-progress > small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.team-plan-title { display: flex; align-items: center; gap: 6px; }
.team-plan-title span { font-size: 10px; font-weight: 850; }
.team-plan-title i { max-width: 150px; padding: 3px 5px; overflow: hidden; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 8px; font-style: normal; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-main > strong { margin-top: 6px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-progress { min-width: 0; }
.team-plan-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.team-plan-progress-head > span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.team-plan-progress-head > strong { font-size: 10px; white-space: nowrap; }
.team-plan-progress-head > strong.is-success { color: var(--green); }
.team-plan-progress-head > strong.is-primary { color: var(--primary); }
.team-plan-progress-head > strong.is-warning { color: var(--orange); }
.team-plan-progress-head > strong.is-danger { color: var(--red); }
.team-plan-progress-head > strong.is-neutral { color: var(--muted); }
.team-plan-progress-values { margin-top: 6px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.team-plan-progress-values article { --plan-tone:var(--primary); min-width: 0; padding: 6px 7px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 6px; background: color-mix(in srgb,var(--plan-tone) 7%,var(--soft)); border: 1px solid color-mix(in srgb,var(--plan-tone) 24%,var(--line)); border-radius: 7px; }
.team-plan-progress-values article.is-plan { --plan-tone:#7c8799; }
.team-plan-progress-values article.is-success { --plan-tone:var(--green); }
.team-plan-progress-values article.is-primary { --plan-tone:var(--primary); }
.team-plan-progress-values article.is-warning { --plan-tone:var(--orange); }
.team-plan-progress-values article.is-danger { --plan-tone:var(--red); }
.team-plan-progress-values article.is-neutral { --plan-tone:var(--muted); }
.team-plan-progress-values article > span { grid-column: 1 / -1; color: var(--plan-tone); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.team-plan-progress-values article > strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-progress-values article > em { color: var(--plan-tone); font-size: 9px; font-style: normal; font-weight: 850; white-space: nowrap; }
.team-plan-progress-values article > i { grid-column: 1 / -1; height: 4px; display: block; overflow: hidden; background: color-mix(in srgb,var(--plan-tone) 13%,var(--surface)); border-radius: 99px; }
.team-plan-progress-values article > i b { width: var(--plan-progress); max-width: 100%; height: 100%; display: block; background: var(--plan-tone); border-radius: inherit; }
.team-plan-card-actions { display: grid; gap: 6px; }
.team-plan-card-actions .button,.team-plan-card-actions .team-plan-history-lock { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; font-size: 14px; }
.team-plan-card-actions form { margin: 0; }
.team-plan-history-lock { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }

@media (max-width: 1100px) {
    .team-plan-grid { grid-template-columns: 1fr 1fr; }
    .team-plan-card { grid-template-columns: 1fr 1.2fr auto; }
    .team-plan-progress { grid-column: 1 / -2; }
    .team-plans-readonly .team-plan-card { grid-template-columns: 1fr 1.2fr; }
    .team-plans-readonly .team-plan-progress { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .access-heading-actions,.team-plan-history-head,.team-plan-history-filters { align-items: stretch; flex-direction: column; }
    .access-heading-actions .button,.team-plan-history-filters .button { width: 100%; }
    .access-data-scope,.team-plan-stats,.team-plan-grid,.team-plan-options,.team-plan-period-grid,.team-plan-custom-period { grid-template-columns: 1fr; }
    .team-plan-form-actions { justify-content: stretch; }
    .team-plan-card { grid-template-columns: 1fr auto; }
    .team-plans-readonly .team-plan-card { grid-template-columns: 1fr; }
    .team-plan-main,.team-plan-progress { grid-column: 1 / -1; }
    .team-plan-card-actions { grid-column: 2; grid-row: 1; }
}
.access-empty { min-height: 220px; padding: 30px; display: grid; align-content: center; justify-items: center; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.access-empty > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 11px; font-size: 20px; }
.access-empty h3 { margin: 12px 0 5px; font-size: 13px; }
.access-empty p { max-width: 310px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

html[data-theme="dark"] .session-user-chip { border-color: rgba(129,130,255,.28); }
html[data-theme="dark"] .access-permission-card,
html[data-theme="dark"] .access-user-permissions i { color: var(--ink); background: #141e2c; border-color: var(--line); }
html[data-theme="dark"] .access-permission-card:has(input:checked) { background: rgba(91,92,240,.14); border-color: rgba(129,130,255,.5); }
html[data-theme="dark"] .access-check,
html[data-theme="dark"] .access-permission-icon { background: #111a27; border-color: #334057; }
html[data-theme="dark"] .access-permission-card > input:checked + .access-check { background: var(--primary); border-color: var(--primary); }
html[data-theme="dark"] .access-active-toggle > span { background: #374457; }

@media (max-width: 1220px) {
    .access-layout { grid-template-columns: 1fr; }
    .access-users-list { grid-template-columns: 1fr 1fr; }
    .access-list-head { grid-column: 1 / -1; }
    .access-fieldset.compact .access-permission-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .access-user-card > summary { grid-template-columns: auto 1fr auto auto; }
    .access-user-permissions { grid-column: 2 / -1; }
}
@media (max-width: 800px) {
    .access-stats { grid-template-columns: 1fr 1fr; }
    .access-owner-card { grid-column: 1 / -1; }
    .access-users-list { grid-template-columns: 1fr; }
    .access-list-head { grid-column: auto; }
}
@media (max-width: 620px) {
    .session-user-chip { max-width: none; text-align: center; }
    .access-user-search { flex-wrap: wrap; }
    .access-user-search input { flex: 1 0 100%; }
    .access-user-search .button { flex: 1 1 0; }
    .access-stats,.access-fields,.access-permission-grid { grid-template-columns: 1fr; }
    .access-owner-card { grid-column: auto; }
    .access-form-actions,.access-edit-meta { align-items: stretch; flex-direction: column; }
    .access-form-actions .button { width: 100%; }
    .access-active-toggle { margin-left: 0; }
    .access-fieldset.compact .access-permission-grid { grid-template-columns: 1fr 1fr; }
    .access-user-card > summary { grid-template-columns: auto 1fr auto; }
    .access-user-status { grid-column: 2; }
    .access-expand { grid-column: 3; grid-row: 1 / span 2; }
    .access-user-permissions { grid-column: 1 / -1; }
    .company-team-shortcut { grid-template-columns: auto 1fr; }
    .company-team-shortcut > b { grid-column: 2; }
    .access-user-planfact > header { align-items: stretch; flex-direction: column; }
    .access-user-planfact > header .button { width: 100%; }
    .access-user-planfact-list > article { grid-template-columns: 1fr; }
    .access-user-secondary-actions { align-items: stretch; flex-direction: column; }
    .access-user-secondary-actions,.access-user-secondary-actions form,.access-user-secondary-actions .button { width: 100%; }
    .payment-required-details { grid-template-columns: 1fr; }
}

/* Per-company admin actions and connection requests. */
.companies-table .row-actions { flex-wrap: wrap; align-items: center; }
.company-service-link { min-height: 33px; gap: 7px; white-space: nowrap; }
.company-service-link .company-service-dot { width: 7px; height: 7px; flex: 0 0 auto; background: #a4adbb; border-radius: 50%; }
.company-service-link > b { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 8px; }
.company-service-link.has-alert { color: #9a611e; border-color: #efd6ae; background: #fffaf0; }
.company-service-link.has-alert .company-service-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(240,157,46,.12); animation: company-indicator-pulse 1.8s ease-in-out infinite; }
.company-service-link.has-alert > b { color: #a86618; background: var(--orange-soft); }
.company-service-link.has-danger { color: #ae3d51; border-color: #f0c7cf; background: #fff8fa; }
.company-service-link.has-danger .company-service-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(229,77,101,.12); animation: company-indicator-pulse 1.8s ease-in-out infinite; }
.company-service-link.has-danger > b { color: #ae3d51; background: var(--red-soft); }
@keyframes company-indicator-pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.company-page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.company-request-page .tariff-request-panel { overflow: visible; }
.company-request-page .company-request-list { overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.company-request-stats article:nth-child(2) strong { color: var(--orange); }
.company-request-stats article:nth-child(3) strong { color: var(--green); }
.company-request-stats article:nth-child(4) strong { color: var(--red); }

/* Unified layout for the recently added WB report integrations. */
.report-settings-form { margin-bottom: 15px; }
.report-settings-body { padding: 18px; display: grid; grid-template-columns: minmax(210px,.45fr) minmax(300px,1fr); align-items: end; gap: 16px; }
.report-settings-form .report-history-field { max-width: 330px; }
.report-settings-form .report-parallel-option { grid-column: auto; margin: 0; }
.report-settings-form .report-store-picker { grid-column: 1 / -1; padding: 0; }
.report-form-actions { padding: 15px 18px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); }
.report-run-card { grid-column: 1 / -1; }
.report-scheduler-form { grid-template-columns: minmax(220px,.9fr) minmax(230px,1fr) minmax(260px,1.15fr) minmax(190px,.85fr); }
.report-scheduler-form .scheduler-weekdays { grid-column: 1 / 3; }
.report-logs-page .feed-log-panel { overflow: hidden; }

html[data-theme="dark"] .company-service-link.has-alert { color: #f3c477; background: #2f281d; border-color: #66502f; }
html[data-theme="dark"] .company-service-link.has-danger { color: #ff9aaa; background: #321f29; border-color: #673543; }
html[data-theme="dark"] .company-request-page .company-request-list,
html[data-theme="dark"] .report-form-actions { border-color: var(--line); }
html[data-theme="dark"] .company-request-page .tariff-request-item { border-color: var(--line); }
html[data-theme="dark"] .company-request-page .price-reference { color: #aeb8c8; background: #111a27; border: 1px solid var(--line); }
html[data-theme="dark"] .company-request-page .price-reference strong { color: #a9aaff; }
html[data-theme="dark"] .company-request-page .request-discount-form label > span { background: #111a27; border-color: var(--line); }
html[data-theme="dark"] .report-settings-form .report-parallel-option,
html[data-theme="dark"] .report-scheduler-form .scheduler-next { background: #141e2c; border-color: var(--line); }
html[data-theme="dark"] .report-scheduler-form .scheduler-weekdays span { color: #b0bbcc; background: #111a27; border-color: #334056; }
html[data-theme="dark"] .report-scheduler-form .scheduler-weekdays input:checked + span { color: #fff; background: var(--primary); border-color: var(--primary); }

@media (max-width: 1180px) {
    .report-scheduler-form { grid-template-columns: 1fr 1fr; }
    .report-scheduler-form .scheduler-weekdays { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .company-page-actions { width: 100%; justify-content: flex-start; }
    .company-page-actions .button { flex: 1; }
    .report-settings-body,.report-scheduler-form { grid-template-columns: 1fr; }
    .report-settings-form .report-history-field { max-width: none; }
    .report-settings-form .report-store-picker,
    .report-scheduler-form .scheduler-weekdays { grid-column: auto; }
}
@media (max-width: 520px) {
    .company-service-link { width: 100%; justify-content: flex-start; }
    .company-service-link > b { margin-left: auto; }
    .company-request-page .tariff-panel-meta { justify-content: flex-start; }
}

/* Company email login and password recovery */
.auth-recovery-link { margin: -8px 0 0; text-align: right; }
.auth-recovery-link a { color: var(--primary); font-size: 11px; font-weight: 750; }
.auth-security-note { margin: -7px 4px 0; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.auth-lock-panel { display: grid; gap: 10px; padding: 16px; background: var(--red-soft); border: 1px solid #ffd2da; border-radius: 12px; text-align: center; }
.auth-lock-panel strong { color: #a93449; font-size: 13px; }
.auth-lock-panel p { margin: 0 0 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.auth-success { margin-bottom: 18px; padding: 14px 15px; border-radius: 11px; }
.auth-success { color: #187c5d; background: var(--green-soft); border: 1px solid #bdebdc; }
.auth-success strong { display: block; margin-bottom: 5px; font-size: 12px; }
.auth-success p { margin: 0; font-size: 10px; line-height: 1.55; }
.company-account-panel { margin-bottom: 18px; }
.company-email-form { padding: 16px 18px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) auto; align-items: end; gap: 12px; }
.company-email-form .button { min-height: 48px; }
.company-password-settings { padding: 16px 18px 18px; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.company-password-settings-copy { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.company-password-settings-copy > div { min-width: 0; }
.company-password-settings-copy strong,.company-password-settings-copy small { display: block; }
.company-password-settings-copy strong { font-size: 11px; }
.company-password-settings-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.company-password-settings-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 8px; }
.company-password-form { display: grid; grid-template-columns: repeat(3,minmax(170px,1fr)) auto; align-items: end; gap: 10px; }
.company-password-form .field { min-width: 0; }
.company-password-form .button { min-height: 48px; white-space: nowrap; }
.account-email-state { padding: 7px 10px; border-radius: 999px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.account-email-state-ready { color: #17805f; background: var(--green-soft); }
.account-email-state-missing { color: #a56e18; background: #fff3cf; }
.account-email-hint { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 9px; }
html[data-theme="dark"] .auth-page { background: radial-gradient(circle at 20% 20%,rgba(91,92,240,.12),transparent 27%),radial-gradient(circle at 88% 78%,rgba(62,190,148,.08),transparent 26%),#0b111b; }
html[data-theme="dark"] .auth-card,html[data-theme="dark"] .company-account-panel { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .auth-lock-panel { border-color: rgba(239,113,134,.35); }

@media (max-width: 820px) {
}
html[data-theme="dark"] .auth-card .field > span:first-child,
html[data-theme="dark"] .auth-card .field > label:first-child { color: #c4cede; }
html[data-theme="dark"] .auth-card .input-wrap input { color: var(--ink); background: #111a27; border-color: #344158; }
html[data-theme="dark"] .auth-divider span { background: var(--surface); }
html[data-theme="dark"] .auth-success { color: #73dfbc; background: #17382f; border-color: #2b5d4e; }
html[data-theme="dark"] .account-email-state-missing { color: #f0cd78; background: #3a301d; border-color: #62502d; }

@media (max-width: 760px) {
    .company-email-form,.company-password-form { grid-template-columns: 1fr; }
    .company-email-form .button,.company-password-form .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Final dark-surface pass for every authenticated data module. */
html[data-theme="dark"] .pricing-field,
html[data-theme="dark"] .price-input-wrap,
html[data-theme="dark"] .settings-summary,
html[data-theme="dark"] .tariff-card,
html[data-theme="dark"] .marketplace-connect-card,
html[data-theme="dark"] .company-stores-panel,
html[data-theme="dark"] .tariff-company-group,
html[data-theme="dark"] .company-billing-summary,
html[data-theme="dark"] .admin-billing-notification,
html[data-theme="dark"] .admin-billing-company,
html[data-theme="dark"] .payment-report-stats article,
html[data-theme="dark"] .payment-ledger-item,
html[data-theme="dark"] .ledger-breakdown span,
html[data-theme="dark"] .refund-card,
html[data-theme="dark"] .product-stat-row article,
html[data-theme="dark"] .product-tools-grid article,
html[data-theme="dark"] .orders-sync-time,
html[data-theme="dark"] .orders-storage-badge,
html[data-theme="dark"] .orders-empty-state,
html[data-theme="dark"] .orders-stats article {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .table-filter input,
html[data-theme="dark"] .billing-notification-list,
html[data-theme="dark"] .admin-billing-companies,
html[data-theme="dark"] .billing-breakdown > span,
html[data-theme="dark"] .orders-filter-shell {
    color: var(--ink);
    background: #111a27;
    border-color: var(--line);
}
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .admin-billing-company-head,
html[data-theme="dark"] .billing-breakdown,
html[data-theme="dark"] .orders-panel-head,
html[data-theme="dark"] .orders-pagination {
    border-color: var(--line);
}
html[data-theme="dark"] .billing-next-date,
html[data-theme="dark"] .market-chip,
html[data-theme="dark"] .order-status-unknown,
html[data-theme="dark"] .modal-close {
    color: var(--ink);
    background: #263247;
}
html[data-theme="dark"] .product-filter-form select,
html[data-theme="dark"] .product-filter-form input,
html[data-theme="dark"] .orders-filter-form select,
html[data-theme="dark"] .orders-filter-form input,
html[data-theme="dark"] .billing-date-form input {
    color: var(--ink);
    background: #111a27;
    border-color: #344158;
}
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .store-form-heading > button {
    color: #a9b3c2;
    background: #202b3d;
    border-color: #354257;
}
html[data-theme="dark"] .company-danger-zone { color: #ffadba; background: #351d26; border-color: #61313e; }
html[data-theme="dark"] .tariff-request-state,html[data-theme="dark"] .billing-alert { color: #f3c477; background: #362b1d; border-color: #604b2d; }
html[data-theme="dark"] .billing-alert-overdue,html[data-theme="dark"] .billing-alert-today { color: #ff9aaa; background: #3b2029; border-color: #61313e; }
html[data-theme="dark"] .refund-list { background: #211d17; }
html[data-theme="dark"] .status-approved,html[data-theme="dark"] .order-status-buyout { color: #64e1b6; }
html[data-theme="dark"] .status-pending { color: #ffc071; }
html[data-theme="dark"] .status-rejected,html[data-theme="dark"] .order-status-cancel,html[data-theme="dark"] .order-status-return,html[data-theme="dark"] .order-status-returnDefective { color: #ff9aaa; }
html[data-theme="dark"] .pricing-field-copy strong,html[data-theme="dark"] .pricing-field-copy small,html[data-theme="dark"] .price-input-wrap b { color: inherit; }

/* Wildberries stocks: FBO + FBS */
.stocks-heading { margin-bottom: 18px; }
.stocks-live-state { min-width: 190px; padding: 11px 14px; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); font-size: 10px; }
.stocks-live-state i { width: 8px; height: 8px; grid-row: 1 / 3; align-self: center; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.stocks-live-state strong { color: var(--ink); font-size: 12px; }
.stocks-section-tabs { width: fit-content; margin-bottom: 18px; padding: 4px; display: flex; background: #e9ecf3; border-radius: 11px; }
.stocks-section-tabs a { min-height: 36px; padding: 0 16px; display: grid; place-items: center; color: #697386; border-radius: 8px; font-size: 11px; font-weight: 750; }
.stocks-section-tabs a.active { color: var(--ink); background: var(--surface); box-shadow: 0 3px 11px rgba(32,39,61,.08); }
.stocks-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.stocks-summary-valued { grid-template-columns: repeat(5, 1fr); }
.stock-value-card { background: linear-gradient(135deg,var(--surface),var(--green-soft)) !important; border-color: rgba(35,181,131,.2) !important; }
.stock-value-card strong,.stock-value { color: var(--green); }
.stocks-summary article { padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.stocks-summary span,.stocks-summary strong,.stocks-summary small { display: block; }.stocks-summary span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }.stocks-summary strong { margin-top: 8px; font-size: 19px; }.stocks-summary small { margin-top: 5px; color: #8a93a2; font-size: 10px; }
.stocks-panel { margin-bottom: 20px; }
.stocks-view-toolbar { min-height: 65px; padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.stocks-view-modes { display: flex; align-items: center; gap: 5px; }.stocks-view-modes > span { margin-right: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }.stocks-view-modes a { padding: 8px 11px; color: #70798a; background: var(--soft); border-radius: 8px; font-size: 10px; font-weight: 750; }.stocks-view-modes a.active { color: white; background: var(--primary); }
.stocks-slice-form label { display: flex; align-items: center; gap: 8px; }.stocks-slice-form span { color: var(--muted); font-size: 9px; font-weight: 750; }.stocks-slice-form select { height: 36px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.stocks-filter-form { padding: 13px 17px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, .8fr)) minmax(160px,.8fr) auto; align-items: end; gap: 8px; background: #fafbfe; border-bottom: 1px solid var(--line); }
.stocks-filter-form.stocks-marketplace-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.stocks-marketplace-filter > label { flex: 0 1 260px; min-width: 180px; }
.stocks-marketplace-filter > button { flex: 0 0 auto; width: auto; min-width: 0; }
.stocks-marketplace-filter > p { flex: 1 1 320px; align-self: center; margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.stocks-filter-form label > span,.dynamics-filter-form label > span,.dynamics-mode > span { display: block; margin-bottom: 5px; color: #858e9d; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.stocks-filter-form input,.stocks-filter-form select,.dynamics-filter-form input[type="search"],.dynamics-filter-form select { width: 100%; height: 37px; padding: 0 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 9px; }
.stocks-filter-actions { display: flex; gap: 6px; }.stocks-filter-actions .button { padding-left: 11px; padding-right: 11px; }
.stock-value-toggle { min-height: 37px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.stock-value-toggle input { accent-color: var(--primary); }.stock-value-toggle > span { min-width: 0; }.stock-value-toggle b,.stock-value-toggle small { display: block; line-height: 1.2; }.stock-value-toggle b { font-size: 8px; white-space: nowrap; }.stock-value-toggle small { margin-top: 2px; color: var(--muted); font-size: 7px; }.muted-value { color: var(--muted); font-size: 9px; }
.stocks-table td { vertical-align: middle; }.stocks-table td > strong,.stocks-table td > small { display: block; }.stocks-table td > small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.stock-source { width: fit-content; display: inline-flex; padding: 5px 7px; color: #6f7887; background: #eef0f4; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 850; }
.stock-source-fbo { color: #7653c2; background: #f0ebff; }.stock-source-fbs { color: #167454; background: #e5f8f0; }.stock-source-system { color: #647084; background: #edf0f5; }
.stock-quantity { color: var(--primary); font-size: 15px; }.stock-zero { color: #a1a7b2; }
.stocks-chart-wrap { height: 390px; padding: 18px 18px 4px; }.stocks-chart-wrap canvas { width: 100%; height: 100%; }
.stocks-chart-legend { padding: 11px 18px 17px; display: flex; flex-wrap: wrap; gap: 8px 14px; }.stocks-chart-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }.stocks-chart-legend i { width: 14px; height: 3px; border-radius: 3px; }
.dynamics-filter-form { margin-bottom: 16px; padding: 14px; display: grid; grid-template-columns: auto 110px 140px minmax(140px,.8fr) minmax(180px,1fr) auto auto; align-items: end; gap: 9px; overflow: visible; }
.dynamics-mode { align-self: stretch; }
.dynamics-mode .segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dynamics-mode .segmented label { display: block; cursor: pointer; }
.dynamics-mode .segmented input { position: absolute; opacity: 0; pointer-events: none; }
.dynamics-mode .segmented span { min-height: 37px; padding: 0 12px; display: grid; place-items: center; color: #6e7788; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 800; white-space: nowrap; transition: color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease; }
.dynamics-mode .segmented input:checked + span { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 14px rgba(91,92,240,.18); }
.dynamics-mode .segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.warehouse-picker { position: relative; }.warehouse-picker summary { height: 37px; min-width: 120px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 9px; font-weight: 750; list-style: none; }.warehouse-picker summary::-webkit-details-marker { display: none; }.warehouse-picker summary b { min-width: 20px; padding: 3px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; text-align: center; }.warehouse-picker > div { position: absolute; z-index: 20; top: 44px; right: 0; width: min(330px, 85vw); max-height: 320px; padding: 8px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); }.warehouse-picker > div label { padding: 8px; display: flex; align-items: center; gap: 8px; border-radius: 7px; cursor: pointer; }.warehouse-picker > div label:hover { background: var(--soft); }.warehouse-picker input { accent-color: var(--primary); }.warehouse-picker span { font-size: 9px; }
.dynamics-chart-panel,.dynamics-table-panel { margin-bottom: 17px; }.dynamics-table-panel { max-height: 620px; overflow: auto; }
.price-dynamics-filter { grid-template-columns: auto 135px 105px 135px minmax(170px,1fr) auto auto; }
.product-picker span small { margin-top: 3px; display: block; color: var(--muted); font-size: 7px; }
.price-matrix-panel { margin-bottom: 18px; overflow: hidden; }
.price-matrix-scroll { max-height: 680px; overflow: auto; }
.price-matrix-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.price-matrix-table th { position: sticky; z-index: 4; top: 0; background: var(--soft); text-align: center; white-space: nowrap; }
.price-matrix-table td { height: 58px; border-right: 1px solid var(--line); text-align: center; }
.price-matrix-table td > strong,.price-matrix-table td > small { display: block; }
.price-matrix-table td > small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.matrix-sticky { position: sticky; z-index: 3; background: var(--surface); text-align: left !important; }
.price-matrix-table thead .matrix-sticky { z-index: 6; background: var(--soft); }
.matrix-product { left: 0; width: 170px; min-width: 170px; max-width: 170px; }
.matrix-category { left: 170px; width: 180px; min-width: 180px; max-width: 180px; }
.matrix-shop { left: 350px; width: 120px; min-width: 120px; max-width: 120px; }
.matrix-size { left: 470px; width: 90px; min-width: 90px; max-width: 90px; }
.matrix-commission { left: 560px; width: 110px; min-width: 110px; max-width: 110px; box-shadow: 8px 0 13px -13px rgba(20,28,45,.8); }
.matrix-commission span { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; line-height: 1.6; }
.matrix-commission b { color: var(--ink); }
.matrix-period { min-width: 104px; }
.matrix-stock-source { left: 0; width: 95px; min-width: 95px; max-width: 95px; }
.matrix-stock-warehouse { left: 95px; width: 210px; min-width: 210px; max-width: 210px; box-shadow: 8px 0 13px -13px rgba(20,28,45,.8); }
.stock-matrix-table td { height: 54px; }
.price-matrix-cell { min-width: 104px; padding: 7px !important; }
.price-matrix-cell > div { min-height: 36px; padding: 6px 7px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; }
.price-matrix-cell strong { font-size: 9px; white-space: nowrap; }
.price-matrix-cell span { font-size: 16px; font-weight: 900; line-height: 1; }
.price-matrix-cell em { color: var(--muted); font-size: 11px; font-style: normal; }
.price-matrix-cell.is-up > div { color: #c43f52; background: #ffeaee; }
.price-matrix-cell.is-down > div { color: #10805c; background: #e1f7ee; }
.price-matrix-cell.is-equal > div { color: #946800; background: #fff4c7; }
.price-matrix-cell.is-missing { background: var(--soft); }
.enriched-prices-table { min-width: 1450px; }
.export-icon-stocks { background: linear-gradient(135deg,#26b987,#347eda); box-shadow: 0 9px 22px rgba(36,158,146,.2); }
.export-icon-prices { background: linear-gradient(135deg,#ff9b47,#f0547d); box-shadow: 0 9px 22px rgba(240,84,125,.2); }
.export-icon-goods { background: linear-gradient(135deg,#7559f1,#3e8de8); box-shadow: 0 9px 22px rgba(85,90,231,.2); }
.stocks-admin-settings { margin-bottom: 15px; }.stocks-source-switches { padding: 14px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.stocks-source-switches > label { padding: 13px; display: flex; align-items: center; gap: 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }.stocks-source-switches input { accent-color: var(--primary); }.stocks-source-switches label > span { min-width: 0; flex: 1; }.stocks-source-switches b,.stocks-source-switches small { display: block; }.stocks-source-switches b { font-size: 11px; }.stocks-source-switches small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.stocks-admin-settings .scheduler-store-picker { padding: 2px 18px 15px; }.stocks-admin-settings .parallel-option { margin: 0 18px 15px; }.stocks-settings-actions { padding: 0 18px 17px; display: flex; justify-content: flex-end; }
.stocks-run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.stocks-run-grid article { padding: 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }.stocks-run-grid h3 { margin: 9px 0 5px; font-size: 13px; }.stocks-run-grid p { margin: 0; color: var(--muted); font-size: 9px; }

html[data-theme="dark"] .stocks-section-tabs,html[data-theme="dark"] .stocks-filter-form { background: #111a27; }
html[data-theme="dark"] .stocks-live-state,html[data-theme="dark"] .stocks-summary article,html[data-theme="dark"] .warehouse-picker > div { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .stock-source-fbo { color: #c3adff; background: #332852; }html[data-theme="dark"] .stock-source-fbs { color: #69dfb7; background: #173c34; }html[data-theme="dark"] .stock-source-system { color: #b4bfce; background: #263247; }
html[data-theme="dark"] .scheduler-next { color: var(--ink); background: #111a27; border-color: var(--line); }
html[data-theme="dark"] .price-matrix-table th,html[data-theme="dark"] .price-matrix-table thead .matrix-sticky { background: #111a27; }
html[data-theme="dark"] .matrix-sticky { background: var(--surface); }
html[data-theme="dark"] .price-matrix-cell.is-up > div { color: #ff9cab; background: #462330; }
html[data-theme="dark"] .price-matrix-cell.is-down > div { color: #72e4bd; background: #183b33; }
html[data-theme="dark"] .price-matrix-cell.is-equal > div { color: #f4cf66; background: #41391e; }

@media (max-width: 1200px) { .stocks-filter-form { grid-template-columns: 1fr 1fr 1fr; }.stocks-search { grid-column: span 2; }.dynamics-filter-form { grid-template-columns: 1fr 1fr 1fr; }.dynamics-search { grid-column: span 2; } }
@media (max-width: 850px) { .stocks-summary { grid-template-columns: 1fr 1fr; }.stocks-view-toolbar { align-items: stretch; flex-direction: column; }.stocks-view-modes { overflow-x: auto; }.stocks-filter-form,.dynamics-filter-form { grid-template-columns: 1fr 1fr; }.stocks-search,.dynamics-search { grid-column: 1 / -1; }.stocks-source-switches,.stocks-run-grid { grid-template-columns: 1fr; }.stocks-chart-wrap { height: 330px; } }
@media (max-width: 600px) { .stocks-heading .stocks-live-state { width: 100%; }.stocks-summary,.stocks-filter-form,.dynamics-filter-form { grid-template-columns: 1fr; }.stocks-search,.dynamics-search { grid-column: auto; }.stocks-view-modes > span { display: none; }.stocks-view-modes a { white-space: nowrap; }.stocks-filter-actions .button { flex: 1; }.stocks-table,.stocks-table tbody,.stocks-table tr,.stocks-table td { display: block; width: 100%; white-space: normal; }.stocks-table thead { display: none; }.stocks-table tbody { padding: 8px 14px; }.stocks-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }.stocks-table td { padding: 5px 0; border: 0; text-align: left !important; }.stocks-chart-wrap { height: 290px; padding-left: 8px; padding-right: 8px; }.stocks-run-grid article { align-items: stretch; flex-direction: column; }.stocks-run-grid .button { width: 100%; } }

@media (max-width: 760px) {
    .price-matrix-table .matrix-sticky { position: static; }
}

/* Marketplace goods and prices live inside the Products workspace. */
.product-section-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.product-section-tabs a { white-space: nowrap; }
.marketplace-goods-filters { grid-template-columns: minmax(260px,1.5fr) repeat(3,minmax(150px,.8fr)) auto; }
.price-filter-form { grid-template-columns: minmax(260px,1.5fr) minmax(160px,.8fr) minmax(180px,.8fr) auto; }
.goods-product-cell { min-width: 250px; display: flex; align-items: center; gap: 10px; }.goods-product-cell img,.goods-product-cell > span { width: 40px; height: 48px; flex: 0 0 auto; object-fit: cover; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; }.goods-product-cell strong,.goods-product-cell small,.goods-sku { display: block; }.goods-sku { margin: 2px 0; white-space: nowrap; }.price-club { color: var(--green); }.product-picker > div { max-height: 280px; overflow-y: auto; }
html[data-theme="dark"] .stock-value-card { background: linear-gradient(135deg,var(--surface),rgba(35,181,131,.09)) !important; }
@media (max-width: 1200px) { .stocks-summary-valued { grid-template-columns: repeat(3,1fr); }.marketplace-goods-filters,.price-filter-form { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 850px) { .stocks-summary-valued { grid-template-columns: 1fr 1fr; }.product-section-tabs { width: 100%; }.marketplace-goods-filters,.price-filter-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .stocks-summary-valued,.marketplace-goods-filters,.price-filter-form { grid-template-columns: 1fr; }.goods-product-cell { min-width: 0; } }

/* Company script scheduler */
.scheduler-panel { margin-bottom: 20px; }
.scheduler-state { padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; font-size: 8px; font-weight: 850; }
.scheduler-state i { width: 7px; height: 7px; border-radius: 50%; }
.scheduler-state-on { color: #16815d; background: var(--green-soft); }
.scheduler-state-on i { background: var(--green); box-shadow: 0 0 0 4px rgba(21,166,115,.1); }
.scheduler-state-off { color: #737c8c; background: #eef1f5; }
.scheduler-state-off i { background: #929aaa; }
.scheduler-form { padding: 18px 20px; display: grid; grid-template-columns: minmax(180px,.7fr) repeat(2,minmax(180px,1fr)); gap: 14px; align-items: end; }
.scheduler-toggle { min-height: 42px; align-self: center; }
.scheduler-weekdays { grid-column: 1 / 3; margin: 0; padding: 0; display: flex; gap: 7px; border: 0; }
.scheduler-weekdays[hidden] { display: none; }
.scheduler-weekdays legend { margin-bottom: 7px; color: #687285; font-size: 8px; font-weight: 750; }
.scheduler-weekdays label { cursor: pointer; }
.scheduler-weekdays input { position: absolute; opacity: 0; pointer-events: none; }
.scheduler-weekdays input:focus-visible + span { outline: 3px solid color-mix(in srgb,var(--primary) 28%,transparent); outline-offset: 2px; }
.scheduler-weekdays span { width: 39px; height: 35px; display: grid; place-items: center; color: #747e8f; background: #f7f8fb; border: 1px solid #e1e4eb; border-radius: 9px; font-size: 8px; font-weight: 850; transition: .2s; }
.scheduler-weekdays input:checked + span { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 14px rgba(91,92,240,.2); }
.scheduler-next { min-height: 58px; padding: 10px 12px; background: #f7f8fc; border: 1px solid #e7e9f0; border-radius: 10px; }
.scheduler-next span,.scheduler-next strong,.scheduler-next small { display: block; }
.scheduler-next span { color: #8b93a1; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.scheduler-next strong { margin-top: 4px; font-size: 9px; }
.scheduler-next small { margin-top: 3px; color: #8a92a1; font-size: 7px; }
.scheduler-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; border-top: 1px solid #eef0f4; padding-top: 14px; }

/* Isolated company product catalog */
.products-storage-card { margin: -8px 0 16px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: linear-gradient(115deg,#fff 0%,#f7f7ff 100%); border: 1px solid #dfe2ed; border-radius: 13px; box-shadow: var(--shadow-sm); }
.products-storage-card strong { display: block; font-size: 10px; }
.products-storage-card p { margin: 4px 0 0; color: #7c8595; font-size: 8px; }
.products-storage-card code { color: var(--primary); font-family: inherit; font-weight: 750; }
.product-stat-row { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.product-stat-row article { padding: 14px 15px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.product-stat-row span,.product-stat-row strong,.product-stat-row small { display: block; }
.product-stat-row span { margin-bottom: 6px; color: #8992a1; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.product-stat-row strong { color: var(--ink); font-size: 17px; }
.product-stat-row article:first-child strong { color: var(--primary); }
.product-stat-row small { margin-top: 4px; color: #929aaa; font-size: 7px; }
.product-tools-grid { margin-bottom: 16px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.product-tools-grid article { min-width: 0; padding: 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.product-tool-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.product-tool-icon-green { color: var(--green); background: var(--green-soft); }
.product-tool-icon svg { width: 19px; height: 19px; stroke-width: 2; }
.product-tools-grid strong { display: block; font-size: 9px; }
.product-tools-grid p { margin: 4px 0 0; color: #818a99; font-size: 7px; line-height: 1.45; }
.product-tool-actions { display: flex; gap: 6px; }
.products-panel { margin-bottom: 20px; }
.product-filter-form { display: grid; grid-template-columns: minmax(210px,1.6fr) repeat(4,minmax(125px,1fr)) auto; align-items: end; gap: 9px; }
.product-filter-form .orders-filter-actions { grid-column: auto; }
.product-filter-form label > span { display: block; margin-bottom: 5px; color: #858e9d; font-size: 7px; font-weight: 750; }
.product-filter-form select,.product-filter-form input { width: 100%; height: 38px; padding: 0 9px; color: #30394b; background: white; border: 1px solid #dfe3e9; border-radius: 8px; outline: none; font: inherit; font-size: 8px; }
.product-filter-form select:focus,.product-filter-form input:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.09); }
.products-table { table-layout: auto; }
.product-taxonomy-table { min-width: 1490px; }
.products-table td:nth-child(6) { min-width: 230px; white-space: normal; }
.product-marketplace-article { display: block; max-width: 170px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.product-sku { color: var(--primary); }
.product-status { --status-color: #6b7280; padding: 6px 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--status-color); background: color-mix(in srgb,var(--status-color) 13%,transparent); border: 1px solid color-mix(in srgb,var(--status-color) 24%,transparent); border-radius: 7px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.product-empty-field { color: var(--muted); font-size: 9px; font-style: italic; }
.product-status i { width: 6px; height: 6px; background: var(--status-color); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb,var(--status-color) 13%,transparent); }
html[data-theme="dark"] .product-status { color: color-mix(in srgb,var(--status-color) 72%,#fff); background: color-mix(in srgb,var(--status-color) 16%,#172130); border-color: color-mix(in srgb,var(--status-color) 34%,#263247); }
.product-group-chip { display: inline-flex; padding: 5px 8px; color: #5758d7; background: var(--primary-soft); border-radius: 7px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.product-tag-list { max-width: 240px; display: flex; flex-wrap: wrap; gap: 4px; }
.product-tag-list span { padding: 4px 7px; color: #3973a8; background: var(--blue-soft); border-radius: 6px; font-size: 7px; font-weight: 800; white-space: nowrap; }
.product-time { margin: 0; }
.product-time small { display: block; margin-top: 3px; font-size: 7px; }
.product-edit-button { color: var(--primary); }
.product-edit-button:hover { background: var(--primary-soft); border-color: #dadafb; }
.products-empty { padding: 48px 20px; }
.product-modal-card { width: min(100%,610px); }
.product-taxonomy-modal { width: min(100%,760px); }
.product-small-modal { width: min(100%,500px); }
.product-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product-form .field-full { grid-column: 1 / -1; }
.product-taxonomy { --taxonomy-selected-color: #6b7280; width: 100%; }
.product-taxonomy summary { min-height: 42px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; transition: .18s; }
.product-taxonomy summary::-webkit-details-marker { display: none; }
.product-taxonomy summary::before { content: ''; width: 7px; height: 7px; flex: 0 0 auto; background: var(--taxonomy-selected-color); border-radius: 50%; }
.product-taxonomy[data-product-taxonomy="group"] summary::before { color: var(--primary); background: var(--primary); border-radius: 2px; transform: rotate(45deg); }
.product-taxonomy[data-product-taxonomy="tag"] summary::before { content: '#'; width: auto; height: auto; color: #3973a8; background: none; border-radius: 0; font-size: 11px; transform: none; }
.product-taxonomy summary > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-taxonomy summary > i { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: .18s; }
.product-taxonomy[open] summary { border-color: #9a9bf5; box-shadow: 0 0 0 3px rgba(91,92,240,.08); }
.product-taxonomy[open] summary > i { transform: rotate(225deg) translate(-1px,-1px); }
.product-taxonomy-panel { margin-top: 6px; padding: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
.product-taxonomy-options { max-height: 190px; overflow-y: auto; scrollbar-width: thin; }
.product-taxonomy-option { min-height: 36px; padding: 3px 4px 3px 8px; display: flex; align-items: center; gap: 6px; border-radius: 7px; }
.product-taxonomy-option:hover { background: var(--soft); }
.product-taxonomy-option > label { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.product-taxonomy-option input { accent-color: var(--primary); }
.product-taxonomy-option label > span { min-width: 0; overflow: hidden; color: var(--ink); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.taxonomy-color { --option-color: #6b7280; width: 10px; height: 10px; flex: 0 0 auto; background: var(--option-color); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb,var(--option-color) 13%,transparent); }
.taxonomy-symbol { width: 14px; flex: 0 0 auto; color: var(--primary); font-size: 9px; font-style: normal; text-align: center; }
.taxonomy-delete { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; color: #9aa2b0; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: 15px; }
.taxonomy-delete:hover { color: #d84c5d; background: rgba(224,82,96,.1); }
.product-taxonomy-add { margin-top: 6px; padding-top: 7px; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.product-taxonomy-add > input[type="text"] { min-width: 0; height: 34px; flex: 1; padding: 0 9px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 8px; outline: none; }
.product-taxonomy-add > input:focus { border-color: #8f90f5; }
.product-taxonomy-add > button { width: 34px; height: 34px; flex: 0 0 auto; color: white; background: var(--primary); border: 0; border-radius: 8px; cursor: pointer; font-size: 17px; font-weight: 600; }
.taxonomy-color-input { width: 34px; height: 34px; flex: 0 0 auto; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.taxonomy-color-input input { position: absolute; inset: -8px; width: 50px; height: 50px; padding: 0; border: 0; cursor: pointer; }
.product-taxonomy-error { min-height: 13px; padding: 4px 2px 0; display: block; color: #d84c5d; font-size: 7px; }
.product-import-form { display: grid; gap: 16px; }
.product-file-drop { min-height: 175px; padding: 22px; display: grid; place-items: center; align-content: center; color: #697386; background: #f8f9fc; border: 1.5px dashed #cfd4df; border-radius: 14px; cursor: pointer; text-align: center; transition: .2s; }
.product-file-drop:hover,.product-file-drop.dragging { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.product-file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-file-drop svg { width: 30px; height: 30px; margin-bottom: 9px; stroke-width: 1.8; }
.product-file-drop strong { max-width: 100%; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-file-drop small { margin-top: 5px; font-size: 8px; }

@media (max-width: 1100px) {
    .scheduler-form { grid-template-columns: 1fr 1fr; }
    .scheduler-weekdays { grid-column: 1 / -1; }
    .product-tools-grid { grid-template-columns: 1fr; }
    .product-filter-form { grid-template-columns: repeat(3,1fr); }
    .product-search { grid-column: span 2; }
}
@media (max-width: 850px) {
    .product-stat-row { grid-template-columns: 1fr 1fr; }
    .product-filter-form { grid-template-columns: 1fr 1fr; }
    .product-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .scheduler-form { grid-template-columns: 1fr; padding: 14px; }
    .scheduler-weekdays,.scheduler-actions { grid-column: auto; }
    .scheduler-weekdays { flex-wrap: wrap; }
    .scheduler-actions .button { width: 100%; }
    .products-storage-card { grid-template-columns: auto 1fr; }
    .products-storage-card .orders-storage-badge { grid-column: 1 / -1; width: 100%; }
    .product-stat-row { grid-template-columns: 1fr 1fr; }
    .product-tools-grid article { grid-template-columns: auto 1fr; }
    .product-tool-actions,.product-tools-grid article > .button { grid-column: 1 / -1; width: 100%; }
    .product-tool-actions .button { flex: 1; }
    .product-filter-form { grid-template-columns: 1fr; }
    .product-search { grid-column: auto; }
    .product-filter-form .orders-filter-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); }
    .products-table,.products-table tbody,.products-table tr,.products-table td { display: block; width: 100%; white-space: normal; }
    .products-table thead { display: none; }
    .products-table tbody { padding: 4px 14px 14px; }
    .products-table tr { padding: 10px 0; border-bottom: 1px solid #edf0f4; }
    .products-table td { min-width: 0 !important; padding: 6px 0; border: 0; text-align: left !important; }
    .products-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .products-table .row-actions { justify-content: flex-start; }
    .product-form { grid-template-columns: 1fr; }
    .product-form .field-full { grid-column: auto; }
    .companies-table .company-stores-row { padding: 0; border-bottom: 0; }
    .companies-table .company-stores-row > td::before { display: none; }
    .company-stores-panel { margin: 0 0 12px; }
    .company-stores-list { grid-template-columns: 1fr; }
    .company-store-card > i { justify-self: end; }
}
@media (max-width: 430px) {
    .marketplace-card-head { align-items: flex-start; flex-direction: column; }
    .add-store-button { width: 100%; justify-content: center; }
    .store-form-columns { grid-template-columns: 1fr; }
    .tariff-card { padding: 16px; }
    .tariff-usage { flex-direction: column; }
    .pricing-field { align-items: flex-start; flex-wrap: wrap; }
    .price-input-wrap { width: 100%; }
}

/* Monthly billing and company lifecycle */
.status-suspended { color: #9a641a; background: #fff3da; }
.status-suspended i { background: #e6a12c; }
.status-deleted_by_user,.status-deleted { color: #6f7786; background: #eef0f4; }
.status-deleted_by_user i,.status-deleted i { background: #8e96a4; }
.icon-button.suspend { color: #c17a18; }
.icon-button.suspend:hover { background: #fff4de; border-color: #f0d49f; }
.icon-button.resume { color: var(--green); }
.icon-button.resume:hover { background: var(--green-soft); border-color: #bcebdc; }
.suspended-icon { color: #a76c1b; background: #fff2d8; border-color: #f4d7a0; font-weight: 850; }
.billing-alert { margin-bottom: 20px; padding: 15px 17px; display: flex; align-items: center; gap: 12px; color: #76551f; background: #fff8e8; border: 1px solid #f0d8a6; border-radius: 13px; box-shadow: var(--shadow-sm); }
.billing-alert-overdue,.billing-alert-today { color: #9e3e50; background: #fff1f3; border-color: #f2cbd2; }
.billing-alert-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: #e7a12d; border-radius: 9px; font-weight: 850; }
.billing-alert-overdue .billing-alert-icon,.billing-alert-today .billing-alert-icon { background: var(--red); }
.billing-alert > div { min-width: 0; flex: 1; }
.billing-alert strong { display: block; font-size: 11px; }
.billing-alert p { margin: 4px 0 0; color: currentColor; font-size: 9px; line-height: 1.5; opacity: .82; }
.company-billing-summary { margin-bottom: 18px; padding: 15px 18px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.billing-summary-label,.billing-next-date span { display: block; margin-bottom: 5px; color: #8991a0; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.company-billing-summary > div > strong { display: block; color: var(--primary); font-size: 18px; }
.company-billing-summary > div > strong small { color: #8991a0; font-size: 9px; }
.company-billing-summary p { margin: 5px 0 0; color: #7c8494; font-size: 9px; }
.billing-next-date { min-width: 135px; padding: 9px 12px; background: #f7f8fb; border-radius: 9px; }
.billing-next-date strong { font-size: 12px !important; color: var(--ink) !important; }
.monthly-billing-panel { margin-bottom: 20px; }
.monthly-total { text-align: right; }
.monthly-total span,.monthly-total strong,.monthly-total small { display: block; }
.monthly-total span { margin-bottom: 4px; color: #8991a0; font-size: 10px; }
.monthly-total strong { color: var(--primary); font-size: 15px; }
.monthly-total small { margin-top: 3px; color: #6d7585; font-size: 8px; }
.billing-breakdown { padding: 15px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-bottom: 1px solid #eef0f4; }
.billing-breakdown > span { padding: 12px; background: #f8f9fc; border-radius: 10px; }
.billing-breakdown small,.billing-breakdown strong,.billing-breakdown em { display: block; }
.billing-breakdown small { margin-bottom: 5px; color: #8991a0; font-size: 8px; }
.billing-breakdown strong { font-size: 13px; }
.billing-breakdown em { margin-top: 4px; color: #858d9c; font-size: 10px; font-style: normal; }
.monthly-payment-amount { color: var(--primary); }
.payment-status { display: inline-flex; width: fit-content; padding: 5px 7px; border-radius: 7px; font-size: 8px; font-weight: 800; }
.payment-status-paid,.payment-status-not_required { color: #16815d; background: var(--green-soft); }
.payment-status-pending { color: #a96917; background: var(--orange-soft); }
.payment-status-overdue { color: #b23d51; background: var(--red-soft); }
.payment-status-cancelled { color: #727b8b; background: #eef0f4; }
.billing-empty { padding: 22px; color: #8991a0; font-size: 10px; text-align: center; }
.billing-notifications-panel,.monthly-admin-panel { margin-bottom: 20px; }
.billing-notification-list { padding: 13px; display: grid; gap: 8px; background: #fafbfc; }
.admin-billing-notification { padding: 11px 13px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: center; gap: 15px; background: white; border: 1px solid #f0d8a6; border-radius: 10px; }
.admin-billing-notification.billing-alert-overdue,.admin-billing-notification.billing-alert-today { border-color: #f2cbd2; }
.admin-billing-notification > div:nth-child(2) strong,.admin-billing-notification > div:nth-child(2) small,.notification-amount small,.notification-amount strong { display: block; }
.admin-billing-notification > div:nth-child(2) strong { font-size: 10px; }
.admin-billing-notification > div:nth-child(2) small { margin-top: 4px; color: #858d9c; font-size: 8px; }
.notification-amount { text-align: right; }
.notification-amount small { color: #8991a0; font-size: 8px; }
.notification-amount strong { margin-top: 3px; color: var(--primary); font-size: 13px; }
.monthly-panel-count { padding: 7px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 9px; font-weight: 750; }
.admin-billing-companies { padding: 14px; display: grid; gap: 12px; background: #f8f9fc; }
.admin-billing-company { overflow: hidden; background: white; border: 1px solid #e6e9ef; border-radius: 13px; }
.admin-billing-company-head { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f4; }
.admin-billing-summary { padding: 14px 15px; display: grid; grid-template-columns: 1fr 1fr .8fr 1.2fr; align-items: end; gap: 12px; }
.admin-billing-summary > div { min-width: 0; }
.admin-billing-summary > div > span,.admin-billing-summary > div > strong,.admin-billing-summary > div > small { display: block; }
.admin-billing-summary > div > span { margin-bottom: 5px; color: #8991a0; font-size: 8px; }
.admin-billing-summary > div > strong { font-size: 11px; }
.admin-billing-summary > div:first-child > strong { color: var(--primary); font-size: 15px; }
.admin-billing-summary > div > small { margin-top: 4px; color: #858d9c; font-size: 8px; }
.billing-date-form { display: flex; align-items: flex-end; gap: 7px; }
.billing-date-form label { min-width: 0; flex: 1; }
.billing-date-form label span { display: block; margin-bottom: 5px; color: #8991a0; font-size: 8px; }
.billing-date-form input { width: 100%; height: 34px; padding: 0 8px; background: #fafbfc; border: 1px solid #dfe2e8; border-radius: 8px; font: inherit; font-size: 9px; }
.billing-date-form .button { flex: 0 0 auto; }
.admin-payment-history { border-top: 1px solid #edf0f4; }
.admin-payment-row { padding: 11px 15px; display: grid; grid-template-columns: .75fr 1.3fr .5fr .7fr .8fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #f0f2f5; }
.admin-payment-row:last-child { border-bottom: 0; }
.admin-payment-row > span > small,.admin-payment-row > span > strong { display: block; }
.admin-payment-row > span > small { margin-bottom: 4px; color: #9299a7; font-size: 7px; }
.admin-payment-row > span > strong { font-size: 9px; }
.admin-payment-row > span:nth-child(4) > strong { color: var(--primary); font-size: 11px; }
.admin-payment-row form { margin: 0; }
.payment-confirmed-at { color: #858d9c; font-size: 8px; }

@media (max-width: 900px) {
    .admin-billing-summary { grid-template-columns: 1fr 1fr; }
    .admin-payment-row { grid-template-columns: 1fr 1fr 1fr; }
    .admin-payment-row form,.payment-confirmed-at { justify-self: start; }
}
@media (max-width: 700px) {
    .billing-alert { align-items: flex-start; flex-wrap: wrap; }
    .billing-alert .button { width: 100%; }
    .company-billing-summary { grid-template-columns: 1fr; }
    .billing-next-date { width: 100%; }
    .billing-breakdown { grid-template-columns: 1fr; padding: 14px; }
    .monthly-total { text-align: left; }
    .monthly-payments-table,.monthly-payments-table tbody,.monthly-payments-table tr,.monthly-payments-table td { display: block; width: 100%; white-space: normal; }
    .monthly-payments-table thead { display: none; }
    .monthly-payments-table tbody { padding: 4px 14px 14px; }
    .monthly-payments-table tr { padding: 9px 0; border-bottom: 1px solid #edf0f4; }
    .monthly-payments-table tr:last-child { border-bottom: 0; }
    .monthly-payments-table td { padding: 6px 0; border: 0; }
    .monthly-payments-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .admin-billing-notification { grid-template-columns: 1fr; }
    .notification-amount { text-align: left; }
    .admin-billing-company-head { align-items: flex-start; flex-direction: column; }
    .admin-billing-summary { grid-template-columns: 1fr; }
    .billing-date-form { align-items: stretch; flex-direction: column; }
    .billing-date-form .button { width: 100%; }
    .admin-payment-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
    .admin-payment-row { grid-template-columns: 1fr; }
}

/* Per-company payment report */
.company-payments-link { min-height: 31px; padding: 0 11px; font-size: 8px; }
.admin-billing-notification { grid-template-columns: minmax(200px, 1fr) minmax(190px, 1fr) auto auto; }
.payment-page-nav { margin-bottom: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #737c8c; font-size: 9px; font-weight: 750; text-decoration: none; }
.back-link span { width: 25px; height: 25px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 13px; transition: transform .2s ease; }
.back-link:hover span { transform: translateX(-2px); }
.payment-company-heading { margin-bottom: 18px; }
.payment-report-stats { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.payment-report-stats article { min-width: 0; padding: 15px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.payment-report-stats span,.payment-report-stats strong,.payment-report-stats small { display: block; }
.payment-report-stats span { margin-bottom: 7px; color: #8c94a3; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.payment-report-stats strong { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.payment-report-stats article:nth-child(2) strong { color: var(--primary); }
.payment-report-stats small { margin-top: 5px; color: #7f8796; font-size: 8px; line-height: 1.4; }
.payment-admin-grid { margin-bottom: 20px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; }
.payment-admin-grid .panel { margin: 0; }
.trial-state,.refund-waiting { padding: 6px 8px; border-radius: 7px; font-size: 8px; font-weight: 800; }
.trial-state-active { color: #16815d; background: var(--green-soft); }
.trial-state-finished { color: #727b8b; background: #eef0f4; }
.trial-state-scheduled { color: #8357d2; background: var(--primary-soft); }
.trial-form { padding: 16px 18px 10px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; }
.trial-form label span,.first-payment-form label span,.manual-payment-form label > span,.refund-form label > span { display: block; margin-bottom: 5px; color: #858e9e; font-size: 8px; font-weight: 750; }
.trial-form input,.first-payment-form input,.manual-payment-form input,.manual-payment-form select,.refund-form input,.refund-form select { width: 100%; height: 36px; padding: 0 9px; color: var(--ink); background: #fafbfc; border: 1px solid #dfe3e9; border-radius: 8px; outline: none; font: inherit; font-size: 9px; transition: border-color .2s ease, box-shadow .2s ease; }
.trial-form input:focus,.first-payment-form input:focus,.manual-payment-form input:focus,.manual-payment-form select:focus,.refund-form input:focus,.refund-form select:focus { border-color: #a5a7f6; box-shadow: 0 0 0 3px rgba(91,92,240,.08); }
.trial-timeline { height: 6px; margin: 8px 18px 0; overflow: hidden; background: #ebeef3; border-radius: 99px; }
.trial-timeline i { width: var(--trial-progress); height: 100%; display: block; background: linear-gradient(90deg, #7778f6, #54c69f); border-radius: inherit; transition: width .5s ease; }
.trial-dates { padding: 6px 18px 15px; display: flex; justify-content: space-between; color: #8d95a4; font-size: 8px; }
.current-charge-total { padding: 16px 18px 12px; }
.current-charge-total span,.current-charge-total strong,.current-charge-total small { display: block; }
.current-charge-total span { margin-bottom: 5px; color: #8991a0; font-size: 8px; }
.current-charge-total strong { color: var(--primary); font-size: 18px; }
.current-charge-total small { margin-top: 5px; color: #7d8594; font-size: 8px; }
.charge-units { padding: 0 18px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.charge-units > span { padding: 10px 11px; background: #f8f9fc; border-radius: 9px; }
.charge-units small,.charge-units strong,.charge-units em { display: block; }
.charge-units small { color: #8a92a1; font-size: 8px; }
.charge-units strong { margin-top: 4px; font-size: 13px; }
.charge-units em { margin-top: 3px; color: #7e8797; font-size: 8px; font-style: normal; }
.first-payment-form { padding: 13px 18px 16px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; border-top: 1px solid #eef0f4; }
.payment-ledger-panel,.purchase-report-panel,.refund-panel { margin-bottom: 20px; }
.payment-ledger-list { padding: 14px; display: grid; gap: 11px; background: #f8f9fc; }
.payment-ledger-item { overflow: hidden; background: white; border: 1px solid #e4e8ee; border-radius: 12px; }
.payment-ledger-head { padding: 13px 15px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
.payment-ledger-head > div > span,.payment-ledger-head > div > strong,.payment-ledger-head > div > small { display: block; }
.payment-ledger-head > div > span { margin-bottom: 4px; color: #9098a6; font-size: 8px; }
.payment-ledger-head > div > strong { font-size: 11px; }
.payment-ledger-head > div > small { margin-top: 4px; color: #8a92a1; font-size: 8px; }
.ledger-amount { min-width: 105px; text-align: right; }
.ledger-amount strong { color: var(--primary); font-size: 15px !important; }
.ledger-breakdown { padding: 9px 15px; display: flex; flex-wrap: wrap; gap: 7px; background: #fafbfc; border-top: 1px solid #eef0f4; border-bottom: 1px solid #eef0f4; }
.ledger-breakdown span { padding: 5px 7px; color: #727b8b; background: white; border: 1px solid #e7eaf0; border-radius: 6px; font-size: 8px; }
.manual-payment-form { padding: 13px 15px; display: grid; grid-template-columns: .75fr .8fr .85fr 1fr 1.25fr auto; align-items: end; gap: 8px; }
.manual-payment-form label { min-width: 0; }
.input-with-suffix { display: flex; align-items: center; overflow: hidden; background: #fafbfc; border: 1px solid #dfe3e9; border-radius: 8px; }
.input-with-suffix input { min-width: 0; border: 0; border-radius: 0; box-shadow: none !important; }
.input-with-suffix b { padding-right: 9px; color: #838b99; font-size: 8px; }
.payment-confirmation-line { padding: 9px 15px; color: #287c61; background: #f2fbf7; border-top: 1px solid #d8f0e6; font-size: 8px; }
.payment-confirmation-line small { display: block; margin-top: 3px; color: inherit; font-size: 8px; line-height: 1.45; }
.purchase-total { text-align: right; }
.purchase-total span,.purchase-total strong { display: block; }
.purchase-total span { color: #8991a0; font-size: 8px; }
.purchase-total strong { margin-top: 4px; color: var(--primary); font-size: 14px; }
.payment-purchases-table strong { font-size: 9px; }
.refund-panel { border-color: #e7e9ee; }
.refund-panel-active { border-color: #f1d4a8; }
.refund-waiting { color: #737c8c; background: #f0f2f5; }
.refund-list { padding: 14px; display: grid; gap: 10px; background: #fffaf2; }
.refund-card { padding: 14px; display: grid; grid-template-columns: 1fr .8fr auto; align-items: center; gap: 14px; background: white; border: 1px solid #efdfc6; border-radius: 11px; }
.refund-calculation span,.refund-calculation strong,.refund-calculation small { display: block; }
.refund-calculation span { margin-bottom: 4px; color: #9299a6; font-size: 8px; }
.refund-calculation strong { font-size: 11px; }
.refund-calculation:nth-child(2) strong { color: #b36e18; font-size: 15px; }
.refund-calculation small { margin-top: 4px; color: #858e9d; font-size: 8px; }
.refund-form { grid-column: 1 / -1; padding-top: 12px; display: grid; grid-template-columns: .8fr .9fr 1.4fr auto; align-items: end; gap: 8px; border-top: 1px solid #efe5d5; }
.refund-processed { grid-column: 1 / -1; color: #7e8795; font-size: 8px; }
.refund-empty { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.refund-empty strong { display: block; font-size: 11px; }
.refund-empty p { margin: 4px 0 0; color: #818998; font-size: 9px; }

@media (max-width: 1050px) {
    .payment-report-stats { grid-template-columns: 1fr 1fr; }
    .manual-payment-form { grid-template-columns: 1fr 1fr 1fr; }
    .manual-payment-note { grid-column: span 2; }
    .manual-payment-form .button { width: 100%; }
}
@media (max-width: 800px) {
    .payment-admin-grid { grid-template-columns: 1fr; }
    .refund-card { grid-template-columns: 1fr 1fr; }
    .refund-card > .payment-status { justify-self: start; }
    .refund-form { grid-template-columns: 1fr 1fr; }
    .admin-billing-notification { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .admin-billing-notification { grid-template-columns: 1fr; }
    .payment-report-stats { grid-template-columns: 1fr; }
    .payment-report-stats strong { white-space: normal; }
    .trial-form,.first-payment-form { grid-template-columns: 1fr; }
    .trial-form .button,.first-payment-form .button { width: 100%; }
    .payment-ledger-head { grid-template-columns: 1fr; align-items: flex-start; }
    .ledger-amount { text-align: left; }
    .manual-payment-form { grid-template-columns: 1fr; }
    .manual-payment-note { grid-column: auto; }
    .payment-purchases-table,.payment-purchases-table tbody,.payment-purchases-table tr,.payment-purchases-table td { display: block; width: 100%; white-space: normal; }
    .payment-purchases-table thead { display: none; }
    .payment-purchases-table tbody { padding: 4px 14px 14px; }
    .payment-purchases-table tr { padding: 9px 0; border-bottom: 1px solid #edf0f4; }
    .payment-purchases-table td { padding: 6px 0; border: 0; }
    .payment-purchases-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .refund-card,.refund-form { grid-template-columns: 1fr; }
    .refund-empty { align-items: stretch; flex-direction: column; }
    .refund-empty .button { width: 100%; }
}

/* Wildberries order feed */
.integration-summary { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.integration-summary article { padding: 15px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.integration-summary span,.integration-summary strong,.integration-summary small { display: block; }
.integration-summary > article > span { margin-bottom: 6px; color: #8a92a1; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.integration-summary > article > strong { font-size: 14px; }
.integration-summary > article > small { margin-top: 5px; color: #858d9c; font-size: 8px; line-height: 1.4; }
.admin-order-storage { margin: -8px 0 20px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: linear-gradient(110deg, #fff 0%, #f7f7ff 100%); border: 1px solid #dfe2ed; border-radius: 13px; box-shadow: var(--shadow-sm); }
.admin-order-storage-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.admin-order-storage-icon svg { width: 20px; height: 20px; }
.admin-order-storage > div > span,.admin-order-storage > div > strong,.admin-order-storage > div > small { display: block; }
.admin-order-storage > div > span { color: #858e9e; font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-order-storage > div > strong { margin-top: 4px; font-size: 11px; }
.admin-order-storage > div > small { margin-top: 4px; color: #7b8494; font-size: 8px; line-height: 1.45; }
.storage-ready { padding: 7px 9px; border-radius: 8px; font-size: 7px; font-weight: 850; white-space: nowrap; }
.storage-ready-yes { color: #16815d; background: var(--green-soft); }
.storage-ready-no { color: #b23d51; background: var(--red-soft); }
.feed-state-success { color: var(--green); }
.feed-state-error { color: var(--red); }
.feed-state-running { color: #b2761d; }
.admin-feed-grid { margin-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 14px; align-items: start; }
.admin-feed-grid .panel { margin: 0; }
.feed-toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.feed-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.feed-toggle > span { width: 35px; height: 20px; padding: 2px; background: #d8dce5; border-radius: 99px; transition: background .2s ease; }
.feed-toggle > span::before { content: ''; width: 16px; height: 16px; display: block; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(17,24,39,.2); transition: transform .2s ease; }
.feed-toggle input:checked + span { background: var(--primary); }
.feed-toggle input:checked + span::before { transform: translateX(15px); }
.feed-toggle b { color: #697282; font-size: 8px; }
.order-feed-settings-form { padding: 17px 19px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.feed-form-field { min-width: 0; }
.feed-form-wide { grid-column: span 2; }
.feed-form-field > span,.feed-form-field > small { display: block; }
.feed-form-field > span { margin-bottom: 6px; color: #687181; font-size: 8px; font-weight: 800; }
.feed-form-field > small { margin-top: 5px; color: #9299a6; font-size: 7px; line-height: 1.4; }
.feed-form-field input,.feed-form-field select { width: 100%; height: 38px; padding: 0 10px; background: #fafbfc; border: 1px solid #dfe3e9; border-radius: 8px; outline: none; font: inherit; font-size: 9px; }
.feed-form-field input:focus,.feed-form-field select:focus { border-color: #a8aaf5; box-shadow: 0 0 0 3px rgba(91,92,240,.08); }
.feed-form-actions { grid-column: 1 / -1; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #edf0f4; }
.feed-form-actions > span { color: #8b93a1; font-size: 8px; }
.wb-source-list { padding: 10px 14px; display: grid; gap: 7px; }
.wb-source-list > div { padding: 10px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; background: #f8f9fc; border-radius: 9px; }
.wb-source-list p { min-width: 0; margin: 0; }
.wb-source-list strong,.wb-source-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-source-list strong { font-size: 9px; }
.wb-source-list small { margin-top: 3px; color: #8891a0; font-size: 7px; }
.wb-source-list > div > i { color: var(--green); font-size: 7px; font-style: normal; font-weight: 800; }
.feed-run-block { padding: 14px; border-top: 1px solid #edf0f4; }
.feed-run-block form,.feed-run-block .button { width: 100%; }
.feed-run-block > small { display: block; margin-top: 8px; color: #8b93a2; font-size: 7px; line-height: 1.5; text-align: center; }
.feed-run-block .button:disabled { cursor: not-allowed; opacity: .55; }
.button-spinner { width: 12px; height: 12px; display: inline-block; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: button-spin .8s linear infinite; }
.feed-last-error { margin-bottom: 10px; padding: 10px; color: #a83d50; background: var(--red-soft); border-radius: 8px; }
.feed-last-error strong { display: block; font-size: 8px; }
.feed-last-error p { margin: 4px 0 0; font-size: 7px; line-height: 1.45; }
.feed-log-panel { margin-bottom: 20px; }
.feed-log-list { max-height: 580px; overflow: auto; }
.feed-log-row { padding: 11px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; border-bottom: 1px solid #eef0f4; }
.feed-log-row:last-child { border-bottom: 0; }
.feed-log-row > span { width: 25px; height: 25px; display: grid; place-items: center; color: #657080; background: #eef1f5; border-radius: 7px; font-size: 9px; font-weight: 850; }
.feed-log-success > span { color: var(--green); background: var(--green-soft); }
.feed-log-error > span { color: var(--red); background: var(--red-soft); }
.feed-log-other > span { color: var(--primary); background: var(--purple-soft); }
.feed-log-row strong { display: block; font-size: 11px; }
.feed-log-row p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.feed-log-row time { color: var(--muted); font-size: 10px; text-align: right; }
.feed-log-row time small { display: block; margin-top: 3px; font-size: 9px; }
.report-live-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 16px 14px;
    padding: 12px 14px;
    color: var(--blue);
    background: var(--blue-soft);
    border: 1px solid color-mix(in srgb, var(--blue) 18%, transparent);
    border-radius: 12px;
}
.report-live-progress > span:not(.button-spinner) {
    display: grid;
    place-items: center;
    flex: 0 0 25px;
    height: 25px;
    border-radius: 8px;
    color: var(--red);
    background: var(--red-soft);
    font-weight: 900;
}
.report-live-progress strong { display: block; font-size: 12px; }
.report-live-progress p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.report-live-progress-error {
    color: var(--red);
    background: var(--red-soft);
    border-color: color-mix(in srgb, var(--red) 18%, transparent);
}
@keyframes button-spin { to { transform: rotate(360deg); } }

.orders-sync-time { padding: 9px 11px; display: flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-sm); }
.orders-sync-time > i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.orders-sync-time span,.orders-sync-time strong { display: block; }
.orders-sync-time span { color: #8b93a1; font-size: 10px; }
.orders-sync-time strong { margin-top: 3px; color: var(--ink); font-size: 12px; }
.orders-storage-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; }
.orders-storage-icon svg { width: 20px; height: 20px; stroke-width: 1.9; }
.orders-storage-badge { min-width: 130px; padding: 8px 10px; color: var(--primary); background: white; border: 1px solid #e0e2ee; border-radius: 9px; font-size: 9px; font-weight: 850; text-align: center; }
.orders-storage-badge small { margin-top: 3px; display: block; color: #8b93a2; font-size: 7px; font-weight: 650; }
.orders-empty-state { padding: 70px 25px; display: grid; justify-items: center; text-align: center; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.orders-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, #9d35ee, #6556e8); border-radius: 17px; box-shadow: 0 12px 30px rgba(110,73,225,.25); font-size: 22px; font-weight: 900; }
.orders-empty-state > span { margin-top: 15px; color: var(--primary); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.orders-empty-state h2 { margin: 8px 0 0; font-size: 20px; }
.orders-empty-state p { max-width: 560px; margin: 8px 0 0; color: #747d8d; font-size: 10px; line-height: 1.6; }
.orders-loading { margin-top: 16px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; color: white; background: var(--primary); border-radius: 9px; font-size: 8px; font-weight: 800; }
.orders-stats { margin-bottom: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.orders-stats article { padding: 14px 15px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.orders-stats span,.orders-stats strong,.orders-stats small { display: block; }
.orders-stats span { margin-bottom: 6px; color: #8992a1; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.orders-stats strong { font-size: 16px; }
.orders-stats small { margin-top: 5px; color: #8a92a1; font-size: 10px; line-height: 1.4; }
.orders-stat-amount strong { color: var(--primary); }
.orders-panel { margin-bottom: 20px; }
.orders-panel-head { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #edf0f4; }
.orders-panel-head h2 { margin: 0; font-size: var(--ui-font-block-title,16px); }
.orders-panel-head p { margin: 4px 0 0; color: #8992a1; font-size: var(--ui-font-indicator-caption,11px); line-height: 1.45; }
.orders-fast-note { display: inline-flex; align-items: center; gap: 6px; color: #738091; font-size: var(--ui-font-indicator-caption,11px); font-weight: 700; }
.orders-fast-note i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.orders-filter-shell { padding: 13px 18px; background: #fafbfe; border-bottom: 1px solid #edf0f4; }
.orders-filter-form { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 9px; }
.orders-filter-form label { min-width: 0; grid-column: span 2; }
.orders-filter-form label > span { display: block; margin-bottom: 5px; color: #858e9d; font-size: 7px; font-weight: 750; }
.orders-filter-form select,.orders-filter-form input { width: 100%; height: 38px; padding: 0 9px; color: #30394b; background: white; border: 1px solid #dfe3e9; border-radius: 8px; outline: none; font: inherit; font-size: 8px; transition: border-color .2s, box-shadow .2s; }
.orders-filter-form select:focus,.orders-filter-form input:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.09); }
.orders-search { min-width: 0 !important; grid-column: span 4 !important; }
.orders-filter-actions { grid-column: span 2; display: flex; gap: 7px; }
.orders-filter-actions .button { flex: 1; min-width: 0; padding-left: 11px; padding-right: 11px; }
.orders-filter-error { margin-bottom: 10px; padding: 9px 11px; display: flex; align-items: center; gap: 8px; color: #a43b4e; background: var(--red-soft); border: 1px solid #f7d9df; border-radius: 9px; font-size: 8px; }
.orders-filter-error strong { font-size: 8px; }
.orders-filter-error span { color: #8e5360; }
.orders-table td { vertical-align: middle; }
.order-srid { max-width: 150px; margin-top: 4px; display: block; overflow: hidden; color: #9299a6; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.order-status { display: inline-flex; padding: 5px 7px; border-radius: 7px; font-size: 10px; font-weight: 850; }
.order-status-buyout { color: #16815d; background: var(--green-soft); }
.order-status-created { color: #7b5ac3; background: var(--primary-soft); }
.order-status-cancel,.order-status-return,.order-status-returnDefective { color: #b23d51; background: var(--red-soft); }
.order-status-unknown { color: #6f7887; background: #eef0f4; }
.order-price { color: var(--primary); }
.orders-pagination { padding: 12px 17px; display: flex; align-items: center; justify-content: center; gap: 14px; border-top: 1px solid #edf0f4; }
.orders-pagination a,.orders-pagination span { font-size: 10px; font-weight: 750; }
.orders-pagination a { color: var(--primary); text-decoration: none; }
.orders-pagination span { color: #7e8796; }

@media (max-width: 1100px) {
    .integration-summary { grid-template-columns: 1fr 1fr; }
    .orders-stats { grid-template-columns: repeat(3, 1fr); }
    .orders-panel-head { align-items: stretch; flex-direction: column; }
    .orders-filter-form { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 850px) {
    .admin-feed-grid { grid-template-columns: 1fr; }
    .order-feed-settings-form { grid-template-columns: 1fr 1fr; }
    .feed-form-wide { grid-column: span 2; }
}
@media (max-width: 700px) {
    .company-sections-shell { padding-top: 10px; }
    .company-section-nav { width: 100%; }
    .company-section-link { min-width: 160px; }
    .company-sections-shell ~ main .workspace { padding-top: 22px; }
    .integration-summary,.orders-stats { grid-template-columns: 1fr; }
    .admin-order-storage { grid-template-columns: auto 1fr; }
    .admin-order-storage .storage-ready { grid-column: 1 / -1; text-align: center; }
    .order-feed-settings-form { grid-template-columns: 1fr; padding: 14px; }
    .feed-form-wide { grid-column: auto; }
    .feed-form-actions { align-items: stretch; flex-direction: column; }
    .feed-form-actions .button { width: 100%; }
    .feed-toggle { width: 100%; }
    .feed-log-row { grid-template-columns: auto 1fr; }
    .feed-log-row time { grid-column: 2; text-align: left; }
    .orders-sync-time { width: 100%; }
    .orders-storage-badge { grid-column: 1 / -1; width: 100%; }
    .orders-panel-head { align-items: flex-start; }
    .orders-filter-form { display: grid; grid-template-columns: 1fr; }
    .orders-filter-form label,.orders-search,.orders-sort { min-width: 0 !important; grid-column: auto !important; }
    .orders-filter-actions { grid-column: auto; }
    .orders-filter-form .button { width: 100%; }
    .orders-table,.orders-table tbody,.orders-table tr,.orders-table td { display: block; width: 100%; white-space: normal; }
    .orders-table thead { display: none; }
    .orders-table tbody { padding: 4px 14px 14px; }
    .orders-table tr { padding: 10px 0; border-bottom: 1px solid #edf0f4; }
    .orders-table td { padding: 6px 0; border: 0; text-align: left !important; }
    .orders-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #9aa1ae; font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
}

/* FBS orders */
.fbs-order-tabs { width: fit-content; margin: -8px 0 18px; padding: 4px; display: flex; gap: 4px; background: #e9ecf3; border-radius: 11px; }
.fbs-order-tabs a { min-height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 9px; color: #5f697b; border-radius: 8px; font-size: 10px; font-weight: 800; }
.fbs-order-tabs a.active { color: var(--ink); background: var(--surface); box-shadow: 0 3px 11px rgba(32,39,61,.08); }
.fbs-order-tabs b { min-width: 22px; padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 9px; text-align: center; }
.orders-catalog-warning { color: #9a641a; background: var(--orange-soft); border-color: #f4d9b8; }
.orders-catalog-warning span { color: #8d6737; }
.fbs-filter-form { grid-template-columns: repeat(10,minmax(0,1fr)); }
.fbs-filter-form label { grid-column: span 2; }
.fbs-filter-form .orders-search { grid-column: span 4 !important; }
.fbs-orders-table { min-width: 1040px; }
.fbs-orders-table td:first-child { min-width: 205px; }
.fbs-orders-stats { grid-template-columns: repeat(6,minmax(0,1fr)); }
.fbs-delivery-stat strong { color: var(--primary); }
.fbs-order-row { cursor: pointer; transition: background .18s; }
.fbs-order-row:hover,.fbs-order-row.is-expanded { background: color-mix(in srgb,var(--primary) 4%,var(--surface)); }
.fbs-order-trigger { width: 100%; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); background: transparent; border: 0; cursor: pointer; text-align: left; }
.fbs-order-trigger:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 32%,transparent); outline-offset: 4px; border-radius: 5px; }
.fbs-order-trigger > span,.fbs-order-trigger strong,.fbs-order-trigger small { display: block; }
.fbs-order-trigger small { margin-top: 3px; color: var(--primary); font-size: 7px; font-weight: 750; }
.fbs-order-trigger svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .18s; }
.fbs-order-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.fbs-internal-name { max-width: 230px; margin-top: 5px; display: block; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.fbs-delivery-time { margin-top: 5px; display: block; color: var(--green); font-size: 8px; font-weight: 800; }
.fbs-order-composition > td { padding: 0 !important; background: color-mix(in srgb,var(--primary) 3%,var(--surface)); border-bottom: 1px solid var(--line); }
.fbs-order-composition[hidden] { display: none !important; }
.fbs-composition-panel { margin: 0 14px 14px; padding: 15px; background: var(--surface); border: 1px solid color-mix(in srgb,var(--primary) 18%,var(--line)); border-radius: 12px; box-shadow: var(--shadow-sm); }
.fbs-composition-head { padding-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.fbs-composition-head span { color: var(--primary); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.fbs-composition-head h3 { margin: 5px 0 0; font-size: 13px; }
.fbs-composition-head .fbs-composition-price { color: var(--ink); font-size: 14px; white-space: nowrap; }
.fbs-composition-grid { padding: 12px 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.fbs-composition-grid article { min-width: 0; padding: 11px; background: var(--soft); border-radius: 9px; }
.fbs-composition-grid article > span,.fbs-composition-grid article > strong,.fbs-composition-grid article > small { display: block; }
.fbs-composition-grid article > span { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.fbs-composition-grid article > strong { margin-top: 7px; font-size: 10px; }
.fbs-composition-grid article > small { margin-top: 5px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.fbs-catalog-status { font-style: normal; }
.fbs-tag-list { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.fbs-tag-list span { padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 7px; font-weight: 750; }
.fbs-tag-list small { color: var(--muted); font-size: 8px; }
.fbs-composition-meta { padding-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px 14px; border-top: 1px solid var(--line); }
.fbs-composition-meta span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.fbs-composition-meta b { margin-right: 6px; color: var(--ink); }
.fbs-supplier-new { color: #9a641a; background: var(--orange-soft); }
.fbs-supplier-confirm { color: #6050c6; background: var(--primary-soft); }
.fbs-supplier-complete,.fbs-wb-sold { color: #16815d; background: var(--green-soft); }
.fbs-supplier-cancel,.fbs-wb-canceled,.fbs-wb-canceled_by_client,.fbs-wb-declined_by_client,.fbs-wb-defect { color: #b23d51; background: var(--red-soft); }
.fbs-wb-waiting,.fbs-wb-ready_for_pickup { color: #1c6b9b; background: #e4f3ff; }
.fbs-wb-sorted { color: #6c50ba; background: var(--primary-soft); }
.fbs-wb-unknown { color: #6f7887; background: #eef0f4; }
html[data-theme="dark"] .fbs-order-tabs { background: #111a27; }
html[data-theme="dark"] .fbs-order-tabs a { color: #b5c0d0; }
html[data-theme="dark"] .fbs-order-tabs a.active { background: var(--surface); }
html[data-theme="dark"] .orders-catalog-warning { color: var(--orange); background: var(--orange-soft); border-color: #6b4c2b; }
html[data-theme="dark"] .orders-catalog-warning span { color: #f1c38c; }
html[data-theme="dark"] .fbs-supplier-new { color: #ffd08b; }
html[data-theme="dark"] .fbs-supplier-confirm,html[data-theme="dark"] .fbs-wb-sorted { color: #bbb5ff; }
html[data-theme="dark"] .fbs-supplier-complete,html[data-theme="dark"] .fbs-wb-sold { color: #79e5bd; }
html[data-theme="dark"] .fbs-supplier-cancel,html[data-theme="dark"] .fbs-wb-canceled,html[data-theme="dark"] .fbs-wb-canceled_by_client,html[data-theme="dark"] .fbs-wb-declined_by_client,html[data-theme="dark"] .fbs-wb-defect { color: #ff9aaa; }
html[data-theme="dark"] .fbs-wb-waiting,html[data-theme="dark"] .fbs-wb-ready_for_pickup { color: #82cfff; background: rgba(41,139,200,.16); }
html[data-theme="dark"] .fbs-wb-unknown { color: #a7b0bd; background: #202a38; }
html[data-theme="dark"] .fbs-order-row:hover,html[data-theme="dark"] .fbs-order-row.is-expanded,html[data-theme="dark"] .fbs-order-composition > td { background: #111a27; }
@media (max-width: 1100px) { .fbs-filter-form { grid-template-columns: repeat(6,minmax(0,1fr)); }.fbs-orders-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }.fbs-composition-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .fbs-order-tabs { width: 100%; }.fbs-order-tabs a { min-width: 0; flex: 1; justify-content: center; text-align: center; }.fbs-filter-form,.fbs-orders-stats,.fbs-composition-grid,.fbs-composition-meta { grid-template-columns: 1fr; }.fbs-orders-table { min-width: 0; }.fbs-order-composition { padding: 0 !important; }.fbs-order-composition > td::before { display: none !important; }.fbs-composition-panel { margin: 0 0 10px; }.fbs-composition-head { align-items: flex-start; flex-direction: column; } }

/* FBW supplies */
.supplies-stats { grid-template-columns: repeat(6,minmax(0,1fr)); }
.supplies-stats article { padding: 17px 18px; }
.supplies-stats span { font-size: 11px; }
.supplies-stats strong { font-size: 21px; }
.supplies-stats small { font-size: 11px; }
.supply-stat-warning strong { color: var(--red); }
.supplies-filter-form { grid-template-columns: repeat(12,minmax(0,1fr)); }
.supplies-filter-form > label { grid-column: span 2; }
.supplies-filter-form .orders-search { grid-column: span 4 !important; }
.supply-discrepancy-filter { min-height: 38px; padding: 0 10px; display: flex !important; align-items: center; gap: 8px; align-self: end; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.supply-discrepancy-filter input { width: 15px !important; height: 15px !important; margin: 0; accent-color: var(--primary); }
.supply-discrepancy-filter span { margin: 0 !important; color: var(--ink) !important; font-size: 11px !important; text-transform: none !important; }
.supply-list { padding: 12px; display: grid; gap: 9px; background: color-mix(in srgb,var(--soft) 70%,var(--surface)); }
.supply-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 8px rgba(31,39,64,.035); overflow: hidden; }
.supply-card > summary { min-height: 96px; padding: 17px 18px; display: grid; grid-template-columns: minmax(205px,1.25fr) minmax(130px,.8fr) minmax(165px,1fr) minmax(145px,.9fr) minmax(160px,.9fr) minmax(110px,.6fr) 22px; align-items: center; gap: 14px; list-style: none; cursor: pointer; }
.supply-card > summary::-webkit-details-marker { display: none; }
.supply-card > summary:hover { background: color-mix(in srgb,var(--primary) 3%,var(--surface)); }
.supply-card[open] > summary { background: color-mix(in srgb,var(--primary) 5%,var(--surface)); border-bottom: 1px solid var(--line); }
.supply-card > summary > span:not(.supply-id-cell) { min-width: 0; }
.supply-card > summary small,.supply-card > summary b,.supply-card > summary em { display: block; }
.supply-card > summary small { margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.supply-card > summary b { overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.supply-card > summary em { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.supply-card > summary > svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform .18s; }
.supply-card[open] > summary > svg { transform: rotate(180deg); }
.supply-id-cell { min-width: 0; display: flex; align-items: center; gap: 12px; }
.supply-id-cell > i { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 11px; font-style: normal; font-weight: 850; }
.supply-id-cell > span { min-width: 0; }
.supply-id-cell strong { display: block; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.supply-id-cell small { margin: 6px 0 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supply-status { width: fit-content; padding: 7px 10px; border-radius: 8px; }
.supply-status-draft { color: #6d7584 !important; background: #eef0f4; }
.supply-status-planned,.supply-status-shipped { color: #235f94 !important; background: #e6f3ff; }
.supply-status-allowed { color: #6550bd !important; background: var(--primary-soft); }
.supply-status-acceptance { color: #986112 !important; background: var(--orange-soft); }
.supply-status-accepted { color: #16815d !important; background: var(--green-soft); }
.supply-discrepancy-cell .has-discrepancy { color: var(--red); }
.supply-detail-panel { padding: 18px; background: color-mix(in srgb,var(--soft) 55%,var(--surface)); }
.supply-detail-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.supply-detail-grid article { min-width: 0; min-height: 84px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.supply-detail-grid article > span,.supply-detail-grid article > strong,.supply-detail-grid article > small { display: block; }
.supply-detail-grid article > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.supply-detail-grid article > strong { margin-top: 8px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.supply-detail-grid article > small { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.supply-products-section,.supply-discrepancies-section { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.supply-products-section > header,.supply-discrepancies-section > header { min-height: 72px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.supply-products-section > header span,.supply-discrepancies-section > header span { color: var(--primary); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.supply-products-section > header h3,.supply-discrepancies-section > header h3 { margin: 5px 0 0; font-size: 17px; }
.supply-products-section > header > small { max-width: 440px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: right; }
.supply-goods-table { min-width: 940px; }
.supply-goods-table th,.supply-goods-table td { padding: 15px 17px; }
body.supplies-page .supply-goods-table th { font-size: 11px; }
body.supplies-page .supply-goods-table td { font-size: 14px; line-height: 1.45; }
body.supplies-page .supply-goods-table td small { margin-top: 5px; font-size: 11px; }
.supply-kiz { display: inline-flex; padding: 6px 9px; border-radius: 8px; font-size: 10px; font-weight: 800; }
.supply-kiz-yes { color: #986112; background: var(--orange-soft); }
.supply-kiz-no { color: #16815d; background: var(--green-soft); }
.supply-discrepancies-section > header > strong { min-width: 36px; padding: 7px 10px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 13px; text-align: center; }
.supply-discrepancy-list { padding: 10px; display: grid; gap: 7px; }
.supply-discrepancy-list article { padding: 12px 13px; display: grid; grid-template-columns: auto minmax(120px,1fr) minmax(180px,2fr) auto; align-items: center; gap: 11px; background: var(--soft); border-radius: 8px; }
.supply-discrepancy-list article > strong { font-size: 13px; }
.supply-discrepancy-list article > small { color: var(--muted); font-size: 11px; }
.supply-discrepancy-list article > b { color: var(--red); font-size: 13px; }
.supply-discrepancy-list > p { margin: 0; padding: 12px; color: var(--muted); font-size: 12px; }
.supply-discrepancy-kind { padding: 6px 9px; border-radius: 7px; font-size: 10px !important; }
.supply-discrepancy-surplus { color: #986112 !important; background: var(--orange-soft); }
.supply-discrepancy-shortage { color: #b23d51 !important; background: var(--red-soft); }
html[data-theme="dark"] .supply-list,html[data-theme="dark"] .supply-detail-panel { background: #101823; }
html[data-theme="dark"] .supply-status-draft { color: #b5bdc9 !important; background: #202a38; }
html[data-theme="dark"] .supply-status-planned,html[data-theme="dark"] .supply-status-shipped { color: #82cfff !important; background: rgba(41,139,200,.16); }
html[data-theme="dark"] .supply-status-allowed { color: #bbb5ff !important; }
html[data-theme="dark"] .supply-status-acceptance { color: #ffd08b !important; }
html[data-theme="dark"] .supply-status-accepted { color: #79e5bd !important; }
@media (max-width: 1250px) { .supply-card > summary { grid-template-columns: minmax(180px,1.2fr) minmax(120px,.8fr) minmax(145px,1fr) minmax(125px,.85fr) minmax(135px,.9fr) 20px; }.supply-discrepancy-cell { display: none; }.supply-detail-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.supplies-stats { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 900px) { .supplies-filter-form { grid-template-columns: repeat(6,minmax(0,1fr)); }.supply-card > summary { grid-template-columns: minmax(180px,1.2fr) minmax(120px,.8fr) minmax(145px,1fr) minmax(125px,.85fr) 20px; }.supply-card > summary > span:nth-of-type(5) { display: none; }.supply-discrepancy-list article { grid-template-columns: auto 1fr auto; }.supply-discrepancy-list article > small { grid-column: 2 / -1; } }
@media (max-width: 700px) { .supplies-stats,.supplies-filter-form,.supply-detail-grid { grid-template-columns: 1fr; }.supplies-filter-form > label,.supplies-filter-form .orders-search { grid-column: auto !important; }.supply-card > summary { padding: 12px; grid-template-columns: 1fr auto; gap: 8px; }.supply-card > summary > span:not(.supply-id-cell) { display: none; }.supply-detail-panel { padding: 10px; }.supply-products-section > header,.supply-discrepancies-section > header { align-items: flex-start; flex-direction: column; }.supply-products-section > header > small { text-align: left; }.supply-discrepancy-list article { grid-template-columns: 1fr auto; }.supply-discrepancy-list article > .supply-discrepancy-kind { width: fit-content; }.supply-discrepancy-list article > strong,.supply-discrepancy-list article > small { grid-column: 1 / -1; } }

/* Keep data controls aligned after module-specific rules above. */
.stocks-slice-form select,
.stocks-filter-form input,
.stocks-filter-form select,
.dynamics-filter-form input[type="search"],
.dynamics-filter-form select,
.warehouse-picker summary,
.product-filter-form select,
.product-filter-form input,
.orders-filter-form select,
.orders-filter-form input,
.feed-form-field input,
.feed-form-field select,
.trial-form input,
.first-payment-form input,
.manual-payment-form input,
.manual-payment-form select,
.refund-form input,
.refund-form select,
.billing-date-form input { height: 40px; font-size: 10px; }

.stocks-filter-form label > span,
.dynamics-filter-form label > span,
.dynamics-mode > span,
.product-filter-form label > span,
.orders-filter-form label > span,
.feed-form-field > span,
.trial-form label span,
.first-payment-form label span,
.manual-payment-form label > span,
.refund-form label > span,
.billing-date-form label span { font-size: 9px; line-height: 1.25; }

.stock-value-toggle { min-height: 40px; padding: 5px 10px; }
.stock-value-toggle b { font-size: 10px; white-space: normal; }
.stock-value-toggle small { font-size: 8px; }
.stocks-filter-actions,.stocks-filter-actions .button { min-height: 40px; }
.dynamics-mode b { min-height: 40px; font-size: 10px; }
.warehouse-picker span { font-size: 10px; }
.scheduler-weekdays legend,.scheduler-weekdays span { font-size: 9px; }
.feed-toggle b { color: var(--muted); font-size: 10px; }
.feed-form-field > small,.scheduler-next small,.scheduler-next span { font-size: 8px; }
.scheduler-next strong { font-size: 10px; }
.product-section-tabs { scrollbar-width: none; }
.product-section-tabs::-webkit-scrollbar { display: none; }
.commission-filter-form { grid-template-columns: minmax(240px,1.35fr) repeat(3,minmax(145px,.75fr)) auto; }
.commission-table { min-width: 1180px; }
.commission-rate { color: var(--primary); font-size: 12px; }
.commission-other { min-width: 108px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 8px; line-height: 1.65; }
.commission-other b { color: var(--ink); }

@media (max-width: 1200px) {
    .commission-filter-form { grid-template-columns: 1fr 1fr; }
    .commission-filter-form .stocks-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .commission-filter-form { grid-template-columns: 1fr; }
    .commission-filter-form .stocks-filter-actions { grid-column: auto; }
}

/* Unclipped custom dropdowns. */
.price-view-navigation { margin-bottom: 16px; overflow: visible; }
.price-view-navigation .stocks-view-toolbar { border-bottom: 0; }
.dynamics-filter-form {
    position: relative;
    z-index: 30;
    overflow: visible !important;
}
.dynamics-filter-form:has(.warehouse-picker[open]) { z-index: 80; }
.warehouse-picker[open] { z-index: 90; }
.warehouse-picker > div {
    z-index: 100;
    top: calc(100% + 8px);
    max-height: min(320px, calc(100vh - 120px));
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.warehouse-picker.dropdown-up > div {
    top: auto;
    bottom: calc(100% + 8px);
}
.warehouse-picker > div label { min-height: 38px; }
.warehouse-picker > div label > span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 600px) {
    .warehouse-picker > div {
        right: auto;
        left: 0;
        width: min(100%, calc(100vw - 48px));
    }
}

.feedback-filter-actions .button {
    height: var(--control-height);
    min-height: var(--control-height);
}

/* Product cost history. */
.cost-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.cost-summary article { padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.cost-summary span,.cost-summary strong,.cost-summary small { display: block; }
.cost-summary span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.cost-summary strong { margin-top: 7px; font-size: 20px; }
.cost-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.cost-summary .cost-attention { background: linear-gradient(135deg,var(--surface),var(--orange-soft)); border-color: rgba(245,154,52,.24); }
.cost-summary .cost-attention strong { color: #c2761f; }
.cost-entry-grid { margin-bottom: 17px; display: grid; grid-template-columns: minmax(600px,1.45fr) minmax(320px,.75fr); gap: 14px; align-items: stretch; }
.cost-entry-grid > .panel { margin: 0; }
.cost-entry-panel,.cost-import-panel { overflow: hidden; }
.cost-entry-panel .panel-head,.cost-import-panel .panel-head { min-height: 68px; padding: 14px 18px; }
.cost-rule-badge { padding: 6px 8px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 9px; font-weight: 800; }
.cost-entry-modal-card { width: min(100%,760px); }
.cost-entry-modal-card form { display: grid; gap: 16px; }
.cost-entry-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 14px; }
.cost-entry-fields .feed-form-field { min-width: 0; }
.cost-entry-fields .cost-product-field { grid-column: 1 / -1; }
.cost-entry-modal-card .cost-period-hint { margin: 0; }
.cost-entry-modal-card .modal-actions { margin-top: 0; }
.cost-baseline { padding: 12px 13px; display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.cost-baseline > div { min-width: 0; }
.cost-baseline span,.cost-baseline strong { display: block; }
.cost-baseline span { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.cost-baseline strong { margin-top: 5px; color: var(--ink); font-size: 12px; line-height: 1.4; }
.cost-baseline > div:first-child strong { color: var(--primary); font-size: 15px; }
.cost-change-preview { padding: 12px 13px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; color: var(--primary); background: var(--primary-soft); border: 1px solid rgba(91,92,240,.16); border-radius: 10px; }
.cost-change-preview > div:first-child { min-width: 0; }
.cost-change-preview span,.cost-change-preview strong,.cost-change-preview small { display: block; }
.cost-change-preview span { font-size: 8px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.cost-change-preview strong { margin-top: 5px; color: var(--ink); font-size: 13px; }
.cost-change-preview small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.cost-change-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cost-change-badges b { padding: 7px 9px; color: inherit; background: var(--surface); border: 1px solid currentColor; border-radius: 7px; font-size: 9px; white-space: nowrap; }
.cost-change-preview[data-state="up"] { color: #c43f52; background: #ffeaee; border-color: #f4cbd2; }
.cost-change-preview[data-state="down"] { color: #10805c; background: #e1f7ee; border-color: #bde9d9; }
.cost-change-preview[data-state="equal"] { color: #946800; background: #fff4c7; border-color: #eadb9d; }
.cost-input-wrap { display: flex; align-items: center; overflow: hidden; background: #fafbfc; border: 1px solid #dfe3e9; border-radius: 8px; }
.cost-input-wrap:focus-within { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.cost-input-wrap input { min-width: 0; border: 0 !important; box-shadow: none !important; }
.cost-input-wrap b { padding: 0 11px; color: var(--muted); font-size: 11px; }
.cost-period-hint { margin: 0 18px 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; color: var(--muted); background: var(--soft); border-radius: 9px; font-size: 9px; }
.cost-period-hint > span { color: var(--primary); font-weight: 850; text-transform: uppercase; }
.cost-period-hint > strong { color: var(--ink); font-size: 9px; }
.cost-period-hint > i { width: 18px; height: 1px; background: var(--line); }
.cost-import-panel .product-tool-icon { margin: 0; flex: 0 0 auto; }
.cost-import-body { min-height: 142px; padding: 17px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.cost-import-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.cost-import-body code { color: var(--primary); font-weight: 800; }
.cost-import-body > div { display: flex; flex-wrap: wrap; gap: 7px; }
.cost-import-standalone { margin-bottom: 17px; }
.cost-import-standalone .cost-import-body { min-height: 0; align-items: center; flex-direction: row; }
.cost-history-panel { margin-bottom: 20px; }
.cost-filter-form { display: grid; grid-template-columns: minmax(260px,1.4fr) minmax(170px,.7fr) minmax(190px,.8fr) auto; align-items: end; gap: 9px; }
.cost-filter-form label > span { display: block; margin-bottom: 5px; color: #858e9d; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.cost-filter-form input,.cost-filter-form select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 10px; }
.cost-filter-form input:focus,.cost-filter-form select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.cost-history-table { min-width: 1080px; }
.cost-history-table td:first-child strong,.cost-history-table td:first-child span,.cost-history-table td:first-child small { display: block; }
.cost-history-table td:first-child span { margin-top: 4px; font-weight: 750; }
.cost-history-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.cost-value { color: var(--primary); font-size: 14px; }
.cost-period { min-width: 290px; display: flex; align-items: center; gap: 10px; }
.cost-period > span { min-width: 105px; padding: 7px 9px; display: block; background: var(--soft); border-radius: 8px; }
.cost-period small,.cost-period strong,.cost-period em { display: block; }
.cost-period small { color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.cost-period strong { margin-top: 3px; font-size: 10px; }
.cost-period em { margin-top: 2px; color: var(--muted); font-size: 8px; font-style: normal; }
.cost-period > i { color: var(--muted); font-size: 13px; font-style: normal; }
.cost-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; font-size: 9px; font-weight: 800; }
.cost-state > i { width: 6px; height: 6px; border-radius: 50%; }
.cost-state-current { color: #147b59; background: var(--green-soft); }
.cost-state-current > i { background: var(--green); }
.cost-state-history { color: #6f7889; background: var(--soft); }
.cost-state-history > i { background: #9ba3b1; }
.cost-state-future { color: #7258c8; background: var(--primary-soft); }
.cost-state-future > i { background: var(--primary); }
.cost-history-table td:nth-child(5) > strong,.cost-history-table td:nth-child(5) > small { display: block; }
.cost-history-table td:nth-child(5) > small { margin-top: 4px; color: var(--muted); font-size: 8px; }
html[data-theme="dark"] .cost-input-wrap { background: #111a27; border-color: var(--line); }
html[data-theme="dark"] .cost-baseline { background: #111a27; }
html[data-theme="dark"] .cost-change-preview[data-state="up"] { color: #ff9cab; background: #462330; border-color: #683044; }
html[data-theme="dark"] .cost-change-preview[data-state="down"] { color: #72e4bd; background: #183b33; border-color: #245748; }
html[data-theme="dark"] .cost-change-preview[data-state="equal"] { color: #f4cf66; background: #41391e; border-color: #67592b; }
html[data-theme="dark"] .cost-change-badges b { background: rgba(11,18,29,.48); }
html[data-theme="dark"] .cost-summary .cost-attention { background: linear-gradient(135deg,var(--surface),#34291d); border-color: #584128; }
html[data-theme="dark"] .cost-summary .cost-attention strong { color: #f2b96e; }
html[data-theme="dark"] .cost-state-history { color: #b2bdcc; background: #202b3a; }

@media (max-width: 1150px) {
    .cost-entry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
    .cost-summary { grid-template-columns: 1fr 1fr; }
    .cost-filter-form { grid-template-columns: 1fr 1fr; }
    .cost-filter-form .product-search { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .cost-summary,.cost-entry-fields,.cost-filter-form { grid-template-columns: 1fr; }
    .cost-entry-fields .cost-product-field,.cost-filter-form .product-search { grid-column: auto; }
    .cost-period-hint { align-items: flex-start; flex-direction: column; }
    .cost-period-hint > i { width: 1px; height: 10px; margin-left: 8px; }
    .cost-import-body > div .button { width: 100%; }
    .cost-import-standalone .cost-import-body { align-items: stretch; flex-direction: column; }
    .cost-change-preview { grid-template-columns: 1fr; }
    .cost-baseline { grid-template-columns: 1fr; }
    .cost-change-badges { justify-content: flex-start; }
}

/* Named schedules that launch several WB integrations together. */
.batch-schedules-page .payment-page-nav { margin-bottom: 9px; }
.script-run-monitor { margin-bottom: 14px; overflow: hidden; }
.script-run-monitor-head { min-height: 62px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.script-run-monitor-head > div { min-width: 0; display: grid; gap: 2px; }
.script-run-monitor-head span { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.script-run-monitor-head strong { font-size: 12px; }
.script-run-monitor-head small { color: var(--muted); font-size: 10px; }
.script-run-live { display: inline-flex; align-items: center; gap: 6px; color: var(--green) !important; white-space: nowrap; }
.script-run-live i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent); }
.script-run-list { max-height: 278px; overflow: auto; }
.script-run-item { min-height: 62px; padding: 8px 12px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.script-run-item:last-child { border-bottom: 0; }
.script-run-item.is-error,.script-run-item.is-stopped { background: color-mix(in srgb,var(--red-soft) 50%,transparent); }
.script-run-item.is-other { background: color-mix(in srgb,var(--purple-soft) 50%,transparent); }
.script-run-item.is-success { background: color-mix(in srgb,var(--green) 4%,transparent); }
.script-run-item.is-partial_success,.script-run-item.is-retry_scheduled,.script-run-item.is-locked { background: color-mix(in srgb,#f5b83a 7%,transparent); }
.script-run-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 10px; font-weight: 900; }
.script-run-main { min-width: 0; display: grid; gap: 2px; }
.script-run-main > span { display: flex; align-items: center; gap: 8px; }
.script-run-main strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.script-run-status { padding: 3px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.script-run-item.is-success .script-run-status { color: var(--green); background: color-mix(in srgb,var(--green) 11%,var(--surface)); }
.script-run-item.is-partial_success .script-run-status,.script-run-item.is-retry_scheduled .script-run-status,.script-run-item.is-locked .script-run-status { color: #a36b00; background: color-mix(in srgb,#f5b83a 16%,var(--surface)); }
.script-run-item.is-error .script-run-status,.script-run-item.is-stopped .script-run-status { color: var(--red); background: var(--red-soft); }
.script-run-item.is-other .script-run-status { color: var(--primary); background: var(--purple-soft); }
.script-run-item.is-dispatching .script-run-status,.script-run-item.is-stopping .script-run-status { color: #a36b00; background: color-mix(in srgb,#f5b83a 16%,var(--surface)); }
.script-run-main small,.script-run-main p,.script-run-item time { color: var(--muted); font-size: 10px; }
.script-run-main p { margin: 1px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-run-item.is-error .script-run-main .script-run-summary {
    color: var(--ink);
    font-weight: 800;
}
.script-run-main .script-run-error-detail {
    margin-top: 2px;
    overflow: visible;
    color: var(--red);
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}
.script-run-error-detail b { color: inherit; font-size: inherit; }
.script-run-progress { height: 3px; margin-top: 3px; overflow: hidden; background: var(--soft); border-radius: 999px; }
.script-run-progress i { width: var(--run-progress,0%); height: 100%; display: block; background: var(--primary); border-radius: inherit; transition: width .25s ease; }
.script-run-item.is-running .script-run-progress i,.script-run-item.is-stopping .script-run-progress i { width: 42%; animation: script-run-progress 1.25s ease-in-out infinite; }
.script-run-item.is-success .script-run-progress i { width: 100%; background: var(--green); }
.script-run-item.is-error .script-run-progress i,.script-run-item.is-stopped .script-run-progress i { background: var(--red); }
.script-run-item form { margin: 0; }
.script-run-item time { min-width: 38px; text-align: right; }
.script-run-empty { min-height: 88px; display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; }
@keyframes script-run-progress { from { transform: translateX(-120%); } to { transform: translateX(250%); } }
.batch-page-heading { margin-bottom: 18px; }
.batch-page-heading h1 { margin-top: 8px; }
.batch-scheduler-layout { display: grid; grid-template-columns: minmax(560px,760px) minmax(380px,1fr); align-items: start; gap: 20px; }
.batch-schedule-editor { overflow: hidden; }
.batch-schedule-editor .panel-head { min-height: 66px; padding: 14px 18px; }
.batch-schedule-editor .panel-head h2 { margin-bottom: 3px; font-size: 14px; }
.batch-schedule-editor .panel-head p { font-size: 10px; }
.batch-schedule-editor .scheduler-toggle { flex: 0 0 auto; }
.batch-schedule-form-body { padding: 16px 18px; display: grid; gap: 16px; }
.batch-schedule-name { max-width: none; }
.batch-schedule-name input { font-weight: 700; }
.batch-script-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.batch-script-picker > legend { width: 100%; margin-bottom: 9px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #697386; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.batch-script-picker > legend small { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.batch-script-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.batch-script-grid > label { min-width: 0; min-height: 64px; padding: 9px 10px; display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.batch-script-grid > label:hover { border-color: #c9caff; transform: translateY(-1px); }
.batch-script-grid > label:has(input:checked) { background: var(--primary-soft); border-color: rgba(91,92,240,.45); box-shadow: inset 0 0 0 1px rgba(91,92,240,.08); }
.batch-script-grid input { width: 17px; height: 17px; margin: 0; appearance: none; display: grid; place-items: center; background: var(--surface); border: 1.5px solid #cbd1dc; border-radius: 5px; cursor: pointer; }
.batch-script-grid input::before { width: 8px; height: 5px; content: ""; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .15s; }
.batch-script-grid input:checked { background: var(--primary); border-color: var(--primary); }
.batch-script-grid input:checked::before { transform: rotate(-45deg) scale(1); }
.batch-script-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border: 1px solid rgba(91,92,240,.12); border-radius: 8px; font-size: 11px; font-weight: 900; }
.batch-script-grid strong,.batch-script-grid small { display: block; }
.batch-script-grid strong { overflow: hidden; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.batch-script-grid small { min-height: 20px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.batch-schedule-fields { padding-top: 14px; display: grid; grid-template-columns: minmax(190px,1.15fr) minmax(220px,1.2fr) minmax(155px,.8fr); align-items: end; gap: 10px; border-top: 1px solid var(--line); }
.batch-weekdays { grid-column: 1 / -1; }
.batch-schedule-editor-actions { padding: 12px 18px; display: flex; justify-content: flex-end; gap: 8px; background: color-mix(in srgb,var(--soft) 62%,transparent); border-top: 1px solid var(--line); }
.batch-schedule-list { display: grid; gap: 11px; }
.batch-schedule-list-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-schedule-list-head h2 { margin: 0 0 5px; font-size: 16px; }
.batch-schedule-list-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.batch-schedule-card { padding: 16px; overflow: visible; }
.batch-schedule-card.is-disabled { opacity: .72; }
.batch-schedule-card-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 14px; }
.batch-schedule-card h3 { margin: 8px 0 4px; font-size: 14px; }
.batch-schedule-card-head p { margin: 0; color: var(--muted); font-size: 9px; }
.batch-schedule-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.batch-schedule-status i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px rgba(21,166,115,.1); }
.batch-schedule-card.is-disabled .batch-schedule-status { color: var(--muted); }
.batch-schedule-next { min-width: 145px; padding: 9px 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; text-align: right; }
.batch-schedule-next span,.batch-schedule-next strong,.batch-schedule-next small { display: block; }
.batch-schedule-next span { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.batch-schedule-next strong { margin-top: 4px; font-size: 9px; }
.batch-schedule-next small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.batch-schedule-scripts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.batch-schedule-scripts span { min-height: 27px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; color: #626d80; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; font-size: 8px; font-weight: 700; }
.batch-schedule-scripts b { color: var(--primary); }
.batch-schedule-card-actions { margin-top: 15px; padding-top: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); }
.batch-schedule-card-actions form { margin: 0; }
.batch-schedule-card-actions .icon-button { margin-left: auto; }
.batch-schedule-list > .empty-state { min-height: 206px; padding: 34px 22px; display: grid; align-content: center; }

html[data-theme="dark"] .batch-script-grid > label,
html[data-theme="dark"] .batch-schedule-next,
html[data-theme="dark"] .batch-schedule-scripts span { color: var(--ink); background: #141e2c; border-color: var(--line); }
html[data-theme="dark"] .batch-script-grid input { background: #111a27; border-color: #4a586d; }
html[data-theme="dark"] .batch-script-grid input:checked { background: var(--primary); border-color: var(--primary); }
html[data-theme="dark"] .batch-script-grid > label:has(input:checked) { background: rgba(91,92,240,.14); border-color: rgba(129,130,255,.52); }
html[data-theme="dark"] .batch-script-icon { background: #111a27; border-color: #2f3b52; }
html[data-theme="dark"] .batch-schedule-card-actions { border-color: var(--line); }

@media (max-width: 1250px) {
    .batch-scheduler-layout { grid-template-columns: minmax(540px,1.2fr) minmax(340px,.8fr); }
    .batch-script-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1020px) {
    .batch-scheduler-layout { grid-template-columns: 1fr; }
    .batch-schedule-list { grid-template-columns: 1fr 1fr; }
    .batch-schedule-list-head { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .batch-script-grid,.batch-schedule-list { grid-template-columns: 1fr; }
    .batch-schedule-list-head { grid-column: auto; }
    .batch-schedule-fields { grid-template-columns: 1fr; }
    .batch-weekdays { grid-column: auto; }
}
@media (max-width: 520px) {
    .batch-schedule-form-body { padding: 15px; }
    .batch-schedule-card-head { grid-template-columns: 1fr; }
    .batch-schedule-next { text-align: left; }
    .batch-schedule-card-actions .button { flex: 1; }
    .batch-schedule-card-actions form:not(:last-child) { flex: 1; }
    .batch-schedule-card-actions form:not(:last-child) .button { width: 100%; }
}

@media (max-width: 600px) {
    .stock-value-toggle { width: 100%; }
    .stock-value-toggle > span { flex: 1; }
    .stocks-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .stocks-filter-actions .button { width: 100%; }
    html[data-theme="dark"] :is(.stocks-table,.products-table,.orders-table,.companies-table) tr { border-color: var(--line); }
}

/* Product cost catalog, filters and audit history. */
.cost-catalog-head { flex-wrap: wrap; }
.cost-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.cost-catalog-filters { grid-template-columns: repeat(12,minmax(0,1fr)); }
.cost-catalog-filters > label { grid-column: span 2; }
.cost-catalog-filters .product-search,
.cost-catalog-filters .cost-filter-product { grid-column: span 3; }
.cost-catalog-filters .orders-filter-actions { grid-column: span 2; }
.cost-filter-form .cost-product-combobox { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; text-transform: none; }
.cost-filter-form .cost-product-combobox > input { height: 40px; }
.cost-catalog-table { min-width: 1180px; }
.cost-catalog-table td:first-child strong,.cost-catalog-table td:first-child small { display: block; }
.cost-catalog-table td:first-child small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.cost-catalog-table td:nth-child(2) strong { display: block; max-width: 220px; line-height: 1.4; overflow-wrap: anywhere; }
.cost-catalog-table td:nth-child(3) strong { display: block; max-width: 330px; line-height: 1.4; }
.cost-catalog-table td:nth-child(3) small { margin-top: 4px; display: block; color: var(--muted); font-size: 8px; }

/* Finance materialized views. */
.finance-subnav { width: min(100%,680px); margin: 0 0 16px; padding: 4px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.finance-subnav a { min-width: 0; padding: 10px 15px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 9px; text-decoration: none; line-height: 1.2; transition: color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease; }
.finance-subnav a strong { color: inherit; font-size: 11px; font-weight: 850; }
.finance-subnav a small { color: inherit; font-size: 10px; opacity: .82; }
.finance-subnav a:hover { color: var(--ink); background: color-mix(in srgb,var(--surface) 62%,transparent); }
.finance-subnav a.active { color: var(--primary); background: var(--surface); border-color: var(--line); box-shadow: 0 4px 12px rgba(20,28,54,.07); }
.finance-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.finance-summary article { min-width: 0; min-height: 190px; height: 190px; padding: 19px 18px; display: flex; flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.finance-summary span,.finance-summary small { display: block; color: var(--muted); }
.finance-summary span { font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.finance-summary strong { margin: 5px 0 3px; display: block; color: var(--ink); font-size: 28px; line-height: 1.08; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.finance-summary small { font-size: 10px; line-height: 1.35; }
.finance-summary .finance-negative strong { color: var(--red); }
.finance-kpi-row { grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: 170px; }
.finance-kpi-row article,.finance-kpi-row-primary article:first-child { min-height: 170px; height: 170px; padding: 10px 11px; grid-column: auto; }
.finance-kpi-row article > header { min-height: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.finance-kpi-row article > header > span { font-size: 12px; line-height: 1.35; }
.finance-kpi-delta { min-height: 23px; padding: 5px 7px; display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 999px; font-size: 9px !important; font-weight: 900 !important; letter-spacing: 0 !important; line-height: 1 !important; text-transform: none !important; white-space: nowrap; }
.finance-kpi-delta.is-up { color: var(--green) !important; background: var(--green-soft); }
.finance-kpi-delta.is-down { color: var(--red) !important; background: var(--red-soft); }
.finance-kpi-delta.is-flat { color: #b98700 !important; background: #fff7cf; }
html[data-theme="dark"] .finance-kpi-delta.is-flat { color: #ffd65a !important; background: #493f1f; }
.finance-kpi-split { margin: 3px 0 4px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.finance-kpi-split > div + div { padding-left: 8px; border-left: 1px solid var(--line); }
.finance-kpi-split strong { margin: 0 0 3px; font-size: 23px; }
.finance-kpi-split small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.finance-kpi-share { width: fit-content; margin-bottom: 3px; padding: 3px 5px; color: var(--primary) !important; background: var(--primary-soft); border-radius: 7px; font-size: 9px !important; font-weight: 800; letter-spacing: 0 !important; text-transform: none !important; }
.finance-kpi-forecast { min-height: 50px; margin-top: auto; padding: 7px 8px; display: flex; flex-direction: column; justify-content: center; gap: 3px; background: color-mix(in srgb,var(--primary-soft) 72%,var(--surface)); border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius: 9px; }
.finance-kpi-forecast > span { color: var(--primary) !important; font-size: 9px !important; font-weight: 850 !important; letter-spacing: .03em !important; line-height: 1.2 !important; text-transform: uppercase !important; }
.finance-kpi-forecast > b { color: var(--ink); font-size: 16px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.finance-kpi-forecast-orders > b { font-size: 14px; }
.finance-kpi-comparison-note { width: fit-content; margin: 0 0 9px auto; color: var(--muted); font-size: 9px; font-weight: 750; }
.finance-filter-panel { margin-bottom: 16px; padding: 16px; }
.finance-filters { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); align-items: start; gap: 9px; }
.finance-filters label { grid-column: span 2; min-width: 0; align-self: start; }
.finance-filters label > span { margin-bottom: 5px; display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.finance-filters input,.finance-filters select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 10px; }
.finance-filters input:focus,.finance-filters select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.finance-filter-actions { grid-column: span 2; padding-top: 21px; display: flex; gap: 7px; }
.finance-filter-actions .button { flex: 1; }
.finance-advertising-source-filter { grid-column: span 2; }
.finance-advertising-source-filter select { font-weight: 750; }
.finance-source-notice { margin: -7px 0 14px; padding: 10px 13px; display: flex; align-items: center; gap: 9px; color: var(--orange); background: var(--orange-soft); border: 1px solid color-mix(in srgb,var(--orange) 24%,var(--line)); border-radius: 9px; font-size: 10px; }
.finance-source-notice strong { white-space: nowrap; }
.finance-share-filter { margin-bottom: 10px; padding: 12px 16px; display: flex; justify-content: flex-end; }
.finance-share-filter label { width: min(100%,320px); }
.finance-share-filter label > span { margin-bottom: 5px; display: block; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.finance-share-filter select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.spp-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.spp-filter-form { grid-template-columns: repeat(5,minmax(0,1fr)); }
.spp-history-table { min-width: 980px; }
.spp-history-table td > strong,.spp-history-table td > small { display: block; }
.spp-history-table td > small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.finance-table-panel { margin-bottom: 22px; overflow: hidden; }
.finance-table { min-width: 1740px; }
.finance-article-table { min-width: 1980px; }
.finance-table th,.finance-table td { vertical-align: middle; }
.finance-table td > strong,.finance-table td > small { display: block; }
.finance-table td > small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.finance-table td:first-child strong { max-width: 290px; }
.finance-money-primary { color: var(--primary); }
.finance-value-positive { color: var(--green); }
.finance-value-negative { color: var(--red); }
.finance-trend { margin-left: 3px; display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 900; line-height: 1; white-space: nowrap; vertical-align: middle; }
.finance-trend.is-up { color: var(--green) !important; }
.finance-trend.is-down { color: var(--red) !important; }
.finance-trend.is-flat { color: #b98700 !important; }
.finance-trend.is-up { padding: 3px 4px; background: var(--green-soft); border: 1px solid currentColor; border-radius: 5px; }
.finance-trend.is-down { padding: 3px 4px; background: var(--red-soft); border: 1px solid currentColor; border-radius: 5px; }
.finance-trend.is-flat { padding: 3px 4px; background: #fff7cf; border: 1px solid currentColor; border-radius: 5px; }
html[data-theme="dark"] .finance-trend.is-flat { color: #ffd65a !important; background: #493f1f; }
.finance-day-cell { min-width: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.finance-day-cell > strong,.finance-day-cell > small { display: block; }
.finance-day-cell > small { margin-top: 0 !important; }
.finance-day-details-button { min-height: 30px; margin-top: 4px; padding: 0 8px 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb,var(--primary) 20%,var(--line)); border-radius: 7px; font-size: 10px; font-weight: 850; line-height: 1; text-decoration: none; white-space: nowrap; transition: color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.finance-day-details-button b { font-size: 11px; line-height: 1; transition: transform .18s ease; }
.finance-day-details-button:hover { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 5px 13px rgba(91,92,240,.2); transform: translateY(-1px); }
.finance-day-details-button:hover b { transform: translateX(2px); }
.finance-day-details-button:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 20%,transparent); outline-offset: 2px; }
.finance-back-days { color: var(--primary); font-weight: 800; text-decoration: none; }
.finance-back-days:hover { text-decoration: underline; }
.finance-status { padding: 5px 8px; display: inline-flex; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 10px; font-weight: 850; }
.finance-table-tools,.finance-abc-legend { display: flex; align-items: center; gap: 7px; }
.finance-abc-legend { padding: 5px 7px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.finance-abc-legend small { color: var(--muted); font-size: 10px; }
.finance-abc { width: 25px; height: 25px; display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 7px; font-size: 11px; font-weight: 900; line-height: 1; }
.finance-abc-a { color: var(--green); background: color-mix(in srgb,var(--green) 12%,transparent); }
.finance-abc-b { color: var(--orange); background: color-mix(in srgb,var(--orange) 13%,transparent); }
.finance-abc-c { color: var(--red); background: color-mix(in srgb,var(--red) 11%,transparent); }
.product-abc-14d { margin-top: 5px; display: flex !important; align-items: center; flex-wrap: wrap; gap: 4px; }
.product-abc-14d > b { color: var(--muted); font-size: 9px; font-weight: 850; }
.product-abc-14d .finance-abc { width: auto; min-width: 25px; height: 20px; padding: 2px 6px; font-size: 9px; font-style: normal; line-height: 1.2; }
.finance-abc-empty { color: var(--muted); background: var(--soft); border-color: var(--line); }
.finance-error { margin-bottom: 16px; padding: 18px; border-color: rgba(224,82,96,.3); }
.finance-error strong { color: var(--red); }
.finance-error p { margin: 6px 0 0; color: var(--muted); }
.finance-chart-panel { margin-bottom: 16px; overflow: visible; }
.finance-chart-head { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.finance-chart-head > div > span,.finance-chart-head > div > strong,.finance-chart-head > div > small { display: block; }
.finance-chart-head > div > span,.finance-chart-head label > span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.finance-chart-head > div > strong { margin-top: 4px; color: var(--ink); font-size: 15px; }
.finance-chart-head > div > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.finance-chart-head label { width: min(280px,34vw); }
.finance-chart-head label > span { margin-bottom: 5px; display: block; }
.finance-chart-head select { width: 100%; height: 38px; padding: 0 34px 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 13px; font-weight: 700; }
.finance-chart-head select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.finance-chart-stats { padding: 8px 12px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; background: color-mix(in srgb,var(--soft) 75%,transparent); border-bottom: 1px solid var(--line); }
.finance-chart-stats span { min-width: 0; color: var(--muted); font-size: 10px; }
.finance-chart-stats > span > small { display: block; color: inherit; font: inherit; }
.finance-chart-stats strong { margin-top: 2px; display: block; overflow: hidden; color: var(--ink); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.finance-chart-stats strong.is-up { color: var(--green); }
.finance-chart-stats strong.is-down { color: var(--red); }
.finance-chart-wrap { height: 330px; position: relative; padding: 13px 15px 4px; }
.finance-chart-wrap canvas { width: 100%; height: 100%; cursor: crosshair; }
.finance-chart-tooltip { min-width: 175px; padding: 10px 12px; position: absolute; z-index: 3; color: #fff; background: #171c2a; border-radius: 9px; box-shadow: 0 12px 30px rgba(10,16,32,.28); pointer-events: none; transform: translate(-50%,calc(-100% - 12px)); }
.finance-chart-tooltip[data-placement="below"] { transform: translate(-50%,12px); }
.finance-chart-tooltip strong,.finance-chart-tooltip span,.finance-chart-tooltip small { display: block; }
.finance-chart-tooltip strong { font-size: 10px; }
.finance-chart-tooltip span { margin-top: 4px; font-size: 12px; font-weight: 850; }
.finance-chart-tooltip small { margin-top: 3px; color: #b9c2d0; font-size: 10px; }
.rnp-filter-panel { margin-bottom: 8px; padding: 10px; }
.rnp-filters { display: grid; grid-template-columns: 125px 140px minmax(160px,.8fr) minmax(240px,1.45fr) 180px 170px; align-items: end; gap: 7px; }
.rnp-filters label { min-width: 0; }
.rnp-filters label > span { margin-bottom: 3px; display: block; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.rnp-filters input,.rnp-filters select { width: 100%; height: var(--control-height-compact); padding: 0 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 11px; }
.finance-rnp-page .rnp-filter-panel .rnp-filters label > span { min-height: 13px; margin-bottom: 3px; font-size: 9px; }
.finance-rnp-page .rnp-filters :is(input,select,.button) { height: var(--control-height-compact); min-height: var(--control-height-compact); }
.rnp-filters input:focus,.rnp-filters select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.rnp-product-hint { margin-top: 4px; display: block; color: var(--muted); font-size: 9px; line-height: 1.35; }
.rnp-filter-actions { display: flex; gap: 7px; }
.rnp-filter-actions .button { flex: 1; }
.rnp-filters.is-loading { opacity: .82; }
.rnp-filters.is-loading .rnp-filter-actions button { cursor: wait; }
.rnp-catalog-panel { margin-bottom: 12px; overflow: hidden; }
.rnp-catalog-scroll { max-height: 580px; overflow: auto; }
.rnp-catalog-table { min-width: 1480px; }
.rnp-catalog-table thead th { position: sticky; top: 0; z-index: 3; background: var(--soft); }
.rnp-catalog-table tbody tr.is-selected td { border-top-color: color-mix(in srgb,var(--primary) 35%,var(--line)); border-bottom-color: color-mix(in srgb,var(--primary) 35%,var(--line)); }
.rnp-catalog-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 var(--primary); }
.rnp-catalog-product { min-width: 310px; display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 10px; }
.rnp-catalog-product img,.rnp-photo-empty { width: 52px; height: 60px; display: grid; place-items: center; object-fit: cover; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.rnp-photo-empty { color: var(--primary); font-weight: 900; }
.rnp-catalog-product strong,.rnp-catalog-product small,.rnp-catalog-product a { display: block; }
.rnp-catalog-product strong { max-width: 280px; overflow: hidden; color: var(--ink); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.rnp-catalog-product small { margin-top: 3px; max-width: 280px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rnp-catalog-product a { width: fit-content; margin-top: 5px; color: var(--primary); font-size: 10px; font-weight: 850; text-decoration: none; }
.rnp-catalog-product a:hover { text-decoration: underline; }
.rnp-dynamic-cell { background: transparent; transition: background .18s ease; }
.rnp-dynamic-cell.is-up { background: color-mix(in srgb,var(--green) 9%,transparent); }
.rnp-dynamic-cell.is-down { background: color-mix(in srgb,var(--red) 8%,transparent); }
.rnp-dynamic-cell.is-flat { background: color-mix(in srgb,var(--muted) 4%,transparent); }
.rnp-product-trend { margin-top: 4px; display: block; font-size: 10px; font-weight: 900; line-height: 1; white-space: nowrap; }
.rnp-product-trend.is-up { color: var(--green); }
.rnp-product-trend.is-down { color: var(--red); }
.rnp-product-trend.is-flat { color: var(--muted); }
.rnp-stock-pair { min-width: 190px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.rnp-stock-pair > span { min-height: 57px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; }
.rnp-stock-pair small,.rnp-stock-pair strong { display: block; }
.rnp-stock-pair small { margin: 0 0 3px !important; }
.rnp-stock-pair strong { color: var(--ink); font-size: 10px; }
.rnp-graph-button { min-width: 90px; }
.rnp-product-chart { scroll-margin-top: 90px; }
.rnp-product-summary { margin-bottom: 9px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); }
.rnp-product-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.rnp-product-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-weight: 900; }
.rnp-product-head span { margin-bottom: 3px; display: block; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.rnp-product-head strong { display: block; color: var(--ink); font-size: 12px; }
.rnp-product-head em { padding: 7px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 10px; font-style: normal; font-weight: 850; white-space: nowrap; }
.rnp-product-fields { margin: 8px 0 0; padding-top: 8px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; border-top: 1px solid var(--line); }
.rnp-product-fields div { min-width: 0; padding: 6px 7px; background: var(--soft); border-radius: 7px; }
.rnp-product-fields dt { margin: 0 0 2px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.rnp-product-fields dd { margin: 0; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; }
.rnp-table-panel { margin-bottom: 22px; overflow: hidden; }
.rnp-table-scroll { max-height: calc(100vh - 270px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; contain: layout paint; will-change: scroll-position; }
.rnp-table { min-width: 2860px; table-layout: fixed; }
.rnp-table th,.rnp-table td { width: 84px; min-width: 84px; padding: 6px 5px; text-align: right; vertical-align: middle; white-space: nowrap; }
.rnp-table thead th { position: sticky; top: 0; z-index: 3; background: var(--soft); }
.rnp-table .rnp-metric-column { width: 235px; min-width: 235px; position: sticky; left: 0; z-index: 2; text-align: left; background: var(--surface); box-shadow: 1px 0 var(--line-strong); }
.rnp-table thead .rnp-metric-column { z-index: 5; background: var(--soft); }
.rnp-day-column strong,.rnp-day-column small { display: block; text-align: center; }
.rnp-day-column strong { color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.rnp-day-column small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.rnp-metric-column strong,.rnp-metric-column small { display: block; }
.rnp-metric-column strong { color: var(--ink); font-size: 11px; }
.rnp-metric-column small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.rnp-table td strong { color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.rnp-table .is-today { background: color-mix(in srgb,var(--primary) 7%,var(--surface)); }
.rnp-table thead .is-today { color: var(--primary); background: color-mix(in srgb,var(--primary) 13%,var(--soft)); }
.rnp-all-products-panel { margin-bottom: 12px; }
.rnp-all-products-panel .rnp-table-scroll { max-height: calc(100vh - 220px); }
.rnp-all-products-panel .orders-panel-head { min-height: 56px; padding: 9px 13px; }
.rnp-all-matrix-table { min-width: 3110px; isolation: isolate; }
.rnp-all-matrix-table { border-collapse: separate; border-spacing: 0; }
.rnp-all-matrix-table :is(th,td) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rnp-all-matrix-table thead th { border-bottom: 2px solid var(--line-strong); }
.rnp-all-matrix-table .rnp-product-column { border-right: 3px solid color-mix(in srgb,var(--primary) 42%,var(--line)); }
.rnp-all-matrix-table .rnp-metric-column { border-right: 2px solid var(--line-strong); }
.rnp-all-matrix-table .rnp-metric-row:nth-child(even) > :not(.rnp-product-column) { background-color: color-mix(in srgb,var(--soft) 48%,var(--surface)); }
.rnp-all-matrix-table .rnp-value-cell:is(.is-up,.is-down,.is-flat) { background-clip: padding-box; }
.rnp-all-matrix-table .rnp-product-column { width: 250px; min-width: 250px; position: sticky; left: 0; z-index: 3; text-align: left; vertical-align: top; background: color-mix(in srgb,var(--primary) 5%,var(--surface)); box-shadow: 1px 0 var(--line-strong); }
.rnp-all-matrix-table .rnp-product-column > strong,
.rnp-all-matrix-table .rnp-product-column > small { display: block; }
.rnp-all-matrix-table .rnp-product-column > small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.rnp-all-matrix-table .rnp-metric-column { width: 220px; min-width: 220px; left: 250px; z-index: 2; }
.rnp-all-matrix-table thead .rnp-product-column { z-index: 7; vertical-align: middle; background: var(--soft); }
.rnp-all-matrix-table thead .rnp-metric-column { z-index: 6; }
.rnp-product-group tr:first-child > * { border-top: 3px solid color-mix(in srgb,var(--primary) 38%,var(--line)); }
.rnp-product-group + .rnp-product-group tr:first-child > * { border-top-width: 6px; border-top-color: var(--line-strong); }
.rnp-product-group.is-selected .rnp-product-column { background: color-mix(in srgb,var(--primary) 13%,var(--surface)); box-shadow: inset 4px 0 var(--primary),1px 0 var(--line-strong); }
.rnp-product-info { min-width: 0; padding: 4px 3px 5px; position: sticky; top: 48px; display: grid; gap: 7px; }
.rnp-matrix-product { min-width: 0; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 8px; }
.rnp-matrix-product img,.rnp-matrix-product .rnp-photo-empty { width: 44px; height: 51px; object-fit: cover; border-radius: 8px; }
.rnp-matrix-product strong,.rnp-matrix-product small,.rnp-matrix-product a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rnp-matrix-product strong { font-size: 11px; line-height: 1.3; }
.rnp-matrix-product small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.rnp-matrix-product a { width: fit-content; margin-top: 3px; color: var(--primary); font-size: 9px; font-weight: 850; text-decoration: none; }
.rnp-matrix-product a:hover { text-decoration: underline; }
.rnp-product-side-fields { margin: 0; display: grid; gap: 4px; }
.rnp-product-side-fields > div { min-width: 0; padding: 5px 7px; overflow: hidden; background: color-mix(in srgb,var(--surface) 75%,transparent); border: 1px solid var(--line); border-radius: 7px; }
.rnp-product-side-fields dt { margin: 0 0 2px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.rnp-product-side-fields dd { margin: 0; overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.rnp-product-side-fields .rnp-product-side-group { background: color-mix(in srgb,var(--primary) 11%,var(--surface)); border-color: color-mix(in srgb,var(--primary) 34%,var(--line)); }
.rnp-product-side-group dd { display: flex; align-items: center; gap: 6px; color: var(--primary); }
.rnp-product-side-group dd i { width: 7px; height: 7px; flex: 0 0 auto; background: var(--primary); border-radius: 2px; transform: rotate(45deg); }
.rnp-product-side-chart { width: 100%; min-height: 32px; height: 32px; padding-inline: 9px; font-size: 10px; }
.rnp-value-cell { transition: none; }
.rnp-value-cell.is-up { background: color-mix(in srgb,var(--green) 10%,var(--surface)); }
.rnp-value-cell.is-down { background: color-mix(in srgb,var(--red) 9%,var(--surface)); }
.rnp-value-cell.is-flat { background: color-mix(in srgb,var(--muted) 3%,var(--surface)); }
.rnp-value-cell.is-abc-a { background: color-mix(in srgb,var(--green) 16%,var(--surface)); }
.rnp-value-cell.is-abc-b { background: color-mix(in srgb,var(--orange) 14%,var(--surface)); }
.rnp-value-cell.is-abc-c { background: color-mix(in srgb,var(--red) 12%,var(--surface)); }
.rnp-value-cell.is-abc-a .rnp-abc-value { color: var(--green); }
.rnp-value-cell.is-abc-b .rnp-abc-value { color: var(--orange); }
.rnp-value-cell.is-abc-c .rnp-abc-value { color: var(--red); }
.rnp-abc-value { display: inline-grid; min-width: 24px; min-height: 22px; place-items: center; border: 1px solid currentColor; border-radius: 6px; }
.rnp-value-cell.is-up strong,.rnp-value-cell.is-up .rnp-cell-trend { color: var(--green); }
.rnp-value-cell.is-down strong,.rnp-value-cell.is-down .rnp-cell-trend { color: var(--red); }
.rnp-cell-trend { margin-top: 1px; display: block; font-size: 9px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rnp-cell-trend i { font-size: 9px; font-style: normal; }
.rnp-pagination { min-height: 54px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--soft); border-top: 1px solid var(--line); }
.rnp-pagination > span { color: var(--muted); font-size: 10px; }
.rnp-pagination > div { display: flex; align-items: center; gap: 8px; }
.rnp-pagination > div > strong { min-width: 50px; color: var(--ink); font-size: 10px; text-align: center; }
.rnp-metric-commission_fbo .rnp-metric-column,.rnp-metric-commission_fbs .rnp-metric-column,.rnp-metric-drr_article .rnp-metric-column { border-left: 3px solid var(--orange); }
.rnp-metric-unit_cost .rnp-metric-column,.rnp-metric-full_cost .rnp-metric-column,.rnp-metric-gross_profit_article .rnp-metric-column,.rnp-metric-profitability_article .rnp-metric-column,.rnp-metric-abc_revenue .rnp-metric-column,.rnp-metric-abc_profit .rnp-metric-column { border-left: 3px solid var(--primary); }
.rnp-metric-avg_position_current .rnp-metric-column { border-left: 3px solid #8b5cf6; }
.rnp-metric-stock_fbo .rnp-metric-column,.rnp-metric-stock_fbs .rnp-metric-column,.rnp-metric-turnover_fbo_30_days .rnp-metric-column { border-left: 3px solid var(--green); }
.rnp-empty { color: var(--muted); }
html[data-theme="dark"] .finance-status { color: #a9aaff; background: rgba(91,92,240,.18); }
html[data-theme="dark"] .finance-subnav a.active { box-shadow: 0 5px 16px rgba(0,0,0,.2); }
html[data-theme="dark"] .finance-chart-tooltip { background: #050a12; }

@media (max-width: 1250px) {
    .finance-summary,.finance-kpi-row,.finance-kpi-row-primary,.finance-expense-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .finance-kpi-row article,.finance-kpi-row-primary article:first-child { grid-column: auto; }
    .finance-filters { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .rnp-filters { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .rnp-filters label { grid-column: span 2; }
    .rnp-filters .rnp-product-filter { grid-column: span 3; }
    .rnp-filters .rnp-metric-group-filter { grid-column: span 3; }
    .rnp-filter-actions { grid-column: span 3; }
    .rnp-product-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .finance-table-tools { width: 100%; justify-content: space-between; }
    .finance-summary,.finance-kpi-row,.finance-kpi-row-primary,.finance-expense-summary { grid-template-columns: 1fr 1fr; }
    .finance-filters { grid-template-columns: 1fr 1fr; }
    .finance-filters label,.finance-filter-actions { grid-column: span 1; }
    .finance-filter-actions { grid-column: 1 / -1; }
    .rnp-filters { grid-template-columns: 1fr 1fr; }
    .rnp-filters label,.rnp-filters .rnp-product-filter,.rnp-filters .rnp-metric-group-filter { grid-column: span 1; }
    .rnp-filter-actions { grid-column: 1 / -1; }
    .finance-chart-head { align-items: flex-start; flex-direction: column; }
    .finance-chart-head label { width: 100%; }
    .finance-chart-stats { grid-template-columns: 1fr 1fr; }
    .finance-chart-wrap { height: 290px; padding-left: 8px; padding-right: 8px; }
    .rnp-product-head { grid-template-columns: auto 1fr; }
    .rnp-product-head em { grid-column: 1 / -1; width: fit-content; }
    .rnp-product-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
    .finance-table-tools { align-items: flex-start; flex-direction: column; }
    .finance-subnav { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .finance-subnav a { padding: 9px 10px; }
    .finance-summary,.finance-kpi-row,.finance-kpi-row-primary,.finance-expense-summary { grid-template-columns: 1fr; }
    .finance-filters { grid-template-columns: 1fr; }
    .finance-filters label,.finance-filter-actions { grid-column: 1; }
    .rnp-filters { grid-template-columns: 1fr; }
    .rnp-filters label,.rnp-filters .rnp-product-filter,.rnp-filter-actions { grid-column: 1; }
    .rnp-product-fields { grid-template-columns: 1fr; }
}
.cost-empty-value { color: var(--muted); font-size: 10px; }
.cost-period-dates { min-width: 215px; gap: 7px; }
.cost-period-dates strong { min-width: 91px; margin: 0; padding: 7px 9px; background: var(--soft); border-radius: 7px; text-align: center; }
.cost-history-button { display: inline-flex; align-items: center; gap: 7px; }
.cost-history-button b { min-width: 20px; padding: 3px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 10px; }
.cost-history-button:disabled { cursor: wait; opacity: .62; }
.cost-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.cost-edit-button { white-space: nowrap; }
.cost-entry-panel { transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease; }
.cost-entry-panel.is-targeted { border-color: rgba(93,91,255,.55); box-shadow: 0 0 0 4px rgba(93,91,255,.1), var(--shadow); transform: translateY(-2px); }
.cost-period-count { margin-top: 5px; display: block; color: var(--muted); font-size: 8px; }
.cost-history-modal-card { width: min(100%,980px); padding: 0; overflow: hidden; }
.cost-history-modal-card .modal-head { margin: 0; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.cost-history-modal-card > [data-cost-history-content] { max-height: calc(100vh - 170px); padding: 18px 24px 24px; overflow-y: auto; }
.cost-history-loading,.cost-history-error { min-height: 190px; padding: 34px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 10px; }
.cost-history-loading .button-spinner { border-color: rgba(91,92,240,.2); border-top-color: var(--primary); }
.cost-history-error { color: var(--red); }
.cost-history-section + .cost-history-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.cost-history-section-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cost-history-section-head h3 { margin: 0; font-size: 13px; }
.cost-history-section-head span { padding: 5px 7px; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 8px; font-weight: 800; }
.cost-modal-periods { min-width: 720px; }
.cost-modal-value { color: var(--primary); font-weight: 850; }
.cost-modal-periods form { margin: 0; }
.cost-modal-periods .icon-button { width: 30px; height: 30px; font-size: 18px; }
.cost-history-empty { padding: 22px; color: var(--muted); background: var(--soft); border-radius: 9px; font-size: 9px; line-height: 1.5; text-align: center; }
.cost-change-list { display: grid; gap: 8px; }
.cost-change-item { padding: 11px 12px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.cost-change-marker { width: 9px; height: 9px; margin-top: 3px; background: var(--primary); border: 3px solid var(--primary-soft); border-radius: 50%; box-sizing: content-box; }
.cost-change-created { background: var(--green); border-color: var(--green-soft); }
.cost-change-deleted { background: var(--red); border-color: var(--red-soft); }
.cost-change-item strong { display: block; font-size: 9px; line-height: 1.5; }
.cost-change-item p { margin: 6px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 8px; }
.cost-change-item p b { color: var(--ink); }
.cost-change-item p span,.cost-change-item p em { padding: 3px 5px; background: var(--surface); border-radius: 5px; font-style: normal; }
.cost-change-item p time { margin-left: auto; }
html[data-theme="dark"] .cost-history-modal-card { background: var(--surface); }
html[data-theme="dark"] .cost-change-item p span,
html[data-theme="dark"] .cost-change-item p em { background: #111a27; }

@media (max-width: 1120px) {
    .cost-catalog-filters > label { grid-column: span 3; }
    .cost-catalog-filters .product-search,.cost-catalog-filters .cost-filter-product { grid-column: span 6; }
    .cost-catalog-filters .orders-filter-actions { grid-column: span 3; }
}
@media (max-width: 720px) {
    .cost-catalog-head { align-items: stretch; }
    .cost-export-actions,.cost-export-actions .button { width: 100%; }
    .cost-export-actions .button { flex: 1; }
    .cost-catalog-filters { grid-template-columns: 1fr 1fr; }
    .cost-catalog-filters > label,
    .cost-catalog-filters .product-search,
    .cost-catalog-filters .cost-filter-product,
    .cost-catalog-filters .orders-filter-actions { grid-column: auto; }
    .cost-catalog-filters .product-search,.cost-catalog-filters .cost-filter-product { grid-column: 1 / -1; }
    .cost-history-modal-card .modal-head { padding: 18px; }
    .cost-history-modal-card > [data-cost-history-content] { padding: 15px; }
    .cost-change-item p time { width: 100%; margin-left: 0; }
    .cost-catalog-table,.cost-catalog-table tbody,.cost-catalog-table tr,.cost-catalog-table td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .cost-catalog-table thead { display: none; }
    .cost-catalog-table tbody { padding: 5px 14px 14px; }
    .cost-catalog-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .cost-catalog-table tr:last-child { border-bottom: 0; }
    .cost-catalog-table td { min-height: 38px; padding: 7px 0; display: grid; grid-template-columns: minmax(90px,.65fr) minmax(0,1.35fr); align-items: center; gap: 12px; border: 0; text-align: left !important; }
    .cost-catalog-table td::before { content: attr(data-label); color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
    .cost-catalog-table td > * { min-width: 0; justify-self: start; }
    .cost-period-dates { min-width: 0; flex-wrap: wrap; }
    .cost-period-dates strong { min-width: 82px; }
    .cost-row-actions { width: 100%; justify-content: stretch; }
    .cost-row-actions .button { width: 100%; justify-content: center; }
    .cost-history-button { justify-content: space-between !important; }
    .cost-period-count { grid-column: 2; }
    .cost-modal-periods,.cost-modal-periods tbody,.cost-modal-periods tr,.cost-modal-periods td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .cost-modal-periods thead { display: none; }
    .cost-modal-periods tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .cost-modal-periods tr:last-child { border-bottom: 0; }
    .cost-modal-periods td { min-height: 34px; padding: 6px 0; display: grid; grid-template-columns: 105px minmax(0,1fr); align-items: center; gap: 10px; border: 0; text-align: left !important; }
    .cost-modal-periods td::before { content: attr(data-label); color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
    .cost-modal-periods td > * { justify-self: start; }
}
@media (max-width: 480px) {
    .cost-catalog-filters { grid-template-columns: 1fr; }
    .cost-catalog-filters .product-search,.cost-catalog-filters .cost-filter-product { grid-column: auto; }
    .cost-export-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Tax and VAT periods */
.tax-entry-modal-card { width: min(100%,760px); }
.tax-entry-modal-card form { display: grid; gap: 16px; }
.tax-entry-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 14px; }
.tax-entry-fields .feed-form-field { min-width: 0; }
.tax-entry-fields select,.tax-entry-fields input { width: 100%; }
.tax-entry-date { grid-column: 1 / -1; }
.tax-entry-modal-card .cost-period-hint { margin: 0; }
.tax-entry-modal-card .modal-actions { margin-top: 0; }
.tax-storage-icon { color: #7258c8; background: var(--primary-soft); }
.tax-filter-form { grid-template-columns: minmax(230px,1.35fr) repeat(4,minmax(145px,.75fr)) auto; }
.tax-history-table { min-width: 1120px; }
.tax-history-table td:nth-child(2) > strong,.tax-history-table td:nth-child(2) > small { display: block; }
.tax-history-table td:nth-child(2) > small { margin-top: 4px; }
.tax-disconnected { color: var(--red); font-size: 8px; }
.marketplace-pill { padding: 6px 8px; display: inline-flex; align-items: center; color: #554fd1; background: var(--primary-soft); border: 1px solid rgba(91,92,240,.14); border-radius: 7px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.marketplace-ozon { color: #2667d8; background: rgba(38,103,216,.1); border-color: rgba(38,103,216,.16); }
.marketplace-yandex { color: #d44848; background: rgba(212,72,72,.1); border-color: rgba(212,72,72,.16); }
.tax-rate-value,.tax-vat-value { color: var(--primary); font-size: 12px; white-space: nowrap; }
.tax-vat-value { color: #168566; }
.tax-period-date { white-space: nowrap; }
.tax-period-actor { max-width: 155px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.tax-modal-periods { min-width: 880px; }
.tax-modal-periods form { margin: 0; }
.tax-modal-periods .icon-button { width: 30px; height: 30px; font-size: 18px; }
.tax-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
html[data-theme="dark"] .marketplace-pill { border-color: rgba(130,131,255,.25); }
html[data-theme="dark"] .marketplace-ozon { color: #7daaff; background: rgba(49,105,205,.18); border-color: rgba(86,139,233,.25); }
html[data-theme="dark"] .marketplace-yandex { color: #ff9292; background: rgba(210,72,72,.16); border-color: rgba(229,100,100,.23); }

@media (max-width: 1120px) {
    .tax-filter-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .tax-filter-form .product-search { grid-column: span 2; }
}
@media (max-width: 720px) {
    .tax-filter-form { grid-template-columns: 1fr 1fr; }
    .tax-filter-form .product-search { grid-column: 1 / -1; }
    .tax-history-table,.tax-history-table tbody,.tax-history-table tr,.tax-history-table td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .tax-history-table thead { display: none; }
    .tax-history-table tbody { padding: 5px 14px 14px; }
    .tax-history-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .tax-history-table td { min-height: 36px; padding: 7px 0; display: grid; grid-template-columns: minmax(90px,.65fr) minmax(0,1.35fr); align-items: center; gap: 12px; border: 0; text-align: left !important; }
    .tax-history-table td::before { content: attr(data-label); color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
    .tax-history-table td > * { min-width: 0; justify-self: start; }
    .tax-history-table .cost-row-actions { justify-content: stretch; }
    .tax-modal-periods,.tax-modal-periods tbody,.tax-modal-periods tr,.tax-modal-periods td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .tax-modal-periods thead { display: none; }
    .tax-modal-periods tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .tax-modal-periods td { min-height: 34px; padding: 6px 0; display: grid; grid-template-columns: 105px minmax(0,1fr); align-items: center; gap: 10px; border: 0; text-align: left !important; }
    .tax-modal-periods td::before { content: attr(data-label); color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
}
@media (max-width: 520px) {
    .tax-entry-fields,.tax-filter-form { grid-template-columns: 1fr; }
    .tax-entry-date { grid-column: auto; }
    .tax-filter-form .product-search { grid-column: auto; }
    .tax-filter-form .orders-filter-actions,.tax-filter-form .orders-filter-actions .button { width: 100%; }
}

/* Shared controls intentionally stay last in the cascade. */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
.cost-entry-panel { overflow: visible; }

/* Advertising analytics */
.advertising-heading-actions { display: flex; align-items: stretch; gap: 8px; }
.advertising-export { white-space: nowrap; }
.advertising-export > span { color: var(--green); font-size: 17px; font-weight: 900; }
.advertising-section-tabs { margin-bottom: 16px; }
.advertising-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
.advertising-summary article { min-width: 0; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.advertising-summary span,.advertising-summary strong,.advertising-summary small { display: block; }
.advertising-summary span { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .035em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.advertising-summary strong { margin-top: 7px; overflow: hidden; font-size: 20px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.advertising-summary small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.advertising-panel { margin-bottom: 20px; }
.advertising-filter-panel { margin-bottom: 14px; overflow: hidden; }
.advertising-filter-panel .advertising-filter-form { border-bottom: 0; }
.advertising-filter-form { padding: 13px 16px; display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); align-items: end; gap: 8px; background: #fafbfe; border-bottom: 1px solid var(--line); }
.advertising-filter-form > label { min-width: 0; grid-column: span 2; }
.advertising-filter-form > label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 850; line-height: 1.2; text-transform: uppercase; }
.advertising-filter-form input,.advertising-filter-form select { width: 100%; height: 40px; padding: 0 10px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 11px; }
.advertising-search { grid-column: span 3 !important; }
.advertising-campaign-filter { grid-column: span 3 !important; }
.advertising-sort-filter { grid-column: span 3 !important; }
.advertising-filter-actions { grid-column: span 5; display: flex; justify-content: flex-end; gap: 7px; }
.advertising-filter-actions .button { min-width: 105px; }
.advertising-keywords-filters .advertising-sort-filter { grid-column: span 3 !important; }
.advertising-keywords-filters .advertising-filter-actions { grid-column: span 7; }
.advertising-table-head { min-height: 53px; padding: 11px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.advertising-table-head strong,.advertising-table-head span { display: block; }
.advertising-table-head strong { font-size: 13px; }
.advertising-table-head div > span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.advertising-fast-note { display: inline-flex !important; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.advertising-fast-note i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.advertising-table { min-width: 1320px; }
.advertising-table td { vertical-align: middle; }
.advertising-table td > strong,.advertising-table td > small { display: block; }
.advertising-table td > strong { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.advertising-table td > small { max-width: 250px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }
.advertising-app-pill { display: inline-flex; padding: 5px 7px; color: #7552c4; background: var(--primary-soft); border-radius: 6px; font-size: 10px; font-weight: 850; }
.advertising-spend { color: var(--red); }
.advertising-sales { color: var(--green); }
.advertising-keyword { color: var(--primary); }
.advertising-position { min-width: 28px; display: inline-grid !important; place-items: center; padding: 5px 7px; color: #9b6811; background: var(--orange-soft); border-radius: 6px; }
.advertising-empty { min-height: 230px; }
html[data-theme="dark"] .advertising-filter-form { background: #111a27; }
html[data-theme="dark"] .advertising-summary article { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .advertising-app-pill { color: #c7b2ff; background: #332852; }
html[data-theme="dark"] .advertising-position { color: #ffd17a; background: #41311d; }

@media (max-width: 1280px) {
    .advertising-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .advertising-filter-form > label { grid-column: span 3; }
    .advertising-search,.advertising-campaign-filter { grid-column: span 6 !important; }
    .advertising-sort-filter { grid-column: span 4 !important; }
    .advertising-filter-actions { grid-column: span 4; }
    .advertising-keywords-filters .advertising-filter-actions { grid-column: span 8; }
}
@media (max-width: 800px) {
    .advertising-heading-actions { width: 100%; flex-wrap: wrap; }
    .advertising-heading-actions .stocks-live-state { flex: 1; }
    .advertising-summary { grid-template-columns: 1fr 1fr; }
    .advertising-filter-form > label,.advertising-search,.advertising-campaign-filter,.advertising-sort-filter { grid-column: span 6 !important; }
    .advertising-filter-actions,.advertising-keywords-filters .advertising-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .advertising-heading-actions,.advertising-heading-actions .stocks-live-state,.advertising-export { width: 100%; }
    .advertising-summary { grid-template-columns: 1fr; }
    .advertising-filter-form { grid-template-columns: 1fr; }
    .advertising-filter-form > label,.advertising-search,.advertising-campaign-filter,.advertising-sort-filter,.advertising-filter-actions,.advertising-keywords-filters .advertising-filter-actions { grid-column: auto !important; }
    .advertising-filter-actions .button { flex: 1; min-width: 0; }
    .advertising-table-head { align-items: flex-start; flex-direction: column; }
    .advertising-table,.advertising-table tbody,.advertising-table tr,.advertising-table td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .advertising-table thead { display: none; }
    .advertising-table tbody { padding: 7px 14px 13px; }
    .advertising-table tr { padding: 11px 0; border-bottom: 1px solid var(--line); }
    .advertising-table tr:last-child { border-bottom: 0; }
    .advertising-table td { min-height: 35px; padding: 6px 0; display: grid; grid-template-columns: minmax(104px,.65fr) minmax(0,1.35fr); align-items: center; gap: 10px; border: 0; text-align: left !important; }
    .advertising-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
    .advertising-table td > * { min-width: 0; justify-self: start; }
}

/* Product-level advertising report. */
.advertising-statistics-summary {
    grid-template-columns: repeat(4,minmax(0,1fr));
}
.advertising-statistics-summary article {
    min-height: 82px;
    padding: 10px 12px;
}
.advertising-statistics-summary strong { margin-top: 5px; font-size: 17px; }
.advertising-statistics-summary small { margin-top: 3px; }
.advertising-statistics-summary .advertising-summary-negative {
    box-shadow: inset 3px 0 0 var(--red),var(--shadow-sm);
}
.advertising-statistics-summary .advertising-summary-negative strong {
    color: var(--red);
}
.advertising-statistics-filters > label {
    grid-column: span 2;
}
.advertising-statistics-filters { padding: 10px 12px; gap: 7px; }
.advertising-statistics-filters input,
.advertising-statistics-filters select { height: 36px; }
.advertising-statistics-filters .advertising-search {
    grid-column: span 4 !important;
}
.advertising-statistics-filters .advertising-sort-filter {
    grid-column: span 2 !important;
}
.advertising-statistics-filters .advertising-filter-actions {
    grid-column: span 2;
}
.advertising-campaign-group-table { min-width: 1080px; }
.advertising-campaign-link { min-width: 255px; padding: 8px 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; background: color-mix(in srgb,var(--primary) 5%,transparent); border: 1px solid transparent; border-radius: 10px; text-decoration: none; transition: color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.advertising-campaign-link-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.advertising-campaign-link-copy strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advertising-campaign-link-action { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); white-space: nowrap; }
.advertising-campaign-link-action b { font-size: 9px; font-weight: 850; }
.advertising-campaign-link-action i { width: 27px; height: 27px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 8px; font-size: 12px; font-style: normal; transition: color .18s ease,background .18s ease,transform .18s ease; }
.advertising-campaign-link:hover,.advertising-campaign-link:focus-visible { color: var(--primary); background: color-mix(in srgb,var(--primary) 10%,var(--surface)); border-color: color-mix(in srgb,var(--primary) 24%,var(--line)); box-shadow: 0 7px 18px rgba(91,92,240,.12); transform: translateY(-1px); }
.advertising-campaign-link:hover .advertising-campaign-link-action i,.advertising-campaign-link:focus-visible .advertising-campaign-link-action i { color: #fff; background: var(--primary); transform: translate(1px,-1px); }
.advertising-campaign-group-table td > span,
.advertising-upd-table td > span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.advertising-upd-filters .advertising-search { grid-column: span 3 !important; }
.advertising-upd-filters .advertising-sort-filter { grid-column: span 2 !important; }
.advertising-upd-filters .advertising-filter-actions { grid-column: span 3; }
.advertising-upd-table { min-width: 1080px; }
.advertising-product-table {
    min-width: 1360px;
    border-collapse: separate;
    border-spacing: 0;
}
.advertising-product-table th,
.advertising-product-table td { padding: 9px 10px; border-right: 1px solid var(--line); }
.advertising-product-table th:last-child,
.advertising-product-table td:last-child { border-right: 0; }
.advertising-product-table tbody tr + tr td { border-top: 1px solid var(--line); }
.advertising-product-table .advertising-col-context,
.advertising-product-table .advertising-col-traffic,
.advertising-product-table .advertising-col-orders,
.advertising-product-table th:nth-child(8),
.advertising-product-table td:nth-child(8) {
    border-left: 2px solid color-mix(in srgb,var(--primary) 24%,var(--line));
}
.advertising-product-table .advertising-col-context { background: color-mix(in srgb,var(--blue) 3%,var(--surface)); }
.advertising-product-table .advertising-col-stock,
.advertising-product-table .advertising-col-price { background: color-mix(in srgb,var(--green) 3%,var(--surface)); }
.advertising-product-table .advertising-col-traffic,
.advertising-product-table .advertising-col-efficiency { background: color-mix(in srgb,var(--primary) 3.5%,var(--surface)); }
.advertising-product-table .advertising-col-orders { background: color-mix(in srgb,var(--green) 4%,var(--surface)); }
.advertising-product-table .advertising-col-negative { background: color-mix(in srgb,var(--red) 3%,var(--surface)); }
.advertising-period-badge {
    width: fit-content;
    margin-top: 5px;
    display: block;
    padding: 3px 6px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 5px;
    font-size: 8px;
    font-weight: 850;
    white-space: nowrap;
}
.advertising-product-table th:first-child,
.advertising-product-table td:first-child {
    min-width: 270px;
}
.advertising-product-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.advertising-product-cell > div {
    min-width: 0;
}
.advertising-product-cell strong,
.advertising-product-cell small,
.advertising-product-cell > div > span {
    display: block;
    max-width: 245px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.advertising-product-cell strong {
    font-size: 12px;
}
.advertising-product-cell small,
.advertising-product-cell > div > span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}
.advertising-product-photo {
    position: relative;
    width: 38px;
    height: 46px;
    flex: 0 0 38px;
    display: grid !important;
    place-items: center;
    overflow: hidden;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.advertising-product-photo > span {
    font-size: 12px;
}
.advertising-product-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--surface);
}
.advertising-stock-lines {
    display: grid;
    gap: 5px;
}
.advertising-stock-lines > span {
    min-width: 76px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.advertising-stock-lines b {
    color: var(--muted);
    font-size: 10px;
}
.advertising-stock-lines strong {
    min-width: 30px;
    font-size: 11px;
}
.advertising-rate {
    width: fit-content;
    margin-top: 6px;
    margin-left: auto;
    display: inline-flex !important;
    padding: 4px 6px;
    color: var(--ink);
    background: var(--soft);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}
.advertising-rate-primary {
    color: var(--blue);
    background: var(--blue-soft);
}
.advertising-rate-success {
    color: var(--green);
    background: var(--green-soft);
}
.advertising-rate-negative {
    color: var(--red);
    background: var(--red-soft);
}
.advertising-negative {
    color: var(--red);
}

@media (max-width: 1280px) {
    .advertising-statistics-filters > label {
        grid-column: span 3;
    }
    .advertising-statistics-filters .advertising-search {
        grid-column: span 6 !important;
    }
    .advertising-statistics-filters .advertising-sort-filter,
    .advertising-statistics-filters .advertising-filter-actions {
        grid-column: span 3 !important;
    }
}
@media (max-width: 800px) {
    .advertising-statistics-summary {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .advertising-statistics-filters > label,
    .advertising-statistics-filters .advertising-sort-filter {
        grid-column: span 6 !important;
    }
    .advertising-statistics-filters .advertising-search,
    .advertising-statistics-filters .advertising-filter-actions {
        grid-column: 1 / -1 !important;
    }
}
@media (max-width: 600px) {
    .advertising-statistics-summary {
        grid-template-columns: 1fr;
    }
    .advertising-statistics-filters > label,
    .advertising-statistics-filters .advertising-search,
    .advertising-statistics-filters .advertising-sort-filter,
    .advertising-statistics-filters .advertising-filter-actions {
        grid-column: auto !important;
    }
    .advertising-product-table {
        min-width: 0;
    }
    .advertising-product-table th:first-child,
    .advertising-product-table td:first-child {
        min-width: 0;
    }
    .advertising-product-table td:first-child {
        grid-template-columns: 1fr;
    }
    .advertising-product-table td:first-child::before {
        margin-bottom: 2px;
    }
    .advertising-product-table .align-right > * {
        margin-left: 0;
    }
    .advertising-product-table td::before {
        font-size: 10px;
    }
    .advertising-stock-lines > span {
        justify-content: flex-start;
    }
}

/* Сравнение рекламных показателей с аналогичным предыдущим периодом. */
.advertising-comparison {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.advertising-comparison em {
    font-style: normal;
    font-weight: 700;
    opacity: .72;
}
.advertising-comparison b {
    font-size: 12px;
    line-height: .8;
}
.advertising-comparison.is-good {
    color: var(--green);
    background: var(--green-soft);
}
.advertising-comparison.is-bad {
    color: var(--red);
    background: var(--red-soft);
}
.advertising-comparison.is-neutral {
    color: var(--muted);
    background: var(--soft);
}
.advertising-comparison-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

/* Позиция ключа читается как шкала качества: зелёный - выше, красный - ниже. */
.advertising-keyword-head-actions,
.advertising-keyword-gradient {
    display: flex;
    align-items: center;
}
.advertising-keyword-head-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.advertising-keyword-gradient {
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.advertising-keyword-gradient i {
    width: 68px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #20b876 0%, #f4b740 50%, #ef5b62 100%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.advertising-keyword-row:not(.advertising-keyword-row-head) {
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--keyword-color, var(--green)) 14%, var(--surface)) 0%,
        var(--surface) 58%
    );
    box-shadow: inset 3px 0 var(--keyword-color, var(--green));
}
.advertising-keyword-position {
    color: var(--keyword-color, var(--green));
    font-weight: 900;
}

/* Краткая экономика WB на главном обзоре. */
.dashboard-wb-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.dashboard-period-controls {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-toolbar { position: relative; z-index: 30; }
.dashboard-custom-period { position: relative; }
.dashboard-custom-period summary {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}
.dashboard-custom-period summary::-webkit-details-marker { display: none; }
.dashboard-custom-period summary.active,
.dashboard-custom-period[open] summary {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: color-mix(in srgb,var(--primary) 30%,var(--line));
}
.dashboard-custom-period form {
    width: min(430px,calc(100vw - 32px));
    padding: 10px;
    position: absolute;
    z-index: 25;
    top: calc(100% + 7px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(2,minmax(130px,1fr)) auto;
    align-items: end;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-md);
}
.dashboard-custom-period label > span {
    margin-bottom: 4px;
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}
.dashboard-custom-period input {
    width: 100%;
    height: var(--control-height-compact);
    padding: 0 9px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    font-size: 12px;
}
.dashboard-custom-period input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent);
}
.dashboard-custom-period .button { min-height: var(--control-height-compact); }
.dashboard-period-error {
    margin: -9px 0 14px;
    padding: 9px 12px;
    color: var(--red);
    background: var(--red-soft);
    border: 1px solid color-mix(in srgb,var(--red) 24%,var(--line));
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
}
.dashboard-shell {
    min-width: 0;
    position: relative;
}
.dashboard-results {
    min-width: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.dashboard-shell.is-loading .dashboard-results {
    opacity: .48;
    transform: translateY(2px);
    pointer-events: none;
}
.dashboard-async-status {
    min-height: 34px;
    margin: -4px 0 10px;
    padding: 7px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb,var(--primary) 22%,var(--line));
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}
.dashboard-async-status[hidden] { display: none; }
.dashboard-async-status i {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    border: 2px solid color-mix(in srgb,var(--primary) 22%,transparent);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.dashboard-async-status.is-error {
    color: var(--red);
    background: var(--red-soft);
    border-color: color-mix(in srgb,var(--red) 24%,var(--line));
}
.dashboard-async-status.is-error i { animation: none; border-color: var(--red); }
.dashboard-wb-card {
    padding: 0;
    overflow: hidden;
}
.dashboard-wb-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
}
.dashboard-wb-title,
.dashboard-wb-actions,
.dashboard-wb-chart-head,
.dashboard-wb-chart-head > div {
    display: flex;
    align-items: center;
}
.dashboard-wb-title {
    min-width: 0;
    gap: 12px;
}
.dashboard-wb-actions {
    flex: 0 0 auto;
    gap: 6px;
}
.dashboard-wb-actions .button {
    min-height: 34px;
    white-space: nowrap;
}
.dashboard-wb-card > header h2 {
    margin: 0 0 4px;
    font-size: 16px;
}
.dashboard-wb-card > header span {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}
.dashboard-wb-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 17px;
    font-weight: 900;
}
.dashboard-wb-periods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-wb-periods > div {
    min-width: 0;
    padding: 15px 18px 17px;
    border-right: 1px solid var(--line);
}
.dashboard-wb-periods > div:last-child {
    border-right: 0;
}
.dashboard-wb-periods > div > span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dashboard-wb-periods > div strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-wb-periods > div small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}
.dashboard-wb-chart {
    padding: 15px 18px 18px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--soft) 58%, var(--surface));
}
.dashboard-wb-chart-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}
.dashboard-wb-chart-head > div {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.dashboard-wb-chart-head i {
    width: 15px;
    height: 3px;
    margin-left: 5px;
    border-radius: 999px;
}
.dashboard-wb-chart-head i:first-child { margin-left: 0; }
.dashboard-wb-chart-head .is-spend { background: var(--primary); }
.dashboard-wb-chart-head .is-drr { background: var(--orange); }
.dashboard-wb-chart-head .is-orders { background: var(--blue); }
.dashboard-wb-chart-head .is-order-sum { background: var(--green); }
.dashboard-wb-chart-canvas {
    position: relative;
    height: 225px;
}
.dashboard-wb-chart-canvas canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.dashboard-wb-chart-tooltip {
    position: absolute;
    z-index: 2;
    min-width: 145px;
    padding: 8px 10px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
    font-size: 10px;
    line-height: 1.55;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 10px));
}
.dashboard-wb-chart-tooltip[data-placement="below"] { transform: translate(-50%,10px); }
.dashboard-wb-chart-tooltip strong,
.dashboard-wb-chart-tooltip span { display: block; }
.dashboard-wb-chart-tooltip span { color: var(--muted); }

@media (max-width: 900px) {
    .dashboard-wb-overview {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .advertising-comparison-stack,
    .advertising-keyword-head-actions {
        justify-content: flex-start;
    }
    .advertising-keyword-head-actions {
        width: 100%;
    }
    .dashboard-wb-periods {
        grid-template-columns: 1fr;
    }
    .dashboard-wb-periods > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .dashboard-wb-periods > div:last-child {
        border-bottom: 0;
    }
    .dashboard-wb-card > header {
        align-items: flex-start;
        flex-direction: column;
    }
    .dashboard-wb-actions {
        width: 100%;
    }
    .dashboard-wb-actions .button {
        flex: 1 1 0;
    }
    .dashboard-wb-chart {
        padding-inline: 12px;
    }
    .dashboard-wb-chart-canvas {
        height: 205px;
    }
    .dashboard-period-controls {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
    .dashboard-custom-period summary { width: 100%; justify-content: center; }
    .dashboard-custom-period form {
        grid-template-columns: 1fr;
    }
}

/* Финальное выравнивание общих контролов, фильтров и журналов. */
.button,
.icon-button,
.stocks-filter-actions,
.advertising-filter-actions,
.orders-filter-actions,
.export-actions {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.stocks-filter-form > label,
.orders-filter-form > label,
.product-filter-form > label,
.cost-filter-form > label,
.advertising-filter-form > label,
.dynamics-filter-form > label,
.history-filters > label,
.admin-company-filters > label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.stocks-filter-form input,
.stocks-filter-form select,
.orders-filter-form input,
.orders-filter-form select,
.product-filter-form input,
.product-filter-form select,
.cost-filter-form input,
.cost-filter-form select,
.advertising-filter-form input,
.advertising-filter-form select,
.dynamics-filter-form input,
.dynamics-filter-form select {
    line-height: normal;
    vertical-align: middle;
}
.orders-filter-shell,
.dynamics-filter-form,
.cost-entry-panel,
.tax-entry-panel,
.product-form {
    overflow: visible;
}
.cost-product-options,
.warehouse-picker > div {
    max-height: min(320px, calc(100vh - 120px));
    overscroll-behavior: contain;
}
.product-taxonomy-panel {
    position: relative;
    z-index: 125;
    max-height: min(360px, calc(100vh - 140px));
    overflow-y: auto;
}
.log-filter-toolbar {
    min-height: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--soft) 65%, var(--surface));
}
.log-filter-toolbar > span {
    margin-right: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}
.log-filter-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
}
.log-filter-toolbar button {
    min-height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}
.log-filter-toolbar button b {
    min-width: 20px;
    padding: 3px 5px;
    color: inherit;
    background: var(--soft);
    border-radius: 6px;
    font-size: 9px;
}
.log-filter-toolbar button.active {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}
.log-error-type {
    min-width: 0;
    margin-left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.log-error-type > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}
.log-error-type select {
    width: 156px;
    min-height: 34px;
    padding-block: 0;
    font-size: 10px;
    font-weight: 750;
}
.feed-log-row {
    align-items: center;
}
.feed-log-row > div {
    min-width: 0;
}
.feed-log-row time {
    min-width: 72px;
}
.feed-log-row time b,
.feed-log-row time small {
    display: block;
}
.feed-log-row time b {
    color: var(--ink);
    font-size: 12px;
}
.feed-log-error {
    background: color-mix(in srgb, var(--red-soft) 45%, var(--surface));
}
.feed-log-success {
    background: color-mix(in srgb, var(--green-soft) 35%, var(--surface));
}
.feed-log-other {
    background: color-mix(in srgb, var(--purple-soft) 35%, var(--surface));
}
@media (max-width: 600px) {
    .log-filter-toolbar {
        flex-wrap: wrap;
    }
    .log-filter-toolbar > span {
        display: none;
    }
    .log-filter-toolbar button {
        flex: 1 0 auto;
    }
    .log-filter-buttons {
        width: 100%;
    }
    .log-error-type {
        width: 100%;
        margin-left: 0;
    }
    .log-error-type select {
        flex: 1 1 auto;
        width: auto;
    }
    .feed-log-row {
        grid-template-columns: auto 1fr;
    }
    .feed-log-row time {
        grid-column: 2;
        min-width: 0;
        text-align: left;
    }
    .feed-log-row time b,
    .feed-log-row time small {
        display: inline;
        margin: 0 8px 0 0;
    }
}

/* Compact public landing and shared DataShells logo. */
.admin-auth-logo { width: 70px; height: 70px; padding: 0; background: transparent; box-shadow: none; }
.admin-auth-logo img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(23,139,218,.2)); }
.landing-page .hero { min-height: 590px; padding: 50px 0 62px; }
.landing-page .hero-grid { gap: 54px; }
.landing-page .float-profit { right: 0; }
.landing-page .hero h1 { margin: 17px 0 19px; font-size: clamp(44px,4.7vw,62px); }
.landing-page .hero-lead { font-size: 16px; line-height: 1.65; }
.landing-page .hero-actions { margin: 27px 0 22px; }
.landing-page .hero-identity { padding: 6px 12px 6px 7px; gap: 9px; }
.landing-page .dashboard-preview { min-height: 395px; padding: 22px; }
.landing-page .preview-chart { height: 160px; padding-top: 17px; }
.landing-page .section { padding: 72px 0 78px; }
.landing-page .section-heading { margin-bottom: 32px; }
.landing-page .section-heading h2 { margin-top: 0; font-size: 35px; }
.landing-page #capabilities { padding: 94px 0 102px; }
.landing-page #capabilities .section-heading { margin-bottom: 43px; }
.landing-page #capabilities .section-heading h2 { font-size: 42px; }
.landing-page #capabilities .section-heading p { font-size: 15px; }
.landing-page .advantage-card { min-height: 172px; padding: 25px; gap: 17px; }
.landing-page .advantage-icon { width: 49px; height: 49px; border-radius: 15px; }
.landing-page .advantage-icon svg { width: 25px; height: 25px; }
.landing-page .advantage-card h3 { margin-top: 4px; font-size: 17px; }
.landing-page .advantage-card p { font-size: 13px; line-height: 1.6; }
.pricing-action-compact { justify-content: flex-end; }
.landing-page .pricing-section { padding-top: 68px; }
.landing-page .landing-price-card { padding: 19px; border-radius: 18px; }
.landing-page .price-miniature { height: 88px; margin-bottom: 17px; border-radius: 14px; }
.landing-page .price-miniature svg { width: 128px; height: 78px; }
.landing-page .price-miniature-connect img { width: 61px; height: 61px; }
.landing-page .landing-price-kicker { min-height: 30px; }
.landing-page .landing-price-value { margin: 5px 0 8px; font-size: clamp(25px,2.2vw,33px); }
.landing-page .landing-price-card p { min-height: 38px; margin-bottom: 14px; }
.landing-page .pricing-action { margin-top: 15px; padding: 14px 15px 14px 19px; }
.landing-page .cta-section { padding-bottom: 68px; }
.landing-page .cta-card { padding: 39px 48px; }
.landing-page .cta-card h2 { margin-top: 0; }
html[data-theme="dark"] .admin-auth-logo { background: transparent; box-shadow: none; }

@media (max-width: 760px) {
    .landing-page .hero { padding: 42px 0 52px; }
    .landing-page .hero h1 { font-size: 35px; }
    .landing-page .section { padding: 58px 0 62px; }
    .landing-page .section-heading { margin-bottom: 25px; }
    .landing-page .section-heading h2 { font-size: 29px; }
    .landing-page #capabilities { padding: 68px 0 72px; }
    .landing-page #capabilities .section-heading { margin-bottom: 30px; }
    .landing-page #capabilities .section-heading h2 { font-size: 32px; }
    .landing-page #capabilities .section-heading p { font-size: 13px; }
    .landing-page .advantage-card { min-height: 0; padding: 21px; }
    .landing-page .advantage-icon { width: 44px; height: 44px; }
    .landing-page .dashboard-preview { min-height: 330px; }
    .landing-page .landing-price-grid { grid-template-columns: 1fr; }
    .landing-page .cta-card { padding: 32px 24px; }
}

/* Единая контекстная инструкция для разделов компании и администратора. */
.section-guide-trigger { min-height: 40px; padding: 0 13px 0 7px; position: fixed; right: 22px; bottom: 22px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; color: var(--primary); background: color-mix(in srgb,var(--surface) 94%,transparent); border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius: 999px; box-shadow: 0 10px 28px rgba(30,38,70,.16); cursor: pointer; backdrop-filter: blur(14px); transition: color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.section-guide-trigger > span { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--primary),#7778ff); border-radius: 50%; font-size: 13px; font-weight: 950; line-height: 1; }
.section-guide-trigger strong { font-size: 9px; font-weight: 900; }
.section-guide-title-row { display: flex; align-items: center; gap: 8px; }
.section-guide-title-row h1 { margin: 0; }
.section-guide-trigger.is-inline { width: 29px; height: 29px; min-height: 29px; padding: 0; position: static; flex: 0 0 29px; justify-content: center; box-shadow: none; backdrop-filter: none; }
.section-guide-trigger.is-inline > span { width: 23px; height: 23px; font-size: 11px; }
.section-guide-trigger.is-inline strong { display: none; }
.section-guide-trigger.is-inline:hover { box-shadow: 0 7px 16px rgba(91,92,240,.2); transform: translateY(-1px); }
.company-section-glyph { width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center; color: var(--primary); background: color-mix(in srgb,var(--primary) 10%,transparent); border-radius: 7px; font-size: 10px; font-weight: 900; }
.company-section-link.active .company-section-glyph { color: #fff; background: var(--primary); }
.global-data-actuality { display: none; }
.global-data-actuality.is-mounted { min-width: 180px; padding: 10px 13px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
.global-data-actuality > i { width: 8px; height: 8px; grid-row: 1 / 3; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.global-data-actuality.is-empty > i { background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb,var(--muted) 14%,transparent); }
.global-data-actuality > span,.global-data-actuality strong { display: block; }
.global-data-actuality > span { font-size: 8px; }
.global-data-actuality strong { margin-top: 3px; color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.admin-template-subnav { margin-bottom: 14px; }
.global-template-panel,.navigation-template-panel { margin-bottom: 18px; scroll-margin-top: 88px; overflow: hidden; }
.global-template-summary { padding: 11px 18px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.global-template-summary > span { min-width: 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.global-template-summary small,.global-template-summary strong { display: block; }
.global-template-summary small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.global-template-summary strong { margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-immediate-option { margin-top: 2px; }
.navigation-order-layout { padding: 16px 18px; display: grid; grid-template-columns: minmax(300px,.8fr) minmax(520px,1.5fr); align-items: start; gap: 14px; }
.navigation-order-layout > section,.navigation-subsection-groups > section { min-width: 0; padding: 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.navigation-subsection-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.navigation-order-head { margin-bottom: 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.navigation-order-head span { color: var(--ink); font-size: 10px; font-weight: 850; }
.navigation-order-head small { color: var(--muted); font-size: 10px; }
.navigation-order-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.navigation-order-list li { min-width: 0; padding: 8px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.navigation-order-icon,.navigation-order-number { width: 30px; height: 30px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 10px; font-weight: 900; }
.navigation-order-list strong,.navigation-order-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navigation-order-list strong { color: var(--ink); font-size: 11px; }
.navigation-order-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.navigation-order-list nav { display: flex; gap: 4px; }
.navigation-order-list nav button { width: 27px; height: 27px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 900; }
.navigation-order-list nav button:hover:not(:disabled) { color: #fff; background: var(--primary); border-color: var(--primary); }
.navigation-order-list nav button:disabled { cursor: default; opacity: .3; }
.navigation-order-list-compact li { padding: 7px; grid-template-columns: 25px minmax(0,1fr) auto; }
.navigation-order-list-compact .navigation-order-number { width: 25px; height: 25px; }
@media (max-width: 1050px) { .navigation-order-layout { grid-template-columns: 1fr; }.navigation-subsection-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .global-template-summary,.navigation-subsection-groups { grid-template-columns: 1fr; }.global-data-actuality.is-mounted { width: 100%; }.navigation-order-layout { padding: 12px; }.navigation-order-list li { grid-template-columns: 28px minmax(0,1fr) auto; } }
.section-guide-trigger:hover { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 12px 30px rgba(91,92,240,.28); transform: translateY(-2px); }
.section-guide-trigger:hover > span { background: rgba(255,255,255,.2); }
.section-guide-trigger:focus-visible { outline: 4px solid color-mix(in srgb,var(--primary) 20%,transparent); outline-offset: 3px; }
.section-guide-dialog { width: min(940px,calc(100vw - 28px)); max-height: min(820px,calc(100vh - 28px)); padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 18px; overflow: visible; }
.section-guide-dialog::backdrop { background: rgba(9,14,26,.62); backdrop-filter: blur(5px); }
.section-guide-shell { max-height: min(820px,calc(100vh - 28px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 28px 90px rgba(5,12,29,.32); overflow: hidden; }
.section-guide-head { padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 13px; background: linear-gradient(135deg,color-mix(in srgb,var(--primary) 9%,var(--surface)),var(--surface)); border-bottom: 1px solid var(--line); }
.section-guide-title-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--primary),#7a7bff); border-radius: 11px; box-shadow: 0 8px 20px rgba(91,92,240,.25); font-size: 15px; font-weight: 950; }
.section-guide-head span { display: block; color: var(--primary); font-size: 7px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.section-guide-head h2 { margin: 3px 0 0; color: var(--ink); font-size: 19px; line-height: 1.2; }
.section-guide-head p { max-width: 690px; margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.section-guide-head > button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; font-size: 19px; line-height: 1; cursor: pointer; }
.section-guide-head > button:hover { color: var(--ink); border-color: color-mix(in srgb,var(--primary) 30%,var(--line)); }
.section-guide-body { padding: 16px 18px 18px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; overflow-y: auto; }
.section-guide-block { min-width: 0; padding: 13px 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.section-guide-block h3 { margin: 0 0 9px; color: var(--ink); font-size: 10px; }
.section-guide-block ul { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.section-guide-block li { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 7px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.section-guide-block li i { width: 20px; height: 20px; display: grid; place-items: center; color: var(--green); background: color-mix(in srgb,var(--green) 11%,transparent); border-radius: 6px; font-size: 8px; font-style: normal; font-weight: 900; }
.section-guide-settings li i { color: var(--primary); background: var(--primary-soft); }
.section-guide-preview { grid-column: 1 / -1; padding: 13px 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); }
.section-guide-preview-head { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-guide-preview-head span { color: var(--ink); font-size: 10px; font-weight: 850; }
.section-guide-preview-head small { color: var(--muted); font-size: 7px; }
.section-guide-demo-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.section-guide-demo-metrics > span { padding: 10px 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.section-guide-demo-metrics small,.section-guide-demo-metrics strong,.section-guide-demo-metrics em { display: block; }
.section-guide-demo-metrics small { color: var(--muted); font-size: 7px; }
.section-guide-demo-metrics strong { margin-top: 5px; color: var(--ink); font-size: 12px; }
.section-guide-demo-metrics em { margin-top: 4px; color: var(--green); font-size: 7px; font-style: normal; font-weight: 900; }
.section-guide-demo-metrics em.down { color: var(--red); }
.section-guide-demo-chart { height: 132px; position: relative; display: grid; grid-template-columns: repeat(4,1fr); align-items: end; gap: 4px; color: var(--muted); font-size: 7px; text-align: center; }
.section-guide-demo-chart > div { height: 105px; padding: 8px 18px 0; position: absolute; inset: 0 0 20px; display: flex; align-items: end; justify-content: space-around; gap: 9px; background: repeating-linear-gradient(to bottom,transparent 0,transparent 25px,var(--line) 26px); border-bottom: 1px solid var(--line); }
.section-guide-demo-chart i { width: min(60px,9%); display: block; background: linear-gradient(180deg,var(--primary),color-mix(in srgb,var(--primary) 35%,transparent)); border-radius: 5px 5px 1px 1px; }
.section-guide-demo-table,.section-guide-demo-matrix { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.section-guide-demo-table > div { display: grid; grid-template-columns: 150px 1fr 150px; }
.section-guide-demo-matrix > div { display: grid; grid-template-columns: minmax(130px,1.4fr) repeat(3,minmax(90px,1fr)); }
.section-guide-demo-table > div > *,.section-guide-demo-matrix > div > * { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; font-style: normal; }
.section-guide-demo-table > div:first-child,.section-guide-demo-matrix > div:first-child { background: var(--soft); }
.section-guide-demo-table > div:first-child b,.section-guide-demo-matrix > div:first-child b { color: var(--ink); }
.section-guide-demo-table em { color: var(--primary); font-weight: 850; text-align: right; }
.section-guide-demo-matrix em.up { color: var(--green); background: color-mix(in srgb,var(--green) 8%,transparent); }
.section-guide-demo-matrix em.down { color: var(--red); background: color-mix(in srgb,var(--red) 8%,transparent); }
.section-guide-demo-flow { padding: 18px; display: flex; align-items: center; justify-content: center; gap: 18px; background: var(--soft); border-radius: 10px; }
.section-guide-demo-flow > span { min-width: 135px; padding: 12px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.section-guide-demo-flow i { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 8px; font-size: 9px; font-style: normal; }
.section-guide-demo-flow strong { font-size: 8px; }
.section-guide-demo-flow > b { color: var(--primary); }
.section-guide-demo-timeline { min-height: 92px; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 10px; }
.section-guide-demo-timeline > span { min-width: 125px; text-align: center; }
.section-guide-demo-timeline i { width: 16px; height: 16px; margin: 0 auto 7px; display: block; background: var(--primary); border: 5px solid var(--primary-soft); border-radius: 50%; }
.section-guide-demo-timeline strong,.section-guide-demo-timeline small { display: block; }
.section-guide-demo-timeline strong { color: var(--ink); font-size: 8px; }
.section-guide-demo-timeline small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.section-guide-demo-timeline > b { height: 2px; background: color-mix(in srgb,var(--primary) 35%,var(--line)); }
.section-guide-demo-settings { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; }
.section-guide-demo-settings label span { margin-bottom: 5px; display: block; color: var(--muted); font-size: 7px; font-weight: 850; }
.section-guide-demo-settings label i { height: 36px; padding: 0 10px; display: flex; align-items: center; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font-size: 8px; font-style: normal; }
.section-guide-demo-settings button { height: 36px; padding: 0 15px; color: #fff; background: var(--primary); border: 0; border-radius: 8px; font-size: 8px; font-weight: 850; }
.section-guide-demo-catalog { padding: 10px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.section-guide-demo-catalog > i { width: 46px; height: 50px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-style: normal; font-weight: 900; }
.section-guide-demo-catalog strong,.section-guide-demo-catalog small { display: block; }
.section-guide-demo-catalog strong { color: var(--ink); font-size: 9px; }
.section-guide-demo-catalog small { margin: 4px 0 6px; color: var(--muted); font-size: 7px; }
.section-guide-demo-catalog div span { margin-right: 4px; padding: 3px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 7px; }
.section-guide-demo-catalog > b { color: var(--primary); font-size: 8px; }
.section-guide-footer { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--soft); border-top: 1px solid var(--line); }
.section-guide-footer > span { color: var(--muted); font-size: 7px; }
.section-guide-footer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.section-guide-footer-actions .button { min-width: 0; white-space: nowrap; }
.section-guide-footer-actions .button span { font-size: 14px; line-height: 1; }
html[data-theme="dark"] .section-guide-trigger { box-shadow: 0 12px 34px rgba(0,0,0,.35); }

/* First-visit invitation for repeatable section walkthroughs. */
.training-invite-dialog { width: min(620px,calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 20px; overflow: visible; }
.training-invite-dialog::backdrop { background: rgba(7,11,23,.68); backdrop-filter: blur(6px); }
.training-invite-shell { padding: 20px; background: var(--surface); border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius: 20px; box-shadow: 0 28px 90px rgba(5,12,29,.34); }
.training-invite-head { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: start; gap: 13px; }
.training-invite-icon { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--primary),#8266ff); border-radius: 13px; box-shadow: 0 10px 24px color-mix(in srgb,var(--primary) 28%,transparent); font-size: 17px; font-weight: 950; }
.training-invite-head small { display: block; color: var(--primary); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.training-invite-head h2 { margin: 4px 0 5px; font-size: 22px; letter-spacing: -.025em; line-height: 1.2; }
.training-invite-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.training-invite-previews { margin-top: 17px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.training-invite-previews figure { min-width: 0; margin: 0; padding: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.training-invite-previews figcaption { min-height: 35px; padding: 8px 3px 1px; display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.training-invite-previews figcaption b { color: var(--primary); }
.training-invite-shot { height: 102px; padding: 10px; position: relative; overflow: hidden; color: var(--ink); background: color-mix(in srgb,var(--surface) 97%,var(--primary)); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 18px rgba(20,28,50,.08); }
.training-invite-shot::before { content: ''; height: 7px; position: absolute; top: 0; right: 0; left: 0; background: linear-gradient(90deg,var(--primary),#8567ff); opacity: .18; }
.training-invite-shot-heading { display: flex; flex-direction: column; justify-content: center; }
.training-invite-shot-heading > span { display: flex; align-items: center; gap: 7px; }
.training-invite-shot-heading b { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.training-invite-shot-heading i { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; color: #fff; background: var(--primary); border: 3px solid var(--primary-soft); border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 950; box-shadow: 0 0 0 2px var(--primary); }
.training-invite-shot-heading em { margin-top: 10px; color: var(--muted); font-size: 8px; font-style: normal; }
.training-invite-shot-help { display: grid; grid-template-rows: auto 1fr auto; gap: 7px; }
.training-invite-shot-help > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.training-invite-shot-help > span b { font-size: 10px; }
.training-invite-shot-help > span i { color: var(--muted); font-size: 13px; font-style: normal; }
.training-invite-shot-help > em { color: var(--muted); font-size: 8px; font-style: normal; }
.training-invite-shot-help > strong { min-height: 29px; padding: 0 10px; justify-self: end; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb,var(--primary) 25%,var(--line)); border-radius: 7px; font-size: 8px; }
.training-invite-shot-help > strong i { font-size: 11px; font-style: normal; }
.training-invite-note { margin: 13px 0 0; padding: 10px 11px; display: grid; grid-template-columns: 23px minmax(0,1fr); align-items: center; gap: 9px; color: var(--muted); background: var(--blue-soft); border: 1px solid color-mix(in srgb,var(--blue) 18%,var(--line)); border-radius: 10px; font-size: 10px; line-height: 1.45; }
.training-invite-note > i { width: 23px; height: 23px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 7px; font-size: 9px; font-style: normal; font-weight: 900; }
.training-invite-never { margin-top: 13px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; cursor: pointer; }
.training-invite-never input { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; accent-color: var(--primary); }
.training-invite-shell > footer { margin-top: 17px; padding-top: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.training-invite-shell > footer .button { min-height: 40px; }
html[data-theme="dark"] .training-invite-shot { box-shadow: 0 8px 18px rgba(0,0,0,.22); }

@media (max-width: 620px) {
    .training-invite-shell { padding: 16px; }
    .training-invite-previews { grid-template-columns: 1fr; }
    .training-invite-shot { height: 88px; }
    .training-invite-shell > footer { align-items: stretch; flex-direction: column-reverse; }
    .training-invite-shell > footer .button { width: 100%; }
}

@media (max-width: 780px) {
    .section-guide-trigger { right: 14px; bottom: 14px; }
    .section-guide-trigger strong { display: none; }
    .section-guide-trigger { width: 43px; height: 43px; padding: 0; justify-content: center; }
    .section-guide-trigger > span { width: 30px; height: 30px; }
    .section-guide-body { grid-template-columns: 1fr; }
    .section-guide-preview { grid-column: 1; }
    .section-guide-demo-metrics { grid-template-columns: 1fr; }
    .section-guide-demo-table,.section-guide-demo-matrix { overflow-x: auto; }
    .section-guide-demo-table > div { min-width: 560px; }
    .section-guide-demo-matrix > div { min-width: 520px; }
    .section-guide-demo-flow { align-items: stretch; flex-direction: column; gap: 7px; }
    .section-guide-demo-flow > span { width: 100%; }
    .section-guide-demo-flow > b { align-self: center; transform: rotate(90deg); }
    .section-guide-demo-timeline { grid-template-columns: 1fr; }
    .section-guide-demo-timeline > b { width: 2px; height: 20px; margin: auto; }
    .section-guide-demo-settings { grid-template-columns: 1fr; }
    .section-guide-footer { align-items: stretch; flex-direction: column; }
    .section-guide-footer-actions { justify-content: stretch; }
    .section-guide-footer-actions .button { flex: 1 1 auto; }
}

/* Final shared control geometry: one baseline for filters, forms and dark theme. */
button,
input,
select,
textarea {
    max-width: 100%;
    color: var(--ink);
    font-family: var(--font);
}

select:not([multiple]) {
    min-width: 0;
    min-height: var(--control-height);
    padding-right: 32px !important;
    overflow: hidden;
    background-color: var(--surface);
    background-image:
        linear-gradient(45deg, transparent 50%, #8792a5 50%),
        linear-gradient(135deg, #8792a5 50%, transparent 50%) !important;
    background-position:
        calc(100% - 15px) 50%,
        calc(100% - 10px) 50% !important;
    background-repeat: no-repeat !important;
    background-size: 5px 5px !important;
    border-color: var(--line);
    border-radius: var(--control-radius);
    line-height: 1.25;
    text-overflow: ellipsis;
    vertical-align: middle;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select:not([multiple]):hover { border-color: #b7becc; }
select option { color: var(--ink); background: var(--surface); }

select:not([multiple]):disabled,
input:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: .58;
}

select:not([multiple]):focus,
input:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--primary) 70%, var(--line));
    box-shadow: 0 0 0 3px rgba(91,92,240,.1);
    outline: none;
}

:is(
    .stocks-filter-form,
    .orders-filter-form,
    .product-filter-form,
    .cost-filter-form,
    .advertising-filter-form,
    .dynamics-filter-form,
    .history-filters,
    .finance-filters,
    .rnp-filters
) > label > span:first-child {
    min-height: 16px;
    margin: 0 0 5px;
    display: flex;
    align-items: flex-end;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 750;
    line-height: 1.3;
}

:is(
    .stocks-filter-form,
    .orders-filter-form,
    .product-filter-form,
    .cost-filter-form,
    .advertising-filter-form,
    .dynamics-filter-form,
    .history-filters,
    .finance-filters,
    .rnp-filters
) :is(input:not([type="checkbox"]):not([type="radio"]), select, summary, .button) {
    min-height: var(--control-height);
    font-size: var(--ui-text);
    line-height: 1.25;
}

:is(.workspace-page,.admin-portal-page) .feed-form-field > span:first-child {
    min-height: 16px;
    margin-bottom: 5px;
    display: flex;
    align-items: flex-end;
    color: var(--muted);
    font-size: var(--ui-caption);
    line-height: 1.3;
}

:is(
    .check-field,
    .scheduler-store-list,
    .parallel-option,
    .stocks-source-switches,
    .warehouse-picker,
    .stock-value-toggle
) input[type="checkbox"] {
    flex: 0 0 18px;
    align-self: center;
    margin: 0;
    vertical-align: middle;
}

:is(.stocks-filter-actions,.orders-filter-actions,.advertising-filter-actions,.history-filters) {
    align-self: end;
}

:is(.stocks-filter-actions,.orders-filter-actions,.advertising-filter-actions) .button,
.history-filters > .button {
    min-height: var(--control-height);
}

.table-scroll :is(th,td),
table :is(th,td) {
    vertical-align: middle;
}

:is(.workspace-page,.admin-portal-page) .data-table th {
    font-size: 11px;
    line-height: 1.3;
}

:is(.workspace-page,.admin-portal-page) .data-table td {
    font-size: var(--ui-text);
    line-height: 1.4;
}

:is(.workspace-page,.admin-portal-page) .data-table td small {
    font-size: var(--ui-caption);
    line-height: 1.4;
}

/* Readability floor for helper text outside deliberate miniature guide previews. */
:is(.workspace-page,.admin-portal-page) small {
    font-size: max(10px,.82em);
    line-height: 1.4;
}

.company-section-link strong { font-size: 11px; }
.company-section-link small { font-size: 10px; }
.global-data-actuality > span { font-size: 10px; }
.global-data-actuality strong { font-size: 12px; }

.products-storage-card strong { font-size: 12px; }
.products-storage-card p { font-size: 10px; }
.product-stat-row span,.product-stat-row small { font-size: 10px; }
.product-tools-grid strong { font-size: 11px; }
.product-tools-grid p { font-size: 10px; }
.product-status,.product-group-chip,.product-tag-list span { font-size: 10px; }
.product-empty-field { font-size: 10px; }
.product-taxonomy summary { font-size: 11px; }
.product-taxonomy-option label > span { font-size: 10px; }
.product-taxonomy-add > input[type="text"] { font-size: 11px; }
.product-taxonomy-error { font-size: 10px; }

.account-email-state,.tariff-label,.scheduler-state,.automation-group-count,
.automation-group-state,.global-console-kicker,.global-script-status { font-size: 10px; }
.marketplace-title p,.settings-security-note p { font-size: 10px; }
.add-store-button { font-size: 11px; }

:is(.workspace-page,.admin-portal-page) .button-small {
    min-height: var(--control-height-compact);
    font-size: 11px;
}

:is(.workspace-page,.admin-portal-page) .icon-button {
    width: var(--control-height-compact);
    height: var(--control-height-compact);
}

:is(.workspace-page,.admin-portal-page) :is(input[type="number"],.align-right,.metric-value,.unit-value-primary) {
    font-variant-numeric: tabular-nums;
}

:is(.module-switch-row,.feed-toggle,.access-active-toggle) input:focus-visible + :is(i,span) {
    outline: 3px solid color-mix(in srgb,var(--primary) 30%,transparent);
    outline-offset: 2px;
}

.button,
.icon-button,
.theme-toggle,
.nav-toggle {
    line-height: 1;
}

html[data-theme="dark"] select:not([multiple]) {
    color: var(--ink);
    background-color: #111a27;
    background-image:
        linear-gradient(45deg,transparent 50%,#a9b5c7 50%),
        linear-gradient(135deg,#a9b5c7 50%,transparent 50%) !important;
    border-color: #334056;
}

html[data-theme="dark"] select option {
    color: var(--ink);
    background: #111a27;
}

html[data-theme="dark"] .field > span:first-child,
html[data-theme="dark"] .field > label:first-child { color: var(--muted); }
html[data-theme="dark"] :is(.input-wrap input:focus,.input-wrap select:focus) {
    color: var(--ink);
    background: #111a27;
    border-color: var(--primary);
}
html[data-theme="dark"] :is(
    .approval-state,
    .company-store-card,
    .tariff-company-badges span,
    .company-stores-toggle.active,
    .company-discount-form > span
) {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}
html[data-theme="dark"] .icon-button.suspend:hover {
    color: var(--orange);
    background: var(--orange-soft);
    border-color: color-mix(in srgb,var(--orange) 35%,var(--line));
}

@media (max-width: 600px) {
    .warehouse-picker > div {
        left: auto;
        right: 0;
        width: min(330px,calc(100vw - 32px));
        max-width: calc(100vw - 32px);
    }
}

/* Compact admin shell and the shared automation control center. */
.admin-portal-page .site-header { height: 64px; }
.admin-portal-page .brand { gap: 8px; font-size: 17px; }
.admin-portal-page .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.admin-brand-label { padding: 4px 7px; color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb,var(--primary) 16%,var(--line)); border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.admin-main-nav { padding: 4px; gap: 3px; background: color-mix(in srgb,var(--soft) 82%,transparent); border: 1px solid var(--line); border-radius: 11px; }
.admin-main-nav .nav-link { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; color: var(--muted); border-radius: 8px; font-size: 11px; }
.admin-main-nav .nav-link:hover { color: var(--ink); background: var(--surface); }
.admin-main-nav .nav-link.active { color: var(--primary); background: var(--surface); box-shadow: 0 3px 10px rgba(24,32,54,.08); }
.admin-main-nav .theme-toggle { width: 36px; height: 36px; margin-left: 3px; }
.admin-main-nav .button-small { min-height: 36px; padding: 0 11px; font-size: 11px; }
.admin-portal-page .workspace { min-height: calc(100vh - 64px); padding: 24px 0 44px; }
.admin-portal-page .page-heading { margin-bottom: 17px; }
.admin-portal-page .page-heading h1 { margin: 6px 0 4px; font-size: 27px; }
.admin-portal-page .page-heading p { font-size: 11px; }
.admin-portal-page .eyebrow { font-size: 10px; }
.admin-portal-page .admin-badge { padding: 8px 10px; font-size: 10px; }
.admin-portal-page .panel { border-radius: 14px; box-shadow: 0 7px 25px rgba(27,37,61,.045); }
.admin-portal-page .panel-head { min-height: 62px; padding: 13px 16px; }
.admin-portal-page .panel-head h2 { margin-bottom: 3px; font-size: 14px; }
.admin-portal-page .panel-head p { font-size: 10px; line-height: 1.45; }
.admin-portal-page .site-footer { display: none; }

.global-scheduler-console { overflow: hidden; }
.global-template-picker-bar { min-height: 61px; padding: 10px 13px; display: grid; grid-template-columns: minmax(240px,430px) auto 1fr; align-items: end; gap: 9px; background: color-mix(in srgb,var(--primary-soft) 36%,var(--surface)); border-bottom: 1px solid var(--line); }
.global-template-picker-bar .feed-form-field { margin: 0; }
.global-template-picker-bar .button { height: var(--control-height); align-self: end; }
.global-template-picker-note { justify-self: end; align-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.global-template-picker-note i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.global-template-picker-note b { color: var(--ink); }
.global-console-head { min-height: 72px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.global-console-head h2 { margin: 3px 0 4px; font-size: 16px; letter-spacing: -.025em; }
.global-console-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.global-console-kicker { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.global-scheduler-console .global-template-summary { padding: 8px 12px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.global-scheduler-console .global-template-summary > span { padding: 7px 9px; }
.global-scheduler-console .global-template-summary strong { font-size: 11px; }
.global-scheduler-console .global-template-summary small { font-size: 10px; }
.global-console-layout { min-height: 430px; display: grid; grid-template-columns: 310px minmax(0,1fr); background: var(--surface); }
.global-script-catalog { min-width: 0; padding: 12px; background: color-mix(in srgb,var(--soft) 76%,var(--surface)); border-right: 1px solid var(--line); }
.global-script-catalog-head { min-height: 36px; padding: 0 3px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.global-script-catalog-head strong,.global-script-catalog-head small { display: block; }
.global-script-catalog-head strong { font-size: 11px; }
.global-script-catalog-head small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.global-script-catalog-head > span { min-width: 25px; height: 25px; padding: 0 7px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 10px; font-weight: 900; }
.global-script-list { max-height: 467px; padding-right: 3px; display: grid; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.global-script-item { min-width: 0; min-height: 48px; display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: stretch; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; transition: border-color .16s,background .16s,box-shadow .16s; }
.global-script-item.is-active { border-color: color-mix(in srgb,var(--primary) 50%,var(--line)); box-shadow: inset 3px 0 var(--primary); }
.global-script-item.is-selected { background: color-mix(in srgb,var(--primary-soft) 50%,var(--surface)); }
.global-script-item > label { min-width: 0; padding: 6px 7px; display: grid; grid-template-columns: 15px 28px minmax(0,1fr); align-items: center; gap: 7px; cursor: pointer; }
.global-script-item input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.global-script-item .batch-script-icon { width: 28px; height: 28px; border-radius: 7px; font-size: 10px; }
.global-script-item label strong,.global-script-item label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-script-item label strong { font-size: 11px; }
.global-script-item label small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.global-script-item.is-selected label small { color: var(--green); }
.global-script-item > button { width: 28px; padding: 0; color: var(--muted); background: transparent; border: 0; border-left: 1px solid var(--line); cursor: pointer; font-size: 18px; }
.global-script-item > button:hover { color: var(--primary); background: var(--primary-soft); }
.global-script-workspace { min-width: 0; padding: 12px; display: grid; align-content: start; gap: 10px; }
.global-script-settings-stack { min-height: 174px; }
.global-script-settings { min-height: 420px; display: grid; grid-template-rows: auto auto auto 1fr auto; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.global-script-settings.is-hidden { display: none; }
.global-script-settings > header { min-width: 0; padding: 11px 13px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.global-script-settings > header .batch-script-icon { width: 36px; height: 36px; font-size: 12px; }
.global-script-settings > header small { color: var(--primary); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.global-script-settings > header h3 { margin: 2px 0 2px; font-size: 13px; }
.global-script-settings > header p { margin: 0; color: var(--muted); font-size: 10px; }
.global-script-status { padding: 5px 7px; color: var(--muted); background: var(--soft); border-radius: 6px; font-size: 10px; font-weight: 850; }
.global-script-status.is-on { color: #147b59; background: var(--green-soft); }
.global-script-options { padding: 10px 13px; display: grid; grid-template-columns: repeat(2,minmax(190px,1fr)) minmax(270px,1.25fr); align-items: end; gap: 10px; }
.global-history-input { margin-top: 5px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.global-history-input input { width: 100%; height: var(--control-height); padding: 0 9px; background: transparent; border: 0; outline: 0; font-size: var(--ui-text); }
.global-history-input b { padding: 0 9px; color: var(--muted); font-size: var(--ui-caption); }
.global-script-fixed-option { padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.global-script-fixed-option span,.global-script-fixed-option strong,.global-script-fixed-option small { display: block; }
.global-script-fixed-option span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.global-script-fixed-option strong { margin-top: 4px; font-size: 11px; }
.global-script-fixed-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.global-script-parallel { min-height: 58px; margin: 0; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.global-script-network-options { min-width: 0; padding: 9px 13px; display: grid; grid-template-columns: minmax(160px,.8fr) minmax(140px,.6fr) minmax(150px,.7fr); align-items: end; gap: 9px; background: var(--surface); border-top: 1px solid var(--line); }
.global-script-network-options > div { align-self: center; }
.global-script-network-options > div span,.global-script-network-options > div small { display: block; }
.global-script-network-options > div span { color: var(--ink); font-size: 11px; font-weight: 850; }
.global-script-network-options > div small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.global-script-network-options .feed-form-field { min-width: 0; margin: 0; }
.global-script-network-options .feed-form-field > input { width: 100%; }
.global-script-schedule { min-width: 0; padding: 11px 13px 12px; background: color-mix(in srgb,var(--primary-soft) 24%,var(--surface)); border-top: 1px solid var(--line); }
.global-script-schedule-title { margin-bottom: 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.global-script-schedule-title span { color: var(--ink); font-size: 11px; font-weight: 850; }
.global-script-schedule-title small { color: var(--muted); font-size: 10px; text-align: right; }
.global-script-schedule-fields { display: grid; grid-template-columns: minmax(190px,1.2fr) minmax(210px,1.1fr) minmax(145px,.75fr); align-items: end; gap: 9px; }
.global-script-schedule-fields .scheduler-interval-group { min-width: 0; gap: 7px; }
.global-script-schedule .feed-form-field { min-width: 0; margin: 0; }
.global-script-schedule .feed-form-field > span { min-height: 11px; display: flex; align-items: center; }
.global-script-schedule .batch-weekdays { margin-top: 10px; padding: 0; }
.global-script-schedule .batch-weekdays legend { margin-bottom: 6px; }
.global-script-settings > footer { min-height: 40px; padding: 7px 10px 7px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border-top: 1px solid var(--line); }
.global-script-settings > footer > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.global-script-settings > footer > span i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.global-schedule-compact { padding: 11px 13px; display: grid; grid-template-columns: minmax(230px,.8fr) minmax(560px,1.8fr); align-items: end; gap: 9px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.global-schedule-compact .global-template-name { align-self: end; }
.global-schedule-compact .batch-schedule-fields { padding: 0; grid-template-columns: minmax(180px,1.2fr) minmax(205px,1.2fr) minmax(130px,.75fr); border: 0; }
.global-schedule-compact .batch-weekdays,.global-schedule-compact .global-immediate-option { grid-column: 1 / -1; }
.global-schedule-compact .global-immediate-option { margin: 0; }
.global-schedule-compact.global-template-meta { grid-template-columns: minmax(260px,1fr) minmax(380px,1.35fr); align-items: stretch; }
.global-template-meta .global-immediate-option { grid-column: auto; min-height: 58px; }
.global-scheduler-console .batch-schedule-editor-actions { padding: 10px 13px; align-items: center; justify-content: space-between; }
.global-scheduler-console .batch-schedule-editor-actions > span { color: var(--muted); font-size: 10px; }

html[data-theme="dark"] .admin-main-nav { background: rgba(17,26,39,.78); }
html[data-theme="dark"] .admin-main-nav .nav-link.active,
html[data-theme="dark"] .admin-main-nav .nav-link:hover { background: #1a2433; }
html[data-theme="dark"] .global-script-catalog { background: #111a27; }
html[data-theme="dark"] .global-template-picker-bar { background: rgba(91,92,240,.08); }
html[data-theme="dark"] .global-script-item,
html[data-theme="dark"] .global-script-settings > header,
html[data-theme="dark"] .global-script-settings > footer,
html[data-theme="dark"] .global-history-input,
html[data-theme="dark"] .global-script-fixed-option,
html[data-theme="dark"] .global-script-parallel,
html[data-theme="dark"] .global-script-network-options,
html[data-theme="dark"] .global-script-schedule,
html[data-theme="dark"] .global-schedule-compact { background: var(--surface); }
html[data-theme="dark"] .global-script-item.is-selected { background: rgba(91,92,240,.12); }

@media (max-width: 1050px) {
    .global-console-layout { grid-template-columns: 270px minmax(0,1fr); }
    .global-schedule-compact { grid-template-columns: 1fr; }
    .global-schedule-compact .batch-schedule-fields { grid-template-columns: minmax(160px,1.1fr) minmax(190px,1.1fr) minmax(120px,.75fr); }
    .global-script-schedule-fields { grid-template-columns: 1fr 1fr; }
    .global-script-network-options { grid-template-columns: 1fr 1fr; }
    .global-script-network-options > div { grid-column: 1 / -1; }
    .global-script-schedule-fields > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .admin-main-nav { background: var(--surface); }
    .admin-main-nav .nav-link { padding: 10px 12px; }
    .global-scheduler-console .global-template-summary { grid-template-columns: 1fr 1fr; }
    .global-console-layout { grid-template-columns: 1fr; }
    .global-script-catalog { border-right: 0; border-bottom: 1px solid var(--line); }
    .global-script-list { max-height: 230px; }
    .global-script-options,.global-script-network-options,.global-script-schedule-fields,.global-schedule-compact .batch-schedule-fields,.global-schedule-compact.global-template-meta { grid-template-columns: 1fr; }
    .global-script-network-options > div { grid-column: auto; }
    .global-script-schedule-fields > :last-child { grid-column: auto; }
    .global-script-schedule-title { align-items: flex-start; flex-direction: column; gap: 3px; }
    .global-script-schedule-title small { text-align: left; }
    .global-scheduler-console .batch-schedule-editor-actions,.global-console-head { align-items: stretch; flex-direction: column; }
    .global-scheduler-console .batch-schedule-editor-actions .button { width: 100%; }
    .global-template-picker-bar { grid-template-columns: 1fr; align-items: stretch; }
    .global-template-picker-bar .button { width: 100%; }
    .global-template-picker-note { justify-self: start; }
}

.company-automation-panel { margin-bottom: 16px; overflow: hidden; }
.automation-group-count { padding: 6px 9px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.company-automation-groups { padding: 12px; display: grid; grid-template-columns: repeat(auto-fit,minmax(285px,1fr)); gap: 9px; }
.company-automation-group { min-width: 0; padding: 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.company-automation-group.is-disabled { opacity: .68; }
.company-automation-group > header { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.automation-group-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 14px; font-weight: 900; }
.company-automation-group header strong,.company-automation-group header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-automation-group header strong { font-size: 11px; }
.company-automation-group header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.automation-group-state { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 10px; font-weight: 800; }
.automation-group-state i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.company-automation-group.is-disabled .automation-group-state { color: var(--muted); }
.company-automation-group > div { margin-top: 9px; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; border-top: 1px solid var(--line); }
.company-automation-group > div > span { min-width: 155px; padding: 6px 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 10px; font-weight: 750; }
.company-automation-group > div b { color: var(--primary); }
.company-automation-group > div em,.company-automation-group > div strong,.company-automation-group > div small { display: block; font-style: normal; }
.company-automation-group > div small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; }
html[data-theme="dark"] .company-automation-group { background: #111a27; }

/* Compact admin template navigation: keep captions separated and readable. */
.admin-template-subnav {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 4px;
    display: flex;
    align-items: stretch;
    gap: 5px;
    overflow-x: auto;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.admin-template-subnav a {
    min-width: 180px;
    padding: 8px 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 8px;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.admin-template-subnav a:hover,
.admin-template-subnav a:focus-visible {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.admin-template-subnav strong,
.admin-template-subnav small {
    display: block;
}

.admin-template-subnav strong { font-size: 11px; }
.admin-template-subnav small { font-size: 10px; }

/* The stock-value switch is a control, not a vertically stacked filter label. */
.stocks-filter-form > .stock-value-toggle {
    min-height: var(--control-height);
    height: var(--control-height);
    align-self: end;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    padding: 5px 10px;
}

.stocks-filter-form > .stock-value-toggle > span {
    min-height: 0;
    margin: 0;
    display: block;
    font-size: 10px;
}

.stocks-filter-form > .stock-value-toggle b,
.stocks-filter-form > .stock-value-toggle small {
    line-height: 1.2;
}

@media (max-width: 700px) {
    .admin-template-subnav { width: 100%; }
    .admin-template-subnav a { min-width: 155px; }
}

/* Company section rail: always scrollable when the available width is exhausted. */
.company-section-nav-frame {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.company-section-nav-frame .company-section-nav {
    width: 100%;
    max-width: none;
    min-width: 0;
    scroll-behavior: smooth;
    scroll-padding-inline: 8px;
    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
}

.company-section-scroll {
    width: 34px;
    height: 48px;
    padding: 0;
    display: none;
    place-items: center;
    color: var(--primary);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 22px;
    font-weight: 750;
    line-height: 1;
    transition: color .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}

.company-section-nav-frame.has-overflow .company-section-scroll { display: grid; }
.company-section-scroll:hover:not(:disabled) { color: #fff; background: var(--primary); border-color: var(--primary); }
.company-section-scroll:disabled { cursor: default; opacity: .28; }
.company-section-scroll:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 22%,transparent); outline-offset: 2px; }

/* Detailed contextual guide. */
.section-guide-dialog { width: min(1120px,calc(100vw - 28px)); }
.section-guide-body { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.section-guide-head p { max-width: 820px; font-size: 12px; }
.section-guide-block h3 { font-size: 13px; }
.section-guide-block li { font-size: 11px; line-height: 1.55; }
.section-guide-block ol { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.section-guide-block ol li { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 7px; color: var(--muted); }
.section-guide-block ol li i { width: 20px; height: 20px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 8px; font-style: normal; font-weight: 900; }
.section-guide-tips li i { color: var(--blue); background: var(--blue-soft); }
.section-guide-capabilities { grid-column: span 2; background: color-mix(in srgb,var(--primary) 5%,var(--surface)); }
.section-guide-capabilities ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
.section-guide-capabilities li i { color: var(--primary); background: var(--primary-soft); }

.section-guide-location,
.section-guide-filters {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.section-guide-location {
    display: grid;
    grid-template-columns: minmax(230px,.72fr) minmax(510px,1.65fr);
    align-items: center;
    gap: 18px;
}

.section-guide-location-copy > span,
.section-guide-section-heading > span {
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-guide-location-copy h3,
.section-guide-section-heading h3 {
    margin: 5px 0 7px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.section-guide-location-copy p,
.section-guide-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
}

.section-guide-page-map {
    min-width: 0;
    padding: 9px;
    position: relative;
    overflow: hidden;
    background: color-mix(in srgb,var(--soft) 78%,var(--surface));
    border: 1px solid var(--line);
    border-radius: 11px;
}

.section-guide-map-browser { height: 25px; padding: 0 9px; display: flex; align-items: center; gap: 5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px 7px 4px 4px; font-size: 7px; }
.section-guide-map-browser i { width: 6px; height: 6px; background: var(--line-strong); border-radius: 50%; }
.section-guide-map-browser i:first-child { background: var(--red); }
.section-guide-map-browser i:nth-child(2) { background: var(--orange); }
.section-guide-map-browser i:nth-child(3) { background: var(--green); }
.section-guide-map-browser span { margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-guide-map-nav { height: 25px; margin-top: 5px; padding: 5px 8px; display: flex; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.section-guide-map-nav span { width: 19%; background: var(--line); border-radius: 4px; }
.section-guide-map-nav span:first-child { background: color-mix(in srgb,var(--primary) 28%,var(--line)); }
.section-guide-map-title { height: 35px; padding: 8px 9px 5px; display: flex; align-items: flex-start; justify-content: space-between; }
.section-guide-map-title b { color: var(--ink); font-size: 9px; }
.section-guide-map-title i { width: 68px; height: 7px; background: var(--line); border-radius: 4px; }
.section-guide-map-callout { width: max-content; max-width: calc(100% - 28px); margin: 0 14px 7px; padding: 6px 10px; position: relative; color: #fff; background: linear-gradient(135deg,var(--primary),#7778ff); border-radius: 7px; box-shadow: 0 7px 18px color-mix(in srgb,var(--primary) 30%,transparent); }
.section-guide-map-callout::after { content: ''; position: absolute; left: 22px; bottom: -5px; width: 10px; height: 10px; background: var(--primary); transform: rotate(45deg); }
.section-guide-map-callout strong,.section-guide-map-callout small { display: block; }
.section-guide-map-callout strong { font-size: 8px; }
.section-guide-map-callout small { margin-top: 2px; color: rgba(255,255,255,.78); font-size: 6px; }
.section-guide-map-filters { padding: 7px; position: relative; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)) auto; align-items: end; gap: 5px; background: color-mix(in srgb,var(--primary) 7%,var(--surface)); border: 2px solid var(--primary); border-radius: 8px; box-shadow: 0 0 0 4px color-mix(in srgb,var(--primary) 10%,transparent); }
.section-guide-map-filters > span { min-width: 0; height: 34px; padding: 5px 6px; display: flex; flex-direction: column; justify-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.section-guide-map-filters small,.section-guide-map-filters b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-guide-map-filters small { color: var(--muted); font-size: 5px; }
.section-guide-map-filters b { margin-top: 3px; color: var(--ink); font-size: 6px; }
.section-guide-map-filters button { height: 34px; padding: 0 9px; color: #fff; background: var(--primary); border: 0; border-radius: 6px; font-size: 6px; font-weight: 850; }
.section-guide-map-result { height: 47px; margin-top: 9px; padding: 7px; display: grid; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.section-guide-map-result span { background: linear-gradient(90deg,var(--line) 0 18%,transparent 18% 20%,var(--line) 20% 58%,transparent 58% 60%,var(--line) 60% 100%); border-radius: 3px; opacity: .8; }

.section-guide-section-heading { max-width: 740px; margin-bottom: 12px; }
.section-guide-filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.section-guide-filter-card { min-width: 0; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.section-guide-filter-card header { margin-bottom: 9px; display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 8px; }
.section-guide-filter-card header > i { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: var(--primary); border-radius: 8px; font-size: 8px; font-style: normal; font-weight: 900; }
.section-guide-filter-card header small,.section-guide-filter-card header strong { display: block; }
.section-guide-filter-card header small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.section-guide-filter-card header strong { margin-top: 3px; color: var(--ink); font-size: 12px; }
.section-guide-filter-card dl { margin: 0; display: grid; gap: 7px; }
.section-guide-filter-card dl > div { display: grid; grid-template-columns: 82px 1fr; align-items: start; gap: 8px; }
.section-guide-filter-card dt { color: var(--muted); font-size: 10px; font-weight: 850; }
.section-guide-filter-card dd { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.5; }
.section-guide-filter-card code { padding: 3px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-family: var(--font); font-size: 10px; font-weight: 750; }
.section-guide-filter-note { margin-top: 10px; padding: 10px 11px; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 9px; color: var(--muted); background: var(--blue-soft); border: 1px solid color-mix(in srgb,var(--blue) 20%,var(--line)); border-radius: 9px; }
.section-guide-filter-note > i { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 7px; font-size: 9px; font-style: normal; font-weight: 900; }
.section-guide-filter-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.section-guide-filter-note strong { color: var(--ink); }

.billing-period-status-grid { padding: 0 20px 15px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border-bottom: 1px solid var(--line); }
.billing-period-status { min-width: 0; padding: 12px 13px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.billing-period-status-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 11px; font-weight: 900; }
.billing-period-status small,.billing-period-status strong { display: block; }
.billing-period-status small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.billing-period-status strong { margin-top: 4px; font-size: 12px; }
.billing-period-status p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.billing-period-status-active { background: color-mix(in srgb,var(--green) 7%,var(--surface)); border-color: color-mix(in srgb,var(--green) 24%,var(--line)); }
.billing-period-status-active .billing-period-status-icon { color: var(--green); background: var(--green-soft); }
.billing-period-reminder { background: color-mix(in srgb,var(--blue) 7%,var(--surface)); border-color: color-mix(in srgb,var(--blue) 23%,var(--line)); }
.billing-period-reminder .billing-period-status-icon { color: var(--blue); background: var(--blue-soft); }
.monthly-billing-panel .billing-breakdown { grid-template-columns: repeat(4,minmax(0,1fr)); }

@media (max-width: 900px) {
    .section-guide-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .section-guide-capabilities { grid-column: 1 / -1; }
    .section-guide-location { grid-template-columns: 1fr; }
    .section-guide-filter-grid { grid-template-columns: 1fr; }
    .monthly-billing-panel .billing-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
    .company-section-nav-frame { gap: 4px; }
    .company-section-scroll { width: 29px; height: 44px; }
    .company-section-link { min-width: 150px; }
    .section-guide-body { grid-template-columns: 1fr; padding: 12px; }
    .section-guide-capabilities { grid-column: auto; }
    .section-guide-capabilities ul { grid-template-columns: 1fr; }
    .section-guide-location,.section-guide-filters { padding: 12px; }
    .section-guide-page-map { padding: 7px; }
    .section-guide-map-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .section-guide-map-filters > span:nth-of-type(n+5) { display: none; }
    .section-guide-map-filters button { grid-column: 1 / -1; }
    .section-guide-filter-card dl > div { grid-template-columns: 1fr; gap: 3px; }
    .billing-period-status-grid,.monthly-billing-panel .billing-breakdown { grid-template-columns: 1fr; padding-inline: 12px; }
}

/* UNIT / Wildberries: one compact, server-filtered product economy table. */
.unit-wb-page .workspace { padding-top: 20px; padding-bottom: 52px; }
.unit-wb-page .page-heading { margin-bottom: 14px; }
.unit-wb-page .stocks-heading h1 { margin-top: 4px; }
.unit-wb-page .unit-section-tabs, .unit-ozon-page .unit-section-tabs { margin-bottom: 10px; }
.unit-section-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.unit-marketplace-dot { width: 20px; height: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#a837dc,#ec2f7d); border-radius: 6px; font-size: 10px; font-weight: 900; }
.unit-summary { margin-bottom: 8px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.unit-summary article { min-width: 0; padding: 14px 15px; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.unit-summary article::before { content: ""; width: 3px; position: absolute; inset: 0 auto 0 0; background: var(--primary); }
.unit-summary .unit-summary-fbo::before { background: var(--green); }
.unit-summary .unit-summary-fbs::before { background: var(--blue); }
.unit-summary span,.unit-summary strong,.unit-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-summary span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.unit-summary strong { margin-top: 7px; font-size: 20px; letter-spacing: -.03em; }
.unit-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.unit-wb-page .unit-summary article { padding: 9px 12px; }
.unit-wb-page .unit-summary strong { margin-top: 4px; font-size: 18px; }
.unit-wb-page .unit-summary small { margin-top: 2px; }

.unit-calculation-bar { min-height: 72px; margin-bottom: 10px; padding: 11px 13px; display: grid; grid-template-columns: minmax(210px,1fr) minmax(240px,1.25fr) minmax(125px,.55fr) auto auto; align-items: end; gap: 9px; overflow: visible; }
.unit-calculation-intro { min-width: 0; align-self: center; }
.unit-calculation-intro span,.unit-calculation-bar > label > span { display: block; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.unit-calculation-intro strong { margin-top: 5px; display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.unit-calculation-intro small { margin-top: 3px; display: block; color: var(--muted); font-size: 10px; }
.unit-calculation-bar > label { min-width: 0; display: grid; grid-template-rows: 13px var(--control-height) 13px; align-items: start; row-gap: 3px; }
.unit-calculation-bar > label > span { margin: 0; line-height: 13px; }
.unit-localization-field small { margin: 0; display: block; color: var(--muted); font-size: 10px; line-height: 13px; }
.unit-calculation-bar select,.unit-calculation-bar input { width: 100%; height: var(--control-height); margin: 0; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 12px; }
.unit-calculation-bar select:focus,.unit-calculation-bar input:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.unit-calculation-bar > .button { min-height: var(--control-height); align-self: start; margin-top: 16px; }
.unit-economics-bar { min-height: 72px; margin-bottom: 10px; padding: 11px 13px; display: grid; grid-template-columns: minmax(210px,1.1fr) repeat(5,minmax(112px,.58fr)) auto; align-items: end; gap: 9px; }
.unit-economics-intro { min-width: 0; align-self: center; }
.unit-economics-intro span,.unit-economics-bar label > span { display: block; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.unit-economics-intro strong { margin-top: 5px; display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.unit-economics-intro small { margin-top: 3px; display: block; color: var(--muted); font-size: 10px; }
.unit-economics-bar label { min-width: 0; }
.unit-economics-bar input,.unit-economics-bar select { width: 100%; height: var(--control-height); margin-top: 4px; padding: 0 10px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 12px; }
.unit-economics-bar select { padding-right: 30px; }
.unit-economics-bar input:focus,.unit-economics-bar select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.unit-economics-bar > .button { min-height: var(--control-height); }
.unit-wb-page .unit-calculation-bar,.unit-wb-page .unit-economics-bar { min-height: 62px; padding: 8px 10px; gap: 7px; }
.unit-wb-page .unit-calculation-bar select,.unit-wb-page .unit-calculation-bar input,.unit-wb-page .unit-economics-bar input,.unit-wb-page .unit-economics-bar select { height: var(--control-height-compact); min-height: var(--control-height-compact); }
.unit-wb-page .unit-calculation-bar > .button,.unit-wb-page .unit-economics-bar .button,.unit-wb-page .unit-formula-guide summary { height: var(--control-height-compact); min-height: var(--control-height-compact); }
.unit-autosave-actions { min-width: 126px; display: grid; align-items: end; gap: 4px; }
.unit-autosave-state { min-height: 13px; display: block; color: var(--muted); font-size: 10px; font-weight: 750; text-align: center; transition: color .18s ease; }
.unit-economics-bar.is-dirty .unit-autosave-state { color: #b7791f; }
.unit-economics-bar.is-saving .unit-autosave-state { color: var(--primary); }
.unit-economics-bar.is-saved .unit-autosave-state { color: #159765; }
.unit-economics-bar.is-error .unit-autosave-state { color: #dc3d57; }
.unit-economics-bar.is-saving .button { opacity: .65; pointer-events: none; }
.unit-formula-guide { position: relative; align-self: start; margin-top: 16px; }
.unit-formula-guide summary { min-height: var(--control-height); padding: 0 11px; display: inline-flex; align-items: center; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; white-space: nowrap; }
.unit-formula-guide summary::-webkit-details-marker { display: none; }
.unit-formula-guide > div { width: min(470px,calc(100vw - 40px)); padding: 12px 14px; position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.unit-formula-guide p { margin: 0; font-size: 11px; line-height: 1.55; }
.unit-formula-guide p + p { margin-top: 6px; }

.unit-panel { margin-bottom: 20px; }
.unit-calculation-bar.is-calculating { border-color: color-mix(in srgb,var(--primary) 42%,var(--line)); }
.unit-calculation-bar.is-calculating .button { opacity: .62; pointer-events: none; }
.unit-calculation-bar.is-error { border-color: color-mix(in srgb,var(--red) 55%,var(--line)); }
.unit-table tr.is-unit-recalculated td { animation: unit-value-refresh .68s ease-out; }
@keyframes unit-value-refresh { 0% { background: color-mix(in srgb,var(--primary) 9%,var(--surface)); } 100% { background: transparent; } }
.unit-filter-form { padding: 11px 13px; display: grid; grid-template-columns: minmax(240px,1.45fr) repeat(6,minmax(118px,.7fr)) minmax(190px,1fr) minmax(72px,.35fr) auto; align-items: end; gap: 7px; background: var(--soft); border-bottom: 1px solid var(--line); }
.unit-filter-form > label { min-width: 0; }
.unit-filter-form > label > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 850; line-height: 1.2; text-transform: uppercase; }
.unit-filter-form input,.unit-filter-form select { width: 100%; height: var(--control-height); padding: 0 10px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 12px; }
.unit-filter-form input:focus,.unit-filter-form select:focus { border-color: #8586f4; box-shadow: 0 0 0 3px rgba(91,92,240,.1); }
.unit-filter-form .stocks-filter-actions { min-width: 150px; }
.unit-filter-form .stocks-filter-actions .button { min-height: var(--control-height); }
.unit-wb-page .unit-filter-form { padding: 8px 10px; gap: 6px; }
.unit-wb-page .unit-filter-form input,.unit-wb-page .unit-filter-form select { height: var(--control-height-compact); min-height: var(--control-height-compact); }
.unit-wb-page .unit-filter-form .stocks-filter-actions .button { height: var(--control-height-compact); min-height: var(--control-height-compact); }
.unit-wb-page .unit-result-bar { min-height: 34px; }
.unit-result-bar { min-height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 7px; color: var(--muted); background: color-mix(in srgb,var(--surface) 86%,var(--primary-soft)); border-bottom: 1px solid var(--line); font-size: 10px; }
.unit-result-bar strong { color: var(--ink); font-size: 12px; }
.unit-result-bar small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.unit-site-price-state { min-width: 0; padding: 4px 7px; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.unit-site-price-state i { width: 6px; height: 6px; flex: 0 0 auto; background: var(--muted); border-radius: 50%; }
.unit-site-price-state b { overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.unit-site-price-state.is-running i { background: var(--orange); animation: pulseDot 1.2s ease-in-out infinite; }
.unit-site-price-state.is-complete i { background: var(--green); }
.unit-site-price-state.is-error i { background: var(--red); }
.unit-result-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.unit-result-actions .unit-export-button { min-height: 28px; height: 28px; padding-inline: 10px; font-size: 10px; }
.unit-size-legend { display: inline-flex; align-items: center; gap: 5px; }
.unit-size-badge { min-width: 34px; min-height: 22px; padding: 3px 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 900; line-height: 1; white-space: nowrap; }
.unit-size-mgt { color: #137a57; background: color-mix(in srgb,var(--green) 12%,var(--surface)); border-color: color-mix(in srgb,var(--green) 26%,var(--line)); }
.unit-size-kgt_plus { color: #9a6900; background: color-mix(in srgb,#f0aa19 13%,var(--surface)); border-color: color-mix(in srgb,#f0aa19 28%,var(--line)); }
.unit-size-sgt { color: #c33b55; background: var(--red-soft); border-color: color-mix(in srgb,#e05b72 25%,var(--line)); }
.unit-size-unknown { color: var(--muted); background: var(--soft); border-color: var(--line); }
.unit-size-outside { color: #8b49c4; background: color-mix(in srgb,#9f5fd4 11%,var(--surface)); border-color: color-mix(in srgb,#9f5fd4 25%,var(--line)); }

.unit-table-scroll { width: 100%; max-height: calc(100vh - 250px); position: relative; overflow: auto; overscroll-behavior: contain; scrollbar-color: color-mix(in srgb,var(--primary) 55%,var(--line)) color-mix(in srgb,var(--soft) 80%,transparent); scrollbar-gutter: stable both-edges; }
.unit-table-scroll:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 32%,transparent); outline-offset: -3px; }
.unit-table-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.unit-table-scroll::-webkit-scrollbar-track { background: color-mix(in srgb,var(--soft) 86%,transparent); }
.unit-table-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb,var(--primary) 52%,var(--line)); border: 3px solid color-mix(in srgb,var(--soft) 86%,transparent); border-radius: 999px; }
.unit-table thead { position: sticky; top: 0; z-index: 4; }
.unit-table th { padding: 9px 10px; font-size: 11px; }
.unit-table td { padding: 9px 10px; font-size: 12px; }
.unit-table th:first-child,.unit-table td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line),7px 0 14px rgba(30,38,65,.035); }
.unit-table th:first-child { z-index: 6; background: var(--soft); }
.unit-table tbody tr:hover td:first-child { background: color-mix(in srgb,var(--surface) 94%,var(--primary)); }
.unit-product-column { min-width: 245px; }
.unit-product { min-width: 245px; max-width: 330px; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px; color: inherit; }
.unit-product img,.unit-photo-empty { width: 38px; height: 46px; display: grid; place-items: center; object-fit: cover; color: #fff; background: linear-gradient(145deg,#a837dc,#ec2f7d); border: 1px solid var(--line); border-radius: 8px; font-size: 8px; font-weight: 900; }
.unit-product > span:last-child { min-width: 0; }
.unit-product strong { display: block; overflow: hidden; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.unit-product small { margin-top: 5px; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 7px; font-weight: 800; }
.unit-product em { margin-top: 3px; display: block; overflow: hidden; color: var(--muted); font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.unit-product:hover strong { color: var(--primary); }
.unit-table td > strong,.unit-table td > small { display: block; }
.unit-table td > small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.unit-product-meta,.unit-dimensions,.unit-commission,.unit-stock,.unit-economy { display: grid; gap: 4px; }
.unit-product-meta { min-width: 190px; }
.unit-product-meta strong { font-size: 9px; }
.unit-product-meta span { font-size: 8px; font-weight: 750; }
.unit-product-meta small { color: var(--muted); font-size: 7px; }
.unit-dimensions { min-width: 205px; grid-template-columns: auto 1fr; align-items: center; }
.unit-dimensions small { grid-column: 1 / -1; }
.unit-dimensions b,.unit-commission b,.unit-stock b,.unit-economy b { font-size: 8px; font-weight: 800; }
.unit-dimensions small,.unit-commission small,.unit-stock small,.unit-economy small { color: var(--muted); font-size: 7px; }
.unit-commission { min-width: 86px; }
.unit-sale-price { color: var(--green); }
.unit-economy { min-width: 145px; }
.unit-economy i { font-style: normal; }
.unit-metrics { min-width: 175px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; gap: 10px; }
.unit-metrics .unit-commission { padding-right: 9px; border-right: 1px solid var(--line); }
.unit-scheme-form { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(96px,1fr)); align-items: end; gap: 8px; }
.unit-scheme-form label > span { margin-bottom: 4px; display: block; color: var(--muted); font-size: 6px; font-weight: 850; text-transform: uppercase; }
.unit-scheme-form select,.unit-scheme-form input { width: 100%; height: 30px; padding: 0 22px 0 7px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line); border-radius: 7px; outline: none; font-size: 8px; }
.unit-scheme-form input { padding-right: 7px; }
.unit-scheme-form select:focus,.unit-scheme-form input:focus { border-color: #8586f4; box-shadow: 0 0 0 2px rgba(91,92,240,.1); }
.unit-scheme-form.is-saving { opacity: 1; pointer-events: auto; }
.unit-logistics { min-width: 185px; display: grid; gap: 4px; }
.unit-logistics b { color: var(--primary); font-size: 9px; }
.unit-logistics small { color: var(--muted); font-size: 7px; }
.unit-logistics > span { font-size: 8px; font-weight: 750; }
.unit-pricing,.unit-taxes { min-width: 175px; display: grid; gap: 4px; }
.unit-expenses { min-width: 220px; display: grid; gap: 4px; }
.unit-pricing b,.unit-expenses b,.unit-taxes b { color: var(--ink); font-size: 9px; }
.unit-pricing > small,.unit-expenses > small,.unit-taxes > small { color: var(--muted); font-size: 7px; }
.unit-pricing > span,.unit-expenses > span,.unit-taxes > span { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 8px; font-weight: 750; white-space: nowrap; }
.unit-pricing em,.unit-expenses em,.unit-taxes em { padding: 3px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 7px; font-style: normal; font-weight: 850; }
.unit-expenses > b { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.unit-pricing b { color: var(--green); }
.unit-taxes a { color: var(--primary); font-size: 7px; font-weight: 800; }
.unit-results { min-width: 285px; display: grid; gap: 7px; }
.unit-result-metrics { display: grid; gap: 5px; }
.unit-result-metrics > b { color: var(--primary); font-size: 9px; }
.unit-result-metrics > span { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.unit-result-metrics > span strong { color: var(--green); font-size: 8px; }
.unit-result-metrics > span strong.is-negative { color: var(--red); }
.unit-result-metrics > span em { min-width: 52px; padding: 3px 5px; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-size: 7px; font-style: normal; font-weight: 850; text-align: center; }
.unit-result-metrics > small { max-width: 270px; color: var(--red); font-size: 7px; line-height: 1.35; }
.unit-discount { display: inline-flex; padding: 5px 7px; color: #b94a61; background: var(--red-soft); border-radius: 7px; font-weight: 850; }
.unit-stock { min-width: 72px; }
.unit-stock .has-stock { color: var(--green); }

/* Читаемая UNIT-витрина: широкие колонки и явная горизонтальная прокрутка. */
.unit-table { min-width: 3270px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.unit-table th,.unit-table td { padding: 8px 10px; vertical-align: middle; }
.unit-table th { height: 42px; border-top: 3px solid transparent; font-size: 11px; line-height: 1.25; white-space: normal; }
.unit-table td { font-size: 12px; line-height: 1.35; }
.unit-table th:nth-child(1) { width: 290px; }
.unit-table th:nth-child(2),.unit-table th.unit-price-column { width: 225px; }
.unit-table th:nth-child(3) { width: 230px; }
.unit-table th:nth-child(4) { width: 600px; }
.unit-table th:nth-child(5) { width: 145px; }
.unit-table th:nth-child(6) { width: 155px; }
.unit-table th:nth-child(7) { width: 155px; }
.unit-table th:nth-child(8) { width: 150px; }
.unit-table th:nth-child(9) { width: 155px; }
.unit-table th:nth-child(10) { width: 190px; }
.unit-table th:nth-child(11) { width: 165px; }
.unit-table th:nth-child(12) { width: 135px; }
.unit-table th:nth-child(13) { width: 195px; }
.unit-table th:nth-child(14) { width: 155px; }
.unit-table th:nth-child(15) { width: 155px; }
.unit-table th:nth-child(16) { width: 155px; }
.unit-table .unit-header-main { border-top-color: var(--primary); background: color-mix(in srgb,var(--primary) 5%,var(--soft)); }
.unit-table .unit-header-result { border-top-color: var(--green); background: color-mix(in srgb,var(--green) 6%,var(--soft)); }
.unit-table .unit-header-expense { border-top-color: var(--orange); background: color-mix(in srgb,var(--orange) 6%,var(--soft)); }
.unit-table th:nth-child(5),.unit-table td:nth-child(5),.unit-table th:nth-child(10),.unit-table td:nth-child(10) { border-left: 3px solid var(--line-strong); }
.unit-table tbody tr { height: auto; }
.unit-table tbody td { background: var(--surface); }
.unit-table tbody tr + tr td { border-top: 2px solid var(--line-strong); }
.unit-table tbody tr:nth-child(even) td { background: color-mix(in srgb,var(--surface) 97%,var(--soft)); }
.unit-table tbody tr:hover td { background: color-mix(in srgb,var(--surface) 94%,var(--primary)); }
.unit-product-column,.unit-product-cell { min-width: 0; }
.unit-product-cell { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; overflow: hidden; }
.unit-product { width: 100%; min-width: 0; max-width: 100%; grid-template-columns: 42px minmax(0,1fr); gap: 9px; }
.unit-product img,.unit-photo-empty { width: 42px; height: 50px; border-radius: 8px; }
.unit-product > span:last-child { overflow: hidden; }
.unit-product strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.35; }
.unit-product small { margin-top: 4px; font-size: 10px; }
.unit-product em { margin-top: 3px; font-size: 10px; }
.unit-product-compact-meta { width: 100%; max-width: 100%; padding-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; overflow: hidden; border-top: 1px dashed var(--line); }
.unit-product-compact-meta > span:not(.unit-size-badge) { max-width: 120px; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.unit-product-compact-meta > span + span:not(.unit-size-badge)::before { content: "·"; margin-right: 5px; color: var(--line-strong); }
.unit-product-compact-meta small { width: 100%; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.unit-article-line {
    width: 100%;
    max-width: 100%;
    min-height: 28px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    background: color-mix(in srgb,var(--soft) 72%,var(--surface));
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 10px;
}
.unit-identifiers { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.unit-article-line > span { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-article-line b { color: var(--ink); font-size: 11px; }
.unit-article-line button {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb,var(--primary) 18%,var(--line));
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    white-space: nowrap;
}
.unit-article-line button i { flex: 0 0 auto; font-style: normal; }
.unit-article-line button.is-copied { color: var(--green); background: var(--green-soft); }
.unit-table .unit-size-badge { min-width: 34px; min-height: 21px; font-size: 10px; }
.unit-scheme-form { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(96px,1fr)); align-items: end; gap: 8px; }
.unit-scheme-form label { min-width: 0; display: grid; grid-template-rows: 22px var(--control-height-compact); align-items: end; }
.unit-scheme-form label:nth-of-type(1),.unit-scheme-form label:nth-of-type(2) { grid-column: auto; grid-row: auto; }
.unit-scheme-form label > span { margin-bottom: 0; align-self: start; font-size: 10px; letter-spacing: .02em; }
.unit-wb-page .unit-scheme-form select,.unit-wb-page .unit-scheme-form input { height: var(--control-height-compact); min-height: var(--control-height-compact); padding: 0 30px 0 9px; font-size: 12px; line-height: var(--control-height-compact); transition: border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.unit-scheme-form input { padding-right: 9px; }
.unit-scheme-form.is-saving select { border-color: color-mix(in srgb,var(--primary) 70%,var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent); }
.unit-scheme-form.is-saved select { border-color: color-mix(in srgb,var(--green) 72%,var(--line)); background: color-mix(in srgb,var(--green) 5%,var(--surface)); }
.unit-scheme-form.is-error select { border-color: color-mix(in srgb,var(--red) 75%,var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb,var(--red) 10%,transparent); }
.unit-plan-values { min-width: 0; display: grid; grid-template-columns: 210px minmax(0,1fr); align-items: start; gap: 9px; }
.unit-plan-rates,.unit-plan-calculator { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 8px; }
.unit-plan-values label { min-width: 0; display: grid; grid-template-rows: 22px var(--control-height-compact); align-items: end; }
.unit-plan-values .unit-spp-field { grid-template-rows: 22px var(--control-height-compact) auto auto; gap: 3px; }
.unit-spp-field > small,.unit-spp-field > em { min-width: 0; overflow: hidden; font-size: 9px; font-style: normal; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.unit-spp-field > small { color: var(--ink); }
.unit-spp-field > em { color: var(--green); }
.unit-plan-values label > span { min-height: 0; margin: 0; display: flex; align-items: start; color: var(--muted); font-size: 10px; font-weight: 850; line-height: 1.2; text-transform: uppercase; }
.unit-plan-values input { width: 100%; height: var(--control-height-compact); min-width: 0; padding: 0 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; outline: none; font-size: 12px; line-height: var(--control-height-compact); text-align: right; }
.unit-plan-values input:focus { border-color: #8586f4; box-shadow: 0 0 0 2px rgba(91,92,240,.1); }
.unit-plan-calculator section { min-width: 0; }
.unit-plan-calculator section > small { margin-top: 5px; display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.unit-plan-calculator section > small span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; white-space: nowrap; }
.unit-plan-calculator section > small b { overflow: hidden; color: var(--green); font-size: 11px; text-overflow: ellipsis; }
.unit-plan-note { min-height: 12px; grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.unit-plan-note.is-error { color: var(--red); }
.unit-cell-stack,.unit-metric-cell,.unit-scheme-form,.unit-plan-values { min-width: 0; align-self: center; }
.unit-table tbody td:nth-child(3),.unit-table tbody td:nth-child(4) { padding-top: 12px; vertical-align: top; }
.unit-cell-stack,.unit-metric-cell { display: grid; align-content: center; gap: 6px; }
.unit-cell-stack > span { display: flex; align-items: center; justify-content: space-between; gap: 7px; white-space: nowrap; }
.unit-pricing.unit-cell-stack > span { justify-content: space-between; font-size: 10px; }
.unit-cell-stack > span small,.unit-cell-stack > small,.unit-metric-cell small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.unit-cell-stack b,.unit-cell-stack strong,.unit-metric-cell strong { color: var(--ink); font-size: 12px; font-weight: 850; line-height: 1.3; white-space: nowrap; }
.unit-cell-stack em,.unit-metric-cell em { width: fit-content; margin-left: auto; padding: 4px 6px; color: var(--primary); background: var(--primary-soft); border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 850; white-space: nowrap; }
.unit-pricing,.unit-taxes,.unit-expenses,.unit-logistics,.unit-results { min-width: 0; }
.unit-pricing .unit-value-primary,.unit-results .unit-value-primary { color: var(--primary); font-size: 13px; }
.unit-pricing .unit-site-price { padding-top: 4px; border-top: 1px solid var(--line); }
.unit-pricing .unit-site-price small { display: inline-flex; align-items: center; gap: 4px; }
.unit-pricing .unit-site-price small i { padding: 2px 4px; color: var(--green); background: color-mix(in srgb,var(--green) 12%,var(--surface)); border-radius: 4px; font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.unit-pricing .unit-site-price-time { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.unit-table td.unit-price-column { overflow: hidden; }
.unit-pricing { width: 100%; max-width: 100%; overflow: hidden; }
.unit-pricing > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.unit-pricing.unit-cell-stack > span {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
}
.unit-pricing.unit-cell-stack > span > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.unit-pricing.unit-cell-stack > span > b,.unit-pricing.unit-cell-stack > span > strong { justify-self: end; }
.unit-pricing.unit-cell-stack > em {
    width: 100%;
    margin-left: 0;
    overflow-wrap: anywhere;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
}
.unit-pricing .unit-site-price-time { width: 100%; text-align: center; white-space: normal; }
.unit-metric-cell strong.is-positive { color: var(--green); }
.unit-metric-cell strong.is-negative { color: var(--red); }
.unit-taxes { display: grid; gap: 5px; }
.unit-taxes span { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--muted); font-size: 10px; }
.unit-taxes b { color: var(--ink); font-size: 11px; }
.unit-logistics > span { color: var(--muted); font-size: 10px; }
.unit-logistics > span b { color: var(--ink); }
.unit-results { position: relative; }

html[data-theme="dark"] .unit-table th:first-child { background: #111a27; }
html[data-theme="dark"] .unit-table td:first-child { background: var(--surface); box-shadow: 1px 0 0 var(--line),7px 0 14px rgba(0,0,0,.18); }
html[data-theme="dark"] .unit-table tbody tr:hover td:first-child { background: #141e2c; }
html[data-theme="dark"] .unit-discount { color: #ff9caf; }
html[data-theme="dark"] .unit-size-mgt { color: #72e5b8; }
html[data-theme="dark"] .unit-size-kgt_plus { color: #ffd06e; }
html[data-theme="dark"] .unit-size-sgt { color: #ff9caf; }
html[data-theme="dark"] .unit-size-outside { color: #d9a8ff; }

@media (max-width: 1450px) {
    .unit-calculation-bar { grid-template-columns: minmax(200px,1fr) minmax(220px,1fr) minmax(120px,.55fr) auto auto; }
    .unit-economics-bar { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .unit-economics-intro { grid-column: 1 / -1; }
    .unit-autosave-actions { justify-self: end; }
    .unit-filter-form { grid-template-columns: repeat(5,minmax(0,1fr)); }
    .unit-search,.unit-sort { grid-column: span 2; }
    .unit-filter-form .stocks-filter-actions { grid-column: auto; justify-content: flex-end; }
}
@media (max-width: 850px) {
    .unit-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .unit-filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .unit-search,.unit-sort { grid-column: 1 / -1; }
    .unit-filter-form .stocks-filter-actions { grid-column: 1 / -1; }
    .unit-filter-form .stocks-filter-actions .button { flex: 1; }
    .unit-table-scroll { max-height: none; }
    .unit-calculation-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .unit-calculation-intro { grid-column: 1 / -1; }
    .unit-economics-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .unit-economics-intro { grid-column: 1 / -1; }
    .unit-formula-guide > div { right: auto; left: 0; }
}
@media (max-width: 560px) {
    .unit-summary,.unit-filter-form { grid-template-columns: 1fr; }
    .unit-search,.unit-sort,.unit-filter-form .stocks-filter-actions { grid-column: auto; }
    .unit-result-bar { flex-wrap: wrap; padding-block: 9px; }
    .unit-result-actions { width: 100%; margin-left: 0; justify-content: space-between; }
    .unit-calculation-bar { grid-template-columns: 1fr; }
    .unit-calculation-intro { grid-column: auto; }
    .unit-calculation-bar > .button,.unit-formula-guide summary { width: 100%; justify-content: center; }
    .unit-calculation-bar > .button,.unit-formula-guide { margin-top: 0; }
    .unit-economics-bar { grid-template-columns: 1fr; }
    .unit-economics-intro { grid-column: auto; }
    .unit-autosave-actions,.unit-autosave-actions > .button { width: 100%; }
}

/* Final readability pass for dense matrices, badges and team access cards. */
.fbs-order-tabs b,
.marketplace-pill,
.dynamics-mode > span,
.price-matrix-table td > small,
.price-matrix-cell strong,
.matrix-commission span,
.matrix-commission b,
.commission-other,
.commission-other b {
    font-size: 10px;
}

.company-users-page .access-stats small,
.company-users-page .access-stats em,
.company-users-page .access-limit,
.company-users-page .access-fieldset > legend span,
.company-users-page .access-fieldset > legend small,
.company-users-page .access-form-actions p,
.company-users-page .access-form-actions p > span,
.company-users-page .access-list-head p,
.company-users-page .access-list-head > span,
.company-users-page .access-user-identity small,
.company-users-page .access-user-permissions i,
.company-users-page .access-user-status,
.company-users-page .access-edit-meta,
.company-users-page .access-active-toggle b,
.company-users-page .access-empty p {
    font-size: 10px;
}

.company-users-page .access-permission-card strong { font-size: 11px; }
.company-users-page .access-permission-card small { font-size: 10px; }
.company-users-page .access-form .field { min-width: 0; align-content: start; gap: 6px; }
.company-users-page .access-form .field > span:first-child { min-height: 16px; display: flex; align-items: flex-end; color: var(--muted); font-size: 11px; line-height: 1.3; }
.company-users-page .access-form :is(.input-wrap,.select-wrap) { width: 100%; display: block; }
.company-users-page .access-form :is(input:not([type="checkbox"]):not([type="radio"]),select) { width: 100%; height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; font-size: 12px; line-height: 1.25; }
.company-users-page :is(.access-heading-actions,.access-form-actions,.access-edit-actions,.access-user-secondary-actions,.access-user-planfact) .button { min-height: 40px; height: 40px; }
.company-users-page .access-user-secondary-actions :is(form,.button) { flex: 0 0 auto; }
.company-users-page .access-user-secondary-actions .button { padding-inline: 12px; }
.company-users-page .access-data-scope { align-items: start; }
.company-users-page .access-data-scope > p { min-height: 34px; }

/* Team performance dashboard. */
.team-statistics-panel { margin: 0 0 16px; overflow: visible; }
.team-statistics-head { min-height: 76px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.team-statistics-head h2 { margin: 2px 0 4px; font-size: 17px; letter-spacing: -.025em; }
.team-statistics-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.team-statistics-eyebrow { color: var(--primary); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.team-statistics-metric-picker { width: min(100%,230px); flex: 0 0 230px; display: grid; gap: 5px; }
.team-statistics-metric-picker > span:first-child { color: var(--muted); font-size: 10px; font-weight: 800; }
.team-statistics-metric-picker .select-wrap,.team-statistics-metric-picker select { width: 100%; }
.team-statistics-metric-picker select { height: 40px; min-height: 40px; padding-top: 0; padding-bottom: 0; font-size: 12px; }
.team-statistics-content { padding: 14px; }
.team-statistics-summary { margin-bottom: 12px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.team-statistics-summary article { min-width: 0; min-height: 72px; padding: 11px 13px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 3px 10px; background: color-mix(in srgb,var(--soft) 70%,var(--surface)); border: 1px solid var(--line); border-radius: 10px; }
.team-statistics-summary small { color: var(--muted); font-size: 10px; font-weight: 750; }
.team-statistics-summary strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink); font-size: 20px; line-height: 1; white-space: nowrap; }
.team-statistics-summary span { color: var(--muted); font-size: 9px; }
.team-statistics-grid { display: grid; grid-template-columns: minmax(330px,.9fr) minmax(500px,1.1fr); align-items: stretch; gap: 10px; }
.team-statistics-chart-card { min-width: 0; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.team-plan-forecast { margin-top: 14px; overflow: visible; }
.team-plan-forecast .panel-head { min-width: 0; align-items: flex-end; flex-wrap: wrap; }
.team-plan-forecast .panel-head > div { min-width: 0; }
.team-plan-forecast .panel-head h2,.team-plan-forecast .panel-head p { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-forecast-picker { width: min(460px,100%); }
.team-plan-forecast-picker > span:first-child { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.team-plan-forecast-picker select { width: 100%; }
.team-plan-forecast-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 8px; padding: 0 14px 12px; }
.team-plan-forecast-summary article { min-width: 0; padding: 10px 11px; display: grid; align-content: center; gap: 5px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.team-plan-forecast-summary small,.team-plan-forecast-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-plan-forecast-summary small { color: var(--muted); font-size: 9px; font-weight: 750; }
.team-plan-forecast-summary strong { min-width: 0; color: var(--ink); font-size: 14px; }
.team-plan-forecast-chart { height: 280px; margin: 0 14px; position: relative; overflow: visible; }
.team-plan-forecast-chart canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.team-plan-forecast > .orders-chart-legend { padding: 8px 14px 13px; }
@media (max-width: 720px) {
    .team-plan-forecast .panel-head { align-items: stretch; flex-direction: column; }
    .team-plan-forecast .panel-head h2,.team-plan-forecast .panel-head p { white-space: normal; }
    .team-plan-forecast-picker { width: 100%; }
    .team-plan-forecast-summary { grid-template-columns: repeat(2,minmax(0,1fr)); padding-inline: 9px; }
    .team-plan-forecast-chart { height: 245px; margin-inline: 8px; }
    .team-plan-progress-values { grid-template-columns: 1fr; }
}
.team-statistics-chart-card > header { min-height: 34px; margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.team-statistics-chart-card > header strong,.team-statistics-chart-card > header small { display: block; }
.team-statistics-chart-card > header strong { color: var(--ink); font-size: 12px; }
.team-statistics-chart-card > header small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.team-statistics-scale { padding: 4px 6px; color: var(--muted); background: var(--soft); border-radius: 6px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.team-statistics-bars { min-height: 202px; max-height: 252px; padding-right: 3px; display: grid; align-content: start; gap: 9px; overflow-y: auto; scrollbar-width: thin; }
.team-statistics-bar { min-width: 0; display: grid; grid-template-columns: minmax(100px,145px) minmax(90px,1fr) 48px; align-items: center; gap: 9px; }
.team-statistics-bar-person { min-width: 0; }
.team-statistics-bar-person strong,.team-statistics-bar-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-statistics-bar-person strong { color: var(--ink); font-size: 10px; }
.team-statistics-bar-person small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.team-statistics-bar-track { position: relative; height: 9px; overflow: hidden; background: color-mix(in srgb,var(--line) 72%,var(--soft)); border-radius: 999px; }
.team-statistics-bar-track::after { position: absolute; top: 0; bottom: 0; left: min(100%,calc(100% / var(--team-bar-scale,1))); width: 1px; content: ""; background: color-mix(in srgb,var(--muted) 44%,transparent); }
.team-statistics-bar-track > i { width: var(--team-bar-width,0%); max-width: 100%; height: 100%; display: block; background: linear-gradient(90deg,var(--primary),#8a62f3); border-radius: inherit; transition: width .35s ease; }
.team-statistics-bar.is-complete .team-statistics-bar-track > i { background: linear-gradient(90deg,#2fba86,var(--green)); }
.team-statistics-bar.is-behind .team-statistics-bar-track > i { background: linear-gradient(90deg,#e99542,var(--orange)); }
.team-statistics-bar > b { color: var(--ink); font-size: 10px; text-align: right; white-space: nowrap; }
.team-statistics-donut-layout { min-width: 0; display: grid; grid-template-columns: minmax(190px,.82fr) minmax(190px,1.18fr); align-items: center; gap: 14px; }
.team-statistics-donut-wrap { position: relative; min-width: 0; height: 220px; }
.team-statistics-donut-wrap canvas { width: 100%; height: 100%; display: block; }
.team-statistics-donut-legend { min-width: 0; max-height: 220px; padding-right: 3px; display: grid; align-content: center; gap: 7px; overflow-y: auto; scrollbar-width: thin; }
.team-statistics-donut-person { min-width: 0; min-height: 36px; padding: 6px 8px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 8px; background: color-mix(in srgb,var(--soft) 72%,var(--surface)); border: 1px solid color-mix(in srgb,var(--line) 78%,transparent); border-radius: 8px; }
.team-statistics-donut-person > i { width: 9px; height: 9px; background: var(--employee-chart-color,var(--primary)); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb,var(--employee-chart-color,var(--primary)) 14%,transparent); }
.team-statistics-donut-person > span { min-width: 0; }
.team-statistics-donut-person strong,.team-statistics-donut-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-statistics-donut-person strong { color: var(--ink); font-size: 10px; }
.team-statistics-donut-person small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.team-statistics-donut-person > b { color: var(--ink); font-size: 11px; white-space: nowrap; }
.team-statistics-donut-empty { min-height: 92px; padding: 16px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border-radius: 9px; font-size: 10px; line-height: 1.45; text-align: center; }
.team-statistics-tooltip { position: absolute; z-index: 3; max-width: 190px; padding: 7px 9px; pointer-events: none; color: var(--ink); background: color-mix(in srgb,var(--surface) 96%,transparent); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-md); font-size: 9px; line-height: 1.45; transform: translate(-50%,calc(-100% - 10px)); white-space: nowrap; }
.team-statistics-tooltip[data-placement="below"] { transform: translate(-50%,10px); }
.team-statistics-tooltip strong,.team-statistics-tooltip small { display: block; }
.team-statistics-tooltip small { margin-top: 2px; color: var(--muted); }
.team-statistics-state { min-height: 108px; padding: 20px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: left; }
.team-statistics-state[hidden] { display: none; }
.team-statistics-state-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 10px; font-size: 15px; font-weight: 900; }
.team-statistics-state strong,.team-statistics-state small { display: block; }
.team-statistics-state strong { color: var(--ink); font-size: 12px; }
.team-statistics-state small { margin-top: 4px; font-size: 10px; line-height: 1.4; }
.team-statistics-state .button { min-height: 40px; height: 40px; margin-left: 8px; }
.team-statistics-state.is-error .team-statistics-state-icon { color: var(--red); background: var(--red-soft); }

@media (max-width: 1120px) {
    .team-statistics-grid { grid-template-columns: 1fr; }
    .team-statistics-bars { min-height: 0; max-height: 285px; }
    .team-statistics-donut-layout { grid-template-columns: minmax(220px,.72fr) minmax(260px,1.28fr); }
}
@media (max-width: 720px) {
    .team-statistics-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .team-statistics-metric-picker { width: 100%; flex-basis: auto; }
    .team-statistics-summary { grid-template-columns: 1fr; }
    .team-statistics-summary article { min-height: 62px; }
    .team-statistics-bar { grid-template-columns: minmax(88px,120px) minmax(70px,1fr) 43px; gap: 7px; }
    .team-statistics-chart-card { padding: 11px; }
    .team-statistics-chart-card > header { align-items: flex-start; flex-direction: column; }
    .team-statistics-donut-layout { grid-template-columns: 1fr; gap: 8px; }
    .team-statistics-donut-wrap { height: 210px; }
    .team-statistics-donut-legend { max-height: 210px; align-content: start; }
    .team-statistics-state { align-items: flex-start; flex-direction: column; }
    .team-statistics-state .button { width: 100%; margin-left: 0; }
}
.dynamics-mode .segmented span,
.dynamics-filter-form .warehouse-picker > div label > span,
.dynamics-filter-form .product-picker > div label > span,
.dynamics-filter-form .product-picker > div label > span > small {
    font-size: 10px;
}

/* Admin portal: readable dense badges, module summaries and billing details. */
.pricing-state,
.pricing-form-footer > span,
.company-discount-form b,
.company-stores-toggle b,
.company-service-link > b,
.admin-module-company > footer > span,
.admin-module-company-summary > span:not(.status),
.admin-module-company-summary > span:not(.status) strong,
.history-store,
.back-link,
.journal-count {
    font-size: 10px;
}

.admin-company-settings-page .integration-summary > article > span,
.admin-company-settings-page .integration-summary > article > small {
    font-size: 10px;
}

.company-payments-page .payment-report-stats span,
.company-payments-page .payment-report-stats small,
.company-payments-page .trial-state,
.company-payments-page .refund-waiting,
.company-payments-page .current-charge-total span,
.company-payments-page .current-charge-total small,
.company-payments-page .charge-units small,
.company-payments-page .charge-units em,
.company-payments-page .payment-ledger-head > div > span,
.company-payments-page .payment-ledger-head > div > small,
.company-payments-page .ledger-breakdown span,
.company-payments-page .input-with-suffix b,
.company-payments-page .payment-confirmation-line,
.company-payments-page .payment-confirmation-line small,
.company-payments-page .purchase-total span,
.company-payments-page .payment-purchases-table strong,
.company-payments-page .refund-calculation span,
.company-payments-page .refund-calculation small,
.company-payments-page .refund-processed,
.company-payments-page .refund-empty p,
.company-payments-page .period-payment-preview span,
.company-payments-page .period-payment-preview small {
    font-size: 10px;
}

.company-payments-page .period-payment-form label,
.company-payments-page .period-payment-form label > span,
.company-payments-page .period-payment-form input,
.company-payments-page .period-payment-form select,
.company-payments-page .period-payment-form textarea {
    font-size: 11px;
}

.admin-portal-label { font-size: 10px; }

/* RNP keeps its dense filter row below the shared 40px form-control baseline. */
body.finance-rnp-page .rnp-filter-panel .rnp-filters :is(input,select,.button) {
    height: var(--control-height-compact);
    min-height: var(--control-height-compact);
}

/* Unified filter rhythm for marketplace data sections. */
.marketplace-filter-field { min-width: 0; }
.marketplace-filter-field > span { display: block; }
:is(.stocks-filter-form,.orders-filter-form,.advertising-filter-form,.dynamics-filter-form,.unit-filter-form) > label {
    min-width: 0;
    align-self: end;
}
:is(.stocks-filter-form,.orders-filter-form,.advertising-filter-form,.dynamics-filter-form,.unit-filter-form) :is(input:not([type="checkbox"]):not([type="radio"]),select,.button) {
    min-height: var(--control-height);
    line-height: normal;
    vertical-align: middle;
}
.data-table :is(th,td) { vertical-align: middle; }
.data-table :is(th,td) > :is(span,strong,small,a,button) { max-width: 100%; }
.dashboard-marketplace-filters {
    display: grid;
    grid-template-columns: repeat(3,minmax(140px,1fr)) auto;
    align-items: end;
    gap: 8px;
}
.dashboard-marketplace-filters label { min-width: 0; }
.dashboard-marketplace-filters label > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 850;
    text-transform: uppercase;
}
.dashboard-marketplace-filters select {
    width: 100%;
    height: var(--control-height);
    padding: 0 9px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.dashboard-order-analytics { margin: 16px 0; }
.dashboard-finance-analytics { margin: 24px 0 16px; }
.dashboard-finance-heading-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}
.dashboard-finance-actuality {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: var(--ui-font-indicator-caption,11px);
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-finance-kpis { grid-template-columns: repeat(6,minmax(150px,1fr)); }
.dashboard-finance-chart { margin-bottom: 16px; }
.dashboard-finance-chart .orders-chart-wrap { height: 320px; }

.finance-month-forecast,.analytics-share-panel { margin: 16px 0; }
.finance-forecast-heading { margin-bottom: 10px; }
.finance-forecast-heading > div { min-width: 0; }
.finance-forecast-heading h2 { overflow-wrap: anywhere; }
.finance-forecast-badge { min-height: 34px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; white-space: nowrap; }
.finance-forecast-badge i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent); }
.finance-forecast-kpis { margin-bottom: 10px; display: grid; grid-template-columns: repeat(6,minmax(120px,1fr)); gap: 8px; }
.finance-forecast-kpis article { min-width: 0; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.finance-forecast-kpis :is(span,strong,small) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-forecast-kpis span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; text-transform: uppercase; }
.finance-forecast-kpis strong { margin-top: 5px; color: var(--ink); font-size: var(--ui-font-indicator-value,16px); }
.finance-forecast-kpis small { margin-top: 4px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.finance-forecast-chart { overflow: visible; }
.finance-forecast-chart-head { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.finance-forecast-chart-head > div:first-child { min-width: 0; }
.finance-forecast-chart-head > div:first-child :is(span,strong,small) { display: block; overflow-wrap: anywhere; }
.finance-forecast-chart-head > div:first-child span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.finance-forecast-chart-head > div:first-child strong { margin-top: 3px; font-size: var(--ui-font-indicator-title,17px); }
.finance-forecast-chart-head > div:first-child small { margin-top: 3px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); line-height: 1.4; }
.finance-forecast-chart-wrap { height: 290px; position: relative; padding: 10px 12px 2px; overflow: visible; }
.finance-forecast-chart-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.orders-chart-legend .is-forecast { background: repeating-linear-gradient(90deg,#7c5cff 0 5px,transparent 5px 8px); }

.analytics-share-panel { overflow: hidden; }
.analytics-share-panel > .orders-panel-head { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.analytics-share-grid { padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.analytics-share-card { min-width: 0; overflow: hidden; background: color-mix(in srgb,var(--soft) 55%,var(--surface)); border: 1px solid var(--line); border-radius: 11px; }
.analytics-share-card > header { min-height: 45px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.analytics-share-card > header > div { min-width: 0; }
.analytics-share-card > header :is(span,strong) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-share-card > header span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; text-transform: uppercase; }
.analytics-share-card > header strong { margin-top: 2px; color: var(--ink); font-size: var(--ui-font-indicator-text,12px); }
.analytics-share-card > header > b { min-width: 27px; padding: 4px 7px; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: var(--ui-font-indicator-caption,11px); text-align: center; }
.analytics-share-body { min-height: 195px; padding: 10px; display: grid; grid-template-columns: minmax(145px,.72fr) minmax(165px,1.28fr); align-items: center; gap: 10px; }
.analytics-share-canvas-wrap { min-width: 0; height: 175px; position: relative; }
.analytics-share-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.analytics-share-canvas-wrap > span { width: clamp(76px,5vw,86px); height: clamp(76px,5vw,86px); position: absolute; left: 50%; top: 50%; display: grid; place-content: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; text-align: center; transform: translate(-50%,-50%); pointer-events: none; }
.analytics-share-canvas-wrap > span :is(strong,small) { display: block; }
.analytics-share-canvas-wrap > span strong { font-size: var(--ui-font-indicator-value,16px); }
.analytics-share-canvas-wrap > span small { margin-top: 2px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.analytics-share-legend { min-width: 0; max-height: 178px; display: grid; align-content: center; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.analytics-share-legend > div { min-width: 0; min-height: clamp(40px,2.4vw,46px); padding: 6px 8px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; background: var(--surface); border: 1px solid color-mix(in srgb,var(--line) 82%,transparent); border-radius: 8px; }
.analytics-share-legend > div > i { width: 8px; height: 8px; background: var(--share-color,var(--primary)); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb,var(--share-color,var(--primary)) 13%,transparent); }
.analytics-share-legend > div > span { min-width: 0; }
.analytics-share-legend > div :is(strong,small) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-share-legend > div strong { color: var(--ink); font-size: var(--ui-font-indicator-text,12px); }
.analytics-share-legend > div small { margin-top: 2px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.analytics-share-legend > div > b { color: var(--ink); font-size: var(--ui-font-indicator-text,12px); white-space: nowrap; }

@media (max-width: 1180px) {
    .finance-forecast-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .analytics-share-body { grid-template-columns: minmax(125px,.65fr) minmax(145px,1.35fr); }
}
@media (max-width: 820px) {
    .analytics-share-grid { grid-template-columns: 1fr; }
    .finance-forecast-chart-head { align-items: stretch; flex-direction: column; }
    .finance-forecast-chart-head .orders-chart-metrics { width: 100%; }
}
@media (max-width: 560px) {
    .finance-forecast-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .finance-forecast-kpis :is(span,strong,small) { white-space: normal; overflow-wrap: anywhere; }
    .finance-forecast-badge { white-space: normal; }
    .analytics-share-body { grid-template-columns: 128px minmax(0,1fr); }
    .analytics-share-canvas-wrap { height: 155px; }
    .analytics-share-canvas-wrap > span { width: 72px; height: 72px; }
    .analytics-share-legend > div :is(strong,small) { white-space: normal; }
}
.section-heading-inline {
    margin: 0 0 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.section-heading-inline > div { min-width: 0; }
.section-heading-inline h2 { margin: 0; font-size: clamp(20px,2vw,27px); }
.section-heading-inline p { margin: 4px 0 0; color: var(--muted); font-size: var(--ui-font-control,13px); line-height: 1.45; }
.dashboard-orders-empty { margin: 16px 0; }

/* Marketplace identity for every script selector, schedule and live run. */
.script-marketplace-badge {
    max-width: 112px;
    min-height: 18px;
    padding: 2px 7px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.marketplace-badge-wildberries {
    color: #fff;
    background: linear-gradient(135deg,#cb11ab,#e62d79);
    border-color: #c20fa3;
    box-shadow: 0 4px 10px rgba(203,17,171,.16);
}
.marketplace-badge-ozon {
    color: #fff;
    background: #005bff;
    border-color: #0052e6;
    box-shadow: 0 4px 10px rgba(0,91,255,.18);
}
.marketplace-badge-yandex {
    color: #171717;
    background: #ffcc00;
    border-color: #e5b800;
    box-shadow: 0 4px 10px rgba(255,204,0,.18);
}

/* Combined marketplace order feed. */
.orders-table-unified { min-width: 1280px; table-layout: fixed; }
.orders-table-unified th:nth-child(1) { width: 185px; }
.orders-table-unified th:nth-child(2) { width: 145px; }
.orders-table-unified th:nth-child(3) { width: 180px; }
.orders-table-unified th:nth-child(4) { width: 160px; }
.orders-table-unified th:nth-child(5) { width: 135px; }
.orders-table-unified th:nth-child(6) { width: 205px; }
.orders-table-unified th:nth-child(7) { width: 120px; }
.orders-table-unified th:nth-child(8) { width: 100px; }
.orders-table-unified td { overflow: hidden; }
.orders-table-unified td > :is(strong,small,span) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.orders-table-unified .script-marketplace-badge {
    width: fit-content;
    margin-bottom: 6px;
    display: inline-flex;
}
.orders-table-unified .order-number { font-size: 11px; }
.orders-table-unified .order-details-button { width: 100%; }
.orders-filter-form label > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.orders-filter-form :is(select,input) { color: var(--ink); background: var(--surface); border-color: var(--line); font-size: 12px; }
.order-status-new { color: #6d4dd2; background: var(--primary-soft); }
.order-status-processing { color: #8a6510; background: #fff3cf; }
.order-status-shipped { color: #126f9d; background: #dff3ff; }
.order-status-delivered { color: #16815d; background: var(--green-soft); }
.order-status-cancelled,.order-status-returned { color: #b23d51; background: var(--red-soft); }
.order-status-other { color: var(--muted); background: color-mix(in srgb,var(--surface) 65%,var(--line)); }
.order-details-dialog {
    width: min(1180px,calc(100vw - 32px));
    max-width: none;
    max-height: min(760px,calc(100vh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15,23,42,.24);
}
.order-details-dialog::backdrop { background: rgba(15,23,42,.54); backdrop-filter: blur(3px); }
.order-details-dialog[open] { display: flex; flex-direction: column; }
.order-details-dialog.is-tour-preview[open] { position: fixed; z-index: 1097; inset: 16px; }
.order-details-dialog-head {
    min-height: 78px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}
.order-details-dialog-head span { color: var(--primary); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.order-details-dialog-head h2 { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 18px; }
.order-details-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.order-details-close {
    width: 34px;
    height: 34px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    font-size: 20px;
    cursor: pointer;
}
.order-details-loading,.order-details-error { min-height: 130px; padding: 30px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 12px; }
.order-details-error { color: #b23d51; background: var(--red-soft); }
.order-details-dialog [data-order-details-content] {
    min-height: 0;
    max-height: calc(min(760px,100vh - 32px) - 79px);
    overflow: auto;
}
.order-products-table { min-width: 980px; }
.order-products-table td { vertical-align: top; }
.order-products-table td strong,.order-products-table td small { overflow-wrap: anywhere; }
html[data-theme="dark"] .order-status-processing { color: #ffd978; background: rgba(151,108,0,.22); }
html[data-theme="dark"] .order-status-shipped { color: #7bd4ff; background: rgba(0,111,166,.23); }
html[data-theme="dark"] .order-details-dialog { color-scheme: dark; }
html[data-theme="dark"] .orders-filter-error {
    color: #ff9cac;
    border-color: rgba(255,112,137,.28);
}
html[data-theme="dark"] .orders-filter-error span { color: #ffc2cc; }

/* Order feed analytics. */
.orders-filter-panel { margin-bottom: 12px; overflow: hidden; }
.orders-analytics-warning { margin-bottom: 12px; }
.orders-period-presets {
    min-width: 0;
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    scrollbar-width: thin;
}
.orders-period-presets::-webkit-scrollbar,
.orders-chart-metrics::-webkit-scrollbar { height: 4px; }
.orders-period-presets::-webkit-scrollbar-thumb,
.orders-chart-metrics::-webkit-scrollbar-thumb { background: color-mix(in srgb,var(--muted) 42%,transparent); border-radius: 8px; }
.orders-period-presets button {
    min-height: 31px;
    padding: 0 10px;
    flex: 0 0 auto;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}
.orders-period-presets button:hover,
.orders-period-presets button:focus-visible,
.orders-period-presets button[aria-pressed="true"] {
    color: var(--primary);
    background: var(--surface);
    outline: 0;
    box-shadow: 0 2px 8px rgba(20,28,50,.08);
}
.orders-kpi-grid {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 9px;
}
.orders-kpi-card {
    min-width: 0;
    min-height: 132px;
    padding: 14px 15px 13px;
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.orders-kpi-card::before {
    width: 3px;
    position: absolute;
    inset: 11px auto 11px 0;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    content: "";
}
.orders-kpi-card.is-blue::before { background: var(--blue); }
.orders-kpi-card.is-money::before { background: var(--green); }
.orders-kpi-card.is-average::before { background: var(--orange); }
.orders-kpi-card.is-danger::before { background: var(--red); }
.orders-kpi-card.is-warning::before { background: #d59a16; }
.orders-kpi-label { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.orders-kpi-label > span {
    min-width: 0;
    color: var(--muted);
    font-size: var(--ui-font-indicator-caption,11px);
    font-weight: 850;
    letter-spacing: .025em;
    text-transform: uppercase;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.orders-kpi-label > i {
    width: 27px;
    height: 27px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
    font-size: var(--ui-font-indicator-text,12px);
    font-style: normal;
    font-weight: 900;
}
.orders-kpi-card.is-blue .orders-kpi-label > i { color: var(--blue); background: var(--blue-soft); }
.orders-kpi-card.is-money .orders-kpi-label > i { color: var(--green); background: var(--green-soft); }
.orders-kpi-card.is-average .orders-kpi-label > i { color: var(--orange); background: var(--orange-soft); }
.orders-kpi-card.is-danger .orders-kpi-label > i { color: var(--red); background: var(--red-soft); }
.orders-kpi-card.is-warning .orders-kpi-label > i { color: #b47b07; background: #fff5d9; }
.orders-kpi-card > strong {
    min-width: 0;
    margin-top: 10px;
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: clamp(18px,1.45vw,23px);
    letter-spacing: -.025em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.orders-kpi-card > strong small { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); letter-spacing: 0; }
.orders-kpi-card > div:last-child { min-width: 0; margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; }
.orders-kpi-card > div:last-child > small { min-width: 0; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); overflow-wrap: anywhere; }
.orders-kpi-change { min-height: 24px; padding: 3px 7px; display: inline-flex; align-items: center; border-radius: 6px; font-size: var(--ui-font-indicator-caption,11px); font-weight: 900; white-space: nowrap; }
.orders-kpi-change.is-good { color: var(--green); background: var(--green-soft); }
.orders-kpi-change.is-bad { color: var(--red); background: var(--red-soft); }
.orders-kpi-change.is-neutral { color: var(--muted); background: var(--soft); }
.orders-analytics-grid {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: minmax(0,2.15fr) minmax(280px,.85fr);
    gap: 12px;
}
.orders-trend-panel { min-width: 0; overflow: visible; }
.orders-quality-panel { min-width: 0; overflow: hidden; }
.orders-analytics-head {
    min-height: 82px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}
.orders-analytics-head > div:first-child { min-width: 0; }
.orders-analytics-head span,.orders-quality-head span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.orders-analytics-head h2,.orders-quality-head h2 { margin: 4px 0 0; font-size: var(--ui-font-indicator-title,17px); }
.orders-analytics-head p { margin: 4px 0 0; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); line-height: 1.45; overflow-wrap: anywhere; }
.orders-chart-metrics {
    min-width: 0;
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    background: var(--soft);
    border-radius: 9px;
    scrollbar-width: thin;
}
.orders-chart-metrics button {
    min-height: 36px;
    padding: 0 10px;
    flex: 0 0 auto;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: var(--ui-font-indicator-caption,11px);
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}
.orders-chart-metrics button.active { color: var(--primary); background: var(--surface); box-shadow: 0 2px 8px rgba(20,28,50,.08); }
.orders-chart-metrics button:disabled { opacity: .45; cursor: not-allowed; }
.orders-chart-metrics button:focus-visible { outline: 2px solid color-mix(in srgb,var(--primary) 60%,transparent); outline-offset: -2px; }
.orders-chart-summary {
    padding: 9px 15px;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 8px;
    background: color-mix(in srgb,var(--soft) 72%,transparent);
    border-bottom: 1px solid var(--line);
}
.orders-chart-summary > span { min-width: 0; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.orders-chart-summary > span > span { display: block; line-height: 1.25; overflow-wrap: anywhere; }
.orders-chart-summary strong { margin-top: 3px; display: block; overflow: hidden; color: var(--ink); font-size: var(--ui-font-indicator-text,12px); text-overflow: ellipsis; white-space: nowrap; }
.orders-chart-wrap { height: 340px; position: relative; padding: 12px 12px 2px; overflow: visible; }
.orders-chart-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.orders-chart-wrap canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; border-radius: 8px; }
.orders-chart-empty { min-height: 390px; display: grid; place-content: center; }
.orders-chart-tooltip {
    min-width: 205px;
    max-width: min(270px,calc(100% - 16px));
    padding: 10px 12px;
    position: absolute;
    z-index: 3;
    color: #fff;
    background: #171c2a;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(10,16,32,.28);
    pointer-events: none;
    transform: translate(-50%,calc(-100% - 12px));
}
.orders-chart-tooltip[data-placement="below"] { transform: translate(-50%,12px); }
.orders-chart-tooltip :is(strong,span,small) { display: block; overflow-wrap: anywhere; }
.orders-chart-tooltip strong { font-size: 11px; }
.orders-chart-tooltip span { margin-top: 4px; font-size: 13px; font-weight: 900; }
.orders-chart-tooltip small { margin-top: 3px; color: #bdc5d2; font-size: 10px; line-height: 1.35; }
.orders-chart-tooltip small.is-adverse { color: #ff9ca8; font-weight: 800; }
.feedback-chart-tooltip,
.advertising-chart-tooltip,
.finance-chart-tooltip,
.dashboard-wb-chart-tooltip,
.team-statistics-tooltip,
.orders-chart-tooltip {
    max-width: min(280px,calc(100% - 16px));
    overflow-wrap: anywhere;
    white-space: normal;
}
.orders-chart-legend { padding: 8px 15px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.orders-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.orders-chart-legend i { width: 16px; height: 3px; border-radius: 4px; }
.orders-chart-legend .is-current { background: var(--primary); }
.orders-chart-legend .is-previous { background: repeating-linear-gradient(90deg,#a8b0bf 0 4px,transparent 4px 7px); }
.orders-chart-legend .is-improvement { background: var(--green); }
.orders-chart-legend .is-decline { background: var(--red); }
.orders-quality-head { min-height: 82px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.orders-quality-head > div:first-child { min-width: 0; }
.orders-quality-score {
    width: clamp(68px,4vw,74px);
    height: clamp(68px,4vw,74px);
    padding: 7px;
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    place-content: center;
    text-align: center;
    background: conic-gradient(var(--green) calc(var(--score) * 1%),var(--soft) 0);
    border-radius: 50%;
}
.orders-quality-score::before { position: absolute; inset: 6px; background: var(--surface); border-radius: 50%; content: ""; }
.orders-quality-score :is(strong,small) { position: relative; z-index: 1; display: block; width: max-content; max-width: 100%; text-align: center; white-space: nowrap; }
.orders-quality-score strong { font-size: var(--ui-font-indicator-value,16px); line-height: 1; }
.orders-quality-score small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1; }
.orders-outcome-strip { height: 8px; margin: 15px 15px 4px; display: flex; overflow: hidden; background: var(--soft); border-radius: 8px; }
.orders-outcome-strip > i { width: calc(var(--share) * 1%); min-width: 0; height: 100%; display: block; }
.orders-outcome-strip .is-delivered { background: var(--green); }
.orders-outcome-strip .is-active { background: var(--blue); }
.orders-outcome-strip .is-cancelled { background: var(--red); }
.orders-outcome-strip .is-returned { background: var(--orange); }
.orders-outcome-strip .is-other { background: var(--muted); }
.orders-quality-list { padding: 8px 15px 5px; display: grid; gap: 10px; }
.orders-quality-row { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 10px; }
.orders-quality-row > span { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: var(--ui-font-indicator-text,12px); font-weight: 750; }
.orders-quality-row > span > i { width: 7px; height: 7px; flex: 0 0 auto; background: var(--muted); border-radius: 50%; }
.orders-quality-row > strong { font-size: var(--ui-font-indicator-text,12px); }
.orders-quality-row > strong small { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); }
.orders-quality-row > div { height: 5px; grid-column: 1 / -1; overflow: hidden; background: var(--soft); border-radius: 5px; }
.orders-quality-row > div > i { height: 100%; display: block; background: var(--muted); border-radius: inherit; }
.orders-quality-row.is-delivered > span > i,.orders-quality-row.is-delivered > div > i { background: var(--green); }
.orders-quality-row.is-active > span > i,.orders-quality-row.is-active > div > i { background: var(--blue); }
.orders-quality-row.is-cancelled > span > i,.orders-quality-row.is-cancelled > div > i { background: var(--red); }
.orders-quality-row.is-returned > span > i,.orders-quality-row.is-returned > div > i { background: var(--orange); }
.orders-quality-row.is-other > span > i,.orders-quality-row.is-other > div > i { background: var(--muted); }
.orders-problem-note { margin: 10px 15px 15px; padding: 10px 11px; background: color-mix(in srgb,var(--red-soft) 70%,var(--surface)); border: 1px solid color-mix(in srgb,var(--red) 18%,var(--line)); border-radius: 9px; }
.orders-problem-note > span,.orders-problem-note > strong,.orders-problem-note > small { display: block; }
.orders-problem-note > span { color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; text-transform: uppercase; }
.orders-problem-note > strong { margin-top: 3px; color: var(--red); font-size: var(--ui-font-indicator-title,17px); }
.orders-problem-note > small { margin-top: 4px; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); line-height: 1.45; }
.orders-cancel-reasons { margin: 0 15px 15px; padding-top: 10px; border-top: 1px solid var(--line); }
.orders-cancel-reasons > strong { margin-bottom: 6px; display: block; color: var(--ink); font-size: var(--ui-font-indicator-text,12px); }
.orders-cancel-reasons > div { min-width: 0; min-height: 25px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 7px; border-bottom: 1px solid color-mix(in srgb,var(--line) 70%,transparent); }
.orders-cancel-reasons > div:last-child { border-bottom: 0; }
.orders-cancel-reasons span { min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); text-overflow: ellipsis; white-space: nowrap; }
.orders-cancel-reasons b { color: var(--ink); font-size: var(--ui-font-indicator-text,12px); }
.orders-cancel-reasons small { min-width: 40px; color: var(--red); font-size: var(--ui-font-indicator-caption,11px); font-weight: 800; text-align: right; }
.orders-breakdowns { margin-bottom: 12px; overflow: hidden; }
.orders-breakdown-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.orders-breakdown-grid > article { min-width: 0; border-right: 1px solid var(--line); }
.orders-breakdown-grid > article:last-child { border-right: 0; }
.orders-breakdown-grid > article > header { min-height: 46px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: color-mix(in srgb,var(--soft) 72%,transparent); border-bottom: 1px solid var(--line); }
.orders-breakdown-grid > article > header span { color: var(--ink); font-size: var(--ui-font-indicator-text,12px); font-weight: 850; }
.orders-breakdown-grid > article > header strong { min-width: 26px; padding: 3px 6px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: var(--ui-font-indicator-caption,11px); text-align: center; }
.orders-breakdown-list { max-height: 305px; padding: 4px 13px 7px; overflow: auto; scrollbar-width: thin; }
.orders-breakdown-row { min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.orders-breakdown-row:last-child { border-bottom: 0; }
.orders-breakdown-row > div:first-child { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.orders-breakdown-row > div:first-child > span { min-width: 0; overflow: hidden; color: var(--ink); font-size: var(--ui-font-indicator-text,12px); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.orders-breakdown-row > div:first-child > strong { flex: 0 0 auto; font-size: var(--ui-font-indicator-text,12px); }
.orders-breakdown-row > small,.orders-breakdown-row > em { min-width: 0; margin-top: 4px; display: block; overflow: hidden; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); font-style: normal; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.orders-breakdown-row > div:nth-of-type(2) { height: 4px; margin-top: 7px; overflow: hidden; background: var(--soft); border-radius: 4px; }
.orders-breakdown-row > div:nth-of-type(2) > i { min-width: 0; max-width: 100%; height: 100%; display: block; border: 0; border-radius: inherit; box-shadow: none; }
.orders-breakdown-row .script-marketplace-badge { width: fit-content; max-width: calc(100% - 40px); display: inline-flex !important; font-size: var(--ui-font-indicator-caption,11px); }
.orders-breakdown-row .order-status { max-width: calc(100% - 40px); }
.orders-breakdown-empty { padding: 24px 0; color: var(--muted); font-size: var(--ui-font-indicator-caption,11px); text-align: center; }
html[data-theme="dark"] .orders-kpi-card.is-warning .orders-kpi-label > i { color: #ffd978; background: rgba(151,108,0,.22); }
html[data-theme="dark"] .orders-chart-tooltip { background: #050a12; }

@media (max-width: 1180px) {
    .dashboard-finance-kpis { grid-template-columns: repeat(3,minmax(170px,1fr)); }
    .orders-analytics-grid { grid-template-columns: 1fr; }
    .orders-quality-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .orders-problem-note { margin-top: 12px; }
}
@media (max-width: 900px) {
    .orders-analytics-head { align-items: flex-start; flex-direction: column; }
    .orders-chart-metrics { width: 100%; }
    .orders-chart-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .orders-breakdown-grid { grid-template-columns: 1fr; }
    .orders-breakdown-grid > article { border-right: 0; border-bottom: 1px solid var(--line); }
    .orders-breakdown-grid > article:last-child { border-bottom: 0; }
}
@media (max-width: 700px) {
    .dashboard-finance-heading-actions { width: 100%; justify-content: space-between; }
    .dashboard-finance-analytics .section-heading-inline { align-items: flex-start; flex-direction: column; }
    .dashboard-finance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .orders-filter-panel .orders-panel-head { gap: 10px; }
    .orders-period-presets { width: 100%; }
    .orders-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .orders-kpi-card { min-height: 124px; }
    .orders-kpi-card > strong { white-space: normal; overflow-wrap: anywhere; }
    .orders-chart-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .orders-chart-wrap { height: 300px; padding-inline: 5px; }
    .orders-quality-list { grid-template-columns: 1fr; }
    .orders-breakdown-row > :is(small,em) { white-space: normal; }
}
@media (max-width: 430px) {
    .dashboard-finance-kpis { grid-template-columns: 1fr; }
    .orders-kpi-grid { grid-template-columns: 1fr; }
    .orders-kpi-card { min-height: 116px; }
    .orders-chart-summary { grid-template-columns: 1fr 1fr; }
    .orders-chart-wrap { height: 285px; }
}

@media (max-width: 700px) {
    .orders-table-unified { min-width: 0; table-layout: auto; }
    .orders-table-unified td > :is(strong,small,span) { white-space: normal; overflow-wrap: anywhere; }
    .order-details-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .order-details-dialog-head { padding: 13px 14px; }
}
.marketplace-badge-unknown {
    color: var(--muted);
    background: var(--soft);
    border-color: var(--line);
}
.batch-script-icon.marketplace-icon-wildberries,
.script-run-icon.marketplace-icon-wildberries,
.batch-schedule-scripts b.marketplace-icon-wildberries {
    color: #b11493;
    background: rgba(203,17,171,.10);
    border-color: rgba(203,17,171,.22);
}
.batch-script-icon.marketplace-icon-ozon,
.script-run-icon.marketplace-icon-ozon,
.batch-schedule-scripts b.marketplace-icon-ozon {
    color: #005bff;
    background: rgba(0,91,255,.10);
    border-color: rgba(0,91,255,.22);
}
.batch-script-icon.marketplace-icon-yandex,
.script-run-icon.marketplace-icon-yandex,
.batch-schedule-scripts b.marketplace-icon-yandex {
    color: #725900;
    background: rgba(255,204,0,.22);
    border-color: rgba(184,145,0,.25);
}
.global-script-copy { min-width: 0; }
.script-marketplace-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.global-script-catalog > .script-marketplace-legend { margin: -2px 3px 9px; }
.batch-script-picker > .script-marketplace-legend { margin: 0 0 9px; }
.global-script-name-row,
.global-script-heading-meta,
.batch-script-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.global-script-name-row strong,
.batch-script-title strong { min-width: 0; flex: 1 1 auto; }
.global-script-heading-meta { margin-bottom: 1px; }
.global-script-settings > header .global-script-heading-meta > small { color: var(--muted); }
.batch-script-grid > label[data-marketplace="wildberries"]:has(input:checked) { border-color: rgba(203,17,171,.48); }
.batch-script-grid > label[data-marketplace="ozon"]:has(input:checked) { border-color: rgba(0,91,255,.48); }
.batch-script-grid > label[data-marketplace="yandex"]:has(input:checked) { border-color: rgba(224,176,0,.58); }
.batch-schedule-scripts b[class*="marketplace-icon-"] {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border: 1px solid;
    border-radius: 6px;
    font-size: 8px;
}
.batch-schedule-scripts .script-marketplace-badge { margin-left: 2px; }
.script-run-main > span > .script-marketplace-badge,
.script-run-main > span > .script-run-status { flex: 0 0 auto; }
.export-page-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.export-page-title h1 { margin-right: 0; }
.admin-company-settings-page .export-card .export-title-line h2::after {
    min-height: 18px;
    margin-left: 7px;
    padding: 2px 7px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #c20fa3;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg,#cb11ab,#e62d79);
    box-shadow: 0 4px 10px rgba(203,17,171,.16);
    content: "Wildberries";
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
}
.admin-company-settings-page .export-card:has(a[href*="/reports/ozon_"]) .export-title-line h2::after {
    border-color: #0052e6;
    background: #005bff;
    box-shadow: 0 4px 10px rgba(0,91,255,.18);
    content: "Ozon";
}
.admin-company-settings-page .export-card:has(a[href*="/reports/yandex_"]) .export-title-line h2::after {
    border-color: #e5b800;
    color: #171717;
    background: #ffcc00;
    box-shadow: 0 4px 10px rgba(255,204,0,.18);
    content: "Яндекс Маркет";
}
.admin-company-settings-page .export-card:has(a[href*="/reports/ozon_"]) .export-icon {
    background: #005bff;
    box-shadow: 0 9px 22px rgba(0,91,255,.20);
}
.admin-company-settings-page .export-card:has(a[href*="/reports/yandex_"]) .export-icon {
    color: #171717;
    background: #ffcc00;
    box-shadow: 0 9px 22px rgba(255,204,0,.20);
}

html[data-theme="dark"] .batch-script-icon.marketplace-icon-wildberries,
html[data-theme="dark"] .script-run-icon.marketplace-icon-wildberries,
html[data-theme="dark"] .batch-schedule-scripts b.marketplace-icon-wildberries {
    color: #f388dc;
    background: rgba(203,17,171,.18);
    border-color: rgba(243,136,220,.28);
}
html[data-theme="dark"] .batch-script-icon.marketplace-icon-ozon,
html[data-theme="dark"] .script-run-icon.marketplace-icon-ozon,
html[data-theme="dark"] .batch-schedule-scripts b.marketplace-icon-ozon {
    color: #79a8ff;
    background: rgba(0,91,255,.20);
    border-color: rgba(121,168,255,.30);
}
html[data-theme="dark"] .batch-script-icon.marketplace-icon-yandex,
html[data-theme="dark"] .script-run-icon.marketplace-icon-yandex,
html[data-theme="dark"] .batch-schedule-scripts b.marketplace-icon-yandex {
    color: #ffdc52;
    background: rgba(255,204,0,.16);
    border-color: rgba(255,220,82,.28);
}

/* Marketplace badges are intentionally hidden in the company section bar. */
.company-section-link > em { display: none !important; }

@media (max-width: 1180px) {
    .global-script-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .global-script-parallel { grid-column: 1 / -1; }
    .dashboard-toolbar { align-items: stretch; flex-wrap: wrap; }
    .dashboard-marketplace-filters { order: 3; width: 100%; grid-template-columns: repeat(3,minmax(140px,1fr)) auto; }
}

@media (max-width: 620px) {
    .dashboard-marketplace-filters { grid-template-columns: 1fr; }
    .section-heading-inline { align-items: stretch; flex-direction: column; }
    .section-heading-inline .button { width: 100%; }
}

/* Product catalog: marketplace/store pairs and scoped product costs. */
.product-store-filter-pair,
.product-store-form {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: end;
    gap: 9px;
}

.product-filter-form > .product-store-filter-pair { grid-column: span 2; }
.cost-catalog-filters > .product-store-filter-pair { grid-column: span 4; }

.product-store-filter-pair > label,
.product-store-form > label,
.cost-scope-selects > label {
    min-width: 0;
    max-width: 100%;
}

.product-store-filter-pair > label {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-store-filter-pair > label > span,
.product-store-form > label > span:first-child {
    min-width: 0;
    min-height: 16px;
    margin: 0 0 5px;
    display: flex;
    align-items: flex-end;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 750;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.product-store-filter-pair select,
.product-store-form select,
.cost-scope-selects select {
    width: 100%;
    max-width: 100%;
    height: var(--control-height);
    min-height: var(--control-height);
    padding-left: 10px;
    color: var(--ink);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    font-size: var(--ui-text);
    line-height: 1.25;
}

.product-store-form {
    padding: 11px;
    background: color-mix(in srgb,var(--soft) 72%,var(--surface));
    border: 1px solid var(--line);
    border-radius: 11px;
}

.product-store-form > .field { min-width: 0; gap: 0; }

.product-marketplace-chip {
    --marketplace-color: #667085;
    width: fit-content;
    max-width: 100%;
    min-height: 25px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    color: var(--marketplace-color);
    background: color-mix(in srgb,var(--marketplace-color) 10%,var(--surface));
    border: 1px solid color-mix(in srgb,var(--marketplace-color) 22%,var(--line));
    border-radius: 7px;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.product-marketplace-chip.is-wildberries,
.product-marketplace-chip.is-wb { --marketplace-color: #b30f98; }
.product-marketplace-chip.is-ozon { --marketplace-color: #075ee8; }
.product-marketplace-chip.is-yandex,
.product-marketplace-chip.is-yandex-market { --marketplace-color: #8a6500; }

.product-marketplace-chip + small {
    min-width: 0;
    max-width: 100%;
    margin-top: 5px;
    display: block;
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-store-name,
.cost-change-scope {
    min-width: 0;
    max-width: 100%;
    display: block;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cost-scope-caption,
.cost-scope-count {
    min-width: 0;
    max-width: 100%;
    display: block;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cost-scope-caption {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.cost-scope-count {
    width: fit-content;
    margin: 5px 0 0 auto;
    padding: 3px 6px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
}

.cost-scope-fieldset {
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 11px;
    grid-column: 1 / -1;
    background: color-mix(in srgb,var(--soft) 72%,var(--surface));
    border: 1px solid var(--line);
    border-radius: 11px;
}

.cost-scope-fieldset > legend {
    max-width: calc(100% - 12px);
    padding: 0 6px;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.cost-scope-options {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
}

.cost-scope-options > label {
    min-width: 0;
    position: relative;
    cursor: pointer;
}

.cost-scope-options input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.cost-scope-options > label > span {
    min-width: 0;
    min-height: 54px;
    padding: 9px 10px 9px 31px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    transition: border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.cost-scope-options > label > span::before,
.cost-scope-options > label > span::after {
    content: "";
    position: absolute;
    top: 50%;
    border-radius: 50%;
    transform: translateY(-50%);
}

.cost-scope-options > label > span::before {
    left: 10px;
    width: 13px;
    height: 13px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
}

.cost-scope-options > label > span::after {
    left: 14px;
    width: 7px;
    height: 7px;
    background: transparent;
}

.cost-scope-options b,
.cost-scope-options small {
    min-width: 0;
    max-width: 100%;
    display: block;
    overflow-wrap: anywhere;
}

.cost-scope-options b { font-size: 11px; line-height: 1.25; }
.cost-scope-options small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }

.cost-scope-options input:checked + span {
    color: var(--primary);
    background: color-mix(in srgb,var(--primary-soft) 78%,var(--surface));
    border-color: color-mix(in srgb,var(--primary) 48%,var(--line));
    box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--primary) 10%,transparent);
}

.cost-scope-options input:checked + span::before { border-color: var(--primary); }
.cost-scope-options input:checked + span::after { background: var(--primary); }
.cost-scope-options input:focus-visible + span {
    outline: 3px solid color-mix(in srgb,var(--primary) 30%,transparent);
    outline-offset: 2px;
}

.cost-scope-options > label:hover > span { border-color: color-mix(in srgb,var(--primary) 35%,var(--line)); }

.cost-scope-selects {
    min-width: 0;
    margin-top: 9px;
    padding-top: 9px;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: end;
    gap: 9px;
    border-top: 1px solid var(--line);
}

html[data-theme="dark"] .product-store-form,
html[data-theme="dark"] .cost-scope-fieldset {
    background: color-mix(in srgb,var(--soft) 82%,var(--surface));
}

html[data-theme="dark"] .product-store-form select,
html[data-theme="dark"] .cost-scope-selects select {
    color: var(--ink);
    background: #111a27;
    border-color: #344158;
}

html[data-theme="dark"] .product-marketplace-chip.is-wildberries,
html[data-theme="dark"] .product-marketplace-chip.is-wb { --marketplace-color: #f08bd9; }
html[data-theme="dark"] .product-marketplace-chip.is-ozon { --marketplace-color: #79a8ff; }
html[data-theme="dark"] .product-marketplace-chip.is-yandex,
html[data-theme="dark"] .product-marketplace-chip.is-yandex-market { --marketplace-color: #ffda55; }

html[data-theme="dark"] .cost-scope-options > label > span,
html[data-theme="dark"] .cost-scope-options > label > span::before {
    background: #111a27;
    border-color: #334056;
}

html[data-theme="dark"] .cost-scope-options input:checked + span {
    background: color-mix(in srgb,var(--primary-soft) 78%,#111a27);
    border-color: color-mix(in srgb,var(--primary) 52%,var(--line));
}

html[data-theme="dark"] .cost-scope-options input:checked + span::before { border-color: var(--primary); }
html[data-theme="dark"] .cost-scope-options input:checked + span::after { background: var(--primary); }

@media (min-width: 1101px) {
    .product-filter-form {
        grid-template-columns: minmax(180px,1.5fr) minmax(230px,1.7fr) repeat(4,minmax(100px,1fr)) auto;
    }
    .product-filter-form > .product-store-filter-pair { grid-column: auto; }
}

@media (max-width: 1120px) {
    .cost-catalog-filters > .product-store-filter-pair { grid-column: span 6; }
}

@media (max-width: 720px) {
    .cost-catalog-filters > .product-store-filter-pair { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .product-filter-form > .product-store-filter-pair { grid-column: auto; }
}

@media (max-width: 560px) {
    .product-store-filter-pair,
    .product-store-form,
    .cost-scope-options,
    .cost-scope-selects { grid-template-columns: 1fr; }
    .cost-scope-options > label > span { min-height: 50px; }
    .cost-catalog-table .cost-scope-count { margin-left: 0; }
}

@media (max-width: 480px) {
    .cost-catalog-filters > .product-store-filter-pair { grid-column: auto; }
}

.ozon-product-state {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 7px;
    max-width: 100%;
}

.ozon-product-state span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid #dfe4ec;
    border-radius: 999px;
    background: #f4f6f9;
    color: #7a8495;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.ozon-product-state .is-on {
    border-color: rgba(24, 166, 111, 0.25);
    background: rgba(24, 166, 111, 0.1);
    color: #11865a;
}

.ozon-product-state .is-danger {
    border-color: rgba(224, 82, 96, 0.26);
    background: rgba(224, 82, 96, 0.1);
    color: #c93d4c;
}

.ozon-product-state .is-warning {
    border-color: rgba(224, 161, 26, 0.28);
    background: rgba(224, 161, 26, 0.11);
    color: #a87308;
}

html[data-theme="dark"] .ozon-product-state span {
    border-color: #344154;
    background: #182232;
    color: #9ba7ba;
}

html[data-theme="dark"] .ozon-product-state .is-on {
    border-color: rgba(71, 209, 151, 0.3);
    background: rgba(71, 209, 151, 0.12);
    color: #6bdca8;
}

html[data-theme="dark"] .ozon-product-state .is-danger {
    border-color: rgba(255, 108, 123, 0.34);
    background: rgba(255, 108, 123, 0.12);
    color: #ff8995;
}

html[data-theme="dark"] .ozon-product-state .is-warning {
    border-color: rgba(241, 189, 75, 0.34);
    background: rgba(241, 189, 75, 0.12);
    color: #f2c969;
}

/* Shared content guards: long company, shop and error text stays inside its card. */
.page-heading > *,
.panel-head > *,
.modal-head > *,
.empty-state > * { min-width: 0; max-width: 100%; }
.page-heading h1,
.page-heading p,
.panel-head h2,
.panel-head p,
.modal-head h2,
.modal-head p,
.empty-state h3,
.empty-state p,
.script-run-error-detail,
.script-run-summary { overflow-wrap: anywhere; }
.modal-close { flex: 0 0 auto; }

/* Prices and stock dynamics: every control shares one baseline and fits its grid. */
.price-filter-form {
    grid-template-columns:
        minmax(135px,.7fr)
        minmax(220px,1.35fr)
        minmax(170px,.9fr)
        minmax(180px,.9fr)
        auto;
}

.marketplace-goods-filters {
    grid-template-columns:
        minmax(135px,.7fr)
        minmax(220px,1.25fr)
        minmax(170px,.85fr)
        minmax(180px,.9fr)
        minmax(180px,.9fr)
        auto;
}

.marketplace-goods-filters > * { min-width: 0; }

.price-dynamics-filter,
.stock-dynamics-filter {
    grid-template-columns:
        minmax(105px,.65fr)
        minmax(168px,1.05fr)
        minmax(115px,.72fr)
        minmax(105px,.72fr)
        minmax(140px,.9fr)
        minmax(170px,1.15fr)
        minmax(120px,.82fr)
        minmax(88px,auto);
}

:is(.price-filter-form,.price-dynamics-filter,.stock-dynamics-filter) > * {
    min-width: 0;
}

:is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-mode,
:is(.price-dynamics-filter,.stock-dynamics-filter) .warehouse-picker,
:is(.price-dynamics-filter,.stock-dynamics-filter) > .button {
    align-self: end;
}

:is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-mode {
    display: grid;
    grid-template-rows: 16px var(--control-height);
    gap: 5px;
}

:is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-mode > span {
    min-height: 16px;
    margin: 0;
    display: flex;
    align-items: flex-end;
    color: var(--muted);
    font-size: var(--ui-caption);
    font-weight: 750;
    line-height: 1.3;
}

:is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-mode .segmented span,
:is(.price-dynamics-filter,.stock-dynamics-filter) .warehouse-picker summary,
:is(.price-dynamics-filter,.stock-dynamics-filter) > .button {
    height: var(--control-height);
    min-height: var(--control-height);
}

:is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-mode .segmented label > span {
    margin: 0;
}

@media (max-width: 1180px) {
    .price-dynamics-filter,
    .stock-dynamics-filter {
        grid-template-columns: repeat(4,minmax(0,1fr));
    }

    .marketplace-goods-filters {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 1050px) {
    .price-filter-form {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

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

    .price-filter-form .stocks-search {
        grid-column: span 2;
    }

    .marketplace-goods-filters .stocks-search {
        grid-column: span 2;
    }

    .price-dynamics-filter,
    .stock-dynamics-filter {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    :is(.price-dynamics-filter,.stock-dynamics-filter) .dynamics-search {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .price-filter-form,
    .marketplace-goods-filters,
    .price-dynamics-filter,
    .stock-dynamics-filter {
        grid-template-columns: 1fr;
    }

    :is(.price-filter-form,.marketplace-goods-filters) .stocks-search {
        grid-column: auto;
    }

    :is(.price-dynamics-filter,.stock-dynamics-filter) > .button {
        width: 100%;
    }
}

/* Final control geometry overrides must stay after legacy responsive rules. */
.feedback-filter-form .feedback-filter-actions > .button {
    height: var(--control-height);
    min-height: var(--control-height);
}

/* Stock valuation toggles and replenishment planning. */
.stocks-filter-form-valuations {
    grid-template-columns: minmax(220px,1.45fr) repeat(4,minmax(128px,.78fr));
}

.stocks-filter-form-valuations .stock-valuation-toggles {
    grid-column: 1 / -2;
    display: grid;
    grid-template-columns: repeat(2,minmax(210px,280px));
    gap: 8px;
}

.stock-valuation-toggles .stock-value-toggle {
    min-width: 0;
    min-height: var(--control-height);
    margin: 0;
}

.stock-cost-card {
    background: linear-gradient(145deg,rgba(14,165,233,.08),var(--surface)) !important;
    border-color: rgba(14,165,233,.22) !important;
}

.stock-cost-value { color: #0284c7; }

.demand-control-grid {
    display: grid;
    grid-template-columns: minmax(420px,1.2fr) minmax(320px,.8fr);
    gap: 12px;
    margin-bottom: 12px;
}

.demand-settings-card,
.demand-formula-card {
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.demand-settings-card > div,
.demand-formula-card { flex: 1; }
.demand-settings-card span,
.demand-formula-card > span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.demand-formula-card > span { flex: 0 0 76px; }
.demand-formula-card > strong { flex: 0 1 300px; }
.demand-formula-card > small { flex: 1 1 190px; }
.demand-settings-card strong,
.demand-formula-card strong {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.35;
}
.demand-settings-card small,
.demand-formula-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}
.demand-settings-card label {
    width: 112px;
    height: var(--control-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--surface);
}
.demand-settings-card input {
    width: 70px;
    height: 100%;
    padding: 0 8px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-weight: 800;
}
.demand-settings-card label span {
    padding-right: 10px;
    font-size: 9px;
    text-transform: none;
}

.demand-summary {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(6,minmax(145px,1fr));
    gap: 9px;
}
.demand-summary article {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.demand-summary span,
.demand-summary strong,
.demand-summary small { display: block; }
.demand-summary span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.demand-summary strong { margin-top: 7px; font-size: 18px; }
.demand-summary small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.demand-summary .is-danger { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.055); }
.demand-summary .is-danger strong { color: #dc2626; }
.demand-summary .is-warning { border-color: rgba(245,158,11,.28); background: rgba(245,158,11,.06); }
.demand-summary .is-warning strong { color: #d97706; }

.demand-panel { overflow: hidden; }
.demand-filter-form {
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(230px,1.35fr) repeat(5,minmax(130px,.78fr)) auto;
    align-items: end;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}
.demand-filter-form > label { min-width: 0; }
.demand-filter-form label > span {
    display: block;
    min-height: 12px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}
.demand-filter-form input,
.demand-filter-form select {
    width: 100%;
    height: var(--control-height);
    min-width: 0;
    padding: 0 10px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    outline: 0;
    font: inherit;
    font-size: 11px;
}
.demand-filter-actions { display: flex; gap: 6px; }
.demand-table { min-width: 1180px; table-layout: fixed; }
.demand-table th:first-child { width: 31%; }
.demand-table th:nth-child(2) { width: 13%; }
.demand-table th:nth-child(3) { width: 13%; }
.demand-table th:nth-child(n+4) { width: 14.3%; }
.demand-table td { vertical-align: middle; }
.demand-table td > strong,
.demand-table td > small { display: block; }
.demand-table td > small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.demand-row td:first-child { box-shadow: inset 3px 0 0 transparent; }
.demand-row-out_of_stock td:first-child,
.demand-row-urgent td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.demand-row-attention td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.demand-row-below_plan td:first-child { box-shadow: inset 3px 0 0 #eab308; }
.demand-row-enough td:first-child { box-shadow: inset 3px 0 0 #10b981; }
.demand-product { min-width: 0; display: flex; align-items: center; gap: 10px; }
.demand-product img,
.demand-product-placeholder {
    width: 46px;
    height: 58px;
    flex: 0 0 46px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.demand-product-placeholder { display: grid; place-items: center; color: var(--primary); font-weight: 900; }
.demand-product > div { min-width: 0; }
.demand-product strong,
.demand-product small,
.demand-product a,
.demand-product em { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.demand-product strong { font-size: 11px; line-height: 1.35; }
.demand-product small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.demand-product a { margin-top: 3px; color: var(--primary); font-size: 9px; font-weight: 800; white-space: nowrap; }
.demand-product em { margin-top: 3px; color: var(--muted); font-size: 8px; font-style: normal; white-space: nowrap; }
.demand-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    white-space: nowrap;
}
.demand-status i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.demand-status-out_of_stock,.demand-status-urgent { color: #dc2626; background: rgba(239,68,68,.1); }
.demand-status-attention { color: #d97706; background: rgba(245,158,11,.12); }
.demand-status-below_plan { color: #a16207; background: rgba(234,179,8,.12); }
.demand-status-enough { color: #059669; background: rgba(16,185,129,.11); }
.demand-status-no_demand { color: var(--muted); background: var(--surface-soft); }
.demand-quantity { color: var(--primary); }
.demand-product-detail {
    margin-bottom: 14px;
    overflow: hidden;
    scroll-margin-top: 90px;
}
.demand-product-detail:target { animation: demand-detail-highlight 1.8s ease; }
@keyframes demand-detail-highlight {
    0%,35% { box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent),var(--shadow-sm); }
    100% { box-shadow: var(--shadow-sm); }
}
.demand-product-detail-head {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}
.demand-product-detail-head > div { min-width: 0; display: flex; align-items: center; gap: 11px; }
.demand-product-detail-head img,
.demand-product-detail-head .demand-product-placeholder { width: 48px; height: 60px; flex: 0 0 48px; }
.demand-product-detail-head span { color: var(--primary); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.demand-product-detail-head h2 { margin: 3px 0 0; font-size: 16px; line-height: 1.25; }
.demand-product-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.demand-detail-summary { padding: 12px 14px; display: grid; grid-template-columns: repeat(4,minmax(140px,1fr)); gap: 8px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.demand-detail-summary article { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.demand-detail-summary span,.demand-detail-summary strong,.demand-detail-summary small { display: block; }
.demand-detail-summary span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.demand-detail-summary strong { margin-top: 4px; font-size: 15px; }
.demand-detail-summary small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.demand-detail-scroll { max-height: 520px; }
.demand-detail-table { min-width: 1180px; }
.demand-detail-table th:first-child { width: 25%; }
.demand-detail-table td { vertical-align: middle; }
.demand-detail-table td > strong,.demand-detail-table td > small { display: block; }
.demand-detail-table td > small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.demand-product .demand-product-detail-link { font-size: 10px; }

html[data-theme="dark"] .stock-cost-card { background: linear-gradient(145deg,rgba(14,165,233,.1),var(--surface)) !important; }
html[data-theme="dark"] .stock-cost-value { color: #38bdf8; }
html[data-theme="dark"] .demand-filter-form { background: #111a27; }
html[data-theme="dark"] .demand-detail-summary { background: #111a27; }
html[data-theme="dark"] .demand-summary .is-danger { background: rgba(239,68,68,.08); }
html[data-theme="dark"] .demand-summary .is-warning { background: rgba(245,158,11,.08); }

/* Admin Telegram notifications */
.telegram-admin-page { padding-bottom: 48px; }
.telegram-page-heading { align-items: center; }
.telegram-page-heading > div { min-width: 0; }
.telegram-page-heading .status { flex: 0 0 auto; }
.telegram-settings-layout {
    display: grid;
    grid-template-columns: minmax(0,1.8fr) minmax(280px,.7fr);
    align-items: start;
    gap: 16px;
}
.telegram-settings-card { overflow: hidden; }
.telegram-settings-card .panel-head { align-items: center; }
.telegram-master-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.telegram-master-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}
.telegram-master-switch > span {
    position: relative;
    width: 36px;
    height: 20px;
    flex: 0 0 36px;
    border-radius: 999px;
    background: var(--line-strong, var(--line));
    transition: background .18s ease;
}
.telegram-master-switch > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(15,23,42,.22);
    transition: transform .18s ease;
}
.telegram-master-switch input:checked + span { background: var(--primary); }
.telegram-master-switch input:checked + span::after { transform: translateX(16px); }
.telegram-master-switch input:focus-visible + span { outline: 3px solid rgba(91,92,240,.22); outline-offset: 2px; }
.telegram-master-switch strong { color: var(--ink); font-size: 11px; }
.telegram-form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    padding: 18px 20px;
}
.telegram-form-grid .form-field { min-width: 0; margin: 0; }
.telegram-form-grid .telegram-url-field { grid-column: 1 / -1; }
.telegram-form-grid .form-field > span {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
}
.telegram-form-grid input {
    width: 100%;
    height: 40px;
    min-width: 0;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: 0;
    font: inherit;
    font-size: 11px;
}
.telegram-form-grid input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,92,240,.12); }
.telegram-form-grid .form-field > small {
    display: block;
    min-height: 14px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}
.telegram-events {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin: 0;
    padding: 0 20px 18px;
    border: 0;
}
.telegram-events legend {
    width: 100%;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 850;
}
.telegram-events > label { position: relative; min-width: 0; cursor: pointer; }
.telegram-events > label > input {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}
.telegram-events > label > span {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    min-height: 64px;
    padding: 11px 38px 11px 11px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.telegram-events > label > span > i {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--primary);
    background: rgba(91,92,240,.1);
    border-radius: 9px;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
}
.telegram-events > label strong { align-self: end; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.telegram-events > label small { align-self: start; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.35; }
.telegram-events > label > input:checked + span { border-color: rgba(91,92,240,.38); box-shadow: inset 0 0 0 1px rgba(91,92,240,.08); }
.telegram-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
}
.telegram-form-actions > span { color: var(--muted); font-size: 9px; line-height: 1.35; }
.telegram-side-column { display: grid; gap: 16px; }
.telegram-test-card,.telegram-help-card { padding: 18px; }
.telegram-test-card { display: grid; gap: 11px; }
.telegram-card-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(145deg,#2aabee,#168acd);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(42,171,238,.22);
}
.telegram-card-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.telegram-test-card h2,.telegram-help-card h2 { margin: 0; color: var(--ink); font-size: 14px; }
.telegram-test-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.telegram-test-card form,.telegram-test-card .button { width: 100%; }
.telegram-test-card .button { justify-content: center; }
.telegram-test-card .button:disabled { cursor: not-allowed; opacity: .48; }
.telegram-delivery-success,.telegram-delivery-error { display: block; padding: 8px 10px; border-radius: 9px; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.telegram-form-grid .telegram-field-error { color: var(--red); font-weight: 750; }
.telegram-delivery-success { color: #047857; background: rgba(16,185,129,.1); }
.telegram-delivery-error { color: #dc2626; background: rgba(239,68,68,.1); }
.telegram-help-card ol { display: grid; gap: 11px; margin: 14px 0 0; padding: 0; list-style: none; }
.telegram-help-card li { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; gap: 8px; }
.telegram-help-card li > span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--primary); background: rgba(91,92,240,.1); border-radius: 8px; font-size: 9px; font-weight: 900; }
.telegram-help-card li p { min-width: 0; margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.telegram-help-card li strong { color: var(--ink); }
.email-settings-stack { display: grid; gap: 14px; min-width: 0; }
.email-notification-form-grid { grid-template-columns: minmax(220px,.75fr) minmax(280px,1.25fr); }
.email-payment-events { grid-template-columns: repeat(3,minmax(0,1fr)); }
.email-payment-events > label > span > i { font-size: 8px; letter-spacing: -.04em; }
.email-recipient-card { display: grid; gap: 14px; padding: 18px; overflow: hidden; }
.email-recipient-card .panel-head { align-items: center; margin: 0; }
.email-recipient-add { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.email-recipient-add .form-field { min-width: 0; margin: 0; }
.email-recipient-add .form-field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.email-recipient-add input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; color: var(--ink); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; outline: none; }
.email-recipient-list { display: grid; gap: 7px; }
.email-recipient-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 11px; }
.email-recipient-icon,.email-card-icon { display: grid; place-items: center; color: var(--primary); background: rgba(91,92,240,.11); font-weight: 900; }
.email-recipient-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.email-recipient-row > div { min-width: 0; }
.email-recipient-row strong,.email-recipient-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-recipient-row strong { color: var(--ink); font-size: 11px; }
.email-recipient-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.email-recipient-row form { margin: 0; }
.telegram-local-warning { margin: 14px 0 0; padding: 10px; color: var(--muted); background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.18); border-radius: 10px; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.telegram-local-warning strong { color: #b45309; }
[id^="company-"],[id^="request-"] { scroll-margin-top: 96px; }
[id^="company-"]:target,[id^="request-"]:target { animation: telegram-target-highlight 2.8s ease; }
@keyframes telegram-target-highlight {
    0%,35% { box-shadow: inset 4px 0 0 var(--primary),0 0 0 3px rgba(91,92,240,.14); }
    100% { box-shadow: none; }
}
html[data-theme="dark"] .telegram-card-icon { box-shadow: 0 8px 24px rgba(42,171,238,.14); }
html[data-theme="dark"] .telegram-delivery-success { color: #6ee7b7; }
html[data-theme="dark"] .telegram-delivery-error { color: #fca5a5; }
html[data-theme="dark"] .telegram-local-warning strong { color: #fbbf24; }

@media (max-width: 1450px) {
    .demand-summary { grid-template-columns: repeat(3,minmax(150px,1fr)); }
    .demand-filter-form { grid-template-columns: repeat(4,minmax(145px,1fr)); }
    .demand-search { grid-column: span 2; }
}

@media (max-width: 1050px) {
    .telegram-settings-layout { grid-template-columns: 1fr; }
    .telegram-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stocks-filter-form-valuations,
    .demand-filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stocks-filter-form-valuations .stock-valuation-toggles { grid-column: 1 / -1; }
    .demand-control-grid { grid-template-columns: 1fr; }
    .demand-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .demand-search { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
    .telegram-page-heading { align-items: flex-start; }
    .telegram-settings-card .panel-head { align-items: flex-start; gap: 12px; }
    .telegram-form-grid,.telegram-events,.telegram-side-column,.email-notification-form-grid,.email-payment-events { grid-template-columns: 1fr; }
    .telegram-form-grid .telegram-url-field { grid-column: auto; }
    .telegram-form-actions { align-items: stretch; flex-direction: column; }
    .telegram-form-actions .button { justify-content: center; width: 100%; }
    .email-recipient-add { grid-template-columns: 1fr; }
    .email-recipient-add .button { justify-content: center; width: 100%; }
    .stocks-filter-form-valuations,
    .demand-filter-form,
    .demand-summary { grid-template-columns: 1fr; }
    .stocks-filter-form-valuations .stock-valuation-toggles { grid-template-columns: 1fr; }
    .demand-search { grid-column: auto; }
    .demand-settings-card { align-items: stretch; flex-direction: column; }
    .demand-settings-card label { width: 100%; }
    .demand-settings-card input { flex: 1; }
    .demand-settings-card .button { width: 100%; }
    .demand-filter-actions .button { flex: 1; }
    .demand-product-detail-head { align-items: flex-start; flex-direction: column; }
    .demand-product-detail-head > .button { width: 100%; }
    .demand-detail-summary { grid-template-columns: 1fr; }
}

/* Wide analytical matrices scroll inside their panels and never widen the page. */
.finance-rnp-page .workspace > .container,
.unit-wb-page .workspace > .container,
.rnp-table-panel,
.unit-wb-page .panel,
.rnp-table-scroll,
.unit-table-scroll {
    min-width: 0;
    max-width: 100%;
}
.rnp-table-scroll,
.unit-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    contain: inline-size;
}
.rnp-table-scroll { contain: inline-size layout paint; }

/* Internal product kits. */
.product-kit-summary { min-width: 170px; display: grid; gap: 6px; white-space: normal; }
.product-kit-summary > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.product-kit-summary > div span,.product-kit-summary > div small { max-width: 180px; padding: 4px 6px; overflow: hidden; color: var(--ink); background: var(--soft); border-radius: 6px; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.product-kit-summary > div small { color: var(--muted); }
.product-kit-summary > a { width: fit-content; color: var(--primary); font-size: 9px; font-weight: 800; }
.product-kit-button { color: var(--primary); }
.product-kit-button:hover { background: var(--primary-soft); border-color: color-mix(in srgb,var(--primary) 28%,var(--line)); }
.product-taxonomy[data-product-taxonomy="kit"] summary::before { background: var(--primary); border-radius: 2px; transform: rotate(45deg); }
.product-kit-heading .page-back-link { width: fit-content; margin-top: 9px; display: block; color: var(--primary); font-size: 10px; font-weight: 800; }
.product-kit-layout { display: grid; grid-template-columns: minmax(320px,.72fr) minmax(0,1.28fr); align-items: start; gap: 16px; }
.product-kit-editor,.product-kit-list-panel { min-width: 0; overflow: visible; }
.product-kit-editor { position: sticky; top: 92px; }
.product-kit-form { padding: 18px; }
.product-kit-form .modal-actions { margin-top: 0; padding-top: 4px; }
.product-kit-form .modal-actions .button { width: 100%; }
.product-kit-name-help { margin-top: 6px; display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.product-kit-list { padding: 12px; display: grid; gap: 8px; }
.product-kit-row { min-width: 0; padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: end; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.product-kit-row > form:first-child { min-width: 0; display: grid; grid-template-columns: minmax(150px,1.25fr) minmax(145px,1fr) 105px auto; align-items: end; gap: 8px; }
.product-kit-row label,.product-kit-name { min-width: 0; }
.product-kit-row label > span,.product-kit-name > span { min-height: 14px; margin-bottom: 4px; display: flex; align-items: end; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.product-kit-name strong { min-height: var(--control-height); padding: 0 10px; display: flex; align-items: center; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-kit-row input { width: 100%; height: var(--control-height); min-width: 0; padding: 0 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 11px; }
.product-kit-row .button,.product-kit-row .icon-button { height: var(--control-height); }
.product-kit-row > form:last-child { margin: 0; }

@media (max-width: 1050px) {
    .product-kit-layout { grid-template-columns: 1fr; }
    .product-kit-editor { position: static; }
}
@media (max-width: 760px) {
    .product-kit-row { grid-template-columns: 1fr 34px; align-items: end; }
    .product-kit-row > form:first-child { grid-template-columns: 1fr 1fr; }
    .product-kit-name { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .product-kit-row > form:first-child { grid-template-columns: 1fr; }
    .product-kit-row > form:first-child .button { width: 100%; }
}

.admin-system-settings { max-width: 1180px; }
.admin-system-settings-card {
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(240px,320px) auto;
    align-items: end;
    gap: 20px;
}
.admin-wb-token-categories { grid-column: 1 / -1; margin: 0; padding: 15px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.admin-wb-token-categories legend { width: 100%; padding: 0 0 10px; }
.admin-wb-token-categories legend strong,.admin-wb-token-categories legend small { display: block; }
.admin-wb-token-categories legend strong { font-size: 12px; }
.admin-wb-token-categories legend small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-wb-token-categories > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.admin-wb-token-categories label { min-width: 0; min-height: 48px; padding: 8px 9px; position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 3px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.admin-wb-token-categories input { position: absolute; opacity: 0; pointer-events: none; }
.admin-wb-token-categories .access-check { grid-row: 1 / 3; }
.admin-wb-token-categories input:checked + .access-check { background: var(--primary); border-color: var(--primary); }
.admin-wb-token-categories input:checked + .access-check::before { transform: rotate(-45deg) scale(1); }
.admin-wb-token-categories b,.admin-wb-token-categories small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-wb-token-categories b { font-size: 10px; }
.admin-wb-token-categories small { color: var(--muted); font-size: 8px; }
.admin-wb-token-categories input:focus-visible + .access-check { outline: 3px solid color-mix(in srgb,var(--primary) 30%,transparent); outline-offset: 2px; }
.admin-landing-marketplaces label { grid-template-columns: 18px 32px minmax(0,1fr); }
.admin-landing-marketplaces .landing-marketplace-mark { width: 30px; height: 30px; grid-row: 1 / 3; font-size: 10px; }
.admin-landing-marketplaces b,.admin-landing-marketplaces small { grid-column: 3; }
.admin-password-card { margin-top: 16px; overflow: hidden; }
.admin-password-card .panel-head { padding: 17px 20px; }
.admin-password-fields { padding: 17px 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.admin-password-card .admin-system-settings-actions { padding: 0 20px 18px; align-items: center; justify-content: space-between; }
.admin-password-card .admin-system-settings-actions > span { color: var(--muted); font-size: 10px; }
.account-password-shell { max-width: 900px; }
.account-password-card { max-width: 700px; margin: 0 auto; padding: 20px; }
.account-password-intro { margin-bottom: 17px; display: flex; align-items: center; gap: 11px; }
.account-password-intro > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 11px; font-size: 10px; }
.account-password-intro h2 { margin: 0 0 4px; font-size: 16px; }
.account-password-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.account-password-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-password-fields .field:first-child { grid-column: 1 / -1; }
.account-password-actions { margin-top: 16px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.account-password-actions small { color: var(--muted); font-size: 10px; }
.admin-system-settings-copy { min-width: 0; display: flex; align-items: center; gap: 14px; }
.admin-system-settings-copy > div { min-width: 0; }
.admin-system-settings-copy h2 { margin: 0 0 5px; font-size: 18px; }
.admin-system-settings-copy p { max-width: 660px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.admin-system-settings-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb,var(--primary) 22%,var(--line)); border-radius: 13px; font-size: 20px; font-weight: 900; }
.admin-loading-duration-field { min-width: 0; }
.admin-loading-duration-field input { width: 100%; }
.admin-loading-duration-field small { min-height: 30px; overflow-wrap: anywhere; }
.admin-system-settings-actions { padding-top: 21px; align-self: start; display: flex; align-items: flex-start; }
.admin-system-settings-actions .button { min-height: var(--control-height); white-space: nowrap; }
.admin-ozon-logistics-card { margin-top: 16px; }
.admin-ozon-logistics-file input[type="file"] { height: auto; min-height: var(--control-height); padding: 6px; }
.admin-ozon-logistics-file input[type="file"]::file-selector-button { margin-right: 9px; padding: 7px 10px; color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 7px; font: inherit; font-weight: 800; cursor: pointer; }
.admin-ozon-logistics-status { margin-top: 10px; display: grid; gap: 3px; }
.admin-ozon-logistics-status strong { color: var(--green); font-size: 11px; overflow-wrap: anywhere; }
.admin-ozon-logistics-status span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.admin-ozon-logistics-status.is-missing strong { color: var(--orange); }
.admin-ozon-logistics-file [data-admin-ozon-tariff-state] { line-height: 1.45; }
.admin-ozon-logistics-card.is-error [data-admin-ozon-tariff-state] { color: #dc3d57; }
.admin-ozon-logistics-card.is-uploading { opacity: .72; }
.admin-ozon-logistics-card.is-uploading .button { pointer-events: none; }
@media (max-width: 900px) {
    .admin-system-settings-card { grid-template-columns: minmax(0,1fr) minmax(220px,.7fr); }
    .admin-system-settings-actions { grid-column: 1 / -1; }
    .admin-wb-token-categories > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-password-fields { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .admin-system-settings-card { padding: 16px; grid-template-columns: 1fr; }
    .admin-system-settings-actions { grid-column: auto; padding-top: 0; }
    .admin-system-settings-actions .button { width: 100%; }
    .admin-wb-token-categories > div,.account-password-fields,.pricing-free-limits { grid-template-columns: 1fr; }
    .pricing-free-limits legend { align-items: flex-start; flex-direction: column; }
    .wb-token-check { grid-template-columns: 1fr; }
    .wb-token-check > .button { width: 100%; }
    .wb-token-check-result,.account-password-fields .field:first-child { grid-column: auto; }
    .account-password-actions { align-items: stretch; flex-direction: column; }
    .account-password-actions .button { width: 100%; }
}

/* Shared walkthrough overlay for company sections. */
body.catalog-tour-active { overflow: hidden; }
.catalog-tour-blocker { position: fixed; z-index: 1098; inset: 0; cursor: default; }
.catalog-tour-spotlight {
    box-sizing: border-box;
    position: fixed;
    z-index: 1099;
    border: 2px solid #8b7cff;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(7,11,23,.68);
    pointer-events: none;
    will-change: top,left,width,height,border-radius;
    transition: none;
}
.catalog-tour-card {
    width: min(390px,calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    position: fixed;
    z-index: 1100;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    color: var(--ink);
    background: color-mix(in srgb,var(--surface) 97%,transparent);
    border: 1px solid color-mix(in srgb,var(--primary) 25%,var(--line));
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(5,9,22,.35);
    backdrop-filter: blur(18px);
}
.catalog-tour-card > header { min-height: 52px; padding: 11px 12px 10px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.catalog-tour-card > header span { min-width: 0; overflow: hidden; color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.catalog-tour-card > header button { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 19px; line-height: 1; }
.catalog-tour-progress { height: 3px; overflow: hidden; background: var(--soft); }
.catalog-tour-progress i { width: 25%; height: 100%; display: block; background: linear-gradient(90deg,var(--primary),#8d65ff); border-radius: 0 999px 999px 0; transition: width .24s ease; }
.catalog-tour-copy { min-height: 0; padding: 17px; overflow-y: auto; }
.catalog-tour-copy > small { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.catalog-tour-copy h2 { margin: 6px 0 7px; overflow-wrap: anywhere; font-size: 21px; letter-spacing: -.025em; line-height: 1.18; }
.catalog-tour-copy > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.catalog-tour-copy ul { margin: 14px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.catalog-tour-copy li { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: start; gap: 8px; color: var(--ink); font-size: 11px; line-height: 1.5; }
.catalog-tour-copy li i { width: 22px; height: 22px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 9px; font-style: normal; font-weight: 900; }
.catalog-tour-copy li span { min-width: 0; overflow-wrap: anywhere; }
.catalog-tour-card > footer { padding: 12px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: var(--soft); border-top: 1px solid var(--line); }
.catalog-tour-card > footer .button { width: auto; min-width: 0; white-space: nowrap; }
.catalog-tour-error { min-height: 0; margin: 0; padding: 0 14px; color: var(--red); background: var(--soft); font-size: 10px; font-weight: 750; }
.catalog-tour-error:not(:empty) { padding-bottom: 11px; }
.catalog-tour-card button:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 25%,transparent); outline-offset: 2px; }
html[data-theme="dark"] .catalog-tour-spotlight { box-shadow: 0 0 0 9999px rgba(2,6,14,.76); }

@media (min-width: 1000px) {
    body.catalog-tour-form-step .modal.open { justify-content: flex-start; padding-left: max(24px,calc(50vw - 520px)); }
}
@media (max-width: 560px) {
    .catalog-tour-card { width: calc(100vw - 20px); max-height: min(66vh,560px); border-radius: 15px; }
    .catalog-tour-copy { padding: 14px; }
    .catalog-tour-copy h2 { font-size: 18px; }
    .catalog-tour-card > footer { align-items: stretch; flex-direction: column-reverse; }
    .catalog-tour-card > footer .button { width: 100%; }
}

/* Keep subsection names readable without enlarging descriptions or counters. */
.stocks-section-tabs {
    max-width: 100%;
    overflow-x: auto;
}
.stocks-section-tabs > a,
.fbs-order-tabs > a > span,
.export-subnav > a,
.finance-subnav > a > strong,
.admin-template-subnav > a > strong {
    font-size: 14px;
    line-height: 1.25;
}
.stocks-section-tabs > a { white-space: nowrap; }

/* Order-feed chart is loaded separately so the table remains immediately usable. */
.orders-feed-trend-panel { margin-bottom: 12px; }
.orders-chart-loading,
.orders-chart-load-error {
    min-height: 250px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}
.orders-chart-load-error { color: var(--red); }
.orders-chart-load-error.is-empty { color: var(--muted); }
.orders-chart-legend .is-flat { background: var(--orange); }
.orders-chart-tooltip small.is-improvement { color: #78ddb7; font-weight: 800; }
.orders-chart-tooltip small.is-flat { color: #ffd071; font-weight: 800; }
.orders-chart-drilldown {
    min-height: 52px;
    padding: 9px 15px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
}
.orders-chart-drilldown > span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.orders-chart-drilldown .button { flex: 0 0 auto; }

/* RNP freshness is explicit while a background refresh or stale fallback is shown. */
.stocks-live-state.is-pending i {
    background: var(--orange);
    box-shadow: 0 0 0 4px color-mix(in srgb,var(--orange) 18%,transparent);
}
.stocks-live-state.is-stale i {
    background: var(--red);
    box-shadow: 0 0 0 4px var(--red-soft);
}
.rnp-data-warning {
    margin: 0 0 10px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: color-mix(in srgb,var(--orange) 78%,var(--ink));
    background: color-mix(in srgb,var(--orange) 9%,var(--surface));
    border: 1px solid color-mix(in srgb,var(--orange) 30%,var(--line));
    border-radius: 10px;
    font-size: 11px;
}
.rnp-data-warning strong { color: var(--ink); white-space: nowrap; }
.rnp-value-cell.is-flat { background: color-mix(in srgb,var(--orange) 7%,var(--surface)); }
.finance-chart-stats strong.is-flat { color: #b98700; }
html[data-theme="dark"] .finance-chart-stats strong.is-flat { color: #ffd65a; }

@media (max-width: 620px) {
    .orders-chart-drilldown { align-items: stretch; flex-direction: column; }
    .orders-chart-drilldown .button { width: 100%; }
}

/* ---------- баланс в шапке ---------- */
.balance-header-link { text-decoration: none; }
.balance-header-value { color: var(--primary); font-variant-numeric: tabular-nums; font-weight: 700; }
@media(max-width:760px){ .balance-header-link span { display: none; } }

/* ---------- страница баланса ---------- */
.billing-balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.billing-balance-card { padding: 24px 26px; }
.billing-balance-card > span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.billing-balance-card > strong { display: block; margin: 10px 0 8px; color: var(--ink); font-size: 27px; letter-spacing: -.02em; }
.billing-balance-card > small { color: var(--muted); font-size: 12px; }
.billing-panel-body { padding: 18px 21px; }
.billing-panel-body ul { margin: 0; padding-left: 22px; color: var(--ink); font-size: 13px; line-height: 1.7; }
.billing-panel-body p { margin: 0 0 12px; color: var(--ink); font-size: 13px; line-height: 1.6; }

/* Баннер согласия на куки */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 14px 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(20, 28, 50, .08); }
.cookie-banner-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cookie-banner-inner p { flex: 1 1 320px; margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.cookie-banner-inner p a { color: var(--primary); font-weight: 600; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 640px) {
    .cookie-banner-inner { gap: 10px; }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .button { flex: 1; }
}

/* Раздел «Расчёты» админки */
.calc-group-title { margin: 22px 0 8px; font-size: 15px; letter-spacing: -.01em; color: var(--ink); }
.calc-table td { white-space: normal; }
.calc-desc { display: block; margin-top: 4px; color: #8a92a2; font-size: 11px; line-height: 1.5; }
.calc-value { font-weight: 700; color: var(--primary); }
.calc-badge { display: inline-block; margin-top: 5px; padding: 3px 8px; color: #8a92a2; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-weight: 700; }
.calc-rollback-form { display: inline; margin: 0; }
.calc-formula { display: block; margin-top: 5px; color: #596377; font-size: 11px; line-height: 1.5; }
.calc-example { display: block; margin-top: 3px; color: var(--primary); font-size: 11px; line-height: 1.5; }
.calc-override-badge { display: inline-block; margin: 5px 6px 0 0; padding: 3px 8px; color: #4e5670; background: var(--primary-soft, #eef0ff); border: 1px solid #d9dcf8; border-radius: 6px; font-size: 10px; font-weight: 700; }
.calc-filter { margin-bottom: 18px; }
.calc-filter-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-filter-form .input-wrap { width: 320px; max-width: 100%; }
.calc-filter-note { color: var(--muted); font-size: 12px; }

/* Калькулятор пополнения (billing.html) */
.billing-calc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.billing-calc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--soft); border-radius: 10px; font-size: 13px; }
.billing-calc-row label { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.calc-users-input { width: 72px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* Второе значение в шапке: баланс ИИ */
.balance-header-ai { margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted); }

/* Переключатель Android-уведомлений в настройках компании */
.android-mute-form { display: inline-flex; align-items: center; }
