:root { --bg:#081116; --panel:rgba(16,29,35,.86); --panel-soft:rgba(19,38,45,.72); --line:rgba(177,220,224,.14); --text:#e7f4f1; --muted:#8ba7a7; --cyan:#64d8ce; --orange:#ffb56d; --red:#ff827d; --shadow:0 18px 54px rgba(0,0,0,.28); }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--text); background:var(--bg); font:14px/1.5 "Segoe UI","Microsoft YaHei",sans-serif; letter-spacing:0; }
button,input,textarea,select { font:inherit; letter-spacing:0; }
/* 所有下拉框统一使用深色原生菜单，避免展开选项回退为浅色背景配低对比度文字。 */
select { color-scheme:dark; }
select option,select optgroup { color:var(--text); background:#102329; }
select option:checked { color:#071517; background:var(--cyan); }
button { cursor:pointer; }
.shell { display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
.sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:28px 18px 20px; border-right:1px solid var(--line); background:rgba(7,18,23,.94); }
.brand { display:flex; gap:11px; align-items:center; padding:0 8px 30px; }
.brand-mark { width:38px; height:38px; display:grid; place-items:center; border:1px solid rgba(100,216,206,.55); color:var(--cyan); font-size:13px; font-weight:700; letter-spacing:1px; }
.company-logo { display:block; width:46px; height:46px; object-fit:contain; flex:0 0 46px; }
.brand strong,.brand span { display:block; }
.brand strong { font-size:14px; font-weight:700; }
.brand span { margin-top:2px; color:var(--muted); font-size:11px; }
.nav { display:grid; gap:6px; }
.nav-item { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; padding:13px 14px; border:1px solid transparent; color:var(--muted); background:transparent; text-align:left; }
.nav-item span { color:inherit; font-size:14px; font-weight:700; }
.nav-item small { color:inherit; font-size:11px; }
.nav-item:hover,.nav-item.active { border-color:rgba(100,216,206,.3); color:var(--text); background:rgba(70,157,158,.13); }
.nav-item.active span { color:var(--cyan); }
.sidebar-foot { margin-top:auto; display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:16px 9px 0; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--cyan); box-shadow:0 0 12px rgba(100,216,206,.8); }
.text-button { width:100%; margin-top:11px; padding:0; border:0; color:var(--muted); background:none; text-align:left; font-size:11px; }
.text-button:hover { color:var(--cyan); }
.main { min-width:0; padding:28px 42px 52px; }
.topbar,.section-toolbar,.panel-head,.hero-line { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.topbar { margin-bottom:28px; }
.eyebrow,.panel-kicker { margin:0 0 6px; color:var(--cyan); font-size:10px; font-weight:700; letter-spacing:1.7px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:27px; line-height:1.15; letter-spacing:0; }
h2 { font-size:22px; line-height:1.2; }
h3 { font-size:16px; line-height:1.25; }
.top-actions,.toolbar-actions { display:flex; align-items:center; gap:10px; }
.date-pill { padding:9px 12px; border:1px solid var(--line); color:var(--muted); font-size:12px; }
.primary,.secondary,.ghost,.icon-button { border:0; }
.primary { padding:10px 15px; border:1px solid rgba(100,216,206,.5); color:#071517; background:var(--cyan); font-weight:700; }
.primary:hover { background:#8ae8df; }
.secondary { padding:10px 15px; border:1px solid var(--line); color:var(--text); background:transparent; }
.ghost { padding:0; color:var(--cyan); background:none; font-size:12px; }
.notice { position:fixed; top:24px; left:50%; width:min(720px,calc(100vw - 32px)); margin:0; padding:11px 14px; border:1px solid rgba(255,181,109,.4); color:#ffd6ab; background:rgba(26,30,28,.97); box-shadow:0 16px 46px rgba(0,0,0,.45); transform:translateX(-50%); pointer-events:none; z-index:2147483647; }
.notice:popover-open { position:fixed; top:24px; left:50%; display:block; }
.modal-notice { position:sticky; top:0; z-index:4; margin:0; padding:11px 24px; border:1px solid rgba(255,181,109,.4); color:#ffd6ab; background:rgba(26,30,28,.98); box-shadow:0 10px 26px rgba(0,0,0,.35); pointer-events:none; }
.hero-line { align-items:flex-end; margin-bottom:24px; padding:0 0 22px; border-bottom:1px solid var(--line); }
.hero-line h2 { max-width:720px; }
.hero-line p { margin-top:7px; color:var(--muted); }
.hero-badge { min-width:130px; padding:11px 13px; border-left:2px solid var(--orange); background:rgba(255,181,109,.08); }
.hero-badge span,.hero-badge strong { display:block; }
.hero-badge span { color:var(--muted); font-size:11px; }.hero-badge strong { margin-top:2px; color:var(--orange); }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:24px; }.report-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); }
.metric { min-height:122px; padding:17px; border:1px solid var(--line); background:var(--panel); box-shadow:var(--shadow); }
.metric-link { width:100%; color:var(--text); font:inherit; text-align:left; cursor:pointer; }.metric-link:hover { border-color:rgba(100,216,206,.48); background:rgba(32,78,82,.72); }.metric-link:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.metric-label { color:var(--muted); font-size:12px; }.metric-value { display:block; margin-top:12px; color:var(--text); font-size:27px; font-weight:700; }.metric-note { display:block; margin-top:4px; color:var(--muted); font-size:11px; }.metric.accent .metric-value { color:var(--cyan); }.metric.warm .metric-value { color:var(--orange); }.metric.risk .metric-value { color:var(--red); }
.two-column { display:grid; grid-template-columns:1.12fr .88fr; gap:16px; margin-bottom:16px; }.lower { grid-template-columns:1fr 1fr; }
#dashboardTeamPanels[hidden] { display:none !important; }
.panel { min-width:0; border:1px solid var(--line); background:var(--panel); box-shadow:var(--shadow); }.panel-head { padding:18px 18px 14px; align-items:flex-end; }.table-wrap { overflow:auto; }.table-wrap table { width:100%; border-collapse:collapse; min-width:540px; }.table-wrap th,.table-wrap td { padding:12px 18px; border-top:1px solid var(--line); text-align:left; white-space:nowrap; }.table-wrap th { color:var(--muted); font-size:11px; font-weight:500; }.table-wrap td { color:#d7e8e5; font-size:12px; }.table-wrap tr:hover td { background:rgba(100,216,206,.05); }
.order-list { display:grid; }.order-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(142px,auto); gap:10px 18px; padding:15px 18px; border-top:1px solid var(--line); }.order-row > div { min-width:0; }.order-main,.order-summary { display:grid; align-content:start; gap:5px; }.order-summary { justify-items:end; gap:7px; }.order-main strong { min-width:0; overflow-wrap:anywhere; font-size:12px; }.order-meta { display:block; min-width:0; overflow-wrap:anywhere; color:var(--muted); font-size:11px; }.order-row .order-amount { color:var(--orange); text-align:right; white-space:nowrap; font-size:13px; }.order-summary .tag { justify-self:end; }.tag { display:inline-flex; padding:3px 7px; border:1px solid rgba(100,216,206,.25); color:var(--cyan); font-size:10px; }.positive { color:var(--cyan) !important; }.negative { color:var(--orange) !important; }.line-item { display:grid; grid-template-columns:1.3fr .9fr .7fr .7fr 1fr; gap:7px; }.line-item input,.line-item select { min-width:0; padding:9px 8px; border:1px solid var(--line); color:var(--text); background:rgba(5,17,21,.68); outline:none; }
.account-status-active { border-color:rgba(112,224,155,.5); color:#8eeab0; background:rgba(72,181,113,.14); }.account-status-paused { border-color:rgba(255,130,125,.5); color:#ffaaa6; background:rgba(214,83,78,.14); }
.view { display:none; }.active-view { display:block; }.section-toolbar { margin-bottom:20px; align-items:flex-end; }.search { width:240px; padding:10px 12px; border:1px solid var(--line); outline:none; color:var(--text); background:var(--panel-soft); }.search:focus,input:focus,textarea:focus,select:focus { border-color:rgba(100,216,206,.6); }.empty { padding:32px 18px; color:var(--muted); text-align:center; }
dialog { width:min(620px,calc(100vw - 32px)); padding:0; border:1px solid rgba(100,216,206,.32); color:var(--text); background:#102329; box-shadow:0 28px 90px rgba(0,0,0,.55); }.modal-head { display:flex; justify-content:space-between; align-items:flex-start; padding:22px 24px 18px; border-bottom:1px solid var(--line); }.icon-button { padding:0; color:var(--muted); background:none; font-size:24px; line-height:1; }.icon-button:hover { color:var(--text); }dialog::backdrop { background:rgba(1,7,9,.7); backdrop-filter:blur(4px); }.modal-body,.modal-actions { padding:20px 24px; }.modal-actions { display:flex; justify-content:flex-end; gap:9px; border-top:1px solid var(--line); }.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.field { display:grid; gap:6px; }.field.full { grid-column:1/-1; }.field label { color:var(--muted); font-size:11px; }.field input,.field textarea,.field select { width:100%; padding:10px 11px; border:1px solid var(--line); outline:none; color:var(--text); background:rgba(5,17,21,.68); }.field textarea { min-height:78px; resize:vertical; }.field small { color:var(--muted); font-size:10px; }.direction-toggle { display:flex; gap:8px; }.direction-toggle label { flex:1; }.direction-toggle input { position:absolute; opacity:0; }.direction-toggle span { display:block; padding:10px; border:1px solid var(--line); color:var(--muted); text-align:center; }.direction-toggle input:checked+span { border-color:var(--cyan); color:var(--cyan); background:rgba(100,216,206,.1); }
.tax-options { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:10px; align-items:stretch; }
.check-option { flex:1 1 180px; display:flex !important; align-items:center; gap:9px; min-height:42px; padding:10px 12px; border:1px solid var(--line); color:var(--text) !important; background:rgba(5,17,21,.34); cursor:pointer; }
.check-option:hover { border-color:rgba(100,216,206,.45); background:rgba(100,216,206,.07); }
.check-option:has(input:checked) { border-color:rgba(100,216,206,.65); background:rgba(100,216,206,.1); }
.check-option input { width:17px; height:17px; margin:0; flex:0 0 auto; accent-color:var(--cyan); }
.check-option span { color:var(--text); font-size:12px; line-height:1.3; }
@media (max-width:1000px) { .shell { grid-template-columns:190px 1fr; }.main { padding:24px; }.metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.two-column,.lower { grid-template-columns:1fr; } }
@media (max-width:680px) { .shell { display:block; }.sidebar { position:static; height:auto; padding:16px; border-right:0; border-bottom:1px solid var(--line); }.brand { padding-bottom:15px; }.nav { grid-template-columns:repeat(5,1fr); }.nav-item { padding:9px 8px; }.nav-item small { display:none; }.sidebar-foot { display:none; }.main { padding:20px 14px 38px; }.topbar,.section-toolbar,.hero-line { align-items:flex-start; flex-direction:column; }.top-actions,.toolbar-actions { width:100%; }.top-actions { justify-content:space-between; }.toolbar-actions .search { flex:1; width:auto; }.metric-grid { grid-template-columns:1fr 1fr; gap:9px; }.metric { min-height:105px; padding:13px; }.metric-value { font-size:21px; }.form-grid { grid-template-columns:1fr; }.field.full { grid-column:auto; } }
.inline-stage,.inline-order-status { padding:5px 7px; border:1px solid rgba(100,216,206,.25); color:var(--cyan); background:rgba(100,216,206,.08); outline:none; font-size:11px; }
.inline-order-status { min-width:82px; }
#quickAdd { display:none; }
.table-action { padding:5px 8px; border:1px solid rgba(100,216,206,.25); color:var(--cyan); background:rgba(100,216,206,.06); font-size:11px; }.table-action + .table-action { margin-left:6px; }.table-action:hover { border-color:var(--cyan); background:rgba(100,216,206,.14); }
.order-context { display:flex; flex-wrap:wrap; gap:9px; align-items:center; padding:10px 11px; border:1px solid rgba(100,216,206,.22); color:var(--muted); background:rgba(100,216,206,.06); }.order-context strong { color:var(--cyan); }.order-context span { font-size:11px; }
.compact { padding:6px 10px; font-size:11px; }.section-label { display:flex; align-items:center; justify-content:space-between; gap:12px; }.section-label > span { color:var(--muted); font-size:11px; }.order-items-section,.finance-section { gap:10px; }.order-item-row { padding:12px; border:1px solid rgba(177,220,224,.18); background:rgba(5,17,21,.32); }.order-item-row + .order-item-row { margin-top:9px; }.item-row-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; color:var(--muted); font-size:11px; }.line-remove { padding:0; border:0; color:var(--red); background:transparent; font-size:11px; }.order-item-grid { display:grid; grid-template-columns:1.2fr .8fr .7fr .55fr .7fr .9fr 1fr; gap:8px; }.order-item-grid input,.order-item-grid select { min-width:0; padding:9px 8px; border:1px solid var(--line); color:var(--text); background:rgba(5,17,21,.68); outline:none; }.order-item-grid .item-spec { grid-column:1 / -1; }.finance-section { padding:14px; border:1px solid rgba(100,216,206,.26); background:rgba(100,216,206,.045); }.finance-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }.finance-preview { display:flex; flex-wrap:wrap; gap:7px 13px; padding-top:2px; color:var(--muted); font-size:11px; }.finance-preview strong { color:var(--text); }.finance-preview .positive { color:var(--cyan); }.finance-preview .negative { color:var(--red); }dialog { width:min(940px,calc(100vw - 32px)); }
@media (max-width:760px) { .order-item-grid,.finance-grid { grid-template-columns:1fr 1fr; }.order-item-grid .item-spec { grid-column:1 / -1; } }

/* 产品明细使用真实表格，表头和每个输入单元格严格对齐。 */
.item-table-scroll { overflow-x:auto; border:1px solid var(--line); background:rgba(5,17,21,.22); }
.order-items-table { width:100%; min-width:1120px; border-collapse:collapse; table-layout:fixed; }
.order-items-table th,.order-items-table td { padding:9px 7px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.order-items-table th { color:var(--muted); background:rgba(100,216,206,.06); font-size:11px; font-weight:600; white-space:nowrap; }
.order-items-table th:nth-child(1) { width:14%; }.order-items-table th:nth-child(2) { width:11%; }.order-items-table th:nth-child(3) { width:10%; }.order-items-table th:nth-child(4) { width:8%; }.order-items-table th:nth-child(5) { width:12%; }.order-items-table th:nth-child(6) { width:13%; }.order-items-table th:nth-child(7) { width:13%; }.order-items-table th:nth-child(8) { width:11%; }.order-items-table th:nth-child(9) { width:70px; }
.order-items-table .order-item-row:last-child td { border-bottom:0; }
.order-items-table .order-item-row:hover td { background:rgba(100,216,206,.035); }
.order-items-table input,.order-items-table select { width:100%; min-width:0; padding:9px 8px; border:1px solid var(--line); color:var(--text); background:rgba(5,17,21,.68); outline:none; }
.order-items-table th:last-child,.order-items-table td:last-child { text-align:center; }
.order-items-table .line-remove { margin-top:8px; }
.amount-currency { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,.42fr); gap:7px; }
.amount-currency select { min-width:0; white-space:nowrap; }
.supplier-panel { margin-top:16px; }
.report-filters { flex-wrap:wrap; }
.report-filters select,.report-filters input { min-width:120px; padding:10px 11px; border:1px solid var(--line); color:var(--text); background:var(--panel-soft); }
.report-filters input[type=number] { width:110px; }
.order-filters { flex-wrap:wrap; }
.order-filters select,.order-filters input[type=month],.order-filters input[type=date] { min-width:130px; padding:10px 11px; border:1px solid var(--line); color:var(--text); background:var(--panel-soft); }
.date-filter-group { display:flex; align-items:stretch; gap:0; width:max-content; border:1px solid var(--line); background:var(--panel-soft); }
.date-filter-group:focus-within { border-color:rgba(100,216,206,.6); }
.date-filter-field { display:flex; align-items:center; gap:8px; min-width:0; padding:4px 10px; color:var(--muted); font-size:11px; white-space:nowrap; }
.date-filter-field > span { display:none; }
.date-filter-field input { min-width:108px; padding:5px 0; border:0 !important; background:transparent !important; }
.date-filter-field input:focus { outline:none; }
.date-filter-separator { display:grid; place-items:center; padding:0 2px; color:var(--muted); font-size:11px; }
.sort-button { display:inline-flex; align-items:center; gap:6px; padding:0; border:0; color:inherit; background:transparent; font:inherit; text-align:left; cursor:pointer; }
.sort-button:hover,.sort-button:focus-visible { color:var(--cyan); }
.sort-button:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
.sort-arrows { display:inline-flex; flex-direction:column; gap:0; color:rgba(180,210,210,.38); font-size:8px; line-height:7px; }
.sort-arrows.asc span:first-child,.sort-arrows.desc span:last-child { color:var(--cyan); }
.pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:12px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.pagination-count { margin-right:auto; }
.page-button { padding:6px 10px; border:1px solid var(--line); color:var(--text); background:transparent; font-size:11px; }
.page-button:hover:not(:disabled),.page-button:focus-visible { border-color:var(--cyan); color:var(--cyan); }
.page-button:disabled { opacity:.45; cursor:not-allowed; }
.page-number { min-width:48px; text-align:center; }
.report-order-link { min-width:32px; padding:3px 7px; border:1px solid rgba(100,216,206,.3); color:var(--cyan); background:rgba(100,216,206,.07); text-align:center; }
.report-order-link:hover,.report-order-link:focus-visible { border-color:var(--cyan); background:rgba(100,216,206,.15); }
.report-order-link:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.report-detail-summary { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; color:var(--muted); }
.report-detail-summary strong { color:var(--text); }
.detail-page-size { min-width:92px; padding:6px 8px; border:1px solid var(--line); color:var(--text); background:var(--panel-soft); }

/* 保留 number 的 min=0 原生校验，仅隐藏浏览器上下箭头，便于人工输入。 */
input[type=number] { appearance:textfield; -moz-appearance:textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
dialog { width:min(1180px,calc(100vw - 32px)); }
/* 深色表单和报表筛选栏中的日期控件使用浅色日历图标，避免与背景融为一体。 */
input[type=date],
input[type=month] { color-scheme:dark; cursor:pointer; }
input[type=date]::-webkit-calendar-picker-indicator,
input[type=month]::-webkit-calendar-picker-indicator { filter:brightness(0) invert(1); opacity:1; }
.auth-screen { min-height:100vh; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 20% 10%,rgba(100,216,206,.12),transparent 32%),#071215; }
.auth-screen[hidden] { display:none; }
.auth-panel { width:min(420px,100%); display:grid; gap:14px; padding:30px; border:1px solid var(--line); background:rgba(16,35,41,.9); box-shadow:var(--shadow); }
.auth-panel .brand-mark { margin-bottom:2px; }
.auth-panel h1 { margin:0; }
.auth-panel label { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.auth-panel input { padding:11px; border:1px solid var(--line); color:var(--text); background:rgba(5,17,21,.68); }
.auth-help { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.auth-error { margin:0; color:#ffb5b2; font-size:12px; }
body.auth-locked .shell { display:none; }
.user-actions { display:flex; gap:6px; align-items:center; }

/* 提升关键内容的字号，保证桌面端表格、导航和表单在长时间使用时清晰可读。 */
body { font-size:15px; }
.brand strong { font-size:15px; }
.brand span { font-size:12px; }
.nav-item span { font-size:15px; }
.nav-item small { font-size:12px; }
.eyebrow,.panel-kicker { font-size:11px; }
h1 { font-size:29px; }
h2 { font-size:23px; }
h3 { font-size:17px; }
.date-pill { font-size:13px; }
.table-wrap th { font-size:12px; }
.table-wrap td { font-size:13px; }
.metric-label { font-size:13px; }
.metric-value { font-size:29px; }
.metric-note { font-size:12px; }
.order-main strong { font-size:13px; }
.order-meta { font-size:12px; }
.tag { font-size:11px; }
.field label,.auth-panel label { font-size:12px; }
.field small { font-size:11px; }
.current-account { display:block; width:100%; overflow-wrap:anywhere; font-size:12px; }
.current-account small { color:var(--text); font-size:12px; }
.audit-details { max-width:320px; white-space:pre-wrap !important; overflow-wrap:anywhere; word-break:break-word; vertical-align:top; }
.audit-details code { white-space:inherit; color:#cce7e3; font-size:11px; }
.nav-item[hidden] { display:none !important; }
@media (max-width:680px) {
  h1 { font-size:25px; }
  h2 { font-size:21px; }
  .metric-value { font-size:23px; }
}
.date-filter-group { width:max-content; }
@media (max-width:680px) {
  .date-filter-group { width:100%; }
  .date-filter-field { flex:1; padding-inline:8px; }
  .order-filters .date-filter-field input { width:100%; min-width:0; }
}

/* 2026 enterprise refresh: light-first, data-led, and motion with purpose. */
:root {
  --bg:#f3f6f8;
  --panel:#ffffff;
  --panel-soft:#f8fafb;
  --line:#d9e2e7;
  --text:#152635;
  --muted:#657786;
  --cyan:#087f8c;
  --orange:#a95f2e;
  --red:#b54747;
  --shadow:0 10px 28px rgba(31,54,68,.08);
  --shadow-hover:0 14px 34px rgba(31,54,68,.13);
}

html { background:var(--bg); }
body {
  color:var(--text);
  background:linear-gradient(135deg,#f7f9fa 0%,var(--bg) 56%,#edf3f5 100%);
  font-family:"Aptos","Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;
  font-variant-numeric:tabular-nums;
}
button,input,textarea,select { color:var(--text); }
select { color-scheme:light; }
select option,select optgroup { color:var(--text); background:var(--panel); }
select option:checked { color:#fff; background:var(--cyan); }
.shell { grid-template-columns:224px minmax(0,1fr); }
.sidebar {
  padding:24px 14px 18px;
  border-right:1px solid var(--line);
  background:rgba(255,255,255,.88);
  box-shadow:8px 0 26px rgba(31,54,68,.05);
}
.brand { padding:0 10px 28px; }
.company-logo { padding:7px; border-radius:10px; background:#152d3b; }
.brand strong { color:var(--text); font-weight:700; }
.brand span,.nav-item,.sidebar-foot { color:var(--muted); }
.nav { gap:4px; }
.nav-item { border-radius:7px; }
.nav-item:hover,.nav-item.active { border-color:rgba(8,127,140,.2); color:var(--text); background:#eaf4f5; }
.nav-item.active span { color:var(--cyan); }
.status-dot { background:var(--cyan); box-shadow:0 0 10px rgba(8,127,140,.35); }
.main { width:100%; max-width:1600px; padding:30px clamp(24px,4vw,58px) 56px; }
.topbar { margin-bottom:34px; }
.eyebrow,.panel-kicker { color:var(--cyan); letter-spacing:1.45px; }
h1 { color:var(--text); font-weight:750; letter-spacing:-.02em; text-wrap:balance; }
h2,h3 { color:var(--text); font-weight:700; text-wrap:balance; }
.date-pill { border-color:var(--line); color:var(--muted); background:rgba(255,255,255,.68); }
.primary { border-color:var(--cyan); color:#fff; background:var(--cyan); box-shadow:0 4px 10px rgba(8,127,140,.18); transition:background .2s ease,box-shadow .2s ease,transform .2s ease; }
.primary:hover { background:#076a75; box-shadow:0 7px 15px rgba(8,127,140,.22); transform:translateY(-1px); }
.primary:active { transform:translateY(1px) scale(.985); }
.secondary { border-color:var(--line); color:var(--text); background:#fff; transition:border-color .2s ease,background .2s ease,transform .2s ease; }
.secondary:hover { border-color:rgba(8,127,140,.45); background:#f1f8f8; transform:translateY(-1px); }
.secondary:active { transform:translateY(1px) scale(.985); }
.ghost { color:var(--cyan); transition:color .2s ease,transform .2s ease; }
.ghost:hover { color:#075e68; transform:translateX(2px); }
.hero-line { margin-bottom:26px; padding:4px 0 24px; border-bottom-color:var(--line); }
.hero-line p { max-width:65ch; color:var(--muted); }
.hero-badge { border-left-color:var(--cyan); background:#eaf4f5; }
.hero-badge strong { color:var(--cyan); }
.metric-grid { gap:14px; }
.metric {
  position:relative;
  min-height:128px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--panel);
  box-shadow:var(--shadow);
  transition:box-shadow .25s ease,transform .25s ease,border-color .25s ease;
  animation:crm-enter .38s ease both;
}
.metric:nth-child(2) { animation-delay:.04s; }.metric:nth-child(3) { animation-delay:.08s; }.metric:nth-child(4) { animation-delay:.12s; }.metric:nth-child(5) { animation-delay:.16s; }
.metric::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--line); }
.metric.accent::before { background:var(--cyan); }.metric.warm::before { background:var(--orange); }.metric.risk::before { background:var(--red); }
.metric:hover { border-color:#c7d7dc; box-shadow:var(--shadow-hover); transform:translateY(-2px); }
.metric-label { color:var(--muted); font-weight:600; }.metric-value { color:var(--text); font-weight:750; }.metric.accent .metric-value { color:var(--cyan); }.metric.warm .metric-value { color:var(--orange); }.metric.risk .metric-value { color:var(--red); }
.panel { border:1px solid var(--line); border-radius:7px; background:var(--panel); box-shadow:var(--shadow); animation:crm-enter .42s ease both; }
.panel-head { padding:19px 20px 15px; }
.table-wrap th,.table-wrap td { border-top-color:#e6ecef; }
.table-wrap th { color:#6a7d88; font-weight:650; background:#fbfcfd; }
.table-wrap td { color:#253b49; }
.table-wrap tbody tr { transition:background .18s ease; }
.table-wrap tr:hover td { background:#f1f8f8; }
.positive { color:#087f8c !important; }.negative { color:#a95f2e !important; }
.tag { border-color:#b9d9dc; color:var(--cyan); background:#f1f8f8; border-radius:4px; }
.search,.report-filters select,.report-filters input,.order-filters select,.order-filters input[type=month],.order-filters input[type=date] { border-color:var(--line); color:var(--text); background:#fff; border-radius:5px; transition:border-color .2s ease,box-shadow .2s ease; }
.search:focus,input:focus,textarea:focus,select:focus { border-color:rgba(8,127,140,.65); box-shadow:0 0 0 3px rgba(8,127,140,.1); }
.date-filter-group { border-color:var(--line); background:#fff; border-radius:5px; overflow:hidden; }
.date-filter-group:focus-within { border-color:rgba(8,127,140,.65); box-shadow:0 0 0 3px rgba(8,127,140,.1); }
.date-filter-field input { color:var(--text); }
.date-filter-separator { color:#8799a2; }
.sort-button:hover,.sort-button:focus-visible { color:var(--cyan); }
.sort-arrows { color:#a9b9c0; }.sort-arrows.asc span:first-child,.sort-arrows.desc span:last-child { color:var(--cyan); }
.pagination { border-top-color:#e6ecef; }
.page-button { border-color:var(--line); color:var(--text); background:#fff; border-radius:4px; transition:border-color .2s ease,background .2s ease; }
.page-button:hover:not(:disabled),.page-button:focus-visible { border-color:var(--cyan); color:var(--cyan); background:#f1f8f8; }
.report-order-link { border-color:#b9d9dc; color:var(--cyan); background:#f1f8f8; border-radius:4px; transition:background .2s ease,transform .2s ease; }
.report-order-link:hover,.report-order-link:focus-visible { border-color:var(--cyan); background:#e4f2f3; transform:translateY(-1px); }
.modal-body,.modal-actions { background:#fff; }
dialog { border-color:#c8dade; border-radius:9px; background:#fff; box-shadow:0 24px 70px rgba(31,54,68,.22); animation:crm-dialog-in .24s ease both; }
.modal-head { border-bottom-color:#e2eaed; }.modal-actions { border-top-color:#e2eaed; }
.field label { color:#627783; font-weight:600; }.field input,.field textarea,.field select { border-color:var(--line); background:#fbfcfd; }
.finance-section { border-color:#c7e0e2; background:#f4fafb; }
.finance-preview { color:#687c86; }.finance-preview strong { color:var(--text); }
.order-context { border-color:#c7e0e2; color:#687c86; background:#f4fafb; }.order-context strong { color:var(--cyan); }
.check-option { border-color:var(--line); background:#fbfcfd; }.check-option:hover { border-color:#9fcacc; background:#f1f8f8; }.check-option:has(input:checked) { border-color:#8ec4c7; background:#edf8f8; }.check-option span { color:var(--text); }
input[type=date]::-webkit-calendar-picker-indicator,input[type=month]::-webkit-calendar-picker-indicator { filter:none; opacity:.65; }
.table-action { border-color:#b9d9dc; color:var(--cyan); background:#f1f8f8; border-radius:4px; transition:background .2s ease,border-color .2s ease,transform .2s ease; }
.table-action:hover { border-color:var(--cyan); background:#e4f2f3; transform:translateY(-1px); }

@keyframes crm-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes crm-dialog-in { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
}

/* 订单弹窗保持标题和操作区可见，长表单只在内容区滚动。 */
.metric-link:hover { color:var(--text); background:#e7f3f4; }
.metric-link:hover .metric-label,.metric-link:hover .metric-note { color:#4f6570; }
.metric-link:hover .metric-value { color:var(--text); }
.metric-link:hover.accent .metric-value { color:var(--cyan); }
.metric-link:hover.warm .metric-value { color:var(--orange); }
.metric-link:hover.risk .metric-value { color:var(--red); }
dialog#modal { max-height:calc(100dvh - 24px); overflow:hidden; }
dialog#modal > form { display:flex; flex-direction:column; max-height:calc(100dvh - 24px); }
dialog#modal .modal-head { position:sticky; top:0; z-index:3; flex:0 0 auto; background:var(--panel); }
dialog#modal #modalBody { min-height:0; overflow:auto; }
dialog#modal .modal-actions { position:sticky; bottom:0; z-index:3; flex:0 0 auto; background:var(--panel); }
dialog#modal .modal-body { padding:16px 20px; }
.order-form { gap:10px 12px; }
.order-form .order-note-field textarea { min-height:54px; }
.order-form .order-items-section { gap:6px; }
.order-form .finance-section { padding:10px; gap:7px; }
.order-form .finance-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px 9px; }
.order-form .order-items-table th,.order-form .order-items-table td { padding:6px; }
.order-form .order-items-table input,.order-form .order-items-table select { padding:6px; }
.section-toolbar > .toolbar-actions { margin-left:auto; }
@media (max-width:760px) {
  .order-form .finance-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* 订单弹窗紧凑布局：基础信息两行，收支字段在桌面端各占一行。 */
.order-meta-grid {
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px 12px;
}
.order-meta-grid .field { min-width:0; }
.order-form .income-group .finance-grid {
  grid-template-columns:minmax(0,1.25fr) repeat(4,minmax(0,1fr));
  align-items:end;
}
.order-form .expense-group .finance-grid {
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:end;
}
.order-form .tax-options {
  grid-column:auto;
  display:flex;
  align-items:center;
  gap:16px;
  min-height:42px;
}
.order-form .check-option {
  flex:0 0 auto;
  min-height:0;
  padding:0;
  border:0;
  color:var(--text) !important;
  background:transparent;
}
.order-form .check-option:hover,
.order-form .check-option:has(input:checked) {
  border-color:transparent;
  background:transparent;
}
.order-form .check-option span { font-size:12px; font-weight:650; }
.order-items-table th {
  color:#254653;
  background:#e5eff1;
  border-bottom:2px solid #9bb9bf;
  font-weight:750;
}
.order-items-table .line-remove {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:2px;
  padding:6px 10px;
  border:1px solid rgba(181,71,71,.42);
  border-radius:4px;
  color:#a33f3f;
  background:#fff3f2;
  font-size:12px;
  font-weight:700;
  transition:color .2s ease,background .2s ease,border-color .2s ease,transform .2s ease;
}
.order-items-table .line-remove:hover,
.order-items-table .line-remove:focus-visible {
  border-color:#b54747;
  color:#fff;
  background:#b54747;
  transform:translateY(-1px);
}

/* 独立绘制下拉箭头，避免背景图片在深色原生控件中失效。 */
.select-control {
  position:relative;
  display:inline-block;
  min-width:0;
  vertical-align:top;
}
.select-control::after {
  content:"";
  position:absolute;
  top:50%;
  right:16px;
  width:8px;
  height:8px;
  border-right:2px solid #516470;
  border-bottom:2px solid #516470;
  transform:translateY(-65%) rotate(45deg);
  pointer-events:none;
  z-index:1;
}
.select-control > select {
  display:block;
  width:100%;
  min-width:0;
  appearance:none;
  -webkit-appearance:none;
  padding-right:38px !important;
  background-image:none !important;
}
.select-control:has(> select.inline-order-status) { width:96px; }
.select-control > select.inline-order-status { min-width:96px; padding-right:30px !important; }
.field > .select-control,
.order-items-table .select-control,
.amount-currency .select-control { display:block; width:100%; }
.select-control:has(> select[hidden]) { display:none; }

@media (max-width:760px) {
  .order-meta-grid { grid-template-columns:1fr; }
  .order-form .income-group .finance-grid,
  .order-form .expense-group .finance-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .order-form .tax-options { grid-column:1/-1; }
}
