:root {
  --brand-900: #0b3b2e; --brand-700: #0d705c; --brand-600: #158269;
  --surface: #fff; --canvas: #f5f7f6; --border: #e2e8e4;
  --text-primary: #17231e; --text-secondary: #5e6d65;
  --success: #176749; --warning: #986019; --danger: #b33730;
  --ink: var(--text-primary); --muted: var(--text-secondary); --paper: var(--canvas);
  --panel: var(--surface); --line: var(--border); --brand: var(--brand-700);
  --brand-dark: var(--brand-900); --shadow: none;
}
html { scroll-behavior: auto; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--brand-700); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #ca9028; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button, .primary, .secondary, .secondary-button, .button-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 15px; border: 1px solid var(--brand-700); border-radius: 5px; background: var(--brand-700); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .button:hover, .primary:hover { background: var(--brand-900); color: #fff; text-decoration: none; }
.secondary, .secondary-button, button.secondary, .button.secondary-button { background: #fff; color: var(--text-primary); border-color: #c5d2ca; }
.secondary:hover, .secondary-button:hover { background: #edf3ef; color: var(--brand-900); }
.danger-light { color: var(--danger); background: #fff; border-color: #e0b8b5; }
.text-link { color: var(--brand-700); background: none; border: 0; padding: 0; }
.muted, small, .boundary { color: var(--text-secondary); }
small { font-size: 12px; }
td small { display: block; margin-top: 2px; }
h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.6px; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 19px; line-height: 1.4; margin: 0; }
h3 { font-size: 16px; }
p { margin: 8px 0; }
.eyebrow { display: none; }
.page { width: calc(100% - 64px); max-width: 1440px; margin: 0 auto; padding: 28px 0 40px; }
.page-heading, .page-header, .cf-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.page-heading p, .page-header p { margin: 4px 0 0; }
.page-heading .muted, .cf-heading .muted { font-size: 14px; }
.topbar { min-height: 68px; background: var(--brand-900); box-shadow: none; }
.topbar-inner { display: flex; width: calc(100% - 48px); max-width: 1680px; min-height: 68px; gap: 25px; }
.brand { flex-shrink: 0; font-size: 15px; gap: 9px; font-weight: 650; }
.brand-mark { background: #e6f1eb; color: var(--brand-900); border-radius: 5px; width: 30px; height: 30px; }
.main-nav { gap: 2px; flex: 1; white-space: nowrap; }
.main-nav a { font-size: 14px; padding: 11px 10px; border-radius: 4px; color: #e0eae4; }
.main-nav a[aria-current="page"] { color: #fff; background: #245647; box-shadow: inset 0 -2px #bdd9c9; }
.nav-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; font-size: 14px; }
.nav-actions > a { color: #eef7f1; }
.nav-actions .nav-create { min-height: 34px; padding: 5px 12px; background: #eff7f1; border-color: #eff7f1; color: var(--brand-900); }
.nav-count { display: inline-block; min-width: 19px; padding: 0 5px; margin-left: 3px; border-radius: 3px; background: #315d4e; font-size: 12px; text-align: center; }
.nav-group summary { padding: 7px 0; color: #eef7f1; font-size: 14px; cursor: pointer; }
.nav-group summary::after { content: '⌄'; margin-left: 7px; }
.nav-group-menu { top: 36px; right: 0; left: auto; min-width: 200px; border-radius: 5px; box-shadow: 0 4px 12px #102d2614; }
.nav-group-menu a, .nav-group-menu .link-button { display: block; color: var(--text-primary); padding: 8px 12px; font-size: 14px; text-align: left; min-height: 0; width: 100%; background: #fff; border: 0; font-weight: 400; }
.nav-group-menu .account-identity { padding: 8px 12px 12px; margin: 0 0 4px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 13px; }
.nav-group-menu .link-button:hover { background: #edf3ef; }
.skip-link { position: absolute; top: -90px; left: 16px; z-index: 4000; padding: 10px; background: white; color: var(--brand-900); }
.skip-link:focus { top: 10px; }
.panel, .primary-panel, .card, .table-wrap, .inquiry-form-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: none; }
.panel, .card { padding: 22px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { color: #506057; background: #f8faf8; font-weight: 600; text-align: left; white-space: nowrap; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.cell-title { font-weight: 600; color: var(--text-primary); }
.badge, .status-badge, .candidate-chip, .cf-stage { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid #d4e4d9; border-radius: 4px; color: #315c46; background: #edf5ef; font-size: 12px; white-space: nowrap; }
.status-badge.warning, .candidate-chip { color: #805014; border-color: #eed8b5; background: #fff6e8; }
.status-badge.neutral { background: #f2f4f3; color: #637168; border-color: var(--border); }
.table-actions { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.historical-order-reference { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; max-width: 360px; }
.historical-order-reference small { color: var(--text-muted); }
.historical-reference-value { max-width: 240px; overflow: hidden; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.copy-reference-button { min-height: 30px; padding: 3px 9px; }
.copy-reference-status { min-width: 3em; color: var(--brand-700); }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 16px; background: white; border: 1px solid var(--border); border-radius: 6px; }
label { font-size: 14px; }
.filter-bar label, .form-grid > label, .inquiry-relation-grid label { display: grid; gap: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { border: 1px solid #bdccc3; background: #fff; color: var(--text-primary); border-radius: 4px; min-height: 38px; padding: 7px 10px; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--brand-700); }
.filter-search { flex: 1; min-width: 220px; }
.filter-more { width: 100%; border-top: 1px solid var(--border); padding-top: 10px; }
summary { cursor: pointer; color: var(--brand-700); font-size: 14px; }
.more-grid { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding-top: 16px; }
.check-label { display: flex !important; align-items: center; gap: 8px; }
.workflow-tabs, .segmented-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border-bottom: 1px solid var(--border); padding: 0 0 10px; margin: 0 0 18px; }
.workflow-tabs a, .segmented-tabs a { padding: 7px 14px; border-radius: 4px; color: var(--text-secondary); font-size: 14px; }
.workflow-tabs a.active, .segmented-tabs a[aria-current="page"] { background: #e4f0e8; color: var(--brand-900); font-weight: 600; }
.metric-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 6px; background: white; overflow: hidden; }
.metric-strip > div, .metric-strip > a, .metric-strip .metric { display: grid; gap: 5px; padding: 16px 22px; border: 0; border-right: 1px solid var(--border); background: transparent; border-radius: 0; }
.metric-strip > :last-child { border-right: 0; }
.metric-strip span { font-size: 13px; color: var(--text-secondary); }
.metric-strip strong { font-size: 28px; line-height: 1.3; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.section-head { padding: 18px 22px; margin: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.section-head a, .section-count { font-size: 13px; }
.today-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 22px; }
.today-panel { background: white; border: 1px solid var(--border); border-radius: 6px; }
.today-actions { display: grid; grid-template-columns: repeat(2,1fr); padding: 8px 22px 14px; }
.today-action { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 16px 15px 0; border-bottom: 1px solid var(--border); }
.today-action:nth-last-child(-n+2) { border-bottom: 0; }
.today-action strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.today-action span { color: var(--text-primary); font-size: 15px; }
.today-action em { font-style: normal; font-size: 13px; color: var(--text-secondary); margin-left: 12px; }
.today-stats { display: grid; grid-template-columns: repeat(2,1fr); margin: 0; padding: 15px 22px; gap: 18px 24px; }
.today-stats dt { color: var(--text-secondary); font-size: 13px; }
.today-stats dd { font-size: 27px; font-weight: 650; margin: 2px 0 0; line-height: 1.3; font-variant-numeric: tabular-nums; }
.today-stats .currency { font-size: 23px; }
.alert-banner, .flash { background: #fff8ec; color: #765020; border: 1px solid #ead6b5; padding: 11px 16px; border-radius: 5px; margin: 0 0 18px; font-size: 14px; }
.flash-stack { width: calc(100% - 64px); max-width: 1440px; margin: 16px auto 0; }
.empty, .calm-state, .cf-empty { padding: 48px 24px !important; text-align: center; color: var(--text-secondary); }
.empty strong, .calm-state strong, .cf-empty strong { display: block; font-size: 17px; color: var(--text-primary); }
.empty p, .calm-state p, .cf-empty p { font-size: 14px; margin: 8px 0 16px; }
.pagination, .cf-pagination { display: flex; justify-content: flex-end; gap: 18px; align-items: center; margin: 16px 0 0; font-size: 14px; }
.form-shell { max-width: 1060px; margin: 0 auto; }
.form-section { padding: 22px 26px; border-bottom: 1px solid var(--border); }
.form-section h2 { margin-bottom: 18px; }
.section-number { color: var(--brand-700); margin-right: 10px; font-size: 15px; }
.form-meta, .form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px 24px; }
.form-meta { grid-template-columns: 220px 1fr; margin-bottom: 20px; }
.form-meta label { display: grid; gap: 6px; }
.wide-field { grid-column: 1 / -1; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { font-size: 14px; margin-bottom: 8px; }
.chip-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group > div > div { flex: 1; min-width: 112px; }
.chip-group label { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border: 1px solid #c9d6ce; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.chip-group label:has(input:checked) { border-color: var(--brand-700); background: #eaf4ed; color: var(--brand-900); font-weight: 600; }
.chip-group label:has(input:focus-visible) { outline: 3px solid #ca9028; outline-offset: 2px; }
.result-chips > div { display: grid; grid-template-columns: repeat(4,1fr); }
.inquiry-relations { margin: 0; padding: 18px 26px; }
.inquiry-relation-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 16px; }
.form-actions { display: flex; gap: 12px; padding: 18px 26px; background: #fafcfb; border-top: 1px solid var(--border); }
.errorlist, .form-errors { color: var(--danger); font-size: 14px; padding-left: 18px; }
.center-groups { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; margin-top: 22px; }
.center-group { border: 1px solid var(--border); background: white; border-radius: 6px; padding: 22px; }
.center-group h2 { margin-bottom: 14px; }
.center-link { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--border); color: var(--text-primary); }
.center-link strong { display: block; font-size: 15px; font-weight: 600; }
.center-link small { display: block; margin-top: 2px; }
.center-link::after { content: '→'; color: var(--brand-700); margin-left: 18px; }
.low-frequency { margin-top: 22px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 6px; }
.low-frequency .section-links { margin-top: 12px; display: flex; gap: 24px; }
.identity-table td, .classification-table td { vertical-align: top; }
.row-review { min-width: 210px; }
.row-review > summary { min-height: 30px; padding: 3px 0; }
.row-review form { display: grid; gap: 12px; margin-top: 14px; }
.row-review label { display: grid; gap: 6px; }
.row-review .check-label { white-space: normal; font-size: 13px; }
.role-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.role-quick-actions form { display: inline-flex; }
.role-quick-actions button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.role-suggestion { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px dashed #91a69a; border-radius: 3px; background: #f8fbf9; color: #4f5f68; font-size: 12px; font-weight: 650; }
.role-suggestion em, .role-suggestion b { padding: 0 4px; border-radius: 2px; background: #e6eee9; color: #456255; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .04em; }
.role-suggestion.role-customer { background: #e4f1e8; color: #245c43; }
.role-suggestion.role-developer { background: #e8edf1; color: #40576a; }
.role-suggestion.role-partner { background: #f0eee7; color: #625a42; }
.role-suggestion.role-other { background: #f0f2f1; color: #68736e; }
.role-suggestion.confidence-high { border-color: #4f7d66; }
.role-suggestion.confidence-normal { opacity: .88; }
.role-suggestion.is-stale { border-color: #b8b8b0; color: #77776e; }
.role-review-tabs { display: flex; gap: 6px; margin: 18px 0 10px; border-bottom: 1px solid var(--border); }
.role-review-tabs a { padding: 8px 14px; color: var(--text-secondary); }
.role-review-tabs a[aria-current="page"] { margin-bottom: -1px; border-bottom: 2px solid var(--brand-700); color: var(--brand-900); font-weight: 700; }
.role-review-tabs span { display: inline-grid; min-width: 20px; place-items: center; padding: 0 5px; border-radius: 99px; background: #e8f0eb; font-size: 11px; }
.role-review-filters { display: flex; align-items: end; gap: 12px; margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.role-review-filters label { gap: 4px; }
.ai-batch-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 8px 12px; border-radius: 6px; background: #f0f5f2; color: var(--text-secondary); font-size: 13px; }
.ai-review-drawer { min-width: 155px; }
.ai-review-drawer > summary { color: var(--brand-700); font-weight: 650; }
.ai-review-panel { position: fixed; z-index: 40; top: 0; right: 0; width: min(520px, 92vw); height: 100vh; overflow-y: auto; padding: 28px; border-left: 1px solid var(--border); background: #fff; box-shadow: -14px 0 36px rgb(24 50 40 / 16%); }
.ai-review-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ai-review-panel > header div { display: grid; gap: 3px; }
.ai-review-panel > header strong { font-size: 20px; }
.ai-review-panel > header span:not(.role-suggestion) { color: var(--text-secondary); font-size: 13px; }
.ai-review-panel h3 { margin: 18px 0 8px; font-size: 14px; }
.ai-review-panel li { margin: 5px 0; line-height: 1.45; }
.ai-review-panel > small { display: block; margin-top: 18px; color: var(--text-secondary); }
.ai-review-panel .role-quick-actions { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.ai-review-panel .developer-action { display: flex; gap: 6px; }
.ai-review-panel select { min-width: 150px; }
.ai-confidence { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.ai-confidence span { color: var(--text-secondary); font-size: 12px; }
.li-bo-review { margin-bottom: 18px; }
.li-bo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.li-bo-card { padding: 16px; border: 1px solid var(--border); border-radius: 7px; background: #fbfcfb; }
.li-bo-card > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.li-bo-card > header div { display: flex; align-items: center; gap: 8px; }
.li-bo-card > header small { color: var(--text-secondary); }
.li-bo-card dl { display: grid; gap: 7px; margin: 14px 0; }
.li-bo-card dl div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.li-bo-card dt { color: var(--text-secondary); }
.li-bo-card dd { margin: 0; }
.li-bo-card li { margin: 5px 0; }
.li-bo-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.li-bo-actions button { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.classification-table td > small { display: block; margin-top: 3px; }
.technical-info { padding: 12px 0 0; font-size: 12px; }
.technical-info summary { font-size: 12px; color: var(--text-secondary); }
.account-panel { max-width: 850px; }
.account-facts { display: flex; gap: 64px; margin: 24px 0; }
.account-facts dt { font-size: 13px; color: var(--text-secondary); }
.account-facts dd { margin: 6px 0 0; font-size: 18px; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cf-controls { border-radius: 6px; }
.cf-heading h1 { font-size: 30px; }
.cf-tabs a, .cf-quick a, .cf-table { font-size: 14px; }
.cf-table td { padding: 12px 16px; }
.cf-table th { font-size: 13px; padding: 12px 16px; }
.cf-search input { min-width: 340px; }
.cf-next { max-width: 270px; }
.cf-summary { margin: 15px 0 10px; }
.cf-owner-row { padding: 10px 0; }
.cf-history-link { font-size: 13px; }
.cf-badges span { font-size: 12px; }
.cf-more summary { font-size: 14px; }
.cf-review { font-size: 13px; }
.cf-import-time, .cf-fallback { font-size: 12px; }
.order-form-panel, .quick-paste-panel { max-width: 1060px; margin-left: auto; margin-right: auto; }
.interaction-progress::after { animation: none; width: 70%; box-shadow: none; }
@media (max-width: 1250px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 24px; padding: 12px 0; }
  .brand { flex: 1; } .main-nav { order: 3; width: 100%; flex: auto; margin-top: 10px; }
  .page { width: calc(100% - 40px); }
  .cf-search input { min-width: 240px; }
}
@media (max-width: 850px) {
  .li-bo-grid { grid-template-columns: 1fr; }
  .role-review-filters { align-items: stretch; flex-direction: column; }
}
@media (max-width: 850px) {
  .today-grid, .center-groups { grid-template-columns: 1fr; }
  .nav-actions { flex-wrap: wrap; gap: 10px; }
  .brand { margin-bottom: 10px; }
  .topbar-inner { align-items: flex-start; }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .form-grid, .form-meta, .inquiry-relation-grid { grid-template-columns: 1fr; }
  .chip-group > div, .result-chips > div { display: grid; grid-template-columns: repeat(2,1fr); }
  .page-heading, .cf-heading { align-items: flex-start; }
  .cf-toolbar { flex-wrap: wrap; }
  .cf-search input { min-width: 0; }
  .main-nav { overflow-x: auto; }
  .today-stats dd { font-size: 24px; }
  .page { width: calc(100% - 28px); padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Workspace UX V1 final visual polish. Presentation only. */
:root { --content-width: 1580px; --form-content-width: 1000px; }
body { font-size: 15.5px; line-height: 1.55; }
small { font-size: 13px; line-height: 1.4; }
.page, .flash-stack { width: calc(100% - 64px); max-width: var(--content-width); }
.page:has(.customer-followup) { max-width: var(--content-width); }
.topbar { min-height: 72px; }
.topbar-inner { width: calc(100% - 64px); max-width: 1840px; min-height: 72px; gap: 32px; align-items: center; }
.brand { font-size: 15.5px; }
.main-nav { gap: 4px; }
.main-nav a { padding: 11px 12px; font-size: 15px; font-weight: 520; }
.main-nav a[aria-current="page"] { background: #245b4a; box-shadow: inset 0 -3px #c4dfcf; }
.nav-actions { gap: 18px; padding-left: 22px; border-left: 1px solid rgb(255 255 255 / 16%); font-size: 14.5px; }
.nav-group summary { font-size: 14.5px; }
.page { padding-top: 32px; }
.page-heading, .page-header, .cf-heading { margin-bottom: 24px; }
.page-heading .muted, .cf-heading .muted { font-size: 14.5px; }
.panel, .primary-panel, .card, .table-wrap, .inquiry-form-panel, .center-group { border-color: #dce5df; box-shadow: 0 1px 2px rgb(20 51 41 / 4%); }
table { font-size: 14.5px; }
th { height: 48px; padding: 13px 17px; font-size: 14px; }
td { min-height: 50px; padding: 13px 17px; }
label, summary, .workflow-tabs a, .segmented-tabs a, .pagination, .cf-pagination { font-size: 14.5px; }
.badge, .status-badge, .candidate-chip, .cf-stage { font-size: 13px; }
.metric-strip { margin-bottom: 22px; }
.metric-strip > div, .metric-strip > a, .metric-strip .metric { padding: 18px 24px; }
.metric-strip span { font-size: 13.5px; }
.metric-strip strong { font-size: 30px; }
.section-head { padding: 19px 24px; }
.today-grid { grid-template-columns: 1.35fr 1fr; gap: 24px; margin-bottom: 24px; }
.today-panel { border-color: #d8e3dc; box-shadow: 0 2px 8px rgb(20 61 47 / 5%); }
.today-actions { padding: 9px 24px 15px; }
.today-action { margin: 0 -8px; padding: 17px 12px; border-radius: 5px; transition: background-color 120ms ease, color 120ms ease; }
.today-action:hover { background: #f0f6f2; text-decoration: none; }
.today-action strong { font-size: 31px; color: var(--brand-900); }
.today-action span { font-size: 15.5px; }
.today-stats { padding: 18px 24px; gap: 20px 26px; }
.today-stats dt { font-size: 13.5px; }
.today-stats dd, .today-stats .currency { font-size: 32px; font-weight: 700; }
.today-stats .currency { color: var(--brand-700); letter-spacing: -.5px; }

/* Clear customer scope and status groups without changing their query semantics. */
.customer-followup { font-size: 14.5px; }
.customer-followup .cf-heading { margin-bottom: 18px; }
.customer-followup h1 { font-size: 30px; }
.customer-followup .cf-controls { padding: 15px 18px; }
.customer-followup .cf-tabs a, .customer-followup .cf-quick a { padding: 7px 11px; font-size: 14px; }
.customer-followup .cf-scope-tabs:has(a:only-child) { display: none; }
.customer-followup .cf-filter-group { display: flex; align-items: center; gap: 14px; padding-top: 10px; margin-top: 9px; border-top: 1px solid var(--cf-line); }
.customer-followup .cf-filter-label { flex: 0 0 38px; color: #41534a; font-size: 13px; letter-spacing: .04em; }
.customer-followup .cf-owner-row { margin-top: 9px; }
.customer-followup .cf-filter-row { padding-top: 10px; }
.customer-followup .cf-summary { font-size: 13px; margin-top: 14px; }
.customer-followup .cf-table { font-size: 14px; }
.customer-followup .cf-table th { height: 48px; padding: 12px 14px; font-size: 13.5px; }
.customer-followup .cf-table td { min-height: 50px; height: 50px; padding: 10px 14px; font-size: 14px; }
.customer-followup .cf-next:empty::before { content: '暂无待办'; color: var(--text-secondary); }
.customer-followup .cf-next { color: #586961; }
.customer-module-tabs { display: flex; gap: 4px; margin: 0 0 10px; border-bottom: 1px solid var(--border); }
.customer-module-tabs a { padding: 6px 14px 7px; color: var(--text-secondary); font-size: 14.5px; }
.customer-module-tabs a[aria-current="page"] { margin-bottom: -1px; border-bottom: 2px solid var(--brand-700); color: var(--brand-900); font-weight: 700; }

/* Dense inquiry and project actions retain all existing operations. */
.inquiry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-width: 210px; }
.inquiry-summary { display: block; max-width: 30rem; margin-top: 4px; color: var(--text-secondary); line-height: 1.45; }
.relation-missing { color: var(--text-secondary); font-size: 12px; }
.field-help { color: var(--text-secondary); font-weight: 400; }
.row-actions { position: relative; }
.row-actions > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 30px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-secondary); font-size: 18px; line-height: 1; list-style: none; }
.row-actions > summary::-webkit-details-marker { display: none; }
.row-actions-body { min-width: 210px; padding: 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: 5px; background: white; box-shadow: 0 6px 18px rgb(22 48 39 / 10%); white-space: normal; }
.row-actions-body > a { display: block; margin-bottom: 10px; }
.row-actions-body form, .row-actions-body label { display: grid; gap: 7px; }

.customer-inquiries-panel .panel-head { align-items: start; }
.customer-inquiries-panel .panel-head p { margin: 4px 0 0; }
.customer-level-follow-up { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: baseline; padding: 12px; border: 1px solid #dce5df; border-radius: 8px; background: #f7faf8; }
.customer-level-follow-up p { grid-column: 1 / 3; margin: 0; }
.customer-level-follow-up > a { grid-column: 3; grid-row: 1 / 3; align-self: center; }
.customer-inquiry-list { display: grid; gap: 10px; margin-top: 12px; }
.customer-inquiry-card { padding: 12px; border: 1px solid #e3e9e6; border-radius: 8px; background: #fff; }
.customer-inquiry-card header { display: flex; justify-content: space-between; gap: 16px; }
.customer-inquiry-card header > div { display: grid; gap: 3px; }
.customer-inquiry-card header > div:last-child { text-align: right; }
.customer-inquiry-card header span, .customer-inquiry-summary > span { color: var(--text-secondary); font-size: 12px; }
.customer-inquiry-summary { margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf1ef; }
.customer-inquiry-summary p { margin: 4px 0 0; line-height: 1.55; }
.customer-inquiry-card footer { display: flex; gap: 16px; margin-top: 10px; }
.order-money > strong { display: block; font-size: 19px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.order-money small { display: flex; gap: 14px; margin-top: 4px; }
.order-money .order-refund { color: var(--warning); }
.order-developer > strong { font-weight: 600; }

/* Operating pages use a six-metric first layer and a focused daily form. */
.operating-completeness, .operating-overview, .operating-staff-results { margin-top: 20px; }
.operating-completeness.is-incomplete { border-left: 4px solid #d29a3c; }
.operating-completeness > p { margin: 14px 0; }
.data-definition { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.data-definition ul { margin: 12px 0 0; padding-left: 22px; color: var(--text-secondary); }
.operating-primary-metrics { grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 10px; }
.financial-summary-grid.operating-primary-metrics dd { margin: 6px 0 0; font-size: 27px; font-variant-numeric: tabular-nums; }
.operating-primary-metrics .featured-metric { background: #eaf4ee; box-shadow: inset 0 0 0 1px #cfe2d5; }
.financial-summary-grid .featured-metric dd { color: var(--brand-700); font-size: 30px; }
.operating-primary-metrics small { display: block; margin-top: 5px; }
.operating-more { margin-top: 12px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 5px; background: #fafcfb; }
.operating-secondary-metrics { grid-template-columns: repeat(6, minmax(135px, 1fr)); }
.financial-summary-grid.operating-secondary-metrics dd { margin: 5px 0 0; font-size: 20px; }
.operating-staff-results table { min-width: 1380px; }
.operating-staff-results th { font-size: 14px; }
.operating-input-shell { max-width: var(--form-content-width); margin: 0 auto; }
.operating-date-picker { width: fit-content; }
.operating-input-panel { padding: 26px; }
.operating-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; margin: 22px 0 16px; }
.operating-input-grid label { display: grid; gap: 7px; }
.operating-input-hint { font-size: 13px; }

@media (max-width: 1450px) {
  .topbar-inner { width: calc(100% - 40px); gap: 20px; }
  .main-nav a { padding-inline: 9px; font-size: 14.5px; }
  .nav-actions { gap: 12px; padding-left: 14px; font-size: 14px; }
  .page, .flash-stack { width: calc(100% - 40px); }
  .operating-primary-metrics, .operating-secondary-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1250px) {
  .topbar-inner { align-items: center; }
  .nav-actions { border-left: 0; padding-left: 0; }
}
@media (max-width: 850px) {
  body { font-size: 15px; }
  .customer-followup .cf-filter-group { align-items: flex-start; }
  .order-money small { flex-direction: column; gap: 1px; }
  .operating-primary-metrics, .operating-secondary-metrics, .operating-input-grid { grid-template-columns: 1fr; }
}

.historical-settlement-table { min-width: 1180px; }
.historical-settlement-table th:nth-child(1) { width: 112px; }
.historical-settlement-table th:nth-child(2) { width: 176px; }
.historical-settlement-table th:nth-child(7) { width: 230px; }
.settlement-payment-display { display: grid; gap: 3px; justify-items: start; }
.settlement-payment-display strong { white-space: nowrap; }
.settlement-amount-editor { display: grid; gap: 7px; min-width: 210px; }
.settlement-amount-editor label { display: flex; align-items: center; gap: 4px; }
.settlement-amount-editor input[type="number"] { width: 112px; }
.settlement-amount-editor input[name="reason"] { width: 100%; min-width: 190px; }
.inline-form-actions { display: flex; gap: 6px; }
.inline-action-status { min-height: 1.4em; margin: 6px 0 0; color: var(--success); }
.inline-action-status.error { color: var(--danger); }
[data-inline-payment-form] { margin: 0; }
[data-settlement-item] td { vertical-align: top; }

/* Product Experience P1: task domains, business-first previews and stateful details. */
.domain-tabs { margin-bottom: 22px; }
.customer-detail-tabs { margin: -6px 0 22px; }
.task-domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.task-domain-card { position: relative; padding: 26px; }
.task-domain-card > span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e6f1eb; color: var(--brand-800); font-weight: 700; }
.task-domain-card h2 { margin: 14px 0 8px; }
.task-domain-card p { min-height: 48px; color: var(--text-secondary); }
.cf-times { display: grid; gap: 3px; color: var(--text-secondary); white-space: nowrap; }
.cf-times span:first-child { color: var(--text-primary); }
.import-summary { padding: 24px; }
.import-summary h2 { margin-top: 0; }
.import-summary-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
.import-summary-grid .needs-attention { background: #fff8e8; box-shadow: inset 0 0 0 1px #ead39c; }
.import-summary-grid .has-error { background: #fff0ee; box-shadow: inset 0 0 0 1px #ecc5bf; }
.success-note { color: var(--success); font-weight: 650; }
.technical-info { margin-top: 14px; color: var(--text-secondary); }
.technical-info > summary { width: fit-content; cursor: pointer; }
.technical-facts { display: grid; gap: 7px; margin-top: 12px; word-break: break-all; }
.technical-facts div { display: grid; grid-template-columns: 90px 1fr; }
.technical-facts dt { color: var(--text-secondary); }
.import-batch-actions { margin: 16px 0; }
.import-review-list { display: grid; gap: 12px; }
.import-review-card { padding: 20px 22px; border-left: 4px solid #a8bbb0; }
.import-review-card.is-review { border-left-color: #d29a3c; }
.import-review-card.is-error { border-left-color: var(--danger); }
.import-review-card.is-ready { border-left-color: var(--success); }
.import-review-card > header { display: flex; justify-content: space-between; gap: 16px; }
.import-review-card > header span { color: var(--text-secondary); font-size: 13px; }
.import-review-card h2 { margin: 4px 0 0; font-size: 19px; }
.import-advice { margin: 10px 0; }
.import-business-facts { display: flex; gap: 28px; margin: 0 0 12px; }
.import-business-facts div { display: flex; gap: 7px; }
.import-business-facts dt { color: var(--text-secondary); }
.import-row-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.import-row-actions form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.cb-preview mark { padding: 1px 4px; border-radius: 3px; background: #fff1a8; color: #4f4317; }
.cb-message.is-search-hit .cb-bubble { outline: 3px solid #e2b53d; outline-offset: 3px; }

@media (max-width: 980px) {
  .task-domain-grid { grid-template-columns: 1fr; }
  .import-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .customer-level-follow-up { grid-template-columns: 1fr; }
  .customer-level-follow-up p, .customer-level-follow-up > a { grid-column: 1; grid-row: auto; }
  .customer-inquiry-card header { flex-direction: column; }
  .customer-inquiry-card header > div:last-child { text-align: left; }
}
