/* KILO-UI-01-v1. Shared presentation only; printable documents are server-owned. */
html { min-height: 100%; }
body {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 0 8%, #CFE6FF 0, transparent 52%),
    radial-gradient(ellipse at 100% 20%, #E6DCFA 0, transparent 52%),
    radial-gradient(ellipse at 10% 78%, #D8F3F0 0, transparent 46%),
    radial-gradient(ellipse at 92% 88%, #FBE1EA 0, transparent 48%),
    linear-gradient(140deg, var(--canvas), #FFF2E8);
  font-family: var(--font-sans, 'Segoe UI Variable Text', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif);
  color: var(--text);
}
button, a { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { border-radius: var(--radius-control); }
button, .pagehead .actions > a, .insight-actions > a, .pai-file-button {
  border-radius: var(--radius-control);
  background: var(--input);
  transition: background-color 120ms ease, border-color 120ms ease;
}
button { color: var(--secondary); }
button.primary, .pagehead .actions > a:first-child { background: var(--primary); color: #FFF; border-color: var(--primary); }
button.primary:hover { background: #185CA0; }
button.danger, .pagehead > .sale-header-actions > .danger { color: var(--danger); border-color: #DDB0B7; background: #FFF; }
button:disabled { opacity: 1; background: var(--neutral-soft); color: var(--neutral); border-color: var(--border); }
button.danger:disabled { color: var(--danger); background: var(--danger-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px;
}
.sidebar {
  width: 216px; padding: 20px 12px; border-right: 1px solid #FFFFFF;
  background: linear-gradient(155deg, #FFFFFFE6, #FFFFFFB3); box-shadow: 4px 0 20px #46679908;
}
.brand { display: block; color: var(--text); font-size: 44px; letter-spacing: -2px; line-height: 1; padding: 4px 12px 26px; }
.nav-link { border: 1px solid transparent; border-radius: 12px; min-height: 44px; padding: 10px 12px; margin: 4px 0; }
.nav-link.active { background: var(--glass-sheen), var(--blue); color: var(--primary); border-color: #FFF; box-shadow: var(--shadow-tile); }
.nav-link:hover { background: var(--info-soft); }
.nav-link svg { width: 20px; height: 20px; }
.shell { margin-left: 216px; }
.top { background: #FFFFFFA6; border-bottom-color: #FFF; }
.top-context { font-size: 13px; color: var(--secondary); }
.top-context > span { margin: 0 8px; color: var(--border); }
.top > span:last-of-type { color: var(--secondary); font-size: 13px; }
.top button { background: transparent; padding: 8px; }
.main { padding: 24px; }
.pagehead { margin: 12px 0 20px; align-items: center; }
.pagehead h1 { font-size: 28px; overflow-wrap: anywhere; }
.pagehead .actions:empty { display: none; }
.panel, .card, .stats, .kilo-business-extra {
  border-radius: var(--radius-panel); border: 1px solid #FFFFFF;
  background: linear-gradient(125deg, #FFFFFF80, #FFFFFF1A), var(--surface); box-shadow: var(--shadow-panel);
}
.panel { padding: 20px; margin-bottom: 16px; }
.panel > h2 { margin-bottom: 16px; }
.card { padding: 16px; }
.card .card, .panel .card, .panel .panel { box-shadow: none; border-color: #D6E1EE; }
.panel .panel { background: var(--surface-dense); }
.grid { gap: 20px 16px; }
.field label { font-size: 13px; margin-bottom: 8px; }
.field input, .field select, .field textarea, .filters input, .filters select, .allocation-row input, .allocation-row select, .quote-line input, #quote-revision {
  background: var(--input); border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--text);
}
.field input[readonly], .read-value { background: #F1F6FD; }
.field input[type=checkbox] { min-height: 18px; }
.read-value { border-radius: 10px; }
.field textarea { line-height: 1.6; }
.error-text, .opt-batch-error, .pai-difference { color: var(--danger); }
.filters { gap: 12px; align-items: flex-end; }
.filter-date-control { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--secondary); min-width: 160px; flex: 1 1 180px; }
.filter-date-control input { width: 100%; min-width: 0; }
.opt-filter-fields { padding: 0; background: transparent; }
.opt-filter-fields[open] { padding: 12px; background: #F1F6FD; margin-top: 8px; }
.filters select { padding-right: 30px; }
.tabs { border: 0; gap: 8px; flex-wrap: wrap; overflow: visible; }
.tabs > a, .tabs > button, .tabs[aria-label="客户与联系人分类"] > a, .insight-types > a, .insight-types > button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  white-space: normal; color: var(--secondary); background: var(--surface-dense);
}
.tabs > .active, .tabs > [aria-current=page], .tabs[aria-label="客户与联系人分类"] > a[aria-current=page], .insight-types [aria-current=true] {
  background: var(--blue); color: var(--primary); border: 1px solid #FFF; font-weight: 700;
}
.insight-types { flex-wrap: wrap; overflow: visible; }
.table th { background: #EAF2FD; font-size: 13px; font-weight: 600; }
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { border-color: #D6E1EE; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #F5F8FD; }
.status-chip { border-radius: var(--radius-tag); white-space: normal; text-align: left; line-height: 1.5; padding: 4px 8px; border: 0; }
.status-chip i { flex: 0 0 6px; }
.status-chip.neutral { color: var(--neutral); background: var(--neutral-soft); }
.status-chip.info { color: var(--info); background: var(--info-soft); }
.status-chip.warning { color: var(--warning); background: var(--warning-soft); }
.status-chip.success { color: var(--success); background: var(--success-soft); }
.status-chip.danger { color: var(--danger); background: var(--danger-soft); }
.notice { border-radius: 10px; background: var(--info-soft); color: var(--info); line-height: 1.6; }
.notice.warning { color: var(--warning); background: var(--warning-soft); }
.notice.error { color: var(--danger); background: var(--danger-soft); }
.notice.success { color: var(--success); background: var(--success-soft); }
.stats { padding: 16px; gap: 12px; }
.stats > .stat { --tile-tint: var(--blue); border: 1px solid #FFF; border-radius: 12px; padding: 12px; min-width: 0; background: var(--glass-sheen), var(--tile-tint); box-shadow: var(--shadow-tile); }
.stats > .stat:nth-child(4n+2) { --tile-tint: var(--green); }
.stats > .stat:nth-child(4n+3) { --tile-tint: var(--orange); }
.stats > .stat:nth-child(4n+4) { --tile-tint: var(--purple); }
.stats > a.stat strong, .stat strong { color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats > a.stat:hover { box-shadow: inset 0 0 0 1px var(--border); }
.kv { align-items: flex-start; }
.kv > strong { min-width: 0; }
.avatar { color: var(--primary); background: var(--blue); }
.stage { background: #F1F6FD; border-radius: 12px; border: 1px solid #FFF; }
.form-footer { border-top: 1px solid #D6E1EE; }
.modal-backdrop { background: #142B4966; }
.modal { background: var(--surface-dense); border: 1px solid white; border-radius: var(--radius-dialog); }
.modal .actions > button { flex-grow: 1; }
.modal .grid { margin: 16px 0; }
#toast { background: var(--text); border-radius: 10px; }
details { border-radius: 12px; background: #F1F6FD; }
summary { cursor: pointer; }
.insight-card, .insight-undated { border-color: white; }
.insight-metrics > a { padding: 12px; background: var(--blue); border-radius: 12px; }
.insight-metrics > a:nth-child(3n+2) { background: var(--green); }
.insight-metrics > a:nth-child(3n+3) { background: var(--orange); }
.insight-series-cash { color: var(--success); stroke: var(--success); }
.insight-trend a path.insight-series-cash { fill: var(--success); stroke: var(--success); }
.insight-cost-track { background: var(--blue); }
.insight-cost-bars > a:nth-child(2) .insight-cost-track > span { background: #3F805F; }
.insight-cost-bars > a:nth-child(3) .insight-cost-track > span { background: #8A5F99; }
.insight-search-entry { border-radius: 50%; color: var(--text); background: #FFFFFFE6; }
.insight-search-entry:hover { background: var(--blue); }
.quote-line-head { border-radius: 10px; background: #EAF2FD; }
.quote-line, .line-group { border-color: #D6E1EE; }
.line-group { background: transparent; }
.quote-summary { background: var(--blue); border-radius: 12px; padding: 20px; }
.line-tools button { border-radius: 8px; min-height: 40px; }
.cg-source .kv > strong { border-radius: 10px; background: #F1F6FD; }
.cg-footer { border-radius: 12px; }
.cg-invalid { border-color: var(--danger)!important; }
.cg-errors button { color: var(--danger); }
#cg-sale-lines { border-radius: 12px; border-color: #D6E1EE; }
.pai-line { border-radius: 12px; border-color: #D6E1EE; background: var(--surface-dense); }
.pai-drop { background: var(--blue); border-radius: 12px; border-color: var(--primary); }
.pai-drop p { margin: 8px 0; }
.pai-file-button, .company-stamp-preview { border-radius: 10px; }
.pai-review { color: var(--secondary); }
.pai-line-body { padding-top: 12px; }
.pai-line > summary { background: #F1F6FD; }
.opt-filter-chips button { background: var(--info-soft); color: var(--info); border-color: transparent; }
.opt-progress-grid { padding: 4px 0; }
.pagehead > .sale-header-actions { width: auto; max-width: 540px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.pagehead > .sale-header-actions > a, .pagehead > .sale-header-actions > button { border-radius: 10px; }
.lifecycle-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lifecycle-action { padding: 12px; background: var(--neutral-soft); border-radius: 12px; }
.kilo-document-management > .panel { padding: 0; margin: 16px 0 0; border: 0; background: transparent; }
.kilo-document-management .card { padding: 12px; background: #F5F8FD; }
.kilo-document-management .card .actions > div { width: 100%; padding: 8px 0; }
.kilo-document-management .card a { display: inline-flex; align-items: center; min-height: 44px; }
/* DLC-01 uses the approved kilo surfaces, controls and semantic status colors. */
.dlc-quote-editor { max-width: 1040px; }
.dlc-version-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.dlc-version-bar label { color: var(--secondary); font-size: 13px; }
.dlc-version-bar select, .dlc-version-bar #quote-revision { flex: 1 1 300px; width: min(100%,560px); max-width: 560px; min-width: 0; min-height: 44px; padding: 10px 32px 10px 12px; background: var(--input); color: var(--text); border: 1px solid var(--border); }
.dlc-comparison .kv { padding: 10px 0; }
.dlc-comparison .kv strong { font-variant-numeric: tabular-nums; }
.modal button.danger:not(:disabled) { background: var(--danger); color: #FFF; border-color: var(--danger); }
@media (max-width:767px) {
  .dlc-version-bar { align-items: stretch; }
  .dlc-version-bar > label { flex: 1 0 100%; font-size: 14px; }
  .dlc-version-bar select, .dlc-version-bar #quote-revision { flex-basis: 100%; width: 100%; max-width: none; min-height: 48px; font-size: 16px; }
}
@media (min-width:768px) {
  /* Keep each input named for assistive technology beneath the shared column heading. */
  .quote-line label > span { display: block; position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width:768px) and (max-width:1199px) {
  #quote-lines { overflow-x: auto; }
  .quote-line, .quote-line-head { min-width: 860px; }
}
@media (min-width:1200px) {
  .pagehead > .sale-header-actions { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .pagehead > .sale-header-actions:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pagehead > .sale-header-actions:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width:1024px) {
  .panel:has(> .kv) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 32px; }
  .panel:has(> .kv) > :not(.kv), .panel:has(> .kv) > .kv-actions { grid-column: 1/-1; }
}

/* A single data-backed workbench at both widths. */
.kilo-dashboard { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; align-items: stretch; }
.kilo-dashboard > .panel { margin: 0; }
.kilo-quick { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.kilo-quick-action {
  --tile-tint: var(--blue); --tile-ink: #2868A9;
  display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 20px;
  background: var(--glass-sheen), var(--tile-tint); color: var(--text); border: 1px solid #FFF; border-radius: 16px; box-shadow: var(--shadow-panel);
}
.kilo-quick-action:nth-child(2) { --tile-tint: var(--green); --tile-ink: #347552; }
.kilo-quick-action:nth-child(3) { --tile-tint: var(--orange); --tile-ink: #9B622D; }
.kilo-quick-action:nth-child(4) { --tile-tint: var(--purple); --tile-ink: #7560A8; }
.kilo-quick-action:hover { outline: 1px solid var(--border); }
.kilo-action-icon { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border: 1px solid #FFFFFFCC; border-radius: 13px; background: var(--glass-sheen), var(--tile-tint); box-shadow: var(--shadow-tile); }
.kilo-quick-action svg { width: 30px; height: 30px; flex: none; color: var(--tile-ink); }
.kilo-action-arrow { margin-left: auto; color: var(--secondary); font-size: 20px; font-weight: 400; }
.kilo-quick-action strong { font-size: 20px; }
.kilo-quick-action small { display: none; }
.kilo-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kilo-section-head h2 { margin: 0; }
.kilo-section-head > a { font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; text-align: right; }
.kilo-dashboard h2 { display: flex; align-items: center; gap: 10px; }
.kilo-dashboard h2 svg { display: none; }
.kilo-pending { grid-column: 1; grid-row: 2; }
.kilo-pending .opt-pending-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.kilo-pending .opt-pending { --tile-tint: var(--blue); --tile-ink: #2868A9; border: 1px solid #FFF; border-radius: 10px; background: var(--glass-sheen), var(--tile-tint); box-shadow: var(--shadow-tile); padding: 0; }
.kilo-pending .opt-pending:nth-child(6n+2) { --tile-tint: var(--green); --tile-ink: #347552; }
.kilo-pending .opt-pending:nth-child(6n+3) { --tile-tint: var(--orange); --tile-ink: #9B622D; }
.kilo-pending .opt-pending:nth-child(6n+4) { --tile-tint: var(--purple); --tile-ink: #7560A8; }
.kilo-pending .opt-pending:nth-child(6n+5) { --tile-tint: var(--pink); --tile-ink: #A7466C; }
.kilo-pending .opt-pending:nth-child(6n+6) { --tile-tint: var(--cyan); --tile-ink: #267D80; }
.kilo-pending .opt-pending summary { min-height: 44px; padding: 10px 12px; font-weight: 500; gap: 8px; }
.kilo-pending .opt-pending summary > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kilo-pending .opt-pending summary svg { width: 20px; height: 20px; flex: none; color: var(--tile-ink); }
.kilo-pending .opt-pending summary b { margin-left: auto; }
.kilo-pending .opt-pending summary::after { content: '›'; color: var(--secondary); font-size: 18px; }
.kilo-pending .opt-pending[open] summary::after { transform: rotate(90deg); }
.kilo-pending .opt-pending summary b { font-size: 18px; color: var(--text); }
.kilo-pending .opt-pending[open] { grid-column: 1/-1; }
.kilo-pending .opt-pending > a { border-top-color: #FFFFFF99; font-weight: 400; }
.kilo-follow { grid-column: 2; grid-row: 2; }
.kilo-finance { grid-column: 1/-1; }
.kilo-dashboard .stats { padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
.kilo-dashboard .stats .stat { padding: 12px; }
.kilo-dashboard .stat strong { margin-top: 4px; font-size: 24px; }
.mobile-summary-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; min-width: 0; color: var(--text); border-bottom: 1px solid #D6E1EE; }
.mobile-summary-row > span:first-child { flex: 1; min-width: 0; }
.mobile-summary-row strong, .mobile-summary-row small { display: block; overflow-wrap: anywhere; }
.mobile-summary-row small { margin-top: 4px; }
.mobile-summary-row .status-chip { flex: none; }
.mobile-todo-row, .mobile-quote-row { display: flex; gap: 12px; align-items: center; }
.mobile-todo-row .mobile-summary-row, .mobile-quote-row .mobile-summary-row { flex: 1; min-width: 0; }
.mobile-todo-row button, .mobile-quote-row button { flex: none; }
.mobile-todo-row .mobile-summary-row { border-bottom: 0; }
.kilo-business-extra { grid-column: 1/-1; background: transparent; border: 0; box-shadow: none; padding: 0; }
.kilo-business-extra > summary { display: none; }
.kilo-extra-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; }
.kilo-extra-grid > .panel { margin: 0; }
.kilo-extra-grid > .panel > a:not(.mobile-summary-row) { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; }
.kilo-recent-table + .kilo-recent-cards { display: none; }
.kilo-recent-table .table td { padding: 12px 8px; }
.kilo-recent-table .table th { padding: 10px 8px; }
.kilo-recent-table button { padding: 6px 10px; }
.kilo-install-icon { display: block; width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 20px; }
.mobile-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mobile-counts a { display: flex; align-items: center; gap: 8px; color: var(--secondary); min-height: 44px; }
.mobile-counts strong { color: var(--text); font-size: 20px; }
.kilo-more-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 1fr; gap: 16px; align-items: stretch; }
.kilo-more-grid .panel { margin: 0; min-width: 0; }
.mobile-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mobile-entry { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px; color: var(--text); background: linear-gradient(125deg, #FFFFFFC7, #F5F8FD66); border: 1px solid white; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-tile); }
.entry-icon { --tile-tint: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; color: #385D84; background: var(--glass-sheen), var(--tile-tint); border: 1px solid #FFFFFFCC; box-shadow: var(--shadow-tile); border-radius: 10px; }
.entry-icon svg { width: 24px; height: 24px; }
.mobile-entry:nth-child(6n+2) .entry-icon { --tile-tint: var(--green); }
.mobile-entry:nth-child(6n+3) .entry-icon { --tile-tint: var(--orange); }
.mobile-entry:nth-child(6n+4) .entry-icon { --tile-tint: var(--cyan); }
.mobile-entry:nth-child(6n+5) .entry-icon { --tile-tint: var(--purple); }
.mobile-entry:nth-child(6n+6) .entry-icon { --tile-tint: var(--pink); }
.mobile-entry:hover { border-color: var(--border); }
.mobile-account-actions { display: flex; gap: 12px; }
.mobile-account-actions button { flex: 1; }
/* FLOW-01: the desktop settings hub and mobile More share saved data and routes. */
.settings-hub .kilo-more-grid { grid-auto-rows: auto; }
.settings-hub .kilo-more-grid > .settings-group { min-height: 0; margin: 0; }
.settings-hub [data-settings-mobile], .settings-hub [hidden] { display: none; }
.settings-group h2 { margin-bottom: 12px; }
.settings-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 64px; padding: 10px 0; text-align: left; color: var(--text); background: transparent; border: 0; border-radius: 10px; box-shadow: none; }
.settings-row:hover { background: var(--info-soft); }
.settings-row-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; line-height: 1.5; }
.settings-row-copy strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.settings-row-copy small { font-size: 12px; font-weight: 400; color: var(--secondary); overflow-wrap: anywhere; }
.settings-row-arrow { flex: none; padding: 0 4px; font-size: 22px; color: var(--secondary); }
.settings-company-status { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.8; color: var(--secondary); overflow-wrap: anywhere; }
.settings-account-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.settings-logout { min-height: 44px; padding: 8px 0; border: 0; background: transparent; box-shadow: none; color: var(--secondary); font-weight: 400; }
.settings-logout:hover { color: var(--danger); background: transparent; }
.settings-hub :is(a,button):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media(max-width:767px) {
  .settings-hub [data-settings-mobile] { display: block; }
  .settings-hub [data-desktop-app-section] { display: none; }
}
.login-card { width: 360px; }
.login h1 { font-size: 68px; letter-spacing: -3px; }
.login .subtitle { font-size: 18px; margin-top: 12px; }
.login .panel { margin-top: 28px; padding: 24px; border-radius: 20px; }
.login .panel h2 { font-size: 24px; margin-bottom: 24px; }
.login .form-footer { border: 0; margin-top: 22px; padding: 0; background: transparent; }
.login button.primary { min-height: 48px; }
.login-access, .login-online { text-align: center; color: var(--secondary); font-size: 12px; margin-top: 20px; }
.login-online { margin-top: 28px; }

@media (min-width:768px) and (max-width:1100px) {
  .kilo-quick-action { padding: 16px 12px; gap: 8px; }
  .kilo-quick-action strong { font-size: 16px; }
  .kilo-quick-action svg { width: 28px; }
  .kilo-dashboard, .kilo-extra-grid { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
  .kilo-dashboard .stat strong { font-size: 20px; }
  .kilo-more-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
}
@media (max-width:767px) {
  .sidebar, .top { display: none; }
  .shell { margin: 0; }
  .main { padding: 16px 16px calc(var(--mobile-nav-height) + 24px + env(safe-area-inset-bottom)); }
  .pagehead { margin: 0 0 16px; }
  .pagehead h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pagehead .actions { margin-top: 0; }
  .pagehead:has(.actions:empty) { display: none; }
  .mobiletop { height: 64px; border: 0; padding: 0 16px; background: var(--surface-dense); gap: 12px; }
  .mobiletop > button { flex: 0 0 44px; font-size: 28px; color: var(--text); background: transparent; }
  .mobile-title { flex: 1; min-width: 0; }
  .mobile-title strong { font-size: 18px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-title small { display: block; font-size: 12px; margin-top: 4px; font-weight: 400; }
  .mobiletop-home { height: 64px; background: #F5F8FDEB; }
  .mobiletop-home .mobile-title { padding-left: 14px; border-left: 1px solid #9EB6D1; }
  .mobiletop-home .mobile-title strong { font-size: 22px; }
  .mobile-brand { color: var(--text); font-size: 38px; letter-spacing: -2px; line-height: 1; }
  .insight-search-entry { width: 44px; min-height: 44px; margin-left: auto; }
  .bottomnav { min-height: var(--mobile-nav-height); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid #D6E1EE; gap: 8px; background: var(--surface-dense); }
  .bottomnav > a { flex: 1; min-width: 0; min-height: 56px; padding: 4px; border-radius: 12px; gap: 2px; }
  .bottomnav svg { width: 22px; height: 22px; margin: 0; }
  .bottomnav > a.active { background: var(--blue); color: var(--primary); }
  .panel, .mobile-dashboard .panel, .mobile-more .panel { padding: 16px; margin-bottom: 16px; }
  .panel h2, .mobile-dashboard h2, .mobile-more h2 { font-size: 18px; }
  .field label { font-size: 14px; }
  .field input, .field select, .field textarea, .filters input, .filters select { font-size: 16px; min-height: 48px; }
  .field input[type=checkbox] { min-height: 18px; }
  button, .tabs > a, .tabs > button { min-height: 44px; }
  .tabs, .insight-types { gap: 8px; }
  .tabs > a, .tabs > button, .tabs[aria-label="客户与联系人分类"] > a { padding: 8px 12px; }
  .opt-filter-chips button { font-size: 13px; min-height: 44px; }
  .opt-record .card-head a { display: block; min-height: 44px; }
  .mobilecards .card-head a { display: flex; align-items: center; min-height: 44px; }
  .filters > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .mobilecards .kv-actions { display: block; }
  .mobilecards .kv-actions > span { display: none; }
  .mobilecards .kv-actions > strong { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; max-width: none; gap: 8px; }
  .mobilecards .kv-actions > strong > br { display: none; }
  .mobilecards .kv-actions > strong > a, .mobilecards .kv-actions > strong > button { display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-height: 44px; background: var(--input); }
  .mobilecards [data-action^="recycle:"] { color: var(--danger); border-color: #DDB0B7!important; }
  .filters#filters .opt-filter-top > button { flex: 1 1 0; min-width: 0; }
  .filter-date-control { flex: 1 1 100%; width: 100%; font-size: 14px; }
  .form-footer { position: static; background: transparent; padding-bottom: 0; z-index: auto; }
  .form-footer .actions { gap: 12px; }
  .cg-footer { position: static; margin-top: 20px; padding: 16px; background: var(--surface-dense); }
  #cg-editor, #cg-terms-form { padding-bottom: 0; }
  .quote-line { padding: 16px; border-radius: 12px; background: var(--surface-dense); }
  .quote-line .line-brand, .quote-line .line-model { grid-column: auto; }
  .quote-line label:has([data-col=unit]) { grid-column: 1/-1; }
  .quote-line label > span, .line-total > span { font-size: 14px; }
  .quote-line input { text-align: left; }
  .quote-line .line-total { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--blue); border-radius: 10px; }
  .line-total > span { margin: 0; }
  .line-number > strong { border-radius: 8px; }
  .line-tools { flex-wrap: wrap; }
  .line-tools button { min-height: 44px; }
  .quote-summary { padding: 16px; }
  .pai-line > summary { padding: 14px; }
  .pai-dialog { border-radius: 0; }
  .pai-fields .field label { font-size: 14px; }
  .pai-fields > .field:has([data-col=unit]), .pai-fields > .field:has([data-col=amount]) { grid-column: 1/-1; }
  .pai-dialog footer { background: var(--surface-dense); }
  .opt-progress-grid { gap: 16px 10px; }
  .opt-progress-grid small { font-size: 12px; }
  .pagehead > .sale-header-actions { width: 100%; max-width: none; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kilo-dashboard { display: flex; flex-direction: column; gap: 12px; }
  .kilo-dashboard > * { width: 100%; }
  .kilo-dashboard > .panel { margin: 0; padding: 12px; }
  .kilo-dashboard h2 { font-size: 16px; }
  .kilo-dashboard .kilo-section-head { margin-bottom: 4px; }
  .kilo-finance > h2 { margin-bottom: 12px; }
  .kilo-pending .opt-pending-grid { gap: 6px; }
  .kilo-quick { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); grid-template-rows: repeat(3,44px); gap: 6px 10px; margin-bottom: 0; }
  .kilo-quick-action { min-height: 44px; padding: 8px 12px; gap: 10px; border-radius: 14px; box-shadow: var(--shadow-tile); }
  .kilo-quick-action:first-child { grid-row: 1/4; flex-direction: column; justify-content: center; gap: 10px; box-shadow: var(--shadow-panel); }
  .kilo-quick-action svg { width: 26px; height: 26px; }
  .kilo-action-icon { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
  .kilo-quick-action:first-child .kilo-action-icon { width: 54px; height: 54px; border: 1px solid #FFFFFFCC; border-radius: 14px; background: var(--glass-sheen), var(--blue); box-shadow: var(--shadow-tile); }
  .kilo-quick-action:first-child .kilo-action-arrow { display: none; }
  .kilo-quick-action:first-child svg { width: 38px; height: 38px; }
  .kilo-quick-action strong { font-size: 17px; }
  .kilo-quick-action:first-child strong { font-size: 20px; }
  .kilo-quick-action small { display: block; font-size: 12px; }
  .kilo-section-head { margin-bottom: 12px; gap: 8px; }
  .kilo-section-head > a { font-size: 12px; min-height: 44px; }
  .kilo-section-head h2 { margin: 0; }
  .kilo-pending .opt-pending summary { font-size: 13px; padding: 8px; min-height: 44px; gap: 5px; }
  .kilo-pending .opt-pending summary > span { gap: 5px; }
  .kilo-pending .opt-pending summary svg { width: 18px; height: 18px; }
  .kilo-pending .opt-pending summary b { font-size: 18px; }
  .kilo-finance .stats { gap: 8px; }
  .kilo-dashboard .stats .stat { padding: 8px 10px; }
  .kilo-dashboard .stat strong { font-size: 22px; line-height: 1.3; }
  .kilo-dashboard .stat small { font-size: 13px; line-height: 1.4; }
  .kilo-follow { background: linear-gradient(125deg, #FFFFFFCC, #FFFFFF80), var(--orange); }
  .mobile-summary-row strong { font-size: 16px; }
  .mobile-summary-row small { font-size: 14px; }
  .mobile-todo-row { align-items: flex-start; gap: 8px; }
  .mobile-todo-row .mobile-summary-row { display: flex; align-items: center; padding: 4px 0; }
  .mobile-todo-row .mobile-summary-row strong { font-size: 14px; }
  .mobile-todo-row .mobile-summary-row small { font-size: 12px; }
  .mobile-todo-row .status-chip { margin-top: 0; font-size: 12px; }
  .mobile-todo-row > button { color: #6C439E; border-color: #AF93CF; margin-top: 4px; }
  .kilo-business-extra { border: 1px solid #FFF; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-panel); padding: 8px 12px; }
  .kilo-business-extra > summary { display: flex; gap: 12px; align-items: center; min-height: 44px; list-style: none; }
  .kilo-business-extra > summary::-webkit-details-marker { display: none; }
  .kilo-business-extra > summary > svg { width: 24px; height: 24px; color: #385D84; }
  .kilo-business-extra > summary > span { margin-left: auto; font-size: 24px; color: var(--secondary); }
  .kilo-business-extra[open] > summary > span { transform: rotate(90deg); }
  .kilo-extra-grid { grid-template-columns: 1fr; margin-top: 12px; }
  .kilo-extra-grid > .panel { padding: 12px 0; border: 0; background: transparent; box-shadow: none; }
  .kilo-recent-table + .kilo-recent-cards { display: block; }
  .mobile-counts { grid-template-columns: repeat(2,minmax(0,1fr)); border: 0; margin: 0; padding: 0; }
  .mobile-counts a { font-size: 14px; flex-direction: row; justify-content: flex-start; }
  .kilo-more-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 16px; }
  .kilo-more-grid .panel { margin: 0; }
  .mobile-entry-grid { gap: 10px; }
  .mobile-entry { font-size: 14px; padding: 10px; gap: 10px; min-height: 60px; }
  .entry-icon { width: 34px; height: 34px; }
  .login { align-items: flex-start; padding-top: max(48px,10vh); }
  .login h1 { font-size: 56px; }
  .login .panel h2 { font-size: 22px; }
  .login .panel { padding: 24px; }
  .login .form-footer { position: static; }
  .login-access, .login-online { font-size: 13px; }
}
@media (max-width:374px) {
  .mobiletop-home { gap: 10px; }
  .mobile-brand { font-size: 34px; }
  .mobiletop-home .mobile-title { padding-left: 10px; }
  .mobile-title small { font-size: 12px; }
  .kilo-dashboard .stat strong { font-size: 20px; }
  .kilo-quick-action { padding: 8px; }
  .kilo-quick-action strong { font-size: 16px; }
  .kilo-pending .opt-pending summary { font-size: 13px; }
}
@supports (backdrop-filter:blur(8px)) {
  /* Only the two fixed mobile bars blur; scrolling cards never do. */
  @media (max-width:767px) {
    .mobiletop, .bottomnav { background: #FFFFFFE6; backdrop-filter: blur(8px); }
  }
}
@media (prefers-reduced-transparency:reduce) {
  .panel, .card, .sidebar, .top, .mobiletop, .bottomnav, .modal { background: #FFF; backdrop-filter: none; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition: none!important; scroll-behavior: auto!important; }
}
