/* V92: approved light design, applied to the live business components. */
:root {
  color-scheme: light;
  --canvas:#f3efe8; --paper:#fffdf9; --ink:#1b1814; --ink-2:#5a534a; --ink-3:#80786d;
  --rule:#e5dfd6; --rule-2:#eee9e1; --red:#c44536; --red-soft:#f8e6e2;
  --hover:#f6f0e6; --green:#2c7a4e; --green-soft:#e3f2e9; --amber:#a36b18;
  --bg:var(--canvas); --panel:var(--paper); --panel-soft:var(--hover); --text:var(--ink);
  --muted:var(--ink-3); --line:var(--rule); --line-strong:#c7beb2;
  --brand:var(--ink); --brand-dark:#38332c; --primary:var(--ink);
  --danger:var(--red); --ok:var(--green); --success:var(--green);
  --cn:"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",system-ui,sans-serif;
  --fig:"DIN Alternate","Bahnschrift","Arial Narrow",var(--cn);
}
body { background:var(--canvas); color:var(--ink); font:14px/1.55 var(--cn); }
button,input,select,textarea { font-family:inherit; }
*,*::before,*::after { letter-spacing:0 !important; }
::selection { background:#f7d4d1; }
:focus-visible { outline:2px solid #a52b25; outline-offset:2px; }
.layout { grid-template-columns:228px minmax(0,1fr); }
.sidebar { background:var(--paper); padding:16px 12px 14px; border-right:1px solid var(--rule); }
.brand { min-height:82px; padding:0 0 16px; margin-bottom:8px; border-bottom:1px solid var(--rule); }
.brand-logo { width:116px; height:64px; padding:0; object-fit:contain; mix-blend-mode:normal; }
.nav { gap:4px; }
.nav-group-label { font-size:12px; color:var(--ink-3); padding:10px 10px 4px; }
.nav .nav-item { position:relative; padding:8px 10px; color:var(--ink-2); font-size:13px; min-height:36px; border-radius:8px; }
.nav .nav-item svg { color:inherit; width:17px; height:17px; }
.nav .nav-item:hover { background:var(--hover); color:var(--ink); }
.nav .nav-item.active { background:var(--red-soft); color:var(--ink); box-shadow:none; font-weight:600; }
.nav .nav-item.active svg { color:var(--red); }
.nav .nav-item.active::before { content:none; }
.sidebar-bottom { border:0; color:var(--ink-3); padding-top:14px; }
.environment-dot { width:5px; height:5px; background:var(--ink-3); }
.topbar { background:var(--paper); height:58px; min-height:58px; border-bottom:1px solid var(--rule); padding:0 26px; }
.topbar h2 { font-size:13px; color:var(--ink); }
.breadcrumb-root,.breadcrumb-divider { color:var(--ink-3); }
.userbox { color:var(--ink-2); }
.user-avatar { background:var(--ink); color:white; border-radius:50%; }
.main { background:var(--canvas); min-width:0; }
.content { width:100%; max-width:1320px; margin:0 auto; padding:22px 26px 48px; }
.workspace-page-heading,.dashboard-titlebar { margin-bottom:18px; min-height:34px; gap:12px; }
.workspace-page-heading h1,.dashboard-titlebar h1 { color:var(--ink); font-size:22px; font-weight:700; display:flex; align-items:center; gap:10px; }
.workspace-page-heading h1::before,.dashboard-titlebar h1::before { content:none; }
.dashboard-titlebar > div > span { color:var(--ink-3); font-size:11px; }
.btn { background:var(--paper); color:var(--ink); border:1px solid var(--rule); border-radius:8px; min-height:36px; font-size:13px; padding:7px 13px; box-shadow:0 1px 2px #281e1008; }
.btn:hover { border-color:#aeb3b9; background:var(--hover); color:var(--ink); }
.btn.primary,.dashboard-toolbar .btn.primary,.volume .btn.primary { background:var(--ink); border-color:var(--ink); color:white; box-shadow:none; }
.btn.primary:hover { background:#383838; border-color:#383838; color:white; }
.btn.ghost { background:transparent; color:var(--ink-2); }
.btn.danger { color:var(--red); }
.btn:disabled { opacity:.5; cursor:wait; }
.btn.icon-only { flex:none; width:34px; height:34px; }
.btn svg { width:16px; height:16px; }
.input,select,textarea,.field input:not([type=checkbox]):not([type=radio]),.ts-wrapper.single .ts-control,.ts-control { color:var(--ink-2); border-color:var(--rule); background:var(--paper); border-radius:6px; min-height:36px; box-shadow:none; }
.input:focus,select:focus,textarea:focus,.field input:focus,.ts-wrapper.focus .ts-control { border-color:#969ba1; box-shadow:0 0 0 2px #eeeeee; }
.field > label,.filter-field > span { color:var(--ink-2); font-size:12px; font-weight:400; }
.field small,input::placeholder,textarea::placeholder { color:var(--ink-3); }
.ts-dropdown { color:var(--ink-2); border-color:var(--rule); background:var(--paper); box-shadow:0 6px 20px #00000014; }
.ts-dropdown .active { background:var(--rule-2); color:var(--ink); }
input[type=checkbox],input[type=radio] { accent-color:var(--ink); }
.panel,.visual-panel,.quote-surface { background:var(--paper); border:1px solid var(--rule); border-radius:8px; box-shadow:none; }
.panel h3,.visual-head h3,.section-titlebar h3,.table-titlebar h3 { color:var(--ink); font-size:14px; font-weight:600; }
.panel .panel { border:0; border-radius:0; padding-left:0; padding-right:0; }
.notice { color:#8b5b12; background:#fdf6e7; border:0; border-radius:6px; }
.notice.warn,.error { color:#b5271e; background:var(--red-soft); border-color:#f4dbd8; border-radius:6px; }
.muted { color:var(--ink-3); }
.good-text,.cell-positive,.cell-positive strong { color:var(--green) !important; }
.cell-negative,.cell-negative strong { color:var(--red) !important; }
.badge.ok { color:var(--green); background:var(--green-soft); }
.badge.danger { color:var(--red); background:var(--red-soft); }
.content > .toolbar,.filter-workspace { border:1px solid var(--rule); border-radius:8px; padding:14px 16px !important; background:var(--paper); }
.period-choice,.period-choice:hover { background:transparent; color:var(--ink-2); }
.period-choice.active,.period-segments button.active { background:var(--ink); color:white; border-color:var(--ink); box-shadow:none; }
.period-segments { background:var(--paper); border:1px solid var(--rule); border-radius:24px; padding:3px; }
.period-segments button { color:var(--ink-2); border-radius:20px; }
.filter-workspace .filter-actions,.pagination,.secondary-summary { border-color:var(--rule); }
.filter-chip { color:var(--ink-2); background:var(--hover); border-color:var(--rule); }
.filter-chip:hover { border-color:#999; color:var(--ink); }
.filter-result-bar > strong,.filter-result-bar > strong b { color:var(--ink-2); }
th { background:var(--paper); color:var(--ink-3); font-size:12px; font-weight:400; border-color:var(--rule-2); }
td { color:var(--ink); border-color:var(--rule-2); }
tbody tr:nth-child(even) td { background:var(--paper); }
tbody tr:hover td { background:var(--hover); }
.table-wrap { border-color:var(--rule); border-radius:6px; }
.orders-data-grid .tabulator-header,.orders-data-grid .tabulator-header .tabulator-col { background:var(--paper); color:var(--ink-3); }
.orders-data-grid .tabulator-header .tabulator-col:hover { background:var(--hover); }
.orders-data-grid .tabulator-row,.orders-data-grid .tabulator-row.tabulator-row-even { background:var(--paper); color:var(--ink); border-color:var(--rule-2); }
.orders-data-grid .tabulator-row:hover { background:var(--hover); }
.orders-data-grid .tabulator-cell { font-size:12px; }
.order-number-link { color:var(--ink); font-family:var(--fig); font-size:12px; }
.order-number-cell { display:inline-flex; align-items:center; gap:6px; min-width:0; max-width:100%; vertical-align:middle; }
.order-number-cell .order-number-link,.order-number-cell .order-number-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body .order-number-cell .order-number-copy { width:26px; height:28px; min-height:28px; flex:0 0 26px; padding:4px; border:0; background:none; color:var(--ink-3); cursor:copy; }
body .order-number-cell .order-number-copy:hover { background:#edf0f3; color:var(--ink); }
.order-number-copy svg { width:15px; height:15px; }
.order-inline-remark { display:flex; gap:10px; padding:0 10px 9px; white-space:normal; color:var(--ink-2); font-size:12px; line-height:18px; text-align:left; }
.order-remark-label { flex:0 0 auto; color:var(--ink-3); }
.order-remark-text { min-width:0; flex:1; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; white-space:pre-wrap; max-height:36px; line-height:18px; }
.online-orders-grid .order-inline-remark { position:sticky; left:0; width:var(--order-remark-width,100%); max-width:100%; box-sizing:border-box; }
.order-remark-row > td { padding:0; }
.order-copy-notice { position:fixed; bottom:24px; right:24px; z-index:1000; max-width:calc(100vw - 48px); padding:12px 18px; border:1px solid var(--rule); border-radius:6px; background:var(--ink); color:white; box-shadow:0 4px 18px #00000018; overflow-wrap:anywhere; }
.order-copy-notice.copy-failed { background:var(--red-soft); color:var(--red); }
.reconcile-batch-actions { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.inline-order-actions .aftersale-order,.inline-order-actions .compensation-order { color:var(--ink-2); background:none; }
.inline-order-actions .btn:hover { background:var(--rule-2); }
.status-pill { color:var(--ink-2); background:var(--rule-2); }
.bulk-actions { background:var(--rule-2); border-color:var(--rule); }
.bulk-count { color:var(--ink); }
.column-choices,.order-action-menu { border-color:var(--rule); box-shadow:0 6px 24px #00000015; }
.order-preview-drawer,.drawer-head { background:var(--paper); color:var(--ink); border-color:var(--rule); }
.cards { border:0; border-radius:0; background:transparent; gap:12px; overflow:visible; }
.cards .metric,.dashboard-cards .metric { background:var(--paper); border-color:var(--rule-2); min-height:76px; }
.cards .metric strong { color:var(--ink); font:600 24px/1.3 var(--fig); }
.cards .metric.good strong { color:var(--green); }
.cards .metric.warn strong { color:var(--red); }
.dashboard-hero { display:grid; grid-template-columns:minmax(0,1fr) 280px; grid-template-rows:auto auto; gap:0; padding:0; border:1px solid var(--rule); border-radius:8px; overflow:hidden; background:var(--paper); }
.dashboard-hero > div { min-height:0; padding:18px 22px; border:0; border-radius:0; box-shadow:none; background:var(--paper); }
.dashboard-hero .hero-profit { grid-row:1 / 3; border-right:1px solid var(--rule-2); }
.dashboard-hero .hero-revenue { border-bottom:1px solid var(--rule-2); }
.hero-profit > strong { font:700 46px/1.2 var(--fig); color:var(--ink); margin:8px 0 14px; overflow-wrap:anywhere; }
.hero-profit.warn > strong { color:var(--red); }
.hero-revenue > strong,.hero-volume > strong { font:600 29px/1.25 var(--fig); color:var(--ink); margin:5px 0; }
.hero-label,.hero-label svg,.hero-foot,.hero-foot span,.profit-rate { color:var(--ink-2); }
.hero-label svg,.hero-period { display:none; }
.hero-foot b { color:var(--ink); }
.hero-label { font-size:12px; }
.hero-volume small { font-family:var(--cn); font-size:13px; margin-left:6px; }
.aftersale-counter b { color:var(--red); }
.v91-profit-flow { display:flex; gap:5px 7px; flex-wrap:wrap; font-size:12px; color:var(--ink-2); }
.flow-item { display:inline-flex; align-items:baseline; gap:5px; }
.flow-sign { color:var(--ink-3); }
.flow-item button { border:0; background:none; color:inherit; padding:2px 0; font-size:12px; cursor:pointer; }
.flow-item button:hover { text-decoration:underline; }
.flow-item b { color:var(--ink); font-family:var(--fig); font-size:14px; }
.flow-total { color:var(--red); padding:2px 0; }
.v91-cost-bar { display:flex; height:20px; gap:2px; border-radius:2px; overflow:hidden; margin-top:14px; }
.v91-cost-bar span { flex-basis:0; min-width:1px; }
.v91-cost-legend { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:11px; color:var(--ink-2); margin-top:8px; }
.v91-cost-legend i { display:inline-block; width:8px; height:8px; border-radius:1px; margin-right:4px; }
.workspace-tabs { border-color:var(--rule); margin-top:16px; gap:26px; }
.workspace-tab { color:var(--ink-2); font-size:13px; }
.workspace-tab.active { color:var(--ink); border-color:var(--ink); }
.dashboard-grid { grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:16px; margin-top:16px; }
.dashboard-grid .visual-panel { padding:18px; }
.visual-head { border-bottom:1px solid var(--rule-2); padding-bottom:13px; margin-bottom:14px; }
.visual-head span,.visual-head em { color:var(--ink-3); font-size:12px; }
.dashboard-utilities > details[open] { background:var(--paper); border-color:var(--rule); }
.dashboard-utilities .panel { border:0; }
.v91-trend { display:flex; align-items:flex-end; gap:4px; height:220px; padding:15px 0 22px; }
.v91-day { flex:1 1 0; min-width:0; height:100%; position:relative; display:flex; align-items:flex-end; }
.v91-bar { background:#393b3d; width:100%; border-radius:1px 1px 0 0; min-height:1px; }
.v91-bar.today { background:var(--red); }
.v91-day small { position:absolute; top:calc(100% + 4px); left:0; font-size:10px; color:var(--ink-3); }
.v91-day:not(:nth-child(7n+1)):not(:last-child) small { visibility:hidden; }
.detail-metrics,.staff-card,.quality-card { background:var(--paper); border-color:var(--rule-2); box-shadow:none; border-radius:4px; }
.staff-card b { color:var(--ink); }
.entry-layout { grid-template-columns:minmax(0,1fr) 310px; gap:16px; }
.entry-main,.entry-aside { padding:0 18px; border:1px solid var(--rule); border-radius:8px; background:var(--paper); }
.entry-section { border-color:var(--rule-2); padding:17px 0; }
.entry-section:last-child { border-bottom:0; }
.entry-section > h3 { border:0; padding:0; margin-bottom:14px; color:var(--ink); font-size:14px; }
.entry-main .v91-shop-group { display:block; margin-top:16px; }
.v91-shop-group .shop-options { display:flex; flex-wrap:wrap; gap:7px; }
.shop-option { min-width:72px; background:var(--paper); border-radius:5px; box-shadow:none; }
.shop-option.active { box-shadow:0 0 0 1px currentColor; }
.entry-section #addItem { width:100%; border-style:dashed; background:none; margin-top:10px; }
.entry-section #estimate { display:flex; flex-direction:column; gap:10px; color:var(--ink-2); font-size:12px; }
#estimate strong { color:var(--ink); }
.entry-savebar { background:var(--paper); border-color:var(--rule-2); box-shadow:none; position:static; flex-wrap:wrap; padding:14px 0; }
.entry-savebar .toolbar-right { width:100%; justify-content:flex-end; flex-wrap:wrap; }
.entry-aside { top:72px; }
.entry-aftersale-details { border:0; background:var(--paper); }
.entry-aftersale-details summary { color:var(--ink-2); }
#entry-notes > .field { margin-bottom:12px; }
.quote-workspace { grid-template-columns:360px minmax(0,1fr) !important; gap:16px; align-items:start; }
.quote-form { position:sticky; top:72px; }
.quote-form,.quote-result-area { min-width:0; }
.quote-history-surface,.quote-history-panel { background:var(--paper) !important; border-color:var(--rule) !important; }
.quote-history { background:var(--paper) !important; color:var(--ink); border-color:var(--rule) !important; }
.quote-history-coverage { color:var(--ink-3); }
.quote-history-coverage strong { color:var(--ink); }
.quote-history-stats { border-color:var(--rule-2); }
.quote-history-stats > div,.quote-deal-price { border-color:var(--rule-2); background:var(--paper); }
.quote-history-stats strong { color:var(--ink); font:600 23px/1.3 var(--fig); }
.quote-history-stats span,.quote-history-stats small,.quote-deal-price em { color:var(--ink-3); }
.quote-deal-price strong { color:var(--ink); font:600 26px/1.3 var(--fig); }
.quote-mode { background:var(--paper); border:1px solid var(--rule); border-top:3px solid var(--ink); border-radius:8px; box-shadow:none; }
.quote-mode.volume { border-top-color:var(--red); }
.quote-mode-head strong { color:var(--ink); font:600 40px/1.2 var(--fig); }
.quote-mode-head,.quote-mode-head span,.quote-mode-head h3,.quote-mode-title { color:var(--ink-2); }
.quote-mode .quote-unit { color:var(--ink-3); }
.quote-mode .btn.primary { width:100%; }
.quote-mode.normal .btn.primary { background:var(--paper); color:var(--ink); border-color:var(--rule); }
.quote-freight-strip,.quote-shipping,.quote-logistics { background:var(--paper); color:var(--ink); border-color:var(--rule); }
.quote-extra,.quote-words-details { color:var(--ink-2); }
.quote-admin-panel { color:var(--ink-2); }
.quote-settings-panel,.expense-panel { border-color:var(--rule); }
.permission-editor,.permission-group { border-color:var(--rule); background:var(--paper); }
.permission-group h4 { color:var(--ink); }
.modal,.v85-detail-dialog { border-radius:8px; background:var(--paper); color:var(--ink); }
.modal-head,.v85-detail-head { background:var(--paper); border-color:var(--rule); }
.record-footer,.record-footer a { color:var(--ink-3); font-size:11px; }
.login-shell { background:var(--canvas); }
.login-card { background:var(--paper); border:1px solid var(--rule); border-radius:8px; box-shadow:0 6px 28px #00000008; }
.login-card h1 { color:var(--ink); font-size:23px; }
.password-required { padding:42px 0; max-width:560px; margin:0 auto; }
.password-required > svg { width:40px; height:40px; color:var(--red); }
.password-required h1 { font-size:22px; }
.backup-overview { border-bottom:1px solid var(--rule); padding:12px 0 24px; margin-bottom:24px; }
.backup-overview > div:first-child > svg { width:28px; height:28px; color:var(--ink); }
.backup-overview h2 { font-size:18px; margin:8px 0; }
.backup-overview dl { display:flex; gap:40px; flex-wrap:wrap; margin:20px 0; }
.backup-overview dt { color:var(--ink-3); font-size:12px; }
.backup-overview dd { margin:4px 0 0; font-size:15px; }
.backup-overview .page-actions { margin:0; }
.backup-filename { overflow-wrap:anywhere; min-width:190px; }
.backup-error { color:var(--red); padding-top:12px; }
/* Explicit component spacing prevents legacy nested selectors from flattening padding. */
body .dashboard-hero > .hero-profit { padding:22px 24px; margin:0; grid-column:1; grid-row:1 / 3; border:0; border-right:1px solid var(--rule-2); }
body .dashboard-hero > .hero-revenue,body .dashboard-hero > .hero-volume { padding:20px 22px; margin:0; grid-column:2; border:0; }
body .dashboard-hero > .hero-revenue { border-bottom:1px solid var(--rule-2); }
body .hero-profit .hero-label .profit-rate { color:var(--ink-2); background:var(--hover); }
body .hero-profit .v91-profit-flow { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; width:100%; margin:4px 0 0; padding:0; }
body .hero-profit .v91-profit-flow span { margin:0; padding:0; color:var(--ink-2); font-size:12px; line-height:1.65; }
body .hero-profit .v91-profit-flow .flow-item { display:inline-flex; flex:none; align-items:baseline; gap:6px; white-space:nowrap; }
body .hero-profit .v91-profit-flow .flow-sign { display:inline; color:var(--ink-3); }
body .hero-profit .v91-profit-flow button { display:inline; width:auto; text-align:left; line-height:1.65; }
body .hero-profit .v91-profit-flow .flow-total { display:inline; color:var(--red); }
body .hero-profit .v91-expense-flow { width:100%; margin:0; }
body .hero-profit .v91-cost-legend span { display:inline-flex; align-items:center; margin:0; font-size:11px; }
body .quote-workspace > .quote-editor { padding:20px; }
body .quote-result-wrap .quote-reference { padding:0; border:1px solid var(--rule); border-radius:8px; background:var(--paper); }
body .quote-reference-head { padding:16px 18px; border-bottom:1px solid var(--rule-2); }
body .quote-reference-head h3,body .quote-reference-head h3 svg { color:var(--ink); font-size:15px; }
body .quote-reference-head > span { color:var(--ink-3); }
body .quote-reference .quote-history { padding:0 18px 14px; }
body .quote-reference .quote-history-coverage { padding:10px 0; }
body .quote-reference .quote-deal-price span,body .quote-reference .quote-deal-price strong { color:var(--ink); }
body .quote-reference .quote-deal-price strong { font:600 26px/1.3 var(--fig); }
body .quote-reference .quote-deal-price em,body .quote-reference .quote-history-basis { color:var(--ink-3); }
body .quote-reference .quote-deal-price:first-child { border-color:var(--rule-2); }
body .quote-result-wrap > .quote-result { padding:0; border:0; background:transparent; }
body .quote-result > .quote-surface-head { padding:14px 2px 10px; border:0; }
body .quote-mode-card,body .quote-mode-card.normal,body .quote-mode-card.volume { padding:18px 20px; border:1px solid var(--rule); border-top:3px solid var(--ink); border-radius:8px; background:var(--paper); }
body .quote-mode-card.volume { border-top-color:var(--red); }
body .quote-mode-card.normal .quote-mode-head strong,body .quote-mode-card.volume .quote-mode-head strong { color:var(--ink); font:600 40px/1.2 var(--fig); margin-top:12px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
body .quote-mode-card .quote-mode-head { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
body .quote-mode-detail,body .quote-script { border-color:var(--rule-2); }
body .quote-mode-card .btn.primary { border-color:var(--rule); color:var(--ink); background:var(--paper); }
body .quote-mode-card.volume .btn.primary { color:white; background:var(--ink); border-color:var(--ink); }
body .quote-result .quote-logistics { margin-top:16px; padding:0; border:1px solid var(--rule); border-radius:8px; background:var(--paper); }
body .quote-logistics-head { padding:16px 18px; border-bottom:1px solid var(--rule-2); }
body .quote-logistics-head h3,body .quote-logistics-head h3 svg { color:var(--ink); }
body .quote-logistics-grid { padding:16px 18px; }
body .quote-result-wrap > .quote-admin-panel { padding:18px 20px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; }
body .quote-item-row { background:var(--hover) !important; border-color:var(--rule); }
body .quote-extra,body .quote-script { border-color:var(--rule); }
body .quote-extra > summary,body .quote-words-details > summary { color:var(--ink-2); }
body .expense-hero { padding:20px 24px; background:var(--paper); color:var(--ink); border:1px solid var(--rule); border-radius:8px; }
body .expense-hero strong { color:var(--ink); font-size:24px; }
body .expense-hero span,body .expense-hero em { color:var(--ink-2); }
body .quote-state { color:var(--ink-2); background:var(--hover); border-color:var(--rule); }
body .quote-surface-head,body .quote-size-head { border-color:var(--rule-2); }
body .entry-savebar { padding:14px 0; border:0; border-top:1px solid var(--rule-2); }
body .entry-savebar .toolbar-right { padding:0; border:0; }
body .finance-breakdown,body .workspace-details { padding:16px 20px; border-color:var(--rule); }
body .workspace-details .analysis-panel { padding:16px 0 0; border:0; }
body .modal,body .v85-detail-body { padding:20px 24px; }
body .modal .modal-head { padding:0 0 16px; }
body .v85-detail-head { padding:16px 24px; }
body .entry-main #entry-notes { display:grid; grid-template-columns:minmax(140px,.7fr) minmax(0,1.3fr); gap:12px; align-items:start; }
body #entry-notes > h3 { display:none; }
body #entry-notes > .field { margin:0 !important; }
body #entry-notes textarea { height:62px; min-height:62px; }
body .dashboard-toolbar .dashboard-titlebar { margin:0 14px 0 0; min-height:0; flex:none; }
body .dashboard-toolbar { align-items:center; }
body .v91-shop-table-wrap { overflow-x:auto; }
body .v91-shop-table { width:100%; min-width:450px; font-size:12px; }
body .v91-shop-table th,body .v91-shop-table td { padding:10px 8px; white-space:nowrap; }
.v91-shop-table td:not(:first-child) { font-family:var(--fig); font-size:14px; }
.v91-shop-dot { display:inline-block; width:8px; height:8px; margin-right:6px; border-radius:1px; transform:skewX(-12deg); }
.v91-shop-bars { width:100px; display:flex; flex-direction:column; gap:3px; }
.v91-shop-bars i { display:block; height:5px; background:var(--ink); }
.v91-shop-bars i:nth-child(2) { background:var(--ink-3); }
.v91-shop-bars i.negative { background:var(--red); }
/* Keep data surfaces dense, with consistent gutters across entry and review. */
.dashboard-hero { gap:14px; background:transparent; border:0; overflow:visible; grid-template-columns:minmax(0,1.55fr) minmax(230px,.9fr); }
body .dashboard-hero > .hero-profit,body .dashboard-hero > .hero-revenue,body .dashboard-hero > .hero-volume { border:1px solid var(--rule); border-radius:8px; background:var(--paper); box-shadow:0 2px 6px #281e1005; }
body .hero-profit .hero-label .profit-rate { background:var(--green-soft); color:var(--green); }
.v91-cost-bar { height:9px; gap:0; border-radius:8px; margin-top:18px; }
.v91-cost-legend i,.v91-shop-dot { border-radius:3px; transform:none; }
.cards .metric { padding:16px 18px; background:var(--paper); border:1px solid var(--rule); border-radius:8px; box-shadow:none; }
.cards .metric strong { font-family:var(--fig); font-size:25px; }
.cards .metric > span,.cards .metric small { color:var(--ink-2); }
.dashboard-toolbar { gap:10px; }
.workspace-tabs { gap:24px; margin-top:20px; }
.workspace-tab.active { border-color:var(--red); color:var(--red); }
.visual-head { align-items:center; gap:8px; flex-wrap:wrap; }
.v91-shop-table th,.v91-shop-table td { padding:11px 10px !important; }
body .dashboard-grid > .visual-panel { padding:18px; }
body td.empty-chart { display:table-cell; text-align:center; vertical-align:middle; height:170px; }
.dashboard-grid:has(.daily-trend-panel) { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); }
.revenue-chart { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; height:245px; margin-top:28px; padding-bottom:34px; min-width:0; }
.revenue-y-axis { position:relative; min-width:0; font:12px var(--fig); color:var(--ink-2); }
.revenue-y-axis > span { position:absolute; right:0; transform:translateY(50%); white-space:nowrap; }
.revenue-scroll { overflow-x:auto; overflow-y:hidden; padding-top:8px; padding-bottom:34px; margin-top:-8px; margin-bottom:-34px; scrollbar-width:thin; }
.revenue-plot { position:relative; height:100%; min-width:calc(var(--days) * 13px); border-left:1px solid var(--rule); }
.revenue-gridline { position:absolute; left:0; right:0; border-top:1px dashed var(--rule); pointer-events:none; }
.revenue-gridline.zero { border-top:1px solid var(--ink-3); }
.revenue-bars { position:absolute; inset:0; display:grid; grid-template-columns:repeat(var(--days),minmax(0,1fr)); gap:3px; padding:0 5px; }
.revenue-day { position:relative; min-width:0; outline-offset:-1px; }
.revenue-bar { position:absolute; left:0; right:0; background:#8d9f96; border-radius:3px 3px 0 0; }
.revenue-bar.today { background:var(--green); }
.revenue-bar.negative { background:var(--red); border-radius:0 0 3px 3px; }
.revenue-day:hover .revenue-bar,.revenue-day:focus .revenue-bar { background:var(--ink); }
.revenue-day > small { position:absolute; top:calc(100% + 9px); left:50%; transform:translateX(-50%); font:11px var(--fig); color:var(--ink-2); white-space:nowrap; }
.revenue-day:first-child > small { left:0; transform:none; }
.revenue-day:last-child > small { left:auto; right:0; transform:none; }
.revenue-tip { display:none; position:absolute; z-index:3; top:8px; left:50%; transform:translateX(-50%); background:var(--ink); color:var(--paper); padding:8px 10px; border-radius:6px; white-space:nowrap; font-size:11px; pointer-events:none; }
.revenue-tip b { display:block; font:600 15px var(--fig); margin-top:3px; }
.revenue-day:nth-child(-n+5) .revenue-tip { left:0; transform:none; }
.revenue-day:nth-last-child(-n+5) .revenue-tip { left:auto; right:0; transform:none; }
.revenue-day:hover .revenue-tip,.revenue-day:focus .revenue-tip { display:block; }
.revenue-axis-caption { text-align:center; font-size:11px; color:var(--ink-2); }
body #entry-basic .shop-chip { background:var(--paper); border:1.5px solid var(--rule); color:var(--ink-2); padding:8px 13px; border-radius:8px; min-height:39px; min-width:82px; box-shadow:none; }
body #entry-basic .shop-chip::before { content:""; display:inline-block; width:8px; height:8px; margin-right:8px; border-radius:3px; background:var(--shop-accent); }
body #entry-basic .shop-chip.active { color:#fff; background:var(--shop-accent); border-color:var(--shop-accent); box-shadow:none; }
body #entry-basic .shop-chip.active::before { background:#fff; }
body #entry-basic .shop-chip:hover { border-color:var(--shop-accent); }
body #entry-basic .shop-chip:focus-visible { outline-color:var(--shop-accent); }
.shop-selected { padding:0 0 10px; background:none; color:var(--ink-2); }
.shop-selected strong { color:var(--ink); }
.entry-layout { grid-template-columns:minmax(0,1fr) 300px; }
.entry-main,.entry-aside { padding:0 20px; }
.entry-section { padding:18px 0; }
.content > .panel:has(> #offlineOrderForm) { padding:0; background:transparent; border:0; box-shadow:none; }
.content > .panel:has(> #offlineOrderForm) > .section-titlebar { margin-bottom:16px; }
.offline-mode-bar .segmented-control { background:var(--paper); border-color:var(--rule); }
.offline-mode-bar [data-offline-mode] { color:var(--ink-2); border-radius:6px; }
.offline-mode-bar [data-offline-mode].active { background:var(--ink); color:var(--paper); box-shadow:none; }
.expense-shop-row { background:transparent; }
.input,select,textarea,.field input:not([type=checkbox]):not([type=radio]),.ts-control { border-radius:8px; }
.input:focus,select:focus,textarea:focus,.field input:focus,.ts-wrapper.focus .ts-control { border-color:var(--ink-2); box-shadow:0 0 0 3px var(--hover); }
.order-inline-remark { background:var(--hover) !important; color:var(--ink-2); }
.order-remark-text { color:var(--ink-2); }
.orders-data-grid .tabulator-cell.cell-actions .btn { background:var(--paper); }
.orders-data-grid .tabulator-footer,.orders-data-grid .tabulator-header-filter input { background:var(--paper); }
body .quote-workspace > .quote-editor { background:var(--paper); }
body .quote-result-wrap .quote-reference { border-top:3px solid var(--green); }
body .quote-reference-head h3 svg { color:var(--green); }
body .quote-history-coverage strong { color:var(--green); }
body .quote-state { background:var(--green-soft); color:var(--green); }
.expense-footer { background:var(--ink); color:var(--paper); border-radius:8px; padding:14px 18px; gap:12px; }
.expense-footer .summary-line,.expense-footer .summary-line span { color:var(--paper); }
.expense-footer .btn.primary { background:var(--paper); color:var(--ink); }
.expense-shop-title strong { font-size:14px; }
.backup-page .table-wrap { background:var(--paper); }
.backup-overview { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:14px 24px; }
.backup-overview dl { gap:28px; margin:12px 0; }
.backup-overview .page-actions { grid-column:1 / -1; }
.backup-overview dd { font-family:var(--fig); font-size:18px; }
.backup-result,.backup-error { overflow-wrap:anywhere; }
.modal-head,.v85-detail-head { gap:12px; }
.modal-backdrop,.v85-detail-backdrop { backdrop-filter:blur(3px); }
[hidden],.hidden { display:none !important; }
@media(min-width:1250px) {
  .dashboard-page { position:relative; }
  .dashboard-titlebar { padding-right:0; margin-bottom:12px; }
  .dashboard-toolbar { margin-bottom:16px; }
}
@media(max-width:1190px) {
  .layout { grid-template-columns:180px minmax(0,1fr); }
  .content { padding:18px; }
  .dashboard-hero { grid-template-columns:minmax(0,1fr) 230px; }
  .entry-layout { grid-template-columns:minmax(0,1fr) 260px; }
  .quote-workspace { grid-template-columns:320px minmax(0,1fr) !important; }
  .filter-workspace .filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:950px) {
  .layout { grid-template-columns:minmax(0,1fr); }
  .sidebar { width:212px; }
  .entry-layout { grid-template-columns:minmax(0,1fr) 270px; }
  .quote-workspace { grid-template-columns:300px minmax(0,1fr) !important; }
  .quote-modes { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .dashboard-grid:has(.daily-trend-panel) { grid-template-columns:minmax(0,1fr); }
  .backup-overview { grid-template-columns:minmax(0,1fr); }
  .revenue-chart { grid-template-columns:54px minmax(0,1fr); }
  .content { padding:16px 12px 28px; }
  .topbar { padding:0 12px; }
  .userbox > span:not(.user-avatar) { display:none; }
  .dashboard-hero { grid-template-columns:1fr 1fr; }
  .dashboard-hero .hero-profit { grid-column:1 / -1; grid-row:auto; border-right:0; border-bottom:1px solid var(--rule-2); }
  .dashboard-hero .hero-revenue { border-right:1px solid var(--rule-2); border-bottom:0; }
  .dashboard-hero > div { padding:16px; }
  .hero-profit > strong { font-size:36px; }
  .hero-revenue > strong,.hero-volume > strong { font-size:24px; }
  .hero-foot { flex-wrap:wrap; }
  .dashboard-grid,.entry-layout { grid-template-columns:minmax(0,1fr); }
  .entry-aside { position:static; }
  .quote-workspace { grid-template-columns:minmax(0,1fr) !important; }
  .quote-form { position:static; }
  .quote-modes { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .quote-mode-head strong { font-size:30px; }
  .filter-workspace .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-tabs { gap:18px; overflow-x:auto; white-space:nowrap; }
  .workspace-tab { font-size:12px; flex:none; }
  .entry-main .grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .backup-overview dl { gap:16px; }
  body .dashboard-hero > .hero-profit { grid-column:1 / -1; grid-row:auto; padding:18px; border-right:0; border-bottom:1px solid var(--rule-2); }
  body .dashboard-hero > .hero-revenue { grid-column:1; padding:18px; }
  body .dashboard-hero > .hero-volume { grid-column:2; padding:18px; }
  body .quote-workspace > .quote-editor,body .quote-mode-card,body .quote-mode-card.normal,body .quote-mode-card.volume { padding:16px; }
  body .modal,body .v85-detail-body { padding:18px; }
  body .v85-detail-head { padding:14px 18px; }
  body .entry-main #entry-notes { grid-template-columns:1fr; }
}
@media(max-width:420px) {
  .quote-modes { grid-template-columns:1fr; }
  .workspace-page-heading h1,.dashboard-titlebar h1 { font-size:18px; }
  .cards .metric strong { font-size:20px; }
}
