*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #2563eb; --blue-bg: #eff6ff;
  --purple: #7c3aed; --purple-bg: #f5f3ff;
  --red: #dc2626; --red-bg: #fef2f2;
  --amber-bg: #fffbeb;
  --surface: #fff; --bg: #f8fafc;
  --text: #1e293b; --text2: #64748b; --text3: #94a3b8;
  --border: #e2e8f0;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.hidden { display: none !important; }

/* ── header ── */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.header h1 { font-size: 20px; font-weight: 700; white-space: nowrap; }
.header p { font-size: 13px; color: var(--text2); margin-top: 2px; }
.header-left { flex: 1; }
.header-user { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; align-items: flex-end; }
.user-company { font-size: 13px; font-weight: 500; color: var(--text); }
.user-contact { font-size: 11px; color: var(--text2); margin-top: 2px; }
.verified { display: inline-block; font-size: 10px; font-weight: 500; color: #16a34a; background: #f0fdf4; padding: 1px 6px; border-radius: 3px; border: 1px solid #bbf7d0; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 100px 16px 120px; }

/* ── summary ── */
.summary { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(0,0,0,.06); }
.summary-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; }
.summary-main { display: flex; align-items: center; gap: 16px; }
.price { font-size: 28px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.price small { font-size: 14px; font-weight: 400; color: var(--text2); }
.yearly { font-size: 13px; color: var(--text2); }
.spacer { flex: 1; }
.actions { display: flex; gap: 8px; flex-shrink: 0; }
.breakdown { margin-bottom: 8px; }
.breakdown ul { list-style: none; font-size: 12px; color: var(--text2); }
.breakdown li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #f1f5f9; }

/* ── section ── */
.section { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.section-desc { font-size: 12px; color: var(--text2); margin-bottom: 16px; }

/* ── two column layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }

/* ── cat row stack ── */
.cat-stack { display: flex; flex-direction: column; gap: 10px; }

/* ── cat row ── */
.cat-row { padding: 16px; border: 2px solid var(--border); border-radius: 10px; }
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-badge { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cat-name { font-size: 14px; font-weight: 600; }
.cat-desc { font-size: 11px; color: var(--text2); }

/* ── mode toggle ── */
.mode-row { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; width: fit-content; }
.cat-head .mode-row { margin-left: auto; margin-bottom: 0; flex-shrink: 0; }
.mode-tag { padding: 5px 12px; font-size: 12px; color: var(--text2); cursor: pointer; background: var(--surface); transition: .15s; user-select: none; display: flex; align-items: center; gap: 4px; border: none; border-right: 1px solid var(--border); }
.mode-tag:last-child { border-right: none; }
.mode-tag input { display: none; }
.mode-tag.active { background: var(--blue); color: #fff; }
.mode-tag:hover { opacity: .85; }

/* ── controls row ── */
.ctrl-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctrl-row label { font-size: 11px; color: var(--text2); }
.unit-ctrl { display: flex; align-items: center; gap: 2px; }
.unit-btn { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.unit-btn:hover { background: var(--bg); border-color: var(--blue); }
.unit-val { width: 28px; text-align: center; font-size: 14px; font-weight: 600; }
.plat-input { width: 70px; height: 28px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-size: 12px; outline: none; }
.plat-input:focus { border-color: var(--blue); }
.x-label { font-size: 11px; color: var(--text3); margin: 0 2px; }

/* ── special rows ── */
.special-row { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.special-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.special-head .mode-row { margin-left: auto; margin-bottom: 0; flex-shrink: 0; }
.special-name { font-size: 13px; font-weight: 500; }
.sp-price { font-size: 11px; color: var(--text3); white-space: nowrap; }
.special-ctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sp-input { width: 80px; height: 28px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-size: 12px; outline: none; }
.sp-input:focus { border-color: var(--blue); }

/* ── addon ── */
.addon { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.addon:last-child { border-bottom: none; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle .track { position: absolute; inset: 0; background: #cbd5e1; border-radius: 100px; cursor: pointer; transition: .2s; }
.toggle .track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked + .track { background: var(--blue); }
.toggle input:checked + .track::before { transform: translateX(18px); }
.addon-label { flex: 1; }
.addon-label strong { font-size: 13px; display: block; }
.addon-label span { font-size: 11px; color: var(--text2); }
.addon-config { padding: 8px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.addon-config input[type="range"] { flex: 1; accent-color: var(--blue); }
.addon-config input[type="number"] { width: 64px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; outline: none; }

/* ── per-call tier buttons ── */
.tier-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tier-btn { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 6px; background: #fff; font-size: 12px; color: var(--text2); cursor: pointer; transition: .15s; }
.tier-btn:hover { border-color: var(--blue); color: var(--blue); }
.tier-btn.active { background: #fff; color: var(--blue); border-color: var(--blue); font-weight: 500; }
.tier-btn .tier-price { display: block; font-size: 10px; color: var(--text3); margin-top: 1px; }
.tier-btn.active .tier-price { color: var(--blue); }
.tier-btn-custom.active { padding: 0 10px; gap: 2px; min-height: 44px; display: inline-flex; align-items: center; }
.tier-btn-custom.active input { width: 56px; height: 100%; border: none; background: transparent; text-align: center; font-size: 12px; outline: none; color: var(--blue); -moz-appearance: textfield; }
.tier-btn-custom.active input::-webkit-inner-spin-button,
.tier-btn-custom.active input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tier-btn-custom.active input::placeholder { color: var(--text3); }
.tier-btn-custom.active .tier-price { display: none; }
.tier-btn-custom.active .tier-unit { color: var(--text2); font-size: 12px; }

/* ── buttons ── */
.btn { padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }

/* ── mobile ── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .summary-main { flex-wrap: wrap; gap: 8px; }
  .breakdown { display: none; }
  .cat-head { flex-wrap: wrap; }
  .cat-head .mode-row { margin-left: 0; margin-top: 4px; }
  .ctrl-row { gap: 4px; }
}
@media print { .summary, .header { display: none; } }
