/* ============================================================
   威客云 · 商户移动端（H5 / 小程序 web-view）
   Mobile-first, 390px baseline
   ============================================================ */
:root {
  --brand: #635bff;
  --brand-600: #5146f0;
  --brand-50: #f3f2ff;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --pink: #ec4899;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e9ebf3;
  --bg: #f4f5fa;
  --card: #fff;
  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #e9ebf3; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
#app { max-width: 460px; min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; overflow: hidden; box-shadow: 0 0 60px rgba(15,23,42,.12); }
@media (max-width: 460px) { #app { max-width: none; box-shadow: none; } }
.safe-top { padding-top: var(--wk-safe-top, env(safe-area-inset-top, 0px)); }
.safe-bottom { padding-bottom: var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px)); }

/* boot */
.boot { min-height: 100vh; display: grid; place-items: center; background: #0b1020; color: #fff; }
.boot-mark { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; font-size: 25px; font-weight: 900; background: linear-gradient(135deg, #7c73ff, #a78bfa); box-shadow: 0 14px 34px rgba(124,115,255,.42); margin: 0 auto 14px; }
.boot p { color: #8b95b5; font-size: 12px; text-align: center; margin: 0; }

/* login */
.login { min-height: 100vh; background: #0b1020; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.login::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 320px at 10% 5%, rgba(99,91,255,.55), transparent 65%), radial-gradient(360px 300px at 100% 80%, rgba(34,211,238,.16), transparent 65%); }
.login::after { content: ""; position: absolute; inset: 0; 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: 38px 38px; mask-image: radial-gradient(circle at 50% 20%, #000, transparent 75%); }
.login-top { position: relative; z-index: 1; padding: 54px 24px 18px; color: #fff; }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 900; }
.login-brand .lb-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #7c73ff, #a78bfa); font-size: 18px; }
.login-brand small { display: block; color: #6b7897; font-size: 8px; letter-spacing: 1.4px; font-weight: 700; }
.login-copy { margin-top: 42px; }
.login-copy h1 { font-size: 30px; line-height: 1.22; letter-spacing: -1px; margin: 0 0 10px; font-weight: 900; }
.login-copy h1 em { font-style: normal; background: linear-gradient(120deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-copy p { color: #9da8c7; font-size: 12.5px; line-height: 1.75; margin: 0; max-width: 300px; }
.login-panel { position: relative; z-index: 1; margin-top: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 24px 22px calc(26px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); }
.login-panel h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.5px; }
.login-panel .sub { color: var(--muted-2); font-size: 11.5px; margin-bottom: 20px; }
.field { margin-bottom: 13px; }
.field label { display: block; color: #475569; font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.field-pick { float: right; border: 0; background: #eff6ff; color: #2563eb; border-radius: 6px; padding: 3px 7px; font-size: 9px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; margin-top: -1px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.option-chip { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 8px; font-size: 11px; color: var(--ink); font-weight: 700; }
.option-chip.active { border-color: var(--brand); background: #eff6ff; color: #1d4ed8; }
.scan-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #0f172a; border-radius: 14px; overflow: hidden; }
.scan-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: 18%; bottom: 18%; border: 2px solid rgba(255,255,255,.92); border-radius: 10px; box-shadow: 0 0 0 999px rgba(15,23,42,.35); pointer-events: none; }
.scan-tip { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-size: 10px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.field input, .field select, .field textarea { width: 100%; height: 46px; border: 1px solid #dfe3ee; border-radius: 12px; padding: 0 13px; font-size: 14px; color: var(--ink); background: #fbfcff; outline: none; transition: .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #b9b3ff; background: #fff; box-shadow: 0 0 0 3px rgba(99,91,255,.1); }
.field textarea { height: 78px; padding: 11px 13px; resize: none; line-height: 1.7; }
.field .hint { color: var(--muted-2); font-size: 10px; margin-top: 4px; line-height: 1.5; }
.login-btn { width: 100%; height: 48px; border: 0; border-radius: 13px; background: linear-gradient(135deg, var(--brand), #7c73ff); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 10px 24px rgba(99,91,255,.3); margin-top: 6px; }
.login-btn:active { transform: scale(.99); }
.login-help { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; font-size: 10.5px; color: var(--muted-2); }
.demo-line { margin-top: 16px; padding: 11px 12px; border-radius: 11px; background: #f8f9fd; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.demo-line b { color: var(--brand); }
.login-error { min-height: 18px; color: #dc2626; font-size: 11.5px; margin-top: 8px; }

/* shell */
.shell { min-height: 100vh; padding-bottom: calc(66px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); }
.shell-tab { padding-top: var(--wk-safe-top, env(safe-area-inset-top, 0px)); }
.shell-sub { padding-bottom: 0; }
.subbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--wk-safe-top, env(safe-area-inset-top, 0px))) calc(14px + var(--wk-capsule-right, 0px)) 8px 14px; background: rgba(244,245,250,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(233,235,243,.72); }
.back-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink); flex: 0 0 auto; }
.subbar-title { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.subbar-space { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 800; }
.pill-green { background: #d1fae5; color: #047857; }
.pill-amber { background: #fef3c7; color: #b45309; }
.pill-red { background: #fee2e2; color: #b91c1c; }
.pill-violet { background: #ede9fe; color: #5b21b6; }
.pill-slate { background: #e2e8f0; color: #475569; }

.page { padding: 14px 16px 20px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; margin: 2px 2px 12px; }
.page-title h1 { font-size: 21px; letter-spacing: -.6px; margin: 0; font-weight: 900; }
.page-title p { color: var(--muted-2); font-size: 10.5px; margin: 4px 0 0; }
.page-title .actions { display: flex; gap: 6px; }
.page-lead { color: var(--muted-2); font-size: 10.5px; margin: 2px 2px 13px; }

/* hero */
.hero-card { position: relative; border-radius: 20px; overflow: hidden; color: #fff; padding: 18px; background: linear-gradient(120deg, var(--mc, #10b981), var(--mc2, #14532d)); box-shadow: 0 16px 38px rgba(16,185,129,.22); }
body[data-template-style="vivid"] .hero-card { filter: saturate(1.15); }
body[data-template-style="compact"] .hero-card { padding: 14px; }
.hero-card::after { content: ""; position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.24), transparent 68%); }
.hero-main { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; }
.hero-avatar { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); flex: 0 0 auto; }
.hero-name { font-size: 18px; font-weight: 900; letter-spacing: -.4px; }
.hero-meta { color: rgba(255,255,255,.76); font-size: 10px; margin-top: 3px; }
.hero-chips { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.hero-chips span { background: rgba(255,255,255,.14); color: #fff; padding: 3px 7px; border-radius: 999px; font-size: 9px; }
.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.16); }
.hero-stats b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.4px; }
.hero-stats span { display: block; font-size: 9px; color: rgba(255,255,255,.66); margin-top: 1px; }

/* cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.card-pad { padding: 15px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 9px; }
.section-head h2 { font-size: 14px; margin: 0; letter-spacing: -.2px; }
.section-head a, .section-head button { border: 0; background: transparent; color: var(--brand); font-size: 10.5px; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; position: relative; overflow: hidden; }
.stat-card .sc-label { color: var(--muted-2); font-size: 9.5px; font-weight: 700; }
.stat-card .sc-value { font-size: 22px; font-weight: 900; letter-spacing: -.8px; margin-top: 4px; line-height: 1; }
.stat-card .sc-foot { color: var(--muted-2); font-size: 9px; margin-top: 5px; }
.stat-card::after { content: ""; position: absolute; width: 54px; height: 54px; border-radius: 50%; right: -24px; top: -28px; background: var(--sc, #eeecff); opacity: .7; }
.stat-grid + .stat-grid { margin-top: 9px; }
.mini-kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.mini-kv:last-child { border-bottom: 0; }
.mini-kv span { color: var(--muted-2); font-size: 10px; }
.mini-kv b { font-size: 12px; color: var(--ink); }
.type-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 9px; }
.type-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.type-head b { display: block; font-size: 14px; font-weight: 900; color: var(--ink); }
.type-head span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.type-amount { color: var(--brand-700, #0369a1); font-size: 16px; font-weight: 900; white-space: nowrap; }
.type-sub { color: var(--muted-2); font-size: 9.5px; margin: 6px 0 8px; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.type-grid > div { background: #f8fafc; border-radius: 9px; padding: 7px 8px; min-width: 0; }
.type-grid span { display: block; color: var(--muted-2); font-size: 8.5px; }
.type-grid b { display: block; font-size: 11px; margin-top: 2px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos { color: #059669 !important; }
.neg { color: #dc2626 !important; }
.pay-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pay-row:last-child { border-bottom: 0; }
.pay-main { flex: 0 0 72px; min-width: 0; }
.pay-main b { display: block; font-size: 11px; color: var(--ink); }
.pay-main span { display: block; color: var(--muted-2); font-size: 8.5px; margin-top: 1px; }
.pay-bar { flex: 1; height: 7px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.pay-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #38bdf8, #2563eb); }
.pay-amount { flex: 0 0 auto; font-size: 11px; font-weight: 900; color: var(--ink); }
.trend { display: flex; align-items: flex-end; gap: 7px; height: 118px; padding: 4px 0 0; }
.trend-item { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.trend-bar { width: 100%; max-width: 24px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand), var(--brand-600)); }
.trend-label { font-size: 8px; color: var(--muted-2); white-space: nowrap; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 12px; text-align: left; }
.quick .qi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.quick b { display: block; font-size: 11.5px; color: var(--ink); }
.quick span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 1px; }

.product-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f0f1f7; }
.product-row:last-child { border-bottom: 0; }
.p-thumb { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; font-weight: 900; flex: 0 0 auto; }
.p-main { flex: 1; min-width: 0; }
.p-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { color: var(--muted-2); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-stock { text-align: right; flex: 0 0 auto; }
.p-stock b { display: block; font-size: 14px; font-weight: 900; letter-spacing: -.3px; }
.p-stock span { display: block; font-size: 8.5px; color: var(--muted-2); }

.search-row { display: flex; gap: 7px; margin-bottom: 11px; }
.search-box { position: relative; flex: 1; }
.search-box input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 0 12px 0 34px; font-size: 12px; outline: none; }
.search-box svg { position: absolute; left: 11px; top: 12px; color: #94a3b8; }
.filter-chip { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0 10px; height: 40px; font-size: 10px; color: #475569; font-weight: 700; }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.list-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 12.5px; font-weight: 800; }
.list-item .li-sub { color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.list-item .li-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.staff-row { flex-wrap: wrap; align-items: flex-start; }
.staff-row .li-main { flex: 1 1 calc(100% - 50px); }
.staff-row .li-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
.prod-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 7px; margin-bottom: 2px; }
.prod-cat { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 11px; font-size: 10px; color: var(--muted); }
.prod-cat.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 800; }
.prod-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.prod-filter-row .lib-tabs { margin-bottom: 0; }
.sold-toggle { display: flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.prod-row { cursor: pointer; }
.prod-detail-head { display: flex; align-items: center; gap: 10px; }
.prod-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.prod-meta > div { background: #f8fafc; border-radius: 9px; padding: 7px 8px; min-width: 0; }
.prod-meta span { display: block; color: var(--muted-2); font-size: 8.5px; }
.prod-meta b { display: block; font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-log-list { max-height: 260px; overflow-y: auto; }
.op-log { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.op-log:last-child { border-bottom: 0; }
.op-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; }
.op-dot.in { background: #059669; }
.op-dot.out { background: #2563eb; }
.op-dot.cat { background: #d97706; }
.op-main { flex: 1; min-width: 0; }
.op-main b { display: block; font-size: 10.5px; }
.op-main span { display: block; color: var(--muted-2); font-size: 8.5px; margin-top: 1px; }
.op-side { text-align: right; flex: 0 0 auto; }
.op-side b { display: block; font-size: 11px; }
.op-side span { display: block; color: var(--muted-2); font-size: 8px; }
.renew-page { min-height: 100vh; background: #f1f5f9; padding: 28px 18px; display: flex; align-items: center; justify-content: center; }
.renew-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px 18px 18px; box-shadow: 0 18px 50px rgba(15,23,42,.08); }
.renew-icon { width: 58px; height: 58px; border-radius: 18px; background: #fff7ed; color: #ea580c; display: grid; place-items: center; margin-bottom: 14px; }
.renew-eyebrow { color: #94a3b8; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.renew-card h1 { font-size: 24px; font-weight: 900; color: #0f172a; margin: 5px 0 8px; letter-spacing: -.5px; }
.renew-card > p { color: #64748b; font-size: 11.5px; line-height: 1.8; margin: 0 0 14px; }
.renew-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 11px; }
.renew-meta span { color: #94a3b8; }
.renew-meta b { color: #0f172a; }
.renew-contacts { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.renew-contact { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: #f8fafc; border-radius: 11px; padding: 10px 11px; color: #0f172a; text-decoration: none; }
.renew-contact span { color: #94a3b8; font-size: 9px; width: 48px; flex: 0 0 auto; }
.renew-contact b { flex: 1; font-size: 11px; font-weight: 800; }
.renew-contact i { font-style: normal; color: var(--brand); font-size: 9px; font-weight: 800; }
.renew-contact svg { color: var(--brand); }
.renew-empty { border: 1px dashed var(--line); border-radius: 11px; padding: 12px; text-align: center; color: #94a3b8; font-size: 10px; }
.renew-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.renew-foot { text-align: center; color: #94a3b8; font-size: 9px; margin-top: 12px; }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.log-row { align-items: flex-start; cursor: default; }
.log-row .op-dot { margin-top: 6px; }
.log-links { display: flex; gap: 5px; margin-top: 5px; }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 9px; }
.cat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cat-head b { display: block; font-size: 14px; font-weight: 900; }
.cat-head span { display: block; color: var(--muted-2); font-size: 9px; margin-top: 2px; }
.cat-meta { display: flex; gap: 10px; color: var(--muted-2); font-size: 9px; margin: 7px 0; flex-wrap: wrap; }
.cat-params { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-base { background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; padding: 9px; margin: 8px 0; }
.cat-base b { display: block; font-size: 10px; margin-bottom: 6px; }
.cat-base div { display: flex; gap: 4px; flex-wrap: wrap; }
.cat-base span { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 8.5px; color: var(--muted); }
.cat-param-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cat-param-row .cp-label { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 10px; }
.cp-required { display: flex; align-items: center; gap: 3px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.cp-required input[type="checkbox"] { width: 14px !important; height: 14px !important; min-height: 0 !important; padding: 0 !important; border: 1px solid var(--line); border-radius: 3px; flex: 0 0 auto; }
.cat-param-row .mini-btn { flex: 0 0 auto; }
.batch-toggle { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 11px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.batch-toggle span { color: var(--muted-2); font-weight: 400; font-size: 9px; }
.batch-item { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px; margin-bottom: 9px; }
.batch-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.batch-item-head b { font-size: 12px; }
.batch-item-head button { border: 0; background: #fef2f2; color: #dc2626; border-radius: 7px; padding: 4px 8px; font-size: 9px; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 8px; font-size: 9.5px; font-weight: 700; color: #475569; }
.mini-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mini-btn.danger { color: #dc2626; border-color: #fecaca; }

.empty { text-align: center; padding: 38px 16px; color: var(--muted-2); }
.empty .e-icon { width: 50px; height: 50px; border-radius: 15px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.empty b { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 3px; }
.empty p { margin: 0; font-size: 10.5px; line-height: 1.6; }

/* bottom nav */
.tabbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(460px, 100%); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4,1fr); padding: 7px 10px calc(7px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); z-index: 50; }
.tab { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #94a3b8; font-size: 9px; font-weight: 700; padding: 3px 0; }
.tab.active { color: var(--brand); }
.tab svg { width: 21px; height: 21px; }
.fab { position: fixed; right: max(18px, calc((100vw - 460px)/2 + 18px)); bottom: calc(78px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); width: 52px; height: 52px; border-radius: 17px; border: 0; background: linear-gradient(135deg, var(--brand), #7c73ff); color: #fff; font-size: 26px; box-shadow: 0 12px 28px rgba(99,91,255,.36); z-index: 40; display: grid; place-items: center; }
.home-actions { position: fixed; left: 50%; bottom: calc(72px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); transform: translateX(-50%); width: min(460px, 100%); padding: 0 16px; display: flex; gap: 10px; z-index: 48; }
.ha-btn { flex: 1; height: 50px; border: 0; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .5px; }
.ha-btn:active { transform: scale(.98); }
.ha-in { background: linear-gradient(135deg, var(--brand), var(--brand-600)); box-shadow: 0 12px 26px rgba(15,23,42,.2); }
.ha-out { background: linear-gradient(135deg, #0f172a, #334155); box-shadow: 0 12px 26px rgba(15,23,42,.24); }

/* sheets/forms */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(9,14,30,.46); z-index: 100; animation: fade .18s; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(460px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; z-index: 101; padding: 18px 18px calc(20px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); animation: up .24s cubic-bezier(.2,.8,.3,1); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 16px; margin: 0; letter-spacing: -.3px; }
.sheet-close { border: 0; background: #f3f4f9; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); font-size: 16px; }
.sheet-actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: #334155; font-size: 12px; font-weight: 800; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-600)); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(15,23,42,.16); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }

.batch-row { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 9px; position: relative; }
.batch-row .br-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.batch-row .br-index { font-size: 9.5px; color: var(--muted-2); font-weight: 800; letter-spacing: .6px; }
.batch-row .br-remove { border: 0; background: #fef2f2; color: #dc2626; border-radius: 7px; font-size: 9.5px; padding: 4px 7px; font-weight: 700; }
.batch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.batch-grid .field { margin: 0; }
.batch-grid .field label { font-size: 9.5px; margin-bottom: 4px; }
.batch-grid .field input, .batch-grid .field select { height: 38px; border-radius: 9px; font-size: 12px; }
.batch-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(244,245,250,0), #f4f5fa 28%); padding: 14px 0 4px; display: flex; gap: 8px; }
.batch-actions .btn { flex: 1; }
.result-card { text-align: center; padding: 22px 16px; }
.result-nums { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0; }
.result-nums div { background: #f8f9fd; border-radius: 10px; padding: 10px 4px; }
.result-nums b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.result-nums span { font-size: 9px; color: var(--muted-2); }
.result-nums .ok b { color: #059669; }
.result-nums .bad b { color: #dc2626; }

/* library */
.lib-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 9px; scrollbar-width: none; }
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 11px; font-size: 10px; white-space: nowrap; color: #475569; font-weight: 700; }
.lib-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 10px; position: relative; }
.lib-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(99,91,255,.12); }
.lib-card.imported { opacity: .58; }
.lib-card .lc-check { position: absolute; right: 9px; top: 9px; width: 16px; height: 16px; accent-color: var(--brand); }
.lib-card .lc-name { font-size: 11.5px; font-weight: 800; line-height: 1.35; padding-right: 16px; min-height: 31px; }
.lib-card .lc-meta { color: var(--muted-2); font-size: 9px; margin-top: 4px; }
.lib-card .lc-price { color: var(--brand); font-size: 13px; font-weight: 900; margin-top: 6px; }
.lib-bar { position: fixed; left: 50%; bottom: calc(72px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); transform: translateX(-50%); width: min(430px, calc(100% - 24px)); background: #0b1020; color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 18px 40px rgba(11,16,32,.35); z-index: 45; }
.lib-bar span { font-size: 10.5px; color: #cbd5e1; }
.lib-bar b { color: #fff; }

/* home · today */
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; flex: 0 0 auto; }
.today-card { position: relative; overflow: hidden; border-radius: 20px; padding: 18px; color: #fff; background: linear-gradient(125deg, var(--brand), var(--brand-600)); box-shadow: 0 16px 34px rgba(15,23,42,.16); }
.today-card::after { content: ""; position: absolute; right: -46px; top: -56px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 68%); }
.today-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.78); }
.today-badge { background: rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 3px 8px; font-size: 8.5px; }
.today-amount { position: relative; z-index: 1; font-size: 34px; font-weight: 900; letter-spacing: -1.4px; line-height: 1; margin-top: 9px; font-variant-numeric: tabular-nums; }
.today-foot { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 17px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.18); }
.today-foot b { display: block; font-size: 14px; font-weight: 900; letter-spacing: -.2px; }
.today-foot span { display: block; font-size: 9px; color: rgba(255,255,255,.68); margin-top: 2px; }
.home-stats { margin-top: 10px; }
.stock-health { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #f0f1f7; }
.stock-health i { display: block; height: 100%; }
.stock-legend { display: flex; gap: 14px; margin-top: 11px; flex-wrap: wrap; }
.stock-legend div { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.stock-legend b { color: var(--ink); font-size: 11px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.stock-note { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #eef1f7; color: var(--muted-2); font-size: 9.5px; line-height: 1.6; }

/* my · profile */
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 15px; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.pc-row { display: flex; align-items: center; gap: 12px; }
.pc-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 900; flex: 0 0 auto; box-shadow: 0 8px 18px rgba(15,23,42,.12); }
.pc-main { flex: 1; min-width: 0; }
.pc-name { font-size: 17px; font-weight: 900; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta { color: var(--muted-2); font-size: 10px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 10px; border-top: 1px solid #f0f1f7; color: var(--muted-2); font-size: 9px; }
.tools-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2px 14px; }
.tool-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid #f0f1f7; background: none; text-align: left; color: var(--ink); }
.tool-row:last-child { border-bottom: 0; }
.tool-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: 0 0 auto; }
.tool-main { flex: 1; min-width: 0; }
.tool-main b { display: block; font-size: 12.5px; font-weight: 800; }
.tool-main span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-row > svg { color: #cbd5e1; flex: 0 0 auto; }
.settings-entry { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: left; color: var(--ink); }
.se-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f1f5f9; color: #475569; flex: 0 0 auto; }
.se-main { flex: 1; min-width: 0; }
.se-main b { display: block; font-size: 13px; font-weight: 800; }
.se-main span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-entry > svg { color: #cbd5e1; flex: 0 0 auto; }

/* settings */
.set-label { margin: 16px 2px 8px; color: var(--muted-2); font-size: 9.5px; font-weight: 800; letter-spacing: .6px; }
.set-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; }
.set-card-pad { padding: 14px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border: 0; border-bottom: 1px solid #f0f1f7; width: 100%; background: none; text-align: left; color: var(--ink); }
.set-row:last-child { border-bottom: 0; }
.set-row .sr-main { flex: 1; min-width: 0; }
.set-row .sr-main b { display: block; font-size: 12.5px; font-weight: 800; }
.set-row .sr-main span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row .sr-val { color: var(--muted); font-size: 10.5px; flex: 0 0 auto; max-width: 46%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row > svg { color: #cbd5e1; flex: 0 0 auto; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f1f7; }
.plan-head b { display: block; font-size: 14px; font-weight: 900; }
.plan-head span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.set-note { color: var(--muted-2); font-size: 9.5px; line-height: 1.7; margin-top: 2px; }
.logout-btn { margin-top: 18px; color: #dc2626; border-color: #fecaca; background: #fff; }
.notice-amber { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 10px 12px; font-size: 10px; line-height: 1.7; margin-bottom: 12px; }
.field input:disabled, .field textarea:disabled, .field select:disabled { background: #f8fafc; color: #94a3b8; }

/* inbound */
.in-store-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; margin-bottom: 12px; }
.is-label { font-size: 10px; color: var(--muted-2); font-weight: 800; flex: 0 0 auto; }
.is-select { flex: 1; min-width: 0; }
.is-select .filter-chip { height: 36px; border: 0; background: #f8fafc !important; }
.pur-tip { display: flex; align-items: flex-start; gap: 7px; background: #f0f9ff; border: 1px solid #e0f2fe; color: #0369a1; border-radius: 12px; padding: 10px 12px; font-size: 9.5px; line-height: 1.6; margin-bottom: 14px; }
.pur-tip svg { flex: 0 0 auto; margin-top: 1px; }
.pur-group-title { margin: 14px 2px 8px; font-size: 12px; font-weight: 900; letter-spacing: -.2px; color: var(--ink); }
.pur-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; }
.pur-card { position: relative; grid-column: span 2; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px 10px 12px; text-align: left; min-height: 128px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; box-shadow: 0 4px 12px rgba(15,23,42,.03); }
.pur-card:active { transform: scale(.98); }
.pur-wide { grid-column: span 3; min-height: 84px; display: grid; grid-template-columns: 36px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 11px; row-gap: 2px; padding: 12px 12px; }
.pur-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.pur-name { font-size: 13px; font-weight: 900; letter-spacing: -.2px; color: var(--ink); }
.pur-desc { font-size: 9.5px; color: var(--muted-2); line-height: 1.45; text-wrap: balance; }
.pur-arrow { position: absolute; right: 10px; bottom: 10px; color: #cbd5e1; }
.pur-wide .pur-ic { grid-row: 1 / 3; }
.pur-wide .pur-name { grid-column: 2; grid-row: 1; }
.pur-wide .pur-desc { grid-column: 2; grid-row: 2; font-size: 9.5px; }
.pur-wide .pur-arrow { position: static; grid-column: 3; grid-row: 1 / 3; color: #cbd5e1; }
.pur-note { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pur-note b { display: block; font-size: 10.5px; margin-bottom: 4px; }
.pur-note p { margin: 0; color: var(--muted-2); font-size: 9px; line-height: 1.7; }
.form-block { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.form-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.form-block-head h2 { font-size: 12.5px; margin: 0; font-weight: 900; letter-spacing: -.2px; }
.form-block-head span { color: var(--muted-2); font-size: 9px; }
.req { color: #ef4444; font-style: normal; }
.img-picker { position: relative; }
.img-empty { height: 112px; border: 1px dashed #dbe2ee; border-radius: 13px; background: #fbfcff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--muted-2); }
.img-empty span { font-size: 10.5px; font-weight: 700; color: #64748b; }
.img-empty small { font-size: 8.5px; color: var(--muted-2); }
.img-preview { position: relative; height: 180px; border-radius: 13px; overflow: hidden; background: #f8fafc; border: 1px solid var(--line); }
.img-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(15,23,42,.62); color: #fff; display: grid; place-items: center; }
.img-loading { position: absolute; inset: 0; border-radius: 13px; background: rgba(255,255,255,.82); display: grid; place-items: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #f1f5f9; border-radius: 12px; padding: 4px; }
.seg.seg-three { grid-template-columns: repeat(3, 1fr); }
.seg button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 5px; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.attr-list { display: flex; flex-direction: column; gap: 8px; }
.attr-row { display: grid; grid-template-columns: 1fr 1.2fr 32px; gap: 7px; align-items: center; }
.attr-row input { height: 40px; border: 1px solid #dfe3ee; border-radius: 10px; padding: 0 10px; font-size: 12px; background: #fbfcff; outline: none; min-width: 0; }
.attr-del { width: 32px; height: 32px; border: 1px solid #fee2e2; background: #fef2f2; color: #dc2626; border-radius: 9px; display: grid; place-items: center; }
.add-attr { margin-top: 9px; border: 1px dashed #cbd5e1; background: #fbfcff; border-radius: 10px; height: 38px; width: 100%; color: #475569; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 4px; }
.preset-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.preset-row > span { color: var(--muted-2); font-size: 9px; }
.preset-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 9px; font-size: 9px; color: #475569; font-weight: 700; }
.form-bar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(460px, 100%); background: rgba(255,255,255,.97); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + var(--wk-safe-bottom, env(safe-area-inset-bottom, 0px))); display: flex; align-items: center; gap: 12px; z-index: 48; }
.fb-total { flex: 1; min-width: 0; }
.fb-total span { display: block; color: var(--muted-2); font-size: 9px; font-weight: 700; }
.fb-total b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.4px; margin-top: 1px; }
.form-bar .btn { min-width: 140px; height: 46px; border-radius: 13px; }
.inbound-success { text-align: center; padding: 10px 6px 4px; }
.is-check { width: 56px; height: 56px; border-radius: 18px; background: #dcfce7; color: #16a34a; display: grid; place-items: center; margin: 0 auto 10px; }
.inbound-success > b { display: block; font-size: 15px; font-weight: 900; }
.inbound-success > p { color: var(--muted-2); font-size: 10.5px; margin: 5px 0 12px; }
.is-stock { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f8fafc; border-radius: 11px; padding: 10px; color: var(--muted); font-size: 10.5px; }
.is-stock b { color: var(--ink); }
.is-stock svg { color: var(--muted-2); }

/* outbound search */
.out-results { margin-top: 8px; }
.out-results .list-item { margin-bottom: 6px; padding: 10px; }
.out-empty { border: 1px dashed #dbe2ee; border-radius: 12px; background: #fbfcff; padding: 18px; text-align: center; color: var(--muted-2); font-size: 10px; }
.out-picked { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 8px; }
.out-picked img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.out-picked .op-main { flex: 1; min-width: 0; }
.out-picked .op-main b { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-picked .op-main span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.out-picked .p-thumb { width: 44px; height: 44px; }

/* stores */
.store-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.store-head b { font-size: 13.5px; font-weight: 900; letter-spacing: -.2px; }
.store-head span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.store-addr { color: var(--muted); font-size: 10px; margin-top: 8px; line-height: 1.6; }
.store-perms { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.store-actions { display: flex; gap: 7px; margin-top: 11px; justify-content: flex-end; }
.staff-perms { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.pill-cyan { background: #cffafe; color: #0e7490; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.perm-check { display: flex; align-items: center; gap: 7px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 11px; font-weight: 700; color: #334155; }
.perm-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #f0f1f7; font-size: 11.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted-2); }
.kv b { font-weight: 700; text-align: right; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f1f7; font-size: 12px; }
.toggle-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 40px; height: 23px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 19px; height: 19px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(17px); }
.muted { color: var(--muted-2); }
.text-sm { font-size: 11px; }
.text-xs { font-size: 9.5px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 30px); opacity: .5; } }
@media (min-width: 461px) { body { padding: 20px 0; } #app { min-height: calc(100vh - 40px); border-radius: 24px; } .tabbar { border-radius: 0 0 24px 24px; } }

/* 维吾尔语可选名称：仅维吾尔语模式显示 */
.ug-name-field { display: none; }
body.wk-rtl .ug-name-field { display: block; }
body.wk-rtl .ug-name-field input { direction: rtl; text-align: right; }
.ug-name-field label .optional { font-style: normal; font-weight: 500; color: var(--muted-2); font-size: 9px; margin-left: 4px; }
.fb-profit { display: block; margin-top: 2px; font-size: 9px; font-weight: 700; color: #64748b; }
.fb-profit.pos { color: #059669; }
.fb-profit.neg { color: #dc2626; }
.fb-profit.muted { color: #94a3b8; }

/* 帮助中心 */
.help-page { padding-bottom: 8px; }
.help-hero-card { display: flex; align-items: center; gap: 11px; background: linear-gradient(120deg, #eef2ff, #f5f3ff); border: 1px solid #e0e7ff; border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.help-hero-card .hh-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #635bff; display: grid; place-items: center; flex: 0 0 auto; }
.help-hero-card b { font-size: 14px; }
.help-hero-card p { margin: 3px 0 0; color: #64748b; font-size: 10px; line-height: 1.6; }
.help-search-m { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 42px; margin-bottom: 11px; }
.help-search-m > span { color: #94a3b8; display: inline-flex; }
.help-search-m input { flex: 1; border: 0; outline: 0; background: none; font-size: 12px; color: var(--ink); }
.help-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.help-cat { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: #64748b; border-radius: 999px; padding: 6px 11px; font-size: 10.5px; }
.help-cat.active { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5; font-weight: 700; }
.help-list { display: flex; flex-direction: column; gap: 9px; }
.help-item { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px; color: var(--ink); }
.help-item .hi-top { display: flex; gap: 5px; margin-bottom: 7px; }
.help-item > b { display: block; font-size: 13px; line-height: 1.4; }
.help-item > p { color: #64748b; font-size: 10.5px; line-height: 1.6; margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.help-item .hi-foot { display: flex; justify-content: space-between; color: #94a3b8; font-size: 9.5px; }
.help-empty { text-align: center; color: #94a3b8; font-size: 11px; padding: 22px; }
.help-article { font-size: 12px; line-height: 1.85; color: #334155; }
.help-article p { margin: 0 0 12px; }
.help-article p:last-child { margin-bottom: 0; }
body.wk-rtl .help-item { text-align: right; }
body.wk-rtl .help-hero-card { flex-direction: row-reverse; }
.template-chip { display: inline-flex; align-items: center; margin-top: 4px; padding: 2px 7px; border-radius: 6px; background: rgba(99,91,255,.08); color: var(--brand-600, #4f46e5); font-size: 9px; font-weight: 800; }
body.wk-rtl .template-chip { direction: rtl; }
/* App / 小程序 web-view 嵌入时避让胶囊右侧 */
body.wk-embed .shell-tab .page { padding-right: calc(16px + var(--wk-capsule-right, 0px)); }
body.wk-embed .shell-tab .page-title { padding-right: 2px; }
