:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #047857;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --warning: #a16207;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --canvas: #f8fafc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
img { max-width: 100%; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }

.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(226,232,240,.92); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar-inner { width: min(760px, 100%); height: 66px; margin: auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.topbar-inner.wide { width: min(1180px, 100%); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--primary); color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 6px 14px rgba(37,99,235,.22); }
.brand-mark.large { width: 52px; height: 52px; border-radius: 15px; font-size: 26px; }
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; gap: 8px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #475569; transition: .2s ease; }
.icon-button:hover, .icon-button.active { background: var(--primary-soft); color: var(--primary); }

.page { width: min(760px, 100%); min-height: calc(100vh - 66px); margin: 0 auto; padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }
.page.wide, .share-page.wide { width: min(1180px, 100%); }
.auth-page { width: 100%; max-width: none; padding: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.page-head h1 { margin: 2px 0 6px; font-size: clamp(28px, 5vw, 38px); letter-spacing: -.04em; line-height: 1.15; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow, .step-kicker { margin: 0; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin: 4px 0 4px; font-size: clamp(22px, 4vw, 28px); letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--muted); }
.section-heading.with-action { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.button { min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: background .2s ease, border-color .2s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.success { background: var(--success); color: #fff; }
.button.ghost { background: #fff; border-color: var(--line); color: #334155; }
.button.soft { background: var(--primary-soft); color: var(--primary-dark); border-color: #dbeafe; }
.button.small { min-height: 44px; padding: 7px 12px; font-size: 14px; }
.button.full { width: 100%; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(37,99,235,.3); outline-offset: 2px; }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px, 100%); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.bottom-nav a { min-height: 52px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; color: #64748b; font-size: 12px; font-weight: 700; }
.bottom-nav a.active { color: var(--primary); background: var(--primary-soft); }
.bottom-nav .icon { width: 21px; height: 21px; }
.bottom-nav .nav-primary { color: var(--primary); }

.toast-stack { position: fixed; z-index: 80; top: 76px; right: 16px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 16px; border-radius: 11px; background: #0f172a; color: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.2); animation: toast-in .25s ease both; }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.login-shell { min-height: 100vh; padding: 48px 18px; display: grid; place-items: center; align-content: center; background: #f8fafc; }
.login-brand { width: min(430px, 100%); display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-brand h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.login-brand p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.login-card { width: min(430px, 100%); padding: 26px; }
.login-footer { color: #94a3b8; font-size: 13px; margin-top: 28px; }
.demo-note { margin-top: 18px; padding: 13px 15px; display: grid; gap: 3px; border-radius: 10px; background: #f8fafc; color: #64748b; font-size: 13px; }
.demo-note strong { color: #334155; }

.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 700; color: #334155; }
.field b { color: var(--danger); }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
input:disabled { background: #f1f5f9; color: #94a3b8; }
.login-card .field { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.form-grid.single { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }
.form-grid.compact { flex: 1; gap: 12px; }
.alert { padding: 13px 15px; margin-bottom: 16px; border-radius: 10px; font-size: 14px; }
.alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert.warning { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; }
.alert ul { margin: 7px 0 0; padding-left: 19px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.metrics article { padding: 18px; display: grid; align-content: center; min-height: 100px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.metrics span { color: var(--muted); font-size: 13px; font-weight: 600; }
.metrics strong { margin-top: 5px; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; }
.metrics small { color: var(--muted); }
.list-toolbar { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 14px; }
.search-field { flex: 1; }
.search-field input { max-width: 360px; background: #fff; }
.quote-list { display: grid; gap: 13px; }
.quote-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.quote-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow); }
.quote-main { position: relative; display: block; padding: 18px; }
.quote-card-top { display: flex; justify-content: space-between; align-items: center; color: #94a3b8; font-size: 12px; }
.quote-card h2 { margin: 13px 0 2px; padding-right: 130px; font-size: 19px; line-height: 1.3; letter-spacing: -.02em; }
.quote-card p { margin: 0; color: var(--muted); }
.quote-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 15px; color: #64748b; font-size: 13px; }
.quote-amount { position: absolute; top: 54px; right: 18px; color: var(--primary-dark); font-size: 21px; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status.active { background: #eff6ff; color: #1d4ed8; }
.status.confirmed { background: var(--success-soft); color: var(--success); }
.status.expired { background: #f1f5f9; color: #64748b; }
.quote-actions { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); background: #f8fafc; }
.quote-actions a, .quote-actions button { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #475569; font-size: 14px; }
.quote-actions > *:last-child { border-right: 0; }
.quote-actions .icon { width: 17px; height: 17px; }
.empty-state { padding: 60px 24px; display: grid; justify-items: center; text-align: center; border: 1px dashed #cbd5e1; border-radius: 14px; background: #fff; }
.empty-state.compact { padding: 30px 20px; }
.empty-state h2, .empty-state h3 { margin: 12px 0 4px; }
.empty-state p { max-width: 420px; margin: 0 0 18px; color: var(--muted); }
.empty-icon { width: 42px; height: 42px; color: #94a3b8; }

.wizard-shell { width: 100%; }
.wizard-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 18px; }
.wizard-head > div { text-align: center; }
.wizard-head h1 { margin: 0; font-size: 22px; }
.wizard-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: #475569; font-weight: 700; justify-self: start; }
.save-state { justify-self: end; color: #94a3b8; font-size: 13px; }
.stepper { margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(8,1fr); list-style: none; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 4px; color: #94a3b8; font-size: 11px; }
.stepper li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 2px; background: #e2e8f0; z-index: -1; }
.stepper li:first-child::before { display: none; }
.stepper span { width: 29px; height: 29px; display: grid; place-items: center; border: 2px solid #e2e8f0; border-radius: 50%; background: var(--canvas); font-weight: 800; }
.stepper li.active { color: var(--primary); }
.stepper li.active span { border-color: var(--primary); background: var(--primary); color: #fff; }
.stepper li.done span { border-color: var(--success); background: var(--success); color: #fff; }
.stepper li.done::before, .stepper li.active::before { background: #86efac; }
.wizard-stage { min-height: 430px; padding: 25px; }
.wizard-actions { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 20; padding: 12px 0; display: flex; justify-content: flex-end; gap: 10px; background: rgba(248,250,252,.93); backdrop-filter: blur(10px); }
.wizard-summary { margin-top: 12px; padding: 13px 17px; display: flex; justify-content: flex-end; gap: 32px; box-shadow: none; }
.wizard-summary div { display: grid; }
.wizard-summary span { color: var(--muted); font-size: 12px; }
.wizard-summary strong { color: var(--primary-dark); }
.builder-list, .room-config-list { display: grid; gap: 13px; }
.builder-card { position: relative; padding: 16px 90px 16px 58px; display: flex; align-items: end; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.builder-index { position: absolute; left: 15px; top: 24px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.remove-button { position: absolute; right: 14px; bottom: 17px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--danger); }
.inline-total { margin-top: 14px; padding: 14px 16px; display: flex; justify-content: space-between; border-radius: 10px; background: #f8fafc; }
.empty-inline { margin: 0; padding: 14px; color: #94a3b8; text-align: center; }
.config-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.config-group-head { min-height: 64px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.config-group-head span { color: var(--muted); font-size: 12px; }
.config-group-head h3 { margin: 0; font-size: 17px; }
.chip-list, .assembly-chips { padding: 15px; display: flex; flex-wrap: wrap; gap: 10px; }
.editable-chip, .gang-picker { display: flex; align-items: center; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 10px; background: var(--primary-soft); }
.editable-chip select, .gang-picker select { width: auto; min-height: 44px; border: 0; background: transparent; color: #1e40af; font-weight: 700; }
.editable-chip button, .gang-picker button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--danger); }
.position-builder, .panel-position { padding: 15px; border-bottom: 1px solid var(--line); }
.position-builder:last-child, .panel-position:last-child { border-bottom: 0; }
.position-builder-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.position-builder .assembly-chips { padding: 12px 0 0; }
.panel-position > h4 { margin: 0 0 10px; font-size: 15px; }
.panel-assembly { padding: 12px; margin-bottom: 10px; border-radius: 11px; background: #f8fafc; }
.assembly-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.assembly-head span { color: var(--primary-dark); font-weight: 800; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; }
.module-select { min-width: 0; display: grid; gap: 5px; }
.module-select > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.module-select select { min-height: 44px; font-size: 14px; }
.module-select small { color: var(--primary-dark); font-weight: 700; }
.label-card { padding: 16px; border-bottom: 1px solid var(--line); }
.label-card:last-child { border-bottom: 0; }
.label-card > div:first-child span { color: var(--muted); font-size: 12px; }
.label-card h3 { margin: 2px 0 12px; font-size: 16px; }
.label-inputs { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 10px; }
.label-inputs input { min-height: 44px; }
.fee-layout { display: grid; grid-template-columns: 1.35fr .85fr; gap: 20px; }
.fee-layout h3 { margin: 0 0 12px; font-size: 16px; }
.fee-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.fee-row { min-height: 62px; padding: 9px 12px; display: grid; grid-template-columns: 45px 1fr minmax(130px, 180px); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.fee-row:last-child { border-bottom: 0; }
.fee-row.final-offer { background: var(--success-soft); }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; display: block; padding: 3px; border-radius: 999px; background: #cbd5e1; transition: .2s ease; }
.switch span::after { content: ""; width: 18px; height: 18px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.2); transition: .2s ease; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.fee-input { position: relative; }
.fee-input input { padding-right: 34px; min-height: 44px; text-align: right; }
.fee-input span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.fee-subhead { min-height: 52px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
.fee-subhead button { min-height: 40px; border: 0; background: transparent; color: var(--primary); font-weight: 700; }
.other-fees { border-bottom: 1px solid var(--line); }
.other-fee-row { padding: 0 12px 10px; display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; }
.other-fee-row input { min-height: 44px; }
.other-fee-row button { border: 0; background: transparent; color: var(--danger); }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input { width: 20px; min-height: 20px; margin-top: 2px; }
.check-row span { display: grid; }
.check-row small { color: var(--muted); }
.live-total { margin-top: 18px; padding: 20px; display: grid; border-radius: 12px; background: #0f172a; color: #fff; }
.live-total span, .live-total small { color: #cbd5e1; }
.live-total strong { margin: 5px 0; font-size: 29px; letter-spacing: -.04em; }
.review-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.review-grid h3 { margin: 0; font-size: 21px; }
.review-grid > section > p { margin: 3px 0 16px; color: var(--muted); }
.review-rooms { display: grid; gap: 9px; }
.review-rooms article { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; border: 1px solid var(--line); border-radius: 10px; }
.review-rooms article > div:first-child { display: flex; gap: 8px; }
.review-rooms article > div:nth-child(2) { grid-column: 1; display: grid; color: var(--muted); font-size: 13px; }
.review-rooms article > strong { grid-row: 1 / 3; grid-column: 2; color: var(--primary-dark); }
.review-total { padding: 18px; align-self: start; border-radius: 12px; background: #f8fafc; }
.review-total > div { padding: 8px 0; display: flex; justify-content: space-between; }
.review-total .grand { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-total .grand strong { color: var(--primary-dark); font-size: 23px; }
.review-total p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.detail-head { margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quote-document { width: min(980px, 100%); margin: 0 auto; padding: 38px; background: #fff; color: #172033; }
.quote-document.screen { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.document-header { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.document-company { display: flex; align-items: center; gap: 12px; }
.document-company div { display: grid; }
.document-company strong { font-size: 18px; }
.document-company small { color: var(--muted); }
.document-number { display: grid; justify-items: end; align-content: start; gap: 7px; color: var(--muted); font-size: 13px; }
.document-title { padding: 28px 0; text-align: center; }
.document-title p { margin: 0 0 14px; color: #475569; text-align: left; }
.document-title h1 { margin: 0; font-size: 29px; letter-spacing: .12em; }
.document-title h2 { margin: 7px 0 0; color: #475569; font-size: 17px; font-weight: 500; }
.client-grid { margin: 0 0 22px; padding: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px 20px; border-radius: 10px; background: #f8fafc; }
.client-grid div { display: grid; grid-template-columns: 80px 1fr; }
.client-grid dt { color: var(--muted); }
.client-grid dd { margin: 0; font-weight: 700; }
.room-sheet { margin-bottom: 18px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 10px; }
.room-sheet-head { padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 14px; background: #eff6ff; }
.room-sheet-head > div { display: grid; }
.room-sheet-head > div:last-child { justify-items: end; }
.room-sheet-head span { color: #475569; font-size: 13px; }
.room-sheet-head h3 { margin: 0; font-size: 18px; }
.room-sheet-head strong { color: #1d4ed8; font-size: 18px; }
.position-row { display: grid; grid-template-columns: 130px 1fr; border-top: 1px solid #cbd5e1; }
.position-row h4 { margin: 0; padding: 15px; background: #f8fafc; }
.assemblies { padding: 11px; display: grid; gap: 9px; }
.assembly { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.assembly .assembly-head { margin: 0; padding: 8px 10px; background: #f8fafc; }
.assembly ol { margin: 0; padding: 0; list-style: none; }
.assembly li { min-height: 38px; padding: 7px 10px; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; border-top: 1px solid #edf2f7; font-size: 14px; }
.assembly li > div { display: grid; }
.assembly li small { color: var(--muted); }
.module-index { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 6px; background: #e2e8f0; color: #475569; font-size: 12px; font-weight: 800; }
.totals { width: min(430px, 100%); margin-left: auto; padding-top: 8px; }
.totals > div { padding: 7px 0; display: flex; justify-content: space-between; gap: 20px; }
.totals span { color: #475569; }
.totals .original-total { margin-top: 8px; border-top: 1px solid var(--line); }
.totals .grand-total { margin-top: 5px; padding: 15px 0; border-top: 2px solid var(--ink); }
.totals .grand-total span { color: var(--ink); font-weight: 800; }
.totals .grand-total strong { color: #1d4ed8; font-size: 25px; }
.document-footer { min-height: 130px; margin-top: 25px; padding-top: 20px; display: flex; justify-content: space-between; align-items: flex-start; border-top: 1px solid #cbd5e1; }
.document-footer > div { display: grid; }
.document-footer span { color: var(--muted); font-size: 13px; }
.signature { position: relative; min-width: 230px; min-height: 100px; justify-items: end; }
.signature img { position: absolute; z-index: 1; right: 0; top: -12px; width: 105px; height: 105px; object-fit: contain; opacity: .82; }
.signature span { position: relative; z-index: 2; margin-top: 62px; color: #334155; }
.share-panel, .comments, .customer-action { width: min(980px,100%); margin: 16px auto 0; padding: 20px; }
.share-panel h2, .comments h2, .customer-action h2 { margin: 0; }
.share-panel p { margin: 3px 0 14px; color: var(--muted); }
.share-link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.hint { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.comments article { padding: 13px 0; border-top: 1px solid var(--line); }
.comments article:first-of-type { margin-top: 10px; }
.comments time { margin-left: 8px; color: #94a3b8; font-size: 12px; }
.comments p { margin: 5px 0 0; }
.print-page { background: #fff; }
.print-toolbar { position: sticky; top: 0; z-index: 10; padding: 10px; display: flex; justify-content: center; gap: 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.share-page { margin: auto; padding: 20px 14px 50px; }
.share-alert { width: min(980px,100%); margin: 0 auto 14px; }
.customer-action { display: grid; grid-template-columns: .75fr 1.25fr; gap: 22px; }
.customer-action form { display: grid; gap: 13px; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 9px; }

.admin-tabs { position: sticky; top: 75px; z-index: 10; margin-bottom: 16px; padding: 7px; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.95); }
.admin-tabs { scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { min-height: 44px; padding: 8px 13px; display: grid; place-items: center; border-radius: 9px; white-space: nowrap; color: #475569; font-size: 14px; font-weight: 700; }
.admin-tabs a:hover { background: var(--primary-soft); color: var(--primary); }
.admin-section { margin-bottom: 16px; padding: 22px; scroll-margin-top: 140px; }
.seal-preview { width: 100px; height: 100px; margin-top: 8px; object-fit: contain; }
.inline-create { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin-bottom: 15px; }
.admin-list { border-top: 1px solid var(--line); }
.admin-list article { min-height: 58px; padding: 8px 2px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.admin-list article > div { display: grid; }
.admin-list span { color: var(--muted); font-size: 13px; }
.text-button { min-height: 44px; padding: 6px 10px; border: 0; background: transparent; color: var(--primary); font-weight: 700; }
.text-button.danger { color: var(--danger); }
.text-button:disabled { color: #cbd5e1; cursor: not-allowed; }
.catalog-edit { flex: 1; display: grid; grid-template-columns: minmax(120px, 1fr) 130px auto; gap: 8px; }
.catalog-edit input { min-height: 40px; }
.panel-create { display: grid; grid-template-columns: 1.3fr .7fr 1.2fr .65fr auto; align-items: end; gap: 9px; margin-bottom: 15px; }
.profile-row { padding: 13px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.profile-row span { color: var(--muted); }
.password-form { margin-top: 20px; }
.quote-amount, .quote-meta, .metrics strong, .live-total strong, .totals strong, .review-total strong { font-variant-numeric: tabular-nums; }

@media (min-width: 860px) {
  .bottom-nav { width: 470px; bottom: 14px; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
  .page { padding-bottom: 110px; }
}

@media (max-width: 720px) {
  .desktop-only { display: none; }
  .page { padding-top: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article:last-child { grid-column: span 2; }
  .wizard-head { grid-template-columns: auto 1fr auto; }
  .wizard-head > div { text-align: left; padding-left: 8px; }
  .save-state { font-size: 0; }
  .save-state::after { content: "草稿"; font-size: 12px; }
  .stepper small { display: none; }
  .stepper li::before { top: 12px; }
  .stepper span { width: 25px; height: 25px; font-size: 12px; }
  .wizard-stage { padding: 19px 15px; }
  .form-grid, .fee-layout, .review-grid, .customer-action { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .builder-card { padding: 14px 48px 14px 48px; }
  .builder-card .form-grid { grid-template-columns: 1fr 110px; }
  .builder-index { left: 10px; }
  .remove-button { right: 6px; bottom: 17px; width: 40px; padding: 0; font-size: 0; }
  .remove-button::after { content: "×"; font-size: 23px; }
  .section-heading.with-action { align-items: center; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .fee-row { grid-template-columns: 45px 1fr; }
  .fee-row .fee-input { grid-column: 1 / 3; }
  .other-fee-row { grid-template-columns: 1fr 100px; }
  .other-fee-row button { grid-column: span 2; min-height: 36px; }
  .wizard-actions { justify-content: stretch; }
  .wizard-actions .button { flex: 1; }
  .quote-document { padding: 22px 14px; }
  .document-header { align-items: flex-start; }
  .document-company strong { font-size: 14px; }
  .document-company small { display: none; }
  .document-title { padding: 22px 0; }
  .document-title h1 { font-size: 22px; }
  .client-grid { grid-template-columns: 1fr; }
  .client-grid .span-2 { grid-column: auto; }
  .position-row { grid-template-columns: 1fr; }
  .position-row h4 { padding: 9px 12px; border-bottom: 1px solid var(--line); }
  .document-footer { gap: 16px; }
  .share-link-row { grid-template-columns: 1fr; }
  .detail-head { align-items: flex-start; }
  .detail-actions .button { font-size: 0; padding: 10px; }
  .detail-actions .icon { width: 21px; height: 21px; }
  .inline-create, .panel-create { grid-template-columns: 1fr; }
  .catalog-edit { grid-template-columns: 1fr 90px auto; }
}

@media (max-width: 430px) {
  .quote-card h2 { padding-right: 0; }
  .quote-amount { position: static; display: block; margin-top: 11px; }
  .metrics strong { font-size: 20px; }
  .builder-card .form-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .label-inputs { grid-template-columns: 1fr; }
  .wizard-summary { justify-content: space-between; }
  .room-sheet-head { align-items: flex-end; }
  .room-sheet-head > div:last-child span { display: none; }
  .document-footer { flex-direction: column; }
  .signature { margin-left: auto; }
  .catalog-edit { grid-template-columns: 1fr auto; }
  .catalog-edit input[type="number"] { grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .no-print { display: none !important; }
  .quote-document { width: 100%; padding: 0; }
  .quote-document.screen { border: 0; box-shadow: none; }
  .room-sheet { break-inside: avoid; }
  .document-title { padding: 15px 0; }
  .document-title h1 { font-size: 22px; }
  .room-sheet-head, .position-row h4, .assembly .assembly-head, .client-grid { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .document-footer { min-height: 90px; }
}
