:root {
  --nav: #1c2430;
  --nav-text: #c9d2de;
  --accent: #c4622d;
  --accent-dark: #a34e20;
  --ink: #1d2430;
  --muted: #66707c;
  --line: #e6e1d8;
  --bg: #f4f0e8;
  --card: #fffdf9;
  --ok: #1f7a4d;
  --warn: #9a5b00;
  --bad: #a12622;
  --shadow: 0 10px 30px rgba(28, 36, 48, .06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); }
.app { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--nav); color: var(--nav-text); padding: 22px 14px 28px; flex: none; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; margin: 0 8px 22px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .04em; }
.brand small { color: #9aabbe; font-size: 12px; }
.mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.nav-label { margin: 16px 12px 6px; font-size: 12px; letter-spacing: .14em; color: #aeb9c7; }
.nav-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; border: 0; background: transparent; color: var(--nav-text); padding: 9px 12px; border-radius: 10px; margin-bottom: 2px; white-space: nowrap; }
.nav-btn span { width: auto; min-width: 4em; letter-spacing: .02em; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; }
.tabs button.active { background: var(--nav); color: #fff; border-color: var(--nav); }
.provider-card { max-width: 720px; }
.choice-row { display: flex; align-items: center; gap: 28px; margin: 6px 0 16px; flex-wrap: wrap; }
.choice-label { color: var(--ink); font-size: 14px; min-width: 4.5em; }
.choice { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.choice input { width: 16px; height: 16px; margin: 0; accent-color: #22a06b; }
.nav-btn em { font-style: normal; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; display: inline-grid; place-items: center; padding: 0 6px; }
.nav-btn.active, .nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-btn.active { box-shadow: inset 3px 0 0 var(--accent); }
.main { flex: 1; min-width: 0; }
.top { display: flex; gap: 12px; align-items: center; padding: 14px 24px; background: rgba(255,253,249,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.subject { display: flex; flex-direction: column; gap: 4px; min-width: min(420px, 46vw); font-size: 12px; color: var(--muted); }
.top select, .field input, .field select, .field textarea, .draft select, .draft input { width: 100%; border: 1px solid #ddd6cb; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--ink); }
.top select:focus, .field input:focus, .field select:focus, .field textarea:focus, .draft select:focus, .draft input:focus { outline: 2px solid rgba(196,98,45,.25); border-color: #e0b397; }
.grow { flex: 1; }
.who { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.content { padding: 22px 24px 48px; }
.page-head { margin-bottom: 16px; }
.page-head h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--muted); }
.banner { background: #fff6ea; color: #8a4b12; border: 1px solid #f0d2b4; padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; }
.banner.bad { background: #fdecec; color: var(--bad); border-color: #f3c7c6; }
.layout-source { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.source-panel { position: sticky; top: 86px; }
.source-result { display: flex; flex-direction: column; gap: 16px; }
.split { height: 1px; background: var(--line); margin: 14px 0; }
.grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.card h2, .card h3, .dialog h3 { margin: 0 0 12px; font-size: 16px; }
.empty-hint { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.field { margin-bottom: 10px; }
.field label, .draft label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid #ddd6cb; background: #fff; border-radius: 10px; padding: 8px 12px; color: var(--ink); transition: background .15s ease, border-color .15s ease; }
.btn:hover { border-color: #c9bfb2; background: #fffaf4; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.danger { color: var(--bad); border-color: #e7b3b1; background: #fff; }
.btn.danger:hover { background: #fff6f6; border-color: #e7b3b1; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; justify-content: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.product { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; text-align: left; }
.product:hover { border-color: #e0b397; }
.product .thumb { width: 100%; height: 148px; margin: 0; }
.product strong { display: block; min-height: 40px; line-height: 1.35; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #efeae2; vertical-align: top; margin-right: 8px; }
.thumb.empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.gallery { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-images { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.detail-images img { width: 100%; height: auto; border-radius: 12px; background: #efeae2; }
.sku { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.sku .thumb { flex: none; }
.draft-list { display: flex; flex-direction: column; gap: 10px; }
.draft-tools { margin-bottom: 12px; }
.draft { display: grid; grid-template-columns: 28px 80px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.draft .fields { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(180px, 1.6fr) 88px 88px auto; gap: 8px; align-items: end; margin-top: 8px; }
.draft .price { margin-top: 4px; padding: 8px 0; color: var(--ink); font-size: 14px; }
.draft-pad { height: 88px; }
.draft-dock { position: fixed; right: 24px; bottom: 20px; z-index: 12; display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 18px; background: #fffdf9; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(28, 36, 48, .16); }
.draft-dock-sum { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.draft-dock-sum b { font-size: 15px; }
.draft-dock-sum span { color: var(--muted); font-size: 12px; }
.draft-dock .btn { padding: 10px 18px; font-weight: 650; }
.quote { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; background: #fff; }
.quote.bad { border-color: #e7b3b1; background: #fff8f8; }
.dialog.quote-dialog { width: min(920px, calc(100% - 32px)); max-height: min(88vh, 860px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.quote-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.quote-head .eyebrow { margin-bottom: 4px; color: var(--accent-dark); }
.quote-head h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.quote-body { padding: 8px 18px 4px; overflow: auto; }
.quote-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quote-top h3 { margin: 0; }
.quote-top b { color: var(--accent-dark); font-size: 18px; }
.quote-item { display: flex; gap: 10px; align-items: flex-start; }
.quote-item .thumb { width: 56px; height: 56px; margin: 0; flex: none; }
.quote-name { min-width: 0; }
.quote-name strong { display: block; line-height: 1.45; }
.quote th:nth-child(n+2), .quote td:nth-child(n+2) { width: 88px; white-space: nowrap; }
.quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fffdf9; }
.quote-foot b { display: block; font-size: 18px; color: var(--accent-dark); }
.quote-foot span { color: var(--muted); font-size: 12px; }
.quote-actions { display: flex; gap: 8px; justify-content: flex-end; }
.quote-actions .btn { flex: none; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.step { background: #f7f3ec; border-radius: 12px; padding: 12px; }
.step b { display: block; margin-bottom: 4px; color: var(--accent-dark); }
.example { background: #f7f3ec; border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; font-family: Consolas, "Microsoft YaHei", monospace; font-size: 13px; }
.pick { padding-top: 28px; }
.card table, .drawer table, .quote table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #efeae2; }
.badge.unpaid { background: #fff1df; color: var(--warn); }
.badge.paid { background: #e5f6ee; color: var(--ok); }
.badge.closed { background: #eee; color: #555; }
.badge.other { background: #ece8ff; color: #43387a; }
.toast { position: fixed; right: 16px; bottom: 16px; background: #1c2430; color: #fff; padding: 12px 14px; border-radius: 12px; max-width: 380px; z-index: 30; box-shadow: var(--shadow); }
.mask { position: fixed; inset: 0; background: rgba(28,36,48,.42); display: flex; justify-content: flex-end; z-index: 15; }
.mask.center { justify-content: center; align-items: center; }
.dialog { width: min(440px, calc(100% - 32px)); background: var(--card); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.result-dialog { width: min(520px, calc(100% - 32px)); }
.result-dialog.ok h3 { color: var(--ok); }
.result-dialog.bad h3 { color: var(--bad); }
.result-dialog.warn h3 { color: var(--warn); }
.result-list { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.result-list li { padding: 8px 10px; border-radius: 10px; background: #f6f3ee; line-height: 1.5; }
.result-list li.ok { background: #e5f6ee; }
.result-list li.bad { background: #fdeceb; }
.result-list li.wait { background: #fff1df; }
#result-mask { z-index: 50; }
.drawer { width: min(820px, 100%); background: var(--card); height: 100%; overflow: auto; padding: 20px; }
#copy-text { width: 100%; min-height: 320px; border: 1px solid #ddd6cb; border-radius: 10px; padding: 10px; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.15fr) minmax(380px, .85fr); background: #121820; }
.login-side { position: relative; isolation: isolate; overflow: hidden; color: #f6f1e8; padding: 64px 72px; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(880px 520px at 88% -8%, rgba(196, 98, 45, .32), transparent 58%), linear-gradient(180deg, #1b232e 0%, #121820 100%); }
.login-side::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 76%); }
.login-brand { display: flex; gap: 12px; align-items: center; color: #fff; margin-bottom: 48px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 16px; letter-spacing: .08em; }
.login-brand small { margin-top: 2px; color: #9aabbe; font-size: 12px; letter-spacing: .16em; }
.login-side h1 { font-size: 46px; font-weight: 600; line-height: 1.18; letter-spacing: -.03em; margin: 0 0 16px; max-width: 560px; }
.login-lead { margin: 0; max-width: 420px; color: #c9d2de; font-size: 16px; line-height: 1.7; }
.login-steps { list-style: none; margin: 40px 0 0; padding: 0; max-width: 460px; }
.login-steps li { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); }
.login-steps li:last-child { border-bottom: 1px solid rgba(255,255,255,.1); }
.login-steps span { flex: none; width: 28px; padding-top: 2px; color: #e7b397; font-size: 13px; letter-spacing: .08em; }
.login-steps b { display: block; font-size: 15px; font-weight: 600; }
.login-steps small { display: block; margin-top: 4px; color: #9aabbe; font-size: 13px; }
.login-stage { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: linear-gradient(180deg, #f7f3ec 0%, #efe8dc 100%); }
.login-card { width: min(400px, 100%); margin: 0; background: var(--card); border: 1px solid rgba(28, 36, 48, .06); border-radius: 22px; padding: 36px 32px 32px; box-shadow: 0 24px 60px rgba(28, 36, 48, .08); }
.login-kicker { margin: 0 0 8px; font-size: 12px; letter-spacing: .22em; color: var(--accent-dark); }
.login-card h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.02em; }
.login-card .muted { display: block; margin: 0 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .field input { padding: 12px 14px; border-radius: 12px; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px; letter-spacing: .08em; }
.login-card .install-app { letter-spacing: 0; font-weight: 600; }
.eyebrow { letter-spacing: .16em; font-size: 12px; color: #e7b397; margin: 0; }
.muted { color: var(--muted); }
.source-box textarea { width: 100%; min-height: 148px; border: 1px solid #ddd6cb; border-radius: 12px; padding: 12px; resize: vertical; }
.source-actions { margin-top: 10px; }
.source-progress { margin-top: 12px; }
.source-progress-track { height: 8px; border-radius: 999px; background: #efe8dc; overflow: hidden; }
.source-progress-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .25s linear; }
.source-progress p { margin: 8px 0 0; }
.more-search { margin-top: 12px; color: var(--muted); }
.more-search summary { cursor: pointer; }
.more-search .row { margin-top: 8px; }
.more-search input { flex: 1; min-width: 180px; border: 1px solid #ddd6cb; border-radius: 10px; padding: 9px 11px; }
.source-list { display: flex; flex-direction: column; gap: 10px; }
.source-row { display: grid; grid-template-columns: 28px 96px minmax(0, 1fr) 450px; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.source-row .thumb { width: 96px; height: 96px; margin: 0; }
.source-row.bad { background: #fff8f8; }
.sku-pick { display: flex; flex-direction: column; gap: 8px; }
.dialog.wide { width: min(880px, calc(100% - 32px)); max-height: min(86vh, 920px); overflow: auto; }
.goods-dialog { width: min(980px, calc(100% - 28px)); padding: 0; background: #fffdf9; }
.goods-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: rgba(255, 253, 249, .96); border-bottom: 1px solid var(--line); }
.goods-head .eyebrow { margin-bottom: 4px; color: var(--accent-dark); }
.goods-head h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.goods-body { padding: 18px; }
.goods-hero { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.goods-stage { background: #f7f3ec; border-radius: 16px; padding: 12px; }
.goods-cover { width: 100%; height: 360px; object-fit: contain; border-radius: 12px; background: #fff; display: block; }
span.goods-cover { display: flex; align-items: center; justify-content: center; }
.goods-thumbs { display: flex; gap: 8px; overflow: auto; margin-top: 10px; padding-bottom: 2px; }
.goods-thumb { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 12px; background: #fff; }
.goods-thumb.on { border-color: var(--accent); }
.goods-thumb .thumb { width: 100%; height: 100%; margin: 0; border-radius: 10px; }
.goods-price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 12px; }
.goods-price b { font-size: 32px; color: var(--accent-dark); letter-spacing: -.02em; }
.goods-price s { color: var(--muted); }
.goods-facts, .prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goods-facts div, .prop-grid div { background: #f7f3ec; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.goods-facts span, .prop-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.goods-facts b, .prop-grid b { display: block; font-weight: 600; line-height: 1.4; word-break: break-word; }
.goods-links { display: flex; gap: 8px; margin-top: 14px; }
.goods-links a { display: inline-flex; align-items: center; border: 1px solid #ddd6cb; border-radius: 999px; padding: 6px 12px; background: #fff; text-decoration: none; }
.goods-block { margin-top: 22px; }
.goods-block h4 { margin: 0 0 10px; font-size: 15px; }
.sku-grid { display: flex; flex-direction: column; gap: 8px; }
.sku-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; }
.sku-card.on { border-color: #e0b397; background: #fff8f3; }
.sku-card .thumb { width: 64px; height: 64px; margin: 0; }
.sku-card p { margin: 2px 0 0; }
.sku-card s { color: var(--muted); margin-left: 6px; }
.promo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.promo-chip { background: #fff1df; color: var(--warn); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.detail-text { margin-top: 0; line-height: 1.7; }
.filter-bar, .filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.filter-bar .filter-account { grid-column: span 2; }
.filter-field input, .filter-field select { width: 100%; border: 1px solid #ddd6cb; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--ink); }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.table-wrap { overflow: auto; }
.loading-mask { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(28, 36, 48, .38); }
.loading-card { display: flex; align-items: center; gap: 12px; min-width: 240px; padding: 18px 22px; border-radius: 16px; background: #fffdf9; box-shadow: var(--shadow); }
.loading-card p { margin: 0; }
.page-wait { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.page-wait p { margin: 0; }
.spinner { width: 22px; height: 22px; flex: none; border: 3px solid #e6e1d8; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { width: 100%; border: 1px solid #ddd6cb; border-radius: 10px; padding: 9px 11px; background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 140px; text-align: center; text-decoration: none; }
.actions a.btn { color: var(--ink); }
.actions a.btn.primary, .actions .btn.primary { color: #fff; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.order-check { width: 42px; text-align: center; }
.order-check input { width: 16px; height: 16px; }
.order-no { min-width: 248px; }
.order-no b { font-weight: 650; }
.order-no .k { display: inline-block; min-width: 4em; }
.bill-sort { font-weight: 650; }
.addr-sheet { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.addr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fffdf9; }
.addr-toolbar h3 { margin: 0 0 4px; }
.addr-toolbar p { margin: 0; color: var(--muted); }
.addr-sheet .table-wrap { overflow: auto; }
.addr-sheet table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.addr-sheet th, .addr-sheet td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; line-height: 20px; }
.addr-sheet th:nth-child(6), .addr-sheet td:nth-child(6),
.addr-sheet th:nth-child(7), .addr-sheet td:nth-child(7) { white-space: normal; overflow: visible; }
.addr-sheet th:nth-child(10), .addr-sheet td:nth-child(10) { width: 64px; overflow: visible; text-align: center; white-space: nowrap; }
.addr-sheet th:nth-child(11), .addr-sheet td:nth-child(11) { width: 148px; overflow: visible; }
.addr-sheet tr.is-default td { background: #fffaf4; }
.account-sheet th:nth-child(1), .account-sheet td:nth-child(1) { width: 72px; }
.account-sheet th:nth-child(2), .account-sheet td:nth-child(2) { width: 64px; }
.account-sheet th:nth-child(3), .account-sheet td:nth-child(3) { width: 176px; }
.account-sheet th:nth-child(4), .account-sheet td:nth-child(4) { width: 148px; }
.account-sheet th:nth-child(5), .account-sheet td:nth-child(5) { width: 88px; }
.account-sheet th:nth-child(6), .account-sheet td:nth-child(6) { width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-sheet th:nth-child(7), .account-sheet td:nth-child(7) { width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-sheet th:nth-child(8), .account-sheet td:nth-child(8) { width: 64px; overflow: visible; text-align: center; white-space: nowrap; }
.def-switch { position: relative; display: inline-block; width: 36px; height: 20px; vertical-align: middle; }
.def-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.def-switch span { display: block; width: 36px; height: 20px; border-radius: 999px; background: #d7d0c6; transition: background .15s ease; }
.def-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(28, 36, 48, .25); transition: transform .15s ease; }
.def-switch input:checked + span { background: var(--accent); }
.def-switch input:checked + span::after { transform: translateX(16px); }
.def-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-sheet th:nth-child(9), .account-sheet td:nth-child(9) { width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-sheet th:nth-child(10), .account-sheet td:nth-child(10) { width: 210px; overflow: visible; text-overflow: clip; white-space: nowrap; }
.account-ops { display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.account-ops .btn { padding: 5px 8px; font-size: 13px; white-space: nowrap; }
#confirm-mask { z-index: 60; }
.dialog.account-dialog { width: min(640px, calc(100% - 32px)); max-height: min(88vh, 760px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.bind-hint { margin: 0; color: var(--muted); line-height: 1.6; }
.auth-note { margin: 0; padding: 10px 18px; background: #fff6ea; color: #8a4b12; border-bottom: 1px solid #f0d2b4; line-height: 1.6; }
.account-dialog .auth-note { margin: 0; border: 1px solid #f0d2b4; border-radius: 12px; }
.auth-note a { color: #8a4b12; font-weight: 650; word-break: break-all; }
.bind-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bind-row { display: flex; gap: 8px; }
.bind-row .btn { flex: 1; }
.bind-complete { width: 100%; }
.bind-split { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.bind-split::before, .bind-split::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#account-mask, #batch-mask, #edit-account { z-index: 20; }
.addr-hint, .addr-empty p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.addr-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.addr-actions .btn { padding: 5px 8px; font-size: 13px; line-height: 20px; white-space: nowrap; }
.addr-empty { padding: 48px 18px; text-align: center; }
.addr-empty strong { font-size: 16px; }
.dialog.address-dialog { width: min(760px, calc(100% - 32px)); max-height: min(88vh, 820px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.address-head, .address-foot { display: flex; gap: 12px; align-items: center; padding: 16px 18px; }
.address-head { align-items: flex-start; border-bottom: 1px solid var(--line); }
.address-head .eyebrow { margin-bottom: 4px; color: var(--accent-dark); }
.address-head h3 { margin: 0; font-size: 18px; }
.address-body { padding: 16px 18px 8px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.addr-section h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.addr-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.addr-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.address-body .field { margin: 0; }
.address-body textarea { width: 100%; border: 1px solid #ddd6cb; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--ink); resize: vertical; }
.addr-zip { max-width: 220px; margin-top: 10px; }
.address-foot { justify-content: space-between; border-top: 1px solid var(--line); background: #fffdf9; }
#address-mask { z-index: 20; }
.drawer.order-drawer { width: min(860px, 100%); padding: 0; background: #fffdf9; }
.order-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px 14px; background: rgba(255, 253, 249, .96); border-bottom: 1px solid var(--line); }
.order-head .eyebrow { margin-bottom: 4px; color: var(--accent-dark); }
.order-head h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.order-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); }
.order-body { padding: 16px 20px 28px; }
.order-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.order-facts div { background: #f7f3ec; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.order-facts span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.order-facts b { display: block; font-weight: 600; line-height: 1.45; word-break: break-word; }
.order-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fdecec; color: var(--bad); }
.order-lines { margin-top: 18px; }
.order-lines h3 { margin: 0 0 10px; font-size: 15px; }
.order-line-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) 132px; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; margin-bottom: 8px; }
.order-line-card .thumb { width: 72px; height: 72px; margin: 0; }
.order-line-card p { margin: 4px 0 0; }
.order-line-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.order-line-price b { color: var(--accent-dark); font-size: 16px; }
.order-line-price span { color: var(--muted); font-size: 12px; }
.k { color: var(--muted); font-size: 12px; margin-right: 4px; }
.btn.tiny { padding: 2px 8px; font-size: 12px; }
.plain { background: var(--bg); }
.plain-card { max-width: 560px; margin: 48px auto; background: #fff; border-radius: 16px; padding: 28px; }
.warn-text { color: var(--bad); }
hr { border: 0; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .app { display: block; }
  .side { width: auto; height: auto; position: static; display: flex; gap: 6px; overflow: auto; padding: 10px; }
  .brand, .nav-label { display: none; }
  .nav-btn { width: auto; white-space: nowrap; box-shadow: none; }
  .layout-source, .grid, .filters, .filter-bar, .filter-grid, .source-row, .draft .fields, .steps, .login { grid-template-columns: 1fr; }
  .filter-bar .filter-account { grid-column: auto; }
  .source-panel { position: static; }
  .goods-hero, .goods-facts, .prop-grid { grid-template-columns: 1fr; }
  .goods-cover { height: 240px; }
  .draft-dock { left: 12px; right: 12px; bottom: 12px; }
  .quote-foot { flex-direction: column; align-items: stretch; }
  .order-facts, .order-line-card, .addr-3, .addr-2, .bind-fields { grid-template-columns: 1fr; }
  .address-foot { grid-column: 1 / -1; justify-content: flex-start; }
  .address-foot { flex-direction: column; align-items: stretch; }
  .order-line-price { align-items: flex-start; text-align: left; }
  .login-side { padding: 36px 24px 12px; }
  .login-side h1 { font-size: 32px; }
  .login-brand { margin-bottom: 24px; }
  .login-steps { display: none; }
  .login-stage { padding: 8px 16px 32px; }
  .login-card { padding: 28px 22px 24px; }
  .top { flex-wrap: wrap; }
  .subject { min-width: 100%; }
}
