:root {
    --primary: #1677ff;
    --primary-dark: #0d5fd7;
    --ink: #17233d;
    --muted: #71809a;
    --line: #e2e8f2;
    --panel: #ffffff;
    --bg: #f4f7fb;
    --success: #12a66a;
    --warning: #d88912;
    --danger: #e34d59;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); background: var(--bg); }
body { font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 230px; flex: 0 0 230px; color: #eaf1ff; background: linear-gradient(180deg, #182b49, #111f36); }
.brand { height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark, .login-mark { color: #65a5ff; font-size: 27px; }
.nav-list { padding: 18px 10px; }
.nav-item { display: flex; align-items: center; gap: 13px; height: 46px; padding: 0 16px; margin: 3px 0; color: #c8d5e9; border-radius: 8px; transition: .2s; }
.nav-item span { width: 20px; text-align: center; font-size: 18px; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: linear-gradient(90deg, #1b7bff, #356fd0); }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 68px; display: flex; align-items: center; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-spacer { flex: 1; }
.topbar-user { color: var(--muted); margin-right: 22px; }
.topbar-logout { color: var(--primary); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.content-wrap { max-width: 1600px; margin: 0 auto; padding: 28px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 30px; line-height: 1.25; letter-spacing: .01em; }
h2 { margin-bottom: 5px; font-size: 19px; }
.muted { color: var(--muted); }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.panel { margin-bottom: 22px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 22px rgba(26, 54, 93, .04); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-title p { margin-bottom: 0; }
.alert { margin-bottom: 18px; padding: 12px 16px; border-radius: 8px; }
.alert-success { color: #087a4c; background: #e9f9f1; border: 1px solid #b8ebd3; }
.alert-error { color: #a82d3a; background: #fff0f1; border: 1px solid #ffc6ca; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 16px; color: var(--ink); background: #fff; border: 1px solid #cfd9e8; border-radius: 7px; transition: .2s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { color: #fff; background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { color: var(--primary); border-color: #8ebcff; background: #f8fbff; }
.btn-danger-outline { color: var(--danger); border-color: #f2b6bd; background: #fff9fa; }
.btn-danger-outline:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn-xs { min-height: 27px; padding: 2px 9px; font-size: 12px; }
.btn-block { width: 100%; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.pill-blue { color: #145fcb; background: #e9f2ff; }
.pill-green { color: #0b8a59; background: #e8f8ef; }
.pill-orange { color: #b36a05; background: #fff2dc; }
.pill-gray { color: #65748a; background: #eef1f5; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 10px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 4px 0; font-size: 29px; }
.stat-card small { font-size: 12px; }
.stat-green { border-left-color: #19ae71; }
.stat-purple { border-left-color: #7758db; }
.stat-orange { border-left-color: #e39a2b; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.channel-sales-grid { grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr); align-items: start; }
.channel-panel, .sales-panel { min-width: 0; }
.channel-panel .panel-title, .sales-panel .panel-title { align-items: flex-start; }
.channel-panel .panel-title p, .sales-panel .panel-title p { margin: 3px 0 0; font-size: 12px; font-weight: 400; }
.channel-editor-form { padding: 15px; margin-bottom: 18px; background: #f7faff; border: 1px solid #dce8f5; border-radius: 10px; }
.channel-editor-form .editor-actions { margin: 15px 0 0; }
.channel-table code { color: #55708f; font-size: 12px; }
.sales-editor { margin-bottom: 18px; padding: 15px; background: linear-gradient(135deg, #f4f8ff, #f8fbff); border: 1px solid #cfe1fa; border-radius: 13px; }
.sales-editor.is-editing { border-color: #a9caff; background: linear-gradient(135deg, #eef5ff, #fbfdff); }
.sales-editor-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.sales-editor-heading h3 { margin: 0 0 2px; font-size: 15px; }
.sales-editor-heading p { margin: 0; color: #71809a; font-size: 12px; }
.sales-editor-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: #2874df; background: #e2efff; border-radius: 9px; font-size: 18px; font-weight: 700; }
.sales-form { display: flex; align-items: flex-end; gap: 12px; }
.sales-form > label { flex: 1; min-width: 0; }
.sales-form-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.sales-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.sales-stat { padding: 11px 12px; background: #f7f9fc; border: 1px solid #e4eaf2; border-radius: 10px; }
.sales-stat span, .sales-stat strong { display: block; }
.sales-stat span { color: #71809a; font-size: 11px; }
.sales-stat strong { margin-top: 2px; color: #203451; font-size: 21px; line-height: 1.2; }
.sales-stat-active { background: #f1fbf6; border-color: #d4efdf; }
.sales-stat-active strong { color: #128259; }
.sales-stat-leads { background: #fff9ef; border-color: #f3e2bf; }
.sales-stat-leads strong { color: #b87316; }
.sales-filter-form { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sales-filter-form label { min-width: 0; }
.sales-filter-form .sales-search { flex: 1; }
.sales-filter-form input, .sales-filter-form select { height: 36px; }
.sales-filter-form .btn { min-height: 36px; }
.sales-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sales-card { min-width: 0; padding: 15px; background: #fff; border: 1px solid #e0e8f2; border-radius: 13px; box-shadow: 0 5px 16px rgba(32, 65, 103, .045); transition: border-color .2s, box-shadow .2s, transform .2s; }
.sales-card:hover { border-color: #bad4f5; box-shadow: 0 9px 24px rgba(32, 91, 157, .1); transform: translateY(-1px); }
.sales-card.is-inactive { background: #fbfcfe; opacity: .84; }
.sales-card-top { display: flex; min-width: 0; align-items: center; gap: 10px; }
.sales-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; color: #2868c8; background: linear-gradient(145deg, #e5f0ff, #d5e7ff); border-radius: 12px; font-size: 16px; font-weight: 700; }
.sales-main { min-width: 0; }
.sales-name-row { display: flex; min-width: 0; align-items: center; gap: 7px; }
.sales-name-row h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sales-name-row .pill { flex: 0 0 auto; min-height: 21px; padding: 1px 7px; font-size: 11px; }
.sales-main p { margin: 3px 0 0; color: #8291a7; font-size: 11px; }
.sales-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 15px 0 13px; padding: 10px 0; border-top: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6; }
.sales-metrics div { min-width: 0; text-align: center; }
.sales-metrics strong, .sales-metrics span { display: block; }
.sales-metrics strong { color: #203451; font-size: 17px; line-height: 1.25; }
.sales-metrics span { margin-top: 2px; overflow: hidden; color: #8291a7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sales-card-actions { display: flex; justify-content: flex-end; gap: 7px; }
.sales-card-actions .btn { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.sales-readonly { display: block; color: #9aa6b6; font-size: 12px; text-align: right; }
.sales-empty { grid-column: 1 / -1; padding: 22px 10px; border: 1px dashed #d9e3ef; border-radius: 11px; }
.sales-empty h3 { margin-bottom: 4px; color: #42546c; font-size: 14px; }
.sales-empty p { margin: 0; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bar-list { display: grid; gap: 15px; }
.bar-row { display: grid; grid-template-columns: 105px 1fr 45px; gap: 10px; align-items: center; }
.bar-track { height: 10px; overflow: hidden; background: #e7effb; border-radius: 999px; }
.bar-track i { display: block; height: 100%; min-width: 4px; background: var(--primary); border-radius: inherit; }
.bar-track.orange i { background: #e49a34; }
.bar-row b { text-align: right; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { color: #63728a; font-weight: 600; background: #f8fafc; }
.text-link { color: var(--primary); }
.empty, .empty-state { color: var(--muted); text-align: center; padding: 28px 10px; }
.empty-state h2 { color: var(--ink); }
.empty-state.compact { padding: 20px; }
.form-list { display: grid; gap: 14px; }
.form-list-card { display: grid; grid-template-columns: 78px minmax(0, 1fr) 150px auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.form-thumb { width: 78px; height: 68px; display: grid; place-items: center; overflow: hidden; color: var(--primary); background: #eaf3ff; border-radius: 8px; font-size: 25px; }
.form-thumb img { width: 100%; height: 100%; object-fit: cover; }
.form-list-main h2 { margin-bottom: 2px; font-size: 18px; }
.form-list-main p { margin-bottom: 8px; }
.form-list-meta { color: var(--muted); font-size: 12px; }
.form-list-meta b { display: block; color: var(--ink); font-weight: 500; }
.form-list-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.inline-form { display: inline; }
.form-grid { display: grid; gap: 18px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 7px; color: #4d5e77; font-weight: 600; }
label em { color: var(--danger); font-style: normal; }
label small, .optional { color: var(--muted); font-size: 12px; font-weight: 400; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #d5dfed; border-radius: 7px; outline: none; }
input, select { height: 40px; padding: 0 11px; }
textarea { padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
input:disabled, select:disabled, textarea:disabled { color: #64748b; background: #f7f9fc; }
.live-total { padding: 7px 11px; color: #137046; background: #eaf8f0; border-radius: 6px; white-space: nowrap; font-size: 13px; }
.question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.question-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.question-card.is-dragging { opacity: .55; border-color: var(--primary); }
.question-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.drag-handle { color: #93a2b9; font-size: 21px; cursor: grab; }
.text-danger, .icon-btn.danger { color: var(--danger); }
.text-danger { margin-left: auto; border: 0; background: transparent; }
.question-fields { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; margin-bottom: 12px; }
.multi-limit { display: flex; gap: 12px; margin-bottom: 12px; }
.multi-limit label { display: flex; align-items: center; gap: 7px; font-weight: 400; }
.multi-limit input { width: 80px; }
.option-title { display: flex; align-items: center; justify-content: space-between; margin: 7px 0; color: #4d5e77; font-weight: 600; }
.option-list { display: grid; gap: 7px; }
.option-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 88px 18px auto; align-items: center; gap: 7px; }
.option-row .score-input { padding: 0 7px; }
.option-marker { color: #8b9bb2; font-size: 18px; }
.unit { color: var(--muted); font-size: 12px; }
.icon-btn { padding: 2px 0; border: 0; background: transparent; font-size: 12px; }
.range-column-notes { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.5fr); gap: 8px; margin: 0 180px 8px 213px; }
.range-column-notes > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; color: #637590; background: #f7faff; border: 1px solid #e1ebf7; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.range-column-notes strong { color: #294a78; font-size: 12px; }
.range-list { display: grid; gap: 10px; margin-bottom: 14px; }
.range-row { display: grid; grid-template-columns: 90px 25px 90px minmax(150px, .7fr) minmax(220px, 1.5fr) 90px auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.range-row > span { text-align: center; color: var(--muted); }
.range-row textarea { min-height: 42px; }
.privacy-editor-grid { display: grid; gap: 14px; }
.privacy-editor-grid textarea { min-height: 120px; }
.switch-label { display: flex; align-items: center; gap: 5px; font-weight: 400; white-space: nowrap; }
.switch-label input { width: auto; height: auto; }
.inline-errors { min-height: 22px; margin-top: 12px; color: var(--danger); font-size: 13px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filter-actions { display: flex; gap: 8px; align-items: end; }
.link-box { padding: 12px; color: #214b80; background: #eef6ff; border: 1px solid #cfe3ff; border-radius: 8px; word-break: break-all; }
.links-table { min-width: 1080px; }
.link-cell { max-width: 420px; min-width: 280px; }
.link-full { display: block; max-width: 420px; margin: 0; overflow-wrap: anywhere; color: #165ebf; font-size: 13px; line-height: 1.55; white-space: normal; }
.qr-thumb-button { display: block; width: 58px; height: 58px; padding: 4px; background: #fff; border: 1px solid #d7e2f0; border-radius: 8px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.qr-thumb-button:hover { border-color: #74aaf6; box-shadow: 0 5px 14px rgba(39, 113, 213, .16); transform: translateY(-1px); }
.qr-thumb-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.link-actions { white-space: nowrap; }
.link-actions .btn { margin: 2px 3px 2px 0; }
.qr-modal[hidden] { display: none; }
.qr-modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; }
.qr-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 47, .54); backdrop-filter: blur(6px); }
.qr-dialog { position: relative; width: min(420px, calc(100% - 24px)); padding: 28px 30px 25px; color: var(--ink); background: #fff; border: 1px solid rgba(255, 255, 255, .65); border-radius: 20px; box-shadow: 0 24px 70px rgba(18, 35, 63, .3); outline: none; }
.qr-dialog-heading { display: flex; align-items: center; gap: 11px; padding-right: 26px; }
.qr-dialog-heading h2 { margin: 0 0 2px; font-size: 19px; }
.qr-dialog-heading p { margin: 0; color: #71809a; font-size: 12px; }
.qr-dialog-mark { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; color: #2874df; background: #eaf3ff; border-radius: 10px; font-size: 22px; font-weight: 700; }
.qr-image-wrap { display: grid; width: 250px; height: 250px; place-items: center; margin: 23px auto 15px; padding: 12px; background: #fff; border: 1px solid #e1e9f3; border-radius: 14px; box-shadow: 0 9px 24px rgba(38, 82, 132, .09); }
.qr-image-wrap img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.qr-modal-url { margin: 0; overflow-wrap: anywhere; color: #52627a; font-size: 12px; line-height: 1.6; text-align: center; }
.qr-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.btn-wechat { color: #0a8c61; border-color: #9edfc4; background: #f2fcf7; }
.btn-wechat:hover { color: #08734f; border-color: #62c999; background: #e8f9f0; }
.share-modal[hidden] { display: none; }
.share-modal { position: fixed; z-index: 65; inset: 0; display: grid; place-items: center; padding: 20px; }
.share-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 47, .58); backdrop-filter: blur(7px); }
.share-dialog { position: relative; width: min(860px, calc(100% - 24px)); max-height: min(720px, calc(100vh - 32px)); overflow-y: auto; padding: 28px 30px 25px; color: var(--ink); background: #fff; border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px; box-shadow: 0 24px 70px rgba(18, 35, 63, .32); outline: none; }
.share-dialog-heading { display: flex; align-items: center; gap: 11px; padding-right: 26px; margin-bottom: 21px; }
.share-dialog-heading h2 { margin: 0 0 2px; font-size: 20px; }
.share-dialog-heading p { margin: 0; color: #71809a; font-size: 12px; }
.share-dialog-mark { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; color: #0a9868; background: #e8f9f0; border-radius: 11px; font-size: 22px; font-weight: 700; }
.share-dialog-body { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 22px; align-items: start; }
.share-qr-panel { display: grid; justify-items: center; gap: 7px; padding: 16px 13px 14px; color: #5d6f88; background: linear-gradient(145deg, #f7fbff, #f4f9ff); border: 1px solid #dce8f5; border-radius: 15px; text-align: center; }
.share-qr-wrap { display: grid; width: 178px; height: 178px; place-items: center; padding: 8px; background: #fff; border: 1px solid #dce5ef; border-radius: 11px; box-shadow: 0 8px 20px rgba(40, 81, 127, .08); }
.share-qr-wrap img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.share-qr-panel strong { color: #29415f; font-size: 14px; }
.share-qr-panel span { font-size: 12px; line-height: 1.55; }
.share-config-form { display: grid; gap: 13px; min-width: 0; }
.share-config-form label { gap: 6px; }
.share-config-form small { color: var(--muted); font-size: 12px; font-weight: 400; }
.share-link-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.share-link-control input { color: #52627a; background: #f7faff; }
.share-image-preview { display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 10px 12px; color: #71809a; background: #f8fbff; border: 1px dashed #cbdced; border-radius: 10px; font-size: 12px; }
.share-image-preview img { display: block; width: 116px; height: 78px; object-fit: cover; border-radius: 7px; }
.share-image-preview img[hidden], .share-image-preview span[hidden] { display: none; }
.share-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.share-readonly-note { align-self: center; color: #8b98aa; font-size: 12px; }
.settings-panel { max-width: 1020px; }
.settings-form { display: grid; gap: 18px; }
.settings-form label { gap: 8px; }
.settings-form small { color: var(--muted); font-size: 12px; font-weight: 400; }
.settings-preview { display: grid; gap: 5px; padding: 13px 15px; color: #52627a; background: #f7faff; border: 1px solid #dce8f5; border-radius: 9px; }
.settings-preview span { font-size: 12px; }
.settings-preview code { overflow-wrap: anywhere; color: #165ebf; font-size: 13px; }
.wechat-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; background: linear-gradient(145deg, #fbfdff, #f4f8fe); border: 1px solid #dce7f4; border-radius: 14px; }
.wechat-settings-grid { align-items: start; }
.wechat-settings-grid label { min-width: 0; align-content: start; }
.wechat-toggle-field { align-content: start; }
.wechat-toggle-control { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 11px; color: #254677; background: #fff; border: 1px solid #d5dfed; border-radius: 7px; }
.wechat-toggle-control input { width: 18px; height: 18px; accent-color: var(--primary); }
.wechat-toggle-control span { font-weight: 600; }
.wechat-settings-note { display: grid; gap: 3px; padding: 13px 15px; color: #4f6280; background: #fff9ed; border: 1px solid #f3dfb1; border-radius: 10px; }
.wechat-settings-note strong { color: #8b6218; font-size: 13px; }
.wechat-settings-note span { font-size: 12px; line-height: 1.7; }
.wechat-settings-note code { color: #7a5511; }
.default-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.default-image-card { min-width: 0; padding: 16px; background: linear-gradient(145deg, #fbfdff, #f4f8fe); border: 1px solid #dce7f4; border-radius: 14px; }
.default-image-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.default-image-heading h3 { margin: 0 0 3px; font-size: 16px; }
.default-image-heading p { margin: 0; color: #71809a; font-size: 12px; }
.default-image-preview { display: grid; width: 100%; aspect-ratio: 2 / 1; min-height: 150px; overflow: hidden; place-items: center; margin-bottom: 13px; color: #8495ad; background: #eaf2fc; border: 1px dashed #bdd2ed; border-radius: 11px; font-size: 13px; }
.default-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.default-image-preview a { display: block; width: 100%; height: 100%; }
.default-image-card label { margin-bottom: 8px; }
.image-upload-note { display: block; color: #71809a; font-size: 12px; font-weight: 400; line-height: 1.65; }
.image-size-guide { display: grid; gap: 3px; padding: 13px 15px; color: #4f6280; background: #f5f9ff; border: 1px solid #d8e6f7; border-radius: 10px; }
.image-size-guide strong { color: #245a9e; font-size: 13px; }
.image-size-guide span { font-size: 12px; line-height: 1.7; }
.image-check-error { display: block; min-height: 18px; margin-top: 5px; color: var(--danger); font-size: 12px; font-weight: 400; }
.detail-drawer { position: fixed; z-index: 20; inset: 0 0 0 auto; width: min(500px, 100%); overflow-y: auto; padding: 24px; background: #fff; box-shadow: -12px 0 30px rgba(16, 34, 62, .18); }
.detail-drawer h2 { display: flex; justify-content: space-between; }
.drawer-close { border: 0; background: transparent; font-size: 22px; }
.detail-grid { display: grid; grid-template-columns: 105px 1fr; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }
.answer-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.answer-block h3 { margin: 0 0 7px; font-size: 14px; }
.answer-option { display: inline-block; margin: 3px 4px 0 0; padding: 4px 8px; color: #31567f; background: #eef5ff; border-radius: 5px; font-size: 13px; }
.pagination { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.pagination a, .pagination span { min-width: 32px; padding: 5px 8px; text-align: center; border: 1px solid var(--line); border-radius: 5px; }
.pagination .current { color: #fff; background: var(--primary); border-color: var(--primary); }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 20%, #e6f1ff, transparent 40%), #f3f7fd; }
.login-card { width: min(420px, 100%); padding: 40px 36px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 18px 45px rgba(32, 74, 125, .12); }
.login-card h1 { margin: 8px 0 3px; font-size: 26px; }
.login-mark { font-size: 38px; }
.stack-form { display: grid; gap: 16px; margin-top: 24px; text-align: left; }
.install-body { padding: 28px 16px; }
.install-card { width: min(600px, 100%); padding: 36px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 55px rgba(32, 74, 125, .13); }
.install-brand { display: flex; align-items: center; gap: 9px; color: #2a68c3; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.install-mark { color: #65a5ff; font-size: 24px; }
.install-card h1 { margin: 13px 0 5px; font-size: 28px; }
.install-intro { margin-bottom: 22px; }
.install-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 15px; }
.install-status-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 13px; background: #f7f9fc; border: 1px solid #e5eaf2; border-radius: 10px; }
.install-status-item.is-ready { color: #087a4c; background: #f0fbf5; border-color: #c8ecd8; }
.install-status-item.is-waiting { color: #8b6218; background: #fffaf0; border-color: #f0dfb6; }
.install-status-dot { flex: 0 0 8px; width: 8px; height: 8px; background: #b6c1d0; border-radius: 50%; }
.install-status-item.is-ready .install-status-dot { background: #16a66a; }
.install-status-item.is-waiting .install-status-dot { background: #d88912; }
.install-status-item strong, .install-status-item small { display: block; }
.install-status-item strong { font-size: 13px; }
.install-status-item small { margin-top: 2px; color: #71809a; font-size: 11px; font-weight: 400; }
.install-note, .install-key-help { display: grid; gap: 4px; padding: 13px 15px; color: #52627a; background: #f6f9fe; border: 1px solid #dce8f5; border-radius: 10px; font-size: 12px; line-height: 1.65; }
.install-note strong { color: #28568e; font-size: 13px; }
.install-key-help { margin-top: 16px; color: #7c5b1d; background: #fffaf0; border-color: #f1dfb8; }
.install-key-help code { padding: 1px 4px; color: #684a14; background: rgba(255,255,255,.75); border-radius: 4px; }
.install-form { margin-top: 20px; }
.install-form .btn:disabled { cursor: not-allowed; opacity: .55; }
.install-success { margin-top: 20px; padding: 25px 22px; text-align: center; background: linear-gradient(145deg, #f0fbf6, #f8fffb); border: 1px solid #c8ecd8; border-radius: 14px; }
.install-success-mark { display: grid; width: 46px; height: 46px; place-items: center; margin: 0 auto 9px; color: #fff; background: #12a66a; border-radius: 50%; font-size: 27px; font-weight: 700; }
.install-success h2 { margin-bottom: 6px; color: #087a4c; }
.install-success p { margin-bottom: 18px; color: #526f62; font-size: 13px; }
.install-footnote { margin: 20px 0 0; color: #98a4b5; font-size: 11px; text-align: center; }
.public-body {
    min-height: 100vh;
    overflow-x: hidden;
    color: #18253d;
    background:
        radial-gradient(circle at 5% -5%, rgba(109, 170, 255, .2), transparent 31%),
        radial-gradient(circle at 98% 12%, rgba(133, 218, 255, .18), transparent 28%),
        #f4f7fc;
}
.public-shell { width: min(920px, calc(100% - 40px)); max-width: 100%; min-width: 0; margin: 0 auto; padding: 36px 0 64px; }
.public-hero {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(164, 194, 232, .7);
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(35, 79, 131, .09);
}
.public-hero img {
    display: block;
    width: 100%;
    height: auto;
    filter: saturate(.96);
}
.public-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 30px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(216, 226, 239, .95);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(35, 68, 111, .09);
}
.public-card form { width: 100%; min-width: 0; max-width: 100%; }
.public-question {
    min-width: 0;
    margin: 0 0 14px;
    padding: 22px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    border: 1px solid #e2eaf4;
    border-radius: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.public-question:focus-within { border-color: #b9d5ff; box-shadow: 0 0 0 3px rgba(52, 125, 244, .07); }
.public-question-head { display: block; margin-bottom: 17px; }
.question-index {
    display: none;
}
.public-question-title { min-width: 0; }
.public-question h2 { margin: 0; font-size: 16px; line-height: 1.65; }
.question-number { margin-right: 8px; color: #17233d; font-weight: 700; }
.public-question h2 em { margin-left: 3px; color: #ef5c68; font-style: normal; }
.question-type-pill {
    display: inline;
    min-height: 0;
    margin-left: 5px;
    padding: 0;
    color: #2874df;
    background: transparent;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.question-type-pill.is-multiple { color: #6849c7; background: transparent; }
.choice-list { display: grid; min-width: 0; max-width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.choice {
    position: relative;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    min-height: 54px;
    gap: 11px;
    margin: 0;
    padding: 13px 15px;
    color: #26334b;
    background: #fff;
    border: 1px solid #e0e8f3;
    border-radius: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.choice:hover { background: #f8fbff; border-color: #8bb9ff; box-shadow: 0 7px 16px rgba(42, 103, 184, .09); transform: translateY(-1px); }
.choice input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1.5px solid #b9c8dc;
    border-radius: 50%;
}
.choice input[type="checkbox"] { border-radius: 6px; }
.choice input:checked { border-color: #347df4; background-color: #347df4; }
.choice input[type="radio"]:checked { background-image: radial-gradient(circle, #fff 0 3px, transparent 3.5px); }
.choice input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5 8 14l8-8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 10px 10px;
}
.choice:has(input:checked) { background: linear-gradient(135deg, #f3f8ff, #fff); border-color: #6aa2ff; box-shadow: 0 0 0 3px rgba(52, 125, 244, .1); }
.choice-label { min-width: 0; line-height: 1.5; word-break: break-word; }
.public-contact-fields {
    min-width: 0;
    max-width: 100%;
    margin-top: 20px;
    padding: 24px;
    background: #f8fbff;
    border: 1px solid #dfebf8;
    border-radius: 16px;
}
.contact-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.contact-heading-mark {
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #347df4;
    background: #e7f1ff;
    border-radius: 11px;
    font-size: 17px;
}
.contact-heading h2 { margin: 0 0 2px; font-size: 17px; }
.contact-heading p { margin: 0; color: #71829b; font-size: 12px; }
.public-fields { display: grid; min-width: 0; max-width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-bottom: 18px; }
.remark-field { grid-column: 1 / -1; }
.public-fields label { min-width: 0; gap: 8px; color: #344661; font-size: 13px; }
.field-label { display: flex; align-items: center; gap: 4px; min-height: 20px; line-height: 1.35; }
.field-label em { color: #ef5c68; font-style: normal; }
.field-label .optional { color: #8291a7; font-size: 12px; font-weight: 500; }
.public-fields .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.public-fields input, .public-fields textarea { min-width: 0; max-width: 100%; border-color: #d6e3f2; border-radius: 11px; transition: border-color .2s, box-shadow .2s, background .2s; }
.public-fields input { height: 50px; padding: 0 14px; }
.public-fields textarea { min-height: 100px; padding: 12px 14px; }
.public-fields input::placeholder, .public-fields textarea::placeholder { color: #a5b2c3; }
.public-fields input:focus, .public-fields textarea:focus { background: #fff; border-color: #5b9bfa; box-shadow: 0 0 0 4px rgba(52, 125, 244, .12); }
.privacy-consent { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 15px; border-top: 1px dashed #d7e4f2; color: #5c6e88; }
.privacy-consent label { display: flex; align-items: center; gap: 8px; color: #5c6e88; font-size: 13px; font-weight: 400; }
.privacy-consent input { appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; border: 1.5px solid #b9c9dd; border-radius: 5px; background: #fff; }
.privacy-consent input:checked { border-color: #347df4; background-color: #347df4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5 8 14l8-8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 12px 12px; }
.privacy-link { padding: 2px 0; color: #2874df; background: transparent; border: 0; font-size: 13px; }
.privacy-link:hover { text-decoration: underline; }
.submit-row { display: flex; min-width: 0; max-width: 100%; justify-content: center; margin-top: 22px; }
.submit-row .btn { width: min(100%, 300px); min-height: 50px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 20px rgba(35, 119, 245, .22); transition: transform .18s, box-shadow .18s, background .18s; }
.submit-row .btn:hover { color: #fff; background: #176be8; box-shadow: 0 13px 24px rgba(35, 119, 245, .28); transform: translateY(-1px); }
.help-error { margin-bottom: 17px; padding: 12px 14px; color: #a82d3a; background: #fff0f1; border: 1px solid #ffd0d4; border-radius: 11px; }
.modal-open { overflow: hidden; }
.privacy-modal[hidden] { display: none; }
.privacy-modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px; }
.privacy-modal-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 47, .54); backdrop-filter: blur(6px); }
.privacy-dialog { position: relative; width: min(560px, calc(100% - 24px)); padding: 30px 32px 26px; color: var(--ink); background: #fff; border: 1px solid rgba(255, 255, 255, .6); border-radius: 20px; box-shadow: 0 24px 70px rgba(18, 35, 63, .3); }
.privacy-dialog h2 { margin-bottom: 14px; font-size: 20px; }
.privacy-dialog p, .privacy-dialog-content { color: #52627a; line-height: 1.8; white-space: pre-line; }
.privacy-close { position: absolute; top: 13px; right: 16px; padding: 0 5px; color: #8591a4; background: transparent; border: 0; font-size: 26px; line-height: 1; }
.privacy-close:hover { color: var(--ink); }
.privacy-dialog-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.submit-row:empty { display: none; }
.is-submitted-page .choice,
.is-submitted-page input:disabled,
.is-submitted-page textarea:disabled { cursor: default; }
.is-submitted-page .choice:hover { transform: none; box-shadow: none; }
.result-overlay-page { display: grid; place-items: center; }
.success-overlay[hidden] { display: none; }
.success-overlay { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 16px; }
.success-overlay-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 47, .62); backdrop-filter: blur(7px); }
.success-dialog { position: relative; z-index: 1; width: min(760px, calc(100% - 8px)); max-height: calc(100vh - 32px); padding: 12px; background: #fff; border: 1px solid rgba(255, 255, 255, .75); border-radius: 22px; box-shadow: 0 26px 80px rgba(18, 35, 63, .34); outline: none; }
.success-dialog img { display: block; width: 100%; height: auto; max-height: calc(100vh - 58px); object-fit: contain; border-radius: 15px; }
.success-close { position: absolute; z-index: 2; top: 17px; right: 17px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #53627a; background: rgba(255, 255, 255, .94); border: 1px solid rgba(206, 218, 235, .9); border-radius: 50%; box-shadow: 0 5px 16px rgba(34, 62, 99, .16); font-size: 24px; line-height: 1; cursor: pointer; }
.success-close:hover { color: #18253d; background: #fff; }
.success-image-missing { min-height: 220px; border-radius: 15px; background: linear-gradient(135deg, #edf5ff, #f8fbff); }
.unavailable { min-height: 100vh; display: grid; place-items: center; padding: 20px; text-align: center; }
.log-table pre { margin: 0; white-space: pre-wrap; font: inherit; }
@media (max-width: 1180px) {
    .sidebar { width: 205px; flex-basis: 205px; }
    .form-list-card { grid-template-columns: 68px minmax(0, 1fr) auto; }
    .form-list-meta { display: none; }
    .range-column-notes { margin-left: 188px; margin-right: 160px; }
    .range-row { grid-template-columns: 80px 20px 80px minmax(130px, .8fr) minmax(170px, 1.2fr) 80px auto; }
}
@media (max-width: 900px) {
    .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; transform: translateX(-100%); transition: .2s; }
    .sidebar.is-open { transform: translateX(0); }
    .menu-toggle { display: block; }
    .content-wrap { padding: 20px 15px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .wechat-settings-grid { grid-template-columns: 1fr; }
    .share-dialog-body { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
    .share-qr-wrap { width: 155px; height: 155px; }
    .default-image-grid { grid-template-columns: 1fr; }
    .sales-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .question-grid { grid-template-columns: 1fr; }
    .filter-grid, .three-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .range-column-notes { margin-left: 176px; margin-right: 100px; }
    .range-row { grid-template-columns: 75px 18px 75px minmax(120px, 1fr) 75px auto; }
    .range-row textarea { grid-column: 4 / 6; }
}
@media (max-width: 620px) {
    h1 { font-size: 25px; }
    .topbar { padding: 0 15px; }
    .topbar-user { margin-right: 12px; }
    .page-heading { align-items: flex-start; }
    .two-cols, .three-cols, .public-fields, .choice-list, .filter-grid { grid-template-columns: 1fr; }
    .panel { padding: 16px; }
    .share-dialog { padding: 24px 18px 19px; border-radius: 17px; }
    .share-dialog-body { grid-template-columns: 1fr; }
    .share-qr-panel { width: min(100%, 250px); margin: 0 auto; }
    .share-dialog-actions { justify-content: stretch; }
    .share-dialog-actions .btn { flex: 1; }
    .form-list-card { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
    .form-thumb { width: 58px; height: 58px; }
    .form-list-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .question-fields { grid-template-columns: 1fr; }
    .option-row { grid-template-columns: 16px minmax(0, 1fr) 72px auto; }
    .option-row .unit { display: none; }
    .range-column-notes { grid-template-columns: 1fr; margin: 0 0 8px; }
    .range-row { grid-template-columns: 1fr 18px 1fr; }
    .range-row .range-title, .range-row textarea, .range-row .switch-label, .range-row .icon-btn { grid-column: 1 / -1; }
    .range-row textarea { grid-row: auto; }
    .editor-actions { flex-wrap: wrap; justify-content: stretch; }
    .editor-actions .btn { flex: 1; }
    .sales-form { flex-direction: column; align-items: stretch; }
    .sales-form-actions { justify-content: stretch; }
    .sales-form-actions .btn { flex: 1; }
    .sales-summary { gap: 6px; }
    .sales-stat { padding: 9px 7px; }
    .sales-stat strong { font-size: 18px; }
    .sales-filter-form { flex-wrap: wrap; }
    .sales-filter-form .sales-search { flex: 1 1 100%; }
    .sales-filter-form label:not(.sales-search) { flex: 1; }
    .sales-filter-form .btn, .sales-filter-form label:not(.sales-search) + .btn { flex: 0 0 auto; }
    .sales-grid { grid-template-columns: 1fr; }
    .public-shell { padding: 14px 10px 30px; }
    .public-card { padding: 16px; }
}

/* 客户端现代响应式布局：桌面聚焦、手机舒展 */
@media (max-width: 780px) {
    .public-shell { width: min(100% - 24px, 640px); padding: 24px 0 42px; }
    .public-card { padding: 22px; }
    .public-question { padding: 19px; }
    .public-contact-fields { padding: 21px; }
}
@media (max-width: 620px) {
    .public-shell { width: calc(100% - 24px); padding: 14px 0 34px; }
    .public-hero { margin-bottom: 14px; border-radius: 20px; }
    .public-card { padding: 14px; border-radius: 18px; }
    .public-question { margin-bottom: 11px; padding: 17px 15px; border-radius: 14px; }
    .public-question-head { margin-bottom: 14px; }
    .question-index { display: none; }
    .public-question h2 { margin-top: 1px; font-size: 15px; }
    .question-type-pill { min-height: 0; margin-left: 4px; padding: 0; font-size: 11px; }
    .choice-list { grid-template-columns: 1fr; gap: 9px; }
    .choice { min-height: 50px; gap: 8px; padding: 11px 10px; border-radius: 11px; font-size: 13px; }
    .choice input { flex-basis: 17px; width: 17px; height: 17px; }
    .public-contact-fields { margin-top: 14px; padding: 17px 15px; border-radius: 14px; }
    .contact-heading { gap: 9px; margin-bottom: 15px; }
    .contact-heading-mark { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
    .contact-heading h2 { font-size: 15px; }
    .contact-heading p { font-size: 11px; }
    .public-fields { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
    .public-fields input { height: 48px; }
    .public-fields textarea { min-height: 92px; }
    .privacy-consent { align-items: flex-start; gap: 3px 9px; padding-top: 13px; }
    .privacy-consent label, .privacy-link { font-size: 12px; }
    .submit-row { margin-top: 17px; }
    .submit-row .btn { width: 100%; min-height: 49px; }
    .privacy-dialog { padding: 25px 21px 21px; border-radius: 17px; }
    .privacy-dialog h2 { font-size: 18px; }
    .privacy-dialog-actions .btn { width: 100%; }
    .qr-dialog { padding: 24px 20px 20px; border-radius: 17px; }
    .qr-image-wrap { width: 220px; height: 220px; margin-top: 19px; }
    .qr-dialog-actions { justify-content: stretch; }
    .qr-dialog-actions .btn { flex: 1; }
    .success-dialog { width: min(100%, 560px); padding: 8px; border-radius: 18px; }
    .success-dialog img { border-radius: 12px; }
    .success-close { top: 13px; right: 13px; width: 32px; height: 32px; font-size: 22px; }
}
@media (max-width: 460px) {
    .choice-list { grid-template-columns: 1fr; }
    .choice { min-height: 48px; }
    .public-question h2 { font-size: 14px; }
}

@media (max-width: 620px) {
    .install-card { padding: 26px 20px; border-radius: 15px; }
    .install-status-grid { grid-template-columns: 1fr; }
}
