:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #172033;
  --muted: #7c879b;
  --border: #e8edf4;
  --blue: #4568e8;
  --blue-soft: #edf2ff;
  --green: #15966b;
  --green-soft: #e9f8f1;
  --purple: #8058d8;
  --orange: #dc8a35;
  --shadow: 0 5px 18px rgba(24, 39, 75, .035);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { width: 252px; background: #fff; border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 25px 17px 16px; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 0 9px 25px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #6f8dff, #4162dd); border-radius: 11px; font-size: 19px; font-weight: 800; box-shadow: 0 5px 12px #4568e833; }
.brand strong { display: block; font-size: 17px; letter-spacing: -.6px; }
.brand small { display: block; margin-top: 1px; color: #9aa4b5; font-size: 8px; letter-spacing: 2px; font-weight: 700; }
.workspace-switch { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 28px; }
.workspace-avatar, .user-avatar, .top-user { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 9px; background: #f0eaff; color: #8058d8; font-weight: 700; }
.workspace-copy { min-width: 0; flex: 1; }
.workspace-copy strong, .user-profile strong { display: block; font-size: 11px; }
.workspace-copy small, .user-profile small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.chevron { color: #9aa4b5; font-size: 17px; }
.nav-caption { padding: 0 11px 9px; color: #a0a9b8; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.main-nav { display: grid; gap: 4px; }
.nav-link, .market-link { text-decoration: none; color: #667187; display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 8px; font-size: 12px; font-weight: 500; }
.nav-link > span { width: 17px; text-align: center; color: #8792a5; font-size: 16px; }
.nav-link.active { color: #4162dd; background: #eef2ff; font-weight: 700; }
.nav-link.active > span { color: #4162dd; }
.nav-link em { margin-left: auto; color: #a1aaba; font-style: normal; font-size: 9px; }
.marketplace-caption { margin-top: 27px; }
.market-link { padding: 8px 11px; }
.market-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.wb-dot { background: #9b58d6; }
.ozon-dot { background: #2879e8; }
.sidebar-bottom { margin-top: auto; }
.plan-card { background: linear-gradient(145deg, #f4f6ff, #f7f4ff); border: 1px solid #e9eafe; border-radius: 11px; padding: 13px; margin: 0 2px 15px; }
.plan-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: #7658df; margin-bottom: 9px; }
.plan-card strong { font-size: 11px; }
.plan-card p { margin: 5px 0 10px; color: #7e8799; font-size: 10px; line-height: 1.55; }
.plan-card a { text-decoration: none; color: #5069d7; font-size: 10px; font-weight: 700; }
.plan-card a span { margin-left: 5px; }
.nav-link.muted { margin-bottom: 11px; }
.user-profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--border); padding: 14px 4px 0; }
.user-avatar { background: #e9f2ff; color: #3675c9; }
.user-profile > div:nth-child(2) { flex: 1; }
.more { color: #9aa4b5; font-size: 19px; }
.main-content { margin-left: 252px; min-height: 100vh; }
.topbar { height: 65px; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 38px; position: sticky; top: 0; z-index: 4; backdrop-filter: blur(12px); }
.breadcrumbs { color: #929caf; font-size: 11px; }
.breadcrumbs span { padding: 0 9px; color: #c1c8d3; }
.breadcrumbs strong { color: #445067; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.demo-pill { display: flex; align-items: center; gap: 6px; border-radius: 20px; padding: 6px 10px; background: #fff8e9; color: #ae7927; font-size: 10px; font-weight: 600; }
.demo-pill i, .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e5a43e; }
.icon-button { border: 0; background: transparent; color: #7d899d; font-size: 19px; }
.top-user { width: 29px; height: 29px; border-radius: 50%; font-size: 11px; }
.page-content { max-width: 1500px; margin: 0 auto; padding: 33px 38px 25px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.eyebrow { color: #9aa4b5; font-size: 9px; letter-spacing: 1.2px; font-weight: 700; margin: 0 0 9px; }
h1 { font-size: 26px; letter-spacing: -.9px; margin: 0; font-weight: 750; }
.subtitle { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.date-controls { display: flex; align-items: center; gap: 8px; }
.date-controls label { display: flex; align-items: center; gap: 7px; color: #8792a5; font-size: 10px; }
.date-controls input { width: 132px; height: 35px; border: 1px solid var(--border); border-radius: 7px; padding: 0 8px; color: #4b566b; background: #fff; font-size: 10px; }
.primary-button { height: 35px; padding: 0 14px; border: 0; border-radius: 7px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 600; box-shadow: 0 4px 9px #4568e82b; }
.primary-button:hover { background: #3658d4; }
.filter-row { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 16px; }
.segmented-control { display: inline-flex; padding: 3px; background: #edf0f6; border-radius: 9px; gap: 2px; }
.segment { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #778297; padding: 8px 12px; border-radius: 7px; font-size: 10px; font-weight: 600; }
.segment.active { color: #405fd2; background: #fff; box-shadow: 0 1px 4px #1b2c4b12; }
.segment .market-dot { width: 7px; height: 7px; }
.updated-label { display: flex; align-items: center; gap: 7px; color: #a0a9b8; font-size: 10px; }
.live-dot { background: #9ca8b8; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow); }
.kpi-card { min-height: 127px; padding: 16px 17px 14px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: #7e899c; font-size: 10px; font-weight: 500; }
.kpi-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 700; }
.kpi-icon.blue { background: #edf2ff; color: #5272e9; }
.kpi-icon.green { background: #e9f8f1; color: #16996d; }
.kpi-icon.violet { background: #f2edff; color: #825cda; }
.kpi-icon.orange { background: #fff4e9; color: #d58a3d; }
.kpi-value { margin-top: 12px; font-size: 24px; font-weight: 750; letter-spacing: -.8px; white-space: nowrap; }
.kpi-foot { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #a1aaba; font-size: 9px; }
.neutral-chip, .positive-chip { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; font-size: 9px; }
.neutral-chip { color: #8792a5; background: #f4f6f9; }
.positive-chip { color: #15966b; background: #eaf8f2; font-weight: 700; }
.content-grid { display: grid; gap: 14px; margin-top: 15px; }
.chart-grid { grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); }
.lower-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
.panel { padding: 18px 19px; min-width: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2 { margin: 0; font-size: 13px; letter-spacing: -.2px; }
.panel-heading p { color: #9aa4b5; font-size: 10px; margin: 6px 0 0; }
.legend { color: #8b96a8; font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.revenue-dot { background: #5273eb; }
.chart-summary { margin-top: 17px; display: flex; align-items: baseline; gap: 8px; }
.chart-summary strong { font-size: 19px; letter-spacing: -.5px; }
.chart-summary span { color: #9aa4b5; font-size: 9px; }
.chart-area { height: 194px; margin-top: 5px; overflow: hidden; }
.chart-area svg { width: 100%; height: 100%; overflow: visible; }
.chart-axis { display: flex; justify-content: space-between; color: #a3acba; font-size: 9px; padding: 0 3px; }
.marketplace-breakdown { display: grid; gap: 20px; margin-top: 25px; }
.marketplace-item-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; }
.marketplace-name { display: flex; align-items: center; gap: 8px; color: #536076; font-weight: 600; }
.marketplace-item-top strong { font-size: 12px; }
.progress-track { height: 7px; border-radius: 20px; background: #f0f2f7; overflow: hidden; margin-top: 9px; }
.progress-fill { height: 100%; border-radius: inherit; }
.progress-fill.wb-fill { background: #9b65d5; }
.progress-fill.ozon-fill { background: #4289ec; }
.marketplace-sub { display: flex; justify-content: space-between; color: #a0a9b8; font-size: 9px; margin-top: 7px; }
.marketplace-note { border-top: 1px solid var(--border); margin-top: 23px; padding-top: 13px; color: #a0a9b8; font-size: 9px; line-height: 1.5; }
.expense-list { display: grid; gap: 13px; margin-top: 20px; }
.expense-row { display: grid; grid-template-columns: 100px 1fr 82px; align-items: center; gap: 9px; font-size: 10px; }
.expense-name { color: #758196; }
.expense-track { height: 6px; background: #f1f3f7; border-radius: 20px; overflow: hidden; }
.expense-fill { height: 100%; border-radius: inherit; background: #8b9be8; }
.expense-value { text-align: right; font-weight: 600; color: #536076; font-size: 10px; }
.finance-footnote { border-top: 1px solid var(--border); padding-top: 11px; margin-top: 16px; color: #a1aaba; font-size: 9px; line-height: 1.5; }
.quick-stats { padding-bottom: 12px; }
.quick-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #f0f2f6; color: #8490a3; font-size: 10px; }
.quick-stat-row:last-child { border-bottom: 0; }
.quick-stat-row strong { color: #4b566b; font-size: 11px; }
.products-panel { margin-top: 15px; padding-bottom: 0; }
.products-heading { align-items: center; margin-bottom: 17px; }
.table-tools { display: flex; gap: 7px; }
.table-tools input { width: 205px; height: 32px; border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; outline: none; font-size: 10px; }
.table-tools input:focus, .date-controls input:focus { border-color: #9aafff; box-shadow: 0 0 0 3px #edf1ff; }
.secondary-button { border: 1px solid var(--border); background: #fff; color: #7c879b; border-radius: 7px; padding: 0 10px; font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
thead th { text-align: left; color: #a1aaba; font-size: 8px; letter-spacing: .65px; font-weight: 700; padding: 11px 10px; background: #fafbfd; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; white-space: nowrap; }
tbody td { padding: 12px 10px; border-bottom: 1px solid #f1f3f7; color: #667187; font-size: 10px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.product-cell { display: flex; align-items: center; gap: 9px; min-width: 190px; }
.product-thumb { width: 31px; height: 31px; display: grid; place-items: center; background: #f0f3fa; border-radius: 8px; color: #7d8ba6; font-size: 12px; }
.product-title { color: #3e4a60; font-weight: 600; font-size: 10px; }
.product-sku { color: #a1aaba; font-size: 9px; margin-top: 3px; }
.market-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 600; }
.market-badge.wb { color: #8754c4; background: #f4edfc; }
.market-badge.ozon { color: #3479d3; background: #edf4ff; }
.profit-positive { color: #15966b; font-weight: 700; }
.margin-chip { padding: 4px 6px; background: #eaf8f2; color: #15966b; border-radius: 5px; font-weight: 700; font-size: 9px; }
.empty-cell { text-align: center; color: #9aa4b5; padding: 25px; }
.table-footer { display: flex; justify-content: space-between; border-top: 1px solid #f0f2f6; padding: 12px 0; color: #a1aaba; font-size: 9px; }
.notice-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #f0f5ff; border: 1px solid #e2eaff; border-radius: 10px; margin-top: 16px; }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; background: #fff; border-radius: 8px; color: #5574dc; }
.notice-card strong { font-size: 10px; color: #5269b4; }
.notice-card p { margin: 5px 0 0; color: #7e8db5; font-size: 9px; line-height: 1.55; }
.footer { display: flex; justify-content: space-between; padding: 20px 2px 0; color: #aab2bf; font-size: 9px; }
.toast { position: fixed; bottom: 22px; right: 22px; z-index: 10; padding: 11px 15px; border-radius: 9px; color: #fff; background: #26344d; box-shadow: 0 8px 25px #17203330; font-size: 11px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1120px) {
  .sidebar { width: 218px; }
  .main-content { margin-left: 218px; }
  .page-content { padding-left: 25px; padding-right: 25px; }
  .topbar { padding: 0 25px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .sidebar { width: 62px; padding: 18px 8px; align-items: center; }
  .brand { padding: 0 0 23px; }
  .brand > span:last-child, .workspace-copy, .workspace-switch .chevron, .nav-caption, .nav-link:not(.active)::after, .nav-link, .market-link, .sidebar-bottom .plan-card, .sidebar-bottom .nav-link, .user-profile > div:nth-child(2), .user-profile .more { display: none; }
  .workspace-switch { padding: 7px; margin-bottom: 24px; }
  .main-nav { width: 100%; }
  .main-nav .nav-link.active { display: grid; place-items: center; padding: 10px 0; font-size: 0; }
  .main-nav .nav-link.active > span { font-size: 17px; }
  .sidebar-bottom { width: 100%; }
  .user-profile { justify-content: center; padding-top: 12px; }
  .main-content { margin-left: 62px; }
  .topbar { padding: 0 16px; height: 56px; }
  .page-content { padding: 24px 14px; }
  .topbar-actions { gap: 9px; }
  .date-controls { flex-wrap: wrap; }
  .date-controls input { width: 119px; }
  .filter-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .segmented-control { max-width: 100%; }
  .segment { padding: 8px 9px; font-size: 9px; }
  .chart-grid, .lower-grid { grid-template-columns: 1fr; }
  .products-heading { align-items: flex-start; flex-direction: column; }
  .table-tools { width: 100%; }
  .table-tools input { flex: 1; width: auto; min-width: 0; }
  h1 { font-size: 23px; }
  .kpi-value { font-size: 21px; }
}
@media (max-width: 420px) {
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 12px; min-height: 118px; }
  .kpi-value { font-size: 18px; }
  .date-controls label { font-size: 9px; }
  .date-controls input { width: 106px; }
  .primary-button { padding: 0 10px; }
  .updated-label { font-size: 9px; }
}

.account-link { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 11px; border: 1px solid #e5eaf3; border-radius: 7px; color: #4966d4; background: #fff; text-decoration: none; font-size: 10px; font-weight: 700; white-space: nowrap; }
.account-link:hover { background: #f5f7ff; border-color: #cfd8ff; }
@media (max-width: 760px) { .account-link { padding: 0 8px; font-size: 9px; } }

.demo-pill.account-mode { background: #eaf8f2; color: #16815f; }
.demo-pill.account-mode i { background: #21a879; }

/* WB import controls (v0.4) */
.wb-sync-button { min-height: 38px; white-space: nowrap; }
.wb-sync-button:disabled { opacity: .6; cursor: not-allowed; }
.sync-hint { border: 1px solid #dce6f6; border-radius: 10px; background: #f3f7ff; color: #425b87; padding: 12px 16px; margin: 0 0 20px; font-size: 12px; line-height: 1.55; }
.sync-hint[hidden], .wb-sync-button[hidden] { display: none !important; }


/* WB v0.4: unverified profit scenario stays separate from confirmed statistics. */
.wb-profit-estimate { margin-bottom: 22px; }
.estimate-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.estimate-warning { display: inline-block; color: #9b6410; background: #fff2d7; border: 1px solid #f5d793; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 750; letter-spacing: .03em; }
.estimate-results { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.3fr); gap: 18px; margin: 17px 0; }
.estimate-result-main { display: grid; gap: 9px; align-content: center; background: #f9faff; border: 1px solid #e8edfa; border-radius: 10px; padding: 18px; }
.estimate-result-main>span, .estimate-result-main>small { color: #76849b; font-size: 11px; line-height: 1.5; }
.estimate-result-main>strong { color: #27374c; font-size: clamp(21px, 3vw, 32px); font-weight: 800; }
.estimate-breakdown { border: 1px solid #e8edf4; padding: 12px 16px; border-radius: 10px; color: #738095; font-size: 12px; }
.estimate-cost-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; }
.estimate-cost-row strong { color: #45516a; font-weight: 650; }
.estimate-cost-row.estimate-cost-total { border-top: 1px solid #e8edf4; margin-top: 4px; padding-top: 9px; }
.estimate-settings { border: 1px solid #e9edf6; border-radius: 10px; padding: 14px 16px; background: #fcfdff; }
.estimate-settings>summary { cursor: pointer; color: #3f5fba; font-weight: 700; font-size: 12px; }
.estimate-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px 14px; margin: 16px 0 10px; }
.estimate-fields label { display: grid; gap: 6px; color: #627084; font-size: 11px; font-weight: 600; }
.estimate-fields input { height: 38px; border: 1px solid #dfe5f0; background: #fff; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 12px; }
.estimate-advice, .estimate-disclaimer { color: #8090a5; font-size: 10px; line-height: 1.7; margin: 12px 0; }
.estimate-disclaimer { margin-bottom: 0; }
.estimate-save { margin-top: 6px; padding: 10px 16px; }
.estimate-feedback { color: #b25546; font-size: 11px; }
@media (max-width: 700px) { .estimate-results { grid-template-columns: 1fr; } }


/* v0.4.2: catalog-wide per-unit costs with individual and bulk editing. */
.cost-panel { margin: 22px 0; }
.cost-panel .panel-heading p { line-height: 1.55; max-width: 730px; }
.cost-toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin: 16px 0 12px; }
.cost-toolbar input[type="search"] { min-width: 220px; flex: 1 1 260px; height: 38px; border: 1px solid #dfe5f0; border-radius: 8px; padding: 0 12px; font-size: 12px; }
.cost-toolbar .secondary-button { min-height: 38px; white-space: nowrap; }
.cost-selected-counter { color: #4a64bc; font-size: 11px; font-weight: 700; margin-left: auto; }
.cost-table-wrap { overflow-x: auto; }
.costs-table { min-width: 795px; }
.costs-table th:first-child, .costs-table td:first-child { width: 35px; text-align: center; }
.costs-table th { white-space: nowrap; }
.costs-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.costs-table td:nth-child(2) { white-space: normal; min-width: 160px; }
.costs-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4b6ce5; cursor: pointer; }
.cost-edit-button { border: 1px solid #dae2fa; background: #f5f7ff; border-radius: 7px; padding: 7px 9px; color: #4566cb; cursor: pointer; font-size: 10px; font-weight: 700; }
.cost-edit-button:hover { background: #e9eeff; }
.cost-help, .cost-disclaimer { color: #7f8ca3; line-height: 1.6; font-size: 10px; margin: 12px 0; }
.cost-bulk-form { background: #f9faff; border: 1px solid #e2e8f7; padding: 16px; border-radius: 12px; margin-top: 14px; }
.cost-form-title { display: grid; gap: 5px; margin-bottom: 13px; }
.cost-form-title strong { font-size: 13px; color: #2a3750; }
.cost-form-title span { color: #76849e; font-size: 11px; line-height: 1.6; }
.cost-form-fields { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.cost-form-fields label { display: grid; gap: 7px; color: #5b6a84; font-size: 10px; font-weight: 700; }
.cost-form-fields input { width: 100%; height: 39px; border-radius: 8px; border: 1px solid #dfe5ef; font: inherit; font-size: 12px; padding: 0 10px; background: #fff; }
.cost-form-fields input:focus { outline: 2px solid #cbd6ff; }
.cost-form-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 15px; }
.cost-form-actions button { min-height: 36px; }
.cost-form-actions button:disabled { cursor: not-allowed; opacity: .6; }
.cost-feedback { color: #246b55; font-size: 11px; line-height: 1.5; flex: 1 1 190px; }
.cost-feedback.error { color: #b14545; }
@media (max-width: 900px) { .cost-form-fields { grid-template-columns: repeat(2, minmax(130px, 1fr)); } }
@media (max-width: 540px) { .cost-form-fields { grid-template-columns: 1fr; } .cost-toolbar input[type="search"] { flex-basis: 100%; } }


/* v0.4.4: quick date-range presets appear above the manual date fields. */
.date-toolbar { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.date-presets { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.date-presets-label { color: #98a4b8; font-size: 10px; margin-right: 5px; }
.date-preset { min-height: 33px; padding: 0 12px; border: 1px solid #dae3f3; background: #fff; color: #52638b; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 650; transition: background .15s, border-color .15s; }
.date-preset:hover { background: #f1f5ff; border-color: #a9bdf8; }
.date-preset.active { background: #eaf0ff; color: #3d61d4; border-color: #a6baff; box-shadow: inset 0 0 0 1px #d7e1ff; }
.date-preset:focus-visible { outline: 2px solid #6c86f4; outline-offset: 2px; }
@media (max-width: 1120px) {
  .date-toolbar { align-items: flex-start; width: 100%; }
  .date-presets { justify-content: flex-start; }
  .date-toolbar .date-controls { flex-wrap: wrap; }
}
@media (max-width: 500px) {
  .date-presets-label { flex: 1 1 100%; }
  .date-preset { font-size: 10px; padding: 0 10px; }
}


/* v0.4.4: one searchable table for sales, categories and per-unit expenses. */
.combined-products-table { min-width: 1660px; }
.combined-products-table td, .combined-products-table th { vertical-align: middle; }
.combined-products-table td:nth-child(2) { min-width: 160px; max-width: 230px; }
.combined-products-table td:nth-child(3) { min-width: 105px; max-width: 155px; white-space: normal; }
.combined-products-table td:nth-child(6), .combined-products-table td:nth-child(11) { font-weight: 700; }
.product-category { display: inline-block; color: #607085; font-size: 10px; line-height: 1.4; }
.cost-filter-label { display: flex; flex-direction: column; gap: 5px; color: #8490a6; font-size: 10px; font-weight: 600; min-width: 154px; }
.cost-filter-label select { width: 100%; height: 38px; padding: 0 9px; color: #485a76; border-radius: 8px; background: #fff; border: 1px solid #dfe5f0; font-size: 11px; }
.cost-filter-label select:focus-visible { outline: 2px solid #94acf4; outline-offset: 1px; }
.cost-toolbar .cost-selected-counter { flex-shrink: 0; }
@media (max-width: 760px) {
  .cost-filter-label { min-width: 130px; flex: 1 1 150px; }
}

/* v0.4.5 — easy-to-reach bulk editor, missing-cost alert and sticky right action */
.cost-bulk-form { margin: 10px 0 14px; }
.cost-coverage { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 11px 0 14px; padding: 10px 14px; background: #f6f8fe; border: 1px solid #e1e8f5; border-radius: 10px; }
.cost-coverage-stat { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: #58657e; font-size: 12px; font-weight: 650; }
.cost-coverage-stat strong { font-size: 19px; font-weight: 800; color: #a75c17; font-variant-numeric: tabular-nums; }
.cost-coverage-total { font-size: 11px; color: #8a97ae; }
.cost-missing-filter { display: inline-flex; align-items: center; gap: 9px; color: #455a85; font-size: 11px; font-weight: 700; cursor: pointer; }
.cost-missing-filter input { width: 16px; height: 16px; accent-color: #436be0; cursor: pointer; }
.cost-missing-value { color: #ae6332; font-weight: 700; font-size: 10px; }
.cost-table-wrap { position: relative; overflow-x: auto; }
.combined-products-table th:last-child, .combined-products-table td:last-child {
  position: sticky; right: 0; min-width: 79px; width: 79px;
  padding-left: 10px; padding-right: 10px;
  text-align: center; background: #fff; z-index: 2;
  box-shadow: -1px 0 0 #dde4ef, -9px 0 16px -13px rgba(41, 61, 100, .38);
}
.combined-products-table th:last-child { background: #f7f9fc; z-index: 3; }
.cost-edit-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.cost-edit-button svg { display: block; pointer-events: none; }
.cost-edit-button:focus-visible { outline: 2px solid #5677e8; outline-offset: 2px; }
@media (max-width: 760px) { .cost-coverage { align-items: flex-start; } }

/* v0.4.6 financial API & background-sync status */
.finance-integration { margin: 17px 0 0; border-top: 1px solid #e7ebf4; padding-top: 14px; }
.finance-integration h3 { color: #33415a; font-size: 13px; margin: 2px 0 8px; }
.finance-integration p { color: #7886a0; line-height: 1.6; font-size: 11px; }
.finance-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.finance-actions input { flex: 1 1 190px; min-width: 160px; height: 36px; padding: 0 10px; border: 1px solid #dbe3f0; border-radius: 8px; }
.finance-actions button { min-height: 36px; }
.finance-actions button:disabled { opacity: .6; cursor: not-allowed; }
.finance-meta { display: grid; gap: 7px; color: #617697; font-size: 11px; }
.finance-summary { display: grid; gap: 5px; padding: 12px; background: #f8faff; border-radius: 8px; color: #667691; font-size: 11px; }
.finance-summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.finance-summary-line strong { color: #344057; text-align: right; }
.finance-integration .finance-caution { color: #9a7b3f; line-height: 1.6; font-size: 10px; }

/* v0.4.7: local JWT category check, one WB token for all API modules. */
.wb-token-rights { margin-top:14px;padding:13px;border:1px solid #e3eafb;border-radius:10px;background:#f9fbff; }
.wb-token-rights .integration-actions { justify-content:space-between; }
.wb-token-rights .integration-actions strong { font-size:12px; }
.wb-rights-list { display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 8px; }
.wb-right { font-size:11px;font-weight:700;border-radius:15px;padding:5px 8px; }
.wb-right.granted { color:#247857;background:#e8f7ee; }
.wb-right.denied { color:#a43b41;background:#ffeeef; }
.finance-promotion-block { margin-top:18px;border-top:1px solid #ebeff4;padding-top:16px; }
.finance-promotion-block h3 { font-size:13px; }
.finance-promotion-block p { color:#7f8a9a;font-size:11px;line-height:1.6; }
.finance-promotion-block .finance-actions { flex-wrap:wrap; }


/* v0.4.8 — wide two-column Wildberries orders widget */
.kpi-grid-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.orders-overview { display: grid; grid-template-columns: minmax(260px, .95fr) minmax(420px, 1.75fr); gap: 0; padding: 27px 32px; margin-top: 14px; border-radius: 17px; }
.orders-overview[hidden] { display: none !important; }
.orders-overview-left { border-right: 1px solid #e4e9f3; padding-right: 28px; }
.orders-overview-right { min-width: 0; padding-left: 29px; }
.orders-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.orders-title-row h2, .orders-overview-right h3 { margin: 0; font-size: 19px; letter-spacing: -.4px; color: #1e2b48; font-weight: 760; }
.orders-title-row p { margin: 8px 0 0; color: #8593b1; font-size: 12px; }
.orders-top-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; background: #f1ecff; color: #8057ed; font-size: 24px; }
.orders-total { font-size: clamp(40px,5vw,62px); font-weight: 800; letter-spacing: -2px; margin: 22px 0 1px; color: #17294b; font-variant-numeric: tabular-nums; }
.orders-total-caption { display: inline-block; background: #f4f6fb; border-radius: 8px; padding: 7px 10px; color: #71809b; font-size: 11px; line-height: 1.4; }
.orders-left-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 19px 0 10px; }
.orders-mini-card, .orders-unknown-card { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 5px 9px; border: 1px solid #eef0f8; background: #f8f9fd; padding: 13px; border-radius: 12px; color: #465471; font-size: 11px; }
.orders-mini-card strong, .orders-unknown-card strong { grid-column: 2; font-size: 28px; letter-spacing: -.5px; line-height: 1.1; color: #1c2a47; font-variant-numeric: tabular-nums; }
.orders-mini-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 17px; }
.orders-mini-icon.sold, .orders-status-icon.sold { color: #11985f; background: #e9f8ef; }
.orders-mini-icon.cancelled, .orders-status-icon.cancelled { color: #d74f58; background: #ffeff0; }
.orders-mini-icon.unknown, .orders-status-icon.unknown { color: #775ad9; background: #f0ecff; }
.orders-status-icon.returned { color: #d88a2b; background: #fff3e4; }
.orders-unknown-card { background: #f7f4ff; border-color: #e7ddff; grid-template-columns: 28px 1fr auto; }
.orders-unknown-card strong { grid-column: 3; font-size: 27px; }
.orders-overview-right h3 { font-size: 17px; margin: 3px 0 14px; }
.orders-status-row { display: grid; grid-template-columns: 30px minmax(125px,1fr) 34px minmax(65px,.95fr) 47px; gap: 10px; min-height: 45px; align-items: center; border-bottom: 1px solid #e9edf5; font-size: 11px; color: #31415e; }
.orders-status-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-weight: 750; font-size: 14px; }
.orders-status-count { text-align: right; font-size: 13px; color: #243450; font-variant-numeric: tabular-nums; }
.orders-status-percent { text-align: right; color: #52617d; font-variant-numeric: tabular-nums; font-size: 10px; }
.orders-progress { height: 8px; border-radius: 99px; background: #edf0f7; overflow: hidden; }
.orders-progress > span { display: block; height: 100%; border-radius: inherit; background: #8e70ed; }
.orders-progress > span.sold { background: #31ae82; }
.orders-progress > span.returned { background: #edac60; }
.orders-progress > span.cancelled { background: #dc747d; }
.orders-status-row.unavailable { color: #96a0b0; }
.orders-status-row.unavailable .orders-status-count, .orders-status-row.unavailable .orders-status-percent { color: #a3adbe; }
.orders-status-icon.unavailable-icon { color: #a6afbf; background: #f4f6fa; }
.orders-status-note { margin-top: 14px; border-radius: 10px; background: #f5f6fb; color: #7b89a3; font-size: 10px; line-height: 1.65; padding: 10px 13px; }
@media (max-width: 1140px) { .orders-overview { grid-template-columns: 1fr; padding: 22px; } .orders-overview-left { border-right: 0; padding: 0 0 20px; border-bottom: 1px solid #e4e9f3; } .orders-overview-right { padding: 22px 0 0; } }
@media (max-width: 700px) { .kpi-grid-three { grid-template-columns: 1fr; } .orders-status-row { grid-template-columns: 28px minmax(115px,1fr) 32px 50px; gap: 7px; } .orders-progress { display: none; } .orders-overview { padding: 17px; } .orders-title-row h2 { font-size: 17px; } }


/* v0.4.9: sync states, warning, and rotating arrows */
.wb-sync-button { position: relative; display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 35px; padding: 0 14px; white-space: nowrap; }
.wb-sync-button[hidden], .sync-alert-badge[hidden], .wb-sync-top-state[hidden], .wb-order-alert[hidden] { display:none !important; }
.sync-button-arrows { display:inline-flex;font-size:17px;line-height:1;transform-origin:center; }
.wb-sync-button.is-syncing .sync-button-arrows { animation:wb-turn 1s linear infinite; }
@keyframes wb-turn { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .wb-sync-button.is-syncing .sync-button-arrows,.wb-sync-top-state[data-state="running"] .wb-sync-top-icon{animation-duration:2.5s;} }
.sync-alert-badge { position:absolute;top:-9px;right:-8px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;font-size:12px;font-weight:900;line-height:1;background:#d93043;color:white;border:2px solid white;box-shadow:0 2px 6px #9a1e2e30; }
.wb-sync-top-state { display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap;padding:6px 10px;border-radius:9px;font-size:11px;font-weight:700;color:#53617b;background:#f1f4fb; }
.wb-sync-top-state[data-state="updated"]{background:#e8f8ef;color:#18734d;}
.wb-sync-top-state[data-state="running"]{background:#eaf0ff;color:#3d63be;}
.wb-sync-top-state[data-state="partial"]{background:#fff6e6;color:#9b6b15;}
.wb-sync-top-state[data-state="error"],.wb-sync-top-state[data-state="rights"]{background:#ffecee;color:#b13648;}
.wb-sync-top-icon{font-size:17px;display:inline-block;line-height:1;transform-origin:center;}
.wb-sync-top-state[data-state="running"] .wb-sync-top-icon{animation:wb-turn 1s linear infinite;}
.wb-sync-top-last{font-weight:500;opacity:.87;}
.wb-order-alert{margin-top:14px;padding:14px 16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid #f6c5cc;border-radius:12px;background:#fff0f1;color:#923948;}
.wb-order-alert-icon{height:31px;width:31px;flex:0 0 31px;border-radius:50%;display:grid;place-items:center;color:white;background:#d74252;font-size:20px;font-weight:900;}
.wb-order-alert-copy{flex:1;min-width:220px;}
.wb-order-alert-copy strong{font-size:12px;}
.wb-order-alert-copy p{font-size:11px;line-height:1.5;margin:4px 0 0;}
.wb-order-alert .secondary-button{min-height:32px;cursor:pointer;color:#943a46;background:#fff;}
@media(max-width:900px){.wb-sync-top-state{width:100%;}.wb-sync-top-last{display:block;}}

/* v0.4.13 — store picker and unified WB statuses */
.store-pick-label{display:flex;gap:7px;align-items:center;font-size:11px;color:#9aabc8;}
.store-pick-label select{max-width:190px;padding:8px 10px;background:var(--panel-bg,#fff);color:var(--text-primary,#263955);border:1px solid #7183a44d;border-radius:9px;font-size:12px;}
.store-aggregate-notice{margin:12px 0;padding:12px 18px;background:#e7eefc;border:1px solid #afc2ed;border-radius:12px;color:#27466c;font-size:12px;}
.store-aggregate-notice[hidden]{display:none!important;}
.orders-overview{display:block!important;padding:25px!important;}
.orders-overview[hidden]{display:none!important;}
.orders-overview-left{border:0!important;padding:0!important;}
.orders-overview-right{padding:16px 0 0!important;}
.orders-overview-left .orders-left-grid,.orders-overview-left .orders-unknown-card,.orders-overview-left .orders-total-caption{display:none;}
.orders-title-row{display:flex;gap:10px;justify-content:space-between;align-items:center;}
.orders-overview-left .orders-total{font-size:32px!important;margin:0!important;text-align:right;}
.orders-overview-right h3{margin:0 0 12px!important;}
.orders-subtitle{font-size:11px;font-weight:400;opacity:.65;margin-left:8px;}
.orders-status-list{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;overflow:visible!important;}
.orders-status-card{position:relative;border:1px solid #d8e2f4;border-radius:12px;padding:11px;display:grid;gap:12px;min-width:0;background:#f7f9fd;outline-offset:2px;cursor:help;}
.orders-status-card:hover,.orders-status-card:focus-visible{border-color:#9681f4;box-shadow:0 0 0 2px #9676e93d;z-index:10;}
.orders-status-top{display:flex;gap:5px;align-items:center;font-size:12px;min-width:0;}
.orders-status-top>strong{min-width:0;}
.orders-info-icon{font-size:13px;opacity:.75;margin-left:auto;}
.orders-status-summary{display:flex;align-items:baseline;justify-content:space-between;}
.orders-status-summary>strong{font-size:23px;}
.orders-status-summary small{font-size:11px;opacity:.8;}
.orders-status-card .orders-progress{height:6px;border-radius:6px;background:#dce4f2;overflow:hidden;display:block!important;}
.orders-status-card .orders-progress span{display:block;height:100%;background:#9d82ee;border-radius:6px;}
.orders-status-card.sold .orders-progress span{background:#43b886;}.orders-status-card.returned .orders-progress span{background:#f4a442;}.orders-status-card.cancelled .orders-progress span{background:#f07882;}.orders-status-card.defective .orders-progress span{background:#d75c82;}
.orders-status-icon{display:inline-grid;place-items:center;border-radius:9px;min-width:25px;height:25px;font-weight:800;color:#fff;background:#9781de;}
.orders-status-icon.sold{background:#2ba96a}.orders-status-icon.returned{background:#e98d26}.orders-status-icon.cancelled{background:#eb6879}.orders-status-icon.defective{background:#d65178}.orders-status-icon.pickup{background:#8254cc}.orders-status-icon.unknown{background:#63728e}
.orders-popover{display:none;position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);width:max-content;max-width:min(330px,88vw);min-width:230px;padding:13px;border-radius:12px;background:#15263f;color:#e9f1fe;box-shadow:0 15px 35px #0006;font-size:12px;z-index:25;}
.orders-status-card:hover .orders-popover,.orders-status-card:focus .orders-popover,.orders-status-card:focus-within .orders-popover{display:grid;gap:8px;}
.orders-popover-title{font-size:13px;font-weight:800;}.orders-popover-intro{font-size:11px;color:#c2cbdf;}.orders-popover-item{display:flex;gap:10px;align-items:start;justify-content:space-between;}.orders-popover-item code{font-size:10px;color:#95b3ee;}
.orders-stage-list{border-top:1px solid #d7dfec;margin-top:18px;padding-top:16px;}
.orders-stage-list h4{font-size:13px;margin:0 0 10px;}.orders-stage-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}.orders-stage{background:#eff3fa;padding:10px;border-radius:10px;display:flex;gap:12px;justify-content:space-between;font-size:12px;}.orders-stage-note{font-size:11px;opacity:.7;line-height:1.6;}
@media(max-width:1250px){.orders-status-list{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:750px){.orders-status-list{grid-template-columns:repeat(2,minmax(0,1fr));}.orders-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.store-pick-label select{max-width:115px;}}
[data-theme="dark"] .orders-status-card{background:#1b2d47;border-color:#344869;color:#e6edff;}
[data-theme="dark"] .orders-status-card .orders-progress{background:#384763;}
[data-theme="dark"] .orders-stage{background:#223550;color:#dbe5fc;}
[data-theme="dark"] .orders-stage-list{border-color:#3a4b67;}
[data-theme="dark"] .store-aggregate-notice{background:#203653;border-color:#39527a;color:#c9ddff;}
[data-theme="dark"] .store-pick-label select{background:#20334e;color:#edf3ff;}

.orders-status-card:nth-child(n+5) .orders-popover{left:auto;right:0;transform:none;}

#products[hidden]{display:none!important;}

/* v0.4.14 — compact status cards, diagnostic drawer, easy multi-store access. */
.add-store-button{border:1px solid #8296bd5a;background:#e8effd;color:#355aca;display:inline-flex;align-items:center;justify-content:center;min-height:31px;padding:0 12px;border-radius:9px;font-size:11px;font-weight:700;text-decoration:none;white-space:nowrap;}
.add-store-button:hover{border-color:#7796e7;background:#dce8ff;}
.add-store-button[hidden],.orders-unknown-inline[hidden]{display:none!important;}
[data-theme="dark"] .add-store-button{background:#243b60;color:#d7e6ff;border-color:#435c87;}
.orders-status-list{grid-template-columns:repeat(6,minmax(0,1fr));}
.orders-status-card.placed .orders-progress span{background:#689ce9;}
.orders-status-icon.placed{background:#487fc8;}
.orders-status-card.working .orders-progress span{background:#9a84e6;}
.orders-unknown-inline{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:13px;padding:9px 12px;border-radius:10px;background:#f1f5fb;color:#50617e;font-size:11px;}
.orders-unknown-inline a{margin-left:auto;color:#506ec6;text-decoration:underline;}
.orders-diagnostics{border-top:1px solid #d7dfec;margin-top:16px;padding-top:14px;font-size:12px;}
.orders-diagnostics>summary{cursor:pointer;list-style:revert;font-weight:700;color:var(--text-primary,#2b3d5b);}
.orders-diagnostics>summary span{font-weight:400;opacity:.65;font-size:11px;}
.orders-diagnostics-controls{display:flex;gap:12px;align-items:end;margin:13px 0;flex-wrap:wrap;}
.orders-diagnostics-controls label{display:flex;gap:9px;align-items:center;}
.orders-diagnostics-controls select{border-radius:8px;padding:8px 10px;background:var(--panel-bg,#fff);color:var(--text-primary,#243550);border:1px solid #8095b555;}
.orders-diagnostics-scroll{max-height:370px;overflow:auto;border:1px solid #8095b533;border-radius:10px;}
.orders-diagnostics table{width:100%;border-collapse:collapse;min-width:950px;font-size:11px;}
.orders-diagnostics th,.orders-diagnostics td{padding:10px;text-align:left;border-bottom:1px solid #7b91b32e;vertical-align:top;overflow-wrap:anywhere;}
.orders-diagnostics th{position:sticky;top:0;background:var(--panel-bg,#f5f8ff);z-index:1;}
.orders-diagnostics-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;color:var(--text-primary,#344760);}
[data-theme="dark"] .orders-diagnostics,[data-theme="dark"] .orders-stage-list{border-color:#394d6c;}
[data-theme="dark"] .orders-unknown-inline{background:#253851;color:#c6d5ef;}
[data-theme="dark"] .orders-unknown-inline a{color:#a1bcff;}
[data-theme="dark"] .orders-diagnostics-controls select,[data-theme="dark"] .orders-diagnostics th{background:#20334e;color:#eef3ff;}
#seller-stores{scroll-margin-top:20px;}
@media(max-width:1250px){.orders-status-list{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:750px){.orders-status-list{grid-template-columns:repeat(2,minmax(0,1fr));}.add-store-button{font-size:0;padding:0 9px;}.add-store-button::after{content:'＋';font-size:15px;}}

/* v0.4.15: factual financial-report availability, without suggesting net profit */
.profit-state-chip {display:inline-flex;align-items:center;max-width:100%;border-radius:6px;padding:4px 7px;font-size:10px;font-weight:700;line-height:1.35;background:var(--surface-soft,#edf4f8);color:var(--text,#263d5a);}
.profit-kpi-card .kpi-foot {flex-wrap:wrap;gap:8px;}
.profit-why-button {border:0;padding:4px 7px;border-radius:6px;background:transparent;color:var(--primary,#4168d5);font-size:10px;font-weight:700;cursor:pointer;}
.profit-why-button:focus-visible {outline:2px solid var(--primary,#4168d5);outline-offset:2px;}
.profit-explanation {margin-top:10px;padding:11px;border:1px solid var(--border);border-radius:9px;background:var(--surface-soft,#f6f8fc);font-size:11px;line-height:1.6;color:var(--text,#263d5a);}
.profit-explanation p {margin:0 0 6px;}
.profit-explanation a {font-weight:700;color:var(--primary,#4168d5);}
:root[data-theme="dark"] .profit-state-chip {background:#273b54;color:#b7d0f6;}
:root[data-theme="dark"] .profit-explanation {background:#22314b;color:#dbe5f7;}

/* v0.4.16 — intuitive store creation under Marketplaces in the sidebar.
   The existing store selector remains in the top bar for switching accounts. */
.sidebar-add-store {
  display:flex;
  width:calc(100% - 12px);
  min-height:39px;
  margin:12px 6px 0;
  padding:0 12px;
  justify-content:flex-start;
  gap:10px;
  border:1px solid #a7b9df;
  border-radius:9px;
  background:#edf2ff;
  color:#365bc1;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  transition:background .18s ease, border-color .18s ease;
}
.sidebar-add-store:hover {background:#dde8ff;border-color:#668ade;}
.sidebar-add-store:focus-visible {outline:2px solid #608aff;outline-offset:3px;}
.sidebar-add-store-icon {font-size:19px;line-height:1;flex-shrink:0;}
.sidebar-add-store-label {white-space:nowrap;}
:root[data-theme="dark"] .sidebar-add-store {
  background:#233a60;
  border-color:#4a70ae;
  color:#dce8ff;
}
:root[data-theme="dark"] .sidebar-add-store:hover {
  background:#2f4b79;
  border-color:#86a8f4;
}
@media(max-width:760px) {
  .sidebar-add-store {width:42px;height:42px;min-height:42px;padding:0;margin:13px 0 0;justify-content:center;}
  .sidebar-add-store-icon {font-size:22px;}
  .sidebar-add-store-label {display:none;}
}

/* v0.4.17: store navigation, sticky SKU, profit data readiness, saved filters. */
.sidebar-store-toggle{width:100%;border:0;background:transparent;color:#7789a6;font-size:11px;font-weight:600;font-family:inherit;display:flex;justify-content:space-between;align-items:center;padding:7px 15px;cursor:pointer;text-align:left;}
.sidebar-store-toggle[hidden],.sidebar-store-list[hidden]{display:none!important;}
.sidebar-store-toggle:hover{color:#4c6cd5;}
.sidebar-store-toggle[aria-expanded="false"] span{transform:rotate(-90deg);}
.sidebar-store-list{padding:0 0 9px 21px;display:grid;gap:4px;}
.sidebar-store-item{width:100%;border:0;border-left:2px solid transparent;padding:8px 10px;text-align:left;cursor:pointer;font-size:11px;font-weight:600;background:transparent;color:#64738e;border-radius:0 7px 7px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sidebar-store-item:hover{background:#edf2ff;color:#4366cc;}
.sidebar-store-item.active{background:#e7eeff;color:#3558b5;border-left-color:#6b8cf0;}
:root[data-theme="dark"] .sidebar-store-toggle{color:#a6b9db;}
:root[data-theme="dark"] .sidebar-store-item{color:#b8c9e5;}
:root[data-theme="dark"] .sidebar-store-item:hover{background:#233954;color:#e1e9ff;}
:root[data-theme="dark"] .sidebar-store-item.active{background:#273f65;color:#e0e9ff;border-left-color:#729cff;}
.cost-saved-filters{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#7d8ba3;font-size:11px;padding:7px 2px;}
.cost-filter-reset,.profit-cost-shortcut{background:transparent;border:0;color:#4e70d6;cursor:pointer;font-weight:700;font-size:11px;text-decoration:underline;text-underline-offset:3px;}
:root[data-theme="dark"] .cost-filter-reset,:root[data-theme="dark"] .profit-cost-shortcut{color:#91aeff;}
.combined-products-table th:first-child,.combined-products-table td:first-child{position:sticky;left:0;z-index:3;background:#fff;min-width:46px;width:46px;max-width:46px;box-shadow:1px 0 0 #e1e7f1;}
.combined-products-table th:nth-child(2),.combined-products-table td:nth-child(2){position:sticky;left:46px;z-index:3;background:#fff;min-width:185px;max-width:235px;box-shadow:1px 0 0 #dce3f0,8px 0 12px -11px #506080;}
.combined-products-table thead th:first-child,.combined-products-table thead th:nth-child(2){background:#f7f9fc;z-index:5;}
:root[data-theme="dark"] .combined-products-table td:first-child,:root[data-theme="dark"] .combined-products-table td:nth-child(2){background:var(--surface);box-shadow:1px 0 0 #465776,9px 0 15px -13px #000;}
:root[data-theme="dark"] .combined-products-table thead th:first-child,:root[data-theme="dark"] .combined-products-table thead th:nth-child(2){background:#243249;}
.orders-status-card{cursor:pointer;}
.orders-status-card:focus-visible{outline:2px solid #719bfa;}
.wb-sync-all-details{margin:7px 0 0;padding-top:7px;border-top:1px solid #e4eaf2;}
.wb-sync-all-details>summary{cursor:pointer;font-weight:700;color:#546c92;font-size:11px;}
.wb-sync-all-details[open] .wb-sync-status-chips{margin-top:10px;}
:root[data-theme="dark"] .wb-sync-all-details{border-color:#3c4b63;}
:root[data-theme="dark"] .wb-sync-all-details>summary{color:#a6bee6;}
.profit-readiness{margin-top:11px;padding:12px;border:1px solid #dfe7f1;border-radius:10px;background:#f7f9fd;color:#3c506f;font-size:11px;}
.profit-readiness[hidden],.profit-cost-shortcut[hidden]{display:none!important;}
.profit-readiness-title{display:flex;justify-content:space-between;gap:10px;align-items:center;}
.profit-readiness-track{height:7px;background:#e1e7f1;border-radius:8px;overflow:hidden;margin:10px 0;}
.profit-readiness-track span{display:block;height:100%;width:0;background:#39a987;border-radius:8px;transition:width .25s;}
.profit-readiness-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0;}
.profit-readiness-item{display:flex;gap:8px;align-items:start;}
.profit-readiness-item>span:first-child{font-size:15px;font-weight:800;}
.profit-readiness-item .is-ready{color:#269b70;}.profit-readiness-item .is-pending{color:#9b7991;}
.profit-readiness-item>span:last-child{display:grid;gap:2px;min-width:0;}
.profit-readiness-item small{font-size:10px;color:#7b899e;line-height:1.4;}
.profit-readiness>small{display:block;margin-top:10px;color:#7b899e;line-height:1.45;}
:root[data-theme="dark"] .profit-readiness{background:#20324a;border-color:#3b5070;color:#e1eafb;}
:root[data-theme="dark"] .profit-readiness-track{background:#394b65;}
:root[data-theme="dark"] .profit-readiness-item small,:root[data-theme="dark"] .profit-readiness>small{color:#abc0d9;}
@media(max-width:680px){.profit-readiness-items{grid-template-columns:1fr;}.sidebar-store-list{padding-left:6px;}.sidebar-store-item{font-size:10px;}}

@media (max-width: 900px){.sidebar-store-list{padding-left:0}.sidebar-store-toggle{padding:7px 2px;justify-content:center;font-size:9px}.sidebar-store-toggle>span{display:none}.sidebar-store-item{padding:6px 2px;font-size:9px;text-align:center;white-space:normal;overflow-wrap:anywhere}}

/* v0.4.18 — Approved compact dashboard layout. Presentation only: all API values stay factual. */
#overview.page-content{padding-top:25px;}
#overview .page-heading{align-items:center;gap:18px;}
#overview .eyebrow{font-size:10px;letter-spacing:1.25px;color:#8b9ab2;}
#overview .subtitle{font-size:12px;line-height:1.5;}
#overview .filter-row{margin:14px 0 13px;gap:10px;flex-wrap:wrap;}
#overview .kpi-grid-three{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:14px;}
#overview .kpi-card{min-height:145px;max-height:none;padding:17px 18px 16px;}
#overview .kpi-top{font-size:12px;font-weight:650;}
#overview .kpi-icon{width:34px;height:34px;border-radius:10px;font-size:17px;}
#overview .kpi-value{font-size:clamp(22px,2.35vw,32px);line-height:1.16;letter-spacing:-.8px;margin-top:13px;overflow-wrap:anywhere;white-space:normal;}
#overview .kpi-foot{font-size:11px;margin-top:10px;flex-wrap:wrap;gap:9px;}
#overview .neutral-chip{font-size:10.5px;padding:4px 8px;}
#overview .profit-kpi-card{position:relative;}
#overview .profit-kpi-card #kpi-margin{font-size:10px;}
#overview .profit-compact-meter{margin-top:10px;max-width:360px;display:grid;gap:6px;}
#overview .profit-compact-label{color:#627b9d;font-size:11px;font-weight:650;}
#overview .profit-compact-track{display:block;width:100%;height:7px;border-radius:20px;background:#dee6f1;overflow:hidden;}
#overview .profit-compact-track>span{display:block;width:0;height:100%;background:linear-gradient(90deg,#3cbb89,#63d5a4);border-radius:inherit;transition:width .3s;}
#overview .profit-why-button{border:1px solid #d6e3fb;background:#eef3ff;border-radius:8px;color:#4266c6;font-size:11px;padding:6px 9px;}
#overview .profit-why-button:hover{background:#e2eaff;}
#overview .profit-explanation{position:absolute;z-index:11;top:calc(100% - 8px);left:16px;right:16px;box-shadow:0 16px 36px #071b3830;}
/* Total and title share a single compact header row. */
#overview .orders-overview{padding:20px 22px!important;margin-top:15px;border-radius:17px;}
#overview .orders-title-row{align-items:center;justify-content:space-between;gap:18px;}
#overview .orders-title-row h2{font-size:19px;margin:0;}
#overview .orders-title-row p{font-size:11px;line-height:1.3;margin:6px 0 0;}
#overview .orders-total-inline{display:flex;align-items:baseline;justify-content:flex-end;gap:12px;flex-shrink:0;white-space:nowrap;}
#overview .orders-total-inline span{font-size:12px;color:#8191a8;}
#overview .orders-total-inline strong{font-size:29px;font-weight:800;color:var(--text);letter-spacing:-1.2px;font-variant-numeric:tabular-nums;}
#overview .orders-legacy[hidden]{display:none!important;}
#overview .orders-overview-right{padding:12px 0 0!important;}
#overview .orders-overview-right h3{font-size:13px!important;margin:0 0 10px!important;color:#7185a3;font-weight:650;}
#overview .orders-status-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;overflow:visible;}
#overview .orders-status-card{padding:12px 12px 10px;gap:12px;min-height:113px;border-radius:13px;}
#overview .orders-status-top{font-size:12px;gap:6px;line-height:1.3;}
#overview .orders-status-icon{width:30px;height:30px;min-width:30px;font-size:16px;border-radius:9px;}
#overview .orders-status-summary>strong{font-size:24px;font-weight:760;}
#overview .orders-status-summary small{font-size:11px;}
#overview .orders-status-card .orders-progress{height:6px;}
#overview .orders-unknown-inline{margin-top:11px;font-size:12px;padding:9px 11px;}
#overview .orders-stage-details,#overview .orders-diagnostics{margin-top:11px;padding-top:11px;border-top:1px solid #dbe4f0;}
#overview .orders-stage-details>summary,#overview .orders-diagnostics>summary{cursor:pointer;color:#56739f;font-size:12px;font-weight:650;line-height:1.5;list-style:revert;}
#overview .orders-diagnostics>summary span{font-size:11px;}
#overview .orders-stage-details:not([open]) #orders-stage-list{display:none;}
#overview .orders-stage-list{margin-top:12px;border-top:0;padding-top:0;}
#overview .orders-status-note{margin:10px 0 0;font-size:11px;line-height:1.55;}
#overview .orders-popover{z-index:40;}
/* A concise status row beneath the orders instead of a full-screen diagnostics panel. */
#overview .wb-sync-diagnostic{display:grid;grid-template-columns:minmax(220px,1.15fr) minmax(290px,1.7fr) auto;gap:12px 16px;align-items:center;margin:15px 0 0;padding:13px 17px;border-radius:13px;}
#overview .wb-sync-compact-heading{min-width:0;gap:10px;}
#overview .wb-sync-diagnostic-body>strong{font-size:13px;line-height:1.35;}
#overview .wb-sync-diagnostic-body>p{font-size:11px;line-height:1.4;margin-top:3px;}
#overview .wb-sync-status-chips{display:flex;flex-wrap:wrap;gap:5px;margin:0;align-items:center;}
#overview .wb-status-chip{font-size:10.5px;min-height:30px;padding:5px 7px;white-space:normal;}
#overview .wb-sync-all-details{margin:0;padding:0;border:0;min-width:182px;}
#overview .wb-sync-all-details>summary{font-size:11px;line-height:1.4;color:#5574a7;list-style:none;display:inline-flex;gap:7px;align-items:center;cursor:pointer;white-space:normal;}
#overview .wb-sync-all-details>summary::after{content:'⌄';font-size:18px;line-height:1;transform-origin:center;transition:transform .15s;}
#overview .wb-sync-all-details[open]>summary::after{transform:rotate(180deg);}
#overview .wb-sync-all-details[open]{grid-column:1/-1;border-top:1px solid #d9e2f0;padding-top:12px;width:100%;}
#overview .wb-sync-folders{margin:10px 0 0;}
#overview .wb-sync-folders details{min-width:0;}
/* Profit data integrity: separate four checks from the KPI height. */
#overview .profit-data-panel{margin-top:15px;padding:18px 20px;border-radius:14px;}
#overview .profit-data-panel[hidden]{display:none!important;}
#overview .profit-data-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;}
#overview .profit-data-heading-copy{display:flex;gap:12px;align-items:center;min-width:0;}
#overview .profit-data-info-icon{display:grid;place-items:center;flex-shrink:0;width:33px;height:33px;background:#fff4e3;color:#ba843b;font-size:20px;border-radius:10px;}
#overview .profit-data-heading h2{font-size:14px;line-height:1.4;margin:0;font-weight:750;letter-spacing:0;}
#overview .profit-data-heading p{margin:5px 0 0;font-size:11px;line-height:1.4;color:#7a8ba2;}
#overview .profit-readiness-toggle{padding:9px 11px;white-space:nowrap;font-size:11px;}
#overview .profit-readiness-toggle[aria-expanded="false"] span{display:inline-block;transform:rotate(-90deg);}
#overview .profit-readiness{background:transparent;border:none;border-radius:0;padding:0;margin:13px 0 0;color:inherit;}
#overview .profit-readiness-title,#overview .profit-readiness-track{display:none;}
#overview .profit-readiness-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0;}
#overview .profit-readiness-item{display:flex;gap:10px;align-items:flex-start;background:#f7f9fe;border:1px solid #e4eaf3;border-radius:10px;padding:12px;min-width:0;min-height:80px;font-size:11px;}
#overview .profit-readiness-item>span:first-child{font-size:19px;line-height:1;}
#overview .profit-readiness-item strong{font-size:11px;line-height:1.5;}
#overview .profit-readiness-item small{font-size:10.5px;line-height:1.45;}
#overview .profit-readiness>small{font-size:10.5px;line-height:1.5;margin-top:10px;}
#overview .profit-cost-shortcut{font-size:11px;margin-top:10px;padding:4px 0;}
/* Uniform contrast and accessible click affordances. */
#overview button:focus-visible,#overview summary:focus-visible,#overview .orders-status-card:focus-visible{outline:2px solid #83a3fb;outline-offset:3px;}
#overview .wb-sync-diagnostic summary:hover,#overview .orders-stage-details summary:hover,#overview .orders-diagnostics summary:hover{color:#6c90d9;}
:root[data-theme="dark"] #overview .profit-compact-label{color:#aec1df;}
:root[data-theme="dark"] #overview .profit-compact-track{background:#3a4b62;}
:root[data-theme="dark"] #overview .profit-why-button{background:#293f60;border-color:#415d89;color:#bcd0fc;}
:root[data-theme="dark"] #overview .profit-why-button:hover{background:#345276;}
:root[data-theme="dark"] #overview .orders-total-inline span{color:#a9bbd3;}
:root[data-theme="dark"] #overview .orders-overview-right h3{color:#b2c8e9;}
:root[data-theme="dark"] #overview .orders-stage-details,:root[data-theme="dark"] #overview .orders-diagnostics{border-color:#394d69;}
:root[data-theme="dark"] #overview .orders-stage-details>summary,:root[data-theme="dark"] #overview .orders-diagnostics>summary{color:#b3c8ed;}
:root[data-theme="dark"] #overview .wb-sync-all-details[open]{border-color:#3e506a;}
:root[data-theme="dark"] #overview .profit-data-info-icon{background:#4a392b;color:#ffca80;}
:root[data-theme="dark"] #overview .profit-data-heading p{color:#afc1df;}
:root[data-theme="dark"] #overview .profit-readiness-item{background:#223650;border-color:#3d516f;color:#e1eafb;}
@media(max-width:1450px){#overview .wb-sync-diagnostic{grid-template-columns:1fr 1.2fr;}#overview .wb-sync-all-details{grid-column:1/-1;}#overview .orders-status-list{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:1120px){#overview .kpi-grid-three{grid-template-columns:repeat(3,minmax(0,1fr));}#overview .profit-readiness-items{grid-template-columns:repeat(2,minmax(0,1fr));}#overview .wb-sync-diagnostic{grid-template-columns:1fr;}#overview .wb-sync-all-details{grid-column:1;}#overview .orders-status-list{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:730px){#overview .kpi-grid-three{grid-template-columns:1fr;}#overview .page-heading{align-items:stretch;}#overview .orders-status-list{grid-template-columns:repeat(2,minmax(0,1fr));}#overview .orders-total-inline{gap:6px;}#overview .orders-total-inline span{font-size:10px;}#overview .orders-total-inline strong{font-size:23px;}#overview .orders-title-row h2{font-size:17px;}#overview .profit-data-heading{align-items:flex-start;flex-direction:column;}#overview .profit-readiness-items{grid-template-columns:1fr;}#overview .orders-overview{padding:15px!important;}#overview .wb-sync-diagnostic{padding:12px;}#overview .orders-status-card{padding:9px;gap:8px;}#overview .orders-status-top{font-size:11px;}}

/* v0.4.19 — two balanced KPI cards, finance readiness inside profit card. */
#overview .kpi-grid-three{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;}
#overview .kpi-grid-three>.kpi-card{min-height:205px;}
#overview .sales-average-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid var(--border);margin-top:16px;padding-top:13px;color:var(--muted,#8897b3);font-size:12px;}
#overview .sales-average-inline strong{font-size:19px;color:var(--text,#e7efff);font-variant-numeric:tabular-nums;}
#overview .sales-average-inline small{font-size:10px;opacity:.8;}
#overview .profit-card-details-toggle{margin-top:12px;border:0;background:none;cursor:pointer;color:#6b78dd;font-size:12px;font-weight:650;padding:7px 0;text-align:left;}
#overview .profit-card-details-toggle:hover{text-decoration:underline;}
#overview .profit-card-details-toggle[hidden]{display:none;}
#overview .profit-kpi-card .profit-readiness{display:block!important;margin-top:8px;padding-top:12px;border-top:1px solid var(--border);}
#overview .profit-kpi-card .profit-readiness[hidden]{display:none!important;}
#overview .profit-kpi-card .profit-readiness-title,#overview .profit-kpi-card .profit-readiness-track{display:flex;}
#overview .profit-kpi-card .profit-readiness-title{justify-content:space-between;font-size:11px;}
#overview .profit-kpi-card .profit-readiness-track{display:block;}
#overview .profit-kpi-card .profit-readiness-items{grid-template-columns:1fr;gap:8px;}
#overview .profit-kpi-card .profit-readiness-item{min-height:0;padding:9px 11px;}
#overview .profit-kpi-card .profit-readiness-item strong{font-size:12px;}
#overview .cost-form-fields{grid-template-columns:minmax(200px,400px);}
.finance-charges{margin-top:18px;padding-top:17px;border-top:1px solid var(--border);}
.finance-charges-heading h3{font-size:15px!important;margin:0 0 5px;color:var(--text,#36445e);}
.finance-charges-heading p{font-size:11px;line-height:1.6;color:var(--muted,#8493ad);margin:0 0 11px;}
.finance-charges-list{display:grid;gap:6px;margin-top:12px;}
.finance-charge-row{display:grid;grid-template-columns:minmax(0,1fr) auto 16px;align-items:center;gap:12px;width:100%;padding:12px 13px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text,#36445e);text-align:left;cursor:pointer;font:inherit;}
.finance-charge-row:hover,.finance-charge-row:focus-visible{outline:2px solid #6686cc;outline-offset:1px;}
.finance-charge-row span:first-child{display:grid;gap:4px;font-size:12px;font-weight:650;}
.finance-charge-row small{font-size:10px;font-weight:400;opacity:.65;}
.finance-charge-row strong{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums;}
.finance-charges-details{border:1px solid var(--border);border-radius:10px;padding:13px;margin-top:12px;}
.finance-charges-details[hidden]{display:none!important;}
.finance-charges-head,.finance-charges-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.finance-charges-head strong{font-size:13px;}
.finance-charges-table{border-collapse:collapse;width:100%;font-size:11px;}
.finance-charges-table th,.finance-charges-table td{padding:10px 9px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;}
.finance-charges-table td small{display:block;margin-top:3px;line-height:1.5;opacity:.7;}
.finance-charges-table .finance-charge-amount{text-align:right;white-space:nowrap;font-weight:700;}
.finance-charges-footer{font-size:11px;color:var(--muted,#8493ad);margin:12px 0 0;}
@media(max-width:730px){#overview .kpi-grid-three{grid-template-columns:1fr;}#overview .kpi-grid-three>.kpi-card{min-height:160px;}}

/* v0.4.20 — compact profit card with one accessible modal instead of nested panels. */
#overview .profit-kpi-card .profit-open-modal{display:inline-flex;align-items:center;justify-content:center;margin-top:14px;padding:9px 13px;min-height:35px;font-size:12px;white-space:normal;}
#overview .profit-kpi-card .profit-compact-meter{max-width:100%;}
#overview .profit-modal{width:min(540px,calc(100% - 36px));max-height:min(80vh,740px);overflow-y:auto;border:1px solid var(--border);border-radius:16px;padding:24px;background:var(--surface,#fff);color:var(--text,#283a55);box-shadow:0 24px 70px rgba(0,10,31,.45);position:fixed;inset:0;margin:auto;z-index:1200;}
#overview .profit-modal:not([open]){display:none!important;}
#overview .profit-modal::backdrop{background:rgba(5,13,30,.72);backdrop-filter:blur(3px);}
#overview .profit-modal-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px;}
#overview .profit-modal-heading h2{font-size:19px;line-height:1.35;margin:0 0 7px;}
#overview .profit-modal-heading p{font-size:12px;color:var(--muted,#8493ad);line-height:1.55;margin:0;}
#overview .profit-modal-close{flex:0 0 auto;width:34px;height:34px;border:1px solid var(--border);background:var(--surface-soft,#f4f7fc);color:var(--text,#283a55);border-radius:8px;font-size:23px;cursor:pointer;line-height:1;}
#overview .profit-modal .profit-readiness{display:block!important;margin-top:8px;padding:0;border:none;background:transparent;}
#overview .profit-modal .profit-readiness[hidden]{display:none!important;}
#overview .profit-modal .profit-readiness-items{display:grid;grid-template-columns:1fr;gap:8px;margin:0;}
#overview .profit-modal .profit-readiness-item{display:flex;min-height:0;gap:10px;align-items:flex-start;background:var(--surface-soft,#f7f9fe);border:1px solid var(--border);border-radius:10px;padding:11px 12px;}
#overview .profit-modal .profit-readiness-item strong{font-size:12px;}
#overview .profit-modal .profit-readiness-item small{font-size:11px;line-height:1.5;}
#overview .profit-modal .profit-readiness>small{font-size:11px;line-height:1.55;margin-top:15px;}
#overview .profit-modal .profit-cost-shortcut{margin:14px 0 0;font-size:12px;}
:root[data-theme="dark"] #overview .profit-modal{background:#182639;border-color:#3c5471;color:#e8f1ff;}
:root[data-theme="dark"] #overview .profit-modal-close{background:#243852;color:#e8f1ff;}
:root[data-theme="dark"] #overview .profit-modal .profit-readiness-item{background:#223650;border-color:#3d516f;color:#e1eafb;}

/* v0.4.20 — finance charges are a readable part of Expense Structure, not date-based drilldowns. */
.finance-charges{margin:14px 0 0;padding:15px 0 0;border-top:1px solid var(--border);}
.finance-charges-list{display:grid;gap:0;margin-top:12px;}
.finance-charge-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 4px;width:100%;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;cursor:default;outline:0;}
.finance-charge-row:hover,.finance-charge-row:focus-visible{outline:0;}
.finance-charge-row>span:first-child{display:block;font-size:12px;font-weight:600;min-width:0;}
.finance-charge-row strong{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums;}
.finance-logistics-breakdown{display:grid;gap:9px;background:var(--surface-soft,#f7f9fd);border:1px solid var(--border);border-radius:10px;padding:13px 15px;margin:11px 0;}
.finance-logistics-breakdown>strong{font-size:12px;margin-bottom:2px;color:var(--text,#243d58);}
.finance-logistics-line{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted,#7d8fa9);font-size:12px;}
.finance-logistics-line strong{white-space:nowrap;color:var(--text,#243d58);font-variant-numeric:tabular-nums;font-size:12px;}
.finance-logistics-breakdown small{font-size:10px;line-height:1.55;color:var(--muted,#7d8fa9);margin-top:3px;}
:root[data-theme="dark"] .finance-logistics-breakdown{background:#21344e;}
:root[data-theme="dark"] .finance-logistics-breakdown>strong,:root[data-theme="dark"] .finance-logistics-line strong{color:#e4efff;}
/* Do not retain the technical delivery/debug accordion on the dashboard. */
#overview .orders-unknown-hint{font-size:11px;color:var(--muted,#8094b4);}

/* v0.4.21 — digits update once per second without changing layout width. */
#wb-sync-top-text, #wb-sync-diagnostic-retry,
#wb-sync-schedule-list [data-schedule-source], .sync-button-label, #finance-sync, #promotion-sync {
  font-variant-numeric: tabular-nums;
}


/* v0.4.22 — unified financial dashboard next to the six existing order cards. */
#overview .wb-overview-duo{display:grid;grid-template-columns:minmax(0,1.63fr) minmax(350px,1fr);gap:15px;align-items:start;margin:14px 0 20px;}
#overview .wb-finance-overview{min-width:0;padding:20px 21px 17px;border-radius:17px;margin:0;}
#overview .wb-finance-heading{display:flex;align-items:center;gap:11px;margin:0 0 16px;min-width:0;}
#overview .wb-finance-heading-icon{display:grid;place-items:center;width:39px;height:39px;flex:0 0 39px;border-radius:11px;background:#d8f5e9;color:#147b5a;font-size:22px;font-weight:800;}
#overview .wb-finance-heading h2{font-size:18px;line-height:1.3;margin:0;font-weight:760;}
#overview .wb-finance-heading p{font-size:11px;line-height:1.5;color:var(--muted);margin:3px 0 0;}
#overview .wb-finance-period{font-size:10px;color:var(--muted);margin-left:auto;white-space:nowrap;}
#overview .wb-finance-overview>.kpi-grid-three{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:0;align-items:stretch;}
#overview .wb-finance-overview .kpi-grid-three>.kpi-card{min-width:0;min-height:130px;max-height:none;padding:16px;border-radius:13px;background:var(--surface-soft,#f7faff);}
#overview .wb-finance-overview .kpi-grid-three>.wb-finance-profit{grid-column:1/-1;min-height:0;}
#overview .wb-finance-overview .kpi-value{font-size:clamp(21px,2vw,32px);line-height:1.15;letter-spacing:-.4px;margin:13px 0 9px;}
#overview .wb-finance-overview .sales-average-inline{margin-top:11px;padding-top:9px;gap:7px;}
#overview .wb-finance-overview .sales-average-inline small{width:100%;}
#overview .wb-finance-payout{min-width:0;display:flex;flex-direction:column;gap:11px;justify-content:flex-start;padding:16px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft,#f7faff);}
#overview .wb-finance-tile-label{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:650;}
#overview .wb-finance-tile-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#e5ecff;color:#5e7cbb;font-size:19px;}
#overview .wb-finance-payout>strong{display:block;font-size:clamp(20px,2vw,30px);line-height:1.15;letter-spacing:-.4px;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
#overview .wb-finance-payout>small{display:block;font-size:11px;color:var(--muted);line-height:1.45;}
#overview .wb-finance-profit{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 14px;background:#f2f9f6!important;border-color:#bde6d6!important;}
#overview .wb-finance-profit .kpi-top,#overview .wb-finance-profit .kpi-value,#overview .wb-finance-profit .kpi-foot{grid-column:1;}
#overview .wb-finance-profit .kpi-value{font-size:24px;margin:2px 0;}
#overview .wb-finance-profit .profit-compact-meter{grid-column:2;grid-row:1/span 3;width:150px;margin:0;}
#overview .wb-finance-profit .profit-open-modal{grid-column:1/-1;justify-self:start;margin-top:5px;}
#overview .wb-finance-section-title{margin:17px 0 0;border-top:1px solid var(--border);padding-top:14px;}
#overview .wb-finance-section-title h3{margin:0;font-size:15px;line-height:1.45;}
#overview .wb-finance-section-title p{font-size:10.5px;color:var(--muted);margin:4px 0 0;line-height:1.6;}
#overview .wb-finance-charges{margin:0;padding:0;border:0;}
#overview .wb-finance-charges .finance-charges-list{display:grid;grid-template-columns:minmax(0,1.07fr) minmax(0,.93fr);gap:0 14px;margin-top:12px;align-items:start;}
#overview .wb-finance-charges .finance-charge-row{grid-column:1;padding:9px 1px;min-width:0;}
#overview .wb-finance-charges .finance-charge-row>span:first-child{font-size:11px;font-weight:550;}
#overview .wb-finance-charges .finance-charge-row strong{font-size:11.5px;}
#overview .wb-finance-charges .finance-logistics-breakdown{grid-column:2;grid-row:1/span 15;align-self:start;margin:0;padding:12px 11px;gap:8px;}
#overview .wb-finance-charges .finance-logistics-line{font-size:10.5px;align-items:flex-start;}
#overview .wb-finance-charges .finance-logistics-line strong{font-size:10.5px;}
#overview .wb-finance-charges .finance-logistics-breakdown small{font-size:9.5px;}
#overview .wb-finance-charges>.finance-caution{display:none;}
#overview .wb-finance-ads-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 1px;margin:10px 0 0;border-top:1px solid var(--border);font-size:12px;font-weight:650;}
#overview .wb-finance-ads-row small{display:block;color:var(--muted);font-weight:400;font-size:10px;margin-top:4px;}
#overview .wb-finance-ads-row strong{white-space:nowrap;font-variant-numeric:tabular-nums;}
#overview .wb-finance-overview>.finance-footnote{margin:0;padding:7px 0;font-size:10px;line-height:1.6;opacity:.86;}
#overview .wb-finance-tech{margin:11px 0 0;padding-top:11px;border-top:1px solid var(--border);}
#overview .wb-finance-tech>summary{font-size:11px;color:var(--blue);font-weight:650;cursor:pointer;line-height:1.55;}
#overview .wb-finance-tech .finance-integration{margin:12px 0 0;}
#overview .wb-finance-tech #expense-breakdown[hidden]{display:none!important;}
#overview .wb-overview-duo>.orders-overview{display:block!important;min-width:0;margin:0!important;padding:20px 17px!important;border-radius:17px;align-self:start;}
#overview .wb-overview-duo>.orders-overview[hidden]{display:none!important;}
#overview .wb-overview-duo .orders-title-row{align-items:center;}
#overview .wb-overview-duo .orders-title-row h2{font-size:18px;}
#overview .wb-overview-duo .orders-total-inline strong{font-size:29px;}
#overview .wb-overview-duo .orders-overview-right{padding:16px 0 0!important;}
#overview .wb-overview-duo .orders-status-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;overflow:visible!important;}
#overview .wb-overview-duo .orders-status-card{min-height:116px;padding:12px;gap:12px;}
#overview .wb-overview-duo .orders-status-card .orders-progress{display:block;}
#overview .wb-overview-duo .orders-status-top{font-size:12px;}
#overview .wb-overview-duo .orders-status-card:nth-child(odd) .orders-popover{left:0;right:auto;transform:none;}
#overview .wb-overview-duo .orders-status-card:nth-child(even) .orders-popover{left:auto;right:0;transform:none;}
#overview .wb-overview-duo .orders-status-summary>strong{font-size:25px;}
#overview .wb-overview-duo .orders-unknown-inline{line-height:1.55;}
#overview .wb-sync-diagnostic{margin:12px 0 14px;}
#overview .wb-secondary-statistics{grid-template-columns:minmax(0,1fr);}
#overview .wb-secondary-statistics>.panel{width:100%;}
:root[data-theme="dark"] #overview .wb-finance-heading-icon{background:#164536;color:#7be6b2;}
:root[data-theme="dark"] #overview .wb-finance-overview .kpi-grid-three>.kpi-card,
:root[data-theme="dark"] #overview .wb-finance-payout{background:#20324a;border-color:#354b68;}
:root[data-theme="dark"] #overview .wb-finance-tile-icon{background:#304b71;color:#a1c5ff;}
:root[data-theme="dark"] #overview .wb-finance-profit{background:#143a34!important;border-color:#255e4e!important;}
@media(max-width:1270px){
  #overview .wb-overview-duo{grid-template-columns:1fr;}
  #overview .wb-overview-duo .orders-status-list{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:840px){
  #overview .wb-finance-charges .finance-charges-list{grid-template-columns:1fr;}
  #overview .wb-finance-charges .finance-logistics-breakdown{grid-column:1;grid-row:auto;margin-top:10px;}
  #overview .wb-overview-duo .orders-status-list{grid-template-columns:repeat(2,minmax(0,1fr));}
  #overview .wb-finance-profit .profit-compact-meter{grid-row:auto;grid-column:1/-1;width:100%;}
}
@media(max-width:610px){
  #overview .wb-finance-overview>.kpi-grid-three{grid-template-columns:1fr;}
  #overview .wb-finance-overview .kpi-grid-three>.wb-finance-profit{grid-column:1;}
  #overview .wb-finance-period{display:none;}
}
/* Unconfirmed net profit must not look like a confirmed green success KPI. */
#overview .wb-finance-profit{background:#f5f8fe!important;border-color:var(--border)!important;}
:root[data-theme="dark"] #overview .wb-finance-profit{background:#24344b!important;border-color:#39516d!important;}
/* The finance card occupies the full width when order-status data are unavailable. */
#overview .wb-overview-duo:has(>.orders-overview[hidden]){grid-template-columns:minmax(0,1fr);}

/* v0.4.23: Ozon import progress, same desktop-first layout as Wildberries. */
.ozon-sync-info{border:1px solid var(--line,#37475b);border-radius:14px;padding:15px 20px;margin:12px 0 18px;background:var(--panel,#111c2c);color:inherit}
.ozon-sync-info[hidden]{display:none!important}
.ozon-sync-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.ozon-sync-head #ozon-sync-message{margin-left:auto;font-size:13px;opacity:.8}
.ozon-sync-actions{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:10px}
.ozon-sync-info small{display:block;max-width:900px;line-height:1.5;opacity:.72}

/* v0.4.24: Server-admin link remains hidden for non-admin accounts. */
#admin-dashboard-link[hidden]{display:none!important}
