:root {
  --ink: #14231e;
  --muted: #68736e;
  --line: #d9e1dc;
  --line-strong: #c2cec7;
  --surface: #ffffff;
  --soft: #f2f5f3;
  --green: #137553;
  --green-soft: #e3f1ea;
  --blue: #1557b0;
  --blue-soft: #eaf1fb;
  --amber: #a45d08;
  --amber-soft: #fff3dc;
  --red: #b4362e;
  --red-soft: #fbeceb;
  --shadow: 0 16px 50px rgba(18, 37, 29, .14);
  --shadow-soft: 0 8px 24px rgba(19, 46, 35, .08);
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #eef2ef; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(19,117,83,.2); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--ink); }
.brand-mark.small { width: 38px; height: 38px; background: #173f32; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand-mark svg { width: 23px; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px #dff3e9; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(460px, .9fr); background: #edf2ef; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 8vw, 120px); overflow: hidden; background: #1a2420; color: #fff; }
.login-brand .brand-mark { margin-bottom: 38px; color: var(--ink); background: #d8f2e6; }
.login-brand .eyebrow { color: #75d4a9; }
.login-brand h1 { margin: 14px 0 12px; font-size: clamp(36px, 5vw, 64px); line-height: 1.08; letter-spacing: 0; }
.login-brand > p:not(.eyebrow) { max-width: 460px; margin: 0; color: #b8c5bf; font-size: 17px; line-height: 1.8; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form { width: min(390px, 100%); }
.login-form > div:first-child { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.login-form h2 { margin: 24px 0 8px; font-size: 28px; letter-spacing: 0; }
.login-form > p { margin: 0 0 30px; }
label > span:first-child, fieldset legend { display: block; margin-bottom: 8px; color: #3d4742; font-size: 13px; font-weight: 600; }
.login-form label { display: block; margin-top: 20px; }
.input-shell, .search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.input-shell:focus-within, .search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,122,85,.1); }
.input-shell svg, .search svg { width: 17px; color: #8a9690; }
.input-shell input, .search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.form-error { min-height: 20px; margin: 12px 0 0 !important; color: var(--red); font-size: 12px; }
.login-notice { margin: 12px 0 0 !important; color: #176b4e; font-size: 12px; font-weight: 650; }
.btn { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 6px; font-weight: 650; color: var(--ink); background: #fff; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.btn svg { width: 17px; }
.btn.primary { color: #fff; border-color: var(--green); background: var(--green); box-shadow: 0 5px 12px rgba(19,117,83,.16); }
.btn.primary:hover { background: #0f6849; box-shadow: 0 7px 16px rgba(19,117,83,.22); }
.btn.secondary { border-color: var(--line-strong); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--soft); }
.btn.ghost { color: var(--muted); background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.login-btn { width: 100%; height: 46px; margin-top: 10px; justify-content: space-between; padding: 0 18px; }
.login-reset-link { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px auto 0; padding: 0 8px; border: 0; color: #52645b; background: transparent; font: inherit; font-size: 12px; font-weight: 650; }
.login-reset-link:hover { color: var(--green); }
.login-reset-link svg { width: 15px; height: 15px; }
.app-shell { min-height: 100vh; display: grid; grid-template: 74px 1fr / 224px 1fr; }
.topbar { position: relative; z-index: 8; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 22px; padding: 0 26px; border-bottom: 1px solid #c8d6cf; background: rgba(255,255,255,.98); box-shadow: 0 5px 18px rgba(19,46,35,.08); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand > div:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 15px; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.workspace-switch { height: 54px; display: inline-flex; align-items: center; gap: 5px; padding: 5px; border: 2px solid #a8beb3; border-radius: 8px; background: #dfe9e4; box-shadow: 0 6px 16px rgba(20,55,44,.14); }
.workspace-switch-btn { min-width: 150px; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border: 1px solid transparent; border-radius: 6px; color: #253d34; background: #fff; font-size: 14px; font-weight: 750; white-space: nowrap; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.workspace-switch-btn svg { width: 18px; height: 18px; }
.workspace-switch-btn:hover { color: #0d6849; border-color: #9fc4b4; background: #f7fbf9; }
.workspace-switch-btn.active { color: #fff; border-color: #0f7654; background: #0f7654; box-shadow: 0 5px 12px rgba(15,118,84,.28); }
.workspace-switch-btn.active:hover { color: #fff; background: #0b6849; }
.topbar-actions { display: flex; align-items: center; justify-self: end; gap: 18px; }
.sync-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.user-badge { display: flex; align-items: center; gap: 9px; padding-left: 18px; border-left: 1px solid var(--line); }
.user-badge > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ink); font-size: 12px; font-weight: 700; }
.user-badge div { display: flex; flex-direction: column; min-width: 72px; }
.user-badge strong { font-size: 12px; }
.user-badge small { color: var(--muted); }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #5c6862; background: transparent; }
.icon-btn:hover { color: var(--ink); background: var(--soft); }
.icon-btn svg { width: 17px; }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 24px 14px; border-right: 0; background: #183229; box-shadow: 6px 0 20px rgba(15,42,32,.08); }
.nav-view-group { display: block; }
.nav-label { margin: 6px 12px 8px; color: #86a196; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.nav-label:not(:first-child) { margin-top: 28px; }
.nav-item { width: 100%; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 6px; color: #c2d0ca; background: transparent; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: #137553; box-shadow: 0 5px 14px rgba(0,0,0,.15); font-weight: 700; }
.nav-item svg { width: 18px; }
.nav-item span { flex: 1; }
.nav-item b { min-width: 24px; padding: 2px 6px; border-radius: 8px; color: #d7e5df; background: rgba(255,255,255,.09); font-size: 10px; text-align: center; }
.nav-item.active b { color: #0c593d; background: #dff1e8; }
.formula-legend { display: grid; gap: 10px; margin: 20px 12px 2px; color: #9fb2aa; font-size: 11px; }
.formula-legend span { display: flex; align-items: center; gap: 8px; }
.legend-input { width: 10px; height: 10px; border-radius: 2px; background: var(--blue-soft); border: 1px solid #b8cee9; }
.legend-formula { width: 18px; color: #75d4a9; font-size: 10px; font-style: normal; font-weight: 800; }

.workspace { min-width: 0; padding: 30px; overflow: hidden; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { margin: 7px 0 4px; font-size: 27px; line-height: 1.25; letter-spacing: 0; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; }
.profit-dataset-tabs { display: flex; align-items: flex-end; gap: 24px; margin: -8px 0 18px; border-bottom: 1px solid var(--line); }
.profit-dataset-tab { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 2px; border: 0; border-bottom: 3px solid transparent; color: #68756f; background: transparent; font-size: 13px; font-weight: 650; cursor: pointer; }
.profit-dataset-tab:hover { color: #145e45; }
.profit-dataset-tab.active { color: #145e45; border-bottom-color: #167a55; font-weight: 750; }
.profit-dataset-tab b { min-width: 22px; padding: 2px 6px; border-radius: 8px; color: #68756f; background: #eef2f0; font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; }
.profit-dataset-tab.active b { color: #145e45; background: #e2f0e9; }
.profit-dataset-tab:focus-visible { outline: 2px solid #8fc5af; outline-offset: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; min-height: 108px; display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #d7e3dc; }
.kpi:nth-child(1)::before { background: var(--green); }
.kpi:nth-child(2)::before { background: #315f50; }
.kpi:nth-child(3)::before { background: #c7862b; }
.kpi:nth-child(4)::before { background: #c1584f; }
.kpi-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; }
.kpi-icon svg { width: 19px; }
.kpi-icon.green { color: var(--green); background: var(--green-soft); }
.kpi-icon.ink { color: #fff; background: var(--ink); }
.kpi-icon.amber { color: var(--amber); background: var(--amber-soft); }
.kpi-icon.red { color: var(--red); background: var(--red-soft); }
.kpi > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.kpi span { color: var(--muted); font-size: 11px; }
.kpi strong { margin: 2px 0; font-size: 22px; line-height: 1.2; }
.kpi small { color: #8a9590; font-size: 10px; }
.model-section { border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.active-product-sheet-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 16px; color: #fff; background: #101713; }
.active-product-sheet-heading > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.active-product-sheet-heading > div span { color: #7dd3ae; font-size: 9px; font-weight: 750; }
.active-product-sheet-heading strong { font-size: 14px; letter-spacing: 0; }
.active-sheet-status { display: inline-flex; align-items: center; gap: 6px; color: #cbd8d2; font-size: 10px; font-weight: 650; white-space: nowrap; }
.active-sheet-status svg { width: 14px; height: 14px; color: #7dd3ae; }
.table-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.bulk-row-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-left: 12px; border-left: 1px solid var(--line); color: #4d5c55; font-size: 11px; }
.bulk-row-actions strong { color: var(--ink); font-size: 13px; }
.bulk-row-actions .btn { min-height: 34px; padding-inline: 11px; }
.btn.danger { color: #fff; border-color: #a33d30; background: #a33d30; }
.btn.danger:hover { border-color: #8f3026; background: #8f3026; }
.filters { display: flex; gap: 9px; }
.row-selection-toggle { min-height: 40px; white-space: nowrap; }
.btn.secondary.row-selection-toggle.active { color: #fff; border-color: #167a55; background: #167a55; }
.btn.secondary.row-selection-toggle.active:hover { border-color: #116745; background: #116745; }
.search { width: 280px; height: 40px; background: #f7f9f8; }
select, .modal input, .modal textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; outline: 0; }
select:focus, .modal input:focus, .modal textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,122,85,.08); }
.filters select { width: 154px; min-height: 40px; background: #f7f9f8; }
.rate-control { display: flex; align-items: center; gap: 11px; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.rate-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rate-control span { color: #46544e; font-size: 11px; font-weight: 650; }
.rate-control small { color: #829089; font-size: 9px; }
.rate-control strong { font-variant-numeric: tabular-nums; }
.table-scroll { min-height: 390px; max-height: calc(100vh - 350px); overflow: auto; }
.data-table { width: 100%; min-width: 1500px; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.data-table.new-product-table { min-width: 1120px; }
.new-product-table th:nth-child(1), .new-product-table td:nth-child(1) { width: 130px; }
.new-product-table th:nth-child(2), .new-product-table td:nth-child(2) { min-width: 150px; }
.new-product-table td:nth-child(8), .new-product-table td:nth-child(9) { font-weight: 750; }
.new-product-workbench { min-height: 680px; display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 14px; align-items: start; }
.new-product-navigator { position: sticky; top: 12px; min-height: 520px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.new-product-nav-filter { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #f7f9f8; }
.new-product-nav-filter label { display: inline-flex; align-items: center; gap: 6px; color: #58675f; font-size: 10px; font-weight: 700; }
.new-product-nav-filter label svg { width: 14px; height: 14px; }
.new-product-nav-filter select { min-width: 0; height: 32px; flex: 1; padding: 0 30px 0 9px; border: 1px solid #d5dfda; border-radius: 4px; color: #2f4038; background: #fff; font: inherit; font-size: 11px; }
.new-product-list { max-height: calc(100vh - 320px); overflow-y: auto; }
.new-product-list-item { width: 100%; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px 11px 15px; border: 0; border-bottom: 1px solid #edf0ee; color: #26352f; background: #fff; text-align: left; }
.new-product-list-item:hover { background: #f3f7f5; }
.new-product-list-item.active { box-shadow: inset 4px 0 #167a55; background: #eaf4ef; }
.new-product-list-item > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.new-product-list-item strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.new-product-list-item small { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #75827c; font-size: 9px; }
.new-product-list-item b { flex: 0 0 auto; color: #126846; font-size: 10px; font-variant-numeric: tabular-nums; }
.new-product-list-item b.risk { color: var(--red); }
.new-product-list-empty { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 22px; color: #7a8781; font-size: 11px; text-align: center; }
.new-product-list-empty svg { width: 28px; color: #789086; }
.new-product-sheet { min-width: 0; border: 1px solid #aebbb5; border-radius: 4px; background: #fff; box-shadow: var(--shadow-soft); overflow: auto; }
.worksheet-empty { min-height: 520px; display: grid; place-content: center; justify-items: center; gap: 9px; color: var(--muted); }
.worksheet-empty svg { width: 32px; }
.worksheet-empty strong { color: var(--ink); font-size: 14px; }
.worksheet-empty span { font-size: 11px; }
.worksheet-heading { min-width: 880px; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 15px 18px; border-bottom: 1px solid #91a49a; background: #fff; }
.worksheet-heading > div:first-child { min-width: 0; }
.worksheet-heading > div:first-child > span { color: #177554; font-size: 10px; font-weight: 750; }
.worksheet-heading h2 { margin: 4px 0 2px; font-size: 19px; line-height: 1.2; letter-spacing: 0; }
.worksheet-heading p { margin: 0; color: #748079; font-size: 10px; }
.worksheet-actions { display: flex; align-items: center; gap: 5px; }
.worksheet-actions .icon-btn { border: 1px solid #ccd6d1; }
.worksheet-actions .icon-btn.danger { color: var(--red); }
.worksheet-rate-strip { min-width: 880px; min-height: 39px; display: flex; align-items: center; gap: 26px; padding: 7px 18px; border-bottom: 1px solid #b9c4bf; color: #45534d; background: #eef2f0; font-size: 10px; }
.worksheet-rate-strip span:last-child { margin-left: auto; color: #6f7b75; }
.worksheet-rate-strip strong { margin-left: 5px; color: #13231d; font-variant-numeric: tabular-nums; }
.worksheet-grid { min-width: 880px; display: grid; grid-template-columns: minmax(450px, 1.12fr) minmax(390px, .88fr); gap: 18px; padding: 16px 18px 0; }
.worksheet-main { min-width: 0; display: grid; align-content: start; gap: 16px; }
.worksheet-block { min-width: 0; }
.worksheet-block h3 { min-height: 28px; display: flex; align-items: center; margin: 0; padding: 5px 8px; color: #fff; background: #17211d; font-size: 11px; letter-spacing: 0; }
.worksheet-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: #27342f; font-size: 10px; }
.worksheet-table th { height: 31px; padding: 5px 8px; border: 1px solid #263d49; color: #fff; background: #397da2; font-weight: 750; text-align: center; }
.worksheet-table td { height: 29px; padding: 4px 8px; border: 1px solid #b8c4c9; background: #f5fafc; font-variant-numeric: tabular-nums; }
.worksheet-input-table th:nth-child(1) { width: 48%; text-align: left; }
.worksheet-input-table th:nth-child(2) { width: 27%; }
.worksheet-input-table th:nth-child(3) { width: 25%; }
.worksheet-input-table td.worksheet-label { text-align: left; }
.worksheet-input-table td.worksheet-input-cell { padding: 0; background: #fff0b8; }
.worksheet-input-cell input { width: 100%; height: 28px; padding: 3px 8px; border: 0; border-radius: 0; outline: 0; color: #164f9a; background: transparent; font-size: 10px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.worksheet-input-cell input[type="text"] { text-align: left; }
.worksheet-input-cell input[data-sheet-formatted] { text-align: right; }
.worksheet-input-cell input:focus { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px #168560; background: #fff7d6; }
.worksheet-number-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; }
.worksheet-number-with-unit span { color: #164f9a; font-size: 10px; font-weight: 800; text-align: center; }
.worksheet-number-with-prefix { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; }
.worksheet-number-with-prefix span { color: #164f9a; font-size: 10px; font-weight: 800; text-align: center; }
.form-input-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: stretch; }
.form-input-with-unit input { border-radius: 6px 0 0 6px; }
.form-input-with-unit > span { display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; color: var(--muted); background: #f4f7f5; font-weight: 750; }
.worksheet-note { color: #752c22; background: #fff8ee !important; font-weight: 700; }
.worksheet-note svg { width: 11px; height: 11px; margin-right: 4px; color: #e34d36; vertical-align: -2px; fill: #e34d36; }
.worksheet-reference { min-width: 0; display: grid; align-content: start; gap: 14px; }
.worksheet-comparison-table th:nth-child(1) { width: 43%; text-align: left; }
.worksheet-comparison-table th:not(:first-child) { width: 19%; }
.worksheet-comparison-table td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.worksheet-comparison-table td:not(:first-child) { text-align: right; }
.worksheet-comparison-table td.positive { color: #a33d30; background: #fff4f1; }
.worksheet-comparison-table td.negative { color: #136747; background: #edf7f2; }
.worksheet-reference .worksheet-block > p { margin: 7px 2px 0; color: #7b8781; font-size: 9px; line-height: 1.5; }
.worksheet-summary { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #b4c1bb; background: #f4f8f6; }
.worksheet-summary > div { min-height: 63px; padding: 10px 12px; border-right: 1px solid #d4ddda; border-bottom: 1px solid #d4ddda; }
.worksheet-summary > div:nth-child(2n) { border-right: 0; }
.worksheet-summary > div:nth-child(n+3) { border-bottom: 0; }
.worksheet-summary span { display: block; color: #69766f; font-size: 9px; }
.worksheet-summary strong { display: block; margin-top: 7px; color: #1a4f3d; font-size: 16px; font-variant-numeric: tabular-nums; }
.worksheet-summary .primary { color: #fff; background: #1d6d50; }
.worksheet-summary .primary span, .worksheet-summary .primary strong { color: #fff; }
.worksheet-results { min-width: 844px; margin: 16px 18px 20px; }
.worksheet-results .worksheet-table th:first-child { width: 52%; text-align: left; }
.worksheet-results .worksheet-table td { text-align: right; }
.worksheet-results .worksheet-table td:first-child { text-align: left; }
.worksheet-results tr.cost td:not(:first-child) { color: #a04639; }
.worksheet-results tr.subtotal td { color: #173e30; background: #dcebe4; font-weight: 750; }
.worksheet-results tr.total td { color: #fff; border-color: #1b5f48; background: #1d6d50; font-size: 11px; font-weight: 800; }

/* Compact worksheet layout follows the supplied BestBuy calculator format. */
.new-product-workbench { width: 100%; max-width: 1440px; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.new-product-navigator { position: static; min-height: 0; display: block; border-radius: 3px; box-shadow: none; }
.new-product-nav-filter { min-height: 42px; padding: 5px 8px; }
.new-product-nav-filter select { max-width: 220px; }
.new-product-list { max-height: none; display: flex; overflow-x: auto; overflow-y: hidden; }
.new-product-list-item { width: auto; min-width: 188px; min-height: 54px; padding: 8px 11px; border-right: 1px solid #d9e1dc; border-bottom: 0; }
.new-product-list-item.active { box-shadow: inset 0 -4px #167a55; }
.new-product-sheet { width: 100%; border-color: #9aa69f; border-radius: 2px; box-shadow: none; }
.worksheet-heading { min-width: 620px; min-height: 68px; padding: 10px 12px; }
.worksheet-heading h2 { font-size: 16px; }
.worksheet-rate-strip { min-width: 620px; min-height: 27px; display: grid; grid-template-columns: 1fr 120px; gap: 0; padding: 0; border-bottom: 0; background: #e7e9e8; }
.worksheet-rate-strip span { display: flex; align-items: center; min-height: 27px; padding: 4px 7px; }
.worksheet-rate-strip span:last-child { justify-content: center; margin-left: 0; color: #17211d; }
.worksheet-rate-strip strong { margin-left: 0; color: #07100d; font-size: 11px; }
.worksheet-single-column { min-width: 620px; display: grid; gap: 14px; padding: 8px 7px 12px; }
.worksheet-block h3 { min-height: 25px; padding: 4px 6px; background: #050706; font-size: 10px; }
.worksheet-table { font-size: 10px; }
.worksheet-table th { height: 27px; padding: 3px 6px; border-color: #172129; background: #4b91b7; }
.worksheet-table td { height: 25px; padding: 2px 6px; border-color: #8c9ba2; background: #eaf3f8; }
.worksheet-input-table th:nth-child(1) { width: 51%; }
.worksheet-input-table th:nth-child(2) { width: 25%; }
.worksheet-input-table th:nth-child(3) { width: 24%; }
.worksheet-input-table tbody tr:not(.worksheet-fixed-row) td.worksheet-label { background: #fde1cf; }
.worksheet-input-table tbody tr:not(.worksheet-fixed-row) td.worksheet-note { background: #fde1cf !important; }
.worksheet-input-table td.worksheet-input-cell { background: #fff0ad; }
.worksheet-input-cell input { height: 24px; padding: 2px 6px; font-size: 10px; }
.worksheet-fixed-row td, .worksheet-fixed-row td.worksheet-input-cell { background: #eaf3f8; }
.worksheet-fixed-row input { color: #17211d; }
.worksheet-fee-parent td { border-top: 2px solid #6f8792; background: #dcebe4 !important; font-weight: 800; }
.worksheet-fee-parent input:disabled { color: #173e30; opacity: 1; cursor: default; }
.worksheet-fee-child td:first-child { position: relative; padding-left: 22px; }
.worksheet-fee-child td:first-child::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 6px; border-left: 1px solid #9db1a8; }
.worksheet-note { color: #2d211d; }
.worksheet-note svg { width: 10px; height: 10px; color: #e23f28; fill: #e23f28; }
.worksheet-note.fixed { color: #222d28; text-align: left; font-weight: 700; }
.worksheet-results { min-width: 0; margin: 0; }
.worksheet-results .worksheet-table th:first-child { width: 51%; }
.worksheet-results .worksheet-table th:nth-child(2) { width: 25%; }
.worksheet-results .worksheet-table th:nth-child(3) { width: 24%; }
.worksheet-results tr.positive td, .worksheet-results tr.cost td { background: #eaf3f8; }
.worksheet-results tr.cost td:not(:first-child) { color: #9a3229; }
.worksheet-results tr.included td { color: #53655d; background: #f2f7f4; font-size: 9px; }
.worksheet-results tr.included td:first-child { padding-left: 20px; }
.worksheet-results tr.parent td { border-top: 2px solid #8aa096; font-weight: 750; }
.worksheet-results tr.subtotal td { color: #173e30; background: #dcebe4; }
.worksheet-results tr.total td { color: #fff; background: #1d6d50; }
.worksheet-results tr.ratio td { font-style: italic; font-weight: 700; }
.worksheet-results tr.ratio.risk td:last-child { color: var(--red); background: #fff0ed; }
.worksheet-formula-errors { margin: -5px 0 0; padding: 9px 11px; border: 1px solid #e1aaa3; color: #8d3027; background: #fff2f0; font-size: 10px; line-height: 1.5; }

/* The active-product list uses the same worksheet language as the new-product calculator. */
.active-product-mode .workspace { padding-top: 24px; }
.active-product-mode .page-heading { margin-bottom: 16px; }
.active-product-mode .profit-dataset-tabs { margin-bottom: 12px; }
.active-product-mode .kpi-grid { gap: 10px; margin-bottom: 10px; }
.active-product-mode .kpi { min-height: 80px; gap: 11px; padding: 12px 14px; border-radius: 3px; box-shadow: none; }
.active-product-mode .kpi::before { display: none; }
.active-product-mode .kpi-icon { width: 34px; height: 34px; border-radius: 4px; }
.active-product-mode .kpi strong { margin: 1px 0; font-size: 19px; }
.active-product-mode .kpi:nth-child(1) { border-color: #b7d7c8; background: #e7f3ed; }
.active-product-mode .kpi:nth-child(1) .kpi-icon { color: #1d6d50; background: #fff; }
.active-product-mode .kpi:nth-child(2) { border-color: #c5d9cf; background: #e8f2ed; }
.active-product-mode .kpi:nth-child(3) { border-color: #c4d9e4; background: #eaf3f8; }
.active-product-mode .kpi:nth-child(4) { border-color: #ead1cc; background: #fff4f1; }
.active-product-mode .model-section { border-color: #9aa69f; border-radius: 2px; box-shadow: none; }
.active-product-mode .table-toolbar { min-height: 60px; padding: 9px 14px; background: #f7f9f8; }
.active-product-mode .search, .active-product-mode .filters select { height: 36px; min-height: 36px; border-radius: 3px; background: #fff; }
.active-product-mode .rate-control { padding: 5px 5px 5px 14px; }
.active-product-mode .data-table th { height: 38px; border-right-color: rgba(255,255,255,.18); border-bottom-color: #172129; background: #4b91b7; }
.active-product-mode .data-table { min-width: 1600px; }
.active-product-mode .data-table th.sticky { background: #397da2; }
.active-product-mode .data-table th.sort-active { background: #2f7398; }
.active-product-mode .sort-header { height: 38px; }
.active-product-mode .data-table td { height: 37px; border-right: 1px solid #c5d0d5; border-bottom-color: #c5d0d5; background: #eaf3f8; }
.active-product-mode .data-table td.input-cell { color: #164f9a; background: #fff; }
.active-product-mode .data-table tbody tr:nth-child(even) td.input-cell { background: #f7faf8; }
.active-product-mode .data-table td.formula-cell { color: #173e30; background: #eaf3f8; }
.active-product-mode .data-table td.sticky.input-cell { background: #f1f7f4; box-shadow: 5px 0 10px rgba(21,46,36,.08); }
.active-product-mode .data-table td.risk { color: #9a3229; background: #fff0ed; }
.active-product-mode .data-table td.good { color: #126846; background: #e2f0e9; }
.active-product-mode .data-table tr:hover td { background: #dfeee7 !important; }
.active-product-mode .table-footer { min-height: 38px; border-top-color: #b8c4c9; background: #eef2f0; }
.data-table th { position: sticky; top: 0; z-index: 3; height: 46px; padding: 0 11px; border-right: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid #2c493f; color: #f3f7f5; background: #234238; font-weight: 700; white-space: nowrap; text-align: right; }
.data-table th.text { text-align: left; }
.data-table th.sticky, .data-table td.sticky { position: sticky; left: 0; z-index: 2; background: #fff; }
.data-table .selection-column { position: sticky; left: 0; z-index: 4; width: 44px; min-width: 44px; padding: 0; text-align: center; }
.data-table th.selection-column { z-index: 6; background: #397da2; }
.data-table td.selection-column { background: #f7faf8; }
.data-table.has-row-selection th.sticky:not(.selection-column), .data-table.has-row-selection td.sticky:not(.selection-column) { left: 44px; }
.data-table input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--green); cursor: pointer; }
.data-table tr.row-selected td { background: #dceee5 !important; }
.data-table th.sticky { z-index: 5; background: #1c382f; box-shadow: 5px 0 10px rgba(21,46,36,.08); }
.data-table th.sort-active { background: #2d5b4c; }
.sort-header { width: 100%; height: 46px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; margin: 0; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; white-space: nowrap; }
.sort-header.text-sort-header { justify-content: flex-start; }
.sort-header svg { width: 14px; height: 14px; flex: 0 0 14px; opacity: .72; }
.sort-header:hover svg, .sort-header:focus-visible svg { opacity: 1; }
.sort-header:focus-visible { outline: 2px solid #a6d7c3; outline-offset: -3px; border-radius: 3px; }
.data-table td { height: 45px; padding: 4px 11px; border-bottom: 1px solid #e7ece9; color: #3e4944; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table tbody tr:nth-child(even) td:not(.formula-cell):not(.risk) { background: #fbfcfb; }
.data-table tr:hover td { background: #eef6f2 !important; }
.data-table tr:hover td.sticky { background: #eef6f2 !important; }
.data-table td.text { max-width: 190px; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.data-table td.input-cell { color: #155bb8; }
.data-table td.formula-cell { color: #135c40; background: #f1f8f4; font-weight: 650; }
.data-table td.formula-cell .fx { margin-right: 5px; color: #6f9888; font-size: 8px; font-weight: 800; vertical-align: 1px; }
.data-table td.risk { color: var(--red); background: #fff7f6; }
.data-table td.good { color: var(--green); }
.data-table td.action-cell { text-align: center; }
.row-actions { display: inline-flex; gap: 2px; }
.row-actions .icon-btn { width: 28px; height: 28px; }
.fee-notes-scroll { min-height: 360px; }
.fee-notes-table { min-width: 1790px; table-layout: fixed; }
.fee-notes-table th, .fee-notes-table td { padding-inline: 16px; }
.fee-notes-table th:nth-child(1) { width: 150px; }
.fee-notes-table th:nth-child(2) { width: 180px; }
.fee-notes-table th:nth-child(3) { width: 80px; }
.fee-notes-table th:nth-child(4) { width: 140px; }
.fee-notes-table th:nth-child(5) { width: 110px; }
.fee-notes-table th:nth-child(6) { width: 90px; }
.fee-notes-table th:nth-child(7) { width: 390px; }
.fee-notes-table th:nth-child(8) { width: 90px; }
.fee-notes-table th:nth-child(9) { width: 340px; }
.fee-notes-table th:nth-child(10) { width: 120px; }
.fee-notes-table td { height: 48px; border-right: 1px solid #edf1ef; vertical-align: middle; }
.fee-notes-table td:last-child { border-right: 0; }
.fee-notes-table .fee-note-country, .fee-notes-table .fee-note-rate { text-align: center; }
.fee-detail-cell { min-width: 0; text-align: left !important; white-space: nowrap !important; overflow: hidden; }
.fee-detail-cell > span { min-height: 24px; display: flex; align-items: center; padding: 3px 0; border-bottom: 1px solid #edf1ef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.fee-detail-cell > span:last-child { border-bottom: 0; }
.fee-detail-rate-cell > span { justify-content: center; font-variant-numeric: tabular-nums; }
.fee-note-validation { min-width: 0; text-align: left; white-space: normal; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; }
.fee-note-validation small { display: block; max-width: 100%; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.fee-check { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; }
.fee-check svg { width: 13px; height: 13px; }
.fee-check.ok { color: var(--green); }
.fee-check.warning { color: var(--red); }
.fee-check.neutral { color: var(--muted); }
.fee-note-mismatch td, .fee-note-mismatch td.sticky { background: #fff9f2; }
.table-footer { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; border-top: 1px solid #eef1ef; color: var(--muted); background: #f8faf9; font-size: 10px; }
.active-product-mode .data-table tbody tr:nth-child(even) td.input-cell { background: #f7faf8; }
.empty-state { min-height: 330px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); }
.empty-state svg { width: 32px; }
.empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state span { font-size: 12px; }
.store-sales-section { min-height: 420px; }
.sales-filter-bar { display: flex; align-items: flex-end; gap: 14px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); }
.sales-filters { min-width: 0; flex: 1; display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 10px; }
.sales-filters label { min-width: 0; }
.sales-filters label > span { margin-bottom: 5px; color: #53605a; font-size: 10px; }
.sales-filters select { min-width: 0; height: 38px; min-height: 38px; padding: 6px 9px; background: #f8faf9; font-size: 11px; }
.sales-multi-filter { position: relative; min-width: 0; }
.sales-multi-filter > span { display: block; margin-bottom: 5px; color: #53605a; font-size: 10px; }
.sales-multi-trigger { width: 100%; height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #f8faf9; font: inherit; font-size: 11px; cursor: pointer; }
.sales-multi-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-multi-trigger svg { width: 14px; flex: 0 0 auto; transition: transform .15s ease; }
.sales-multi-filter.open .sales-multi-trigger { border-color: #72a28f; box-shadow: 0 0 0 2px rgba(31, 107, 80, .1); }
.sales-multi-filter.open .sales-multi-trigger svg { transform: rotate(180deg); }
.sales-multi-menu { position: absolute; top: calc(100% + 5px); left: 0; z-index: 8; width: max(100%, 220px); max-height: 260px; padding: 5px; border: 1px solid #cfdad4; border-radius: 6px; background: #fff; box-shadow: 0 12px 30px rgba(25, 54, 43, .18); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease; }
.sales-multi-filter.open .sales-multi-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.sales-multi-menu label { min-height: 32px; display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 4px; cursor: pointer; }
.sales-multi-menu label:hover { background: #eef5f1; }
.sales-multi-menu label > span { min-width: 0; margin: 0; color: #34413b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sales-multi-menu input { width: 15px; height: 15px; flex: 0 0 auto; accent-color: var(--green); }
.sales-menu-search { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; padding: 5px 7px; border-bottom: 1px solid #e4ebe7; background: #fff; }
.sales-menu-search svg { width: 14px; height: 14px; flex: 0 0 auto; color: #718078; }
.sales-menu-search input { width: 100%; height: 28px; min-height: 28px; padding: 0 7px; border: 1px solid #d8e1dc; border-radius: 4px; color: var(--ink); background: #f8faf9; font: inherit; font-size: 11px; outline: none; }
.sales-menu-search input:focus { border-color: #72a28f; box-shadow: 0 0 0 2px rgba(31, 107, 80, .1); }
.sales-single-option { width: 100%; min-height: 32px; display: grid; grid-template-columns: 15px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 7px; border: 0; border-radius: 4px; color: #34413b; background: transparent; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.sales-single-option:hover { background: #eef5f1; }
.sales-single-option svg { width: 14px; height: 14px; color: transparent; }
.sales-single-option.selected { color: #174e3b; background: #e7f0eb; font-weight: 700; }
.sales-single-option.selected svg { color: var(--green); }
.sales-option-hidden { display: none !important; }
.sales-clear-filter { flex: 0 0 auto; margin-bottom: 2px; border: 1px solid var(--line); background: #f8faf9; }
.sales-summary { min-height: 36px; display: flex; align-items: center; padding: 0 4px; color: var(--muted); font-size: 11px; }
.sales-chart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sales-chart-panel { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.sales-chart-panel > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid #edf1ef; }
.sales-chart-heading { min-width: 0; }
.sales-chart-heading > span { color: var(--green); font-size: 10px; font-weight: 700; }
.sales-chart-panel h2 { margin: 4px 0 0; font-size: 16px; letter-spacing: 0; }
.sales-chart-controls { display: flex; align-items: center; gap: 10px; }
.sales-chart-controls > strong { min-width: 72px; color: #24473a; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sales-metric-switch { display: inline-flex; align-items: center; height: 36px; padding: 3px; border: 1px solid #d7e0db; border-radius: 6px; background: #f3f6f4; }
.sales-view-select { height: 36px; display: grid; grid-template-columns: auto 112px; align-items: center; gap: 7px; padding: 3px 5px 3px 10px; border: 1px solid #d7e0db; border-radius: 6px; background: #f3f6f4; }
.sales-view-select > span { color: #65716b; font-size: 10px; white-space: nowrap; }
.sales-view-select select { width: 112px; min-height: 28px; padding: 0 24px 0 8px; border: 0; border-radius: 4px; background-color: #fff; font-size: 11px; }
.sales-metric-btn { min-width: 66px; height: 28px; padding: 0 12px; border: 0; border-radius: 4px; color: #59655f; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.sales-metric-btn:hover { color: #174e3b; background: #e7f0eb; }
.sales-metric-btn.active { color: #fff; background: #1f6b50; box-shadow: 0 1px 3px rgba(19, 70, 51, .2); font-weight: 700; }
.sales-metric-btn:focus-visible { outline: 2px solid #8fc5af; outline-offset: 1px; }
.line-chart { position: relative; min-height: 390px; padding: 10px 16px 8px; }
.line-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.inventory-detail-panel { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow-soft); overflow: hidden; }
.inventory-detail-panel > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid #edf1ef; }
.inventory-detail-panel > header span { color: var(--green); font-size: 10px; font-weight: 700; }
.inventory-detail-panel h2 { margin: 3px 0 0; font-size: 15px; letter-spacing: 0; }
.inventory-detail-panel > header > strong { color: #24473a; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inventory-detail-scroll { overflow-x: auto; }
.inventory-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inventory-detail-columns.single { grid-template-columns: minmax(0, 1fr); }
.inventory-detail-column + .inventory-detail-column { border-left: 1px solid #dfe7e2; }
.inventory-detail-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 11px; }
.inventory-detail-table th, .inventory-detail-table td { height: 38px; padding: 7px 12px; border-bottom: 1px solid #e7ece9; text-align: left; white-space: nowrap; }
.inventory-detail-table thead th { color: #53605a; background: #f5f8f6; font-weight: 700; }
.inventory-detail-table td:nth-child(n+3), .inventory-detail-table th:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.inventory-detail-table .inventory-total-cell { color: #174f3a; background: #f1f7f4; font-weight: 750; }
.inventory-detail-table tbody tr:hover td { background: #f2f8f5; }
.return-rate-detail-table { min-width: 860px; }
.return-rate-detail-table th:nth-child(-n+3), .return-rate-detail-table td:nth-child(-n+3) { text-align: left; }
.return-rate-detail-table th:nth-child(n+4), .return-rate-detail-table td:nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.return-rate-detail-table .return-rate-cell { color: #1557b0; background: #f1f6fb; font-weight: 750; }
.inventory-detail-total { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; color: #234238; background: #eef5f1; font-size: 11px; font-weight: 750; }
.inventory-detail-total strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.inventory-detail-empty { min-height: 96px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.chart-canvas { position: relative; min-width: 0; }
.chart-grid-line { stroke: #e6ece8; stroke-width: 1; }
.chart-axis-label { fill: #77837d; font-size: 10px; font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif; }
.chart-series-line { transition: opacity .12s ease; }
.chart-legend { min-height: 28px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 5px 8px 0; color: #53605a; font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 18px; height: 3px; border-radius: 2px; }
.chart-legend-left { justify-content: flex-start; flex-wrap: wrap; padding-inline: 48px 12px; }
.chart-segment-label { fill: #fff; font: 700 10px "Segoe UI", "Microsoft YaHei UI", sans-serif; pointer-events: none; }
.chart-total-label { fill: #34483f; font: 650 10px "Segoe UI", "Microsoft YaHei UI", sans-serif; pointer-events: none; }
.chart-bar-hit-area { cursor: crosshair; outline: none; }
.chart-bar-hit-area:focus { stroke: #8fc5af; stroke-width: 1; }
.chart-facet-divider { stroke: #cdd8d2; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-facet-title { fill: #263d34; font: 700 11px "Segoe UI", "Microsoft YaHei UI", sans-serif; }
.chart-composition-hit { cursor: crosshair; outline: none; }
.chart-composition-hit:focus { stroke: #8fc5af; stroke-width: 1; }
.composition-week-range { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 3px 54px 14px; border-top: 1px solid #edf1ef; }
.composition-week-range label { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px; color: #53605a; font-size: 10px; }
.composition-week-range input { width: 100%; height: 24px; margin: 0; accent-color: var(--green); cursor: grab; }
.composition-week-range input:active { cursor: grabbing; }
.donut-layout { min-height: 340px; display: grid; grid-template-columns: minmax(260px, .8fr) minmax(280px, 1.2fr); align-items: center; gap: 48px; max-width: 820px; margin: 0 auto; padding: 26px 40px; }
.donut-visual { display: grid; place-items: center; }
.donut-visual svg { width: min(280px, 100%); }
.donut-visual text { fill: #738079; font: 11px "Segoe UI", "Microsoft YaHei UI", sans-serif; }
.donut-visual .donut-total { fill: #173d30; font-size: 18px; font-weight: 750; }
.donut-breakdown { display: grid; gap: 2px; }
.donut-row { min-height: 43px; display: grid; grid-template-columns: 10px minmax(80px, 1fr) 62px 80px; align-items: center; gap: 10px; border-bottom: 1px solid #edf1ef; font-size: 11px; }
.donut-row i { width: 9px; height: 9px; border-radius: 2px; }
.donut-row span { color: #46534d; }
.donut-row strong { color: #173d30; text-align: right; }
.donut-row small { color: #7b8781; text-align: right; }
.chart-hover-guide { stroke: #7f958b; stroke-width: 1; stroke-dasharray: 4 4; opacity: 0; pointer-events: none; }
.chart-hover-guide.show { opacity: 1; }
.chart-hit-area { cursor: crosshair; outline: none; }
.chart-hit-area:focus { stroke: #8fc5af; stroke-width: 1; }
.chart-tooltip { position: absolute; z-index: 2; min-width: 180px; max-width: 230px; padding: 10px 12px; border: 1px solid #cfdad4; border-radius: 6px; color: #34413b; background: rgba(255, 255, 255, .98); box-shadow: 0 8px 24px rgba(25, 54, 43, .16); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.chart-tooltip.show { opacity: 1; visibility: visible; transform: translateY(0); }
.chart-tooltip > b { display: inline-block; margin-right: 7px; color: #1d332a; font-size: 12px; }
.chart-tooltip > small { color: var(--muted); font-size: 10px; }
.chart-tooltip-row { display: grid; grid-template-columns: 8px minmax(52px, 1fr) auto; align-items: center; gap: 7px; margin-top: 7px; font-size: 11px; }
.chart-tooltip-row i { width: 7px; height: 7px; border-radius: 50%; }
.chart-tooltip-row span { color: #65716b; }
.chart-tooltip-row strong { color: #243d33; font-variant-numeric: tabular-nums; }
.chart-tooltip-yoy { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e3e9e6; }
.chart-tooltip-yoy i { height: 2px; border-radius: 1px; background: #8a9992; }
.chart-tooltip-yoy strong.positive { color: #137553; }
.chart-tooltip-yoy strong.negative { color: #c24747; }
.chart-empty { min-height: 290px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.store-sales-empty { min-height: 420px; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 40px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; box-shadow: var(--shadow-soft); text-align: center; }
.store-sales-empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #c7d8d0; border-radius: 7px; color: var(--green); background: var(--green-soft); }
.store-sales-empty-icon svg { width: 23px; }
.store-sales-empty strong { margin-top: 4px; color: var(--ink); font-size: 15px; }
.store-sales-empty > span:last-child { font-size: 12px; }

@media (min-width: 761px) {
  .app-shell.new-product-mode { height: 100vh; min-height: 0; overflow: hidden; }
  .new-product-mode .workspace { height: calc(100vh - 74px); display: flex; flex-direction: column; overflow: hidden; }
  .new-product-mode .page-heading, .new-product-mode .profit-dataset-tabs { flex: 0 0 auto; }
  .new-product-mode .new-product-workbench { height: 0; min-height: 0; flex: 1 1 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .new-product-mode .new-product-navigator { min-height: 0; }
  .new-product-mode .new-product-sheet { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .new-product-mode .worksheet-heading, .new-product-mode .worksheet-rate-strip { flex: 0 0 auto; }
  .new-product-mode .worksheet-single-column { min-height: 0; flex: 1 1 auto; grid-auto-rows: max-content; align-content: start; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
  .store-sales-mode .topbar { position: sticky; top: 0; }
  .store-sales-mode .sidebar { position: sticky; top: 74px; height: calc(100vh - 74px); align-self: start; overflow-y: auto; }
  .store-sales-mode .workspace {
    min-height: 0;
    padding: 8px 22px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .store-sales-mode .page-heading { position: sticky; top: 0; z-index: 7; height: 60px; margin-bottom: 6px; background: #eef2ef; }
  .store-sales-mode .page-heading h1 { margin-block: 3px 2px; font-size: 23px; }
  .store-sales-mode .store-sales-dataset-tabs { position: sticky; top: 60px; z-index: 7; min-height: 42px; margin: 0 0 6px; background: #eef2ef; }
  .store-sales-mode .store-sales-kpis { position: sticky; top: 108px; z-index: 6; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; background: #eef2ef; }
  .store-sales-mode .store-sales-kpis .kpi { min-height: 74px; gap: 10px; padding: 11px 14px; }
  .store-sales-mode .store-sales-kpis .kpi-icon { width: 32px; height: 32px; }
  .store-sales-mode .store-sales-kpis .kpi strong { font-size: 19px; }
  .store-sales-mode .sales-filter-bar { position: sticky; top: 182px; z-index: 7; padding: 8px 12px; }
  .store-sales-mode .store-sales-kpis.hidden + .store-sales-section .sales-filter-bar { top: 108px; }
  .store-sales-mode .sales-filters { grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 8px; }
  .store-returns-mode .sales-filters { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
  .store-sales-mode .sales-filters label > span { margin-bottom: 3px; }
  .store-sales-mode .sales-multi-filter > span { margin-bottom: 3px; }
  .store-sales-mode .sales-filters select { height: 34px; min-height: 34px; padding-block: 4px; }
  .store-sales-mode .sales-multi-trigger { height: 34px; }
  .store-sales-mode .sales-summary { min-height: 26px; }
  .store-sales-mode .sales-chart-panel > header { min-height: 56px; padding: 9px 16px; }
  .store-sales-mode .sales-chart-controls { flex-wrap: wrap; justify-content: flex-end; }
  .store-sales-mode .line-chart { min-height: 0; padding-block: 4px; }
  .store-sales-mode .chart-legend { min-height: 22px; padding-top: 2px; }
}

dialog { padding: 0; border: 0; border-radius: 8px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(17, 25, 22, .48); backdrop-filter: blur(2px); }
.modal { width: min(560px, calc(100vw - 32px)); }
.modal.wide { width: min(880px, calc(100vw - 32px)); }
.modal.wide:has(.new-product-form) { width: min(1180px, calc(100vw - 32px)); }
.modal.new-product-detail-modal { width: min(1050px, calc(100vw - 32px)); }
.modal.audit-modal { width: min(1500px, calc(100vw - 32px)); }
.modal.account-modal { width: min(1120px, calc(100vw - 32px)); }
.modal.column-settings-modal { width: min(980px, calc(100vw - 32px)); }
.modal-shell { display: block; margin: 0; padding: 0; }
.modal header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 5px 0 0; font-size: 19px; }
.modal > .modal-shell > label, .modal form > label:not(.drop-zone) { display: block; margin: 20px 24px 0; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-height: 58vh; padding: 20px 24px; overflow: auto; }
.form-grid label { display: block; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid textarea { min-height: 82px; resize: vertical; }
.row-column-add { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(170px, 1fr) auto; align-items: end; gap: 12px; margin-top: 4px; padding: 16px 0 2px; border-top: 1px solid var(--line); }
.row-column-add > div { align-self: center; display: flex; flex-direction: column; gap: 3px; }
.row-column-add > div strong { font-size: 12px; }
.row-column-add > div span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.row-column-add label > span { margin-bottom: 6px; color: #53605a; font-size: 10px; }
.row-column-add .btn { height: 40px; white-space: nowrap; }
.form-grid.new-product-form { display: block; max-height: 70vh; padding: 0; }
.new-product-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 520px; }
.new-product-form-sections { min-width: 0; padding: 4px 24px 22px; }
.form-section { padding: 18px 0; border-bottom: 1px solid #e5ebe7; }
.form-section:last-child { border-bottom: 0; }
.form-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 0; border: 0; }
.form-section > header span { color: #204b3b; font-size: 12px; font-weight: 750; }
.form-section > header small { color: #8a9690; font-size: 9px; }
.form-section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.form-section-grid label > span { display: block; min-height: 16px; margin-bottom: 5px; color: #53615a; font-size: 10px; }
.form-section-grid label.full { grid-column: 1 / -1; }
.new-product-preview { position: sticky; top: 0; align-self: start; min-height: 520px; padding: 24px 20px; border-left: 1px solid #dbe4df; background: #f4f8f6; }
.preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #d9e3de; }
.preview-heading span { color: var(--green); font-size: 10px; font-weight: 750; }
.preview-heading strong { max-width: 180px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.preview-metrics > div { min-height: 72px; padding: 11px; border: 1px solid #d7e2dc; border-radius: 6px; background: #fff; }
.preview-metrics > div.primary { grid-column: 1 / -1; color: #fff; border-color: #1c6d50; background: #1c6d50; }
.preview-metrics span, .preview-flow span { display: block; color: #718078; font-size: 9px; }
.preview-metrics .primary span { color: #d8eee4; }
.preview-metrics strong { display: block; margin-top: 6px; font-size: 16px; font-variant-numeric: tabular-nums; }
.preview-flow { display: grid; gap: 6px; margin-top: 18px; }
.preview-flow > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border-left: 3px solid #a9beb4; background: #fff; }
.preview-flow > div.result { border-left-color: var(--green); background: #e6f2ec; }
.preview-flow > div span { color: #57655e; }
.preview-flow > div strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.preview-flow > svg { width: 14px; height: 14px; justify-self: center; color: #90a098; }
.new-product-preview > p { margin: 18px 2px 0; color: #7b8882; font-size: 9px; line-height: 1.6; }
.dialog-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.new-product-detail-body { max-height: 68vh; padding: 20px 24px 24px; overflow: auto; }
.new-product-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.new-product-summary > div { min-height: 78px; padding: 13px 15px; border: 1px solid #dce4df; border-radius: 6px; background: #fff; }
.new-product-summary > div.primary { color: #fff; border-color: #1d6c50; background: #1d6c50; }
.new-product-summary span { display: block; color: #78857f; font-size: 9px; }
.new-product-summary .primary span { color: #d8eee4; }
.new-product-summary strong { display: block; margin-top: 8px; font-size: 19px; font-variant-numeric: tabular-nums; }
.risk-text { color: var(--red); }
.new-product-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 14px; }
.new-product-detail-grid > section, .new-product-detail-grid > aside { min-width: 0; border: 1px solid #dce4df; border-radius: 7px; overflow: hidden; }
.detail-section-heading { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid #e3e9e6; background: #f7f9f8; }
.detail-section-heading span { color: var(--green); font-size: 9px; font-weight: 750; }
.detail-section-heading h3 { margin: 3px 0 0; font-size: 13px; letter-spacing: 0; }
.detail-section-heading > small { color: #8a9690; font-size: 9px; }
.profit-waterfall > div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 1px solid #edf1ef; color: #526059; }
.profit-waterfall > div:last-child { border-bottom: 0; }
.profit-waterfall strong { color: #283831; font-variant-numeric: tabular-nums; }
.profit-waterfall .cost strong { color: #a1463f; }
.profit-waterfall .subtotal { color: #244b3d; background: #f1f6f3; font-weight: 700; }
.profit-waterfall .total { color: #fff; background: #1f6b50; font-weight: 750; }
.profit-waterfall .total strong { color: #fff; font-size: 14px; }
.assumption-list { margin: 0; padding: 6px 16px; }
.assumption-list > div { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf1ef; }
.assumption-list dt { color: #75827c; font-size: 10px; }
.assumption-list dd { margin: 0; color: #2f4038; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.new-product-detail-grid aside h4 { margin: 14px 16px 6px; color: #244b3d; font-size: 11px; }
.fee-breakdown { margin: 0; padding: 0 16px 14px; list-style: none; }
.fee-breakdown li { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1ef; color: #526059; font-size: 10px; }
.fee-breakdown li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fee-breakdown li small { margin-left: 4px; color: #85928c; }
.fee-breakdown li strong { color: #34463e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fee-breakdown li.empty { justify-content: center; color: #8a9690; border-bottom: 0; }
.rate-form-grid { grid-template-columns: 1fr 1fr; max-height: none; }
.fee-note-form-grid { grid-template-columns: 1fr 1fr; max-height: none; }
.fee-note-form-grid > .full { grid-column: 1 / -1; }
.fee-detail-editor { grid-column: 1 / -1; min-width: 0; padding: 14px; border: 1px solid #dce5e0; border-radius: 6px; background: #f8faf9; }
.fee-detail-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.fee-detail-editor-heading > div { display: flex; flex-direction: column; gap: 3px; }
.fee-detail-editor-heading strong { color: var(--ink); font-size: 12px; }
.fee-detail-editor-heading span { color: var(--muted); font-size: 10px; }
.fee-detail-editor-heading .btn { min-height: 32px; padding: 0 10px; }
.fee-detail-labels, .fee-detail-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 34px; gap: 8px; align-items: center; }
.fee-detail-labels { margin-bottom: 5px; color: #68756f; font-size: 10px; font-weight: 650; }
.fee-detail-rows { display: grid; gap: 7px; }
.fee-detail-row input { min-width: 0; height: 36px; }
.fee-detail-row .form-input-with-unit { min-width: 0; }
.fee-detail-row .icon-btn { width: 34px; height: 34px; color: var(--red); }
.column-settings-body { max-height: 65vh; padding: 18px 24px; overflow-x: hidden; overflow-y: auto; }
.column-settings-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.column-settings-group-label { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 2px 0 3px; }
.column-settings-group-label.secondary { margin-top: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.column-settings-group-label strong { color: #293a32; font-size: 12px; }
.column-settings-group-label span { color: var(--muted); font-size: 10px; }
.column-option { min-width: 0; min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #dfe7e3; border-radius: 5px; background: #fafcfb; font-size: 11px; }
.column-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.column-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-option small { margin-left: auto; color: var(--muted); font-size: 9px; }
.column-option.required { background: #f1f5f3; }
.column-option-editable { background: #fff; }
.fee-order-option small { flex: 0 0 auto; margin-left: 2px; }
.column-order-actions { flex: 0 0 auto; display: flex; gap: 3px; margin-left: 2px; }
.column-order-actions .icon-btn { width: 26px; height: 26px; border: 1px solid #dbe5e0; border-radius: 4px; color: #496057; background: #fff; }
.column-order-actions .icon-btn svg { width: 14px; height: 14px; }
.column-order-actions .icon-btn:hover:not(:disabled) { border-color: #8fbbaa; color: #126846; background: #edf6f1; }
.column-order-actions .icon-btn:disabled { opacity: .3; cursor: default; }
.column-order-actions .delete-fee-column { color: var(--red); }
.column-order-actions .delete-fee-column:hover { border-color: #d9a39c; color: #922f25; background: #fff1ef; }
.column-option > .delete-fee-column { width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid #ead5d2; border-radius: 4px; color: var(--red); background: #fff; }
.column-option > .delete-fee-column svg { width: 14px; height: 14px; }
.column-option > .delete-fee-column:hover { border-color: #d9a39c; color: #922f25; background: #fff1ef; }
.column-option .column-name-input { min-width: 0; width: 100%; height: 28px; padding: 4px 7px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: transparent; font: inherit; font-size: 11px; }
.column-name-input:hover { border-color: #d6e0db; background: #f8faf9; }
.column-name-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(22,122,85,.08); outline: 0; }
.column-add-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) minmax(160px, .75fr) auto; align-items: end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.column-add-row label > span { display: block; margin-bottom: 6px; color: #53605a; font-size: 10px; }
.column-add-row .btn { height: 38px; }
.formula-settings-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.formula-settings-section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; border: 0; }
.formula-settings-section > header > div { display: flex; flex-direction: column; gap: 3px; }
.formula-settings-section > header strong { font-size: 13px; }
.formula-settings-section > header span, .formula-settings-section > p { color: var(--muted); font-size: 10px; }
.formula-settings-section > p { margin: 10px 0 12px; line-height: 1.6; }
.formula-settings-section code { padding: 1px 4px; border-radius: 3px; color: #245747; background: #edf4f1; font-family: Consolas, monospace; font-size: 9px; }
.formula-reference-box { margin: 12px 0; padding: 11px 12px; border: 1px solid #dbe5e0; border-radius: 6px; background: #f7faf8; }
.formula-reference-box > span { display: block; margin-bottom: 8px; color: #53635b; font-size: 10px; font-weight: 750; }
.formula-reference-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.formula-reference-palette button { min-height: 27px; padding: 3px 8px; border: 1px solid #cbdad3; border-radius: 4px; color: #285443; background: #fff; font: inherit; font-size: 10px; cursor: pointer; }
.formula-reference-palette button:hover { border-color: var(--green); color: #fff; background: var(--green); }
.formula-settings-list { display: grid; gap: 7px; }
.formula-setting-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 12px; }
.formula-setting-row > span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #33423b; font-size: 11px; }
.formula-setting-row textarea { width: 100%; min-width: 0; min-height: 48px; padding: 8px 9px; border: 1px solid #d5dfda; border-radius: 5px; color: #173c2f; background: #fbfdfc; font-family: Consolas, monospace; font-size: 11px; line-height: 1.45; resize: vertical; }
.formula-setting-row textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,122,85,.08); outline: 0; }
.formula-settings-help { margin-bottom: 0 !important; }
.account-dialog-body { max-height: 68vh; padding: 0 24px; overflow: auto; }
.account-settings-tabs { position: sticky; top: 0; z-index: 3; display: flex; gap: 4px; padding: 12px 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.account-settings-tab { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 0; border-radius: 5px; color: #5d6b64; background: transparent; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.account-settings-tab svg { width: 15px; height: 15px; }
.account-settings-tab:hover { color: var(--ink); background: #f1f5f3; }
.account-settings-tab.active { color: #fff; background: #234238; }
.account-section { padding: 20px 0; }
.account-section + .account-section { border-top: 1px solid var(--line); }
.account-section-header { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.account-section-header h3 { margin: 0; font-size: 14px; }
.account-section-header span { color: var(--muted); font-size: 11px; }
.account-section-note { margin: -3px 0 12px; color: #68756f; font-size: 11px; line-height: 1.6; }
.role-assignment-note { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; }
.role-assignment-note svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--green); }
.account-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.account-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.account-table th { height: 36px; padding: 0 12px; color: #f3f7f5; background: #234238; text-align: left; }
.account-table th:last-child, .account-table td:last-child { width: 82px; text-align: center; }
.account-table td { height: 43px; padding: 5px 12px; border-bottom: 1px solid #e7ece9; color: #3e4944; }
.account-table tbody tr:last-child td { border-bottom: 0; }
.account-table tbody tr:nth-child(even) td { background: #fafcfb; }
.account-name { color: var(--ink); font-weight: 650; }
.account-email { color: #52615a; font-size: 11px; }
.role-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 5px; color: #285244; background: #e7f1ec; font-size: 10px; font-weight: 700; }
.account-delete { color: var(--red); }
.account-delete:hover { color: #8e2822; background: var(--red-soft); }
.account-delete:disabled { color: #aab3ae; background: transparent; cursor: not-allowed; }
.account-form-grid { display: grid; align-items: end; gap: 12px; }
.create-account-grid { grid-template-columns: minmax(115px, .8fr) minmax(115px, .8fr) minmax(190px, 1.25fr) minmax(105px, .7fr) minmax(135px, .9fr) auto; }
.account-profile-grid { grid-template-columns: minmax(160px, 1.1fr) minmax(140px, .9fr) minmax(200px, 1.3fr) minmax(120px, .8fr) auto; }
.password-account-grid { grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr) auto; }
.account-form-grid label { min-width: 0; }
.account-form-grid label > span { margin-bottom: 6px; font-size: 11px; }
.account-form-grid .btn { min-width: 112px; }
.account-scope { color: #5d6b64; font-size: 10px; line-height: 1.5; }

.password-reset-modal { width: min(520px, calc(100vw - 32px)); }
.password-reset-body { display: grid; gap: 15px; padding: 20px 22px 8px; }
.password-reset-body label { min-width: 0; }
.password-reset-body label > span { margin-bottom: 6px; font-size: 11px; }
.password-reset-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.password-reset-code-row .btn { min-width: 126px; }
.password-reset-message { min-height: 20px; margin: 0; color: #176b4e; font-size: 11px; line-height: 1.6; }
.password-reset-message.error { color: var(--red); }
.role-table td:first-child small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.role-scope-cell { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.role-scope-cell label { display: inline-flex; align-items: center; gap: 5px; color: #415048; font-size: 10px; white-space: nowrap; }
.role-scope-cell input, .role-permission-grid input { width: 14px; height: 14px; margin: 0; accent-color: var(--green); }
.role-create-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(420px, 1.6fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.role-create-form > label > span { margin-bottom: 6px; font-size: 11px; }
.role-permission-grid { min-height: 38px; display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); align-items: center; gap: 8px; }
.role-permission-grid label { display: inline-flex; align-items: center; gap: 6px; color: #46534d; font-size: 10px; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.drop-zone { display: grid; place-items: center; gap: 7px; margin: 22px 24px 14px; padding: 30px; border: 1px dashed #aab7b0; border-radius: 7px; background: var(--soft); text-align: center; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: var(--green-soft); }
.drop-zone svg { width: 28px; color: var(--green); }
.drop-zone strong { font-size: 14px; }
.drop-zone span { color: var(--muted); font-size: 11px; }
.import-guide { margin: 0 24px 14px; padding: 13px 15px; border-left: 3px solid #7da594; background: #f7faf8; color: #425049; }
.import-guide-title { display: flex; align-items: center; gap: 7px; color: #24483b; font-size: 12px; }
.import-guide-title svg { width: 16px; height: 16px; }
.import-guide ol { margin: 9px 0 0; padding-left: 20px; font-size: 11px; line-height: 1.65; }
.import-guide li + li { margin-top: 4px; }
.import-guide li::marker { color: #39715d; font-weight: 700; }
.import-preview { margin: 0 24px 18px; padding: 12px 14px; border-left: 3px solid var(--green); background: var(--green-soft); font-size: 12px; line-height: 1.8; }
.audit-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.audit-filters, .audit-toolbar-actions { display: flex; align-items: flex-end; gap: 10px; }
.audit-filters label { display: block; }
.audit-filters label > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.audit-filters input { width: 150px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.audit-filters .icon-btn { margin-bottom: 1px; border: 1px solid var(--line); background: #fff; }
.audit-toolbar-actions { align-items: center; }
.audit-toolbar-actions > span { min-width: 52px; color: var(--muted); font-size: 11px; text-align: right; }
.audit-table-wrap { position: relative; max-height: 68vh; overflow: auto; }
.audit-table { width: 100%; min-width: 1845px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 10px; }
.audit-table th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 0 11px; border-right: 1px solid rgba(255,255,255,.08); color: #fff; background: #234238; text-align: left; }
.audit-table th:nth-child(1) { width: 145px; }
.audit-table th:nth-child(2) { width: 92px; }
.audit-table th:nth-child(3) { width: 105px; }
.audit-table th:nth-child(4) { width: 105px; }
.audit-table th:nth-child(5) { width: 135px; }
.audit-table th:nth-child(6) { width: 150px; }
.audit-table th:nth-child(7) { width: 125px; }
.audit-table th:nth-child(8), .audit-table th:nth-child(9) { width: 300px; }
.audit-table th:nth-child(10) { width: 190px; }
.audit-table th:nth-child(11) { width: 170px; }
.audit-table td { padding: 11px; border-right: 1px solid #edf1ef; border-bottom: 1px solid #e5ebe7; color: #34413b; vertical-align: top; overflow-wrap: anywhere; white-space: pre-line; }
.audit-table tbody tr:nth-child(even) td { background: #fafcfb; }
.audit-table tbody tr:hover td { background: #eef6f2; }
.audit-time, .audit-account, .audit-action { white-space: nowrap !important; }
.audit-module { min-width: 0; white-space: normal !important; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.audit-action { color: var(--green) !important; font-weight: 700; }
.audit-snapshot { line-height: 1.65; }
.audit-formula-change { color: #1c5d47 !important; font-weight: 650; white-space: nowrap !important; }
.audit-empty-state { min-height: 260px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; min-width: 260px; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid #b9d8ca; border-radius: 7px; color: #115c3f; background: #f0faf5; box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .22s ease; font-size: 12px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { color: var(--red); border-color: #ecc0bd; background: #fff5f4; }
.toast svg { width: 18px; }

/* 2026 visual refresh: a quieter, more dimensional operating workspace. */
:root {
  --ink: #17241f;
  --muted: #68756f;
  --line: #dce4df;
  --line-strong: #c7d2cc;
  --surface: #ffffff;
  --soft: #f3f6f4;
  --green: #176f50;
  --green-soft: #e6f1eb;
  --blue: #315f78;
  --blue-soft: #edf3f6;
  --amber: #9b681f;
  --amber-soft: #fff4df;
  --red: #ad433a;
  --red-soft: #faeeec;
  --shadow: 0 22px 56px rgba(24, 43, 35, .16);
  --shadow-soft: 0 7px 22px rgba(27, 48, 39, .07);
}

html { scrollbar-color: #aebdb5 #edf2ef; scrollbar-width: thin; }
body { color: var(--ink); background: #f3f6f4; }
* { scrollbar-color: #b0beb7 transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 6px; background: #b3c0ba; background-clip: padding-box; }

.app-shell {
  height: 100vh;
  min-height: 0;
  grid-template: 70px minmax(0, 1fr) / 196px minmax(0, 1fr);
  overflow: hidden;
}
.topbar {
  gap: 20px;
  padding: 0 24px;
  border-bottom-color: #d8e1dc;
  background: rgba(255,255,255,.97);
  box-shadow: 0 3px 14px rgba(26, 49, 39, .06);
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 7px; color: #e8f5ef; background: #1b3d31; }
.brand strong { font-size: 14px; }
.brand span { color: #7a8680; font-size: 10px; }
.workspace-switch { height: 48px; gap: 3px; padding: 4px; border: 1px solid #cad6d0; border-radius: 7px; background: #eef2f0; box-shadow: none; }
.workspace-switch-btn { min-width: 132px; height: 38px; padding: 0 18px; border-radius: 5px; color: #52615a; background: transparent; font-size: 13px; }
.workspace-switch-btn:hover { border-color: transparent; background: #fff; }
.workspace-switch-btn.active { border-color: #176f50; background: #176f50; box-shadow: 0 4px 10px rgba(23,111,80,.2); }
.topbar-actions { gap: 14px; }
.sync-state { padding: 6px 9px; border: 1px solid #dce6e0; border-radius: 6px; color: #66746d; background: #f7faf8; font-size: 10px; }
.user-badge { padding-left: 14px; }
.user-badge > span { width: 30px; height: 30px; background: #29463b; }

.sidebar { min-height: 0; padding: 20px 10px; border-right: 1px solid rgba(255,255,255,.05); background: #172a23; box-shadow: 5px 0 18px rgba(20,39,31,.06); overflow-y: auto; }
.nav-label { margin-inline: 11px; color: #779087; font-size: 9px; }
.nav-label:not(:first-child) { margin-top: 24px; }
.nav-item { height: 42px; gap: 8px; padding: 0 10px; border-radius: 6px; color: #b8c9c2; transition: color .16s ease, background .16s ease, transform .16s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.065); }
.nav-item.active { color: #fff; background: #1c7454; box-shadow: 0 5px 13px rgba(4,19,13,.18); }
.nav-item.active svg { color: #d9f2e6; }
.nav-item b { border: 1px solid rgba(255,255,255,.06); border-radius: 6px; }
.formula-legend { color: #8fa49b; }

.workspace { min-height: 0; padding: 26px clamp(20px, 2.2vw, 34px) 32px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.page-heading { align-items: center; margin-bottom: 20px; }
.page-heading h1 { margin: 5px 0 3px; font-size: 25px; }
.page-heading > div > p:last-child { font-size: 12px; }
.heading-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.btn { height: 38px; padding-inline: 14px; border-radius: 6px; font-size: 12px; }
.btn.primary { box-shadow: 0 4px 10px rgba(23,111,80,.16); }
.btn.secondary { border-color: #cbd6d0; background: rgba(255,255,255,.9); }
.btn.secondary:hover { border-color: #aebfb6; background: #fff; box-shadow: 0 3px 9px rgba(26,52,41,.07); }
.icon-btn { border-radius: 6px; transition: color .15s ease, background .15s ease, transform .15s ease; }
.icon-btn:hover { transform: translateY(-1px); }

.profit-dataset-tabs {
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 3px;
  margin: -2px 0 16px;
  padding: 4px;
  border: 1px solid #d7e0db;
  border-radius: 7px;
  background: #e9eeeb;
  overflow-x: auto;
}
.profit-dataset-tab { min-height: 32px; padding: 0 12px; border: 0; border-radius: 5px; font-size: 12px; }
.profit-dataset-tab:hover { color: #185e46; background: rgba(255,255,255,.55); }
.profit-dataset-tab.active { border: 0; color: #174d3a; background: #fff; box-shadow: 0 2px 7px rgba(26,50,40,.1); }
.profit-dataset-tab b { border-radius: 5px; background: #dde6e1; }
.profit-dataset-tab.active b { color: #fff; background: #277557; }

.kpi-grid { gap: 11px; margin-bottom: 13px; }
.kpi, .active-product-mode .kpi {
  min-height: 86px;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #dbe4df;
  border-radius: 7px;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(29,51,42,.05);
}
.kpi::before, .active-product-mode .kpi::before { display: block; width: 3px; height: auto; right: auto; bottom: 0; }
.kpi:nth-child(1)::before { background: #2b8362; }
.kpi:nth-child(2)::before { background: #315f78; }
.kpi:nth-child(3)::before { background: #b47928; }
.kpi:nth-child(4)::before { background: #b44b42; }
.kpi-icon, .active-product-mode .kpi-icon { width: 36px; height: 36px; border-radius: 6px; }
.kpi-icon.ink { color: #315f78; background: #edf3f6; }
.kpi strong, .active-product-mode .kpi strong { margin: 2px 0; font-size: 20px; }
.kpi small { color: #89948f; }

.model-section, .active-product-mode .model-section {
  border-color: #d3ddd7;
  border-radius: 7px;
  box-shadow: var(--shadow-soft);
}
.active-product-sheet-heading { min-height: 52px; padding: 9px 15px; background: #243c33; }
.active-product-sheet-heading > div span { color: #83cbae; }
.active-sheet-status { padding: 5px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; background: rgba(255,255,255,.05); }
.table-toolbar, .active-product-mode .table-toolbar { min-height: 62px; padding: 10px 14px; background: #fbfcfb; }
.search, .active-product-mode .search, .filters select, .active-product-mode .filters select { height: 38px; min-height: 38px; border-radius: 6px; background: #fff; }
.search { width: min(300px, 34vw); }
.rate-control { padding-left: 16px; }
.rate-meta { gap: 3px; }
.bulk-row-actions { border-left-color: #d6dfda; }
.table-scroll { background: #fff; }
.data-table th, .active-product-mode .data-table th { height: 40px; border-right-color: rgba(255,255,255,.1); border-bottom-color: #263f36; background: #315247; font-size: 10px; }
.data-table th.sticky, .active-product-mode .data-table th.sticky { background: #29483e; }
.data-table th.sort-active, .active-product-mode .data-table th.sort-active { background: #1f6a4d; }
.sort-header, .active-product-mode .sort-header { height: 40px; }
.data-table td, .active-product-mode .data-table td { height: 39px; border-right: 1px solid #edf1ef; border-bottom: 1px solid #e5ebe7; color: #435049; background: #fff; }
.data-table tbody tr:nth-child(even) td:not(.formula-cell):not(.risk),
.active-product-mode .data-table tbody tr:nth-child(even) td.input-cell { background: #fafcfb; }
.data-table td.input-cell, .active-product-mode .data-table td.input-cell { color: #285d87; background: #fff; }
.data-table td.formula-cell, .active-product-mode .data-table td.formula-cell { color: #1d5f46; background: #f0f7f3; }
.active-product-mode .data-table td.sticky.input-cell { background: #f8fbf9; box-shadow: 4px 0 10px rgba(24,48,38,.06); }
.data-table tr:hover td, .active-product-mode .data-table tr:hover td { background: #edf5f1 !important; }
.data-table tr.row-selected td { background: #dfeee6 !important; }
.active-product-mode .data-table td.formula-cell.risk { color: #d11f45; font-weight: 800; box-shadow: none; }
.active-product-mode .data-table td.formula-cell.warning { color: #b47a00; font-weight: 800; }
.row-actions .icon-btn { border: 1px solid transparent; }
.row-actions .icon-btn:hover { border-color: #d5dfda; background: #fff; box-shadow: 0 2px 7px rgba(25,47,38,.09); }
.table-footer, .active-product-mode .table-footer { min-height: 40px; border-top-color: #e0e7e3; background: #f8faf9; }

.new-product-workbench { gap: 12px; }
.new-product-navigator { border-color: #d3ddd7; border-radius: 7px; background: #fff; box-shadow: 0 4px 14px rgba(25,47,38,.05); }
.new-product-nav-filter { min-height: 44px; padding: 6px 10px; background: #f7f9f8; }
.new-product-nav-filter select { border-radius: 5px; }
.new-product-list { padding: 0 4px; background: #fff; }
.new-product-list-item { min-width: 196px; margin: 4px 0; border: 1px solid transparent; border-right-color: #e5ebe7; border-radius: 5px; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.new-product-list-item:hover { border-color: #d6e1db; background: #f7faf8; }
.new-product-list-item.active { border-color: #a8cdbd; background: #eaf4ef; box-shadow: inset 0 -3px #1d7656; }
.new-product-list-item strong { font-size: 12px; }
.new-product-list-item b { padding: 3px 5px; border-radius: 4px; background: #edf6f1; }
.new-product-list-item b.risk { background: #fff0ee; }
.new-product-sheet { border-color: #cbd7d1; border-radius: 7px; box-shadow: 0 6px 20px rgba(24,46,37,.06); }
.worksheet-heading { min-height: 72px; padding: 11px 15px; border-bottom-color: #dbe3df; background: #fff; }
.worksheet-heading > div:first-child > span { color: #257657; }
.worksheet-heading h2 { font-size: 17px; }
.worksheet-rate-strip { min-height: 31px; border-bottom: 1px solid #d6dfda; background: #edf2ef; }
.worksheet-rate-strip span { min-height: 31px; padding-inline: 10px; }
.worksheet-single-column { gap: 12px; padding: 11px 10px 14px; background: #fbfcfb; }
.worksheet-block { border: 1px solid #d9e2dd; border-radius: 6px; background: #fff; overflow: hidden; }
.worksheet-block h3 { min-height: 29px; padding: 5px 8px; background: #273d35; }
.worksheet-table th { height: 29px; border-color: #36584e; background: #3b675b; }
.worksheet-table td { height: 27px; border-color: #d3ddd8; background: #f7faf8; }
.worksheet-input-table tbody tr:not(.worksheet-fixed-row) td.worksheet-label,
.worksheet-input-table tbody tr:not(.worksheet-fixed-row) td.worksheet-note { background: #f7f3ec !important; }
.worksheet-input-table td.worksheet-input-cell { background: #fff8dc; }
.worksheet-fixed-row td, .worksheet-fixed-row td.worksheet-input-cell { background: #edf3f5; }
.worksheet-fee-parent td { border-top-color: #78988a; background: #e4efe9 !important; }
.worksheet-input-cell input:focus { background: #fffdf0; box-shadow: inset 0 0 0 2px #23805e; }
.worksheet-results tr.positive td, .worksheet-results tr.cost td { background: #f7faf8; }
.worksheet-results tr.included td { background: #f3f7f5; }
.worksheet-results tr.subtotal td { background: #e5f0ea; }
.worksheet-results tr.total td { border-color: #1d644a; background: #216c50; }

.sales-filter-bar, .sales-chart-panel, .inventory-detail-panel {
  border-color: #d6e0da;
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(27,49,40,.055);
}
.sales-filter-bar { background: #fbfcfb; }
.sales-multi-trigger, .sales-filters select { background: #fff; }
.sales-chart-panel > header, .inventory-detail-panel > header { background: #fbfcfb; }
.sales-metric-switch { border-color: #d6dfda; background: #edf2ef; }
.sales-metric-btn.active { background: #246b50; }
.inventory-detail-table thead th { color: #42544b; background: #f1f5f3; }

dialog { border: 1px solid #d4ddd8; border-radius: 8px; }
dialog::backdrop { background: rgba(18,30,25,.52); backdrop-filter: blur(4px); }
.modal header { padding: 20px 22px 15px; background: #fbfcfb; }
.modal footer { padding: 14px 22px 20px; border-top: 1px solid #edf1ef; background: #fbfcfb; }
.toast { border-radius: 7px; box-shadow: 0 14px 34px rgba(22,46,35,.16); }

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

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .topbar { gap: 12px; }
  .workspace-switch-btn { min-width: 122px; padding-inline: 14px; }
  .sidebar { padding-inline: 10px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span, .nav-item b, .nav-label, .formula-legend { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sales-filters { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
  .sales-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand { min-height: 310px; padding: 36px 28px; }
  .login-brand h1 { font-size: 38px; }
  .login-brand .brand-mark { margin-bottom: 28px; }
  .login-panel { padding: 38px 24px; }
  .app-shell { height: auto; min-height: 100vh; grid-template: 64px 1fr 62px / 1fr; overflow: visible; }
  .topbar { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 0 14px; }
  .brand > div:last-child, .sync-state, .user-badge div { display: none; }
  .workspace-switch { width: min(100%, 200px); height: 48px; justify-self: center; padding: 4px; border-width: 1px; }
  .workspace-switch-btn { min-width: 0; height: 38px; flex: 1; padding-inline: 7px; font-size: 12px; }
  .workspace-switch-btn svg { display: none; }
  .user-badge { padding-left: 0; border-left: 0; }
  .topbar-actions { gap: 3px; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; height: 62px; min-height: 0; display: block; padding: 6px 10px; border-top: 1px solid var(--line); border-right: 0; overflow: hidden; }
  .sidebar nav { display: flex; justify-content: space-around; }
  .nav-view-group { min-width: 0; flex: 1 1 auto; display: flex; justify-content: space-around; }
  .nav-item { width: 58px; height: 50px; flex-direction: column; gap: 2px; font-size: 9px; }
  .nav-item span { display: block; flex: 0; }
  .nav-item b, .nav-label, .formula-legend { display: none; }
  .nav-item svg { width: 17px; }
  .workspace { min-height: 0; padding: 18px 12px 82px; overflow: visible; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; padding: 0 8px; }
  .profit-dataset-tabs { gap: 18px; overflow-x: auto; }
  .profit-dataset-tab { flex: 0 0 auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { min-height: 88px; padding: 12px; }
  .kpi-icon { display: none; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .filters { display: grid; grid-template-columns: 1fr 120px; }
  .search { width: auto; }
  .rate-control { justify-content: flex-end; }
  .table-scroll { max-height: 55vh; }
  .table-footer span:last-child { display: none; }
  .new-product-workbench { grid-template-columns: 1fr; gap: 10px; }
  .new-product-navigator { position: static; min-height: 0; }
  .new-product-list { max-height: none; display: flex; overflow-x: auto; overflow-y: hidden; }
  .new-product-list-item { min-width: 190px; border-right: 1px solid #edf0ee; border-bottom: 0; }
  .new-product-list-item.active { box-shadow: inset 0 -4px #167a55; }
  .new-product-sheet { max-height: none; }
  .worksheet-heading, .worksheet-rate-strip, .worksheet-single-column { min-width: 520px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .row-column-add { grid-template-columns: 1fr 1fr; }
  .row-column-add > div { grid-column: 1 / -1; }
  .new-product-form-layout { grid-template-columns: 1fr; }
  .form-section-grid { grid-template-columns: 1fr 1fr; }
  .new-product-preview { position: static; min-height: 0; border-top: 1px solid #dbe4df; border-left: 0; }
  .new-product-summary { grid-template-columns: 1fr 1fr; }
  .new-product-detail-grid { grid-template-columns: 1fr; }
  .audit-toolbar { align-items: stretch; flex-direction: column; }
  .audit-filters { align-items: flex-end; }
  .audit-filters label { flex: 1; }
  .audit-filters input { width: 100%; }
  .audit-toolbar-actions { justify-content: space-between; }
  .create-account-grid, .account-profile-grid { grid-template-columns: 1fr 1fr; }
  .create-account-grid .btn { width: 100%; }
  .password-reset-code-row { grid-template-columns: 1fr; }
  .password-reset-code-row .btn { width: 100%; }
  .sales-filter-bar { align-items: stretch; }
  .sales-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-clear-filter { align-self: flex-end; margin-bottom: 2px; }
  .sales-chart-panel > header { min-height: 62px; padding: 12px 14px; }
  .sales-chart-panel > header { align-items: flex-start; }
  .sales-chart-controls { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .sales-chart-controls > strong { min-width: 54px; font-size: 15px; }
  .sales-metric-btn { min-width: 58px; padding-inline: 8px; }
  .line-chart { min-height: 300px; padding-inline: 4px; overflow-x: auto; }
  .inventory-detail-panel > header { padding-inline: 14px; }
  .inventory-detail-columns { grid-template-columns: 1fr; }
  .inventory-detail-column + .inventory-detail-column { border-top: 1px solid #dfe7e2; border-left: 0; }
  .inventory-detail-table th, .inventory-detail-table td { padding-inline: 14px; }
  .chart-canvas { min-width: 620px; }
  .composition-week-range { min-width: 620px; padding-inline: 24px; }
}

@media (max-width: 460px) {
  .user-badge { display: none; }
  .workspace-switch { width: 190px; }
  .heading-actions .btn span { display: none; }
  .heading-actions .btn { flex: 0 0 42px; padding: 0; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 78px; }
  .sales-filter-bar { gap: 8px; padding: 12px; }
  .sales-filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sales-multi-menu { width: 100%; }
  .sales-chart-panel > header { align-items: stretch; flex-direction: column; gap: 10px; }
  .sales-chart-controls { justify-content: space-between; }
  .sales-view-select { width: 100%; grid-template-columns: auto 1fr; }
  .sales-view-select select { width: 100%; }
  .sales-metric-switch { flex: 1; }
  .sales-metric-btn { min-width: 0; flex: 1; }
  .donut-layout { grid-template-columns: 1fr; gap: 8px; padding: 18px 20px 28px; }
  .donut-visual svg { width: 220px; }
  .composition-week-range { grid-template-columns: 1fr; gap: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .row-column-add { grid-template-columns: 1fr; }
  .row-column-add > div { grid-column: auto; }
  .account-dialog-body { padding: 0 16px; }
  .column-settings-list { grid-template-columns: 1fr; }
  .column-add-row { grid-template-columns: 1fr; }
  .formula-setting-row { grid-template-columns: 1fr; gap: 5px; }
  .create-account-grid, .account-profile-grid, .password-account-grid, .role-create-form { grid-template-columns: 1fr; }
  .role-permission-grid { grid-template-columns: 1fr 1fr; }
  .account-form-grid .btn { width: 100%; }
}
