:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --muted: #8e8e93;
  --line: #e5e5ea;
  --canvas: #f5f5f7;
  --card: #ffffff;
  --navy: #1d1d1f;
  --navy-2: #2c2c2e;
  --teal: #0071e3;
  --teal-dark: #005bb5;
  --teal-soft: #e8f2ff;
  --amber: #ff9f0a;
  --amber-soft: #fff4db;
  --coral: #ff3b30;
  --coral-soft: #fff0ef;
  --blue: #5e5ce6;
  --blue-soft: #efefff;
  --violet: #af52de;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .035);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell.auth-hidden, .login-screen.auth-hidden { display: none; }
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, rgba(24,169,154,.13), transparent 32%), linear-gradient(135deg, #f6fbfb 0%, #f5f8fc 54%, #eef4f8 100%); }
.login-card { width: min(410px, 100%); padding: 30px; border: 1px solid rgba(229,234,240,.9); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 22px 65px rgba(26,53,83,.12); }
.login-brand { display: flex; align-items: center; gap: 11px; }
.login-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: var(--teal); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 7px 16px rgba(24,169,154,.24); }
.login-brand strong { display: block; color: var(--ink); font-size: 16px; }
.login-brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.login-heading { margin-top: 34px; }
.login-heading h1 { font-size: 24px; }
.login-heading p { color: var(--ink-soft); font-size: 11px; margin-top: 7px; }
.login-form { margin-top: 22px; }
.login-form .form-field + .form-field { margin-top: 14px; }
.login-button { width: 100%; margin-top: 20px; }
.login-error { min-height: 18px; color: var(--coral); font-size: 10px; text-align: center; margin-top: 10px; }
.login-hint { padding-top: 14px; border-top: 1px solid #eff2f5; color: var(--muted); font-size: 10px; text-align: center; }
.login-signature { color: var(--teal-dark); font-family: 'DM Mono', monospace; font-size: 9px; text-align: center; margin-top: 10px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 246px; background: var(--navy); color: #d7e1ec; padding: 24px 14px 16px; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 10px 26px; }
.brand-mark { width: 34px; height: 34px; background: var(--teal); color: #fff; border-radius: 10px; display: grid; place-items: center; font-size: 20px; font-weight: 800; box-shadow: 0 5px 12px rgba(24, 169, 154, .28); }
.brand-name { font-size: 18px; letter-spacing: .04em; color: #fff; font-weight: 800; line-height: 1.1; }
.brand-subtitle { font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .17em; color: #8ba1b6; margin-top: 4px; }
.workspace-switcher { margin: 0 1px 25px; padding: 10px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.045); display: flex; align-items: center; gap: 9px; }
.workspace-avatar { width: 26px; height: 26px; background: #d9f3ef; color: var(--teal-dark); border-radius: 7px; display: grid; place-items: center; font-weight: 800; }
.workspace-copy, .user-copy { display: flex; flex-direction: column; min-width: 0; }
.workspace-copy span { font-size: 12px; color: #edf5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-selector { width: 100%; min-width: 0; border: 0; padding: 0; outline: 0; background: transparent; color: #edf5f9; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.team-selector option { color: var(--ink); background: #fff; }
.team-selector:disabled { opacity: .9; cursor: not-allowed; }
.workspace-copy small, .user-copy small { color: #8298ad; font-size: 10px; margin-top: 2px; }
.chevron { color: #8ea2b5; margin-left: auto; font-size: 15px; }
.nav-label { color: #70889f; font-size: 10px; letter-spacing: .12em; font-weight: 700; padding: 0 12px 8px; text-transform: uppercase; }
.nav-label-spaced { margin-top: 25px; }
.primary-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { color: #aebfd0; border: 0; background: transparent; border-radius: 9px; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 12px; text-align: left; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { background: var(--teal); color: #fff; box-shadow: 0 5px 12px rgba(24,169,154,.18); }
.nav-icon { width: 14px; font-size: 18px; line-height: 1; text-align: center; opacity: .9; }
.nav-count { margin-left: auto; color: #68829a; font-family: 'DM Mono', monospace; font-size: 9px; }
.nav-item.active .nav-count { color: #b7eee8; }
.nav-badge { margin-left: auto; border-radius: 20px; background: var(--coral); color: #fff; min-width: 20px; height: 19px; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.sidebar-footer { margin-top: auto; }
.app-signature { color: #7790a5; font-family: 'DM Mono', monospace; font-size: 9px; padding: 0 10px 9px; }
.sync-status { padding: 0 10px 15px; color: #7890a5; font-size: 10px; display: flex; gap: 7px; align-items: center; }
.sync-status[data-state="syncing"] { color: #a66b17; }
.sync-status[data-state="synced"] { color: #397a62; }
.sync-status[data-state="error"] { color: #b55252; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #51d0b8; box-shadow: 0 0 0 3px rgba(81,208,184,.13); }
.user-card { border-top: 1px solid rgba(255,255,255,.09); padding: 16px 8px 0; display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #d1eeea; color: #147f77; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.user-avatar.small { width: 25px; height: 25px; font-size: 11px; }
.user-copy strong { color: #ecf3f7; font-size: 12px; font-weight: 600; }
.more { margin-left: auto; color: #8599ab; font-size: 14px; letter-spacing: 2px; }

.main-content { flex: 1; min-width: 0; }
.topbar { height: 73px; background: rgba(255,255,255,.84); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 38px; }
.breadcrumbs { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-weight: 700; }
.breadcrumb-divider { color: #c5ced8; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.data-tools-button { flex-shrink: 0; }
.search-box { height: 36px; width: 275px; border: 1px solid #e0e6ed; border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 7px; color: #9aabba; padding: 0 10px; }
.search-box input { border: 0; outline: 0; width: 100%; color: var(--ink); background: transparent; font-size: 12px; }
.search-box kbd { white-space: nowrap; border: 1px solid #dfe5ea; border-radius: 4px; padding: 1px 4px; color: #9aa8b5; font-size: 9px; background: #fbfcfd; }
.icon-button { width: 34px; height: 34px; border: 1px solid #e5eaf0; border-radius: 8px; color: var(--ink-soft); background: #fff; font-size: 19px; position: relative; }
.notification-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); top: 7px; right: 7px; }
.profile-pill { border: 0; background: transparent; color: var(--ink-soft); display: flex; gap: 8px; align-items: center; padding: 2px 0; font-size: 12px; }
.profile-pill .chevron { font-size: 10px; color: var(--muted); margin-left: 1px; }
.logout-button { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-soft); padding: 4px 7px; font-size: 10px; }
.logout-button:hover { border-color: #b9c8d4; color: var(--ink); }
.notification-wrap { position: relative; }
.notification-panel { position: absolute; z-index: 10; top: 43px; right: 0; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(18, 42, 65, .16); overflow: hidden; }
.notification-panel.hidden { display: none; }
.notification-header { padding: 14px 16px 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.notification-header strong { font-size: 13px; }
.notification-header span { color: var(--muted); font-size: 10px; }
.notification-close { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 0 2px 8px; }
.notification-close:hover { color: var(--ink); }
.notification-item { border: 0; background: #fff; width: 100%; padding: 12px 16px; display: flex; gap: 9px; text-align: left; align-items: flex-start; border-bottom: 1px solid #eff2f5; }
.notification-item:hover { background: #f9fbfc; }
.notification-item:last-child { border-bottom: 0; }
.notification-item .notification-icon { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; color: var(--coral); background: var(--coral-soft); font-weight: 800; }
.notification-item .notification-icon.blue { color: var(--blue); background: var(--blue-soft); }
.notification-item strong { display: block; color: var(--ink); font-size: 11px; }
.notification-item p { color: var(--muted); font-size: 10px; line-height: 1.45; margin-top: 3px; }
.notification-empty { padding: 25px 16px; color: var(--muted); text-align: center; font-size: 11px; }

.page-content { padding: 32px 38px 48px; max-width: 1600px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.eyebrow { color: var(--teal-dark); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; margin-bottom: 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; letter-spacing: -.03em; line-height: 1.22; }
h2 { font-size: 17px; letter-spacing: -.02em; }
h3 { font-size: 14px; }
.subtitle { color: var(--ink-soft); font-size: 12px; margin-top: 8px; }
.button { border: 0; border-radius: 8px; height: 38px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; padding: 0 15px; font-size: 12px; font-weight: 700; transition: .18s ease; }
.button.primary { color: #fff; background: var(--teal); box-shadow: 0 5px 14px rgba(24,169,154,.19); }
.button.primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.button.secondary { background: #fff; color: var(--ink-soft); border: 1px solid var(--line); }
.button.secondary:hover { border-color: #b9c8d4; }
.button.ghost { color: var(--teal-dark); background: var(--teal-soft); }
.button.danger { color: var(--coral); background: var(--coral-soft); }
.button.small { height: 31px; padding: 0 10px; font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px 15px; min-height: 126px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; width: 74px; height: 74px; border-radius: 50%; background: var(--teal-soft); right: -27px; top: -30px; opacity: .7; }
.metric-card.alert::after { background: var(--coral-soft); }
.metric-card.blue::after { background: var(--blue-soft); }
.metric-card.amber::after { background: var(--amber-soft); }
.metric-label { font-size: 11px; color: var(--ink-soft); position: relative; z-index: 1; }
.metric-value { margin-top: 9px; font-size: 27px; letter-spacing: -.045em; font-weight: 700; position: relative; z-index: 1; }
.metric-unit { font-size: 12px; color: var(--ink-soft); margin-left: 2px; font-weight: 500; }
.metric-footer { display: flex; align-items: center; gap: 7px; margin-top: 11px; position: relative; z-index: 1; }
.volume-metric-values { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; position: relative; z-index: 1; }
.volume-metric-item { min-width: 0; }
.volume-metric-item > div { display: flex; align-items: baseline; gap: 3px; }
.volume-metric-item strong { font-family: 'DM Mono', monospace; font-size: 23px; letter-spacing: -.04em; color: var(--ink); }
.volume-metric-item span { color: var(--ink-soft); font-size: 10px; }
.volume-metric-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.volume-metric-footer { margin-top: 8px; flex-wrap: wrap; gap: 5px 8px; }
.volume-metric-footer .trend { font-size: 9px; }
.volume-metric-footer .metric-note { font-size: 9px; }
.trend { font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500; }
.trend.up { color: var(--teal-dark); }
.trend.down { color: var(--coral); }
.trend.neutral { color: var(--muted); }
.metric-note { color: var(--muted); font-size: 10px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr); gap: 14px; margin-bottom: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { padding: 18px 20px 13px; display: flex; align-items: flex-start; justify-content: space-between; }
.panel-header.compact { padding-bottom: 12px; }
.panel-header p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.monthly-metrics-header { gap: 14px; }
.analysis-range-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.analysis-range-controls label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.analysis-range-controls .select-control { min-width: 92px; height: 30px; font-size: 10px; }
.text-link { border: 0; background: transparent; color: var(--teal-dark); font-size: 11px; padding: 4px 0; }
.period-select { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 6px; padding: 5px 8px; font-size: 11px; outline: 0; }

.chart-panel { min-height: 326px; }
.chart-area { padding: 9px 18px 17px; }
.chart-wrap { height: 220px; display: block; }
.chart-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.chart-grid-line { stroke: #edf1f4; stroke-width: 1; }
.chart-axis-label { fill: #9aa8b5; font-family: 'DM Mono', monospace; font-size: 10px; }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.secondary { stroke: #8ca6f0; stroke-dasharray: 5 5; stroke-width: 2; opacity: .9; }
.chart-point { fill: #fff; stroke: var(--teal); stroke-width: 2.5; }
.chart-point.secondary { stroke: #8ca6f0; stroke-width: 2; }
.chart-value-label { fill: var(--teal-dark); font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500; }
.chart-x { display: flex; justify-content: space-between; color: #9aa8b5; font-family: 'DM Mono', monospace; font-size: 9px; margin-left: 7.3%; margin-right: 1.6%; padding-top: 5px; }
.legend { display: flex; gap: 15px; margin-left: auto; margin-right: 18px; margin-top: -18px; position: relative; z-index: 2; justify-content: flex-end; color: var(--muted); font-size: 10px; }
.legend-item { display: flex; gap: 5px; align-items: center; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.legend-dot.blue { background: #8ca6f0; }

.action-panel { min-height: 288px; }
.action-list { padding: 0 20px 12px; }
.action-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid #eff2f5; }
.action-marker { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.action-marker.coral { color: var(--coral); background: var(--coral-soft); }
.action-marker.amber { color: #bd7e14; background: var(--amber-soft); }
.action-marker.blue { color: var(--blue); background: var(--blue-soft); }
.action-copy { min-width: 0; flex: 1; }
.action-copy strong { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-time { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--coral); white-space: nowrap; }

.table-panel { overflow-x: auto; overflow-y: hidden; scrollbar-gutter: stable; }
.customer-table-panel { overflow-x: auto; overflow-y: hidden; scrollbar-gutter: stable; }
.customer-table { min-width: 1380px; }
.detail-grid .table-panel { overflow-x: auto; }
.table-toolbar { padding: 0 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter-pills { display: flex; gap: 5px; }
.filter-pill { border: 0; border-radius: 20px; padding: 6px 10px; color: var(--muted); background: transparent; font-size: 10px; }
.filter-pill.active { color: var(--teal-dark); background: var(--teal-soft); font-weight: 700; }
.mini-search { border: 1px solid var(--line); border-radius: 6px; height: 29px; padding: 0 9px; width: 175px; outline: 0; font-size: 11px; color: var(--ink); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #fafbfc; padding: 10px 20px; color: #8998a8; font-size: 9px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
.data-table td { padding: 13px 20px; border-top: 1px solid #eff2f5; font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.data-table tr.clickable { cursor: pointer; transition: .14s ease; }
.data-table tr.clickable:hover { background: #fbfdfd; }
.data-table td:first-child { color: var(--ink); font-weight: 600; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.order-table-panel { overflow-x: auto; overflow-y: hidden; scrollbar-gutter: stable; }
.order-data-table { min-width: 1800px; table-layout: fixed; }
.order-bulk-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.order-selectable-table { min-width: 1920px; }
.order-selectable-table .ledger-col-select { width: 42px; }
.order-selectable-table .ledger-col-action { width: 76px; }
.order-select-checkbox { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); cursor: pointer; vertical-align: middle; }
.ledger-select-cell, .ledger-action-cell { text-align: center; }
.ledger-action-cell .button { white-space: nowrap; }
.order-data-table th, .order-data-table td { padding-left: 10px; padding-right: 10px; }
.order-data-table th { padding-top: 8px; padding-bottom: 8px; }
.order-data-table td { padding-top: 9px; padding-bottom: 9px; vertical-align: middle; }
.order-data-table .ledger-col-order { width: 250px; }
.order-data-table .ledger-col-route { width: 255px; }
.order-data-table .ledger-col-cargo { width: 335px; }
.order-data-table .ledger-col-money { width: 300px; }
.order-data-table .ledger-col-stage { width: 190px; }
.order-data-table .ledger-col-payment { width: 280px; }
.order-data-table .ledger-col-operator { width: 95px; }
.order-data-table .ledger-col-note { width: 90px; }
.ledger-order-cell, .ledger-route-cell, .ledger-cargo-cell, .ledger-money-cell, .ledger-stage-cell, .ledger-payment-cell, .ledger-operator-cell, .ledger-note-cell { overflow: hidden; }
.ledger-order-id { display: block; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 10px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.order-data-table .order-id-input { flex: 0 0 112px; width: 112px; max-width: 112px; font-family: 'DM Mono', monospace; font-size: 10px; }
.ledger-customer-cell { margin-top: 5px; }
.ledger-order-inline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ledger-order-inline .ledger-order-id { flex: 0 0 112px; max-width: 112px; }
.ledger-customer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 10px; }
.order-data-table .customer-edit-select { width: 118px; max-width: 118px; }
.order-data-table .route-edit { min-width: 0; }
.order-data-table .route-edit { gap: 3px; flex-wrap: nowrap; }
.order-data-table .route-port-input { width: 57px; padding-left: 5px; padding-right: 5px; }
.order-data-table .port-autocomplete { flex: 0 0 57px; width: 57px; }
.order-data-table .inline-date-input { width: 96px; height: 25px; padding-left: 5px; padding-right: 5px; }
.route-etd { display: inline-flex; align-items: center; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; }
.order-data-table .cargo-input { width: 101px; margin-bottom: 0; }
.order-data-table .cargo-type-select { width: 78px; }
.ledger-cargo-edit { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; }
.ledger-volume-edit, .ledger-volume-text { display: inline-flex; align-items: center; margin-top: 0; }
.ledger-cargo-display { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.ledger-cargo-display > span:first-child { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.order-data-table .tag { padding: 3px 6px; font-size: 9px; }
.ledger-volume-text { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; }
.order-data-table .financial-edit { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 3px; }
.order-data-table .financial-edit label { flex-direction: row; align-items: center; gap: 2px; white-space: nowrap; }
.order-data-table .financial-edit .inline-number-input { width: 56px; }
.ledger-profit { display: inline-block; width: auto; margin-top: 0; white-space: nowrap; font-size: 9px !important; }
.ledger-stage-cell { display: flex; flex-direction: row; align-items: center; gap: 4px; flex-wrap: nowrap; }
.order-data-table .stage-select { max-width: 108px; }
.order-data-table .payment-control-compact { gap: 4px; }
.order-data-table .payment-control-compact { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 4px 6px; }
.order-data-table .payment-control-compact .payment-summary { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.order-data-table .payment-control-compact .payment-edit-row { gap: 4px; flex-wrap: nowrap; }
.order-data-table .payment-control-compact .payment-edit-row { min-width: 0; gap: 3px; }
.order-data-table .payment-select { width: 94px; max-width: 94px; }
.order-data-table .received-amount input { width: 56px; }
.order-data-table .operator-input { width: 80px; padding-left: 6px; padding-right: 6px; }
.order-data-table .note-input { flex: 1 1 auto; width: 1px; min-width: 0; }
.ledger-note-cell { position: relative; }
.ledger-note-wrap { display: flex; align-items: center; gap: 4px; min-width: 0; width: 100%; }
.ledger-note-preview { display: block; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 10px; }
.note-toggle-button { flex: 0 0 auto; height: 24px; padding: 0 5px; border: 1px solid rgba(120, 139, 158, .24); border-radius: 5px; color: var(--ink-soft); background: rgba(248, 251, 254, .82); font-size: 9px; line-height: 1; cursor: pointer; }
.note-toggle-button:hover, .note-toggle-button:focus-visible { color: var(--teal-dark); border-color: rgba(24, 169, 154, .42); background: var(--teal-soft); outline: 0; }
.ledger-note-cell.is-note-expanded { overflow: visible; z-index: 30; }
.ledger-note-cell.is-note-expanded .ledger-note-wrap { position: absolute; right: 6px; top: 50%; width: 360px; max-width: min(360px, calc(100vw - 36px)); min-height: 36px; padding: 6px; transform: translateY(-50%); border: 1px solid rgba(120, 139, 158, .28); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(29, 48, 68, .18); z-index: 31; }
.ledger-note-cell.is-note-expanded .note-input { width: auto; min-width: 0; height: 28px; }
.ledger-note-cell.is-note-expanded .ledger-note-preview { max-width: none; overflow: visible; white-space: normal; line-height: 1.45; }
.inline-edit-input, .inline-edit-select, .inline-date-input, .inline-number-input { border: 1px solid #dfe6ed; border-radius: 6px; outline: 0; color: var(--ink); background: #fff; font-size: 10px; }
.inline-edit-input, .inline-date-input, .inline-number-input { height: 28px; padding: 0 7px; }
.inline-edit-select { min-height: 28px; padding: 4px 5px; }
.inline-edit-input:focus, .inline-edit-select:focus, .inline-date-input:focus, .inline-number-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.route-edit, .quantity-edit, .financial-edit { display: flex; align-items: center; gap: 5px; }
.route-edit { min-width: 178px; }
.route-port-input { width: 76px; }
.inline-date-input { width: 122px; font-family: 'DM Mono', monospace; font-size: 9px; }
.quantity-edit { min-width: 145px; }
.inline-number-input { width: 72px; font-family: 'DM Mono', monospace; }
.quantity-edit > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.container-type-select { width: 76px; }
.cargo-input { width: 112px; display: block; margin-bottom: 5px; }
.cargo-type-select { width: 90px; }
.customer-edit-select { width: 126px; }
.financial-edit { flex-direction: column; align-items: flex-start; gap: 4px; }
.financial-edit label { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.financial-edit .inline-number-input { width: 88px; }
.financial-edit .positive { font-size: 9px; }
.note-input { width: 120px; }
.order-id { font-family: 'DM Mono', monospace; font-size: 10px; color: #8494a5; display: block; margin-top: 3px; font-weight: 400; }
.route-cell { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.route-arrow { color: var(--teal); }
.tag { border-radius: 5px; padding: 4px 7px; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; }
.tag.general { color: #536b82; background: #eef3f7; }
.tag.chemical { color: #8c6b18; background: #fff6d8; }
.tag.bulk { color: #6f5a9e; background: #f1edff; }
.tag.dangerous { color: #b35a48; background: #fff0e8; }
.tag.success { color: var(--teal-dark); background: var(--teal-soft); }
.tag.warning { color: #a96f12; background: var(--amber-soft); }
.tag.alert { color: var(--coral); background: var(--coral-soft); }
.tag.blue { color: #5470c5; background: var(--blue-soft); }
.stage-select { border: 1px solid transparent; background: transparent; color: var(--ink-soft); border-radius: 5px; padding: 4px 4px; font-size: 10px; outline: 0; }
.stage-select:hover, .stage-select:focus { border-color: var(--line); background: #fff; }
.operator-input { width: 86px; height: 29px; border: 1px solid #dfe6ed; border-radius: 6px; outline: 0; padding: 0 8px; color: var(--ink); background: #fff; font-size: 10px; }
.operator-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.payment-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.payment-summary { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.payment-balance { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; }
.payment-control { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.payment-edit-row { display: flex; align-items: center; gap: 5px; }
.payment-select { max-width: 132px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-soft); padding: 4px 5px; font-size: 10px; outline: 0; }
.payment-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.payment-select.payment-status-alert { color: var(--coral); background: var(--coral-soft); border-color: #f2c9c0; font-weight: 700; }
.payment-select.payment-status-warning { color: #a96f12; background: var(--amber-soft); border-color: #efd79f; font-weight: 700; }
.payment-select.payment-status-success { color: var(--teal-dark); background: var(--teal-soft); border-color: #bfe7dd; font-weight: 700; }
.payment-control-compact { gap: 5px; }
.payment-control-compact .payment-select { max-width: 118px; }
.unpaid-amount { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.unpaid-amount input { width: 76px; height: 26px; border: 1px solid #dfe6ed; border-radius: 6px; padding: 0 7px; color: var(--ink); background: #fff; font-family: 'DM Mono', monospace; font-size: 9px; outline: 0; }
.unpaid-amount input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.payment-control-compact .unpaid-amount input { width: 64px; }
.order-data-table .payment-control-compact .payment-select { width: 94px; max-width: 94px; }
.money { font-family: 'DM Mono', monospace; color: var(--ink) !important; font-size: 10px !important; }
.positive { color: var(--teal-dark) !important; font-family: 'DM Mono', monospace; font-size: 10px !important; }
.negative { color: var(--coral) !important; font-family: 'DM Mono', monospace; font-size: 10px !important; }
.empty-state { padding: 32px; text-align: center; color: var(--muted); font-size: 12px; }

/* Customer detail: orders get the full width; insights sit in one clean lower band. */
.customer-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.customer-orders-panel { width: 100%; min-width: 0; }
.customer-detail-lower { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(420px, 1.35fr); gap: 14px; align-items: stretch; }
.customer-detail-lower > .panel, .customer-detail-trend-panel { min-width: 0; }
.customer-detail-lower > .panel { height: 100%; }
.customer-detail-trend-panel > .chart-panel { height: 100%; min-height: 0; }
.customer-detail-lower .panel-header { min-height: 70px; }
.customer-detail-lower .insight-list { padding-bottom: 18px; }
.customer-value-meta { padding: 0 20px 18px; color: var(--muted); font-size: 10px; }
.order-data-table .payment-control-compact { display: flex; }

@media (max-width: 1180px) {
  .customer-detail-lower { grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.2fr); }
  .customer-detail-trend-panel { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .customer-detail-lower { grid-template-columns: 1fr; }
  .customer-detail-trend-panel { grid-column: auto; }
}

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 14px; margin-top: 14px; }
.customer-row { display: grid; grid-template-columns: 1.5fr .6fr .65fr .7fr .6fr; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid #eff2f5; }
.customer-row > div { min-width: 0; }
.customer-name { color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-meta { color: var(--muted); font-size: 10px; margin-top: 3px; }
.customer-row .label { color: var(--muted); font-size: 9px; display: block; margin-bottom: 3px; }
.value-grade { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.value-grade.b { background: var(--blue-soft); color: var(--blue); }
.value-grade.c { background: var(--amber-soft); color: #a87318; }

.page-heading .heading-actions { display: flex; gap: 8px; align-items: center; }
.segmented { display: flex; padding: 3px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.segmented button { border: 0; border-radius: 6px; padding: 7px 12px; background: transparent; color: var(--muted); font-size: 11px; }
.segmented button.active { background: var(--navy); color: #fff; }
.full-width { width: 100%; }
.list-summary { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.list-summary strong { color: var(--ink); }
.list-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 15px; border-top: 1px solid #eff2f5; color: var(--muted); font-size: 10px; }
.pagination-actions { display: flex; gap: 6px; }
.pagination-actions .button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.inline-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.select-control { border: 1px solid var(--line); border-radius: 7px; height: 32px; padding: 0 9px; color: var(--ink-soft); background: #fff; font-size: 11px; outline: 0; }
.inline-source-select { max-width: 108px; border: 1px solid transparent; border-radius: 5px; padding: 4px 5px; color: var(--ink-soft); background: transparent; font-size: 10px; outline: 0; }
.inline-source-select:hover, .inline-source-select:focus { border-color: var(--line); background: #fff; }
.inline-service-owner-input { width: 86px; height: 28px; border: 1px solid transparent; border-radius: 5px; padding: 0 6px; color: var(--ink-soft); background: transparent; font-size: 10px; outline: 0; }
.inline-service-owner-input:hover, .inline-service-owner-input:focus { border-color: var(--line); background: #fff; }
.inline-operator-input { width: 86px; height: 28px; border: 1px solid transparent; border-radius: 5px; padding: 0 6px; color: var(--ink-soft); background: transparent; font-size: 10px; outline: 0; }
.inline-operator-input:hover, .inline-operator-input:focus { border-color: var(--line); background: #fff; }
.order-month-select { min-width: 118px; }

.customer-hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.back-button { border: 0; color: var(--muted); background: transparent; padding: 0 0 12px; font-size: 11px; }
.customer-title-row { display: flex; align-items: center; gap: 10px; }
.customer-title-row h1 { font-size: 24px; }
.customer-badge { border-radius: 20px; padding: 5px 8px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; font-weight: 700; }
.customer-badge.quote { color: var(--blue); background: var(--blue-soft); }
.customer-owners { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.owner-item { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.owner-item span { color: var(--muted); font-size: 10px; }
.owner-item strong { color: var(--ink); font-size: 10px; font-weight: 700; }
.owner-edit-item { margin: 0; }
.owner-input { width: 88px; height: 29px; border: 1px solid #dfe6ed; border-radius: 6px; outline: 0; padding: 0 8px; color: var(--ink); background: #fff; font-size: 11px; }
.owner-select { width: 105px; height: 29px; border: 1px solid #dfe6ed; border-radius: 6px; outline: 0; padding: 0 6px; color: var(--ink); background: #fff; font-size: 11px; }
.owner-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.owner-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.owner-readonly small { color: var(--muted); font-size: 9px; }
.customer-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; min-width: 500px; }
.customer-stat { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; }
.customer-stat span { color: var(--muted); font-size: 10px; display: block; }
.customer-stat strong { font-family: 'DM Mono', monospace; font-size: 16px; display: block; margin-top: 6px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 14px; }
.panel-header-actions { display: flex; align-items: center; gap: 7px; }
.insight-box { margin: 0 20px 20px; padding: 14px; background: #f5fbfa; border-radius: 9px; border: 1px solid #daf1ee; }
.insight-box .insight-title { color: var(--teal-dark); font-size: 11px; font-weight: 700; display: flex; gap: 7px; align-items: center; }
.insight-box p { color: var(--ink-soft); font-size: 11px; line-height: 1.7; margin-top: 6px; }
.insight-box strong { color: var(--ink); }
.mini-bars { padding: 7px 20px 23px; }
.bar-row { display: grid; grid-template-columns: 50px 1fr 57px; align-items: center; gap: 9px; margin-top: 12px; }
.bar-row:first-child { margin-top: 0; }
.bar-row span { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); }
.bar-track { height: 7px; background: #edf3f4; border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--teal); border-radius: 10px; }
.bar-row strong { font-family: 'DM Mono', monospace; font-size: 9px; text-align: right; color: var(--ink-soft); }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 14px; margin-bottom: 14px; }
.analysis-chart { min-height: 330px; }
.analysis-chart .chart-wrap { height: 250px; }
.insight-list { padding: 0 20px 17px; }
.insight-list-item { padding: 12px 0; border-top: 1px solid #eff2f5; display: flex; gap: 10px; }
.insight-icon { width: 26px; height: 26px; display: grid; place-items: center; background: var(--blue-soft); border-radius: 7px; color: var(--blue); flex-shrink: 0; }
.insight-list-item strong { font-size: 11px; display: block; }
.insight-list-item p { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.analysis-table td, .analysis-table th { padding-left: 17px; padding-right: 17px; }
.analysis-range-scroll { overflow-x: auto; }
.monthly-key-metrics-table { min-width: 780px; }
.monthly-key-metrics-table th, .monthly-key-metrics-table td { min-width: 96px; }
.monthly-key-metrics-table th:first-child, .monthly-key-metrics-table td:first-child { min-width: 100px; }
.range-trend-label { color: var(--muted); font-size: 10px; }
.half-year-summary-panel { margin-top: 14px; }
.half-year-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0 20px 20px; }
.half-year-summary-item { min-width: 0; padding: 12px 13px; border: 1px solid #edf1f4; border-radius: 9px; background: #fbfcfd; }
.half-year-summary-item span, .half-year-summary-item small { display: block; color: var(--muted); font-size: 10px; }
.half-year-summary-item strong { display: block; margin-top: 8px; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.half-year-summary-item strong.negative { color: var(--coral); }
.half-year-summary-item strong.positive { color: var(--teal-dark); }
.half-year-summary-item small { margin-top: 7px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta-cell { display: flex; align-items: center; gap: 5px; }
.route-analysis-panel { margin-top: 14px; }
.route-analysis-table td, .route-analysis-table th { padding-left: 17px; padding-right: 17px; }
.route-line-name { color: var(--ink); font-size: 12px; font-weight: 800; }
.route-line-link { display: inline-flex; padding: 0; border: 0; background: transparent; color: var(--teal-dark); font: inherit; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.route-line-link:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.route-analysis-table .order-id { max-width: 275px; overflow: hidden; text-overflow: ellipsis; }
.route-unit { color: var(--muted); font-size: 9px; }
.people-management-panel { margin-bottom: 14px; }
.service-owner-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; padding: 0 20px 18px; }
.service-owner-item { min-height: 52px; padding: 9px 10px; border: 1px solid #edf1f4; border-radius: 8px; background: #fbfcfd; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service-owner-item > div { min-width: 0; }
.service-owner-link { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.service-owner-link:hover strong { color: var(--teal-dark); }
.service-owner-link:focus-visible { outline: 2px solid rgba(24,169,154,.35); outline-offset: 3px; border-radius: 4px; }
.service-owner-item strong { display: block; color: var(--ink); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-owner-item span:not(.tag) { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.owner-transfer-bar { margin: 0 20px 18px; padding: 12px 13px; border: 1px solid #e7eef2; border-radius: 9px; background: #f8fbfc; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.owner-transfer-copy { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.owner-transfer-copy strong { color: var(--ink); font-size: 11px; white-space: nowrap; }
.owner-transfer-copy span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-transfer-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.owner-transfer-controls .select-control { min-width: 100px; height: 30px; font-size: 10px; }
.owner-transfer-arrow { color: var(--teal); font-size: 14px; }
.quote-analysis-summary { margin-top: 14px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #f8fbfc; border: 1px solid #e9f0f2; }
.quote-analysis-summary-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.quote-analysis-summary-copy strong { color: var(--ink); font-size: 11px; white-space: nowrap; }
.quote-analysis-summary-copy span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-analysis-panel { margin-top: 14px; }
.quote-analysis-table { min-width: 1340px; }
.quote-analysis-table td, .quote-analysis-table th { padding-left: 15px; padding-right: 15px; }
.quote-customer-table-panel { overflow-x: auto; overflow-y: hidden; scrollbar-gutter: stable; }
.quote-customer-table { min-width: 1500px; }
.quote-customer-table td, .quote-customer-table th { padding: 9px 13px; vertical-align: middle; }
.quote-customer-table .tag { padding: 3px 6px; font-size: 9px; }
.quote-customer-table .order-id { margin-top: 2px; }
.quote-financial-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; align-items: end; }
.quote-financial-edit label { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 9px; line-height: 1; white-space: nowrap; }
.quote-financial-edit .inline-number-input { width: 78px; height: 25px; padding: 0 6px; }
.quote-financial-meta { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 3px; }
.quote-financial-meta .quote-profit { flex: 0 0 auto; }
.quote-financial-meta .order-id { margin-top: 0; overflow: hidden; text-overflow: ellipsis; }
.quote-profit { display: block; white-space: nowrap; }
.customer-analysis-panel { margin-top: 14px; }
.customer-analysis-filters { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.customer-analysis-filters label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.customer-analysis-filters .select-control { min-width: 112px; height: 30px; font-size: 10px; }
.customer-analysis-table { min-width: 1180px; }
.customer-analysis-table td, .customer-analysis-table th { padding-left: 15px; padding-right: 15px; }
.customer-analysis-name { color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.customer-analysis-routes { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.customer-route-chip { color: var(--muted); font-size: 9px; white-space: nowrap; }
.customer-total-contribution { min-width: 170px; }
.customer-total-contribution strong { display: block; color: var(--ink); font-size: 10px; white-space: nowrap; }
.daily-analysis-panel { margin-top: 14px; }
.daily-analysis-table { min-width: 980px; }
.daily-analysis-table th, .daily-analysis-table td { padding-left: 13px; padding-right: 13px; }
.daily-analysis-table td { padding-top: 10px; padding-bottom: 10px; }
.daily-analysis-table tfoot td { background: #f8fbfc; border-top: 2px solid #e4edf0; color: var(--ink); font-weight: 700; }
.daily-day { color: var(--ink); font-size: 11px; white-space: nowrap; }
.daily-quote-analysis-panel { margin-top: 14px; }
.daily-quote-table { min-width: 900px; }
.daily-quote-table th, .daily-quote-table td { padding-left: 13px; padding-right: 13px; }
.daily-quote-table td { padding-top: 10px; padding-bottom: 10px; }
.daily-quote-table tfoot td { background: #f8fbfc; border-top: 2px solid #e4edf0; color: var(--ink); font-weight: 700; }
.daily-quote-owner { color: var(--ink); font-size: 11px; white-space: nowrap; }
.people-panel { margin-top: 14px; }
.people-table { min-width: 1080px; }
.people-table th, .people-table td { vertical-align: top; }
.people-table td { white-space: normal; }
.person-name { color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.people-month-link { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.people-month-link strong { color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.people-month-link span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.people-month-link:hover strong { color: var(--teal-dark); }
.people-month-link:focus-visible { outline: 2px solid rgba(24, 169, 154, .35); outline-offset: 3px; border-radius: 4px; }
.people-overlap-link { min-width: 135px; }
.person-customer-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 240px; }
.person-customer-chip { padding: 4px 7px; border-radius: 5px; background: #f2f7f7; color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.person-route-list { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.person-route-item { padding-left: 8px; border-left: 2px solid var(--teal); }
.person-route-item strong { display: block; color: var(--ink); font-size: 10px; white-space: nowrap; }
.person-route-item small { display: block; margin-top: 2px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; }
.empty-inline { color: var(--muted); font-size: 10px; white-space: nowrap; }

.alert-banner { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-radius: 9px; background: var(--coral-soft); border: 1px solid #f7d8d3; color: #9f5148; margin-bottom: 14px; font-size: 11px; }
.alert-banner strong { color: #8f443c; }
.alert-banner .banner-icon { font-size: 17px; }
.quote-followup-banner { border-color: #d9e3ff; background: var(--blue-soft); color: #4c67b2; }
.quote-followup-banner strong { color: #3f5cae; }
.alert-workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .65fr); gap: 14px; align-items: start; }
.alert-list-panel { overflow: hidden; }
.alert-side-stack { display: flex; flex-direction: column; gap: 14px; }
.side-panel { overflow: hidden; }
.side-kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 20px 17px; }
.side-kpi { padding: 10px 11px; border: 1px solid #edf1f4; border-radius: 8px; background: #fbfcfd; }
.side-kpi span { display: block; color: var(--muted); font-size: 10px; }
.side-kpi strong { display: block; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 16px; margin-top: 5px; }
.side-kpi small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.side-section { border-top: 1px solid #eff2f5; padding-top: 14px; }
.side-section-title { padding: 0 20px 8px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.follow-up-list { padding: 0 12px 12px; }
.follow-up-item { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 7px; background: transparent; padding: 9px 8px; text-align: left; }
.follow-up-item:hover { background: #f7fafb; }
.follow-up-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.follow-up-item > span:nth-child(2) { min-width: 0; flex: 1; }
.follow-up-item strong { display: block; color: var(--ink); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follow-up-item small { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; margin-top: 3px; }
.follow-up-arrow { color: var(--muted); font-size: 12px; }
.side-empty { color: var(--muted); font-size: 10px; line-height: 1.6; padding: 0 20px 17px; }
.rule-list { padding: 0 20px 17px; }
.rule-item { display: flex; gap: 9px; padding: 10px 0; border-top: 1px solid #eff2f5; }
.rule-item:first-child { border-top: 0; }
.rule-index { width: 20px; height: 20px; border-radius: 6px; background: var(--teal-soft); color: var(--teal-dark); display: grid; place-items: center; flex-shrink: 0; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 700; }
.rule-item strong { color: var(--ink-soft); font-size: 10px; }
.rule-item p { color: var(--muted); font-size: 9px; line-height: 1.5; margin-top: 3px; }
.alert-list { display: flex; flex-direction: column; }
.alert-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) 145px; grid-template-areas: 'level content actions' 'level meta actions'; align-items: center; column-gap: 10px; row-gap: 8px; padding: 15px 16px; border-top: 1px solid #eff2f5; }
.alert-card:first-child { border-top: 0; }
.alert-level { grid-area: level; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--coral-soft); color: var(--coral); align-self: start; }
.alert-content { min-width: 0; }
.alert-content { grid-area: content; }
.alert-content strong { display: block; font-size: 12px; }
.alert-content span { color: var(--muted); display: block; margin-top: 4px; font-size: 10px; }
.alert-content .alert-reason { color: #b35a48; margin-top: 6px; }
.alert-meta { grid-area: meta; display: grid; grid-template-columns: auto auto minmax(120px, 1fr); align-items: center; gap: 6px 12px; min-width: 0; }
.alert-meta .tag { white-space: nowrap; }
.alert-age { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--coral); text-align: left; white-space: nowrap; }
.alert-age span { color: var(--muted); font-size: 9px; }
.chase-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 105px; }
.chase-summary span { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.chase-summary span strong { color: var(--ink); font-family: 'DM Mono', monospace; font-size: 10px; margin-left: 2px; }
.chase-summary small { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; white-space: nowrap; }
.alert-actions { grid-area: actions; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; min-width: 0; }
.alert-actions .alert-stage-select { grid-column: 1 / -1; width: 100%; min-width: 0; border-color: var(--line); background: #fff; }
.alert-actions .button { min-width: 0; white-space: nowrap; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 28, 47, .42); display: grid; place-items: center; z-index: 20; padding: 20px; }
.modal { width: min(660px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(11,30,49,.2); }
.modal-header { display: flex; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); cursor: grab; user-select: none; touch-action: none; }
.modal-header:active { cursor: grabbing; }
.modal-header h2 { font-size: 18px; }
.modal-header p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-dragging { cursor: grabbing; }
.form-body { padding: 21px 24px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1/-1; }
.form-field label { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.form-field label em { color: var(--coral); font-style: normal; }
.form-field input, .form-field select, .form-field textarea { height: 36px; border: 1px solid #dfe6ed; border-radius: 7px; outline: 0; padding: 0 10px; color: var(--ink); background: #fff; font-size: 12px; }
.form-field textarea { height: 70px; padding-top: 9px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.port-autocomplete { position: relative; min-width: 0; }
.port-autocomplete > input { width: 100%; }
.port-field-hint { color: var(--muted); font-size: 9px; line-height: 1.2; }
.port-suggestions { position: fixed; z-index: 80; max-height: 264px; overflow-y: auto; padding: 4px; border: 1px solid #d7e1e9; border-radius: 10px; background: rgba(255,255,255,.98); box-shadow: 0 16px 34px rgba(12, 34, 54, .18); }
.port-suggestion { display: flex; width: 100%; flex-direction: column; gap: 3px; padding: 8px 9px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; }
.port-suggestion:hover, .port-suggestion:focus-visible { background: var(--teal-soft); outline: 0; }
.port-suggestion strong { font-size: 11px; font-weight: 650; }
.port-suggestion strong small { margin-left: 5px; color: var(--ink-soft); font-size: 10px; font-weight: 500; }
.port-suggestion span { color: var(--muted); font-family: var(--font-apple-mono, 'SF Mono', monospace); font-size: 9px; }
.form-hint { font-size: 10px; color: var(--muted); margin-top: 1px; }
.customer-picker { position: relative; }
.customer-picker > input[name="customerSearch"] { width: 100%; }
.customer-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow-y: auto; padding: 4px; border: 1px solid #dfe6ed; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(11, 30, 49, .14); z-index: 10; }
.customer-suggestion { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 34px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; font-size: 12px; cursor: pointer; }
.customer-suggestion:hover, .customer-suggestion:focus-visible { background: #eef8f6; outline: 0; }
.customer-suggestion span { color: var(--muted); font-size: 10px; }
.customer-suggestion-add { margin-top: 3px; border-top: 1px solid #eff2f5; border-radius: 0 0 6px 6px; color: var(--teal-dark); font-weight: 700; }
.customer-suggestion-empty { padding: 9px; color: var(--muted); font-size: 11px; }
.data-transfer-body { padding: 21px 24px 24px; }
.data-transfer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.data-transfer-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.data-transfer-card > div:nth-child(2) { min-height: 67px; }
.data-transfer-card h3 { font-size: 13px; }
.data-transfer-card p { color: var(--muted); font-size: 10px; line-height: 1.6; margin-top: 5px; }
.data-transfer-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 17px; font-weight: 700; }
.data-transfer-icon.export { color: var(--teal-dark); background: var(--teal-soft); }
.data-transfer-icon.import { color: var(--blue); background: var(--blue-soft); }
.data-transfer-card .button { margin-top: auto; }
.data-transfer-card .button:disabled { opacity: .65; cursor: wait; }
.cloud-transfer-card { border-color: rgba(47, 107, 206, .24); background: linear-gradient(145deg, #fbfdff, #f4f8ff); }
.data-transfer-icon.cloud { color: #2f6bce; background: #eaf2ff; }
.cloud-transfer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
@media (min-width: 1080px) { .data-transfer-grid:has(.cloud-transfer-card) { grid-template-columns: repeat(3, 1fr); } }
.data-export-scope { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; width: 100%; color: var(--muted); font-size: 10px; }
.data-export-scope > span { white-space: nowrap; }
.data-export-scope select { min-width: 128px; height: 29px; padding: 0 8px; border: 1px solid #dfe6ed; border-radius: 6px; color: var(--ink); background: #fff; font-size: 11px; outline: 0; }
.data-export-scope select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,169,154,.1); }
.data-export-scope.locked { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; }
.data-export-scope.locked strong { color: var(--ink); font-size: 11px; }
.data-export-scope.locked small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.data-transfer-status { display: none; color: var(--blue); font-size: 10px; line-height: 1.5; }
.data-transfer-status.visible { display: block; }
.data-transfer-note { display: flex; gap: 8px; margin-top: 13px; padding: 10px 12px; border-radius: 8px; background: #f5f8fb; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.data-transfer-note strong { color: var(--ink); white-space: nowrap; }
.inline-customer-form { grid-column: 1/-1; padding: 12px; border-radius: 9px; background: #f5fbfa; border: 1px solid #d8f0ec; }
.inline-customer-title { display: flex; align-items: baseline; gap: 9px; color: var(--teal-dark); margin-bottom: 10px; }
.inline-customer-title strong { font-size: 11px; }
.inline-customer-title span { color: var(--ink-soft); font-size: 10px; font-weight: 400; }
.inline-customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 9px; }
.inline-customer-note { grid-column: 1/-1; }
.inline-customer-grid .form-field { gap: 5px; }
.inline-customer-grid .form-field label { font-size: 10px; }
.inline-customer-grid input, .inline-customer-grid select { height: 33px; }
.inline-customer-grid .button { height: 33px; padding: 0 10px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.toast-root { position: fixed; right: 25px; bottom: 24px; z-index: 30; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; border-radius: 9px; padding: 11px 15px; font-size: 11px; box-shadow: 0 8px 22px rgba(13,34,55,.2); animation: toast-in .22s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .sidebar { width: 215px; }
  .topbar, .page-content { padding-left: 24px; padding-right: 24px; }
  .customer-hero { flex-direction: column; }
  .customer-stat-grid { width: 100%; min-width: 0; }
  .panel-header-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid, .lower-grid, .detail-grid, .analytics-grid { grid-template-columns: 1fr; }
  .search-box { width: 210px; }
  .data-table { min-width: 980px; }
  .order-data-table { min-width: 1800px; }
  .quote-customer-table { min-width: 1500px; }
  .table-panel { overflow-x: auto; }
  .monthly-metrics-header { flex-direction: column; }
  .analysis-range-controls { width: 100%; justify-content: flex-end; }
  .half-year-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .alert-workspace { grid-template-columns: 1fr; }
  .alert-card { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: 'level content' 'level meta' 'level actions'; align-items: start; }
  .alert-age { text-align: left; }
  .alert-meta { grid-template-columns: auto auto minmax(0, 1fr); gap: 8px 12px; }
  .chase-summary { min-width: 0; }
  .alert-actions { width: min(100%, 260px); }
}
@media (max-width: 680px) {
  .sidebar { width: 64px; padding: 20px 8px; }
  .brand { padding: 0 6px 25px; }
  .brand > div:not(.brand-mark), .workspace-switcher > *:not(.workspace-avatar), .nav-label, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .workspace-switcher { padding: 8px; justify-content: center; }
  .nav-item { justify-content: center; padding: 0; gap: 0; }
  .nav-icon { font-size: 18px; }
  .half-year-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 14px; padding-right: 14px; }
  .nav-count, .nav-badge { display: none; }
  .sidebar-footer { display: none; }
  .topbar { padding: 0 14px; }
  .page-content { padding: 24px 14px 38px; }
  .topbar-actions { gap: 7px; }
  .data-tools-button { width: 34px; padding: 0; font-size: 0; }
  .data-tools-button::before { content: '⇅'; font-size: 17px; }
  .search-box { width: 36px; padding: 0 10px; }
  .search-box input, .search-box kbd, .profile-pill > span:not(.user-avatar) { display: none; }
  .metric-grid { gap: 8px; }
  .metric-card { padding: 13px; min-height: 112px; }
  .metric-value { font-size: 22px; }
  .page-heading { gap: 13px; flex-direction: column; }
  .page-heading .heading-actions { width: 100%; }
  .page-heading .heading-actions .button { flex: 1; }
  .customer-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-analysis-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .quote-analysis-summary-copy { align-items: flex-start; flex-direction: column; gap: 3px; }
  .owner-transfer-bar { align-items: stretch; flex-direction: column; gap: 10px; }
  .owner-transfer-copy { align-items: flex-start; flex-direction: column; gap: 3px; }
  .owner-transfer-controls { width: 100%; flex-wrap: wrap; }
  .owner-transfer-controls .select-control { flex: 1; min-width: 0; }
  .owner-transfer-controls .button { flex: 1 0 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .inline-customer-form { grid-column: auto; }
  .inline-customer-grid { grid-template-columns: 1fr; }
  .inline-customer-note { grid-column: auto; }
  .inline-customer-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .data-transfer-grid { grid-template-columns: 1fr; }
  .data-transfer-note { flex-direction: column; gap: 2px; }
}

/* v1.0.94 · 销售工作台视觉层：极简、清晰、低干扰 */
.login-screen { background: var(--canvas); }
.login-card { border-color: var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .08); }
.login-mark, .brand-mark { background: var(--teal); box-shadow: none; }
.sidebar { background: var(--navy); padding-top: 21px; }
.brand { padding-bottom: 22px; }
.workspace-switcher { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
.nav-item { border-radius: 8px; }
.nav-item.active { background: var(--teal); box-shadow: none; }
.topbar { background: rgba(255,255,255,.92); }
.page-content { padding-top: 28px; }
.eyebrow { color: var(--teal-dark); letter-spacing: .08em; }
.subtitle { color: var(--ink-soft); }
.button { border-radius: 8px; box-shadow: none !important; }
.button.primary { background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); transform: none; }
.metric-card::after { display: none; }
.metric-card { min-height: 118px; box-shadow: var(--shadow); }
.metric-value { font-size: 25px; }
.panel, .metric-card { border-color: var(--line); box-shadow: var(--shadow); }
.panel-header { padding-top: 16px; padding-bottom: 12px; }
.data-table th { background: #fafafa; color: var(--muted); }
.data-table td { border-top-color: #f0f0f2; }
.data-table tr.clickable:hover { background: #fafafa; }
.positive, .trend.up { color: #34c759 !important; }
.negative, .trend.down { color: var(--coral) !important; }
.tag.success { color: #248a3d; background: #eaf7ee; }
.tag.alert { color: var(--coral); background: var(--coral-soft); }
.tag.blue { color: var(--blue); background: var(--blue-soft); }
.search-box, .icon-button, .select-control, .period-select { border-color: var(--line); }
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,113,227,.1); }
.sales-focus-panel { margin-bottom: 14px; overflow: hidden; }
.sales-focus-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 20px 12px; }
.sales-focus-header h2 { margin-top: 2px; }
.sales-focus-header p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.sales-focus-date { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; padding-top: 3px; white-space: nowrap; }
.sales-focus-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #f0f0f2; }
.sales-focus-item { border: 0; border-right: 1px solid #f0f0f2; background: #fff; padding: 14px 16px 13px; text-align: left; transition: background .16s ease; }
.sales-focus-item:last-child { border-right: 0; }
.sales-focus-item:hover { background: #fafafa; }
.sales-focus-item.is-alert { background: #fffafa; }
.sales-focus-item.is-alert:hover { background: #fff5f4; }
.sales-focus-label { display: block; color: var(--muted); font-size: 10px; }
.sales-focus-item strong { display: block; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 22px; letter-spacing: -.03em; margin-top: 6px; }
.sales-focus-item strong small { color: var(--muted); font-family: inherit; font-size: 10px; font-weight: 400; }
.sales-focus-item > span:nth-of-type(2) { display: block; color: var(--ink-soft); font-size: 11px; margin-top: 2px; }
.sales-focus-item em { display: block; color: var(--teal-dark); font-size: 10px; font-style: normal; margin-top: 10px; }
.sales-focus-item.is-alert em { color: var(--coral); }
.sales-focus-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px 12px; border-top: 1px solid #f0f0f2; color: var(--muted); font-size: 10px; }
.sales-focus-foot strong { font-family: 'DM Mono', monospace; font-size: 11px; margin: 0 3px; }
.insight-summary-panel { margin-bottom: 14px; overflow: hidden; }
.insight-summary-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 20px 11px; }
.insight-summary-header h2 { margin-top: 2px; }
.insight-summary-header p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.insight-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #f0f0f2; }
.insight-summary-grid > div { min-height: 88px; padding: 13px 16px; border-right: 1px solid #f0f0f2; }
.insight-summary-grid > div:last-child { border-right: 0; }
.insight-summary-grid span { display: block; color: var(--muted); font-size: 10px; }
.insight-summary-grid strong { display: block; color: var(--ink); font-size: 16px; margin-top: 7px; }
.insight-summary-grid strong.positive, .insight-summary-grid strong.negative { font-size: 16px !important; }
.insight-summary-grid strong .trend { font-size: 10px !important; margin-left: 4px; }
.insight-summary-grid small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-grid { margin-bottom: 14px; }
.chart-panel, .analysis-chart { box-shadow: var(--shadow); }
.chart-line { stroke-width: 2.5; }
.chart-line.secondary { stroke: #b8b8c0; opacity: .7; }
.chart-point { stroke-width: 2; }
.legend { margin-top: -16px; }

@media (max-width: 900px) {
  .sales-focus-grid, .insight-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .sales-focus-item:nth-child(2), .insight-summary-grid > div:nth-child(2) { border-right: 0; }
  .sales-focus-item:nth-child(n + 3), .insight-summary-grid > div:nth-child(n + 3) { border-top: 1px solid #f0f0f2; }
  .sales-focus-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 680px) {
  .sales-focus-header, .insight-summary-header { padding-left: 14px; padding-right: 14px; }
  .sales-focus-grid, .insight-summary-grid { grid-template-columns: 1fr 1fr; }
  .sales-focus-item, .insight-summary-grid > div { padding-left: 12px; padding-right: 12px; }
  .sales-focus-foot { padding-left: 14px; padding-right: 14px; }
}

/* Apple typography: SF Pro / 苹方 / SF Mono fallback stack */
:root {
  --font-apple-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-apple-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-apple-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas, monospace;
}
html, body, button, input, select, textarea { font-family: var(--font-apple-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: var(--font-apple-display); font-synthesis: none; }
.login-signature, .brand-subtitle, .nav-count, .app-signature, .eyebrow,
.volume-metric-item strong, .trend, .chart-axis-label, .chart-value-label, .chart-x,
.action-time, .ledger-order-id, .order-id-input, .route-etd, .ledger-volume-text,
.inline-date-input, .inline-number-input, .order-id, .payment-balance, .received-amount input,
.money, .positive, .negative, .customer-stat strong, .bar-row span, .bar-row strong,
.person-route-item small, .side-kpi strong, .follow-up-item small, .rule-index,
.alert-age, .chase-summary span strong, .chase-summary small, .sales-focus-date,
.sales-focus-item strong, .sales-focus-foot strong { font-family: var(--font-apple-mono) !important; }

/* 销售机会：按创建日筛选，并按客户合并报价历史 */
.quote-list-filters { align-items: center; }
.quote-owner-filter { min-width: 104px; }
.quote-month-filter { min-width: 104px; }
.quote-date-filter-control { position: relative; display: inline-flex; align-items: center; gap: 3px; }
.quote-date-picker-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.quote-date-clear { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 28px; padding: 0; border: 1px solid rgba(120, 139, 158, .22); border-radius: 6px; color: var(--muted); background: rgba(255, 255, 255, .58); font-size: 15px; line-height: 1; cursor: pointer; }
.quote-date-clear:hover { color: var(--ink); background: rgba(255, 255, 255, .9); }
.quote-customer-table { min-width: 1260px; }
.quote-customer-group-row > td { vertical-align: top; }
.quote-group-customer { min-width: 150px; }
.quote-group-customer strong { display: block; color: var(--ink); font-size: 12px; white-space: normal; }
.quote-history-list { min-width: 760px; }
.quote-history-row { display: grid; grid-template-columns: minmax(220px, 1.25fr) minmax(145px, .8fr) minmax(118px, .7fr) 252px; align-items: center; gap: 10px; padding: 9px 0; }
.quote-history-row + .quote-history-row { border-top: 1px solid #f0f0f2; }
.quote-history-main { min-width: 0; }
.quote-history-main > strong { display: block; color: var(--ink); font-family: var(--font-apple-mono); font-size: 10px; font-weight: 600; }
.quote-history-main > span { display: block; color: var(--ink-soft); font-size: 10px; margin-top: 3px; white-space: nowrap; }
.quote-history-main > small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.quote-history-main .order-id { display: inline-block; margin-left: 6px; }
.quote-history-finance { min-width: 0; }
.quote-history-finance .quote-financial-edit { gap: 4px; }
.quote-history-finance .quote-financial-edit .inline-number-input { width: 64px; }
.quote-history-finance .quote-financial-meta { gap: 5px; }
.quote-history-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.quote-history-status .order-id { white-space: nowrap; }
.quote-history-actions { display: flex; justify-content: flex-start; }
.quote-history-action-stack { display: flex; flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.quote-history-action-stack .button { width: 80px; padding: 0 7px; }
.quote-customer-table .quote-history-row .tag { padding: 3px 6px; font-size: 9px; }
.quote-customer-table .quote-history-row .quote-financial-meta .order-id { margin-top: 0; }
.quote-group-toggle { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.quote-group-toggle:hover strong { color: var(--teal-dark); }
.quote-group-chevron { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 5px; color: var(--teal-dark); background: var(--teal-soft); font-size: 12px; line-height: 1; flex: 0 0 auto; }
.quote-group-toggle strong { overflow: hidden; text-overflow: ellipsis; }
.quote-history-collapsed-summary { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(125px, 1fr) minmax(160px, 1.2fr); align-items: stretch; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid #e5ebf0; border-radius: 8px; color: var(--muted); background: linear-gradient(135deg, #fbfdff, #f5f8fb); font-size: 10px; }
.quote-history-collapsed-summary > span { display: grid; align-content: center; gap: 3px; min-width: 0; padding-right: 10px; border-right: 1px solid #e5ebf0; }
.quote-history-collapsed-summary > span:last-child { padding-right: 0; border-right: 0; }
.quote-history-collapsed-summary small { color: var(--muted); font-size: 9px; line-height: 1; white-space: nowrap; }
.quote-history-collapsed-summary strong { overflow: hidden; color: var(--ink-soft); font-family: var(--font-apple-mono); font-size: 10px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.quote-collapsed-route-stat.has-match strong { color: var(--teal-dark); }

/* 宽表统一提供顶部和底部的左右拖动条 */
.table-panel, .analysis-range-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.table-panel::-webkit-scrollbar, .analysis-range-scroll::-webkit-scrollbar { width: 0; height: 0; }
.table-horizontal-scrollbar { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; width: 100%; height: 22px; padding: 0 14px; background: #fff; cursor: grab; touch-action: none; user-select: none; }
.table-horizontal-scrollbar.top { border-bottom: 1px solid #eef2f5; }
.table-horizontal-scrollbar.bottom { border-top: 1px solid #eef2f5; }
.table-horizontal-scrollbar:focus-visible { outline: 2px solid rgba(0, 113, 227, .38); outline-offset: -2px; }
.table-horizontal-scrollbar.dragging { cursor: grabbing; }
.table-horizontal-scrollbar-track { position: relative; width: 100%; height: 8px; overflow: hidden; border-radius: 20px; background: #e8edf1; pointer-events: none; }
.table-horizontal-scrollbar-thumb { position: absolute; top: 0; left: 0; height: 100%; min-width: 54px; border-radius: inherit; background: #9cadb9; box-shadow: inset 0 0 0 1px rgba(74, 93, 107, .1); transition: background .16s ease; will-change: transform; }
.table-horizontal-scrollbar:hover .table-horizontal-scrollbar-thumb, .table-horizontal-scrollbar.dragging .table-horizontal-scrollbar-thumb { background: #718896; }

/* v2.22 · 宽表横向滚动只作用于数据区，标题/筛选/批量操作/分页保持固定 */
.table-panel {
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-gutter: auto;
}
.table-scroll-body {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.table-scroll-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.table-scroll-body > .data-table {
  min-width: max-content;
}
.table-scroll-body .table-horizontal-scrollbar {
  min-width: 0;
}
.table-panel > .table-scroll-body + .list-pagination {
  position: relative;
  z-index: 2;
  background: #fff;
}

/* v2.23 · 销售机会重点项保持紧凑横向布局 */
.dashboard-opportunity-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-opportunity.is-alert strong { color: var(--coral); }
@media (max-width: 900px) {
  .dashboard-opportunity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dashboard-opportunity-grid { grid-template-columns: 1fr; }
}

/* v2.25 · 销售机会与收款保持同一行并列展示 */
.dashboard-sales-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, .9fr);
  gap: 16px;
  align-items: stretch;
}
.dashboard-sales-row .dashboard-opportunities,
.dashboard-sales-row .dashboard-collection-panel {
  grid-column: auto;
}
@media (max-width: 700px) {
  .dashboard-sales-row { grid-template-columns: 1fr; }
}

/* v2.24 · 收款独立成模块，与销售机会并列展示 */
.dashboard-opportunities { grid-column: auto; }
.dashboard-opportunity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-collection-panel { min-width: 0; }
.dashboard-collection-card {
  display: block;
  width: calc(100% - 44px);
  min-height: 132px;
  margin: 0 22px 22px;
  padding: 18px;
  border: 1px solid #f1e2df;
  border-radius: 12px;
  background: #fffafa;
  color: inherit;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.dashboard-collection-card:hover { border-color: #e8b9b1; background: #fff6f4; transform: translateY(-1px); }
.dashboard-collection-card small { display: block; color: var(--muted); font-size: 11px; }
.dashboard-collection-card strong { display: block; margin-top: 10px; color: var(--coral); font-family: var(--font-apple-mono); font-size: 25px; letter-spacing: -.03em; }
.dashboard-collection-card span { display: block; margin-top: 10px; color: var(--ink-soft); font-size: 11px; }
.dashboard-collection-card em { display: block; margin-top: 12px; color: var(--coral); font-size: 10px; font-style: normal; }
@media (max-width: 900px) {
  .dashboard-opportunity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dashboard-opportunity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .quote-list-filters { justify-content: flex-start; }
  .quote-history-list { min-width: 860px; }
  .quote-history-row { grid-template-columns: minmax(190px, 1.2fr) minmax(130px, .8fr) minmax(105px, .7fr) 252px; gap: 7px; }
}

/* v2.0 · 清透经营台：首页只放会影响销售判断的内容，点击后进入对应业务界面 */
.app-shell.dashboard-v2-mode { display: block; }
.app-shell.dashboard-v2-mode .sidebar, .app-shell.dashboard-v2-mode .topbar { display: none; }
.app-shell.dashboard-v2-mode .main-content { width: 100%; min-width: 0; }
.app-shell.dashboard-v2-mode .page-content { max-width: 1280px; margin: 0 auto; padding: 0 32px 54px; }
.v2-dashboard-nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.v2-dashboard-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); white-space: nowrap; }
.v2-dashboard-brand i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--teal); font-style: normal; font-size: 12px; font-weight: 800; }
.v2-dashboard-brand strong { font-size: 14px; letter-spacing: -.04em; }
.v2-dashboard-links { display: flex; align-items: center; gap: 25px; }
.v2-dashboard-links button { padding: 6px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; }
.v2-dashboard-links button:hover, .v2-dashboard-links button.active { color: var(--teal-dark); }
.v2-dashboard-links button.active { border-bottom-color: var(--teal); }
.v2-dashboard-user { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.v2-dashboard-user select { max-width: 100px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink-soft); background: #fff; font-size: 10px; }
.v2-dashboard-user select:focus { border-color: var(--teal); }
.app-shell.dashboard-v2-mode .page-heading { padding-top: 30px; }

.dashboard-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-metric-link { position: relative; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.dashboard-metric-link:hover { border-color: #cfdde7; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30, 54, 73, .07); }
.dashboard-card-arrow { position: absolute; top: 14px; right: 16px; color: #a0a8b2; font-size: 16px; opacity: 0; transition: opacity .16s ease; }
.dashboard-metric-link:hover .dashboard-card-arrow { opacity: 1; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 14px; }
.dashboard-panel, .dashboard-margin-panel { min-width: 0; }
.dashboard-margin-panel { cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.dashboard-margin-panel:hover { border-color: #cfdde7; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30, 54, 73, .07); }
.dashboard-card-link { color: var(--muted); font-size: 10px; white-space: nowrap; }
.dashboard-order-list, .dashboard-customer-list, .dashboard-action-list { display: grid; }
.dashboard-order-row, .dashboard-customer-row, .dashboard-action-row { width: 100%; display: grid; align-items: center; gap: 10px; padding: 13px 0; border: 0; border-bottom: 1px solid #f0f0f2; border-radius: 0; background: transparent; color: inherit; text-align: left; appearance: none; -webkit-appearance: none; }
.dashboard-order-row:last-child, .dashboard-customer-row:last-child, .dashboard-action-row:last-child { border-bottom: 0; }
.dashboard-order-row:hover, .dashboard-customer-row:hover, .dashboard-action-row:hover { background: #fafafa; }
.dashboard-order-row { grid-template-columns: minmax(0, 1fr) auto; }
.dashboard-status-dot, .dashboard-action-dot { width: 8px; height: 8px; border-radius: 50%; background: #7da5ec; box-shadow: 0 0 0 4px rgba(125, 165, 236, .12); }
.dashboard-status-dot.warning, .dashboard-action-dot.amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 159, 10, .12); }
.dashboard-status-dot.alert, .dashboard-action-dot.red { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 59, 48, .12); }
.dashboard-action-dot.blue { background: #7da5ec; box-shadow: 0 0 0 4px rgba(125, 165, 236, .12); }
.dashboard-order-copy, .dashboard-customer-row > span:first-child, .dashboard-action-row > span:first-child { min-width: 0; }
.dashboard-order-copy strong, .dashboard-customer-row strong, .dashboard-action-row strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-order-copy strong em { color: var(--ink-soft); font-style: normal; font-weight: 400; }
.dashboard-order-copy small, .dashboard-customer-row small, .dashboard-action-row small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-order-copy small .tag { margin-right: 4px; vertical-align: 1px; }
.dashboard-row-action, .dashboard-action-row > i { color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.dashboard-row-action.alert { color: var(--coral); }
.dashboard-row-action i { margin-left: 3px; color: #a7aeb7; font-size: 15px; font-style: normal; vertical-align: -1px; }
.dashboard-customer-row { grid-template-columns: minmax(0, 1fr) auto; }
.dashboard-customer-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--teal-soft); font-size: 11px; font-weight: 700; }
.dashboard-change { color: var(--muted); font-family: var(--font-apple-mono); font-size: 10px; white-space: nowrap; }
.dashboard-change.positive { color: #248a3d !important; }
.dashboard-change.negative { color: var(--coral) !important; }
.dashboard-change i { margin-left: 4px; color: #a7aeb7; font-family: var(--font-apple-text); font-size: 15px; font-style: normal; vertical-align: -1px; }
.dashboard-action-row { grid-template-columns: minmax(0, 1fr) 16px; }
.dashboard-action-row > i { font-size: 18px; text-align: right; }
.dashboard-empty { padding: 24px 0; }
.dashboard-opportunities { grid-column: 1 / -1; }
.dashboard-opportunity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dashboard-opportunity { min-height: 112px; padding: 15px; border: 1px solid #edf0f3; border-radius: 10px; background: #fff; color: inherit; text-align: left; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.dashboard-opportunity:hover { border-color: #cfdde7; background: #fbfdff; transform: translateY(-1px); }
.dashboard-opportunity.is-alert { border-color: #f1e2df; background: #fffafa; }
.dashboard-opportunity small { display: block; color: var(--muted); font-size: 10px; }
.dashboard-opportunity strong { display: block; margin-top: 8px; color: var(--ink); font-family: var(--font-apple-mono); font-size: 22px; letter-spacing: -.03em; }
.dashboard-opportunity span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-opportunities { grid-column: auto; }
}
@media (max-width: 900px) {
  .app-shell.dashboard-v2-mode .page-content { padding-left: 18px; padding-right: 18px; }
  .v2-dashboard-nav { padding: 0 18px; }
  .v2-dashboard-links { gap: 14px; }
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .v2-dashboard-nav { gap: 10px; }
  .v2-dashboard-links { gap: 9px; }
  .v2-dashboard-links button:nth-child(3) { display: none; }
  .v2-dashboard-user span { display: none; }
  .dashboard-kpi-grid, .dashboard-opportunity-grid { grid-template-columns: 1fr; }
  .dashboard-order-copy strong, .dashboard-customer-row strong, .dashboard-action-row strong { font-size: 11px; }
  .dashboard-row-action { font-size: 9px; }
}

/* v2.0 · 全站统一清透界面：所有主页面与分页面共享同一套顶部导航和内容卡片 */
.app-shell { display: block; min-height: 100vh; }
.sidebar { display: none !important; }
.main-content { width: 100%; min-width: 0; }
.topbar { height: auto; min-height: 72px; padding: 12px 32px; gap: 20px; background: rgba(255,255,255,.94); border-bottom-color: #e8e8ed; box-shadow: 0 1px 0 rgba(0,0,0,.015); }
.topbar-brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; white-space: nowrap; }
.topbar-brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--teal); font-size: 13px; font-weight: 800; box-shadow: 0 5px 12px rgba(0,113,227,.17); }
.topbar-brand strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.05; letter-spacing: -.03em; }
.topbar-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .04em; }
.topbar-nav { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav-item { height: 32px; padding: 2px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; white-space: nowrap; transition: color .16s ease, border-color .16s ease; }
.topbar-nav-item:hover, .topbar-nav-item.active { color: var(--teal-dark); }
.topbar-nav-item.active { border-bottom-color: var(--teal); }
.topbar-nav-divider { width: 1px; height: 17px; flex: 0 0 auto; background: var(--line); }
.topbar-actions { gap: 10px; flex: 0 0 auto; }
.topbar-team { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.topbar-team-select { max-width: 108px; padding: 5px 22px 5px 8px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink); background: #fff; font-size: 10px; font-weight: 700; }
.topbar-team-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,113,227,.09); }
.topbar-team span { color: var(--muted); font-size: 8px; padding-left: 8px; }
.topbar .search-box { width: 210px; height: 34px; border-radius: 9px; }
.topbar .search-box kbd { display: none; }
.topbar .data-tools-button { height: 32px; }
.topbar .profile-pill { font-size: 11px; }
.app-shell.dashboard-v2-mode .topbar { display: flex; }
.app-shell.dashboard-v2-mode .page-content { max-width: 1280px; margin: 0 auto; padding: 0 32px 54px; }
.v2-dashboard-nav { display: none; }
.page-content { max-width: 1440px; padding: 30px 32px 52px; }
.page-heading { margin-bottom: 22px; align-items: center; }
.page-heading h1 { font-size: 28px; letter-spacing: -.045em; }
.page-heading .subtitle { max-width: 700px; color: var(--ink-soft); font-size: 11px; }
.eyebrow { color: var(--teal-dark); font-size: 9px; letter-spacing: .12em; }
.metric-grid { gap: 12px; }
.metric-card { min-height: 118px; padding: 16px 17px 14px; border-color: #e6e6eb; border-radius: 13px; box-shadow: 0 3px 16px rgba(0,0,0,.035); }
.metric-card::after { opacity: .38; }
.metric-value { font-size: 25px; }
.panel, .table-panel { border-color: #e6e6eb; border-radius: 13px; box-shadow: 0 3px 16px rgba(0,0,0,.035); }
.panel-header { padding: 16px 18px 12px; }
.panel-header h2 { font-size: 15px; letter-spacing: -.025em; }
.panel-header p { font-size: 10px; }
.content-grid, .lower-grid, .analytics-grid, .alert-workspace, .detail-grid { gap: 12px; }
.data-table { font-size: 11px; }
.data-table th { color: var(--muted); font-size: 9px; letter-spacing: .03em; }
.data-table td { padding: 11px 12px; }
.tag, .status-pill { border-radius: 999px; }
.select-control, .input-control, .filter-input, .filter-select { border-radius: 8px; border-color: #dfe1e6; }
.button { border-radius: 9px; }
.button.primary { box-shadow: 0 4px 12px rgba(0,113,227,.16); }
.chart-panel { min-height: 326px; }
.chart-line { stroke: #0071e3; }
.chart-point { stroke: #0071e3; }
.chart-value-label { fill: #005bb5; }
.empty-state { color: var(--muted); }

/* contextual navigation */
.context-callout, .quote-context-panel { border: 1px solid rgba(36,99,235,.16); background: linear-gradient(135deg,#f7faff,#fff); border-radius: 16px; }
.context-callout { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 16px; color: var(--ink); }
.context-callout strong { font-size: 13px; white-space: nowrap; }
.context-callout span { color: var(--muted); font-size: 12px; }
.quote-context-panel { margin-bottom: 16px; }
.quote-context-list { display: grid; gap: 0; }
.quote-context-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.quote-context-row:hover { background: #f8fafc; }
.quote-context-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.quote-context-row strong { font-size: 13px; }
.quote-context-row span, .quote-context-row small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-context-finance { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.context-more { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.context-focus-row { outline: 2px solid rgba(36,99,235,.25); outline-offset: -2px; background: #f7faff; }

/* v2.0.4 · 顶部工具区图标与团队选择 */
.topbar-team { flex-direction: row; align-items: center; gap: 7px; min-width: 0; }
.topbar-team-mark { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; padding-left: 0 !important; color: var(--teal-dark); background: var(--teal-soft); border: 1px solid rgba(0,113,227,.09); border-radius: 8px; font-size: inherit !important; }
.topbar-team-mark svg, .topbar-search-icon svg, .topbar-tool-icon svg, .topbar-notification-icon svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.topbar-team-select { width: 104px; max-width: 104px; padding: 6px 21px 6px 6px; border: 0; background-color: transparent; font-size: 11px; }
.topbar-team-select:focus { box-shadow: none; }
.topbar-search-icon { width: 15px; height: 15px; display: grid; place-items: center; flex: 0 0 auto; color: #8b98a6; }
.topbar .search-box { gap: 8px; }
.data-tools-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding-left: 10px; padding-right: 10px; }
.topbar-tool-icon { width: 15px; height: 15px; display: grid; place-items: center; color: currentColor; }
.topbar-tool-icon svg { width: 14px; height: 14px; stroke-width: 1.8; }
.topbar-notification-icon { width: 16px; height: 16px; display: grid; place-items: center; color: currentColor; }
.topbar-notification-icon svg { width: 16px; height: 16px; stroke-width: 1.65; }
.notification-button { display: grid; place-items: center; }

@media (max-width: 560px) {
  .topbar-team { display: flex; }
  .topbar-team-mark { display: none; }
  .topbar-team-select { width: 92px; max-width: 92px; font-size: 10px; }
  .data-tools-button::before { content: none; }
  .data-tools-button { width: 34px; padding: 0; font-size: 0; }
  .data-tools-button .topbar-tool-icon { width: 17px; height: 17px; }
}

@media (max-width: 1240px) {
  .topbar { gap: 14px; padding-left: 22px; padding-right: 22px; }
  .topbar-nav { gap: 13px; }
  .topbar .search-box { width: 170px; }
  .topbar .data-tools-button { display: none; }
}
@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-brand { min-width: 120px; }
  .topbar-nav { order: 3; flex-basis: 100%; width: 100%; padding-top: 3px; }
  .topbar-actions { margin-left: auto; }
  .topbar .search-box { width: 190px; }
  .page-content, .app-shell.dashboard-v2-mode .page-content { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 560px) {
  .topbar { padding: 11px 14px; }
  .topbar-team { display: none; }
  .topbar .search-box { width: 150px; }
  .topbar .profile-pill > #profile-user-role { display: none; }
  .topbar-nav { gap: 16px; }
  .topbar-nav-divider { display: none; }
  .page-content, .app-shell.dashboard-v2-mode .page-content { padding: 22px 14px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-heading .heading-actions { width: 100%; }
}

/* v2.0.8 · 人员分析改为“每日工作 + 流量/转化/交付”主线 */
.people-daily-panel,
.people-focus-panel { margin-top: 0; }
.people-daily-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.people-daily-owner-filter { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.people-daily-owner-filter .select-control { min-width: 116px; height: 30px; font-size: 10px; }
.people-work-table { min-width: 1480px; }
.people-work-table th,
.people-work-table td { padding: 11px 13px; vertical-align: top; }
.people-work-table th:nth-child(3),
.people-work-table th:nth-child(4),
.people-work-table th:nth-child(5),
.people-work-table th:nth-child(6),
.people-work-table th:nth-child(7),
.people-work-table th:nth-child(8) { min-width: 118px; }
.people-work-table td strong { color: var(--ink); font-size: 10px; white-space: nowrap; }
.people-work-table .order-id { display: block; margin-top: 5px; line-height: 1.45; white-space: normal; }
.people-weekly-panel { margin-top: 14px; }
.people-weekly-table { min-width: 1180px; }
.people-weekly-table th,
.people-weekly-table td { padding: 11px 13px; vertical-align: top; }
.people-weekly-table th:nth-child(3),
.people-weekly-table th:nth-child(4),
.people-weekly-table th:nth-child(5),
.people-weekly-table th:nth-child(6),
.people-weekly-table th:nth-child(7),
.people-weekly-table th:nth-child(8) { min-width: 112px; }
.people-weekly-table .order-id { display: block; margin-top: 5px; line-height: 1.45; white-space: normal; }
.people-work-routes { display: flex; flex-wrap: wrap; gap: 4px; max-width: 310px; }
.people-work-routes span { display: inline-flex; padding: 4px 6px; border-radius: 5px; background: #f3f7f8; color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
.people-focus-panel { margin-top: 14px; }
.people-focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 10px; padding: 0 18px 18px; }
.people-focus-card { min-width: 0; padding: 14px; border: 1px solid #e8eef1; border-radius: 12px; background: #fbfcfd; }
.people-focus-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.people-focus-card-header > div { min-width: 0; }
.people-focus-card-header strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.people-focus-card-header span:not(.tag) { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.people-focus-card-header .tag { flex: 0 0 auto; }
.people-focus-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.people-focus-stage { min-width: 0; min-height: 112px; padding: 10px; border-radius: 9px; background: #fff; }
.people-focus-stage.traffic { border-top: 3px solid #5f9eb7; }
.people-focus-stage.conversion { border-top: 3px solid #7e8fd4; }
.people-focus-stage.delivery { border-top: 3px solid #62a77c; }
.people-focus-stage > span { color: var(--muted); font-size: 9px; }
.people-focus-stage > strong { display: block; margin-top: 7px; color: var(--ink); font-family: var(--font-apple-mono); font-size: 21px; letter-spacing: -.04em; white-space: nowrap; }
.people-focus-stage > strong small { color: var(--muted); font-family: var(--font-apple-text); font-size: 9px; font-weight: 500; letter-spacing: 0; }
.people-focus-stage p,
.people-focus-stage small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.people-focus-stage small { color: var(--muted); }
.people-focus-card-footer { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1f3; color: var(--muted); font-size: 9px; }
.people-focus-card-footer strong { color: var(--ink-soft); font-family: var(--font-apple-mono); font-weight: 600; }

@media (max-width: 760px) {
  .people-daily-header-actions { width: 100%; justify-content: space-between; }
  .people-daily-owner-filter { flex: 1; }
  .people-daily-owner-filter .select-control { flex: 1; }
  .customer-analysis-filters { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .customer-analysis-filters .select-control { flex: 1; min-width: 120px; }
  .people-focus-grid { grid-template-columns: 1fr; padding-left: 12px; padding-right: 12px; }
  .people-focus-stage-grid { grid-template-columns: 1fr; }
  .people-focus-stage { min-height: 0; }
  .people-focus-stage > strong { display: inline-block; margin-right: 8px; }
  .people-focus-stage p,
  .people-focus-stage small { display: inline; margin-top: 0; }
}

/* v2.0.6 · 首页三组重点清单：更紧凑的卡片行，信息分层更清晰 */
.dashboard-panel .dashboard-order-list,
.dashboard-panel .dashboard-customer-list,
.dashboard-panel .dashboard-action-list {
  display: grid;
  gap: 6px;
  padding: 4px 14px 14px;
}
.dashboard-panel .dashboard-order-row,
.dashboard-panel .dashboard-customer-row,
.dashboard-panel .dashboard-action-row {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #fafbfc;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.dashboard-panel .dashboard-order-row:last-child,
.dashboard-panel .dashboard-customer-row:last-child,
.dashboard-panel .dashboard-action-row:last-child {
  border-bottom: 1px solid transparent;
}
.dashboard-panel .dashboard-order-row:hover,
.dashboard-panel .dashboard-customer-row:hover,
.dashboard-panel .dashboard-action-row:hover {
  border-color: #e1e8ee;
  background: #fff;
  box-shadow: 0 5px 14px rgba(30, 56, 77, .07);
  transform: translateY(-1px);
}
.dashboard-order-copy,
.dashboard-customer-copy,
.dashboard-action-copy { min-width: 0; }
.dashboard-order-copy strong,
.dashboard-customer-copy strong,
.dashboard-action-copy strong {
  line-height: 1.35;
}
.dashboard-order-copy strong em {
  color: #7e8995;
}
.dashboard-order-copy small,
.dashboard-customer-copy small,
.dashboard-action-copy small {
  margin-top: 5px;
  line-height: 1.35;
}
.dashboard-order-id {
  color: #7b8793;
  font-family: var(--font-apple-mono);
  font-size: 9px;
  font-weight: 500;
}
.dashboard-row-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 65px;
  justify-content: center;
  padding: 6px 7px 6px 8px;
  border-radius: 7px;
  background: #f0f3f5;
  color: #687784;
  font-size: 9px;
  font-weight: 600;
}
.dashboard-row-action.alert {
  background: #fff0ed;
  color: var(--coral);
}
.dashboard-row-action i,
.dashboard-change i {
  display: grid;
  width: 14px;
  height: 14px;
  margin: 0;
  place-items: center;
  border-radius: 50%;
  background: rgba(92, 108, 121, .1);
  color: #788691;
  font-size: 12px;
  line-height: 1;
  vertical-align: 0;
}
.dashboard-row-action.alert i {
  background: rgba(227, 92, 76, .1);
  color: var(--coral);
}
.dashboard-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 7px 6px 8px;
  border-radius: 7px;
  background: #eef7f0;
  font-size: 9px;
  font-weight: 600;
}
.dashboard-change.negative {
  background: #fff0ed;
}
.dashboard-change.positive { color: #248a3d !important; }
.dashboard-change.negative { color: var(--coral) !important; }
.dashboard-action-row {
  grid-template-columns: minmax(0, 1fr) 26px;
}
.dashboard-action-row > i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #f0f3f6;
  color: #687784;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}
.dashboard-action-row:hover > i {
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.dashboard-empty {
  padding: 22px 14px 26px;
}

@media (max-width: 560px) {
  .dashboard-panel .dashboard-order-list,
  .dashboard-panel .dashboard-customer-list,
  .dashboard-panel .dashboard-action-list { padding-left: 10px; padding-right: 10px; }
  .dashboard-panel .dashboard-order-row,
  .dashboard-panel .dashboard-customer-row,
  .dashboard-panel .dashboard-action-row { padding-left: 10px; padding-right: 10px; }
  .dashboard-row-action { min-width: 58px; padding-left: 5px; padding-right: 5px; }
  .dashboard-order-copy small,
  .dashboard-customer-copy small,
  .dashboard-action-copy small { font-size: 9px; }
}

/* v2.7 · 放大主导航与经营信息层级：更直观，但保留清透留白 */
.topbar {
  min-height: 84px;
  padding: 14px 40px;
  gap: 26px;
}
.topbar-brand { gap: 11px; }
.topbar-brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.topbar-brand strong { font-size: 16px; }
.topbar-brand small { margin-top: 5px; font-size: 10px; }
.topbar-nav { gap: 5px; }
.topbar-nav-item {
  height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.topbar-nav-item:hover { background: #f7f9fc; }
.topbar-nav-item.active {
  border-bottom-color: #d7e8fb;
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.topbar-nav-divider { height: 24px; margin: 0 5px; }
.topbar-team { min-width: 112px; }
.topbar-team-select { max-width: 132px; padding: 8px 25px 8px 10px; font-size: 12px; }
.topbar-team span { font-size: 9px; }
.topbar .search-box { width: 240px; height: 40px; }
.topbar .data-tools-button { height: 38px; padding: 0 12px; }
.topbar .profile-pill { font-size: 12px; }

.page-content { max-width: 1500px; padding: 38px 40px 60px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: 32px; }
.page-heading .subtitle { font-size: 12.5px; }
.eyebrow { font-size: 10px; margin-bottom: 9px; }
.metric-grid { gap: 16px; margin-bottom: 16px; }
.metric-card {
  min-height: 144px;
  padding: 21px 22px 18px;
  border-radius: 15px;
}
.metric-label { font-size: 12px; }
.metric-value { margin-top: 11px; font-size: 31px; }
.metric-unit { font-size: 13px; }
.metric-footer { margin-top: 14px; gap: 8px; }
.metric-note { font-size: 11px; }
.trend { font-size: 11px; }
.content-grid, .lower-grid, .analytics-grid, .alert-workspace, .detail-grid { gap: 16px; }
.panel, .table-panel { border-radius: 15px; }
.panel-header { padding: 20px 22px 15px; }
.panel-header h2 { font-size: 17px; }
.panel-header p { font-size: 11px; margin-top: 6px; }
.data-table { font-size: 12px; }
.data-table th { padding: 12px 16px; font-size: 10px; }
.data-table td { padding: 14px 16px; font-size: 12px; }
.table-toolbar { padding: 0 22px 16px; }
.list-summary { font-size: 12px; }

.dashboard-grid { gap: 16px; }
.dashboard-panel .dashboard-order-list,
.dashboard-panel .dashboard-customer-list,
.dashboard-panel .dashboard-action-list {
  gap: 8px;
  padding: 6px 18px 18px;
}
.dashboard-panel .dashboard-order-row,
.dashboard-panel .dashboard-customer-row,
.dashboard-panel .dashboard-action-row {
  padding: 14px 16px;
  border-radius: 12px;
}
.dashboard-order-copy strong,
.dashboard-customer-copy strong,
.dashboard-action-copy strong { font-size: 13px; }
.dashboard-order-copy small,
.dashboard-customer-copy small,
.dashboard-action-copy small { font-size: 11px; }
.dashboard-row-action { min-width: 74px; font-size: 10px; }
.dashboard-action-row { grid-template-columns: minmax(0, 1fr) 30px; }
.dashboard-action-row > i { width: 28px; height: 28px; }
.dashboard-opportunity-grid { gap: 14px; }
.dashboard-opportunity { min-height: 132px; padding: 18px; border-radius: 12px; }
.dashboard-opportunity small { font-size: 11px; }
.dashboard-opportunity strong { margin-top: 10px; font-size: 25px; }
.dashboard-opportunity span { margin-top: 10px; font-size: 11px; }
.dashboard-margin-panel .chart-area { padding-left: 22px; padding-right: 22px; }
.dashboard-margin-panel .chart-wrap { height: 240px; }

@media (max-width: 1200px) {
  .topbar { padding-left: 28px; padding-right: 28px; gap: 16px; }
  .topbar-nav { gap: 2px; }
  .topbar-nav-item { padding-left: 10px; padding-right: 10px; }
  .topbar .search-box { width: 205px; }
  .page-content { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 900px) {
  .topbar { padding: 12px 20px; }
  .topbar-nav-item { font-size: 12px; padding-left: 9px; padding-right: 9px; }
  .topbar-team { min-width: 100px; }
  .topbar-team-select { max-width: 112px; }
  .topbar .search-box { width: 180px; }
  .page-content { padding-left: 20px; padding-right: 20px; }
  .page-heading h1 { font-size: 29px; }
  .metric-card { min-height: 136px; }
}

@media (max-width: 700px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-brand { flex: 1 1 auto; }
  .topbar-actions { margin-left: auto; }
  .topbar-nav { order: 3; flex-basis: 100%; width: 100%; padding-top: 3px; }
  .topbar-nav-item { height: 36px; }
  .topbar .search-box, .topbar .data-tools-button, .topbar .notification-wrap, .topbar .profile-pill { display: none; }
  .page-content { padding: 28px 16px 44px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-heading h1 { font-size: 28px; }
  .metric-card { min-height: 132px; padding: 18px; }
  .metric-value { font-size: 28px; }
}

/* v2.8 · 固定式页头导航：导航分成品牌操作行与业务入口行，不使用横向滑动 */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand actions"
    "nav nav";
  min-height: 124px;
  padding: 14px 40px 11px;
  align-items: center;
  gap: 8px 24px;
}
.topbar-brand { grid-area: brand; }
.topbar-actions { grid-area: actions; justify-content: flex-end; }
.topbar-nav {
  grid-area: nav;
  width: 100%;
  min-width: 0;
  justify-content: center;
  overflow: visible;
  flex-wrap: nowrap;
  gap: 5px;
  padding-top: 1px;
}
.topbar-nav-item { flex: 0 0 auto; }

@media (max-width: 1200px) {
  .topbar { padding-left: 28px; padding-right: 28px; }
  .topbar-nav { justify-content: flex-start; }
  .topbar-nav-item { padding-left: 9px; padding-right: 9px; font-size: 12px; }
}

@media (max-width: 900px) {
  .topbar {
    min-height: 132px;
    padding: 12px 20px 10px;
    gap: 8px 16px;
  }
  .topbar-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 3px;
  }
}

@media (max-width: 700px) {
  .topbar {
    display: flex;
    min-height: 0;
    padding: 12px 16px 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .topbar-brand { flex: 1 1 auto; }
  .topbar-actions { margin-left: auto; }
  .topbar-nav {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
    gap: 3px;
    padding-top: 3px;
  }
  .topbar-nav-item { height: 34px; padding-left: 8px; padding-right: 8px; font-size: 11px; }
}

/* v2.9 · 紧凑单行固定导航：减少页头占用，避免挤压业务内容 */
.topbar {
  display: flex;
  min-height: 74px;
  height: 74px;
  padding: 10px 32px;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.topbar-brand { flex: 0 0 auto; }
.topbar-actions { flex: 0 0 auto; gap: 7px; }
.topbar-nav {
  order: 0;
  flex: 1 1 auto;
  width: auto;
  justify-content: center;
  overflow: visible;
  flex-wrap: nowrap;
  gap: 1px;
  padding-top: 0;
}
.topbar-nav-item {
  height: 36px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 12px;
}
.topbar-nav-divider { height: 20px; margin: 0 2px; }
.topbar-team { min-width: 100px; }
.topbar-team-select { max-width: 112px; padding: 7px 22px 7px 8px; font-size: 11px; }
.topbar-team span { font-size: 8px; }
.topbar .search-box { width: 180px; height: 36px; }
.topbar .data-tools-button { height: 34px; padding: 0 9px; }
.topbar .profile-pill { font-size: 11px; }

@media (max-width: 1250px) {
  .topbar { padding-left: 20px; padding-right: 20px; gap: 10px; }
  .topbar-nav-item { padding-left: 6px; padding-right: 6px; font-size: 11px; }
  .topbar .search-box { width: 150px; }
  .topbar-team { min-width: 88px; }
  .topbar-team-select { max-width: 98px; }
  .topbar-team span { display: none; }
  .topbar .data-tools-button > span:last-child { display: none; }
  .topbar .data-tools-button { width: 34px; padding: 0; }
}

@media (max-width: 1020px) {
  .topbar {
    height: auto;
    min-height: 108px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 8px;
  }
  .topbar-brand { flex: 1 1 auto; }
  .topbar-actions { margin-left: auto; }
  .topbar-nav {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
    gap: 2px;
    padding-top: 1px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 0;
    height: auto;
    padding: 10px 16px 8px;
    gap: 7px 10px;
  }
  .topbar-nav-item { height: 32px; padding-left: 7px; padding-right: 7px; font-size: 10.5px; }
}

/* v2.10 · 半年度毛利作为核心经营结果突出显示 */
.half-year-profit-item {
  border-color: rgba(0, 113, 227, .2);
  background: linear-gradient(145deg, #f5f9ff 0%, #ffffff 82%);
  padding: 16px 17px;
}
.half-year-profit-item span { color: var(--teal-dark); font-size: 11px; font-weight: 700; }
.half-year-profit-item strong {
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: -.055em;
}
.half-year-profit-item small { margin-top: 8px; font-size: 10px; }
.half-year-profit-item strong.negative { color: var(--coral); }
.half-year-profit-item strong.positive { color: var(--teal-dark); }

@media (max-width: 700px) {
  .half-year-profit-item strong { font-size: 24px; }
}

/* v2.11 · 半年度毛利主指标强化：确保与普通小指标明确区分 */
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item {
  min-height: 126px;
  padding: 20px 19px 17px;
  border: 1.5px solid rgba(0, 113, 227, .28);
  border-radius: 12px;
  background: linear-gradient(145deg, #edf6ff 0%, #ffffff 86%);
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item span {
  font-size: 13px !important;
  font-weight: 700;
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item strong {
  margin-top: 11px;
  font-size: 38px !important;
  line-height: 1.08;
  letter-spacing: -.06em;
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item small {
  margin-top: 9px;
  font-size: 10px !important;
}

@media (max-width: 900px) {
  .half-year-summary-panel .half-year-summary-grid .half-year-profit-item strong { font-size: 32px !important; }
}

@media (max-width: 700px) {
  .half-year-summary-panel .half-year-summary-grid .half-year-profit-item {
    min-height: 112px;
    padding: 16px 15px;
  }
  .half-year-summary-panel .half-year-summary-grid .half-year-profit-item strong { font-size: 28px !important; }
}

/* v2.12 · 财务色彩规则：上涨/毛利红色，下跌绿色；半年度毛利恢复普通指标大小 */
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item {
  min-height: 0;
  padding: 12px 13px;
  border: 1px solid #edf1f4;
  border-radius: 9px;
  background: #fbfcfd;
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item span {
  color: var(--muted);
  font-size: 10px !important;
  font-weight: 400;
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item strong {
  margin-top: 8px;
  font-size: 16px !important;
  letter-spacing: -.04em;
}
.half-year-summary-panel .half-year-summary-grid .half-year-profit-item small {
  margin-top: 7px;
  font-size: 9px !important;
}
.profit-value { color: var(--coral) !important; }
.trend.delta-trend.up { color: var(--coral) !important; }
.trend.delta-trend.down { color: #34c759 !important; }

/* v2.13 · 首页老客户业务变化：上涨/增长红色，下降绿色 */
.dashboard-change.positive {
  color: var(--coral) !important;
  background: #fff0ed !important;
}
.dashboard-change.negative {
  color: #34c759 !important;
  background: #eef8f0 !important;
}
.dashboard-change.positive i {
  color: var(--coral) !important;
  background: rgba(255, 59, 48, .1) !important;
}
.dashboard-change.negative i {
  color: #34c759 !important;
  background: rgba(52, 199, 89, .12) !important;
}

/* v2.13 · 订单台账横向查看时固定左侧订单/客户列 */
.order-table-panel .order-data-table th.ledger-col-order,
.order-table-panel .order-data-table td.ledger-order-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  box-shadow: 8px 0 12px rgba(29, 29, 31, .07);
}
.order-table-panel .order-data-table thead th.ledger-col-order {
  z-index: 8;
  background: #fafafa;
}
.order-table-panel .order-selectable-table th.ledger-col-select,
.order-table-panel .order-selectable-table td.ledger-select-cell {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #fff;
}
.order-table-panel .order-selectable-table thead th.ledger-col-select {
  z-index: 11;
  background: #fafafa;
}
.order-table-panel .order-selectable-table th.ledger-col-order,
.order-table-panel .order-selectable-table td.ledger-order-cell {
  left: 42px;
  z-index: 7;
}
.order-table-panel .order-selectable-table thead th.ledger-col-order {
  z-index: 10;
}

/* v2.14 · 客户分析新增来源与月均毛利列 */
.customer-analysis-table { min-width: 1420px; }
.customer-analysis-sort-direction { height: 30px; white-space: nowrap; }

/* v2.29 · Liquid Glass：全局毛玻璃界面层，保留数据颜色与表格可读性 */
:root {
  --glass-surface: rgba(255, 255, 255, .66);
  --glass-surface-strong: rgba(255, 255, 255, .78);
  --glass-surface-soft: rgba(255, 255, 255, .48);
  --glass-border: rgba(255, 255, 255, .84);
  --glass-border-dark: rgba(120, 139, 158, .2);
  --glass-blur: 24px;
  --glass-shadow: 0 14px 42px rgba(35, 55, 78, .08), 0 2px 8px rgba(35, 55, 78, .035), inset 0 1px 0 rgba(255, 255, 255, .72);
}

html {
  background: #eef3f8;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 113, 227, .13), transparent 28%),
    radial-gradient(circle at 92% 9%, rgba(175, 82, 222, .1), transparent 25%),
    radial-gradient(circle at 54% 100%, rgba(52, 199, 89, .08), transparent 30%),
    linear-gradient(135deg, #f5f8fc 0%, #edf3f8 52%, #f6f7fb 100%);
  background-attachment: fixed;
}

.app-shell {
  background: linear-gradient(135deg, rgba(246, 249, 253, .3), rgba(235, 242, 249, .18));
}

.login-screen {
  background:
    radial-gradient(circle at 16% 15%, rgba(0, 113, 227, .17), transparent 29%),
    radial-gradient(circle at 86% 82%, rgba(175, 82, 222, .12), transparent 28%),
    linear-gradient(135deg, #f5f8fc 0%, #eaf2f8 55%, #f7f8fb 100%);
}

.login-card,
.panel,
.table-panel,
.metric-card,
.chart-panel,
.action-panel,
.sales-focus-panel,
.insight-summary-panel,
.dashboard-panel,
.dashboard-margin-panel {
  background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface));
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.35);
}

.login-card {
  box-shadow: 0 24px 70px rgba(32, 56, 84, .14), inset 0 1px 0 rgba(255, 255, 255, .86);
}

.sidebar {
  background: linear-gradient(180deg, rgba(33, 38, 47, .88), rgba(17, 20, 26, .92)) !important;
  border-right: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 14px 0 42px rgba(16, 29, 44, .12), inset -1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  backdrop-filter: blur(28px) saturate(1.25);
}

.workspace-switcher,
.user-card,
.nav-item,
.sidebar-footer {
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}

.workspace-switcher {
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.nav-item:hover { background: rgba(255, 255, 255, .12); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 113, 227, .95), rgba(30, 144, 255, .74));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 24px rgba(0, 113, 227, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(248, 251, 254, .64) !important;
  border-bottom-color: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 28px rgba(50, 73, 98, .06), inset 0 -1px 0 rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
  backdrop-filter: blur(26px) saturate(1.45);
}

.topbar-nav-item,
.profile-pill,
.topbar-team,
.search-box,
.icon-button,
.data-tools-button,
.logout-button,
.notification-panel {
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.topbar-nav-item:hover { background: rgba(255, 255, 255, .64); }
.topbar-nav-item.active { background: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .76), 0 4px 14px rgba(34, 59, 88, .06); }
.search-box,
.icon-button,
.logout-button,
.select-control,
.period-select,
.mini-search {
  background: rgba(255, 255, 255, .57) !important;
  border-color: var(--glass-border-dark) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.search-box:focus-within,
.select-control:focus,
.period-select:focus,
.mini-search:focus { background: rgba(255, 255, 255, .78) !important; }

.metric-card::before,
.panel::before,
.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, .18), transparent 38%);
}
.panel,
.metric-card,
.login-card { position: relative; }
.metric-card,
.login-card { overflow: hidden; }
.panel > *, .metric-card > *, .login-card > * { position: relative; z-index: 1; }

.metric-card:hover,
.dashboard-margin-panel:hover,
.dashboard-panel:hover {
  border-color: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(35, 55, 78, .11), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.data-table th {
  background: rgba(239, 245, 250, .48) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .62);
}
.data-table td { border-top-color: rgba(150, 167, 182, .16); }
.data-table tr.clickable:hover { background: rgba(255, 255, 255, .48) !important; }
.table-panel > .table-scroll-body + .list-pagination { background: rgba(255, 255, 255, .58) !important; }

.table-horizontal-scrollbar { background: rgba(255, 255, 255, .38) !important; }
.table-horizontal-scrollbar.top { border-bottom-color: rgba(255, 255, 255, .72); }
.table-horizontal-scrollbar.bottom { border-top-color: rgba(255, 255, 255, .72); }
.table-horizontal-scrollbar-track { background: rgba(133, 153, 171, .22); }
.table-horizontal-scrollbar-thumb { background: rgba(86, 113, 137, .62); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42); }

.button.secondary,
.button.ghost,
.button.danger,
.filter-pill,
.segmented,
.tag,
.dashboard-opportunity,
.sales-focus-item,
.side-kpi,
.people-focus-card,
.people-focus-stage,
.customer-stat,
.half-year-summary-item,
.data-transfer-card,
.owner-item,
.owner-transfer-bar,
.quote-analysis-summary,
.insight-box,
.inline-customer-form {
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}

.button.secondary {
  background: rgba(255, 255, 255, .58) !important;
  border-color: rgba(120, 139, 158, .2) !important;
}
.button.secondary:hover { background: rgba(255, 255, 255, .82) !important; }
.button.ghost { background: rgba(0, 113, 227, .1) !important; }
.button.danger { background: rgba(255, 59, 48, .1) !important; }
.button.primary {
  background: linear-gradient(135deg, #0071e3, #268df0) !important;
  box-shadow: 0 8px 20px rgba(0, 113, 227, .19), inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

.filter-pill.active,
.segmented button.active { background: rgba(0, 113, 227, .13); }
.tag { border: 1px solid rgba(255, 255, 255, .54); }
.dashboard-opportunity {
  background: rgba(255, 255, 255, .46) !important;
  border-color: rgba(255, 255, 255, .72) !important;
}
.dashboard-opportunity:hover { background: rgba(255, 255, 255, .7) !important; }
.dashboard-opportunity.is-alert { background: rgba(255, 245, 244, .58) !important; }
.sales-focus-item, .insight-summary-grid > div { background: rgba(255, 255, 255, .24); }
.sales-focus-item:hover { background: rgba(255, 255, 255, .56); }
.side-kpi, .people-focus-card, .people-focus-stage, .customer-stat, .half-year-summary-item, .data-transfer-card, .owner-item, .owner-transfer-bar, .quote-analysis-summary, .insight-box, .inline-customer-form {
  background: rgba(255, 255, 255, .42) !important;
  border-color: rgba(255, 255, 255, .68) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.form-field input,
.form-field select,
.form-field textarea,
.owner-input,
.owner-select,
.operator-input,
.payment-select,
.unpaid-amount input,
.inline-date-input,
.inline-number-input,
.inline-source-select,
.inline-service-owner-input,
.inline-operator-input {
  background: rgba(255, 255, 255, .58) !important;
  border-color: rgba(120, 139, 158, .22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.owner-input:focus,
.owner-select:focus,
.operator-input:focus,
.payment-select:focus,
.unpaid-amount input:focus,
.inline-number-input:focus { background: rgba(255, 255, 255, .82) !important; }

.notification-panel,
.port-suggestions,
.customer-suggestions {
  background: rgba(248, 252, 255, .78) !important;
  border-color: rgba(255, 255, 255, .84) !important;
  box-shadow: 0 18px 48px rgba(28, 51, 76, .16), inset 0 1px 0 rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
}
.notification-item { background: transparent; }
.notification-item:hover,
.customer-suggestion:hover,
.port-suggestion:hover { background: rgba(255, 255, 255, .58); }

.modal-backdrop {
  background: rgba(28, 43, 60, .28);
  -webkit-backdrop-filter: blur(13px) saturate(1.2);
  backdrop-filter: blur(13px) saturate(1.2);
}
.modal {
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(241, 247, 252, .72));
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow: 0 28px 90px rgba(22, 43, 67, .2), inset 0 1px 0 rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
  backdrop-filter: blur(30px) saturate(1.35);
}
.modal-header { border-bottom-color: rgba(120, 139, 158, .16); }
.entry-modal,
.entry-modal:hover {
  background: #fff !important;
  background-image: none !important;
  border-color: #e2e8ee !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.data-modal,
.data-modal:hover {
  background: #fff !important;
  background-image: none !important;
  border-color: #e2e8ee !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.toast { background: rgba(29, 29, 31, .78); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 14px 32px rgba(20, 33, 48, .18); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }

.alert-banner,
.quote-followup-banner { -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
.alert-card { background: rgba(255, 255, 255, .2); }
.alert-card:hover { background: rgba(255, 255, 255, .42); }

.order-table-panel .order-data-table th.ledger-col-order,
.order-table-panel .order-data-table td.ledger-order-cell,
.order-table-panel .order-selectable-table th.ledger-col-select,
.order-table-panel .order-selectable-table td.ledger-select-cell {
  background: rgba(248, 252, 255, .78) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}
.order-table-panel .order-data-table thead th.ledger-col-order,
.order-table-panel .order-selectable-table thead th.ledger-col-select { background: rgba(236, 244, 250, .82) !important; }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel, .table-panel, .metric-card, .login-card { background: #fff; }
  .topbar { background: #f8fbfe !important; }
  .modal { background: #fff; }
}

/* v2.30 · 滚动性能：滚动区域独立合成，避免毛玻璃在每一帧重复重绘 */
.panel,
.metric-card,
.login-card {
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
  backdrop-filter: blur(18px) saturate(1.28);
}

.topbar {
  -webkit-backdrop-filter: blur(14px) saturate(1.28);
  backdrop-filter: blur(14px) saturate(1.28);
}

.table-panel,
.order-table-panel,
.customer-table-panel,
.quote-customer-table-panel {
  background: rgba(255, 255, 255, .78) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.table-scroll-body,
.analysis-range-scroll {
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  will-change: scroll-position;
}

.table-horizontal-scrollbar {
  contain: paint;
  will-change: auto;
}

.table-horizontal-scrollbar-thumb {
  transition: none;
}

/* v2.31 · 全局滚动轻量层：滚动时暂停高成本背景模糊，停止后自动恢复 */
html {
  scroll-behavior: auto;
}

body {
  background-attachment: scroll;
}

.panel .side-kpi,
.panel .people-focus-card,
.panel .people-focus-stage,
.panel .customer-stat,
.panel .half-year-summary-item,
.panel .data-transfer-card,
.panel .owner-item,
.panel .owner-transfer-bar,
.panel .quote-analysis-summary,
.panel .insight-box,
.panel .inline-customer-form,
.panel .dashboard-opportunity,
.panel .sales-focus-item {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.is-scrolling .topbar,
.is-scrolling .sidebar,
.is-scrolling .panel,
.is-scrolling .metric-card,
.is-scrolling .login-card,
.is-scrolling .modal,
.is-scrolling .notification-panel,
.is-scrolling .port-suggestions,
.is-scrolling .customer-suggestions {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.is-scrolling .topbar,
.is-scrolling .sidebar,
.is-scrolling .panel,
.is-scrolling .metric-card,
.is-scrolling .modal {
  box-shadow: 0 6px 22px rgba(35, 55, 78, .055), inset 0 1px 0 rgba(255, 255, 255, .62);
}

.is-scrolling .table-horizontal-scrollbar-thumb,
.is-scrolling * {
  scroll-behavior: auto;
}

/* v2.32 · 丝滑滚动：移除运行时模糊与滚动监听，保留静态玻璃材质 */
:root {
  --glass-blur: 0px;
}

/* backdrop-filter 会让页面滚动时反复采样并重绘后方内容；玻璃质感由静态渐变、边框和高光承担。 */
*,
*::before,
*::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body {
  background-attachment: scroll !important;
}

.topbar {
  background: rgba(248, 251, 254, .94) !important;
}

.panel,
.table-panel,
.metric-card,
.chart-panel,
.action-panel,
.sales-focus-panel,
.insight-summary-panel,
.dashboard-panel,
.dashboard-margin-panel,
.login-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(242, 247, 251, .84)) !important;
}

.panel .side-kpi,
.panel .people-focus-card,
.panel .people-focus-stage,
.panel .customer-stat,
.panel .half-year-summary-item,
.panel .data-transfer-card,
.panel .owner-item,
.panel .owner-transfer-bar,
.panel .quote-analysis-summary,
.panel .insight-box,
.panel .inline-customer-form,
.panel .dashboard-opportunity,
.panel .sales-focus-item {
  background: rgba(255, 255, 255, .72) !important;
}

.table-scroll-body,
.analysis-range-scroll {
  transform: translateZ(0);
}

