:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #17212b;
    --muted: #667085;
    --line: #dde3ea;
    --brand: #16856f;
    --brand-dark: #0f6656;
    --danger: #c24135;
    --warn: #b7791f;
    --ok: #16856f;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: inherit; }
.layout {
    min-height: 100vh;
    display: block;
    padding-left: 260px;
}
.sidebar {
    background: #1b2633;
    color: #fff;
    padding: 24px 18px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap:28px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.sidebar-toggle {
    flex:0 0 auto;
    width:34px;
    height:34px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:7px;
    background:rgba(255,255,255,.08);
    color:#fff;
    cursor:pointer;
    font-size:22px;
    line-height:1;
}
.sidebar-toggle:hover { background:rgba(255,255,255,.14); }
.brand { font-weight: 800; font-size: 24px; margin-bottom: 4px; }
.brand-logo {
    display:block;
    width:156px;
    max-width:100%;
    height:auto;
    filter:drop-shadow(0 2px 8px rgba(0,0,0,.22));
}
.domain { color: rgba(255,255,255,.6); font-size: 13px; margin-bottom: 28px; }
.nav { display: grid; gap: 8px; }
.nav a { text-decoration: none; padding: 10px 12px; border-radius: 7px; color: rgba(255,255,255,.82); }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-footer { display:grid; gap:14px; padding: 12px 2px 0; }
.nav-account {
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,.1);
}
.sidebar-legal { display:grid; gap:7px; font-size:12px; line-height:1.3; }
.sidebar-legal a { color: rgba(255,255,255,.58); text-decoration:none; }
.sidebar-legal a:hover { color:#fff; }
.copyright { color: rgba(255,255,255,.46); font-size:12px; }
.content { min-width:0; max-width:100%; padding: 28px; }
.scroll-top-btn {
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:90;
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border:1px solid rgba(16,24,32,.12);
    border-radius:999px;
    background:var(--brand);
    color:#fff;
    box-shadow:0 12px 30px rgba(16,24,32,.22);
    font-size:24px;
    font-weight:800;
    cursor:pointer;
    opacity:0;
    transform:translateY(10px);
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease, background .18s ease;
}
.scroll-top-btn:hover { background:var(--brand-dark); }
.scroll-top-btn.is-visible {
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}
body.sidebar-collapsed .layout { padding-left: 76px; }
body.sidebar-collapsed .sidebar { width:76px; padding: 20px 12px; align-items:center; }
body.sidebar-collapsed .sidebar-head { justify-content:center; }
body.sidebar-collapsed .brand {
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:rgba(255,255,255,.1);
    font-size:0;
    margin:0;
}
body.sidebar-collapsed .brand-logo { display:none; }
body.sidebar-collapsed .brand::before {
    content:"WB";
    font-size:14px;
    font-weight:800;
}
body.sidebar-collapsed .domain,
body.sidebar-collapsed .nav,
body.sidebar-collapsed .sidebar-footer { display:none; }
body.sidebar-collapsed .sidebar-toggle { margin-top:10px; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap: 16px; margin-bottom: 22px; }
.page-title { margin:0; font-size: 28px; }
.muted { color: var(--muted); }
.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.monitor-main-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 1fr) 110px minmax(170px, 1fr) minmax(170px, 1fr) 150px 150px minmax(280px, 1.2fr);
    gap: 12px;
    align-items: start;
}
.panel { min-width:0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.panel h2, .panel h3 { margin: 0 0 14px; }
.btn {
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e8edf2;
    color: var(--text);
}
.btn.primary { background: var(--brand); color: white; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { background: #f8e4e1; color: var(--danger); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}
.actions { display:flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.monitor-control-actions {
    gap:10px;
}
.monitor-control-actions form {
    margin:0;
}
.switch-control {
    width:48px;
    height:28px;
    border:0;
    border-radius:999px;
    padding:3px;
    background:#d6dee7;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    transition:background .18s ease, box-shadow .18s ease;
}
.switch-control span {
    width:22px;
    height:22px;
    border-radius:999px;
    background:#fff;
    box-shadow:0 2px 6px rgba(16,24,32,.22);
    transition:transform .18s ease;
}
.switch-control.is-on {
    background:#16856f;
}
.switch-control.is-on span {
    transform:translateX(20px);
}
.switch-control:hover {
    box-shadow:0 0 0 4px rgba(22,133,111,.12);
}
.icon-danger-btn {
    width:34px;
    height:34px;
    border:0;
    border-radius:7px;
    background:#f8e4e1;
    color:#c7332b;
    display:inline-grid;
    place-items:center;
    cursor:pointer;
    font-size:17px;
    line-height:1;
}
.icon-danger-btn:hover {
    background:#f4cbc6;
    color:#a92a24;
}
.field { display:grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.label-with-help,
.inline-check.with-help {
    display:inline-flex;
    align-items:center;
    gap:7px;
}
.help-tip {
    position:relative;
    flex:0 0 auto;
    display:inline-grid;
    place-items:center;
    width:18px;
    height:18px;
    border-radius:50%;
    background:#e8edf2;
    color:#475467;
    font-size:12px;
    font-weight:800;
    line-height:1;
    cursor:help;
}
.help-tip::after {
    content:attr(data-tip);
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    z-index:30;
    width:min(320px, 80vw);
    transform:translateX(-50%);
    padding:10px 12px;
    border:1px solid #cfd8e3;
    border-radius:7px;
    background:#1b2633;
    color:#fff;
    box-shadow:0 12px 32px rgba(16,24,32,.22);
    font-size:12px;
    font-weight:600;
    line-height:1.4;
    text-align:left;
    white-space:normal;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}
.help-tip::before {
    content:"";
    position:absolute;
    left:50%;
    bottom:calc(100% + 4px);
    z-index:31;
    transform:translateX(-50%);
    border:6px solid transparent;
    border-top-color:#101820;
    opacity:0;
    visibility:hidden;
}
.help-tip:hover::after,
.help-tip:focus::after,
.help-tip:hover::before,
.help-tip:focus::before {
    opacity:1;
    visibility:visible;
}
.help-tip.tip-left::after {
    left:auto;
    right:-8px;
    transform:none;
}
.help-tip.tip-left::before {
    left:auto;
    right:2px;
    transform:none;
}
.help-tip.tip-right::after {
    left:-8px;
    right:auto;
    transform:none;
}
.help-tip.tip-right::before {
    left:2px;
    right:auto;
    transform:none;
}
.form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.settings-locked {
    position: relative;
    margin: 12px 0 14px;
}
.settings-locked fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}
.settings-locked.is-disabled fieldset {
    opacity: .38;
    filter: grayscale(.35);
}
.settings-lock-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 1px dashed #b8c3ce;
    border-radius: 8px;
    background: rgba(248,250,252,.72);
    color: #475467;
    font-weight: 800;
    text-align: center;
    padding: 18px;
    pointer-events: none;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(16,24,32,.48);
}
.modal-backdrop.is-open { display: grid; }
.modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 28px 90px rgba(16,24,32,.28);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.modal-head h2 { margin: 0 0 6px; }
.modal-head h2 .copy-btn {
    margin-left:8px;
    vertical-align:middle;
}
.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: #e8edf2;
    color: var(--text);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
.inline-check { display:inline-flex; align-items:center; gap:8px; font-weight:700; margin-bottom:14px; }
.inline-check input { width:auto; }
.notification-scope-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    margin:0 0 18px;
}
.notification-scope-card {
    display:grid;
    gap:6px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
}
.notification-scope-card strong { color:#101820; }
.notification-scope-card span {
    color:#667085;
    font-size:13px;
    line-height:1.45;
}
.terms-check { display:flex; align-items:flex-start; gap:8px; color:var(--muted); font-size:13px; line-height:1.4; margin: 12px 0 16px; }
.terms-check input { width:auto; margin-top:2px; }
.hp-field { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.tariff-feature-list {
    display:flex;
    flex-wrap:wrap;
    gap:8px 14px;
    margin:4px 0 12px;
}
.tariff-feature-list.compact {
    display:grid;
    gap:6px;
    margin:0;
    min-width:160px;
}
.tariff-feature-list .inline-check { margin:0; font-size:13px; }
.tariff-features-public {
    display:grid;
    gap:6px;
    margin:12px 0 16px;
    color:#344054;
    font-size:14px;
}
.tariff-features-public div::before {
    content:"✓";
    color:var(--brand);
    font-weight:800;
    margin-right:7px;
}
.feature-price-grid,
.tariff-builder-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:12px;
}
.feature-price-card,
.tariff-option-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}
.feature-price-card {
    padding:12px;
}
.feature-price-card .field {
    margin-top:10px;
}
.tariff-builder {
    display:grid;
    gap:16px;
}
.tariff-builder-head {
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
}
.tariff-builder-head h2,
.tariff-builder-head h3 {
    margin:0 0 6px;
}
.tariff-total {
    min-width:220px;
    padding:18px 20px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
    text-align:right;
}
.tariff-total-label {
    display:block;
    color:var(--muted);
    font-size:15px;
    font-weight:700;
}
#tariff-total-price,
.tariff-total strong {
    display:block;
    margin-top:6px;
    font-size:42px;
    line-height:1;
    color:var(--text);
    font-weight:800;
}
.trial-choice-card {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    border:1px solid #a8e6cf;
    border-radius:8px;
    background:#f0fbf6;
    padding:18px;
}
.trial-choice-card h2,
.trial-choice-card h3 {
    margin:0 0 6px;
}
.trial-choice-card p {
    margin:0;
}
.module-chip-list {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.module-chip-list span {
    display:inline-flex;
    align-items:center;
    min-height:24px;
    border:1px solid #cfe9e3;
    border-radius:999px;
    padding:4px 9px;
    background:#f1fbf8;
    color:#175f52;
    font-size:12px;
    font-weight:800;
}
.admin-user-access-form {
    display:grid;
    gap:10px;
    min-width:280px;
}
.admin-user-access-head {
    display:flex;
    gap:8px;
    align-items:end;
    flex-wrap:wrap;
}
.admin-user-access-head label {
    display:grid;
    gap:5px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}
.admin-user-access-head input {
    width:96px;
    padding:7px 9px;
}
.admin-user-feature-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(120px, 1fr));
    gap:6px 10px;
}
.admin-user-feature-grid .inline-check {
    margin:0;
    font-size:12px;
}
.tariff-builder-actions {
    margin:0;
}
.tariff-option-card {
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    align-items:flex-start;
    padding:14px;
    transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tariff-option-card:hover {
    border-color:rgba(13, 148, 136, .5);
    box-shadow:0 8px 24px rgba(15,23,42,.08);
}
.tariff-option-card:has(input:checked) {
    border-color:var(--brand);
    background:#ecfdf5;
    box-shadow:0 0 0 2px rgba(13, 148, 136, .12);
}
.tariff-option-card.is-owned {
    border-color:#b7e4d2;
    background:#f0fbf6;
}
.tariff-option-card.is-owned .tariff-option-main {
    cursor:default;
}
.tariff-option-card.is-owned input {
    opacity:.7;
}

.feature-upsell-panel {
    margin-bottom: 16px;
    border-color: rgba(13, 148, 136, 0.28);
    background: linear-gradient(180deg, #f4fffb 0%, #ffffff 100%);
}
.feature-upsell-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px;
    gap: 16px;
    align-items: stretch;
    margin-top: 14px;
}
.feature-upsell-grid h3 {
    margin: 0 0 8px;
    font-size: 16px;
}
.feature-upsell-grid ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}
.feature-upsell-grid li + li {
    margin-top: 6px;
}
.feature-upsell-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.feature-upsell-price span,
.feature-upsell-price em {
    color: var(--muted);
    font-style: normal;
}
.feature-upsell-price strong {
    font-size: 30px;
    line-height: 1.1;
}
.tariff-option-card input {
    width:auto;
    margin-top:3px;
}
.tariff-option-main {
    display:flex;
    gap:12px;
    align-items:flex-start;
    min-width:0;
    cursor:pointer;
}
.tariff-option-main span {
    display:grid;
    gap:4px;
}
.tariff-option-card em {
    color:var(--muted);
    font-style:normal;
    font-size:13px;
}
.feature-info-btn {
    width:28px;
    height:28px;
    border:1px solid #cfd8e3;
    border-radius:999px;
    background:#eef3f7;
    color:#475467;
    font-weight:900;
    cursor:pointer;
    line-height:1;
}
.feature-info-btn:hover {
    border-color:var(--brand);
    color:var(--brand);
    background:#e8fbf3;
}
.feature-modal-card {
    width:min(720px, 100%);
}
.feature-modal-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}
.feature-modal-grid section {
    border:1px solid var(--line);
    border-radius:8px;
    padding:14px;
    background:#f8fafc;
}
.feature-modal-grid h3 {
    margin:0 0 10px;
    font-size:16px;
}
.feature-modal-grid ul {
    margin:0;
    padding-left:20px;
}
.feature-modal-grid li {
    margin:7px 0;
    line-height:1.45;
}
.api-rights-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:10px;
    margin-top:14px;
}
.api-rights-grid div {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:12px;
}
.api-rights-grid strong {
    display:block;
    margin-bottom:6px;
}
.api-rights-grid ul {
    margin:0;
    padding-left:18px;
}
.api-rights-grid li {
    margin:5px 0;
    color:#475467;
    line-height:1.35;
}
.legal-page { max-width: 980px; margin: 0 auto; line-height: 1.6; }
.legal-page h1 { margin-top:0; font-size:32px; }
.legal-page h2 { margin-top:28px; }
.legal-page ul, .legal-page ol { padding-left:24px; }
.legal-meta { color:var(--muted); margin-bottom:18px; }
.legal-links { display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; font-size:13px; color:var(--muted); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}
.time-row {
    display: inline-grid;
    grid-template-columns: 132px 62px 62px auto;
    gap: 6px;
    align-items: center;
    max-width: 330px;
}
.time-row input,
.time-row select {
    width: auto;
    min-width: 0;
}
.time-row input,
.time-row select,
.time-row .btn {
    padding: 9px 10px;
}
textarea { min-height: 110px; resize: vertical; }
.auth-shell { min-height: 100vh; display:grid; place-items:center; padding: 24px; background: linear-gradient(180deg, #eef5f3, #f8fafc); }
.auth-card { width: min(440px, 100%); background:#fff; border:1px solid var(--line); border-radius:8px; padding:28px; }
.auth-card h1 { margin:0 0 6px; }
.error { background:#fde8e5; color: var(--danger); border:1px solid #f5b8b1; padding:10px 12px; border-radius:7px; margin-bottom:14px; }
.status { display:inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status.ok { background:#dff7ee; color: var(--ok); }
.status.warn { background:#fff4d8; color: var(--warn); }
.status.off { background:#eceff3; color:#667085; }
.monitor-event-table .monitor-event-row.event-alert {
    background:#e8fbf3;
}
.monitor-event-table .monitor-event-row.event-alert td {
    border-bottom-color:#bdebdc;
}
.monitor-event-table .monitor-event-row.event-error {
    background:#fff4f2;
}
.monitor-event-table .monitor-event-row.event-error td {
    border-bottom-color:#ffd6d0;
}
.event-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:24px;
    padding:4px 9px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}
.event-badge.alert {
    background:#16856f;
    color:#fff;
}
.event-badge.error {
    background:#f8e4e1;
    color:#c7332b;
}
.event-badge.check {
    background:#eef3f7;
    color:#475467;
}
.event-badge.info {
    background:#edf1f4;
    color:#667085;
}
.reviews-settings-panel {
    margin-bottom:16px;
}
.review-settings-card {
    width:min(860px, 100%);
}
.review-switches {
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    align-items:center;
    margin:4px 0 14px;
}
.review-rating-threshold-field {
    min-width:220px;
    margin:0;
}
.review-auto-toggle {
    display:flex;
    align-items:center;
    gap:12px;
    margin:16px 0 10px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#f8fafc;
}
.prompt-help-row {
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-top:6px;
}
textarea.prompt-example::placeholder {
    color:#98a2b3;
    opacity:1;
}
.review-list {
    display:grid;
    gap:14px;
}
.review-card {
    border:1px solid var(--line);
    border-radius:8px;
    padding:16px;
    background:#fff;
}
.review-card-head {
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.review-title-row {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.review-title-row strong {
    font-size:17px;
}
.review-meta {
    margin-top:5px;
    font-size:13px;
}
.review-body-grid {
    display:grid;
    grid-template-columns:minmax(260px, 1fr) minmax(320px, 1.2fr);
    gap:14px;
    margin-top:14px;
}
.review-text-box {
    border:1px solid var(--line);
    border-radius:8px;
    padding:14px;
    background:#f8fafc;
}
.review-text-box h3 {
    margin:0 0 10px;
    font-size:16px;
}
.review-text-box p {
    white-space:pre-wrap;
    margin:8px 0 0;
}
.review-answer-label {
    display:block;
    font-weight:800;
    margin-bottom:8px;
}
.review-answer-actions {
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
    margin-top:8px;
    flex-wrap:wrap;
}
.review-status-badge,
.send-mode-badge {
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:4px 10px;
    font-size:12px;
    font-weight:800;
}
.badge-new { color:#245fbd; background:rgba(45,108,223,.12); }
.badge-pending { color:#8a6100; background:rgba(245,197,66,.18); }
.badge-ready { color:#0f6656; background:#e8fbf3; }
.badge-sent { color:#16794c; background:rgba(46,204,113,.16); }
.badge-error { color:#c7332b; background:#f8e4e1; }
.badge-skipped { color:#667085; background:#eef3f7; }
.send-mode-badge {
    color:#0b7285;
    background:rgba(11,114,133,.11);
}
.review-stars {
    color:#d79b00;
    letter-spacing:1px;
    font-weight:900;
}
.error-inline {
    color:var(--danger);
    font-size:13px;
}
.empty-state {
    padding:18px;
    border:1px dashed var(--line);
    border-radius:8px;
    color:var(--muted);
    background:#f8fafc;
}
#review-new-banner {
    display:none;
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:110;
    background:#16856f;
    color:white;
    border-radius:8px;
    box-shadow:0 18px 55px rgba(16,24,32,.22);
    padding:14px 18px;
    min-width:280px;
    max-width:380px;
    cursor:pointer;
}
#review-new-banner strong {
    display:block;
    margin-bottom:4px;
}
#review-new-banner span {
    font-size:13px;
    opacity:.9;
}
.monitor-card { display:grid; gap: 10px; }
.monitor-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { background:#eef3f7; border:1px solid var(--line); border-radius:999px; padding:4px 9px; font-size:12px; }
.notice { padding: 12px 14px; border-radius: 7px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.notice.ok { border-color: #a8e6cf; background: #e8fbf3; color: #0f6656; }
.notice.error { border-color: #f5b8b1; background: #fde8e5; color: var(--danger); }
.warehouse-picker { position: relative; z-index: 20; }
.warehouse-select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    padding: 6px 40px 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    cursor: text;
    position: relative;
}
.warehouse-select:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 133, 111, .12);
}
.warehouse-select:after {
    content: "⌄";
    position: absolute;
    right: 14px;
    top: 10px;
    color: var(--muted);
    font-size: 18px;
}
.warehouse-search-input {
    border: 0;
    outline: 0;
    padding: 6px 4px;
    min-width: 260px;
    flex: 1;
}
.warehouse-search-input:focus { box-shadow: none; }
.warehouse-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    max-height: 320px;
    overflow: auto;
    display: none;
    box-shadow: 0 18px 45px rgba(16, 24, 32, .18);
}
.warehouse-dropdown.is-open { display: block; }
.warehouse-filterbar {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:8px;
}
.warehouse-filter {
    border:1px solid var(--line);
    background:#fff;
    color:var(--muted);
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}
.warehouse-filter.is-active {
    background:#e8fbf3;
    border-color:#a8e6cf;
    color:#0f6656;
}
.warehouse-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}
.warehouse-item:hover { background: #eef3f7; }
.warehouse-item input { width: auto; }
.warehouse-item.is-checked { background: #e8fbf3; color: #0f6656; font-weight: 700; }
.selected-warehouse {
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#e8fbf3;
    border:1px solid #a8e6cf;
    color:#0f6656;
    border-radius:999px;
    padding:5px 9px;
    font-size:12px;
    font-weight:700;
}
.selected-warehouse button {
    border:0;
    background:transparent;
    color:#0f6656;
    cursor:pointer;
    font-weight:800;
    padding:0;
}
.warehouse-helper { display:flex; justify-content:space-between; gap:10px; margin-top:7px; font-size:12px; }
.warehouse-clear { border:0; background:transparent; color:var(--brand); cursor:pointer; padding:0; font-weight:700; }
.settings-warehouses-head {
    margin-bottom:12px;
    align-items:flex-start;
}
.settings-warehouses-counter {
    display:grid;
    gap:4px;
    justify-items:end;
    white-space:nowrap;
}
.favorite-toolbar {
    display:grid;
    grid-template-columns:minmax(280px, 1fr) auto auto;
    gap:10px;
    align-items:center;
    margin-bottom:10px;
}
.favorite-filterbar {
    margin:0;
    justify-content:flex-start;
}
.favorite-bulk-actions {
    display:flex;
    gap:8px;
    justify-content:flex-end;
}
.favorite-warehouse-list {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:6px;
    max-height:420px;
    overflow-y:auto;
    overflow-x:hidden;
    border:1px solid var(--line);
    border-radius:8px;
    padding:10px;
    background:#fbfcfd;
}
.favorite-warehouse-row {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    min-height:32px;
    margin:0 0 6px;
    padding:7px 9px;
    border-radius:6px;
    background:#fff;
    border:1px solid transparent;
    cursor:pointer;
    font-size:13px;
    break-inside:avoid;
}
.favorite-warehouse-row:hover { background:#eef3f7; }
.favorite-warehouse-row:has(input:checked) {
    background:#e8fbf3;
    border-color:#a8e6cf;
    color:#0f6656;
    font-weight:700;
}
.favorite-warehouse-row input { width:auto; }
.stock-gap-filterbar { margin-top:6px; }
.table { width:100%; border-collapse: collapse; }
.table th, .table td { border-bottom:1px solid var(--line); padding:10px; text-align:left; vertical-align:top; }
.table th { color: var(--muted); font-size:13px; }
.table-scroll {
    width:100%;
    max-width:100%;
    max-height:none;
    overflow:visible;
    border:1px solid var(--line);
    border-radius:8px;
}
.stock-table-scroll {
    overflow:visible;
    background:#fff;
}
.stock-toolbar {
    display:grid;
    grid-template-columns: minmax(210px, 1fr) 150px 170px minmax(260px, 1.2fr) auto;
    gap:12px;
    align-items:start;
    margin-bottom:16px;
}
.stock-submit-field { align-self:end; }
.stock-actions-panel {
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
}
.stock-actions-panel form { margin:0; }
.stock-settings-card { width:min(560px, 100%); }
.stock-settings-card {
    overflow-x:hidden;
}
.stock-alert-settings .inline-check {
    margin:0 0 6px;
    font-size:13px;
}
.forecast-options {
    margin: 4px 0 12px;
}
.forecast-options.is-disabled {
    opacity:.45;
    filter:grayscale(.25);
}
.forecast-options.is-disabled input,
.forecast-options.is-disabled select {
    cursor:not-allowed;
}
.forecast-wide {
    grid-column: 1 / -1;
    align-items:flex-start;
    line-height:1.35;
}
.stock-summary {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap:12px;
    margin-bottom:16px;
}
.stock-summary .panel { display:grid; gap:8px; }
.stock-summary span { color:var(--muted); font-size:13px; font-weight:700; }
.stock-summary strong { font-size:28px; }
.stock-table-head {
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
    margin-bottom:14px;
}
.stock-table-head h2 { margin-bottom:0; }
.stock-meta-line { margin:8px 0 0; font-size:13px; }
.stock-live-search {
    width:min(420px, 100%);
    margin-bottom:0;
}
.stock-status-filters {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 14px;
}
.stock-status-filter {
    border:1px solid var(--line);
    background:#fff;
    color:#475467;
    border-radius:999px;
    padding:7px 11px;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
}
.stock-status-filter:hover {
    background:#eef3f7;
}
.stock-status-filter.is-active {
    background:#101820;
    border-color:#101820;
    color:#fff;
}
.stock-gap-launch {
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:16px;
}
.stock-gap-card {
    width:min(1100px, calc(100vw - 32px));
}
.stock-gap-form {
    width:min(420px, 100%);
    margin-bottom:14px;
}
.stock-gap-form .field {
    margin-bottom:0;
}
.stock-gap-summary {
    margin: 4px 0 12px;
    color:var(--muted);
    font-weight:700;
}
.stock-gap-scroll {
    max-height:58vh;
    overflow:auto;
}
.stock-gap-table {
    table-layout:fixed;
}
.stock-gap-table th,
.stock-gap-table td {
    vertical-align:top;
    border-right:1px solid #edf1f4;
}
.stock-gap-table th:last-child,
.stock-gap-table td:last-child {
    border-right:0;
}
.stock-gap-table th:nth-child(1), .stock-gap-table td:nth-child(1) { width:30%; }
.stock-gap-table th:nth-child(2), .stock-gap-table td:nth-child(2) { width:14%; }
.stock-gap-table th:nth-child(3), .stock-gap-table td:nth-child(3) { width:38%; }
.stock-gap-table th:nth-child(4), .stock-gap-table td:nth-child(4) { width:18%; }
.stock-table {
    width:100%;
    min-width:0;
    table-layout:fixed;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
}
.stock-table th {
    position:sticky;
    top:0;
    z-index:8;
    background:#f8fafc;
    border-bottom:1px solid var(--line);
    border-right:1px solid var(--line);
    padding:11px 12px;
    font-size:12px;
    text-transform:none;
    box-shadow:0 1px 0 rgba(16,24,32,.04);
}
.stock-table td {
    padding:12px;
    border-bottom:1px solid #edf1f4;
    border-right:1px solid #edf1f4;
    line-height:1.35;
    overflow-wrap:anywhere;
}
.stock-table th:last-child,
.stock-table td:last-child { border-right:0; }
.stock-table th:nth-child(1), .stock-table td:nth-child(1) { width:22%; }
.stock-table th:nth-child(2), .stock-table td:nth-child(2) { width:18%; }
.stock-table th:nth-child(3), .stock-table td:nth-child(3) { width:7%; text-align:center; }
.stock-table th:nth-child(4), .stock-table td:nth-child(4) { width:6%; }
.stock-table th:nth-child(5), .stock-table td:nth-child(5) { width:13%; }
.stock-table th:nth-child(6), .stock-table td:nth-child(6) { width:17%; }
.stock-table th:nth-child(7), .stock-table td:nth-child(7) { width:17%; }
.stock-table tr.stock-zero { background:#fff4f2; }
.stock-table tr.stock-low { background:#fffaf0; }
.stock-product-title {
    font-weight:800;
    color:#101820;
    margin-bottom:4px;
}
.copyable-title {
    display:flex;
    align-items:flex-start;
    gap:6px;
    min-width:0;
}
.copyable-title .stock-product-title,
.copyable-title .stock-product-link {
    min-width:0;
}
.copy-btn {
    flex:0 0 auto;
    display:inline-grid;
    place-items:center;
    width:24px;
    height:24px;
    border:1px solid #dde3ea;
    border-radius:6px;
    background:#f8fafc;
    color:#667085;
    cursor:pointer;
    font-size:14px;
    line-height:1;
    font-weight:800;
}
.copy-btn:hover {
    border-color:rgba(22,133,111,.42);
    color:var(--brand);
    background:#e8fbf3;
}
.copy-btn.is-copied {
    border-color:#16856f;
    background:#16856f;
    color:#fff;
}
.stock-product-link {
    border:0;
    background:transparent;
    padding:0;
    margin:0 0 4px;
    color:#101820;
    font:inherit;
    font-weight:800;
    text-align:left;
    cursor:pointer;
    text-decoration:underline;
    text-decoration-color:rgba(22,133,111,.35);
    text-underline-offset:3px;
}
.stock-product-link:hover {
    color:var(--brand);
    text-decoration-color:var(--brand);
}
.stock-product-subtitle {
    color:#667085;
    font-size:13px;
}
.stock-code-line {
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
    color:#344054;
    font-size:13px;
    line-height:1.45;
    white-space:nowrap;
}
.stock-code-line span {
    flex:0 0 58px;
    color:#667085;
}
.stock-code-line strong {
    min-width:0;
    font-weight:500;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.stock-code-line .copy-btn {
    width:20px;
    height:20px;
    font-size:12px;
}
.seller-article-line {
    display:inline-flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    max-width:100%;
    margin:3px 0;
    padding:5px 7px;
    border:1px solid rgba(22,133,111,.28);
    border-left:4px solid var(--brand);
    border-radius:8px;
    background:#e8fbf3;
    color:#0f6656;
    font-size:13px;
    line-height:1.35;
    vertical-align:top;
}
.seller-article-line span {
    flex:0 0 auto;
    color:#0f6656;
    font-size:11px;
    font-weight:900;
    letter-spacing:0;
    text-transform:uppercase;
}
.seller-article-line strong {
    min-width:0;
    max-width:260px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#101820;
    font-weight:900;
}
.seller-article-line em {
    flex:0 0 auto;
    padding:2px 6px;
    border-radius:999px;
    background:#fff;
    color:#475467;
    font-size:12px;
    font-style:normal;
    font-weight:800;
}
.seller-article-line .copy-btn {
    width:20px;
    height:20px;
    font-size:12px;
    background:#fff;
}
.seller-article-line--small {
    padding:4px 6px;
    font-size:12px;
}
.seller-article-line--modal {
    align-self:start;
}
.stock-threshold-form {
    display:block;
    width:64px;
    max-width:100%;
}
.stock-threshold-form input {
    padding:7px 8px;
    text-align:center;
}
.stock-threshold-note {
    margin-top:5px;
    font-size:12px;
}
.stock-amount {
    display:inline-flex;
    min-width:54px;
    justify-content:center;
    border-radius:999px;
    padding:6px 10px;
    background:#eef3f7;
    font-weight:800;
}
.stock-amount.warn { background:#fff4d8; color:var(--warn); }
.stock-amount.danger { background:#fde8e5; color:var(--danger); }
.stock-amount.incoming { background:#e8fbf3; color:var(--brand-dark); }

.orders-actions-panel {
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:12px;
}
.orders-actions-row {
    display:flex;
    align-items:center;
    gap:10px;
}
.orders-settings-card {
    max-width:620px;
}
.orders-modal-grid {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    margin-top:12px;
}
.settings-checks {
    display:grid;
    gap:10px;
    margin-top:14px;
}
.checkline {
    display:flex;
    align-items:center;
    gap:10px;
    margin:0;
    color:var(--text);
    font-weight:600;
    line-height:1.35;
}
.checkline input[type="checkbox"] {
    flex:0 0 auto;
    width:16px;
    height:16px;
    margin:0;
}
.orders-settings-form {
    display:grid;
    grid-template-columns:minmax(240px, 1fr) 150px 170px auto;
    gap:12px;
    align-items:end;
}
.product-actions-panel {
    display:flex;
    align-items:center;
    gap:10px;
}
.product-settings-card {
    max-width:560px;
}
.products-filter-panel {
    display:flex;
    align-items:end;
    justify-content:flex-end;
    gap:12px;
    flex-wrap:wrap;
    width:min(720px, 100%);
}
.products-category-field {
    width:min(260px, 100%);
    margin:0;
}
.products-table th:nth-child(1),
.products-table td:nth-child(1) {
    width:34%;
}
.products-table th:nth-child(2),
.products-table td:nth-child(2) {
    width:34%;
}
.products-table th:nth-child(3),
.products-table td:nth-child(3) {
    width:14%;
}
.products-table th:nth-child(4),
.products-table td:nth-child(4) {
    width:18%;
}
.products-table td {
    vertical-align:top;
}
.finance-upload-form {
    display:grid;
    grid-template-columns:minmax(240px, 1.4fr) minmax(200px, 1fr) 150px 150px 190px auto;
    gap:12px;
    align-items:end;
}
.finance-upload-actions {
    display:flex;
    align-items:end;
}
.finance-report-tabs {
    padding:12px;
}
.finance-report-list-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin-bottom:12px;
}
.finance-report-list-head h2 {
    margin:0 0 4px;
}
.finance-report-list-head > span {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:32px;
    height:32px;
    padding:0 10px;
    border-radius:999px;
    background:#e8eef5;
    color:var(--muted);
    font-weight:800;
}
.finance-report-list {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
    gap:10px;
    max-height:260px;
    overflow:auto;
    padding-right:4px;
}
.finance-report-link {
    display:grid;
    gap:4px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:var(--text);
    text-decoration:none;
}
.finance-report-link-main,
.finance-report-link-meta {
    display:grid;
    gap:3px;
}
.finance-report-link span,
.finance-report-link em {
    color:var(--muted);
    font-size:12px;
    font-style:normal;
}
.finance-report-link-meta b {
    color:var(--text);
    font-size:13px;
}
.finance-report-link.is-active {
    border-color:var(--brand);
    box-shadow:0 0 0 2px rgba(13, 148, 136, .12);
}
.finance-report-head {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    margin:18px 0 12px;
}
.finance-report-head h2 {
    margin:0 0 4px;
}
.finance-report-actions {
    display:flex;
    align-items:center;
    gap:8px;
}
.finance-settings-card {
    max-width:680px;
}
.finance-settings-grid {
    grid-template-columns:1.2fr 1fr 1fr 1fr;
}
.modal-actions {
    display:flex;
    gap:8px;
    align-items:center;
    margin-top:16px;
}
.finance-summary .panel.is-danger strong,
.finance-profit.is-negative {
    color:var(--danger);
}
.finance-summary {
    grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
}
.finance-summary strong {
    font-size:24px;
}
.finance-summary .panel small {
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}
.finance-expense-note {
    display:flex;
    flex-wrap:wrap;
    gap:10px 18px;
    align-items:center;
}
.finance-calculation-note {
    margin:8px 0 14px;
    padding:10px 12px;
    border-left:3px solid var(--brand);
    background:#eefbf8;
    color:#315b55;
    font-size:13px;
}
.finance-zero-warning {
    display:inline-flex;
    width:max-content;
    max-width:100%;
    border-radius:999px;
    padding:4px 8px;
    background:#fff4d8;
    color:#946200;
    font-size:12px;
    font-weight:800;
}
.finance-table th:nth-child(1),
.finance-table td:nth-child(1) {
    width:30%;
}
.finance-table th:nth-child(2),
.finance-table td:nth-child(2) {
    width:20%;
}
.finance-table th:nth-child(3),
.finance-table td:nth-child(3) {
    width:20%;
}
.finance-table th:nth-child(4),
.finance-table td:nth-child(4) {
    width:15%;
}
.finance-table th:nth-child(5),
.finance-table td:nth-child(5) {
    width:15%;
}
.finance-table td {
    vertical-align:top;
}
.finance-zero-cost {
    background:#fffaf0;
}
.finance-cost,
.finance-profit {
    font-size:18px;
    font-weight:900;
}
.finance-cost.is-zero {
    color:#946200;
}
.finance-cost-form {
    display:grid;
    grid-template-columns:minmax(92px, 120px) auto;
    gap:7px 8px;
    align-items:center;
    margin-bottom:7px;
}
.finance-cost-form .product-cost-input-wrap {
    width:100%;
}
.finance-cost-form .btn {
    justify-self:start;
}
.finance-save-catalog {
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    color:var(--muted);
    font-size:11px;
    font-weight:600;
    white-space:nowrap;
}
.finance-save-catalog input {
    width:15px;
    height:15px;
    margin:0;
}
.finance-cost-form small {
    grid-column:1 / -1;
    min-height:14px;
    font-size:11px;
}
.finance-cost-form small.is-ok {
    color:var(--brand);
}
.finance-cost-form small.is-error {
    color:var(--danger);
}
.icon-btn {
    border:0;
    border-radius:8px;
    min-width:40px;
    min-height:40px;
    cursor:pointer;
    font-size:18px;
    background:#eef3f7;
}
.icon-btn.danger {
    background:#fde8e5;
    color:var(--danger);
}
.product-cost-form {
    display:grid;
    gap:5px;
    width:128px;
    max-width:100%;
}
.product-cost-input-wrap {
    display:flex;
    align-items:center;
    width:118px;
    max-width:100%;
    border:1px solid #d7e0ea;
    border-radius:7px;
    background:#fff;
    overflow:hidden;
}
.product-cost-input-wrap input {
    min-width:0;
    width:100%;
    border:0;
    padding:8px 8px;
    font-weight:800;
    background:transparent;
}
.product-cost-input-wrap input:focus {
    outline:none;
}
.product-cost-input-wrap:focus-within {
    border-color:var(--brand);
    box-shadow:0 0 0 3px rgba(22,133,111,.12);
}
.product-cost-input-wrap span {
    flex:0 0 auto;
    padding:0 8px 0 2px;
    color:#667085;
    font-weight:800;
}
.product-cost-form small {
    min-height:15px;
    color:#667085;
    font-size:11px;
}
.product-cost-form small.is-ok {
    color:var(--brand);
}
.product-cost-form small.is-error {
    color:var(--danger);
}
.orders-summary {
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px;
    margin-bottom:16px;
}
.orders-summary .panel span {
    display:block;
    color:var(--muted);
    font-weight:800;
    margin-bottom:8px;
}
.orders-summary .panel strong {
    font-size:30px;
}
.orders-toolbar {
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
    margin-bottom:18px;
}
.orders-filter-panel {
    display:grid;
    gap:12px;
    min-width:0;
    flex:1 1 auto;
}
.orders-filter-tabs {
    display:inline-flex;
    flex-wrap:wrap;
    gap:6px;
    padding:6px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
    width:max-content;
    max-width:100%;
}
.orders-filter-tab {
    border:0;
    border-radius:7px;
    padding:8px 12px;
    background:transparent;
    color:#475467;
    cursor:pointer;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    gap:7px;
}
.orders-filter-tab span {
    min-width:22px;
    height:22px;
    display:inline-grid;
    place-items:center;
    border-radius:999px;
    background:#e8edf2;
    color:#344054;
    font-size:12px;
}
.orders-filter-tab:hover {
    background:#eef3f7;
}
.orders-filter-tab.is-active {
    background:#101820;
    color:#fff;
}
.orders-filter-tab.is-active span {
    background:rgba(255,255,255,.18);
    color:#fff;
}
.orders-warehouse-field {
    max-width:360px;
    margin:0;
}
.orders-search-field {
    width:min(360px, 100%);
    margin:0;
}
.orders-feed {
    display:grid;
    gap:10px;
}
.order-card {
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:14px;
}
.order-card.is-cancel {
    background:#fff4f2;
    border-color:#f5c7c0;
}
.order-card-main {
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
}
.order-title {
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:4px;
}
.order-title strong {
    font-size:18px;
}
.order-product-subtitle:empty {
    display:none;
}
.order-code-list {
    display:grid;
    gap:4px;
    margin-top:8px;
}
.order-code-line {
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
    color:#475467;
    font-size:13px;
}
.order-code-line span {
    color:#667085;
    font-weight:800;
}
.order-code-line strong {
    color:#17212b;
    font-weight:700;
}
.order-source {
    display:inline-flex;
    align-items:center;
    min-height:24px;
    border-radius:999px;
    padding:3px 9px;
    font-size:12px;
    font-weight:800;
    background:#eef3f7;
    color:#344054;
}
.order-source.fbo {
    background:#e8fbf3;
    color:#0f6656;
}
.order-source.fbs {
    background:#eef2ff;
    color:#3538a8;
}
.order-status-block {
    display:grid;
    gap:6px;
    justify-items:end;
    text-align:right;
}
.order-status {
    display:inline-flex;
    border-radius:999px;
    padding:4px 10px;
    background:#eef3f7;
    color:#344054;
    font-size:12px;
    font-weight:800;
}
.order-status.cancel {
    background:#f8e4e1;
    color:var(--danger);
}
.order-meta-grid {
    display:grid;
    grid-template-columns:1fr 1.3fr 1.1fr 1fr;
    gap:10px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid #edf1f4;
}
.order-meta-grid span {
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    margin-bottom:3px;
}
.order-meta-grid strong {
    font-weight:700;
}
.stock-warehouses { display:flex; flex-wrap:wrap; gap:5px; }
.stock-warehouses span {
    border:1px solid var(--line);
    border-radius:999px;
    padding:3px 7px;
    background:#fff;
    font-size:12px;
}
.stock-movements span {
    background:#f8fafc;
    color:#475467;
}
.stock-incoming span {
    background:#f0fbf6;
    color:#0f6656;
    border-color:#a8e6cf;
}
.stock-location-title {
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    margin-bottom:5px;
}
.stock-location-title.with-gap { margin-top:10px; }
.stock-empty {
    color:#98a2b3;
    font-size:13px;
}
.stock-supplies-details {
    margin-top:8px;
    color:var(--muted);
    font-size:12px;
}
.stock-supplies-details summary {
    cursor:pointer;
    font-weight:800;
    margin-bottom:6px;
}
.stock-forecast-risk {
    display:inline-flex;
    margin-top:8px;
    border-radius:999px;
    padding:4px 8px;
    background:#fff4d8;
    color:var(--warn);
    font-size:12px;
    font-weight:800;
}
.stock-product-card {
    width:min(980px, calc(100vw - 32px));
}
.stock-product-metrics {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
    gap:10px;
    margin-bottom:16px;
}
.stock-product-metric {
    display:grid;
    gap:5px;
    min-width:0;
    padding:12px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
}
.stock-product-metric span {
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}
.stock-product-metric strong {
    font-size:22px;
}
.stock-product-metric em {
    color:var(--muted);
    font-size:12px;
    font-style:normal;
}
.stock-product-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
}
.stock-product-grid section,
.stock-product-section {
    min-width:0;
    padding:14px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}
.stock-product-grid h3,
.stock-product-section h3 {
    margin:0 0 10px;
    font-size:15px;
}
.stock-product-chips {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.stock-product-chips span,
.stock-product-codes span {
    display:inline-flex;
    gap:5px;
    align-items:center;
    max-width:100%;
    padding:5px 8px;
    border:1px solid #cfe9e3;
    border-radius:999px;
    background:#f1fbf8;
    color:#175f52;
    font-size:12px;
}
.stock-product-section {
    margin-top:12px;
}
.stock-product-list {
    display:grid;
    gap:8px;
}
.stock-product-list div {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:8px 0;
    border-bottom:1px solid #edf1f4;
}
.stock-product-list div:last-child { border-bottom:0; }
.stock-product-list span {
    color:var(--muted);
}
.stock-product-codes {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.home-page { background:#f5f7f8; }
.home-hero {
    min-height: 92vh;
    position: relative;
    display:grid;
    align-items:center;
    overflow:hidden;
    padding: 88px 0 72px;
    background:
        linear-gradient(90deg, rgba(245,247,248,.99) 0%, rgba(245,247,248,.94) 38%, rgba(245,247,248,.56) 72%, rgba(245,247,248,.32) 100%),
        url("https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&w=1800&q=82") center/cover;
}
.home-topline {
    position:absolute;
    top:28px;
    left:72px;
    right:72px;
    z-index:2;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.home-logo { display:flex; align-items:center; }
.home-logo-img {
    display:block;
    width:154px;
    max-width:100%;
    height:auto;
}
.home-nav { display:flex; gap:8px; align-items:center; }
.home-nav a {
    text-decoration:none;
    color:#101820;
    font-weight:800;
    background:rgba(255,255,255,.76);
    border:1px solid rgba(221,227,234,.9);
    border-radius:999px;
    padding:9px 14px;
}
.home-nav a:hover { background:#fff; }
.home-hero-inner {
    position:relative;
    z-index:2;
    width:min(1180px, calc(100% - 64px));
    margin:0 auto;
    display:grid;
    grid-template-columns:minmax(0, 1fr) 390px;
    gap:64px;
    align-items:center;
}
.home-copy { max-width: 760px; }
.home-kicker {
    display:inline-flex;
    align-items:center;
    min-height:30px;
    border:1px solid rgba(22,133,111,.22);
    border-radius:999px;
    padding:6px 12px;
    color:var(--brand-dark);
    background:rgba(232,251,243,.86);
    font-size:13px;
    font-weight:800;
    margin-bottom:18px;
}
.home-hero h1 { font-size: 64px; margin: 0 0 18px; line-height: .95; max-width:820px; }
.home-lead { font-size: 20px; line-height:1.55; color:#344054; max-width:660px; margin:0; }
.home-sublead { font-size:18px; line-height:1.55; color:#475467; max-width:650px; margin:22px 0 0; }
.home-actions { display:flex; gap: 12px; flex-wrap:wrap; margin-top: 28px; }
.home-proof {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:22px;
}
.home-proof span {
    background:rgba(255,255,255,.72);
    border:1px solid rgba(221,227,234,.92);
    border-radius:999px;
    padding:8px 11px;
    color:#475467;
    font-size:13px;
    font-weight:800;
}
.hero-dashboard {
    background:rgba(255,255,255,.86);
    border:1px solid rgba(221,227,234,.96);
    border-radius:8px;
    padding:20px;
    box-shadow:0 24px 70px rgba(16,24,32,.16);
    backdrop-filter: blur(8px);
}
.dashboard-head {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
    padding-bottom:14px;
    border-bottom:1px solid var(--line);
}
.status-dot {
    width:10px;
    height:10px;
    border-radius:999px;
    background:#16856f;
    box-shadow:0 0 0 5px rgba(22,133,111,.12);
}
.dashboard-row {
    display:flex;
    justify-content:space-between;
    gap:16px;
    padding:13px 0;
    border-bottom:1px solid #edf1f4;
}
.dashboard-row:last-child { border-bottom:0; }
.dashboard-row span { color:#667085; }
.dashboard-row strong { text-align:right; }
.home-section {
    max-width:1180px;
    margin:0 auto;
    padding:82px 32px;
}
.section-label {
    display:inline-block;
    color:var(--brand);
    font-size:13px;
    font-weight:800;
    margin-bottom:12px;
}
.home-section h2, .home-final h2 {
    margin:0;
    font-size:38px;
    line-height:1.08;
    max-width:760px;
}
.home-section p, .home-final p {
    color:#475467;
    font-size:17px;
    line-height:1.6;
    max-width:720px;
}
.home-problem {
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:42px;
    align-items:center;
}
.home-metrics {
    display:grid;
    gap:12px;
}
.home-metrics div, .feature-list article {
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:20px;
}
.home-metrics div {
    border-left:4px solid #16856f;
}
.home-metrics strong {
    display:block;
    font-size:24px;
    margin-bottom:5px;
}
.home-metrics span { color:#667085; }
.home-feature-grid {
    display:grid;
    grid-template-columns:.72fr 1.28fr;
    gap:38px;
    align-items:start;
}
.feature-list {
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
}
.feature-list article span {
    color:var(--brand);
    font-weight:800;
    font-size:13px;
}
.feature-list h3 { margin:14px 0 8px; font-size:20px; }
.feature-list p { margin:0; font-size:15px; }
.home-telegram {
    display:grid;
    grid-template-columns:1fr 420px;
    gap:42px;
    align-items:center;
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:42px;
}
.home-stocks {
    display:grid;
    grid-template-columns:1fr 430px;
    gap:42px;
    align-items:center;
}
.stock-preview-card {
    display:grid;
    gap:10px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:18px;
    box-shadow:0 18px 55px rgba(16,24,32,.08);
}
.stock-preview-row {
    display:grid;
    gap:5px;
    padding:14px;
    border:1px solid #dde3ea;
    border-radius:8px;
    background:#f8fafc;
}
.stock-preview-row strong { color:#101820; }
.stock-preview-row span { color:#667085; }
.stock-preview-row.is-danger {
    border-color:#ffd6d0;
    background:#fff1ef;
}
.stock-preview-row.is-warning {
    border-color:#ffe2a8;
    background:#fff8e6;
}
.telegram-card {
    background:#101820;
    border-radius:8px;
    padding:22px;
    color:#fff;
    box-shadow:0 24px 70px rgba(16,24,32,.18);
}
.telegram-bubble {
    display:grid;
    gap:8px;
    background:#1c2a36;
    border-radius:8px;
    padding:18px;
}
.telegram-bubble strong { font-size:18px; color:#8ee0cc; }
.telegram-bubble span { color:rgba(255,255,255,.78); }
.telegram-button {
    margin-top:14px;
    background:#16856f;
    color:#fff;
    border-radius:7px;
    padding:12px;
    text-align:center;
    font-weight:800;
}
.home-final {
    margin:28px auto 0;
    max-width:1180px;
    padding:72px 32px 52px;
    border-top:1px solid var(--line);
}
.onboarding-shell {
    min-height: 100vh;
    position: relative;
    display: grid;
    place-items: center;
    padding: 28px;
    overflow: hidden;
}
.onboarding-backdrop {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    opacity: .22;
    filter: blur(2px);
    pointer-events: none;
}
.fake-sidebar { background: #1b2633; }
.fake-content {
    background: var(--bg);
    padding: 40px;
    display: grid;
    gap: 18px;
    align-content: start;
}
.fake-content div {
    height: 120px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.onboarding-card {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(16,24,32,.18);
}
.onboarding-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.brand.dark { color: var(--text); margin-bottom: 8px; }
.onboarding-head h1 { margin:0 0 6px; font-size:32px; }
.steps { display:grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.step-pill {
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    font-weight: 800;
    color: var(--muted);
    display:flex;
    align-items:center;
    gap:8px;
}
.step-pill span {
    width: 24px;
    height: 24px;
    display:grid;
    place-items:center;
    border-radius:999px;
    background:#e8edf2;
    color: var(--text);
    font-size:12px;
}
.step-pill.current { border-color: var(--brand); color: var(--text); background: #e8fbf3; }
.step-pill.done { color: var(--ok); background:#f0fbf6; }
.step-pill.done span { background: var(--brand); color:#fff; }
.onboarding-section { display:grid; gap:14px; }
.onboarding-section h2 { margin:0; }
.instruction { background:#f8fafc; border:1px solid var(--line); border-radius:8px; padding:14px; }
.instruction p { margin-top:0; }
.instruction li { margin: 6px 0; }
.soft-separator {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}
.margin-result {
    display: grid;
    gap: 4px;
    min-width: 180px;
}
.margin-result strong {
    font-size: 18px;
}
.margin-result.is-ok strong {
    color: var(--ok);
}
.margin-result.is-warning strong {
    color: #b45309;
}
.compact-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
}
.inline-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.tiny-input {
    width: 92px;
    min-width: 92px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
@media (max-width: 1280px) {
    .content { padding: 20px; }
    .stock-table th,
    .stock-table td { padding:10px; }
    .stock-product-subtitle,
    .stock-code-line,
    .stock-warehouses span { font-size:12px; }
    .stock-table th:nth-child(1), .stock-table td:nth-child(1) { width:21%; }
    .stock-table th:nth-child(2), .stock-table td:nth-child(2) { width:19%; }
    .stock-table th:nth-child(3), .stock-table td:nth-child(3) { width:7%; }
    .stock-table th:nth-child(4), .stock-table td:nth-child(4) { width:6%; }
    .stock-table th:nth-child(5), .stock-table td:nth-child(5) { width:13%; }
    .stock-table th:nth-child(6), .stock-table td:nth-child(6) { width:17%; }
    .stock-table th:nth-child(7), .stock-table td:nth-child(7) { width:17%; }
    .stock-code-line span {
        flex-basis:54px;
        font-size:11px;
    }
    .seller-article-line strong {
        max-width:180px;
    }
}
@media (max-width: 820px) {
    .notification-scope-grid { grid-template-columns:1fr; }
    .favorite-toolbar { grid-template-columns:1fr; }
    .favorite-bulk-actions { justify-content:flex-start; flex-wrap:wrap; }
    .settings-warehouses-counter { justify-items:start; }
    .layout { padding-left:0; }
    body.sidebar-collapsed .layout { padding-left:0; }
    .sidebar { position: static; width:auto; height: auto; }
    body.sidebar-collapsed .sidebar { display:none; }
    .home-hero { min-height: auto; padding: 92px 0 60px; align-items:flex-start; }
    .home-topline { left:24px; right:24px; top:24px; }
    .home-nav a:not(:last-child) { display:none; }
    .home-hero-inner { width:calc(100% - 48px); grid-template-columns:1fr; gap:28px; }
    .home-hero h1 { font-size: 40px; }
    .home-lead { font-size:17px; }
    .home-sublead { font-size:16px; }
    .hero-dashboard { display:none; }
    .orders-settings-form,
    .orders-modal-grid,
    .orders-summary,
    .finance-upload-form,
    .finance-summary,
    .order-meta-grid {
        grid-template-columns:1fr;
    }
    .orders-toolbar,
    .order-card-main {
        display:grid;
    }
    .orders-filter-tabs {
        width:100%;
    }
    .orders-filter-tab {
        flex:1 1 auto;
        justify-content:center;
    }
    .orders-warehouse-field,
    .orders-search-field,
    .products-category-field,
    .products-filter-panel {
        width:100%;
        max-width:none;
    }
    .order-status-block {
        justify-items:start;
        text-align:left;
    }
    .home-section { padding:52px 24px; }
    .home-problem, .home-feature-grid, .home-telegram, .home-stocks { grid-template-columns: 1fr; gap:24px; }
    .feature-list { grid-template-columns:1fr; }
    .home-section h2, .home-final h2 { font-size:30px; }
    .home-telegram { padding:24px; }
    .home-final { padding:52px 24px 36px; }
    .review-body-grid { grid-template-columns:1fr; }
    .steps { grid-template-columns: 1fr; }
    .feature-modal-grid { grid-template-columns:1fr; }
    .trial-choice-card,
    .tariff-builder-head {
        display:grid;
        text-align:left;
    }
    .tariff-total {
        width:100%;
        text-align:left;
    }
    .stock-toolbar, .stock-summary { grid-template-columns: 1fr; }
    .stock-table-head { display:grid; }
    .onboarding-backdrop { grid-template-columns: 1fr; }
    .fake-sidebar { display:none; }
    .onboarding-head { display:grid; }
}
