:root {
    --ink: #1d2733;
    --muted: #647180;
    --line: #dfe5ea;
    --line-soft: #edf1f4;
    --surface: #ffffff;
    --surface-soft: #f5f7f9;
    --canvas: #edf1f4;
    --blue: #527da5;
    --blue-dark: #315b82;
    --blue-soft: #e8f0f7;
    --green: #2f765d;
    --green-soft: #e5f3ed;
    --amber: #a56a12;
    --amber-soft: #fff3db;
    --red: #a74646;
    --red-soft: #fae9e8;
    --purple: #725884;
    --purple-soft: #f0eaf4;
    --shadow: 0 10px 30px rgba(29, 39, 51, .06);
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { max-width: 100%; margin: 0; overflow-x: hidden; min-width: 320px; background: var(--canvas); }
@media (min-width: 901px) {
    html.analysis-page-scroll-locked,
    html.analysis-page-scroll-locked body { height: 100%; overflow-y: hidden; }
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.18; letter-spacing: -.025em; margin-bottom: 0; }
h2 { font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #222c37; color: #eaf0f5; padding: 26px 18px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: linear-gradient(145deg, #6f9bc2, #496f92); color: #fff; font-weight: 800; letter-spacing: -.04em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .92rem; }
.brand small { color: #aebbc7; font-size: .68rem; margin-top: 2px; }
.main-nav { display: grid; gap: 4px; margin-top: 38px; }
.main-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #b9c4ce; font-size: .84rem; font-weight: 600; text-decoration: none; transition: .15s ease; }
.main-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.main-nav a.active { background: #f3f6f8; color: #263441; }
.nav-icon { width: 20px; text-align: center; font-size: 1.05rem; }
.sidebar-status { margin-top: auto; padding: 13px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.035); display: flex; gap: 9px; align-items: flex-start; }
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: .72rem; }
.sidebar-status small { font-size: .65rem; color: #9dacb9; margin-top: 2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; background: #75c4a4; box-shadow: 0 0 0 4px rgba(117,196,164,.12); }
.status-dot.warning { background: #e7ae53; box-shadow: 0 0 0 4px rgba(231,174,83,.12); }
.sidebar-footer { display: flex; justify-content: space-between; align-items: center; padding: 18px 9px 0; font-size: .7rem; color: #9dacb9; }
.sidebar-footer form { margin: 0; }
.sidebar-footer button { color: #c9d2da; background: none; border: 0; padding: 0; cursor: pointer; font-size: .7rem; }

.main-content { min-width: 0; padding: 27px clamp(20px, 3.3vw, 50px) 52px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.safety-pill { display: inline-flex; gap: 8px; align-items: center; background: var(--green-soft); color: var(--green); border: 1px solid #cce6da; border-radius: 999px; padding: 7px 11px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.safety-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.safety-pill .topbar-filter-count { padding-left: 10px; border-left: 1px solid #b9dccb; color: var(--ink); font-weight: 800; }

.scope-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; background: var(--blue-soft); border: 1px solid #cfdfed; border-radius: 11px; margin-bottom: 18px; }
.scope-banner.compact { padding-block: 12px; }
.scope-banner strong, .scope-banner span { display: block; }
.scope-banner strong { font-size: .8rem; }
.scope-banner div > span { color: #627789; font-size: .72rem; margin-top: 3px; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; padding: 8px 13px; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-size: .75rem; font-weight: 700; cursor: pointer; transition: .15s ease; }
.button.primary { background: var(--blue-dark); color: #fff; }
.button.primary:hover { background: #274d70; }
.button.secondary { border-color: #b9d0e2; background: rgba(255,255,255,.5); color: var(--blue-dark); }
.button.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.text-link { color: var(--blue-dark); text-decoration: none; font-size: .72rem; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.message { padding: 11px 14px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-dark); font-size: .78rem; border: 1px solid #cfdfed; }
.message.success { background: var(--green-soft); border-color: #cce6da; color: var(--green); }
.message.warning { background: var(--amber-soft); border-color: #e7c77e; color: #704c10; }
.message.error { background: var(--red-soft); border-color: #efcdcb; color: var(--red); }
.operational-alert-banner { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; padding: 8px 9px 8px 14px; border: 1px solid #ead3a8; border-radius: 9px; background: var(--amber-soft); color: #7d5718; font-size: .72rem; }
.operational-alert-banner[hidden] { display: none; }
.operational-alert-banner.critical { border-color: #efc5c3; background: var(--red-soft); color: var(--red); }
.operational-alert-banner span { font-size: .68rem; font-weight: 700; }
.operational-alert-link { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; padding: 3px 0; color: inherit; text-decoration: none; }
.operational-alert-close { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid currentColor; border-radius: 7px; background: rgba(255, 255, 255, .62); color: inherit; font: 700 1rem/1 sans-serif; cursor: pointer; opacity: .8; }
.operational-alert-close:hover, .operational-alert-close:focus-visible { background: #fff; opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.operational-alert-list { display: grid; gap: 9px; }
.operational-alert-item { display: grid; grid-template-columns: 85px 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 8px; background: var(--surface-soft); }
.operational-alert-item.severity-critical { border-left-color: var(--red); background: var(--red-soft); }
.operational-alert-item p { margin: 3px 0; color: #4f5d69; font-size: .72rem; }
.operational-alert-item small { font-size: .62rem; }
.compact-run-list { display: grid; gap: 8px; }
.compact-run-list > div { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.compact-run-list strong { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-run-list small { grid-column: 2; font-size: .61rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card { min-height: 115px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.kpi-card > span { color: var(--muted); font-size: .68rem; font-weight: 700; }
.kpi-card > strong { font-size: 1.5rem; line-height: 1; margin: auto 0 8px; letter-spacing: -.04em; }
.kpi-card > strong.money-kpi-value { font-size: clamp(1rem, 1.35vw, 1.3rem); white-space: nowrap; }
.kpi-card > small { font-size: .64rem; }
.kpi-card.danger { border-top: 3px solid var(--red); }
.kpi-card.warning { border-top: 3px solid var(--amber); }
.kpi-card.clearance { border-top: 3px solid #d46f1e; }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 19px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel-header .eyebrow { margin-bottom: .28rem; }
.data-asof { color: var(--muted); font-size: .66rem; white-space: nowrap; }
.portfolio-data-asof { display: grid; gap: 2px; text-align: right; }
.portfolio-data-asof strong { color: #405564; font-size: .67rem; font-weight: 800; }
.portfolio-data-asof small { color: var(--muted); font-size: .57rem; font-weight: 500; }

.distribution-chart { display: grid; gap: 13px; }
.distribution-columns,
.distribution-row { display: grid; grid-template-columns: 105px minmax(60px, 1fr) 52px 50px 112px; gap: 10px; align-items: center; }
.distribution-columns { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .06em; text-align: right; text-transform: uppercase; }
.distribution-columns span:first-child { text-align: left; }
.distribution-row { font-size: .72rem; }
.distribution-label { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.bar-track { height: 7px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--blue); min-width: 1px; }
.distribution-row strong { text-align: right; }
.distribution-row small { text-align: right; font-size: .63rem; }
.distribution-value { font-weight: 750; text-align: right; white-space: nowrap; }
.status-renner { background: var(--green) !important; }
.status-normal { background: var(--blue) !important; }
.status-slow_mover { background: var(--amber) !important; }
.status-clearance_candidate { background: #d46f1e !important; }
.status-penner { background: var(--red) !important; }
.status-not_evaluable { background: #8b97a3 !important; }

.badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; border-radius: 999px; padding: 4px 8px; font-size: .62rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.badge.safe { color: var(--green); background: var(--green-soft); }
.badge.warning { color: var(--amber); background: var(--amber-soft); }
.badge.danger { color: var(--red); background: var(--red-soft); }
.badge.neutral { color: var(--muted); background: var(--surface-soft); }
.class-renner { color: var(--green); background: var(--green-soft); }
.class-normal { color: var(--blue-dark); background: var(--blue-soft); }
.class-slow_mover { color: var(--amber); background: var(--amber-soft); }
.class-clearance_candidate { color: #a84f0d; background: #fff0df; }
.class-penner { color: var(--red); background: var(--red-soft); }
.class-not_evaluable { color: #5d6873; background: #edf0f2; }
.action-reduce { color: var(--red); background: var(--red-soft); }
.action-hold { color: var(--green); background: var(--green-soft); }
.action-review { color: var(--amber); background: var(--amber-soft); }
.action-raise { color: var(--purple); background: var(--purple-soft); }

.safety-summary { display: flex; gap: 12px; align-items: center; padding: 13px; background: var(--green-soft); border-radius: 9px; margin-bottom: 12px; }
.safety-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }
.safety-summary strong { font-size: .76rem; }
.safety-summary p { color: #537366; font-size: .68rem; margin: 3px 0 0; }
.definition-list { margin: 0 0 14px; display: grid; gap: 0; }
.definition-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .7rem; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; font-weight: 700; text-align: right; }
.definition-list.horizontal { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
.definition-list.horizontal > div { margin-right: 20px; }

.dashboard-sellthrough-panel { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.dashboard-sellthrough-panel:hover { border-color: #b9d0e2; box-shadow: 0 13px 34px rgba(29, 39, 51, .1); transform: translateY(-1px); }
.dashboard-sellthrough-heading { align-items: center; }
.dashboard-sellthrough-heading > div { display: grid; gap: 3px; }
.dashboard-sellthrough-heading small { max-width: 800px; font-size: .67rem; line-height: 1.4; }
.dashboard-sellthrough-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-sellthrough-row { display: grid; gap: 10px; min-height: 150px; padding: 14px; border: 1px solid var(--line-soft); border-top: 3px solid #d46f1e; border-radius: 10px; background: var(--surface-soft); }
.dashboard-sellthrough-row.category-penner { border-top-color: var(--red); }
.dashboard-sellthrough-category { display: grid; grid-template-columns: 9px minmax(120px, 1fr) auto; gap: 8px; align-items: center; }
.dashboard-sellthrough-category > div { display: grid; gap: 2px; }
.dashboard-sellthrough-category > div strong { font-size: .78rem; }
.dashboard-sellthrough-category > div small { font-size: .6rem; }
.dashboard-sellthrough-category > strong { font-size: .87rem; white-space: nowrap; }
.dashboard-sellthrough-result { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.dashboard-sellthrough-result span { color: var(--muted); font-size: .63rem; }
.dashboard-sellthrough-result strong { color: var(--green); font-size: .86rem; white-space: nowrap; }
.dashboard-sellthrough-track { height: 10px; overflow: hidden; border-radius: 999px; background: #dfe7e3; }
.dashboard-sellthrough-track i { display: block; width: min(var(--sellthrough-width), 100%); height: 100%; border-radius: inherit; background: var(--green); }
.dashboard-sellthrough-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .61rem; }
.dashboard-sellthrough-meta span:first-child { color: var(--green); font-weight: 800; }
.dashboard-sellthrough-meta span:last-child { text-align: right; }
.dashboard-sellthrough-empty { align-self: center; margin: 0; padding: 14px; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .65rem; text-align: center; }

.table-wrap { overflow-x: auto; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .pagination { padding: 13px 18px; }
table { width: 100%; border-collapse: collapse; font-size: .72rem; }
th { padding: 10px 11px; color: var(--muted); font-size: .61rem; letter-spacing: .05em; text-transform: uppercase; text-align: left; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td strong, td small { display: block; }
td small { font-size: .62rem; margin-top: 3px; white-space: nowrap; }
.number { text-align: right; white-space: nowrap; }
.strong-number { font-weight: 800; }
.stock-live-value { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.stock-live-value strong { display: inline; color: #000; font: inherit; }
.stock-live-value small { display: inline; margin: 0; color: var(--muted); font-size: .63rem; font-weight: 700; }
.analysis-table td[data-column="stock"] { position: relative; overflow: visible; }
.stock-reserved-value { position: relative; display: inline-flex; align-items: center; cursor: help; outline: 0; text-decoration-line: underline; text-decoration-style: dashed; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.stock-reserved-value::after { position: absolute; z-index: 24; top: calc(100% + 8px); left: 50%; display: none; padding: 8px 11px; border: 1px solid #7d8c97; border-radius: 6px; background: #e7ebee; box-shadow: 0 5px 14px rgba(28, 43, 54, .18); color: #263642; content: attr(data-stock-tooltip); font-size: .67rem; font-weight: 700; line-height: 1.3; text-align: left; white-space: nowrap; transform: translateX(-50%); }
.stock-reserved-value:hover::after, .stock-reserved-value:focus-visible::after { display: block; }
.analysis-table td[data-column="stock"]:has(.stock-reserved-value:hover), .analysis-table td[data-column="stock"]:has(.stock-reserved-value:focus-visible) { z-index: 20; }
.product-cell { min-width: 250px; max-width: 430px; }
.row-link { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; font-weight: 800; }
.action-text { display: block; width: fit-content; background: transparent; font-size: .68rem; font-weight: 800; }
.empty-state { padding: 35px !important; text-align: center; color: var(--muted); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; border-top: 1px solid var(--line-soft); font-size: .7rem; }
.pagination a { color: var(--blue-dark); font-weight: 700; text-decoration: none; }

.competitor-switcher { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 17px 18px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.competitor-tabs { display: flex; gap: 9px; flex-wrap: wrap; }
.competitor-tab { display: flex; flex-direction: column; min-width: 175px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; background: var(--surface-soft); }
.competitor-tab strong { font-size: .8rem; }
.competitor-tab small { margin-top: 3px; font-size: .65rem; }
.competitor-tab.active { border-color: #b9d0e2; color: var(--blue-dark); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(82,125,165,.08); }
.competitor-expand-note { max-width: 370px; padding-left: 16px; border-left: 3px solid var(--blue); }
.competitor-expand-note strong, .competitor-expand-note span { display: block; }
.competitor-expand-note strong { font-size: .74rem; }
.competitor-expand-note span { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.competitor-scope > .badge { flex: 0 0 auto; }
.competitor-kpis { grid-template-columns: repeat(7, minmax(140px, 1fr)); }
.competitor-panel-header { padding: 18px 18px 0; margin-bottom: 13px; }
.competitor-table-panel { overflow: hidden; }
.competitor-table { min-width: 1080px; }
.competitor-table th, .competitor-table td { padding-left: 16px; padding-right: 16px; }
.annual-projection-card { border-top: 3px solid var(--blue); }
.rank-cell { width: 42px; color: var(--muted); font-weight: 800; text-align: center; }
.trend-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .65rem; font-weight: 800; }
.methodology-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; padding: 18px; border: 1px solid #d5e0e8; border-radius: 12px; background: #f7fafc; }
.methodology-panel div { display: grid; gap: 4px; }
.methodology-panel strong { font-size: .72rem; }
.methodology-panel span, .methodology-panel p { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.methodology-panel p { grid-column: 1 / -1; margin: 3px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.competitor-empty { padding: 30px; }
.competitor-empty h2 { margin: 14px 0 7px; }
.competitor-empty p { margin: 0; color: var(--muted); font-size: .75rem; }

@media (max-width: 1500px) {
    .competitor-kpis { grid-template-columns: repeat(4, minmax(155px, 1fr)); }
}

@media (max-width: 760px) {
    .competitor-switcher { align-items: stretch; flex-direction: column; }
    .competitor-expand-note { max-width: none; }
    .competitor-kpis { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .methodology-panel { grid-template-columns: 1fr; }
    .methodology-panel p { grid-column: auto; }
}

.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(145px, auto)) auto auto; gap: 8px; margin-bottom: 13px; }
.filter-bar input, .filter-bar select, .price-form input, .price-form select, .price-form textarea, .form-stack input { width: 100%; min-height: 38px; border: 1px solid #cfd8df; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-size: .72rem; }
.filter-bar input:focus, .filter-bar select:focus, .price-form input:focus, .price-form select:focus, .price-form textarea:focus, .form-stack input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); }

.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; color: var(--muted); font-size: .68rem; margin: -12px 0 16px; }
.quality-alert { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 13px; margin-bottom: 14px; border: 1px solid #ecd49e; background: var(--amber-soft); color: #7d5718; border-radius: 9px; font-size: .7rem; }
.quality-alert span + span { border-left: 1px solid #e0c887; padding-left: 10px; }
.detail-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.detail-kpis article { padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 0; }
.detail-kpis article > span, .detail-kpis article > strong, .detail-kpis article > small { display: block; }
.detail-kpis article > span { color: var(--muted); font-size: .64rem; font-weight: 700; }
.detail-kpis article > strong { min-height: 28px; margin: 9px 0 5px; font-size: 1.15rem; }
.detail-kpis article > small { font-size: .6rem; }
.movement-bars { display: grid; gap: 15px; margin-top: 5px; }
.movement-bars > div { display: grid; grid-template-columns: 63px 1fr 45px 85px; gap: 10px; align-items: center; font-size: .7rem; }
.movement-bars strong { text-align: right; }
.movement-track { height: 10px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.movement-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #7da4c6); }
.recommendation-panel > p { color: #4f5d69; font-size: .75rem; line-height: 1.55; }
.recommended-price { background: var(--blue-soft); border-radius: 9px; padding: 13px; margin-bottom: 13px; }
.recommended-price span, .recommended-price strong { display: block; }
.recommended-price span { color: var(--blue-dark); font-size: .63rem; font-weight: 700; }
.recommended-price strong { margin-top: 4px; font-size: 1.4rem; }

.price-workbench { border-color: #cadbe9; }
.price-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(260px, .85fr); gap: 28px; }
.price-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.price-form label { color: var(--muted); font-size: .65rem; font-weight: 700; align-self: end; }
.price-form label[for="reason"], .price-form textarea, .target-fields, .price-form button, .form-safety { grid-column: 1 / -1; }
.price-input { position: relative; }
.price-input input { padding-right: 32px; font-size: 1rem; font-weight: 800; }
.price-input span { position: absolute; right: 11px; top: 10px; color: var(--muted); }
.target-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 10px 0 3px; font-size: .66rem; }
.target-fields > span { color: var(--muted); margin-right: 4px; }
.target-fields strong { padding: 5px 8px; border-radius: 6px; background: var(--surface-soft); }
.form-safety { color: var(--green); text-align: center; font-size: .62rem; margin: 0; }
.price-preview { display: grid; grid-template-columns: 1fr 1fr; align-content: start; background: var(--surface-soft); border-radius: 10px; overflow: hidden; }
.price-preview > div { padding: 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.price-preview > div:nth-child(even) { border-right: 0; }
.price-preview span, .price-preview strong { display: block; }
.price-preview span { color: var(--muted); font-size: .63rem; }
.price-preview strong { margin-top: 5px; font-size: 1rem; }
.price-preview .preview-change { grid-column: 1 / -1; border-right: 0; background: var(--blue-soft); }
.price-preview p { grid-column: 1 / -1; color: var(--red); font-size: .67rem; margin: 0; padding: 0 14px 12px; }

.mapping-list { display: grid; }
.mapping-list > div { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mapping-id { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; background: var(--blue-soft); color: var(--blue-dark); font-weight: 800; }
.mapping-list strong, .mapping-list small { display: block; }
.mapping-list strong { font-size: .73rem; }
.mapping-list small { font-size: .61rem; margin-top: 2px; }
.gate-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gate-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: var(--surface-soft); font-size: .7rem; }
.gate-list li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .62rem; font-weight: 800; }

.system-status-kpis { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.system-status-kpis .kpi-date { font-size: 1.2rem; letter-spacing: -.025em; }
.manual-refresh-panel { border-color: #bfd3e2; }
.manual-refresh-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.manual-refresh-heading h2 { margin: 0; }
.manual-refresh-heading p:not(.eyebrow) { max-width: 850px; margin: 5px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.manual-refresh-heading small { display: block; margin-top: 5px; color: var(--green); font-size: .65rem; font-weight: 700; }
.manual-refresh-heading form { display: grid; flex: 0 0 auto; justify-items: end; gap: 6px; }
.manual-refresh-heading form > span { min-height: 14px; color: var(--muted); font-size: .63rem; }
.manual-refresh-heading .button:disabled { cursor: wait; opacity: .62; }
.manual-refresh-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.manual-refresh-run-meta { display: flex; align-items: center; gap: 9px; }
.manual-refresh-run-meta strong { font-size: .73rem; }
.manual-refresh-run-meta small { color: var(--muted); font-size: .64rem; }
.manual-refresh-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin-top: 11px; }
.manual-refresh-result { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.manual-refresh-result > span:nth-child(2) { min-width: 0; }
.manual-refresh-result strong, .manual-refresh-result small { display: block; }
.manual-refresh-result strong { font-size: .68rem; }
.manual-refresh-result small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: .61rem; line-height: 1.4; text-overflow: ellipsis; }
.manual-refresh-result em { color: var(--muted); font-size: .61rem; font-style: normal; white-space: nowrap; }
.refresh-result-icon { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; font-size: .65rem; font-weight: 900; }
.refresh-result-icon.success { background: var(--green-soft); color: var(--green); }
.refresh-result-icon.failed { background: var(--red-soft); color: var(--red); }
.system-warning-summary { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #e8bf65; border-radius: 11px; background: var(--amber-soft); color: #704c10; }
.system-warning-summary strong { display: block; font-size: .78rem; }
.system-warning-summary p { margin: 4px 0 0; font-size: .69rem; line-height: 1.5; }
.system-warning-icon { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--amber); color: #fff; font-size: .8rem; font-weight: 800; }
.data-source-panel { padding: 0; overflow: hidden; }
.data-source-panel > .panel-header { margin: 0; padding: 19px; border-bottom: 1px solid var(--line); }
.data-source-list { display: grid; }
.data-source-row { display: grid; grid-template-columns: 118px minmax(190px, .85fr) minmax(330px, 1.5fr) minmax(210px, .85fr); gap: 16px; padding: 17px 19px 17px 15px; border-bottom: 1px solid var(--line-soft); border-left: 4px solid var(--green); background: var(--surface); }
.data-source-row:last-child { border-bottom: 0; }
.data-source-row.state-stale, .data-source-row.state-data_gap, .data-source-row.state-dependency_warning { border-left-color: var(--amber); background: linear-gradient(90deg, var(--amber-soft) 0, var(--surface) 90px); }
.data-source-row.state-error, .data-source-row.state-not_configured, .data-source-row.state-never_updated { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft) 0, var(--surface) 90px); }
.source-status-block { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.source-status-block .badge { font-size: .68rem; }
.source-status-block small { font-size: .66rem; }
.source-identity strong, .source-identity span, .source-identity code { display: block; }
.source-identity strong { font-size: .82rem; }
.source-identity span { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.source-identity code { max-width: 100%; margin-top: 8px; overflow: hidden; color: var(--blue-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .65rem; line-height: 1.45; overflow-wrap: anywhere; text-overflow: ellipsis; }
.source-subsource { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 8px; margin-top: 12px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: #f8fafc; }
.source-subsource > strong { font-size: .72rem; }
.source-subsource > small, .source-subsource > code, .source-subsource > em { grid-column: 1 / -1; margin: 0; font-size: .64rem; font-style: normal; line-height: 1.4; }
.source-subsource > em { color: var(--amber); font-weight: 700; }
.source-column-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.source-data-items ul { display: grid; gap: 4px; margin: 0; padding-left: 16px; }
.source-data-items li { color: #4c5b68; font-size: .7rem; line-height: 1.4; }
.source-timestamps { display: grid; align-content: start; gap: 10px; }
.source-timestamps span, .source-timestamps strong { display: block; }
.source-timestamps span { color: var(--muted); font-size: .64rem; font-weight: 700; }
.source-timestamps strong { margin-top: 3px; font-size: .74rem; }
.source-timestamps small { padding-top: 7px; border-top: 1px solid var(--line-soft); font-size: .64rem; }
.source-alert { grid-column: 2 / -1; display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #e7c77e; border-radius: 8px; background: var(--amber-soft); color: #704c10; font-size: .7rem; line-height: 1.45; }
.state-error .source-alert, .state-not_configured .source-alert, .state-never_updated .source-alert { border-color: #e8c1be; background: var(--red-soft); color: var(--red); }
.source-alert strong, .source-alert span { display: block; }
.source-info { grid-column: 2 / -1; display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #bfd3e2; border-radius: 8px; background: #f2f7fb; color: #315b78; font-size: .7rem; line-height: 1.45; }
.source-info span { display: block; }
.sync-source-cell { max-width: 260px; overflow-wrap: anywhere; color: var(--muted); font-size: .61rem; line-height: 1.45; }

.logic-scope { background: linear-gradient(105deg, var(--blue-soft), var(--surface)); }
.logic-scope-count { flex: 0 0 auto; color: var(--blue-dark); font-size: .72rem; font-weight: 800; }
.data-gap-alert { display: grid; gap: 4px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #e5c36d; border-radius: 9px; background: var(--amber-soft); color: #6d4d15; font-size: .7rem; line-height: 1.5; }
.data-gap-alert strong { font-size: .73rem; }
.logic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.logic-editor, .logic-reference { min-width: 0; }
.logic-reference { display: grid; gap: 16px; }
.logic-reference .panel { margin-bottom: 0; }
.logic-rule { position: relative; overflow: hidden; }
.logic-rule::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line); }
.logic-rule.rule-penner::before { background: var(--red); }
.logic-rule.rule-clearance::before { background: #d46f1e; }
.logic-rule.rule-slow::before { background: var(--amber); }
.logic-rule.rule-renner::before { background: var(--green); }
.logic-rule.rule-normal::before { background: var(--blue); }
.logic-rule-header { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; margin-bottom: 10px; }
.logic-rule-header h2 { margin: 0; }
.logic-rule-header .eyebrow { margin: 0 0 2px; }
.logic-priority { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: .7rem; font-weight: 800; }
.logic-description { max-width: 800px; margin: 0 0 14px 45px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.logic-expression { display: flex; align-items: stretch; gap: 8px; margin-left: 45px; }
.logic-expression-all { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; }
.logic-expression-pair { display: grid; grid-template-columns: 1fr auto 1fr; }
.expression-clause { display: flex; flex: 1 1 0; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); color: var(--ink); font-size: .69rem; }
.expression-clause-wide { flex-wrap: wrap; }
.expression-clause label, .expression-clause > span { color: var(--muted); }
.expression-clause strong { white-space: nowrap; }
.expression-and { font-size: .6rem; font-weight: 800; letter-spacing: .06em; }
.expression-operator { display: grid; place-items: center; flex: 0 0 42px; color: var(--muted); font-size: .58rem; font-weight: 800; }
.logic-input-with-unit { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.logic-input-with-unit input { width: 78px; min-height: 35px; border: 1px solid #c7d3dc; border-radius: 7px; background: var(--surface); color: var(--ink); padding: 6px 8px; text-align: right; font-size: .76rem; font-weight: 800; }
.logic-input-with-unit input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); outline: 0; }
.logic-input-with-unit em { color: var(--muted); font-size: .64rem; font-style: normal; white-space: nowrap; }
.logic-input-with-unit.compact input { width: 64px; }
.logic-action-setting { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin: 13px 0 0 45px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.logic-action-setting.static { grid-template-columns: 1fr; }
.logic-action-setting strong, .logic-action-setting span { display: block; }
.logic-action-setting strong { font-size: .68rem; }
.logic-action-setting div > span { margin-top: 2px; color: var(--muted); font-size: .63rem; }
.logic-action-setting > label { color: var(--muted); font-size: .64rem; font-weight: 700; }
.logic-action-setting.danger-setting { margin-right: -8px; padding: 12px 8px 0; border-top-color: #e8b6b2; background: linear-gradient(90deg, transparent, var(--red-soft)); }
.field-error { margin: 7px 0 0 45px; color: var(--red); font-size: .65rem; font-weight: 700; }
.logic-savebar { position: sticky; bottom: 12px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 4px 0 16px; padding: 14px 16px; border: 1px solid #bfd3e2; border-radius: 11px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(29,39,51,.11); }
.logic-savebar strong, .logic-savebar span { display: block; }
.logic-savebar strong { font-size: .72rem; }
.logic-savebar span { margin-top: 3px; color: var(--muted); font-size: .63rem; }
.logic-savebar .button { flex: 0 0 auto; }
.formula-list { display: grid; gap: 0; margin: 0; }
.formula-list > div { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.formula-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.formula-list dt { margin-bottom: 5px; color: var(--muted); font-size: .64rem; font-weight: 700; }
.formula-list dd { margin: 0; }
.formula-list code { display: inline-block; padding: 5px 7px; border-radius: 6px; background: var(--surface-soft); color: var(--blue-dark); font-size: .68rem; font-weight: 800; }
.formula-list small { display: block; margin-top: 5px; color: var(--muted); font-size: .61rem; line-height: 1.45; }
.not-evaluable-rule p { margin: 10px 0 0; color: var(--muted); font-size: .69rem; line-height: 1.5; }
.rule-history { display: grid; }
.rule-history > div { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.rule-history strong, .rule-history span, .rule-history small { display: block; }
.rule-history strong { font-size: .68rem; }
.rule-history span { margin-top: 2px; color: var(--ink); font-size: .63rem; }
.rule-history small { margin-top: 3px; color: var(--muted); font-size: .59rem; }
.logic-updated { margin: 12px 0 0; color: var(--muted); font-size: .59rem; }
.logic-description.no-indent, .field-error.no-indent { margin-left: 0; }
.lifecycle-settings { border-color: #c8d9e6; }
.lifecycle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lifecycle-grid > label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); color: var(--ink); font-size: .68rem; font-weight: 700; }
.lifecycle-grid small { grid-column: 1 / -1; color: var(--muted); font-size: .61rem; font-weight: 400; line-height: 1.45; }
.warning-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.warning-counts span { padding: 6px 9px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: .63rem; }
.warning-counts strong { color: var(--ink); }
.warning-cell { min-width: 125px; }
.warning-badge { display: block; width: fit-content; margin: 3px 0; padding: 4px 7px; border-radius: 999px; font-size: .59rem; font-weight: 800; white-space: nowrap; }
.warning-first-sale { background: var(--red-soft); color: var(--red); }
.warning-fast-mover-stale { background: #fff0dc; color: #9a4f13; }
.warning-no-sales { background: var(--amber-soft); color: #80591c; }
.warning-price-reduction { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #c7d0d7; background: #f1f3f5; color: #46545f; }
.warning-price-reduction strong { font-size: .86rem; line-height: .8; }
.warning-price-reduction span { font-size: .59rem; }
.warning-new { background: var(--blue-soft); color: var(--blue-dark); }
.warning-entry { display: block; margin: 4px 0 7px; }
.warning-entry .warning-badge { margin-bottom: 3px; }
.warning-entry > small { display: block; max-width: 155px; color: var(--muted); font-size: .55rem; line-height: 1.35; white-space: normal; }

.analysis-workspace { display: flex; flex-direction: column; height: var(--analysis-workspace-height, calc(100vh - 165px)); min-height: 0; }
.analysis-sticky-tools { position: sticky; top: 0; z-index: 20; flex: 0 0 auto; padding-bottom: 9px; background: var(--canvas); }
.analysis-scope-banner { margin-bottom: 9px; }
.analysis-filter-form { margin-bottom: 8px; }
.analysis-filter-bar { grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(145px, auto)) auto auto; margin-bottom: 6px; }
.compact-multi-filter { position: relative; min-width: 155px; }
.compact-multi-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; padding: 8px 11px; border: 1px solid #c5d2dc; border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: .76rem; font-weight: 700; list-style: none; }
.compact-multi-filter summary::-webkit-details-marker { display: none; }
.compact-multi-filter summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.compact-multi-filter summary span { display: grid; place-items: center; min-width: 19px; height: 19px; margin-left: 4px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .63rem; }
.compact-multi-filter.active summary, .compact-multi-filter[open] summary { border-color: var(--blue); background: var(--blue-soft); }
.compact-multi-filter-options { position: absolute; z-index: 85; top: calc(100% + 5px); left: 0; box-sizing: border-box; width: 280px; overflow: hidden; padding: 12px; border: 1px solid #b8cad7; border-radius: 9px; background: var(--surface); box-shadow: 0 14px 32px rgba(30,48,62,.2); }
.compact-multi-filter.warning-filter .compact-multi-filter-options { width: 440px; max-width: calc(100vw - 32px); }
.compact-multi-filter.warning-filter .compact-multi-filter-options label { white-space: nowrap; }
.compact-multi-filter-options > strong { display: block; margin-bottom: 8px; font-size: .73rem; }
.compact-multi-filter-options > div { display: grid; gap: 4px; width: 100%; }
.compact-multi-filter-options label { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 34px; padding: 5px 6px; color: #425665; font-size: .74rem; font-weight: 650; }
.filter-bar .compact-multi-filter-options input[type="checkbox"] { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 0; padding: 0; border-radius: 3px; box-shadow: none; accent-color: var(--blue); }
.analysis-workspace.filters-expanded { height: auto; min-height: 0; }
.analysis-workspace.filters-expanded .analysis-sticky-tools { position: relative; }
.analysis-workspace.filters-expanded .analysis-table-panel { flex: 0 0 auto; height: 65vh; min-height: 520px; }
.advanced-filter-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.advanced-filter-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; min-height: 54px; padding: 9px 14px; color: var(--blue-dark); font-size: .86rem; font-weight: 800; cursor: default; }
.advanced-filter-heading-copy { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; margin-right: auto; }
.advanced-filter-summary .advanced-filter-title { width: fit-content; margin: 0; padding: 0; border: 0; background: transparent; color: var(--blue-dark); font: inherit; font-weight: 800; cursor: pointer; text-align: left; text-decoration: underline dotted; text-underline-offset: 4px; }
.advanced-filter-summary .advanced-filter-title:hover { color: var(--blue); text-decoration-style: solid; }
.advanced-filter-summary .advanced-filter-title:focus-visible { border-radius: 4px; outline: 2px solid var(--blue); outline-offset: 3px; }
.advanced-filter-summary small { display: block; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.3; }
.advanced-filter-summary > strong { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: .74rem; }
.active-filter-summary { display: flex; flex: 1 0 100%; flex-wrap: wrap; gap: 6px; }
.active-filter-summary > span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; font-weight: 500; }
.active-filter-remove { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 1px; border-radius: 50%; color: #73818b; font-size: .82rem; font-weight: 700; line-height: 1; text-decoration: none; }
.active-filter-remove:hover { background: #dde5ea; color: var(--ink); }
.active-filter-remove:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.active-filter-summary b { color: var(--ink); font-weight: 800; }
.selection-batch-tools { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 7px; margin-left: auto; }
.batch-select-page { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-size: .69rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.batch-select-page input, .row-selection-checkbox { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--blue); cursor: pointer; }
.batch-selection-count { min-width: 78px; color: var(--blue-dark); font-size: .69rem; font-weight: 800; text-align: center; white-space: nowrap; }
.selection-batch-tools .button { min-height: 34px; padding: 6px 10px; font-size: .69rem; }
.selection-batch-tools .batch-button:disabled { opacity: .48; cursor: not-allowed; }
.selection-batch-tools .batch-feedback { max-width: 260px; overflow: hidden; color: var(--green); font-size: .68rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.selection-batch-tools .batch-feedback:empty { display: none; }
.selection-batch-tools .batch-feedback.error { color: var(--red); }
.advanced-filter-content { padding: 14px; overflow: visible; border-top: 1px solid var(--line-soft); }
.advanced-filter-groups { display: grid; gap: 16px; }
.advanced-filter-group { --group-accent: var(--blue); --group-heading: #f3f7fb; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--group-accent); border-radius: 10px; background: var(--surface); box-shadow: 0 3px 10px rgba(32, 52, 69, .06); }
.advanced-filter-group h3 { margin: -16px -16px 15px; padding: 12px 15px; border-bottom: 1px solid var(--line); background: var(--group-heading); color: var(--ink); font-size: .92rem; }
.advanced-filter-group-2 { --group-accent: #8064b6; --group-heading: #f7f4fc; }
.advanced-filter-group-3 { --group-accent: #d28a25; --group-heading: #fff8ed; }
.advanced-filter-group-4 { --group-accent: #4f8a5b; --group-heading: #f2f8f3; }
.advanced-filter-group-5 { --group-accent: #448d91; --group-heading: #f0f8f8; }
.advanced-filter-group-6 { --group-accent: #9a6262; --group-heading: #fbf4f4; }
.advanced-filter-group-7 { --group-accent: #725f8f; --group-heading: #f7f4fa; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(155px, 1fr)); gap: 12px; }
.advanced-filter-grid label { display: grid; align-content: start; gap: 7px; min-width: 0; color: #536573; font-size: .76rem; font-weight: 700; }
.advanced-filter-grid input, .advanced-filter-grid select { width: 100%; min-height: 42px; border: 1px solid #c7d2db; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 9px 11px; font-size: .82rem; }
.advanced-filter-grid input:focus, .advanced-filter-grid select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); outline: 0; }
.advanced-filter-grid label.has-error input, .advanced-filter-grid label.has-error select { border-color: var(--red); }
.advanced-filter-grid label > small { color: var(--red); font-size: .7rem; line-height: 1.35; }
.advanced-status-filter { grid-column: span 2; min-width: 0; margin: 0; padding: 0; border: 0; }
.advanced-status-filter legend { margin-bottom: 7px; color: #536573; font-size: .76rem; font-weight: 700; }
.advanced-status-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.advanced-status-options label { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 10px; border: 1px solid #c7d2db; border-radius: 8px; background: var(--surface); cursor: pointer; }
.advanced-status-options input { flex: 0 0 auto; width: 16px; min-height: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--blue); }
.advanced-status-options span { overflow: hidden; color: var(--ink); font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.advanced-filter-error { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: .77rem; font-weight: 700; }
.saved-filter-section { margin-bottom: 18px; padding: 15px; border: 1px solid #b9d0e0; border-left: 5px solid var(--blue); border-radius: 10px; background: var(--blue-soft); box-shadow: 0 3px 10px rgba(32, 52, 69, .05); }
.saved-filter-heading { display: flex; align-items: end; gap: 12px; }
.saved-filter-heading > div:first-child { margin-right: auto; }
.saved-filter-heading h3 { margin: 0 0 4px; color: var(--ink); font-size: .92rem; }
.saved-filter-heading span { color: #526b7f; font-size: .74rem; }
.saved-filter-save-row { display: grid; grid-template-columns: minmax(190px, 270px) auto; gap: 7px; }
.saved-filter-save-row input { width: 100%; min-height: 42px; border: 1px solid #b9ccda; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 9px 11px; font-size: .82rem; }
.saved-filter-save-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); outline: 0; }
.saved-filter-save-row .button { min-height: 42px; padding-block: 9px; font-size: .76rem; }
.saved-filter-feedback { display: block; min-height: 19px; margin-top: 6px; color: var(--green); font-size: .73rem; font-weight: 700; }
.saved-filter-feedback.error { color: var(--red); }
.saved-filter-list { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-filter-item { display: flex; align-items: stretch; overflow: hidden; border: 1px solid #bdd0dd; border-radius: 8px; background: var(--surface); }
.saved-filter-item.active { border-color: var(--blue); background: var(--blue-soft); }
.saved-filter-apply { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 10px; color: var(--ink); text-decoration: none; }
.saved-filter-apply:hover { color: var(--blue-dark); }
.saved-filter-apply strong { font-size: .77rem; }
.saved-filter-apply small { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 500; }
.saved-filter-delete { width: 32px; border: 0; border-left: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; }
.saved-filter-delete:hover { background: var(--red-soft); color: var(--red); }
.saved-filter-empty { color: var(--muted); font-size: .75rem; }
.advanced-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 16px; padding: 14px 0 0; border-top: 1px solid var(--line); background: var(--surface); }
.advanced-filter-actions > span { margin-right: auto; color: var(--muted); font-size: .75rem; }
.advanced-filter-actions .button { min-height: 42px; font-size: .76rem; }
.source-gap-note { padding: 7px 9px; border-radius: 6px; background: var(--amber-soft); color: #79541b; font-size: .68rem; line-height: 1.35; }
.analysis-table-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
.analysis-table-toolbar { position: relative; z-index: 18; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.analysis-table-toolbar.configuration-open { z-index: 80; }
.analysis-table-toolbar > div:first-child { display: grid; gap: 2px; margin-right: auto; }
.analysis-table-toolbar > div:first-child strong { color: var(--ink); font-size: .79rem; }
.analysis-table-toolbar > div:first-child span { color: var(--muted); font-size: .69rem; }
.column-configuration { position: relative; flex: 0 0 auto; }
.column-configuration-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; font-size: .74rem; }
.column-configuration-toggle > span { padding: 3px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: .64rem; font-weight: 800; }
.column-configuration-panel { position: fixed; z-index: 60; width: min(880px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 14px; border: 1px solid #b9ccd9; border-radius: 10px; background: var(--surface); box-shadow: 0 18px 42px rgba(30, 48, 62, .18); }
.saved-column-view-section { display: grid; gap: 10px; margin-bottom: 14px; padding: 13px; border: 1px solid #bfd2df; border-radius: 9px; background: #f4f9fc; }
.saved-column-view-heading { display: flex; align-items: end; gap: 14px; }
.saved-column-view-heading > div:first-child { display: grid; gap: 3px; min-width: 220px; margin-right: auto; }
.saved-column-view-heading strong { font-size: .84rem; }
.saved-column-view-heading span { color: var(--muted); font-size: .69rem; line-height: 1.4; }
.saved-column-view-save-row { display: grid; grid-template-columns: minmax(190px, 260px) auto; gap: 7px; }
.saved-column-view-save-row input { min-height: 36px; padding: 7px 9px; border: 1px solid #b8cad7; border-radius: 7px; background: var(--surface); color: var(--ink); font-size: .75rem; }
.saved-column-view-save-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); outline: 0; }
.saved-column-view-save-row .button { min-height: 36px; padding: 7px 10px; font-size: .7rem; }
.saved-column-view-feedback { min-height: 16px; color: var(--green); font-size: .69rem; font-weight: 700; }
.saved-column-view-feedback.error { color: var(--red); }
.saved-column-view-list { display: flex; align-items: stretch; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.saved-column-view-item { display: grid; flex: 0 0 auto; min-width: 245px; overflow: hidden; border: 1px solid #c5d5df; border-radius: 8px; background: var(--surface); }
.saved-column-view-item.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(82,125,165,.12); }
.saved-column-view-apply { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; padding: 8px 10px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.saved-column-view-apply:hover { background: var(--blue-soft); }
.saved-column-view-apply strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.saved-column-view-apply small { color: var(--muted); font-size: .62rem; line-height: 1.35; }
.saved-column-view-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-soft); }
.saved-column-view-actions button { min-height: 29px; padding: 5px 8px; border: 0; background: var(--surface-soft); cursor: pointer; font-size: .62rem; font-weight: 800; }
.saved-column-view-update { border-right: 1px solid var(--line-soft) !important; color: var(--blue-dark); }
.saved-column-view-update:hover { background: var(--blue-soft); }
.saved-column-view-delete { color: var(--muted); }
.saved-column-view-delete:hover { background: var(--red-soft); color: var(--red); }
.saved-column-view-actions button:disabled { cursor: wait; opacity: .6; }
.saved-column-view-empty { color: var(--muted); font-size: .69rem; }
.column-configuration-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line-soft); }
.column-configuration-heading > div { display: grid; gap: 3px; margin-right: auto; }
.column-configuration-heading strong { font-size: .84rem; }
.column-configuration-heading span { color: var(--muted); font-size: .69rem; }
.column-configuration-heading .button { min-height: 34px; padding: 7px 10px; font-size: .69rem; }
.column-configuration-grid { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 7px; }
.column-configuration-grid label { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-soft); color: var(--ink); font-size: .72rem; font-weight: 700; cursor: pointer; }
.column-configuration-grid label:hover { border-color: #b8cbd9; background: var(--blue-soft); }
.column-configuration-grid input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.analysis-table-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.analysis-table { width: auto; min-width: 0; table-layout: fixed; }
.analysis-table th { position: sticky; top: 0; z-index: 4; height: 42px; padding: 0 7px; background: #fafbfc; overflow: visible; }
.analysis-table th.filter-open { z-index: 50; }
.analysis-table th.drag-target { background: var(--blue-soft); }
.analysis-table td { overflow: hidden; }
.analysis-table [data-column].column-hidden { display: none !important; }
.analysis-table tbody tr.drag-target td { background: var(--blue-soft); }
.analysis-table tfoot { position: sticky; bottom: 0; z-index: 3; }
.analysis-table tfoot td { height: 46px; padding: 5px 9px; border-top: 1px solid #bfd0dc; border-bottom: 0; background: var(--surface); box-shadow: 0 -3px 8px rgba(32, 52, 69, .05); }
.analysis-table .analysis-page-total-cell { background: #eef0f1; color: var(--ink); text-align: right; }
.analysis-page-total-cell small { display: block; margin: 0 0 2px; color: var(--ink); font-size: .53rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.analysis-page-total-cell strong { display: block; color: var(--ink); font-size: .72rem; font-weight: 850; white-space: nowrap; }
.analysis-page-total-cell strong span { margin-right: 2px; color: var(--ink); }
.analysis-th-content { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 5px; }
.analysis-table th.number-header .analysis-th-content { justify-content: flex-end; }
.analysis-table th[data-column="margin"] .analysis-th-content { justify-content: flex-start; }
.analysis-table th[data-column="coverage"] .analysis-th-content { justify-content: flex-start; }
.analysis-table th[data-column="stock_history"] { padding-right: 4px; }
.analysis-table th[data-column="coverage"] { padding-left: 4px; }
.analysis-table td[data-column="stock_history"] { padding-right: 5px; }
.analysis-table td[data-column="coverage"] { padding-left: 5px; }
.analysis-table th[data-column="wa_periods"] .analysis-th-content { justify-content: flex-start; }
.analysis-table th[data-column="znz_data"] .analysis-th-content { justify-content: flex-start; text-align: left; }
.analysis-table th.center-header .analysis-th-content {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 4px;
    padding-right: 0;
}
.analysis-table th.center-header .column-drag-handle { position: static; left: auto; }
.analysis-table th.center-header .column-sort-link,
.analysis-table th.center-header .column-label { text-align: center; }
.column-drag-handle { flex: 0 0 18px; width: 18px; height: 24px; padding: 0; border: 0; background: transparent; color: #93a1ad; cursor: grab; font-size: .67rem; }
.column-drag-handle:active { cursor: grabbing; }
.column-sort-link, .column-label { min-width: 0; overflow: hidden; color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.analysis-table th.sorted-column { background: #eef5fa; box-shadow: inset 0 -2px 0 #527da5; }
.analysis-table th.sorted-column .column-label,
.analysis-table th.sorted-column .combined-sort-title { color: var(--blue-dark); }
.column-sort-link.active { padding: 3px 6px; border-radius: 5px; background: #dceaf4; color: var(--blue-dark); }
.column-sort-link:hover { color: var(--blue-dark); }
.filter-sort-label { display: flex; align-items: center; min-width: 0; gap: 5px; }
.filter-sort-label .column-label { flex: 1 1 auto; }
.active-sort-indicator { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 3px; padding: 2px 5px; border-radius: 999px; background: #d4e6f2; color: #244f72; font-size: .54rem; font-weight: 800; letter-spacing: 0; line-height: 1.15; text-transform: none; white-space: nowrap; }
.active-sort-indicator strong { font-size: .68rem; line-height: 1; }
.combined-sort-control { display: grid; min-width: 0; gap: 1px; }
.combined-sort-title { overflow: hidden; color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .04em; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.combined-sort-options { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.combined-sort-link { color: #6f7e89; font-size: .61rem; font-weight: 800; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.combined-sort-link:hover, .combined-sort-link.active { color: var(--blue-dark); }
.combined-sort-link.active { padding: 2px 5px; border-radius: 5px; background: #dceaf4; text-decoration: none; }
.analysis-table th[data-column="margin"] .combined-sort-control { display: flex; align-items: center; gap: 5px; }
.analysis-table th[data-column="margin"] .combined-sort-options { gap: 4px; }
.column-filter-control { position: relative; flex: 0 0 auto; }
.column-filter-toggle { display: grid; place-items: center; width: 22px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #748794; cursor: pointer; }
.column-filter-toggle:hover { border-color: #bfd0dc; background: var(--blue-soft); color: var(--blue-dark); }
.column-filter-toggle.active { border-color: #a9c3d5; background: var(--blue-soft); color: var(--blue-dark); }
.column-filter-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.column-filter-popover { position: fixed; z-index: 70; box-sizing: border-box; width: 292px; max-height: calc(100vh - 16px); overflow-x: hidden; overflow-y: auto; padding: 13px; border: 1px solid #b8cad7; border-radius: 10px; background: var(--surface); box-shadow: 0 16px 38px rgba(30, 48, 62, .2); color: var(--ink); text-align: left; }
#column-filter-status { width: 320px; }
#column-filter-warnings { width: 500px; max-width: calc(100vw - 16px); }
.column-filter-heading { display: grid; gap: 3px; margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.column-filter-heading strong { font-size: .82rem; }
.column-filter-heading span { color: var(--muted); font-size: .66rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.column-filter-sort-heading { margin-top: 0 !important; }
.column-filter-sort-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.column-filter-sort-options .combined-sort-link { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 6px 8px; border: 1px solid #d5dfe6; border-radius: 6px; background: #f7f9fa; color: #5c6b76; font-size: .66rem; text-decoration: none; }
.column-filter-sort-options .combined-sort-link:hover { border-color: #aec4d3; background: var(--blue-soft); color: var(--blue-dark); }
.column-filter-sort-options .combined-sort-link.active { border-color: #9ebbcf; background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.column-filter-field { display: grid; gap: 5px; min-width: 0; color: #536573; font-size: .7rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.column-filter-field input, .column-filter-field select { width: 100%; min-height: 38px; border: 1px solid #c5d2dc; border-radius: 7px; background: var(--surface); color: var(--ink); padding: 8px 9px; font-size: .78rem; }
.column-filter-field input:focus, .column-filter-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,125,165,.12); outline: 0; }
.column-filter-multiple { margin: 0; padding: 0; border: 0; }
.column-filter-multiple legend { margin-bottom: 7px; color: #536573; font-size: .7rem; font-weight: 700; }
.column-filter-multiple label { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 34px; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.column-filter-multiple label:hover { background: var(--blue-soft); }
.column-filter-multiple input { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 0; padding: 0; accent-color: var(--blue); }
.column-filter-multiple span { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: .75rem; font-weight: 650; line-height: 1.3; white-space: normal; overflow-wrap: normal; }
.column-filter-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.column-filter-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.column-filter-actions .button { min-height: 34px; padding: 7px 10px; font-size: .69rem; }
.column-resizer { position: absolute; top: 6px; right: -3px; bottom: 6px; z-index: 6; width: 7px; padding: 0; border: 0; border-left: 1px solid transparent; background: transparent; cursor: col-resize; }
.column-resizer:hover, .column-resizer:focus { border-left-color: var(--blue); outline: 0; }
.column-resizer-left { right: auto; left: -3px; }
.analysis-table .product-cell { min-width: 0; max-width: none; }
.analysis-table .product-cell strong { overflow: hidden; text-overflow: ellipsis; }
.analysis-table th[data-column="total"] { background: #f0f2f3; box-shadow: inset 1px 0 #d5dade, inset -1px 0 #d5dade; color: var(--ink); }
.analysis-table td[data-column="total"] { background: #f7f8f8; box-shadow: inset 1px 0 #e0e3e5, inset -1px 0 #e0e3e5; color: var(--ink); }
.analysis-table tbody tr:hover td[data-column="total"] { background: #eef0f1; }
.total-inventory-value { font-variant-numeric: tabular-nums; }
.total-sigma { display: inline-block; margin-right: 6px; color: var(--ink); font-size: .72rem; font-weight: 900; }
.analysis-table .product-identifiers { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); white-space: nowrap; }
.product-identifier { display: inline-flex; align-items: center; gap: 4px; }
.product-identifier-separator { color: #a8b3bb; }
.identifier-copy-button { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid #c7d5df; border-radius: 5px; background: var(--surface); color: var(--muted); cursor: pointer; }
.identifier-copy-button svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.identifier-copy-button:hover { border-color: #9db7ca; background: var(--blue-soft); color: var(--blue-dark); }
.identifier-copy-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.identifier-copy-button.copied { border-color: #9bc9b5; background: var(--green-soft); color: var(--green); }
.identifier-copy-button.copied svg { display: none; }
.identifier-copy-button.copied::after { content: "✓"; font-size: .68rem; font-weight: 900; }
.identifier-copy-button.copy-error { border-color: #e4aaaa; background: var(--red-soft); color: var(--red); }
.recommendation-selection-layout { display: flex; align-items: center; gap: 8px; min-width: 0; }
.recommendation-selection-copy { display: block; flex: 1 1 auto; min-width: 0; }
.recommendation-selection-layout .row-selection-checkbox { flex: 0 0 16px; margin-left: auto; }
.analysis-table .date-cell { color: #495864; font-size: .66rem; white-space: nowrap; }
.analysis-table .date-cell.centered-date { text-align: center; }
.last-movement-layout { display: inline-flex; align-items: center; gap: 8px; }
.last-movement-stack { display: inline-grid; gap: 4px; text-align: left; }
.last-movement-line { display: grid; grid-template-columns: 22px 12px minmax(68px, auto); align-items: baseline; column-gap: 3px; line-height: 1.2; }
.last-movement-line strong { position: relative; display: block; color: #343a43; font-size: .64rem; letter-spacing: .04em; }
.last-we-after-wa-dot { position: absolute; top: 50%; left: -9px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: translateY(-50%); }
.last-no-wa-marker { position: absolute; top: 50%; left: -10px; color: #000; font-size: .78rem; font-weight: 700; line-height: 1; transform: translateY(-52%); }
.last-movement-arrow { color: #87919b; font-size: .62rem; text-align: center; }
.last-movement-line time { color: #495864; font-variant-numeric: tabular-nums; }
.movement-detail-trigger { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; padding: 0; border: 1px solid #d6dde2; border-radius: 50%; background: #f7f8f9; color: #66727c; cursor: pointer; }
.movement-detail-trigger:hover { border-color: #b9c5cd; background: #eef2f4; color: #34424d; }
.movement-detail-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.movement-detail-trigger svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.5; }
.movement-detail-dialog { width: min(720px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 40px); padding: 0; border: 1px solid #cbd5dc; border-radius: 11px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(24, 42, 55, .22); }
.movement-detail-dialog::backdrop { background: rgba(31, 45, 56, .38); }
.movement-detail-dialog-shell { display: flex; flex-direction: column; max-height: calc(100vh - 42px); }
.movement-detail-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto; padding: 11px 13px 11px 15px; border-bottom: 1px solid var(--line-soft); background: #f8fafb; cursor: grab; touch-action: none; user-select: none; }
.movement-detail-dialog-header.dragging { cursor: grabbing; }
.movement-detail-dialog-header h2 { min-width: 0; margin: 0; overflow: hidden; font-size: .9rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.movement-detail-dialog-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 29px; height: 29px; padding: 0; border: 1px solid #d4dde3; border-radius: 7px; background: var(--surface); color: #596874; cursor: pointer; font-size: 1.15rem; line-height: 1; }
.movement-detail-dialog-close:hover { background: #eef2f4; color: var(--ink); }
.movement-detail-dialog-content { min-height: 130px; padding: 12px; overflow: auto; }
.movement-detail-loading, .movement-detail-error { margin: 0; padding: 22px 10px; color: var(--muted); text-align: center; }
.movement-detail-error { color: var(--red); }
.movement-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.movement-detail-summary strong, .movement-detail-summary span { display: block; }
.movement-detail-summary strong { min-width: 0; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.movement-detail-summary > span { flex: 0 0 auto; margin: 0; padding: 4px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .6rem; }
.movement-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.movement-detail-section { min-width: 0; border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; background: var(--surface); }
.movement-detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 9px; border-bottom: 1px solid var(--line-soft); }
.movement-detail-inbound > header { background: #f1f9f4; }
.movement-detail-outbound > header { background: #fff4f3; }
.movement-detail-correction { grid-column: 1 / -1; }
.movement-detail-correction > header { background: #f5f3ee; }
.movement-detail-section h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .7rem; }
.movement-direction-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: .78rem; font-weight: 900; line-height: 1; }
.movement-detail-inbound .movement-direction-icon { background: var(--green); }
.movement-detail-outbound .movement-direction-icon { background: var(--red); }
.movement-detail-correction .movement-direction-icon { background: #7b7468; }
.movement-detail-section header > span { color: var(--muted); font-size: .58rem; white-space: nowrap; }
.movement-detail-table-wrap { max-height: 360px; overflow: auto; }
.movement-detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .62rem; }
.movement-detail-table th, .movement-detail-table td { padding: 7px 9px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.movement-detail-table th { position: sticky; top: 0; z-index: 1; background: #f3f6f8; color: #5d6a74; font-size: .57rem; letter-spacing: .04em; text-transform: uppercase; }
.movement-detail-table th:nth-child(1) { width: 60%; }
.movement-detail-table th:nth-child(2) { width: 40%; }
.movement-detail-table th.number, .movement-detail-table td.number { text-align: right; }
.movement-detail-table time { font-variant-numeric: tabular-nums; }
.movement-detail-inbound .movement-detail-table td.number strong { color: var(--green); }
.movement-detail-outbound .movement-detail-table td.number strong { color: var(--red); }
.movement-detail-correction .movement-detail-table td.number strong { color: #625c53; }
.movement-correction-table th:nth-child(1) { width: 24%; }
.movement-correction-table th:nth-child(2) { width: 20%; }
.movement-correction-table th:nth-child(3) { width: 56%; }
.movement-correction-table td small { color: var(--muted); }
.movement-detail-empty { padding: 24px 10px !important; color: var(--muted); text-align: center !important; }
.column-filter-subheading { display: block; margin: 10px 0 5px; color: #343a43; font-size: .68rem; letter-spacing: .06em; }
.analysis-table .current-price-cell [data-fill-current-price],
.analysis-table .purchase-price-cell [data-fill-purchase-price] { padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; text-align: inherit; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
.analysis-table .current-price-cell [data-fill-current-price]:hover,
.analysis-table .purchase-price-cell [data-fill-purchase-price]:hover { color: var(--blue-dark); text-decoration-style: solid; }
.analysis-table .current-price-cell [data-fill-current-price]:focus-visible,
.analysis-table .purchase-price-cell [data-fill-purchase-price]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.analysis-table .znz-combined-cell,
.analysis-table .wa-periods-cell { --compact-metric-box-height: 48px; padding: 6px 7px; vertical-align: middle; }
.analysis-table .znz-combined-cell [data-fill-znz-price] { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 800; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
.analysis-table .znz-combined-cell [data-fill-znz-price]:hover { text-decoration-style: solid; }
.analysis-table .znz-combined-cell [data-fill-znz-price]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.znz-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, var(--compact-metric-box-height)); gap: 5px; align-items: stretch; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.znz-overview-metric { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-content: center; align-items: baseline; column-gap: 7px; box-sizing: border-box; width: 100%; height: var(--compact-metric-box-height); min-width: 0; padding: 6px 7px; border: 1px solid #dfe7ec; border-radius: 6px; background: transparent; text-align: left; }
.znz-overview-metric:nth-child(1) { grid-column: 1; grid-row: 1; }
.znz-overview-metric:nth-child(2) { grid-column: 1; grid-row: 2; }
.znz-overview-metric:nth-child(3) { grid-column: 2; grid-row: 1; }
.znz-overview-metric:nth-child(4) { grid-column: 2; grid-row: 2; }
.znz-overview-label { margin: 0; color: #687984; font-size: .56rem; font-weight: 700; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.znz-overview-period-label { display: grid; align-self: center; gap: 2px; }
.znz-overview-period-label span:last-child { color: #87949d; font-size: .54rem; font-weight: 500; letter-spacing: 0; }
.znz-overview-value { justify-self: start; color: var(--ink); font-size: .68rem; font-weight: 650; line-height: 1.15; white-space: nowrap; }
.znz-overview-metric:not(.znz-overview-price) .znz-overview-value { font-weight: 400; }
.znz-overview-value.muted { font-weight: 400; }
.znz-overview-metric [data-fill-znz-price] { justify-self: start; }
.znz-overview-metric .znz-sales-basis { grid-column: 2; justify-self: start; margin-top: 2px; }
.analysis-table .znz-demand-cell strong,
.analysis-table .znz-demand-cell small { display: block; }
.analysis-table .znz-demand-cell strong { color: var(--ink); white-space: nowrap; }
.analysis-table .znz-demand-cell small { margin-top: 3px; color: var(--muted); line-height: 1.25; }
.analysis-table .znz-sales-cell { padding: 6px 7px; }
.znz-sales-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; min-width: 0; font-variant-numeric: tabular-nums; }
.znz-sales-period { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 6px 4px; border: 1px solid #e0e7ec; border-radius: 6px; background: #f7f9fa; text-align: center; }
.znz-sales-period:nth-child(2) { background: #f2f6f8; }
.znz-sales-period-label { margin: 0; color: #6c7c88; font-size: .56rem; font-weight: 900; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.znz-sales-value { color: var(--ink); font-size: .72rem; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.znz-sales-basis { display: block; max-width: 100%; overflow: hidden; color: var(--muted); font-size: .5rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.znz-sales-basis.complete { color: #438261; }
.znz-sales-basis.partial { color: #946719; }
.analysis-table tbody tr:hover .znz-sales-period { border-color: #d3dee5; background: #f2f6f8; }
.analysis-table .znz-price.lower { color: var(--red); }
.analysis-table .znz-price.higher { color: var(--green); }
.analysis-table .znz-price.same,
.analysis-table .znz-price.unknown { color: var(--muted); }
.wa-periods-grid { display: grid; grid-template-columns: repeat(2, max-content); grid-template-rows: repeat(2, var(--compact-metric-box-height)); gap: 5px; justify-content: start; width: fit-content; min-width: 0; font-variant-numeric: tabular-nums; }
.wa-period-entry { display: grid; box-sizing: border-box; place-items: center; align-content: center; gap: 3px; min-width: 96px; height: var(--compact-metric-box-height); padding: 5px 9px; border: 1px solid #dce4e9; border-radius: 6px; background: transparent; text-align: center; }
.wa-period-entry small { width: 100%; margin: 0; color: #687984; font-size: .66rem; font-weight: 800; letter-spacing: .01em; line-height: 1; text-align: center; white-space: nowrap; }
.wa-period-value { width: 100%; color: var(--ink); font-size: .74rem; font-weight: 400; line-height: 1.15; text-align: center; white-space: nowrap; }
.analysis-table tbody tr:hover .wa-period-entry { border-color: #cfd9df; background: transparent; }
.no-sale-cell strong, .no-sale-cell small { display: block; }
.no-sale-days { width: fit-content; padding: 5px 8px; border-radius: 7px; background: var(--blue-soft); color: var(--blue-dark); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.no-sale-days.warning { background: var(--red-soft); color: var(--red); }
.status-quality-cell small { display: block; margin-top: 6px; color: var(--muted); font-size: .64rem; font-weight: 400; line-height: 1.35; white-space: nowrap; }
.status-quality-cell .status-quality-index { font-weight: 400; }
.status-quality-cell .status-sales-rank { width: fit-content; padding: 3px 6px; border-radius: 5px; background: #f0f2f4; color: #66717b; font-weight: 600; }
.fast-mover-review-state { display: grid; justify-items: start; gap: 4px; margin-top: 6px; }
.status-quality-cell .fast-mover-review-metric { margin: 0; color: #8a530a; font-size: .61rem; font-weight: 700; white-space: normal; }
.fast-mover-review-state form { margin: 0; }
.fast-mover-review-snooze { padding: 4px 6px; border: 1px solid #c9d3d9; border-radius: 5px; background: #fff; color: #44535d; font: inherit; font-size: .59rem; font-weight: 700; line-height: 1.15; cursor: pointer; white-space: nowrap; }
.fast-mover-review-snooze:hover,
.fast-mover-review-snooze:focus-visible { border-color: #7890a0; background: #f4f7f8; }
.status-quality-cell .fast-mover-review-snoozed { margin: 6px 0 0; color: #687781; font-size: .59rem; white-space: normal; }
.status-quality-cell .manual-override-flag { color: var(--danger); font-weight: 800; }
.status-explanation-anchor { display: inline-flex; }
.status-explanation-trigger { box-sizing: border-box; border: 1px dashed color-mix(in srgb, currentColor 38%, transparent); font-family: inherit; cursor: help; text-decoration: none; }
.status-explanation-trigger:hover,
.status-explanation-trigger:focus-visible { border-color: color-mix(in srgb, currentColor 70%, transparent); }
.stock-reserved-value:hover,
.stock-reserved-value:focus-visible { text-decoration-color: color-mix(in srgb, currentColor 70%, transparent); }
.status-explanation-trigger:focus-visible { outline: 2px solid #527da5; outline-offset: 2px; }
.status-explanation-popover { position: fixed; z-index: 100; width: min(350px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow-y: auto; border: 1px solid #aebfca; border-radius: 9px; background: #fff; box-shadow: 0 14px 34px rgba(30, 48, 62, .2); color: var(--ink); pointer-events: none; }
.status-explanation-card { display: grid; gap: 9px; padding: 12px; }
.status-explanation-card header { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.status-explanation-card header > span { color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-explanation-card header > strong { font-size: .86rem; line-height: 1.25; }
.status-explanation-card header > small { display: block; margin: 0; overflow: hidden; color: var(--muted); font-size: .62rem; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.status-explanation-rule { margin: 0; padding: 8px 9px; border-left: 3px solid #7e9db4; border-radius: 4px; background: #f3f7f9; color: #324958; font-size: .68rem; font-weight: 750; line-height: 1.35; }
.status-explanation-rule.manual { border-left-color: var(--amber); background: var(--amber-soft); color: #73520e; }
.status-explanation-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0; }
.status-explanation-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 3px; min-width: 0; padding: 6px 0; border-bottom: 1px solid #edf1f3; }
.status-explanation-card dt { color: var(--muted); font-size: .62rem; line-height: 1.25; }
.status-explanation-card dd { min-width: 0; margin: 0; color: var(--ink); font-size: .64rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; text-align: left; white-space: normal; }
.status-explanation-decision { margin: 0; color: #44545f; font-size: .64rem; line-height: 1.4; }
.status-explanation-card footer { display: grid; gap: 2px; padding-top: 7px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .56rem; line-height: 1.3; }
.no-sale-days.unknown { background: var(--surface-soft); color: var(--muted); }
.no-sale-cell small { margin-top: 4px; color: var(--muted); font-size: .56rem; }
.analysis-table td[data-column="coverage"] { text-align: left; }
.coverage-no-sales { display: block; color: var(--muted); text-align: left; white-space: normal; }
.coverage-no-sales strong { color: var(--muted); font-size: .64rem; font-weight: 750; white-space: nowrap; }
.coverage-no-sales small { margin-top: 2px; color: #7a8792; font-size: .53rem; line-height: 1.2; white-space: nowrap; }
.price-history-cell { padding-block: 7px; vertical-align: top; }
.price-history-entry { display: grid; gap: 4px; min-width: 0; }
.price-history-meta { display: flex; align-items: center; gap: 7px; }
.price-history-meta time { color: var(--ink); font-size: .64rem; font-weight: 800; white-space: nowrap; }
.price-history-meta > span { padding: 2px 5px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .51rem; font-weight: 800; white-space: nowrap; }
.price-history-values { display: grid; grid-template-columns: max-content 12px max-content 1fr; gap: 5px; align-items: center; min-width: 0; color: #44525e; font-size: .61rem; white-space: nowrap; }
.price-history-values span small { color: var(--muted); font-size: .51rem; }
.price-history-arrow { color: var(--muted); text-align: center; }
.price-history-delta { justify-self: start; margin-left: 7px; padding: 3px 6px; border-radius: 6px; font-size: .61rem; font-weight: 800; }
.price-history-delta.negative { background: var(--red-soft); color: var(--red); }
.price-history-delta.positive { background: var(--green-soft); color: var(--green); }
.price-history-delta.neutral { background: var(--surface-soft); color: var(--muted); }
.price-history-flags { display: flex; align-items: center; gap: 5px; width: fit-content; min-height: 16px; }
.price-history-plenty-source { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 4px; background: #fff; }
.price-history-plenty-source img { display: block; width: 15px; height: 15px; object-fit: contain; mix-blend-mode: multiply; }
.price-history-promo-badge { display: inline-flex; width: fit-content; padding: 2px 6px; border: 1px solid #b9c2c9; border-radius: 999px; background: #edf0f2; color: #53606a; font-size: .52rem; font-weight: 750; white-space: nowrap; }
.price-history-more { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line-soft); }
.price-history-more summary { width: fit-content; color: var(--blue-dark); cursor: pointer; font-size: .56rem; font-weight: 800; }
.price-history-more summary:hover { text-decoration: underline; }
.price-history-older { display: grid; gap: 7px; margin-top: 7px; }
.price-history-entry.compact { padding-top: 6px; border-top: 1px dashed var(--line); }
.price-history-entry.compact:first-child { padding-top: 0; border-top: 0; }
.price-history-entry.compact .price-history-meta time { font-size: .58rem; }
.price-history-entry.compact .price-history-values { font-size: .57rem; }
.price-history-entry.compact .price-history-delta { font-size: .57rem; }
.price-history-empty { display: block; padding: 8px 0; color: var(--muted); font-size: .61rem; }
.stock-history-cell { padding-block: 7px; vertical-align: top; text-align: left; }
.stock-history-entry { display: grid; justify-items: start; gap: 5px; min-width: 0; text-align: left; }
.stock-history-age { display: flex; align-items: baseline; gap: 7px; }
.stock-history-age strong { color: var(--ink); font-size: .68rem; white-space: nowrap; }
.stock-history-age span { color: var(--muted); font-size: .56rem; white-space: nowrap; }
.stock-history-baseline { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: fit-content; color: var(--muted); font-size: .57rem; }
.stock-history-baseline strong { color: var(--ink); font-size: .64rem; white-space: nowrap; }
.stock-history-result { display: grid; gap: 4px; width: 148px; padding: 6px 8px; border-radius: 6px; background: var(--blue-soft); }
.stock-history-result-label { margin: 0; color: #58738b; font-size: .51rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.stock-history-result-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
.stock-history-result-values strong, .stock-history-result-values span { color: var(--blue-dark); font-size: .66rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.stock-history-result-values span { padding-left: 9px; border-left: 1px solid rgba(35, 89, 127, .18); }
.stock-history-result.increased { background: var(--amber-soft); }
.stock-history-result.increased strong, .stock-history-result.increased span, .stock-history-result.increased .stock-history-result-label { color: var(--amber); }
.stock-history-note, .stock-history-unavailable small { display: block; color: var(--muted); font-size: .53rem; line-height: 1.35; }
.stock-history-unavailable { display: grid; gap: 3px; padding: 6px 7px; border-radius: 6px; background: var(--surface-soft); }
.stock-history-unavailable strong { color: var(--muted); font-size: .62rem; }
.stock-history-empty { display: block; padding: 8px 0; color: var(--muted); font-size: .61rem; }
.experiment-kpis { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.experiment-value-heading > div { display: grid; gap: 4px; }
.experiment-value-heading small { max-width: 940px; font-size: .69rem; line-height: 1.45; }
.experiment-value-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.experiment-value-summary > div, .experiment-value-summary > a { display: grid; gap: 4px; min-height: 78px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); }
.experiment-value-summary span { color: var(--muted); font-size: .66rem; font-weight: 700; }
.experiment-value-summary strong { align-self: end; font-size: 1.05rem; }
.experiment-value-summary small { color: var(--green); font-size: .7rem; font-weight: 800; }
.experiment-value-summary .reduction { border-color: #cce6da; background: var(--green-soft); }
.experiment-value-summary .reduction strong { color: var(--green); }
.experiment-value-filter-card { color: inherit; text-decoration: none; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.experiment-value-filter-card:hover { border-color: #8fcbb0; box-shadow: 0 4px 14px rgba(32, 120, 82, .1); transform: translateY(-1px); }
.experiment-value-filter-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.experiment-value-filter-card.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.experiment-value-legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-bottom: 11px; color: var(--muted); font-size: .64rem; }
.experiment-value-legend span { width: 18px; height: 8px; margin-left: 8px; border-radius: 2px; }
.experiment-value-legend .before { background: var(--blue-soft); border: 1px solid #b9d0e2; }
.experiment-value-legend .after { background: var(--blue-dark); }
.experiment-value-chart { display: grid; gap: 4px; }
.experiment-value-row { display: grid; grid-template-columns: minmax(155px, .8fr) minmax(360px, 3fr) minmax(125px, .7fr); gap: 16px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.experiment-value-row:first-child { border-top: 0; }
.experiment-value-label { display: grid; gap: 3px; padding-left: 10px; border-left: 4px solid var(--amber); }
.experiment-value-row.category-clearance_candidate .experiment-value-label { border-left-color: #d46f1e; }
.experiment-value-row.category-penner .experiment-value-label { border-left-color: var(--red); }
.experiment-value-label strong { font-size: .76rem; }
.experiment-value-label small { font-size: .62rem; }
.experiment-value-bars { display: grid; gap: 6px; }
.experiment-value-bars > div { display: grid; grid-template-columns: 48px minmax(120px, 1fr) 105px; gap: 8px; align-items: center; }
.experiment-value-bars span { color: var(--muted); font-size: .61rem; font-weight: 700; }
.experiment-value-bars strong { font-size: .66rem; text-align: right; white-space: nowrap; }
.experiment-value-track { height: 13px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.experiment-value-fill { display: block; width: var(--bar-width); height: 100%; min-width: 0; border-radius: inherit; }
.experiment-value-fill.before { background: #b9d0e2; }
.experiment-value-fill.after { background: var(--blue-dark); }
.experiment-value-delta { display: grid; justify-items: end; gap: 3px; }
.experiment-value-delta strong, .experiment-value-delta span { color: var(--green); white-space: nowrap; }
.experiment-value-delta strong { font-size: .76rem; }
.experiment-value-delta span { font-size: .67rem; font-weight: 800; }
.experiment-data-note { margin: 12px 0 0; color: var(--muted); font-size: .65rem; }
.experiment-chart-empty { padding-block: 34px; }
.experiment-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 0 10px; }
.experiment-list-toolbar > div { display: grid; gap: 2px; }
.experiment-list-toolbar > div strong { font-size: .8rem; }
.experiment-list-toolbar > div small { font-size: .65rem; }
.experiment-list-toolbar nav { display: flex; gap: 7px; }
.experiment-list-toolbar .button span { min-width: 20px; margin-left: 6px; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.55); text-align: center; }
.experiment-table-wrap { max-height: calc(100vh - 150px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.experiment-table { min-width: 1760px; }
.experiment-table thead th { position: sticky; top: 0; z-index: 4; background: #fafbfc; box-shadow: 0 1px 0 var(--line); }
.experiment-price-change-cell { display: grid; grid-template-columns: max-content max-content; justify-content: start; align-items: center; gap: 12px; min-width: 248px; }
.experiment-price-change-values { min-width: 0; }
.experiment-price-change-values strong, .experiment-price-change-values small { display: block; white-space: nowrap; }
.price-change-age-badge { --price-age-accent: #2f6fd0; --price-age-accent-bg: rgba(47,111,208,.08); box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 4px 9px 4px 4px; border: 1px solid #e4e8ee; border-radius: 999px; background: transparent; box-shadow: 0 1px 2px rgba(28,43,70,.05); color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.price-change-age-badge__icon { display: flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--price-age-accent-bg); color: var(--price-age-accent); }
.price-change-age-badge__icon svg { display: block; }
.price-change-age-badge__text { display: flex; flex-direction: column; gap: 2px; }
.price-change-age-badge__label { color: #8a93a5; font-size: .53rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.price-change-age-badge__value { color: #1c2b46; font-size: .84rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.last-price-change-cell { text-align: left; }
.experiment-stock-comparison { min-width: 135px; }
.experiment-stock-grid { display: grid; grid-template-columns: max-content max-content; column-gap: 7px; }
.experiment-stock-grid > div { display: contents; white-space: nowrap; }
.experiment-stock-grid > div > span,
.experiment-stock-grid > div > strong { padding: 2px 0; }
.experiment-stock-grid > div + div > span,
.experiment-stock-grid > div + div > strong { margin-top: 3px; padding-top: 5px; border-top: 1px solid var(--line-soft); }
.experiment-stock-comparison span { color: var(--muted); font-size: .62rem; }
.experiment-stock-comparison strong { color: var(--ink); font-size: .7rem; }
.experiment-reason { max-width: 290px; white-space: normal; line-height: 1.35; }
.experiment-no-sales-row td { background: #fffafa; }
.experiment-no-sales-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.experiment-no-sales-badge { display: block; width: fit-content; margin-top: 6px; background: var(--red-soft); color: var(--red); }
.inline-price-editor { display: grid; gap: 3px; width: 132px; max-width: 100%; }
.inline-price-editor > div { position: relative; }
.inline-price-editor input { width: 100%; min-height: 31px; padding: 5px 23px 5px 7px; border: 1px solid #c8d3dc; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: .7rem; font-weight: 800; text-align: right; }
.inline-price-editor input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(82,125,165,.12); outline: 0; }
.inline-price-editor > div > span { position: absolute; top: 8px; right: 7px; color: var(--muted); font-size: .65rem; }
.inline-price-editor small { overflow: visible; color: var(--muted); font-size: .55rem; line-height: 1.3; text-overflow: clip; white-space: normal; }
.inline-price-editor.success input { border-color: var(--green); background: var(--green-soft); }
.inline-price-editor.success small { color: var(--green); }
.inline-price-editor.error input { border-color: var(--red); background: var(--red-soft); }
.inline-price-editor.error small { color: var(--red); }
.promo-price-cell { text-align: left; vertical-align: middle; }
.promo-price-toggle { display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; gap: 7px; width: fit-content; max-width: 100%; color: var(--ink); cursor: pointer; }
.promo-price-toggle input { width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: var(--blue-dark); cursor: pointer; }
.promo-price-toggle input:disabled { cursor: not-allowed; opacity: .45; }
.promo-price-toggle input:disabled + span { color: #89949d; }
.promo-price-toggle span { color: #52616d; font-size: .57rem; font-weight: 650; line-height: 1.25; white-space: normal; }
.analysis-table td[data-column="margin"] { text-align: left; }
.margin-current-stack { display: grid; justify-items: start; gap: 2px; font-variant-numeric: tabular-nums; }
.margin-current-stack > span { display: block; font-size: .78rem; line-height: 1.25; }
.margin-current-stack > span:first-child { font-weight: 800; }
.margin-current-stack > span:last-child { color: var(--muted); font-weight: 400; }
.margin-current-stack > span.negative { color: var(--red); }
.margin-preview-stack { display: grid; justify-items: start; gap: 3px; }
.pending-margin-preview { display: block; width: fit-content; margin: 3px 0 0; padding: 3px 5px; border-radius: 5px; background: var(--green-soft); color: var(--green); font-size: .57rem; font-weight: 800; white-space: nowrap; }
.pending-margin-preview[hidden] { display: none; }
.pending-margin-preview.negative { background: var(--red-soft); color: var(--red); }
.pending-margin-preview.unavailable { background: var(--surface-soft); color: var(--muted); }
.recommendation-cell strong { display: block; margin: 4px 0; font-size: .75rem; }
.recommendation-apply { min-height: 26px; padding: 4px 7px; border: 1px solid #bfd3e2; border-radius: 6px; background: var(--blue-soft); color: var(--blue-dark); cursor: pointer; font-size: .59rem; font-weight: 800; }
.recommendation-apply:hover { background: #dcebf5; }
.analysis-pagination { position: relative; z-index: 12; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; flex: 0 0 58px; min-height: 58px; padding: 8px 14px !important; border-top: 1px solid #c7d5df; background: var(--surface); box-shadow: 0 -4px 12px rgba(32, 52, 69, .06); }
.analysis-pagination::before { content: ""; }
.analysis-pagination .pagination-core { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 10px; }
.analysis-pagination .pagination-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 34px; padding: 7px 11px; border: 1px solid #bfd0dc; border-radius: 7px; background: var(--surface); color: var(--blue-dark); font-size: .7rem; font-weight: 800; }
.analysis-pagination .pagination-button:last-child { justify-self: auto; }
.analysis-pagination .pagination-button:hover { background: var(--blue-soft); text-decoration: none; }
.analysis-pagination .pagination-button.disabled { border-color: var(--line-soft); background: var(--surface-soft); color: #a1adb6; cursor: default; }
.pagination-jump-form { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--ink); font-size: .7rem; font-weight: 800; }
.pagination-jump-form input[type="number"] { width: 52px; min-height: 32px; padding: 5px 4px; border: 1px solid #bfd0dc; border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; text-align: center; }
.pagination-jump-form input[type="number"]:focus, .pagination-page-size-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(82,125,165,.12); outline: 0; }
.pagination-total-count { display: inline-flex; align-items: center; min-height: 26px; margin-left: 2px; color: var(--muted); font-size: .63rem; font-weight: 600; white-space: nowrap; }
.pagination-page-size-form { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .66rem; font-weight: 700; }
.pagination-page-size-form select { min-height: 32px; padding: 5px 24px 5px 8px; border: 1px solid #bfd0dc; border-radius: 7px; background: var(--surface); color: var(--ink); font-size: .68rem; font-weight: 800; }
.pagination-size-submit { min-height: 32px; padding: 5px 8px; border: 1px solid #bfd0dc; border-radius: 7px; background: var(--surface-soft); color: var(--blue-dark); cursor: pointer; font-size: .65rem; font-weight: 800; }
.pagination-size-submit:hover { background: var(--blue-soft); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 20% 10%, #f8fafb 0, var(--canvas) 50%, #e4eaee 100%); }
.login-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 24px 70px rgba(29,39,51,.12); }
.login-brand { color: var(--ink); margin-bottom: 35px; }
.login-brand small { color: var(--muted); }
.login-card h1 { margin-bottom: 7px; }
.form-stack { display: grid; gap: 8px; margin-top: 24px; }
.form-stack label { color: var(--muted); font-size: .68rem; font-weight: 700; margin-top: 5px; }
.form-stack button { margin-top: 10px; }

@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-kpis { grid-template-columns: repeat(3, 1fr); }
    .filter-bar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, auto)); }
    .filter-bar .button { grid-row: 2; }
    .logic-layout { grid-template-columns: 1fr; }
    .logic-reference { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1400px) {
    .filter-bar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, auto)); }
    .advanced-filter-grid { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
}

@media (max-width: 1180px) {
    .filter-bar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, auto)); }
    .filter-bar .button { grid-row: 2; }
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; padding: 14px 18px; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
    .main-nav { margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; }
    .main-nav a { padding: 8px 10px; }
    .nav-icon { display: none; }
    .sidebar-status, .sidebar-footer { display: none; }
    .main-content { padding-top: 22px; }
    .span-7, .span-6, .span-5 { grid-column: 1 / -1; }
    .detail-kpis { grid-template-columns: repeat(2, 1fr); }
    .logic-reference { grid-template-columns: 1fr; }
    .logic-expression-all { grid-template-columns: 1fr; }
    .logic-expression-all .expression-operator { min-height: 20px; }
    .lifecycle-grid { grid-template-columns: 1fr; }
    .analysis-workspace { height: auto; min-height: 0; }
    .analysis-sticky-tools { position: relative; }
    .analysis-table-panel { height: 62vh; min-height: 480px; }
    .advanced-filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
    .experiment-value-row { grid-template-columns: 140px minmax(240px, 1fr) 115px; gap: 10px; }
}

@media (max-width: 680px) {
    .sidebar { grid-template-columns: 1fr; }
    .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .main-nav a { min-width: 0; white-space: nowrap; }
    .topbar { align-items: flex-start; }
    .safety-pill { display: none; }
    .scope-banner { align-items: flex-start; flex-direction: column; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { display: block; }
    .dashboard-sellthrough-heading { align-items: flex-start; }
    .dashboard-sellthrough-grid { grid-template-columns: 1fr; }
    .dashboard-sellthrough-meta { align-items: flex-start; flex-direction: column; }
    .dashboard-sellthrough-meta span:last-child { text-align: left; }
    .distribution-columns { display: none; }
    .distribution-row { grid-template-columns: minmax(100px, 1fr) 42px 48px minmax(98px, auto); gap: 8px; }
    .distribution-row .bar-track { display: none; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-bar .search-field { grid-column: 1 / -1; }
    .detail-kpis { grid-template-columns: repeat(2, 1fr); }
    .price-layout { grid-template-columns: 1fr; }
    .price-form { grid-template-columns: 1fr; }
    .price-form > * { grid-column: 1 !important; }
    .movement-bars > div { grid-template-columns: 55px 1fr 38px; }
    .movement-bars small { display: none; }
    .definition-list.horizontal { grid-template-columns: 1fr; }
    .logic-rule-header { grid-template-columns: 30px 1fr; }
    .logic-rule-header .badge { grid-column: 2; justify-self: start; }
    .logic-description, .logic-expression, .logic-action-setting, .field-error { margin-left: 0; }
    .logic-expression { display: grid; grid-template-columns: 1fr; }
    .expression-operator { min-height: 20px; }
    .logic-action-setting { grid-template-columns: 1fr auto; }
    .logic-action-setting > div { grid-column: 1 / -1; }
    .logic-savebar { position: static; align-items: stretch; flex-direction: column; }
    .logic-savebar .button { width: 100%; }
    .selection-batch-tools { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; margin-left: 0; }
    .advanced-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .advanced-filter-actions { align-items: stretch; flex-wrap: wrap; }
    .advanced-filter-actions > span { flex-basis: 100%; }
    .saved-filter-heading { align-items: stretch; flex-direction: column; }
    .saved-filter-save-row { grid-template-columns: 1fr auto; }
    .saved-column-view-heading { align-items: stretch; flex-direction: column; }
    .saved-column-view-save-row { grid-template-columns: 1fr auto; }
    .experiment-value-summary { grid-template-columns: 1fr; }
    .experiment-value-legend { justify-content: flex-start; flex-wrap: wrap; }
    .experiment-value-row { grid-template-columns: 1fr; gap: 9px; }
    .experiment-value-delta { grid-auto-flow: column; justify-content: start; justify-items: start; }
    .experiment-list-toolbar { align-items: stretch; flex-direction: column; }
    .experiment-list-toolbar nav { flex-wrap: wrap; }
    .analysis-pagination { grid-template-columns: 1fr; gap: 7px; flex-basis: 98px; min-height: 98px; }
    .analysis-pagination::before { display: none; }
    .analysis-pagination .pagination-core, .pagination-page-size-form { grid-column: 1; justify-self: center; }
}

@media (max-width: 430px) {
    .main-content { padding-inline: 13px; }
    .kpi-grid, .detail-kpis { grid-template-columns: 1fr; }
    .kpi-card { min-height: 98px; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .search-field { grid-column: auto; }
    .analysis-table-panel { height: 58vh; min-height: 420px; }
    .advanced-filter-grid { grid-template-columns: 1fr; }
    .saved-filter-save-row { grid-template-columns: 1fr; }
    .saved-column-view-save-row { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
    .system-status-kpis { grid-template-columns: repeat(2, 1fr); }
    .data-source-row { grid-template-columns: 105px minmax(180px, .8fr) minmax(280px, 1.2fr); }
    .source-timestamps { grid-column: 2 / -1; grid-template-columns: repeat(2, minmax(160px, 1fr)) auto; align-items: end; }
    .source-alert { grid-column: 2 / -1; }
    .source-info { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
    .manual-refresh-heading { align-items: stretch; flex-direction: column; gap: 14px; }
    .manual-refresh-heading form { justify-items: stretch; }
    .manual-refresh-results { grid-template-columns: 1fr; }
    .manual-refresh-run-meta { align-items: flex-start; flex-wrap: wrap; }
    .movement-detail-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
    .movement-detail-dialog-shell { max-height: calc(100vh - 20px); }
    .movement-detail-grid { grid-template-columns: 1fr; }
    .movement-detail-summary { align-items: flex-start; flex-direction: column; }
    .data-source-row { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
    .source-status-block { flex-direction: row; align-items: center; }
    .source-timestamps { grid-column: auto; grid-template-columns: 1fr; align-items: start; }
    .source-alert { grid-column: auto; }
    .source-info { grid-column: auto; }
    .data-source-panel > .panel-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
    .system-status-kpis { grid-template-columns: 1fr; }
}
