:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --panel-soft: #f8f9fb;
  --text: #252a34;
  --ink: #252a34;
  --muted: #77808d;
  --line: #e7e9ee;
  --line-strong: #cbd1da;
  --brand: #147d68;
  --brand-dark: #106752;
  --primary: #147d68;
  --ok: #147d68;
  --success: #147d68;
  --danger: #c34b50;
  --accent: #b88026;
  --shadow: none;
  --shadow-soft: none;
}
* { letter-spacing: 0 !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
svg.lucide { width: 17px; height: 17px; stroke-width: 1.7; flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 3px solid #97cbbd; outline-offset: 3px; }
[hidden], .hidden { display: none !important; }
.layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 22px 14px 12px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); box-shadow: none; color: var(--text); z-index: 40; }
.brand { min-height: 56px; position: relative; padding: 0 0 0 48px; align-content: start; gap: 1px; margin: 0 6px 17px; }
.brand::before, .brand::after, .nav button::before, .nav button::after { display: none !important; }
.brand-logo { width: 36px; height: 36px; position: absolute; left: 0; top: 2px; border-radius: 8px; }
.brand strong { color: #293331; font-size: 18px; font-weight: 700; }
.brand span { color: #8a929b; font-size: 11px; }
.nav { display: flex; flex-direction: column; flex: 1; gap: 7px; margin: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #e0e3e7 transparent; }
.nav-group { margin: 0; }
.nav-group-label { min-height: 28px; padding: 0 13px; color: #939aa4; font-size: 11px; font-weight: 500; }
.nav-group-items { display: grid; gap: 2px; margin: 0; }
.nav .nav-item { min-height: 36px; padding: 7px 12px; display: flex; align-items: center; gap: 12px; color: #626a77; font-size: 13px; font-weight: 500; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; box-shadow: none; transition: background .15s, color .15s; }
.nav .nav-item svg { color: #8b94a0; }
.nav .nav-item:hover { background: #f4f6f8; color: #293331; }
.nav .nav-item.active { background: #eaf4f0; color: #147d68; border-color: transparent; font-weight: 600; box-shadow: none; }
.nav .nav-item.active svg { color: #147d68; }
.sidebar-bottom { display: flex; gap: 7px; align-items: center; padding: 16px 7px 4px; margin-top: 10px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.sidebar-bottom b { margin-left: auto; font-weight: 500; }
.environment-dot { width: 6px; height: 6px; border-radius: 50%; background: #c29853; flex-shrink: 0; }
.main { background: var(--bg); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; min-height: 64px; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.breadcrumb-root, .breadcrumb-divider { color: #98a0aa; font-size: 12px; }
.topbar h2 { color: #3c4651; font-size: 13px; font-weight: 600; margin: 0; white-space: nowrap; }
.userbox { font-size: 12px; color: #727c88; display: flex; align-items: center; gap: 10px; }
.user-avatar { display: grid; place-items: center; height: 28px; width: 28px; border-radius: 50%; background: #eef1f6; color: #60739a; font-size: 11px; }
.content { padding: 25px 30px 36px; width: 100%; max-width: 1720px; margin: 0 auto; }
.content > * { min-width: 0; }
#navToggle, .nav-backdrop { display: none; }
h1, h2, h3, h4 { color: #29303a; font-weight: 600; line-height: 1.45; }
h1 { font-size: 23px; } h2 { font-size: 20px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
.muted, small { color: var(--muted); }
.btn { min-height: 35px; padding: 7px 13px; border: 1px solid #dfe3e9; border-radius: 6px; color: #515b68; background: #fff; box-shadow: none; font-weight: 500; font-size: 12px; line-height: 1.5; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: #f4f6f8; border-color: #bbc4d0; transform: none; box-shadow: none; }
.btn.primary { background: #147d68; border-color: #147d68; color: #fff; box-shadow: none; }
.btn.primary:hover { background: #106752; border-color: #106752; }
.btn.ghost { background: transparent; border-color: transparent; color: #77808d; }
.btn.ghost:hover { background: #eef1f5; color: #424b58; }
.btn.danger { background: #fff; color: #c34b50; border-color: #f0d8da; }
.btn.danger:hover { background: #fff4f4; }
.btn.small { min-height: 29px; padding: 4px 9px; font-size: 12px; }
.btn.icon-only { width: 34px; height: 34px; min-height: 34px; padding: 0; flex-shrink: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select, textarea, .field input:not([type=checkbox]):not([type=radio]) { width: 100%; min-width: 0; min-height: 37px; padding: 7px 10px; border: 1px solid #dce1e8; border-radius: 6px; color: #37404c; background: #fff; box-shadow: none; font-size: 13px; }
.input:hover, select:hover, textarea:hover { border-color: #bac5d1; }
.input:focus, select:focus, textarea:focus { border-color: #4ba58d; box-shadow: 0 0 0 3px #e8f4f0; outline: none; }
input::placeholder, textarea::placeholder { color: #a3aab4; font-size: 12px; }
input[type=checkbox], input[type=radio] { accent-color: #147d68; width: 15px; height: 15px; flex-shrink: 0; }
input:read-only:not([type=checkbox]) { background: #f6f8fa; }
textarea { resize: vertical; min-height: 64px; }
.field { min-width: 0; align-content: start; }
.field > label, .filter-field > span { font-size: 12px; color: #697482; font-weight: 500; margin-bottom: 6px; }
.grid { gap: 15px 20px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .visual-panel, .analysis-panel, .diagnosis-panel, .quote-surface { background: #fff; border: 0; border-radius: 0; padding: 22px 24px; box-shadow: none; margin-bottom: 20px; }
.panel > h3, form.panel > h3 { margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 16px; }
.panel .panel, .panel .visual-panel, .panel .offline-detail-section { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 18px 0 0; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; background: transparent; border: 0; box-shadow: none; }
.toolbar-left, .toolbar-right { gap: 8px; flex-wrap: wrap; }
.content > .toolbar { background: #fff; padding: 18px 22px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.filter-grid { display: grid; grid-template-columns: repeat(6, minmax(115px, 1fr)); gap: 15px; width: 100%; }
.filter-actions { display: flex; align-items: center; gap: 9px; grid-column: 1 / -1; flex-wrap: wrap; padding-top: 2px; }
.completion-filter, .checkline { border: 0; border-radius: 4px; background: transparent; color: #647080; font-size: 12px; padding: 5px 0; font-weight: 400; }
.completion-filter { margin-right: 8px; }
.more-filter-panel { border: 0; border-top: 1px solid var(--line); background: #fff; padding: 16px 22px; }
.table-titlebar, .visual-head, .section-titlebar { margin-bottom: 16px; gap: 12px; }
.table-titlebar h3, .visual-head h3 { font-size: 15px; margin: 0; }
.visual-head span, .table-titlebar .muted { font-size: 11px; color: var(--muted); }
.table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 5px; scrollbar-width: thin; scrollbar-color: #cdd4dd #f6f8fa; }
body[data-view=orders] .table-wrap, body[data-view=offline] .table-wrap { max-height: 550px; }
body[data-view=orders] .table-wrap :is(th,td):last-child, body[data-view=offline] .table-wrap :is(th,td):last-child { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 10px #53627b08; border-left: 1px solid var(--line); }
body[data-view=orders] .table-wrap th:last-child, body[data-view=offline] .table-wrap th:last-child { z-index: 3; background: #f6f8fa; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th { height: 40px; position: sticky; top: 0; z-index: 2; padding: 10px 13px; background: #f6f8fa; color: #7b8492; font-weight: 500; text-align: left; border: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 13px; border: 0; border-bottom: 1px solid #eef0f3; color: #4c5664; vertical-align: middle; }
tbody tr:nth-child(even) { background: #fff; }
tbody tr:hover { background: #f7faf9; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: #364052; font-weight: 600; }
.numeric-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pagination { padding-top: 16px; gap: 10px; }
.pagination-size { font-size: 12px; }
.pagination-size .input { min-height: 30px; height: 30px; font-size: 12px; padding: 3px 7px; }
.badge, .status-badge, .tag { display: inline-flex; align-items: center; border: 0; border-radius: 4px; padding: 3px 7px; font-size: 11px; font-weight: 500; }
.cards { gap: 12px; margin: 0 0 20px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.card, .metric { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 17px 18px; box-shadow: none; min-width: 0; }
.card::before, .card::after, .metric::before, .metric::after { display: none; }
.card:hover, .metric:hover { transform: none; box-shadow: none; }
.card span, .card label, .metric span { color: #7c8591; font-size: 12px; }
.card strong, .metric strong { display: block; color: #354052; font-size: 22px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card.good strong, .metric.good strong, .good, .profit.good { color: #147d68; }
.card.warn strong, .metric.warn strong, .warn, .profit.warn { color: #c16042; }
.danger { color: var(--danger); }
.notice, .error { border-radius: 5px; padding: 11px 14px; font-size: 12px; margin-bottom: 16px; border: 1px solid #dfebe6; background: #f3f8f5; color: #567565; box-shadow: none; line-height: 1.7; }
.error { background: #fff3f3; color: #b4474c; border-color: #f2d5d8; }
.notice.warn { background: #fff9ee; border-color: #f2e3c5; color: #9c732c; }
.dashboard-titlebar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 21px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.dashboard-titlebar h1 { margin: 0 0 4px; font-size: 23px; color: #2b333e; }
.dashboard-titlebar span, .dashboard-titlebar em { color: #8e97a2; font-size: 11px; font-style: normal; }
.dashboard-toolbar { margin-bottom: 20px; padding: 0; border: 0; background: transparent; }
.dashboard-day-nav { display: flex; gap: 5px; padding-left: 6px; }
.dashboard-hero { display: grid; grid-template-areas: none; grid-template-columns: 160px minmax(0, 1fr) 255px; align-items: center; gap: 22px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 25px 24px; box-shadow: none; min-height: 146px; margin: 0 0 14px; overflow: visible; }
.dashboard-hero::before, .dashboard-hero::after { display: none; }
.hero-copy { padding: 0; min-width: 0; grid-area: auto; }
.hero-copy span { color: #929ca7; font-size: 11px; }
.hero-copy strong { font-size: 18px; color: #3d4654; margin-top: 5px; line-height: 1.5; }
.hero-copy em { color: #a0a7b1; font-size: 11px; font-style: normal; margin-top: 5px; }
.hero-kpis { grid-area: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 22px; background: transparent; border: 0; padding: 0 22px; border-left: 1px solid var(--line); }
.hero-kpis > div { border: 0; padding: 0; background: transparent; min-height: 0; }
.hero-kpis span { font-size: 11px; color: #89929e; }
.hero-kpis strong { font-size: 21px; font-weight: 600; color: #3d4858; margin-top: 3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-profit { grid-area: auto; display: block; align-self: stretch; min-width: 0; padding: 2px 0 0 22px; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.hero-profit span { color: #6a7c76; font-size: 12px; }
.hero-profit strong { display: block; font-size: 30px; font-weight: 600; line-height: 1.5; color: #147d68; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-profit.warn strong { color: #c34b50; }
.hero-profit em { display: block; max-width: 260px; font-style: normal; color: #95a09c; font-size: 10px; line-height: 1.7; margin-top: 5px; text-align: left; }
.dashboard-cards { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin-bottom: 19px; gap: 11px; }
.dashboard-cards .card { padding: 14px 15px; }
.dashboard-cards .card strong { font-size: 20px; margin-top: 9px; }
.dashboard-cards .metric { border-radius: 7px; padding: 15px 17px; min-height: 90px; background: #fff; box-shadow: none; }
.dashboard-cards .metric strong { font-size: 20px; margin-top: 8px; }
.dashboard-toolbar .btn.primary { box-shadow: none; background: #147d68; }
.dashboard-toolbar .dashboard-day-nav .btn { width: 34px; min-width: 34px; }
.workspace-details { border: 0; border-bottom: 1px solid var(--line); background: #fff; margin-bottom: 1px; }
.workspace-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 20px; cursor: pointer; list-style: none; font-size: 12px; color: #4e5967; }
.workspace-details > summary::-webkit-details-marker { display: none; }
.workspace-details > summary > span { display: flex; gap: 9px; align-items: center; }
.workspace-details > summary > span svg { color: #8191a2; }
.workspace-details > summary small { margin-left: auto; font-size: 11px; color: #9aa1aa; }
.workspace-details > summary::after { content: '+'; color: #9aa1aa; font-size: 18px; }
.workspace-details[open] > summary::after { content: '−'; }
.workspace-details .panel, .workspace-details .analysis-panel { padding-top: 10px; margin-bottom: 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.dashboard-grid > * { min-width: 0; margin: 0; grid-column: auto; }
.dashboard-grid .detail-panel, .dashboard-grid .quality-panel, .dashboard-grid .material-panel, .dashboard-grid .low-profit-panel { grid-column: 1 / -1; }
.compare-row { padding: 11px 0; border-bottom: 1px solid #f0f2f5; background: transparent; border-radius: 0; }
.compare-name strong { font-size: 13px; color: #4a5564; }
.compare-name em { font-size: 11px; color: #98a1ad; }
.compare-track { height: 5px; background: #f0f3f6; border-radius: 3px; overflow: hidden; }
.compare-track i { border-radius: 3px; }
.compare-track i.orders { background: #c6cfda; }
.compare-track i.sales { background: #7698c2; }
.compare-track i.profit { background: #67ad96; }
.compare-line { gap: 9px; }
.compare-line span { font-size: 10px; color: #a0a8b3; }
.compare-line b { font-size: 11px; color: #6b7787; font-weight: 500; }
.staff-rank-row, .staff-row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.detail-metrics { background: #f7f9fb; padding: 14px; border: 0; border-radius: 5px; gap: 12px; }
.detail-metrics span { font-size: 12px; color: #85909b; background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 42px; }
.detail-metrics b { color: #4c5968; font-weight: 600; }
.detail-table-grid { gap: 18px; }
.detail-table-grid .panel { padding: 0; border: 0; margin: 0; }
.detail-table-card { background: transparent; border: 0; border-radius: 0; padding: 0; }
.quality-grid { gap: 0; border-top: 1px solid var(--line); }
.quality-card { background: #fff; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 16px; box-shadow: none; }
.quality-card strong { font-size: 24px; color: #4c5968; }
.quality-card em, .quality-card small { color: #99a1ad; font-size: 11px; }
.quality-stack { height: 7px; border-radius: 3px; }
.analysis-head { padding: 0; background: transparent; border: 0; color: #58697b; }
.analysis-head span, .analysis-head h3 { color: #58697b; }
.analysis-head em { color: #8d99a4; }
.analysis-controls { background: transparent; border: 0; padding: 18px 0 0; gap: 15px; }
.analysis-result { box-shadow: none; background: transparent; border-radius: 0; }
.quote-workspace { display: grid; grid-template-columns: minmax(310px,.85fr) minmax(0,2fr); gap: 20px; align-items: start; }
.quote-surface { margin: 0; }
.quote-editor { padding: 22px 24px; position: static; }
.quote-surface-head, .quote-size-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin: 0 0 18px; gap: 12px; }
.quote-surface-head h3, .quote-size-head h3 { margin: 0; font-size: 15px; }
.quote-state { background: #eef5f2; border: 0; border-radius: 4px; color: #648575; font-size: 11px; padding: 3px 8px; }
.quote-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.quote-note-row { margin-top: 14px; }
.quote-size-head { margin-top: 22px; padding-top: 0; }
.quote-item-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; padding: 0 0 14px; margin: 0 0 14px; align-items: end; }
.quote-item-row > .field:nth-child(4) { grid-column: 1 / 3; }
.quote-item-row > .btn { justify-self: end; }
.quote-editor .quote-size-head { align-items: flex-start; flex-direction: column; gap: 6px; }
.quote-actions { margin-top: 12px; }
.quote-result-wrap { min-width: 0; }
.quote-result { padding: 22px 24px; }
.quote-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 18px; align-items: stretch; }
.quote-mode-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; background: #fff; border: 1px solid #dfe6ed; border-top: 3px solid #799bc0; border-radius: 7px; box-shadow: none; }
.quote-mode-card.normal { border-top-color: #64a58f; background: #fff; }
.quote-mode-card.volume { border: 1px solid #dfe6ed; border-top: 3px solid #7599be; background: #fff; }
.quote-mode-card.highPromo { border: 1px solid #e8e1d5; border-top: 3px solid #c09b54; background: #fff; }
.quote-mode-head { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; }
.quote-mode-head span { color: #546474; font-size: 13px; }
.quote-mode-head strong { color: #304b40; font-size: 34px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.quote-mode-card.volume .quote-mode-head strong { color: #4f759e; }
.quote-mode-card.highPromo .quote-mode-head strong { color: #9e7737; }
.quote-unit { color: #8b94a0; font-size: 11px; margin-bottom: 14px; }
.quote-mode-detail { gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #8995a2; font-size: 11px; background: transparent; border-radius: 0; }
.quote-price-hint { background: #fcf8ef; border: 0; border-radius: 4px; color: #9b804f; font-size: 11px; }
.quote-mode-card textarea { font-size: 12px; font-weight: 400; line-height: 1.9; background: #f8f9fb; border-color: transparent; min-height: 125px; margin: 14px 0; flex: 1; }
.quote-mode-card .btn { align-self: stretch; min-height: 35px; }
.volume .btn.primary { background: #6689af; border-color: #6689af; }
.highPromo .btn.primary { background: #ab8a4a; border-color: #ab8a4a; }
.quote-history { background: #f6f8fa; border: 0; border-radius: 4px; padding: 12px 15px; font-size: 12px; }
.quote-reference { margin-top: 18px; border-bottom: 1px solid var(--line); font-size: 12px; }
.quote-reference > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 12px 0; color: #677589; }
.quote-reference > summary small { margin-left: auto; padding-right: 12px; }
.quote-reference > summary::after { content: '+'; color: #94a0ac; }
.quote-reference[open] > summary::after { content: '−'; }
.quote-scenario-grid { gap: 16px; }
.quote-deal-price { border: 0; background: transparent; padding: 0; border-radius: 0; }
.quote-deal-price strong { font-size: 22px; color: #536a80; }
.quote-history-chips { gap: 14px; }
.quote-history-chips span, .quote-history-chips strong { background: transparent; padding: 0; border: 0; font-size: 11px; }
.quote-logistics { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; padding: 17px 0 0; margin-top: 20px; gap: 16px; }
.quote-logistics strong { color: #738092; font-size: 12px; font-weight: 500; }
.quote-logistics > div { background: transparent; border: 0; border-radius: 0; padding: 0; }
.quote-empty, .quote-loading { color: #9ba5b1; padding: 42px; text-align: center; }
.quote-empty strong, .quote-loading strong { font-weight: 500; font-size: 14px; }
.item-row, .offline-detail-row { border-radius: 5px; border-color: var(--line); background: #fafbfc; box-shadow: none; }
.shop-options, .shop-picker { gap: 7px; }
.shop-selected { background: #f7f9fb; border: 1px solid #e7ebef; color: #778492; border-radius: 5px; font-size: 12px; }
.offline-mode-bar { background: #fff; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 18px; }
.segmented-control { background: #f0f3f5; border: 0; border-radius: 5px; }
.segmented-control button { font-weight: 500; font-size: 12px; border-radius: 4px; min-height: 32px; }
.segmented-control button.active { box-shadow: 0 1px 4px #1f293714; color: #147d68; }
.offline-detail-section { background: transparent; border-radius: 0; padding: 20px 0; border: 0; border-top: 1px solid var(--line); }
.offline-detail-row { grid-template-columns: repeat(4,minmax(0,1fr)); }
.offline-item-result { background: #edf4f1; color: #628777; font-size: 12px; font-weight: 500; min-width: 0; }
.offline-detail-totals { flex-wrap: wrap; }
.offline-project-cell { width: 240px; }
.summary-line { color: #778492; font-size: 12px; flex-wrap: wrap; gap: 12px; }
.summary-line strong { color: #3f7f6c; }
.modal, .dialog, .modal-card, .dialog-card { border-radius: 8px; border-color: var(--line); box-shadow: 0 20px 70px #25364d26; max-width: calc(100vw - 32px); }
.permission-group { border-color: var(--line); border-radius: 6px; background: #fff; }
.finance-breakdown { padding: 0; border-top: 0; }
.finance-breakdown > summary { margin: 0; font-weight: 500; }
.finance-breakdown > .toolbar, .finance-breakdown > .table-wrap { margin: 15px 20px; width: auto; }
.staff-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.staff-card { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 6px 12px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; }
.staff-card span { grid-row: span 3; background: #f0f3f8; color: #7389a6; font-size: 12px; border-radius: 5px; }
.staff-card strong { margin: 0; font-size: 13px; font-weight: 500; }
.staff-card em { grid-column: 2; margin: 0; font-size: 11px; }
.staff-card b { grid-column: 3; grid-row: 1 / 3; margin: 0; font-size: 18px; font-weight: 600; }
.staff-card .rank-track { grid-column: 2 / -1; }
.expense-hero, .reconcile-hero { color: #465464; background: #fff; border: 0; border-radius: 0; box-shadow: none; min-height: 108px; padding: 22px 24px; }
.expense-hero strong, .reconcile-hero strong { color: #344454; font-size: 24px; font-weight: 600; }
.expense-hero span, .expense-hero em, .reconcile-hero span, .reconcile-hero em { color: #8d97a4; font-size: 12px; font-weight: 400; }
.expense-panel { border: 0; border-image: none; background: #fff; }
.expense-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
.expense-shop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 25px; }
.expense-shop-row { grid-template-columns: minmax(0,1fr) 140px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; padding: 15px 0; }
.expense-shop-title strong { font-size: 13px; font-weight: 500; }
.expense-other-row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; padding: 10px 0; }
.expense-other-row span { font-size: 12px; font-weight: 500; color: #7c8795; }
.expense-footer { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.reconcile-filter-card.active { border-color: #76ae98; background: #f5faf7; box-shadow: none; }
.record-footer { margin-top: auto; padding: 25px 20px; font-size: 10px; opacity: .65; border-top: 0; background: transparent; }
.login-shell { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #f6f8fa; padding: 30px 16px; }
.login-card { width: 380px; max-width: 100%; padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px #35445b08; }
.login-logo { height: 44px; width: 44px; border-radius: 8px; margin-bottom: 14px; }
.login-card h1 { font-size: 22px; margin: 0; }
.login-card > p { font-size: 12px; color: #8c96a2; margin: 6px 0 25px; }
.login-shell .record-footer { margin-top: 30px; }
@media (min-width: 1700px) {
  .quote-workspace { grid-template-columns: minmax(360px,.72fr) minmax(0,1.5fr); align-items: start; }
  .quote-field-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quote-editor { position: sticky; top: 20px; }
}
@media (max-width: 1250px) {
  .layout { grid-template-columns: 190px minmax(0,1fr); }
  .content { padding: 22px; }
  .topbar { padding: 0 22px; }
  .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-hero { grid-template-columns: 135px minmax(0,1fr) 225px; gap: 12px; padding: 20px; }
  .hero-kpis { padding: 0 15px; gap: 15px; }
  .hero-profit { padding-left: 15px; }
  .hero-profit strong { font-size: 27px; }
  .dashboard-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .quote-workspace { grid-template-columns: 1fr; }
  .quote-field-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-grid > * { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .layout { display: block; }
  .sidebar { position: fixed; width: 218px; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .navigation-open .sidebar { transform: translateX(0); }
  .navigation-open .nav-backdrop { display: block; position: fixed; inset: 0; background: #25364b55; border: 0; border-radius: 0; z-index: 35; }
  #navToggle { display: inline-flex; }
  .topbar { height: 58px; min-height: 58px; padding: 0 16px; }
  .content { padding: 20px 16px 30px; }
  .dashboard-titlebar em { display: none; }
  .hero-copy { display: none; }
  .dashboard-hero { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero-kpis { border: 0; padding: 0; }
  .hero-profit { padding-left: 18px; }
  .cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quote-modes { gap: 10px; }
  .quote-mode-card { padding: 14px; }
  .quote-mode-head strong { font-size: 27px; }
}
@media (max-width: 560px) {
  .breadcrumb-root, .breadcrumb-divider, .user-avatar, .userbox > span:not(.user-avatar) { display: none; }
  .topbar-heading { gap: 8px; }
  .userbox { gap: 3px; }
  .dashboard-titlebar h1 { font-size: 21px; }
  .dashboard-toolbar { gap: 10px; }
  .dashboard-toolbar .toolbar-left { width: 100%; gap: 8px; }
  .dashboard-toolbar .toolbar-right { margin-left: 0; }
  .dashboard-toolbar .input { flex: 1; min-width: 100px; max-width: 100%; }
  .dashboard-day-nav { padding-left: 0; }
  .dashboard-hero { grid-template-columns: 1fr; padding: 20px; }
  .hero-profit { grid-row: 1; padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--line); }
  .hero-profit strong { font-size: 32px; }
  .hero-profit em { max-width: none; }
  .hero-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-cards, .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .dashboard-cards .card strong, .card strong { font-size: 19px; }
  .workspace-details > summary { padding: 12px 14px; }
  .workspace-details > summary small { display: none; }
  .panel, .visual-panel, .analysis-panel, .diagnosis-panel, .quote-surface { padding: 18px 15px; }
  .content > .toolbar { padding: 16px 14px; }
  .filter-grid, .grid.three, .quote-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; }
  .expense-hero { grid-template-columns: 1fr; }
  .expense-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .expense-shop-grid { grid-template-columns: 1fr; }
  .expense-other-row { grid-template-columns: 50px minmax(0,1fr) 90px; }
  .filter-actions { gap: 7px; }
  .filter-actions .btn { white-space: normal; }
  .quote-modes { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .quote-mode-card { padding: 20px; }
  .quote-mode-head { flex-direction: row; align-items: center; }
  .quote-mode-head strong { font-size: 30px; }
  .quote-mode-card textarea { min-height: 105px; }
  .quote-item-row { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .quote-item-row > .field:nth-child(4) { grid-column: 1 / 3; }
  .quote-item-row > .btn { justify-self: end; }
  .quote-logistics { grid-template-columns: 1fr; }
  .quote-actions { flex-wrap: wrap; }
  .quote-scenario-grid { grid-template-columns: 1fr; }
  .offline-mode-bar { flex-wrap: wrap; }
  .offline-detail-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .item-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-table-grid, .quality-grid, .diagnosis-grid, .analysis-controls, .analysis-kpis, .analysis-visuals { grid-template-columns: 1fr; }
  .quality-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .visual-head { flex-wrap: wrap; }
  .record-footer { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
