:root {
  --blue: #1f4fd8;
  --blue-deep: #123caa;
  --blue-soft: #eaf0fd;
  --orange: #ff8a3d;
  --green: #2fb36b;
  --red: #e5484d;
  --ink: #1b2330;
  --sub: #6b7584;
  --line: #e4e9f2;
  --bg: #f3f6fb;
  --card: #fff;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}
[hidden] { display: none !important; }
img { display: block; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--sub); }
.small { font-size: 12px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer;
}
.btn:hover { border-color: #c9d3e6; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.danger { color: var(--red); }
.btn.block { width: 100%; height: 44px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { border: 0; background: none; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.link-btn.danger { color: var(--red); }

/* 登录 */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  background: linear-gradient(160deg, #eaf1fe, #d8e5fd);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px;
}
.login-art img { width: min(520px, 90%); }
.login-art p { color: var(--sub); font-size: 15px; margin-top: 8px; }
.login-card { align-self: center; justify-self: center; width: min(380px, 90vw); display: grid; gap: 16px; }
.login-card h1 { font-size: 26px; margin-top: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--sub); }
.brand img { width: 32px; height: 32px; }
label { display: grid; gap: 6px; font-weight: 500; align-content: start; }
input, select, textarea {
  font: inherit; color: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31, 79, 216, .25); border-color: var(--blue); }
/* 密码框小眼睛（pwd-eye.js） */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { width: 100%; box-sizing: border-box; padding-right: 44px; }
.pwd-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #8a94a6; cursor: pointer; padding: 0; }
.pwd-eye:hover, .pwd-eye:focus-visible { color: var(--blue); background: rgba(31, 79, 216, .08); }
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.form-error { color: var(--red); margin: 0; }

/* 框架 */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, #1f4fd8, #123caa); color: #fff; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 24px; }
.side-brand img { width: 36px; height: 36px; }
.side-brand strong { display: block; font-size: 16px; letter-spacing: 1px; }
.side-brand span { font-size: 12px; opacity: .75; }
#nav { display: grid; gap: 4px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
#nav a { color: rgba(255, 255, 255, .82); text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
#nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
#nav a.active { background: #fff; color: var(--blue); }
/* 菜单分组：组名是夹在菜单项之间的按钮，点一下收起/展开（admin.js syncNavGroups） */
#nav .nav-group { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 8px 14px 6px; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .62); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-align: left; cursor: pointer; }
#nav .nav-group:hover { color: #fff; background: rgba(255, 255, 255, .06); }
#nav .nav-group::after { content: ""; order: 3; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .8; }
#nav .nav-group.open::after { transform: rotate(45deg); }
#nav .nav-group.has-dot::before { content: ""; order: 2; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
#nav .nav-group[hidden], #nav a.nav-folded { display: none; }
#nav .nav-group ~ a { padding: 9px 14px 9px 22px; }
.side-foot { flex: none; margin-top: auto; display: flex; justify-content: space-between; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 13px; }
.side-foot .link-btn { color: #fff; opacity: .85; }
.main { padding: 28px 36px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-head h2 { font-size: 22px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 卡片、表格 */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 4px 16px rgba(31, 79, 216, .05); margin-bottom: 20px; overflow-x: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { font-size: 16px; }
.card-head p { margin: 2px 0 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--sub); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
/* 只有名称、地址、话术这类长文本列允许折行 */
td.wrap, td.muted.small { white-space: normal; min-width: 120px; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.tag.gray { background: #eef0f4; color: var(--sub); }
.tag.green { background: #e6f6ee; color: #1d8a50; }
.tag.orange { background: #fff1e6; color: #c25a14; }
.tag.amber { background: #fff7e0; color: #ad6800; border: 1px solid #ffd666; }
tr.gift-row td { background: #fcfcf7; }
tr.gift-row td:nth-child(2) { padding-left: 24px; }
.tag.red { background: #fdecec; color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 4px 16px rgba(31, 79, 216, .05); }
.stat .label { color: var(--sub); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--sub); font-size: 12px; }
.stat.accent { background: linear-gradient(135deg, #2a66f2, #123caa); color: #fff; }
.stat.accent .label, .stat.accent .hint { color: rgba(255, 255, 255, .8); }

.empty { text-align: center; padding: 28px 0 12px; color: var(--sub); }
.empty img { width: 220px; margin: 0 auto 8px; }

.packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.package { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.package.archived { opacity: .55; }
.package h4 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.items { display: grid; gap: 6px; align-content: start; }
.item { display: flex; align-items: center; gap: 10px; }
.item img { width: 28px; height: 28px; }
.item .count { margin-left: auto; font-weight: 600; color: var(--blue); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 25, 50, .4); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px; display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.modal.wide { width: min(820px, 100%); }
.modal h3 { font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { min-width: 0; }
.hint { color: var(--sub); font-size: 12px; font-weight: 400; }

/* 导入 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.step b { color: var(--blue); }
.drop { border: 2px dashed #c9d3e6; border-radius: 14px; padding: 28px; text-align: center; cursor: pointer; background: #fafcff; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); }
.summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
/* v49 修改记录时间线：谁、什么时候、原因；每处变化 旧值（删除线）→ 新值 */
.change-log h4 { margin: 8px 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline > li { position: relative; }
.timeline > li::before { content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.timeline-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.timeline ul { margin: 4px 0 0; padding-left: 0; list-style: none; display: grid; gap: 2px; }
.timeline s { text-decoration-color: var(--sub); }
.summary .tag { font-size: 13px; padding: 4px 12px; }

/* 文章 */
.article-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.article-row:last-child { border-bottom: 0; }
.article-row img { width: 120px; height: 68px; object-fit: cover; border-radius: 8px; }
.article-row h4 { margin: 0 0 4px; font-size: 15px; }
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.preview { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; align-self: start; }
.preview img { width: 100%; height: 160px; object-fit: cover; }
.preview .body { padding: 14px; display: grid; gap: 8px; }
.preview h4 { margin: 0; }
.preview p { margin: 0; color: #2c3440; white-space: pre-wrap; }

/* 栏目切换 */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--sub); text-decoration: none; font-weight: 500; box-shadow: 0 2px 8px rgba(31, 79, 216, .05); }
.tabs a.active { background: var(--blue); color: #fff; }
.tabs .count { margin-left: 6px; font-size: 12px; opacity: .75; }
.tabs.small-tabs a { padding: 4px 12px; font-size: 13px; box-shadow: none; border: 1px solid var(--line); }
.tabs.small-tabs a.active { border-color: var(--blue); }

/* 图片上传 */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fafcff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed #c9d3e6; color: var(--blue); font-size: 22px; cursor: pointer; font-family: inherit; }
.thumb.add span { font-size: 12px; }
.thumb.add:hover { border-color: var(--blue); background: var(--blue-soft); }
.thumb.add:disabled { opacity: .5; cursor: progress; }
.thumb .cover-mark { position: absolute; left: 0; top: 0; background: var(--blue); color: #fff; font-size: 11px; padding: 1px 8px; border-bottom-right-radius: 8px; }
.thumb-ops { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.thumb-ops button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 25, 50, .6); color: #fff; cursor: pointer; font-size: 13px; line-height: 24px; padding: 0; }
.mini-thumbs { display: flex; gap: 4px; align-items: center; }
.mini-thumbs img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }

/* 礼品 */
.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.gift { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.gift.off { opacity: .6; }
.gift img, .gift-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f0f3f9; }
.gift-noimg { display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 12px; }
.gift-body { padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.gift-body h4 { margin: 0; font-size: 15px; }
.gift-points { color: var(--orange); }
.gift-points strong { font-size: 20px; }
code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }

.toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); background: #1b2330; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 100; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.error { background: var(--red); }
.toast .toast-link { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 6px; white-space: nowrap; }

/* 订阅提示条、我的订阅、商户选择 */
.sub-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; background: var(--blue-soft); color: var(--blue-deep); }
.sub-banner.warn { background: #fff1e6; color: #a34a0f; }
.sub-banner.error { background: #fdecec; color: #b42328; }
.sub-banner a { color: inherit; font-weight: 600; white-space: nowrap; }
/* 产品更新公告顶部条（product-update.js）：蓝色细边卡片，左徽标、中标题 + 一句话、右按钮和 × */
.pu-banner { display: flex; gap: 14px; align-items: center; padding: 12px 12px 12px 16px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(90deg, var(--blue-soft), #fff 85%); border: 1px solid rgba(31, 79, 216, .16); color: var(--ink); }
.pu-banner[hidden] { display: none; }
.pu-badge { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 999px; padding: 3px 10px; }
.pu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pu-text strong { font-size: 14px; }
.pu-lead { font-size: 13px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pu-actions .btn.link { background: none; border: 0; color: var(--blue-deep); padding: 6px 8px; box-shadow: none; }
.pu-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--sub); font-size: 20px; line-height: 1; cursor: pointer; }
.pu-x:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.pu-x:disabled { opacity: .5; cursor: progress; }
.pu-detail p { margin: 10px 0; line-height: 1.75; }
.pu-new { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); }
.pu-new ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.9; }
.pu-go { margin-top: 4px; }
.pu-history { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.pu-hist-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.pu-hist-item summary { cursor: pointer; }
.pu-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f04438; margin-left: 6px; vertical-align: middle; }
@media (max-width: 720px) {
  .pu-banner { flex-wrap: wrap; }
  .pu-text { flex-basis: calc(100% - 100px); }
  .pu-lead { white-space: normal; }
  .pu-actions { width: 100%; justify-content: flex-end; }
}
.stat .value .sub-date { font-size: 24px; white-space: nowrap; }
.sub-kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 12px 0; }
.sub-kv dt { color: var(--sub); }
.sub-kv dd { margin: 0; overflow-wrap: anywhere; }
.sub-compare th.current { color: var(--blue); }
.sub-yes { color: var(--green); font-weight: 700; }
.merchant-choice { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcff; }
.merchant-option { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.merchant-option input { width: auto; }
.register { max-width: 560px; margin: 40px auto; padding: 0 16px 60px; }
.register .card { display: grid; gap: 14px; }

/* 插画与动效（art.js） */
.toast.with-art { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; }
.toast.with-art img, .toast.with-art .motion { flex: none; }
.motion { display: inline-block; vertical-align: middle; }
.motion svg { display: block; }
.loading { display: grid; justify-items: center; gap: 4px; padding: 48px 0; }
.empty-actions { display: flex; justify-content: center; padding-bottom: 12px; }
.dash-banner { display: flex; align-items: center; min-height: 120px; padding: 20px 28px; margin-bottom: 20px; border-radius: var(--radius); background: #eef4ff url(art/boss/dashboard-banner.jpg?v=79fdca10) right center / auto 100% no-repeat; }
.dash-banner.platform { background-image: url(art/platform/dashboard-banner.jpg?v=a85e90f5); }
.dash-banner > div { display: grid; gap: 4px; max-width: 45%; }
.dash-banner strong { font-size: 20px; color: var(--ink); }
.dash-banner span { color: var(--sub); }
.onboarding-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.onboarding-step { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 12px; border-radius: 12px; color: inherit; text-decoration: none; }
.onboarding-step:hover { background: var(--blue-soft); }
.onboarding-step img { width: 100%; max-width: 200px; aspect-ratio: 4 / 3; object-fit: contain; }
.sub-expired { display: flex; align-items: center; gap: 20px; }
.sub-expired img { width: 200px; flex: none; }
.plan-name { display: inline-flex; align-items: center; gap: 8px; }
.plan-badge { flex: none; object-fit: contain; }
.stat.accent .plan-badge { background: rgba(255, 255, 255, .9); border-radius: 10px; }
.stat .value .plan-name { white-space: nowrap; }

@media (max-width: 900px) {
  .onboarding-steps { grid-template-columns: 1fr 1fr; }
  .dash-banner { background-size: auto 70%; background-position: right bottom; }
  .dash-banner > div { max-width: 70%; }
  .sub-expired { flex-direction: column; text-align: center; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  #nav { grid-template-columns: repeat(3, 1fr); }
  #nav .nav-group { grid-column: 1 / -1; }
  #nav .nav-group ~ a { padding: 10px 12px; }
  .main { padding: 20px 16px; }
  .stats, .steps { grid-template-columns: 1fr 1fr; }
  .editor, .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* 付费功能入口：菜单角标、升级引导卡、额度提示（paywall.js） */
#nav a .nav-badge { float: right; font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 9px; background: var(--orange); color: #fff; font-weight: 600; }
#nav a .nav-badge.readonly { background: rgba(255, 255, 255, .25); }
#nav a.active .nav-badge.readonly { background: #fff1e6; color: #a34a0f; }
.upgrade-guide { border: 1px solid #ffd2b0; background: linear-gradient(180deg, #fff8f2, #fff); }
.upgrade-head { display: flex; gap: 16px; align-items: flex-start; }
.upgrade-head h3 { margin: 2px 0 6px; }
.upgrade-head p { margin: 0 0 12px; line-height: 1.6; }
.upgrade-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--orange); color: #fff; font-weight: 700; display: grid; place-items: center; }
.upgrade-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.upgrade-compare { margin-top: 16px; overflow-x: auto; }
.sub-compare tr.highlight td { background: #fff1e6; font-weight: 600; }
.quota-hint { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; background: #fff1e6; color: #a34a0f; }
.quota-hint.full { background: #fdecec; color: #b42328; }
.quota-hint a { color: inherit; font-weight: 600; white-space: nowrap; }
#page-actions [disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* v11 我的订阅：月付/年付切换、价格、年付省多少、🔒 */
.sub-cycle { display: flex; gap: 8px; margin-bottom: 12px; }
.sub-price { font-size: 20px; }
.sub-save { color: var(--green); font-weight: 600; }
.sub-lock { font-size: 15px; }
.sub-compare tr.sub-actions td { border-bottom: 0; padding-top: 12px; }
/* v27 升级弹框、上锁按钮 */
.upgrade-prompt p { margin: 0 0 10px; line-height: 1.7; }
.upgrade-prompt .upgrade-value { color: #1f4fd8; font-weight: 600; }
#page-actions .btn.locked { opacity: .75; }

/* 手机浏览器：左侧菜单折叠成顶部条 + "菜单"按钮；统计卡不撑出屏幕；输入框 16px 防 iOS 放大 */
.nav-toggle { display: none; }
.stats > *, .steps > * { min-width: 0; }
@media (max-width: 900px) {
  .side { padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
  .side-brand { padding: 0 4px; }
  .nav-toggle { display: block; margin-left: auto; flex: none; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
  .side.collapsible:not(.open) #nav, .side.collapsible:not(.open) .side-foot { display: none; }
  .side.open #nav { margin-top: 14px; }
  .side.open .side-foot { margin-top: 12px; }
  input, select, textarea { font-size: 16px; }
  .page-head { flex-wrap: wrap; }
  .sub-banner, .quota-hint { flex-wrap: wrap; }
  .login-card { width: 100%; max-width: 420px; padding: calc(24px + env(safe-area-inset-top)) 20px 32px; font-size: 16px; }
  .login-card input { height: 48px; }
  .login-card .btn.block { height: 50px; font-size: 17px; }
}
@media (max-width: 480px) {
  .main { padding: 16px 12px 40px; }
  .card { padding: 16px 14px; }
  .stats, .steps { gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 22px; overflow-wrap: anywhere; }
  .stat .value .sub-date, .stat .value .plan-name { font-size: 18px; white-space: normal; }
  .dash-banner { padding: 16px; min-height: 96px; }
  .dash-banner strong { font-size: 17px; }
}
/* v29 协议确认弹窗、场景提示 */
.legal-gate .legal-doc { border: 1px solid #e3e8f0; border-radius: 12px; padding: 10px 14px; }
.legal-gate .legal-doc p { margin: 6px 0 0; line-height: 1.7; }
.legal-hint { margin: 4px 0 10px; }
/* v38 员工多勾门店 */
.inline-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.inline-checks .inline input { width: auto; }

/* v41（docs/41 §13）付费窗口：服务端拦下的付费动作、额度不够，统一弹这个（paywall.js paywallBuy） */
.pw-modal { position: relative; width: min(440px, 100%); gap: 12px; }
.pw-modal > h3 { padding-right: 28px; line-height: 1.4; }
.pw-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f3f7; font-size: 20px; line-height: 1; cursor: pointer; color: #556; }
.pw-body { display: grid; gap: 12px; }
.pw-body p { margin: 0; }
.pw-lead { font-size: 15px; line-height: 1.6; }
.pw-plan { border: 1.5px solid #07c160; border-radius: 14px; padding: 12px 14px; background: #f3fcf7; }
.pw-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pw-badge { background: linear-gradient(135deg, #f5c04a, #e79a2a); color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px; letter-spacing: .5px; }
.pw-perks { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; color: #334; }
.pw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-chip { border: 1px solid var(--line, #dde2ea); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; }
.pw-chip.on { border-color: #07c160; background: #e9f9f0; color: #07803f; font-weight: 600; }
.pw-price b { font-size: 26px; color: #07a35a; }
.pw-price span { color: #556; }
.pw-note { color: #07803f; font-size: 13px; }
.pw-pay { width: 100%; min-height: 48px; font-size: 16px; font-weight: 700; background: #07c160; border-color: #07c160; color: #fff; }
.pw-pay:hover:not(:disabled) { background: #06ad56; }
.pw-pay:disabled { opacity: .6; }
.pw-err { color: #d6453d; font-size: 13px; }
.pw-err:empty { display: none; }
.pw-qty { display: flex; align-items: center; gap: 10px; }
.pw-qty input { width: 90px; }
.pw-trust { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted, #667); display: grid; gap: 2px; }
.pw-more { font-size: 13px; text-align: center; }

/* 平台协助模式（admin.js showAssistBar） */
.assist-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5c26b; color: #7a4b00; font-size: 14px; }
.assist-ended { max-width: 420px; margin: 20vh auto 0; padding: 0 16px; text-align: center; }
/* 概览"今天该办的事"（v77） */
.todo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.todo-item { display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--ink); text-decoration: none; }
.todo-item:hover { box-shadow: inset 0 0 0 1px var(--blue); }
.todo-item strong { font-size: 22px; color: var(--blue); font-variant-numeric: tabular-nums; }
.todo-item.red strong { color: var(--red); }
/* 概览页顶上的"问一句"（v78，跳到问账页） */
.ask-quick { display: flex; gap: 10px; align-items: center; padding: 12px 16px; margin-bottom: 20px; border-radius: var(--radius); background: var(--card); box-shadow: 0 4px 16px rgba(31, 79, 216, .05); }
.ask-quick input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 12px; background: #f0f3f8; border-color: transparent; font-size: 15px; }
.ask-quick input:focus { background: #fff; border-color: var(--blue); }
