/* Workspace presentation. Business rules and existing form contracts are unchanged. */
:root {
  --bg: #f5f7f8; --surface: #fff; --surface-soft: #f5f8f8;
  --ink: #192e32; --muted: #617579; --line: #e1e9e9;
  --accent: #167568; --accent-strong: #105c52; --accent-soft: #e8f4ef;
  --shadow: 0 12px 40px #102f3510; --danger: #bb3d51;
}
:root[data-theme="dark"] {
  --bg: #101b20; --surface: #18272d; --surface-soft: #1f3239;
  --ink: #e7f0ef; --muted: #a4b9ba; --line: #2c4147;
  --accent: #73c9b2; --accent-strong: #a0e3cf; --accent-soft: #24443f;
  --danger: #ff9aab;
}
body { font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font-family: inherit; }
button { transition: background .15s, border-color .15s; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 200; background: var(--surface); color: var(--ink); padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.app-shell { grid-template-columns: 236px minmax(0, 1fr); }
.sidebar, :root[data-theme="dark"] .sidebar { background: #142d32; color: #f2f8f7; padding: 28px 16px 18px; gap: 25px; border: 0; z-index: 90; }
.brand { padding: 0 8px 18px; border-bottom: 1px solid #ffffff14; gap: 10px; }
.brand-mark { width: 38px; height: 42px; border-radius: 12px 12px 12px 3px; background: #bce7d7; color: #143e37; box-shadow: none; font-size: 11px; }
.brand strong { font-size: 15px; letter-spacing: -.3px; }
.brand span, .sidebar-foot small { color: #9cb8b9; font-size: 11px; }
.nav { gap: 3px; }
.nav-group { font-size: 9px; font-weight: 650; color: #8daaad; letter-spacing: 1.4px; padding: 19px 12px 8px; }
.nav-group:first-child { padding-top: 0; }
.nav-item, :root[data-theme="dark"] .nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #bed0d1; font-size: 12px; border-radius: 7px; min-height: 39px; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-item:hover, :root[data-theme="dark"] .nav-item:hover { background: #ffffff0b; color: white; }
.nav-item.active, :root[data-theme="dark"] .nav-item.active { background: #c4e8dc; color: #163e35; font-weight: 650; }
.nav-item.active::before { display: none; }
.sidebar-foot { font-size: 11px; color: #bce7d7; border-color: #ffffff1a; padding: 16px 8px 0; }
.content { width: 100%; max-width: none; padding: 0 clamp(20px, 2.5vw, 48px) 94px; }
.workspace-bar { height: 72px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); margin-bottom: 31px; }
.workspace-bar b { padding: 0 12px; color: var(--line); }
.workspace-date { margin-left: auto; }
.workspace-avatar { display: grid; place-items: center; width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--line); border-radius: 50%; font-size: 10px; font-weight: 700; }
.menu-toggle { display: block; padding: 5px 10px; min-height: 32px; flex: 0 0 auto; }
.sidebar-close { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 32px; margin-left: auto; padding: 0; border: 1px solid #ffffff30; border-radius: 7px; color: #fff; background: #ffffff0b; }
.brand .sidebar-close span { margin: 0; color: inherit; font-size: 24px; line-height: 1; }
.sidebar-close:hover { background: #ffffff20; }
.sidebar .brand { gap: 6px; padding-inline: 0; }
.sidebar .brand strong { font-size: 13px; }
.sidebar .brand-mark { width: 32px; flex-shrink: 0; }
@media (min-width: 981px) {
  body.sidebar-collapsed .app-shell { grid-template-columns: minmax(0, 1fr); }
  body.sidebar-collapsed .sidebar { display: none; }
}
.topbar { border: 0; padding: 0; margin-bottom: 25px; align-items: center; }
.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 8px; color: var(--muted); }
h1 { font-size: clamp(27px, 2.4vw, 36px); letter-spacing: -1.2px; line-height: 1.2; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; letter-spacing: -.25px; }
h3 { font-weight: 600; }
.view-description { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { flex-wrap: nowrap; flex-shrink: 0; }
.theme-toggle { margin-right: 8px; position: relative; }
.theme-toggle input { width: 1px; height: 1px; }
.theme-toggle:focus-within { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
.theme-toggle b { font-size: 11px; font-weight: 500; }
.primary { background: var(--accent); box-shadow: none; color: white; font-weight: 600; }
:root[data-theme="dark"] .primary { color: #102d26; }
.primary:hover { background: var(--accent-strong); }
.primary, .secondary, .danger, .file-button { min-height: 40px; padding: 10px 15px; border-radius: 7px; font-size: 12px; }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 550; }
.text-button { font-size: 12px; font-weight: 600; }
.primary.small, .secondary.small, .danger.small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.panel, .form-card, .kpi { border-radius: 12px; box-shadow: 0 2px 3px #143a331a; }
.panel { min-width: 0; padding: 22px; }
.view.active { gap: 22px; }
.panel-head { gap: 16px; margin-bottom: 20px; }
.panel-head span { font-size: 11px; }
.profit-filter-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; box-shadow: none; }
.profit-filter-panel .panel-head { display: block; margin: 0; }
.profit-filter-panel h2 { font-size: 12px; }
.profit-filter-panel .panel-head span { font-size: 10px; }
.profit-filter-panel .profit-filter { display: flex; gap: 10px; align-items: end; }
.profit-filter-panel label { font-size: 10px; }
.profit-filter-panel input { padding: 7px 9px; min-height: 34px; font-size: 11px; }
.profit-filter-panel button { height: 34px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { min-height: 151px; padding: 22px; align-content: start; }
.kpi::after { display: none; }
.kpi span { font-size: 12px; font-weight: 550; }
.kpi strong, .kpi:nth-child(n) strong { color: var(--ink); font-size: clamp(21px, 2vw, 32px); font-weight: 650; letter-spacing: -.8px; margin: 16px 0 7px; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 10px; line-height: 1.6; }
.kpi-featured { background: #19493f; border-color: #19493f; }
.kpi-featured span, .kpi-featured small { color: #bcd8cf; }
.kpi-featured strong { color: #fff !important; }
.secondary-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); padding: 12px 0; }
.secondary-metrics .kpi { display: flex; gap: 12px; align-items: baseline; padding: 0 20px; min-height: 0; background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; flex-wrap: wrap; }
.secondary-metrics .kpi:last-child { border: 0; }
.secondary-metrics .kpi span { font-size: 11px; }
.secondary-metrics .kpi strong { font-size: 17px; margin: 0; letter-spacing: -.3px; }
.secondary-metrics .kpi small { display: none; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 22px; }
.chart-key { display: flex; align-items: center; gap: 6px; }
.chart-key::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.trend-chart { width: 100%; height: 190px; display: block; overflow: visible; color: var(--accent); }
.trend-chart text { fill: var(--muted); font: 10px system-ui; }
.chart-caption { font-size: 10px; color: var(--muted); margin-top: 12px; }
.attention-panel { background: var(--surface); }
.section-description { margin: 8px 0 18px; color: var(--muted); font-size: 11px; }
.operation-action { width: 100%; background: transparent; color: var(--ink); text-align: left; padding: 13px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.operation-action:hover { background: var(--surface-soft); }
.operation-action > b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: 15px; }
.operation-action strong { display: block; font-size: 12px; font-weight: 600; }
.operation-action small { color: var(--muted); font-size: 10px; }
.operation-action > span:last-child { margin-left: auto; color: var(--muted); }
.profit-explanation { color: var(--muted); font-size: 11px; }
.profit-explanation summary { cursor: pointer; width: fit-content; }
.profit-explanation p { margin: 9px 0 0; max-width: 800px; }
.dashboard-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
.balance-list { gap: 0; max-height: 340px; overflow: auto; }
.balance-row, :root[data-theme="dark"] .balance-row { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 2px; }
.balance-row:last-child { border-bottom: 0; }
.balance-row header { align-items: center; }
.balance-row strong { font-size: 12px; font-weight: 600; }
.balance-row small { font-size: 10px; color: var(--muted); }
.balance-row .meter { display: none; }
.balance-value { text-align: right; }
.balance-value small { display: block; margin-top: 2px; }
.bar-chart { gap: 16px; }
.bar-row { grid-template-columns: minmax(80px, .8fr) minmax(40px, 1.3fr) 28px; font-size: 11px; }
.bar-row strong { font-weight: 500; overflow-wrap: anywhere; }
.bar-row > span { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; background: var(--surface-soft); }
.bar-track span { background: #65a998; border-radius: 6px; }
.table-wrap { max-width: 100%; min-width: 0; border-radius: 8px; }
table { background: var(--surface); }
th { font-size: 10px; font-weight: 600; letter-spacing: .4px; padding: 12px 14px; background: var(--surface-soft); }
td { font-size: 12px; padding: 15px 14px; vertical-align: middle; line-height: 1.6; }
td strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; flex-wrap: nowrap; gap: 3px; }
.row-actions button { min-height: 30px; padding: 5px 7px !important; background: transparent !important; border: 1px solid transparent; font-size: 10px !important; }
.row-actions button:hover { border-color: var(--line); background: var(--surface-soft) !important; }
.row-actions .danger { color: var(--danger); }
.bulk-actions { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.bulk-actions span, .bulk-actions label { font-size: 11px; }
.pill { min-height: 23px; font-size: 10px; font-weight: 600; border-radius: 5px; }
.search-field { display: block; max-width: 440px; margin-bottom: 18px; }
.search-field span { display: block; font-size: 11px; margin-bottom: 5px; color: var(--muted); }
.search-field input { width: 100%; background: var(--surface-soft); }
.profit-filter, .ledger-filter { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
label { font-size: 12px; font-weight: 550; }
input, select, textarea { border-radius: 7px; min-width: 0; max-width: 100%; font-size: 13px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.split-panel { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
.split-panel > *, .settings-grid > *, .form-grid > * { min-width: 0; }
.form-card { padding: 22px; box-shadow: none; gap: 16px; }
.form-card h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.demo-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.demo-panel p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.empty { padding: 40px 20px; color: var(--muted); font-size: 12px; background: var(--surface-soft); border-radius: 8px; }
dialog { border-radius: 16px; border: 1px solid var(--line); max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: #0d252b88; backdrop-filter: blur(3px); }
.assistant-dialog { margin: 16px 16px 16px auto; width: min(580px, calc(100vw - 32px)); max-width: 580px; height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); border-radius: 14px; }
.assistant-header { background: #19493f; padding: 22px; }
.assistant-header h2 { font-size: 17px; }
.assistant-header p { font-size: 11px; }
.assistant-suggestions { flex-wrap: wrap; padding: 14px 20px; gap: 6px; overflow: visible; }
.assistant-suggestions button { font-size: 10px; border-radius: 6px; }
.assistant-bubble { max-width: 100%; min-width: 0; border-radius: 10px; padding: 14px; }
.assistant-bubble p { font-size: 12px; }
.assistant-result table { min-width: 0; }
.assistant-result th, .assistant-result td { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.assistant-launcher { background: #19493f; border-radius: 12px; font-size: 12px; padding: 13px 17px; box-shadow: 0 6px 22px #16372f25; }
.assistant-launcher svg { width: 20px; height: 20px; }
.assistant-answer-value { display: block; font-size: 28px; color: var(--accent-strong); padding: 18px 0 4px; letter-spacing: -.8px; }
.assistant-form textarea { border-radius: 8px; }
.assistant-form button { border-radius: 8px; }
.assistant-status { font-size: 10px; }
@media (min-width: 1800px) { .content { padding-inline: 52px; } .trend-chart { height: 230px; } .kpi { min-height: 170px; } }
@media (max-width: 1200px) { .app-shell { grid-template-columns: 210px minmax(0,1fr); } .content { padding-inline: 24px; } .topbar { align-items: start; } .top-actions { flex-wrap: wrap; justify-content: end; } .theme-toggle b { display: none; } .kpi { padding: 17px; } .profit-filter-panel { align-items: start; flex-direction: column; } .profit-filter-panel .profit-filter { width: 100%; } .profit-filter-panel label { flex: 1; } .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(230px, 1fr); } .secondary-metrics .kpi { gap: 6px; } .secondary-metrics .kpi strong { font-size: 15px; } }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 260px; height: 100dvh; box-shadow: 20px 0 80px #0005; }
  body.menu-open .sidebar { display: flex; }
  body.menu-open { overflow: hidden; }
  .nav { grid-template-columns: 1fr; }
  .menu-toggle { display: block; padding: 5px 10px; min-height: 32px; flex: 0 0 auto; }
  .sidebar-close { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; margin-left: auto; padding: 0; border: 1px solid #ffffff30; border-radius: 7px; color: #fff; background: #ffffff0b; }
  .brand .sidebar-close span { margin: 0; color: inherit; font-size: 24px; line-height: 1; }
  .sidebar-close:hover { background: #ffffff20; }
  .sidebar .brand { gap: 8px; padding-inline: 0; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 89; background: #0b1b2877; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .split-panel { grid-template-columns: 1fr; }
  .form-card { max-width: none; }
  .workspace-bar { margin-bottom: 24px; }
}
@media (max-width: 640px) {
  .content { padding: 0 16px 90px; }
  .workspace-bar { height: 58px; gap: 10px; font-size: 10px; }
  .workspace-bar b { padding: 0 5px; }
  .workspace-date { display: none; }
  .workspace-avatar { margin-left: auto; }
  .topbar { flex-direction: column; gap: 18px; }
  .top-actions { width: 100%; justify-content: space-between; align-items: center; }
  .theme-toggle { width: auto; }
  .theme-toggle b { display: block; }
  .top-actions .primary { flex: 0 0 auto; }
  .view.active { gap: 16px; }
  .profit-filter-panel { padding: 14px; }
  .profit-filter-panel .profit-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .profit-filter-panel input { width: 100%; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 15px; min-height: 145px; }
  .kpi strong, .kpi:nth-child(n) strong { font-size: 21px; overflow-wrap: anywhere; }
  .kpi span { font-size: 11px; }
  .secondary-metrics { grid-template-columns: 1fr; gap: 11px; }
  .secondary-metrics .kpi { padding: 0 4px; flex-direction: row; justify-content: space-between; border: 0; min-height: 0; }
  .secondary-metrics .kpi strong { font-size: 14px; }
  .overview-grid, .dashboard-grid { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 17px; }
  .panel-head { align-items: start; flex-wrap: wrap; }
  .trend-chart { height: 180px; }
  .profit-filter, .ledger-filter { grid-template-columns: 1fr 1fr; gap: 10px; }
  input, select, textarea { font-size: 16px; }
  .assistant-dialog { margin: 8px; width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .assistant-header { padding: 16px; }
  .assistant-suggestions { padding: 12px; }
  .demo-panel { flex-direction: column; align-items: stretch; }
  .form-grid.two, .commission-preview, .sale-item, .payment-item, .stock-transfer-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Refined density and hierarchy, shared across all operational screens. */
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
:root { --bg: #f6f8fa; --line: #e3e9ed; --ink: #203039; --muted: #637780; }
:root[data-theme="dark"] { --bg: #101b20; --line: #2c4147; --ink: #e7f0ef; --muted: #a4b9ba; }
.sidebar, :root[data-theme="dark"] .sidebar { background: #152c33; }
.nav-group { font-size: 10px; letter-spacing: 1.15px; padding-top: 22px; }
.nav-item, :root[data-theme="dark"] .nav-item { font-size: 12px; min-height: 41px; }
.nav-item.active, :root[data-theme="dark"] .nav-item.active { background: #254a4d; color: #d3f5e9; box-shadow: inset 3px 0 #8bd0b8; }
.sidebar-close { opacity: .7; border-color: transparent; background: transparent; }
.sidebar-close:hover, .sidebar-close:focus-visible { opacity: 1; background: #ffffff15; }
.brand-mark { background: #d3eddf; border-radius: 10px; }
.workspace-bar { height: 68px; gap: 14px; margin-bottom: 32px; }
.workspace-breadcrumb { white-space: nowrap; font-size: 12px; }
.workspace-breadcrumb > span { color: var(--ink); font-weight: 600; }
.workspace-date { font-size: 11px; white-space: nowrap; }
.workspace-avatar { flex-shrink: 0; }
.quick-trigger { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-width: 210px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 7px; text-align: left; font-size: 12px; }
.quick-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }
.quick-trigger kbd { margin-left: auto; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font: 10px inherit; }
.workspace-date { margin-left: 6px; }
.eyebrow { font-size: 10px; letter-spacing: 1.2px; }
.topbar .eyebrow { margin-bottom: 8px; }
h1 { font-size: 32px; font-weight: 650; letter-spacing: -.9px; }
h2 { font-size: 16px; font-weight: 600; }
.view-description { font-size: 13px; line-height: 1.6; }
.primary, .secondary, .danger, .file-button { font-size: 13px; }
.panel, .form-card, .kpi { border-radius: 10px; box-shadow: 0 2px 6px #1c364405; }
.panel { padding: 24px; }
.panel-head span, .panel-head .text-button { font-size: 12px; }
.profit-filter-panel { padding: 14px 20px; background: transparent; border-color: var(--line); }
.profit-filter-panel h2 { font-size: 13px; }
.profit-filter-panel .panel-head span, .profit-filter-panel label { font-size: 11px; }
.profit-filter-panel input { background: var(--surface); font-size: 12px; }
.kpi { padding: 23px; min-height: 153px; }
.kpi span { font-size: 13px; }
.kpi small { font-size: 11px; }
.kpi strong, .kpi:nth-child(n) strong { font-size: clamp(24px, 2.2vw, 34px); font-weight: 600; letter-spacing: -1px; }
.kpi-featured { background: #214d45; border-color: #214d45; }
.kpi-featured span, .kpi-featured small { color: #d2e8df; }
.secondary-metrics { padding: 15px 0; }
.secondary-metrics .kpi span { font-size: 12px; }
.secondary-metrics .kpi strong { font-size: 17px; }
.overview-grid { grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); }
.revenue-summary { display: flex; gap: 30px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.revenue-summary > div { min-width: 0; }
.revenue-summary span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.revenue-summary strong { font-size: 20px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.revenue-summary > div:first-child strong { color: var(--accent-strong); }
.trend-chart { height: 200px; }
.trend-chart circle { r: 2; }
.chart-caption, .section-description, .operation-action small { font-size: 12px; }
.attention-panel { background: var(--surface-soft); }
.operation-action { padding: 18px 0; }
.operation-action strong { font-size: 13px; }
.operation-action > b { flex: 0 0 34px; }
.profit-explanation { font-size: 12px; }
.balance-row { padding-block: 17px; }
.balance-row strong { font-size: 13px; }
.balance-row small { font-size: 11px; }
.bar-chart { gap: 19px; }
.bar-row { font-size: 12px; }
.bar-track { height: 8px; }
.bar-track span { background: #4e9b87; }
th { font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 14px; }
td { font-size: 13px; padding: 16px 14px; }
.table-wrap { border-radius: 8px; }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#sales .table-wrap { max-height: 65vh; overscroll-behavior: contain; }
#sales .table-wrap th { z-index: 1; }
.row-actions button { font-size: 11px !important; min-height: 32px; box-shadow: none; }
.bulk-actions { background: var(--surface); padding-block: 12px; }
.bulk-actions button:disabled { visibility: hidden; }
.bulk-actions span, .bulk-actions label { font-size: 12px; }
.pill { border-radius: 6px; font-size: 11px; padding: 2px 8px; gap: 5px; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
#salesRows td:nth-child(6), #recentSalesRows td:nth-child(3) { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
#sales table th:nth-child(6), #dashboard table th:nth-child(3) { text-align: right; }
.search-field { max-width: 520px; }
.search-field input { min-height: 44px; background: var(--surface); }
.search-field span { font-size: 12px; }
.empty { background: var(--surface-soft); border: 1px dashed var(--line); font-size: 13px; line-height: 1.8; padding: 42px 22px; }
.form-card { background: var(--surface-soft); }
.form-card h2 { padding-bottom: 16px; }
label { font-weight: 500; }
input, select, textarea { min-height: 40px; }
input[type="checkbox"] { min-height: 0; }
.assistant-bubble p { font-size: 13px; }
.assistant-suggestions button { font-size: 11px; }
.assistant-launcher { padding: 12px 16px; box-shadow: 0 4px 20px #173f3620; }
.quick-dialog { width: min(560px, calc(100vw - 32px)); padding: 22px; margin: min(12vh, 100px) auto auto; background: var(--surface); color: var(--ink); }
.quick-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.quick-close { font-size: 22px; padding: 2px 12px; }
.quick-dialog input { width: 100%; margin-bottom: 14px; }
.quick-results { max-height: 48vh; overflow: auto; display: grid; gap: 4px; }
.quick-result { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 6px; color: var(--ink); background: transparent; font-size: 13px; }
.quick-result svg { width: 18px; height: 18px; color: var(--muted); }
.quick-result:hover, .quick-result:focus { background: var(--accent-soft); outline-offset: -2px; }
.quick-dialog footer { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 1200px) {
  .workspace-date { display: none; }
  .revenue-summary { gap: 18px; }
  .revenue-summary strong { font-size: 17px; }
  .kpi { padding: 18px; }
  .kpi span { font-size: 12px; }
}
@media (max-width: 640px) {
  .workspace-bar { margin-bottom: 24px; gap: 10px; }
  .workspace-breadcrumb { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  .workspace-breadcrumb > b, .workspace-breadcrumb > span { display: none; }
  .quick-trigger { min-width: 36px; padding: 9px; justify-content: center; }
  .quick-trigger span, .quick-trigger kbd, .workspace-avatar { display: none; }
  .quick-trigger { margin-left: auto; }
  h1 { font-size: 28px; }
  .panel { padding: 18px; }
  .kpi { padding: 16px; min-height: 145px; }
  .kpi strong, .kpi:nth-child(n) strong { font-size: 23px; }
  .secondary-metrics .kpi { min-height: 0; padding: 0 4px; }
  .secondary-metrics .kpi strong { font-size: 15px; }
  .overview-grid { grid-template-columns: 1fr; }
  .revenue-summary { flex-wrap: wrap; gap: 18px 26px; }
  .revenue-summary strong { font-size: 18px; }
  .trend-chart { height: auto; min-height: 130px; }
  .trend-chart text { font-size: 16px; }
  .profit-filter-panel input, input, select, textarea { font-size: 16px; }
  .quick-dialog { padding: 16px; }
  .quick-dialog footer { flex-wrap: wrap; }
}
