/* 代理后台（/）专用。玩家入口 /m 有自己的 play.css，这里的规则碰不到它。
   一张值班台：安静、密、扫一眼就懂。数字是主角，余额是每一行里最显眼的字；
   一个强调色只给钱的动作；状态色只表达意思，而且每个状态都写着字、带自己的形状。 */
:root {
  color-scheme: light;
  --paper: #f2f4f3;
  --surface: #ffffff;
  --sunk: #f7f8f8;
  --ink: #17211f;
  --muted: #56625e;
  --line: #dce1df;
  --line-soft: #e9edeb;
  --accent: #0c6650;
  --accent-hover: #09513f;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0eb;
  --in: #0a6b4f;
  --out: #a3311f;
  --focus: #1d5fd1;
  --veil: rgba(18, 27, 25, 0.5);
  --shadow: 0 16px 48px rgba(18, 27, 25, 0.22);
  /* 五种状态：字的颜色、底色 */
  --st-active: #0b6b4f;   --st-active-bg: #e3f2ec;
  --st-suspended: #7a4d00; --st-suspended-bg: #fbf0d9;
  --st-frozen: #1c4f99;   --st-frozen-bg: #e4edfa;
  --st-blocked: #9c2a1b;  --st-blocked-bg: #f9e3df;
  --st-closed: #4c5552;   --st-closed-bg: #e8ebea;
  --nav-w: 220px;
  --aside-w: 360px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #151b1a;
    --surface: #1c2422;
    --sunk: #192120;
    --ink: #e5ebe9;
    --muted: #9eaca7;
    --line: #2f3a37;
    --line-soft: #26302d;
    --accent: #55c4a3;
    --accent-hover: #74d3b6;
    --accent-ink: #0a241c;
    --accent-soft: #1f3a32;
    --in: #6fd2b2;
    --out: #f0907f;
    --focus: #8fb6ff;
    --veil: rgba(0, 0, 0, 0.6);
    --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    --st-active: #7ad8b9;    --st-active-bg: #1d3a31;
    --st-suspended: #f0c46a; --st-suspended-bg: #3a2f17;
    --st-frozen: #9cc0ff;    --st-frozen-bg: #1f2f4a;
    --st-blocked: #f4a294;   --st-blocked-bg: #44231e;
    --st-closed: #b9c3c0;    --st-closed-bg: #2c3432;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.muted { color: var(--muted); }
.in { color: var(--in); }
.out { color: var(--out); }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 外框：导航 | 正文 | （以后）右边一栏 ----------
   右边一栏留给第二批的助手：给 .desk 加 data-aside，放一个 grid-area: aside 的元素就行 */
.desk { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-areas: "nav main"; min-height: 100vh; min-height: 100dvh; }
.desk[data-aside] { grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--aside-w); grid-template-areas: "nav main aside"; }
.nav { grid-area: nav; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.nav .who { padding: 4px 12px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.nav .who b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.nav .who span { font-size: 13px; color: var(--muted); }
.nav .who .who-staff { display: block; overflow-wrap: anywhere; }
.nav .who .who-name { display: block; font-size: 13px; }
.nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.nav .spacer { flex: 1; }
.nav button.plain { text-align: left; padding: 8px 12px; border-radius: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.nav button.plain:hover { background: var(--sunk); color: var(--ink); }
.topbar { display: none; }
main { grid-area: main; padding: 24px clamp(16px, 3vw, 36px) 64px; min-width: 0; }
main > h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 18px; }

@media (max-width: 899px) {
  /* 终审修改 6：顶上一条只占自己的高度，多出来的高度都给正文（以前两行都是 auto，内容短的页面「会员入口」「公告」顶栏被拉到 106–121px） */
  .desk, .desk[data-aside] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; grid-template-rows: auto 1fr; }
  .topbar { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; }
  /* 终审复查 M-d：「菜单」按钮的字从不折行、不让出地方（越南文「Trình đơn」折成两行时顶栏变 76px）；让地方的是标题和员工号那一块（省略号） */
  .topbar b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
  .topbar .menu { min-height: 40px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; flex: none; }
  .topbar .top-staff { flex: 0 1 auto; }
  .nav { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); z-index: 25; box-shadow: var(--shadow); transform: translateX(-105%); visibility: hidden; }
  .desk.nav-open .nav { transform: none; visibility: visible; }
  .desk.nav-open .scrim { position: fixed; inset: 0; background: var(--veil); z-index: 24; }
  main { padding: 18px 16px 64px; }
  main > h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 899px) {
  .nav { transition: transform 0.16s ease-out, visibility 0.16s; }
}

/* ---------- 面板、排版 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.panel > h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

.balance { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.balance .figure { font-size: clamp(32px, 7vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.balance .unit { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border-top: 1px solid var(--line-soft); margin: 18px 0 0; }
.facts > div { padding: 12px 16px 2px 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.lastlogin { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--out); }
.btn.small { min-height: 32px; padding: 3px 10px; font-size: 13.5px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.primary[aria-disabled="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 表单 ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
label.field > small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], select {
  width: 100%; min-height: 40px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
input:hover, select:hover { border-color: var(--muted); }
input.amount { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
label.check { display: flex; gap: 10px; align-items: flex-start; }
label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.error { color: var(--out); font-weight: 600; }
.error:empty { display: none; }
.notice { background: var(--st-suspended-bg); color: var(--st-suspended); border-radius: 6px; padding: 10px 12px; font-size: 14px; }
/* 首页庄家那一块：最近 24 小时净亏。没超线是一行安静的字；超线是整圈细边的红底块，带「警示」两个字和记号，不只靠颜色 */
.house-loss { font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.house-loss b { font-size: 16px; font-weight: 600; }
.house-alert { display: grid; gap: 6px; padding: 12px 14px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--st-blocked) 55%, transparent); background: var(--st-blocked-bg); color: var(--ink); }
.house-alert-head { display: flex; align-items: center; gap: 8px; color: var(--st-blocked); font-size: 15px; }
.house-alert-head strong { font-weight: 700; letter-spacing: 0.02em; }
.house-alert-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--st-blocked); color: var(--surface); font-size: 13px; font-weight: 800; line-height: 1; flex: none; }
.house-alert-text { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.house-alert a { font-weight: 600; color: var(--st-blocked); }
.held-intro, .held-caps { font-size: 14px; margin: 6px 0 10px; }
.tag.held-count { background: var(--st-blocked-bg); color: var(--st-blocked); }
.held-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.held-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 10px; }
.held-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.held-at { margin-left: auto; font-size: 13px; }
.held-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 14px; margin: 0; }
.held-nums dt { font-size: 12.5px; color: var(--muted); }
.held-nums dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.held-nums .held-asked dd { font-size: 17px; }
.held-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.held-why { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; color: var(--st-blocked); }
.held-why .house-alert-mark { width: 16px; height: 16px; font-size: 11px; margin-top: 1px; }
.held-facts { margin: 4px 0 0; }
label.field > small.counter { text-align: right; }
label.field > small.counter.over { color: var(--st-blocked); font-weight: 600; }
.tag.manual { background: var(--st-frozen-bg); color: var(--st-frozen); margin-left: 0; }
.manual-mark { display: inline; }
.filter { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 160px) auto; gap: 10px; align-items: end; margin-bottom: 16px; }
@media (max-width: 760px) { .filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .filter .btn { grid-column: 1 / -1; } }

/* ---------- 报表页：上面的标签（按天 / 输赢；按账号 / 按游戏）、输赢的日期段、快捷按钮、路径和下载 ---------- */
.rtabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.rtabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.rtabs a:hover { color: var(--ink); }
.rtabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.rtabs.sub { margin: 12px 0; }
.wlform { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 180px) auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .wlform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wlform .btn { grid-column: 1 / -1; } }
.wlquick { display: flex; flex-wrap: wrap; gap: 6px; }
.wlquick .btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.wlhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.stform { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 180px) minmax(0, 180px) auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .stform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .stform .field:first-child, .stform .btn { grid-column: 1 / -1; } }
.stsheet h2 { margin: 12px 0 8px; }
/* 图表（报表页第四个标签）：页面自己画的 SVG，颜色都用上面的变量（深色跟着变）。
   不靠颜色分辨：下注是柱子、派彩是带圆点的线；净输的柱子在 0 线上面或下面；图例写着字；每张下面有数字表 */
.chslot { min-width: 0; }
.chart h2 { margin: 0 0 8px; }
.chbox { margin-top: 8px; }
.chsvg { display: block; width: 100%; height: auto; overflow: visible; }
.chsvg .grid { stroke: var(--line-soft); stroke-width: 1; }
.chsvg .zero { stroke: var(--ink); stroke-width: 1.5; }
.chsvg .y-label, .chsvg .x-label { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chsvg .zero-label { fill: var(--muted); font-size: 11px; }
.chsvg .bar-stake { fill: var(--accent); fill-opacity: 0.5; }
.chsvg .bar-pos { fill: var(--in); }
.chsvg .bar-neg { fill: var(--out); }
.chsvg .bar-active { fill: var(--st-frozen); fill-opacity: 0.8; }
.chsvg .line-won { fill: none; stroke: var(--st-suspended); stroke-width: 2; stroke-linejoin: round; }
.chsvg .dot-won { fill: var(--surface); stroke: var(--st-suspended); stroke-width: 2; }
.chsvg .hit { fill: transparent; }
.chsvg .hit:hover { fill: var(--ink); fill-opacity: 0.07; }
.chlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink); }
.chkey { display: inline-flex; align-items: center; gap: 6px; }
.chkey.muted { color: var(--muted); }
.chswatch { display: inline-block; width: 14px; height: 12px; border-radius: 2px; }
.chswatch.sw-bar { background: var(--accent); opacity: 0.5; }
.chswatch.sw-active { background: var(--st-frozen); opacity: 0.8; }
.chswatch.sw-loss { background: linear-gradient(to bottom, var(--in) 0 50%, var(--out) 50% 100%); }
.chswatch.sw-line { position: relative; width: 20px; height: 2px; border-radius: 0; background: var(--st-suspended); }
.chswatch.sw-line::after { content: ""; position: absolute; left: 6px; top: -3px; width: 4px; height: 4px; border: 2px solid var(--st-suspended); border-radius: 50%; background: var(--surface); }
.chnums { margin-top: 10px; }
.chnums summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
.chnums[open] summary { margin-bottom: 8px; }
.chhelp { margin-top: 12px; font-size: 14px; }
/* 核对那一句：对得上是普通的字；对不上是红底红字、加粗的「警告」两个字（不只靠颜色） */
.stcheck { margin-top: 12px; font-size: 15px; }
.stcheck.ok { color: var(--muted); }
.stcheck.bad { background: var(--st-blocked-bg); color: var(--st-blocked); border: 1px solid var(--st-blocked); border-radius: 6px; padding: 10px 12px; font-weight: 600; }

/* 占成和佣金（#/share）、分成试算（#/report/sh/…）：顶上一直在的「只是试算」；自己的两个比例；路径；对得上是绿字，对不上是红框 */
.tmnotes p { margin: 0; overflow-wrap: anywhere; }
.tmnotes p + p { margin-top: 4px; }
.tmfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); gap: 8px 16px; margin: 8px 0; }
.tmfacts dt { font-size: 13px; color: var(--muted); }
.tmfacts dd { margin: 0; font-size: 22px; font-weight: 650; }
.tmpath { margin: 0 0 12px; }
.trcheck { margin-top: 12px; font-size: 15px; overflow-wrap: anywhere; }
.trcheck.ok { color: var(--in); font-weight: 600; }
.trcheck.bad { background: var(--st-blocked-bg); color: var(--st-blocked); border: 2px solid var(--st-blocked); border-radius: 6px; padding: 12px 14px; font-weight: 600; font-size: 16px; }
.trsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); gap: 6px 16px; margin: 12px 0 0; }
.trsum dt { font-size: 13px; color: var(--muted); }
.trsum dd { margin: 0; font-weight: 600; }
.trself td { background: var(--sunk); }
.trpartners { margin-top: 12px; }
/* 每周结算单：这一级自己那一行、直属下级的表各一块，各有小标题（直属下级的合计不会被看成整条线的总数） */
.slpart { margin-top: 14px; }
.slpart h3 { margin: 0 0 4px; font-size: 15px; }
.trpartners .tablewrap { max-width: 520px; }
.trnote { margin-top: 8px; font-size: 14px; overflow-wrap: anywhere; }
/* 每周结算单（#/settle）：重出过的标签和一行为什么；「已落账」标签；总号现在算的那一块用虚线框和结算单分开（不打印）；
   和单上不一样的数：加粗、下划线、一个「不一样」的标签、下面一行单上的数（不只靠颜色） */
.tag.slrev { background: var(--st-suspended-bg); color: var(--st-suspended); box-shadow: inset 0 0 0 1px currentColor; white-space: normal; overflow-wrap: anywhere; }
.slwhy { display: block; font-size: 13px; margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.slwhen { white-space: normal; overflow-wrap: anywhere; }
.slback { margin: 0 0 12px; }
.tag.slposted { margin-left: 0; background: var(--st-active-bg); color: var(--st-active); }
.sllive { border: 2px dashed var(--accent); }
.sllive .btn { white-space: normal; max-width: 100%; height: auto; min-height: 40px; overflow-wrap: anywhere; text-align: center; }
/* 和单上不一样的一格：数、「不一样」、「单上：x」上下叠着，靠右；只有数本身不拆行，另外两样能折行（终审 I-1：360 宽的手机上不撑出屏幕、不截字） */
.sldiff { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 100%; min-width: 0; white-space: normal; text-align: right; }
.sldiff .slnow { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.tag.sltag { background: var(--st-blocked-bg); color: var(--st-blocked); margin-left: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.slwas { display: block; max-width: 100%; font-size: 12px; font-weight: 400; color: var(--muted); text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
/* 手机上这三张表（结算单、现在算的、分成试算）的卡片：长的栏名可以折成两行，数不拆开（大数 + 长栏名也不撑出屏幕） */
@media (max-width: 760px) {
  #sl-sheet table.plain td, #sl-live table.plain td, #tr-sheet table.plain td { overflow-wrap: normal; }
  #sl-sheet table.plain td::before, #sl-live table.plain td::before, #tr-sheet table.plain td::before { flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: break-word; }
  #sl-sheet table.plain td.lead, #sl-live table.plain td.lead, #tr-sheet table.plain td.lead, #sl-sheet table.plain td.wrap, #tr-sheet table.plain td.wrap { overflow-wrap: anywhere; }
}

/* ---------- 普通表格（流水、报表、记录）：窄屏变成一行一张卡 ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; overflow-wrap: anywhere; }
th.r, td.r { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 650; border-top: 2px solid var(--ink); border-bottom: 0; }
td .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .panel { padding: 14px; }
  table.plain, table.plain tbody, table.plain tfoot, table.plain tr, table.plain td { display: block; width: 100%; }
  table.plain thead { display: none; }
  table.plain tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.plain tbody tr:last-child { border-bottom: 0; }
  table.plain td, table.plain td.r { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; text-align: right; }
  table.plain td::before { content: attr(data-label); color: var(--muted); font-size: 13.5px; text-align: left; flex: none; }
  table.plain td.lead { font-size: 17px; font-weight: 650; justify-content: flex-start; text-align: left; }
  table.plain td.lead::before, table.plain td.wide::before { content: none; }
  table.plain td.wide { display: block; text-align: left; padding-top: 8px; }
  table.plain td .actions { justify-content: flex-start; }
  table.plain tfoot tr { border-top: 2px solid var(--ink); border-bottom: 0; }
  /* 空的格子（没有游戏名、没有之后余额）：卡片上不留一行只有标签的空行 */
  table.plain td.blank { display: none; }
}

/* ---------- 小标记 ---------- */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--ink); vertical-align: 1px; margin-left: 6px; }
.tag.blocked { background: var(--st-blocked-bg); color: var(--st-blocked); }
.tag.house { background: var(--st-suspended-bg); color: var(--st-suspended); }
/* batch-4 P1：员工开的代理，等老板交密码（字写明，不只靠颜色） */
.tag.handover { background: var(--st-blocked-bg); color: var(--st-blocked); box-shadow: inset 0 0 0 1px currentColor; }
/* 赠送：写着字的标记，加一圈边，和上分一眼分得开（不只靠颜色） */
.tag.bonus { background: var(--st-frozen-bg); color: var(--st-frozen); box-shadow: inset 0 0 0 1px currentColor; }

/* 状态牌：字 + 形状 + 颜色，三样里任何一样都够分清 */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 4px 8px 4px 7px; border-radius: 4px; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; flex: none; box-sizing: border-box; }
.chip.active { color: var(--st-active); background: var(--st-active-bg); }
.chip.active::before { border-radius: 50%; background: currentColor; }
.chip.suspended { color: var(--st-suspended); background: var(--st-suspended-bg); }
.chip.suspended::before { width: 7px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.chip.frozen { color: var(--st-frozen); background: var(--st-frozen-bg); }
.chip.frozen::before { transform: rotate(45deg); border: 2px solid currentColor; width: 7px; height: 7px; }
.chip.blocked { color: var(--st-blocked); background: var(--st-blocked-bg); }
.chip.blocked::before { border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(45deg, transparent 40%, currentColor 40%, currentColor 60%, transparent 60%); }
.chip.closed { color: var(--st-closed); background: var(--st-closed-bg); }
.chip.closed::before { height: 2px; background: currentColor; }
/* 长的状态字样（登录 IP 名单开没开）：窄屏可以折行 */
.chip.wrap { white-space: normal; line-height: 1.35; }

/* ---------- 下线页 ---------- */
.ledgerhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.pathbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 15px; min-width: 0; }
.pathbar a, .pathbar b { padding: 3px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.pathbar a { color: var(--accent); text-decoration: none; font-weight: 600; }
.pathbar a:hover { background: var(--accent-soft); }
.pathbar b { font-weight: 700; }
.pathbar .sep { color: var(--muted); }
.credit { text-align: right; }
.credit small { display: block; font-size: 12.5px; color: var(--muted); }
.credit .figure { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.credit .unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.credit .here { font-size: 13px; color: var(--muted); margin-top: 2px; }

.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 170px) minmax(0, 110px) auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.toolbar .make { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1099px) { .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 160px) minmax(0, 100px); } .toolbar .make { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 599px) { .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .toolbar .q { grid-column: 1 / -1; } }
.scope { font-size: 13px; color: var(--muted); margin-bottom: 14px; min-height: 1.5em; }

.group { margin-bottom: 18px; container: lines / inline-size; }
.group > h2 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 650; margin: 0 0 6px; }
.group > h2 .count { font-size: 13px; font-weight: 500; color: var(--muted); }
.lines { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
/* 宽：一张表。列宽固定，代理和会员两张表上下对齐 */
.lines table { table-layout: fixed; }
.lines th { background: var(--sunk); }
.lines th.c-st { width: 108px; }
.lines th.c-bal { width: 140px; }
.lines th.c-seen { width: 172px; }
/* batch-5 B3：谁开的。只在这一栏够宽（≥ 1300px，一行一个账号的表）时才有这一列；窄一些的布局里不画（点进代理时头上照样写，带「开号」两个字），
   一行一个账号的表照旧从 1140px 起（修改第一轮 M5） */
.lines th.c-open { width: 160px; }
.lines th.c-open, .lines td.opened { display: none; }
@container lines (min-width: 1300px) { .lines th.c-open, .lines td.opened { display: table-cell; } }
.lines .opened { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
/* 修改第二轮 3：账号那一栏定宽，动作那一栏拿剩下的全部宽度（以前定成 448 / 520px，按钮多、字长的语言会往左盖到余额和上次登录上） */
.lines th.c-acct { width: 240px; }
.lines td { padding: 8px 10px; }
.lines tbody tr:hover td { background: var(--sunk); }
.lines .acct a, .lines .acct b { font-weight: 650; font-size: 15px; }
.lines .acct a { text-decoration: none; }
.lines .acct a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lines .acct .sub { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.lines .acct .below { font-size: 12.5px; color: var(--muted); margin-left: 6px; font-weight: 500; white-space: nowrap; }
.lines .bal { text-align: right; font-size: 15.5px; font-weight: 650; }
.lines .bal.zero { color: var(--muted); font-weight: 500; }
.lines .seen { font-size: 13px; color: var(--muted); line-height: 1.35; white-space: nowrap; }
.actbar { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
/* 一行放不下（字长的语言、总号按钮多）时在自己那一栏里折行，不往外跑 */
.lines .actbar { flex-wrap: wrap; row-gap: 4px; }
.actbar .gap { width: 1px; align-self: stretch; background: var(--line); margin: 2px 8px; }
.actbar .quiet { border-color: transparent; background: none; color: var(--ink); padding: 3px 8px; }
.actbar .quiet:hover { border-color: var(--line); }
.actbar .quiet[aria-disabled="true"]:hover { border-color: transparent; }
.actbar .money { min-width: 64px; }
.actbar .go { min-width: 4.6em; }
.actbar .money + .money { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.actbar .money + .money[aria-disabled="true"] { color: var(--ink); border-color: var(--line); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* 中：放不下一整行时，每个账号两行：上面账号、状态、余额、上次登录，下面一排动作。
   按这一栏自己的宽度算（container），以后右边加一栏也不用改 */
@container lines (max-width: 1140px) {
  .lines table, .lines thead, .lines tbody { display: block; }
  .lines tr { display: grid; grid-template-columns: minmax(0, 1fr) 108px 140px 172px; grid-template-areas: "acct st bal seen" "acts acts acts acts"; align-items: center; }
  .lines th, .lines td { display: block; }
  .lines th.c-acts { display: none; }
  .lines td { border-bottom: 0; }
  .lines tbody tr { border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
  .lines tbody tr:last-child { border-bottom: 0; }
  .lines tbody tr:hover { background: var(--sunk); }
  .lines tbody tr:hover td { background: none; }
  .lines td.acct { grid-area: acct; }
  .lines td.st { grid-area: st; }
  .lines td.bal { grid-area: bal; }
  .lines td.seen { grid-area: seen; }
  .lines td.acts { grid-area: acts; padding-top: 0; }
  .lines .actbar { justify-content: flex-start; flex-wrap: wrap; }
}
/* 窄（手机，小于 700px）：每个账号一张卡。上：账号和余额；中：状态、上次登录；下：动作 */
@media (max-width: 699px) {
  .lines { border: 0; background: none; overflow: visible; }
  .lines table, .lines thead, .lines tbody, .lines td { display: block; }
  .lines thead { display: none; }
  .lines tbody tr, .lines tbody tr:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "acct bal" "st seen" "acts acts"; gap: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
  .lines tbody tr:hover { background: var(--surface); }
  .lines td { padding: 0; }
  .lines td.bal { font-size: 18px; align-self: start; }
  .lines td.seen { justify-self: end; white-space: normal; text-align: right; }
  .lines td.acts { border-top: 1px solid var(--line-soft); padding-top: 8px; }
  .actbar { gap: 6px; }
  .actbar .gap { display: none; }
  /* 第一排只放上分、下分；第二排四个安静的按钮，状态和重设密码离得远一点 */
  .actbar .money { flex: 1 1 calc(50% - 3px); min-height: 42px; }
  .actbar .quiet { flex: 1 1 0; border-color: var(--line); padding: 3px 4px; }
  .actbar .later { margin-left: 12px; }
}

/* ---------- 弹出层：确认单、表单、快速开号的结果、改状态 ---------- */
.veil { position: fixed; inset: 0; background: var(--veil); display: grid; place-items: center; padding: 16px; z-index: 30; overflow-y: auto; }
.slip { width: min(440px, 100%); background: var(--surface); border-radius: 6px 6px 0 0; padding: 22px 22px 26px; position: relative; box-shadow: var(--shadow); }
.slip::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: linear-gradient(135deg, var(--surface) 5px, transparent 0) 0 0 / 10px 10px, linear-gradient(-135deg, var(--surface) 5px, transparent 0) 0 0 / 10px 10px; }
.slip h2 { font-size: 14px; font-weight: 600; color: var(--muted); padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.slip .what { font-size: 19px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.slip .timer { font-size: 13px; color: var(--muted); margin-top: 6px; }
.sheet { width: min(460px, 100%); background: var(--surface); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.sheet.wide { width: min(560px, 100%); }
.sheet h2 { font-size: 18px; margin-bottom: 4px; }
.sheet .lede { color: var(--muted); font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 6px; z-index: 40; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.bad { background: var(--out); color: #fff; }
@media (prefers-color-scheme: dark) { .toast.bad { color: #2a0c07; } }

/* 新账号和密码：只显示这一次 */
.secrets { width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.secrets td { padding: 7px 10px; font-size: 15px; }
.secrets td.pw { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.secrets td:last-child { text-align: right; width: 1%; }

/* 改状态：五个选项，一个一行 */
.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.choices legend { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice.off { cursor: not-allowed; background: var(--sunk); }
/* 不能选的：只把圆点和状态牌调淡，说明那句话和原因保持清楚 */
.choice.off input, .choice.off .chip { opacity: 0.5; }
.choice .head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.choice .why { font-size: 13px; font-weight: 600; color: var(--ink); }
.choice input { margin: 4px 0 0; accent-color: var(--accent); }
.choice p { grid-column: 2; font-size: 13.5px; color: var(--muted); }
.preconds { list-style: none; margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--sunk); border: 1px solid var(--line-soft); font-size: 13.5px; }
.preconds li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.preconds .bad { color: var(--out); font-weight: 600; }
.preconds .good { color: var(--in); font-weight: 600; }

/* ---------- 登录页 ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--surface); }
.gate .side { background: var(--paper); border-right: 1px solid var(--line); padding: clamp(24px, 6vw, 72px); display: flex; flex-direction: column; justify-content: flex-end; }
.gate .side h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; max-width: 14em; }
.gate .side p { margin-top: 14px; max-width: 30em; color: var(--muted); }
.gate .ruled { margin-top: 32px; border-top: 1px solid var(--line); max-width: 30em; }
.gate .ruled div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.gate .ruled div span + span { color: var(--muted); }
/* 登录、改密码、「老板要先改密码」三种都是同一个面板（gate-panel，补丁第二轮） */
.gate form, .gate .gate-panel { align-self: center; justify-self: center; width: min(360px, 100%); padding: 32px 20px; }
.gate form h2, .gate .gate-panel h2 { font-size: 22px; margin-bottom: 18px; }
.gate form select.gate-lang, .gate .gate-panel select.gate-lang { width: auto; min-width: 0; max-width: 60%; }
@media (max-width: 760px) {
  .gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .gate .side { padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .gate .ruled { display: none; }
  .gate form, .gate .gate-panel { align-self: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .slip, .sheet { animation: rise 0.14s ease-out; }
  @keyframes rise { from { transform: translateY(8px); opacity: 0; } }
}
/* 一次性单子上按 Esc：提醒去点「已保存，关闭」 */
.btn.nudge { box-shadow: 0 0 0 3px var(--focus); }
@media (prefers-reduced-motion: no-preference) {
  .btn.nudge { animation: nudge 0.3s ease-in-out 2; }
  @keyframes nudge { 50% { transform: translateX(3px); } }
}

/* ---------- 最后一轮（final-fix） ---------- */
/* 自己被暂停 / 冻结：每页顶上一条横幅，状态牌 + 一句话 */
.banner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; padding: 12px 14px; border-radius: 8px; border: 1px solid; margin-bottom: 16px; font-size: 14.5px; color: var(--ink); }
.banner > p { flex: 1 1 18em; min-width: 0; margin: 0; }
.banner .chip { background: var(--surface); margin-top: 1px; }
.banner.suspended { background: var(--st-suspended-bg); border-color: color-mix(in srgb, var(--st-suspended) 35%, transparent); }
.banner.frozen { background: var(--st-frozen-bg); border-color: color-mix(in srgb, var(--st-frozen) 35%, transparent); }
/* 连带解封前列出的账号 */
.downinfo .notice p + p, .downinfo .notice ul + p { margin-top: 6px; }
.idlist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink); }
/* 填错的那一栏 */
input[aria-invalid="true"] { border-color: var(--out); box-shadow: 0 0 0 1px var(--out); }
.pager [data-focus$=":label"]:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* ---------- 助手栏（第二批） ----------
   一栏工作用的对话：自己说的话安静地靠右，回答是一张张卡片；卡片里最显眼的是要核对的东西（谁、多少、之后余额）或答案本身。
   宽屏在右边一栏，可收成一条窄边；窄屏是右下角的按钮，点开是整屏高的单子 */
.desk[data-aside="rail"] { --aside-w: 52px; }
@media (max-width: 1199px) { .desk[data-aside] { grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-areas: "nav main"; } }
.as-col, .as-rail { grid-area: aside; align-self: start; position: sticky; top: 0; height: 100vh; height: 100dvh; border-left: 1px solid var(--line); background: var(--surface); min-width: 0; }
.as-rail { display: flex; justify-content: center; align-items: flex-start; padding-top: 14px; }
.as-railbtn { writing-mode: vertical-rl; padding: 12px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 650; letter-spacing: 0.04em; cursor: pointer; }
.as-railbtn:hover { border-color: var(--muted); background: var(--sunk); }
.as-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.as-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); flex: none; }
.as-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.as-titlebar h2 { font-size: 15px; font-weight: 650; }
.as-quiet { border-color: transparent; background: none; color: var(--muted); }
.as-quiet:hover { border-color: var(--line); color: var(--ink); }
.as-honest { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.as-honest .linkish { font-size: 13px; white-space: nowrap; }
.as-susp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: var(--st-suspended-bg); color: var(--ink); font-size: 13px; }
.as-susp .chip { background: var(--surface); }
.as-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--sunk); padding: 12px 12px 16px; }
.as-scroll:focus-visible { outline-offset: -2px; }
.as-top { display: flex; justify-content: center; }
.as-top:not(:empty) { margin-bottom: 10px; }
.as-top .muted { font-size: 13px; }
.as-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.as-day { align-self: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.as-note { color: var(--muted); font-size: 13.5px; text-align: center; padding: 16px 0; }
.as-note .btn { margin-top: 8px; }
.as-empty { font-size: 13.5px; color: var(--ink); padding: 4px 2px; }
.as-empty > * + * { margin-top: 8px; }
.as-time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* 自己说的：靠右、不抢眼 */
.as-me { align-self: flex-end; max-width: 86%; text-align: right; }
.as-me .as-say { display: inline-block; text-align: left; padding: 6px 10px; border-radius: 6px; background: var(--line-soft); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.as-me.pick .as-say { background: none; border: 1px solid var(--line); color: var(--muted); }
.as-me.quiet .as-say { background: none; color: var(--muted); font-style: italic; }
.as-me.pending .as-say { opacity: 0.6; }

/* 回答：一张张卡片 */
.as-bot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.as-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.as-card > * + * { margin-top: 8px; }
.as-card h3 { font-size: 13.5px; font-weight: 650; margin: 0; }
.as-refused { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.as-refused > * + * { margin-top: 0; }
.as-refused p { flex: 1 1 12em; }
.as-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.as-opts .btn { white-space: normal; text-align: left; }
.as-deadopts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.as-dead { font-size: 12.5px; color: var(--muted); }
.as-tablewrap { overflow-x: auto; margin-left: -12px; margin-right: -12px; padding: 0 12px; }
.as-table th { padding: 4px 8px; font-size: 12px; }
.as-table td { padding: 5px 8px; font-size: 13px; overflow-wrap: normal; white-space: nowrap; }
.as-table th:first-child, .as-table td:first-child { padding-left: 0; }
.as-table th:last-child, .as-table td:last-child { padding-right: 0; }
.as-table td.r { font-variant-numeric: tabular-nums; }
.as-help section + section { margin-top: 10px; }
.as-help ul { list-style: none; margin: 4px 0 0; padding: 0; }
.as-help li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
:lang(en) .as-help li { grid-template-columns: 8em minmax(0, 1fr); }
.as-help li:last-child { border-bottom: 0; }
.as-intent { font-size: 13px; color: var(--muted); }
.as-exs { display: flex; flex-wrap: wrap; gap: 4px; }
.as-ex { border: 1px solid var(--line); background: var(--sunk); color: var(--ink); border-radius: 4px; padding: 1px 7px; font-size: 13px; cursor: pointer; text-align: left; }
.as-ex:hover { border-color: var(--muted); }
.as-howto ul { list-style: disc; padding-left: 1.2em; }
.as-howto li { display: list-item; border: 0; font-size: 13px; padding: 2px 0; }

/* 要确认的单子：谁、多少、之后余额最大；倒数；确认 / 取消 */
.as-slip { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); padding: 12px 14px; }
.as-sliphead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; }
.as-tag { color: var(--accent); }
.as-left { color: var(--muted); }
.as-left.low { color: var(--out); }
.as-slipmain { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.as-who { font-size: 17px; font-weight: 700; }
.as-amt { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.as-amt .unit { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.as-bal { font-size: 13.5px; white-space: normal; }
.as-sum { font-size: 13px; color: var(--muted); }
.as-sum.lead { font-size: 16px; font-weight: 650; color: var(--ink); line-height: 1.35; }
.as-slip .row { padding-top: 2px; }
.as-slip .row .btn { flex: 1 1 0; }
/* 收场以后：一行，状态牌 + 摘要 */
.as-slip.settled { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 12px; border-color: var(--line); box-shadow: none; background: transparent; }
.as-slip.settled > * + * { margin-top: 0; }
.as-slip.settled .as-sum { flex: 1 1 12em; min-width: 0; }
.as-why { flex-basis: 100%; font-size: 13px; color: var(--out); }

.as-compose { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); flex: none; }
.as-compose input { flex: 1; min-width: 0; }
.as-compose .btn { min-height: 40px; }

/* 窄屏：右下角的按钮；点开是靠右的整屏高单子 */
.as-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 24px; background: var(--accent); color: var(--accent-ink); font-weight: 650; box-shadow: var(--shadow); cursor: pointer; }
.as-fab:hover { background: var(--accent-hover); }
.veil.as-veil { padding: 0; place-items: stretch end; overflow: hidden; }
.as-sheet { width: min(520px, 100vw); height: 100vh; height: 100dvh; background: var(--surface); box-shadow: var(--shadow); display: flex; }
.as-sheet .as-panel { flex: 1; min-width: 0; }
.as-sheet .as-compose { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: no-preference) {
  .as-sheet { animation: slidein 0.16s ease-out; }
  @keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
}
@media (max-width: 1199px) { main { padding-bottom: 96px; } }
/* 第二轮：方向写进大字、名字在账号下面、冻结的提示、没发出去的泡泡 */
.as-whoblk { display: flex; flex-direction: column; min-width: 0; }
.as-dir { font-weight: 650; }
.as-dir.deposit { color: var(--in); }
.as-dir.withdraw { color: var(--out); }
.as-dir.bonus { color: var(--in); }
label.check small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.as-name { font-size: 13px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.as-to { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.as-susp.frozen { background: var(--st-frozen-bg); }
.as-me.failed .as-say { background: none; border: 1px dashed var(--out); }
.as-unsent { font-size: 12.5px; color: var(--out); margin-top: 3px; text-align: right; }
.as-unsent .linkish { font-size: 12.5px; }
.as-slip.settled .as-sum b { font-weight: 650; color: var(--ink); }

/* ---------- AI 发起的单子（第二批第四项） ----------
   用「冻结」那一对蓝色当「外面来的」：和钱的绿色分开。但从不单靠颜色：总有「AI 发起 · 钥匙 · 时间」这句话和带框的 AI 字样 */
.ai-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; padding: 0 4px; border: 1.5px solid currentColor; border-radius: 3px; font-size: 11px; font-weight: 750; letter-spacing: 0.03em; line-height: 1; flex: none; }
.ai-from { display: inline-flex; align-items: center; gap: 6px; color: var(--st-frozen); font-size: 13px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.as-slip.ai { border-color: var(--st-frozen); box-shadow: inset 0 0 0 1px var(--st-frozen); padding-top: 0; overflow: hidden; }
.as-slip.ai .as-tag { color: var(--st-frozen); }
.as-origin { margin: 0 -13px; padding: 7px 13px; background: var(--st-frozen-bg); border-bottom: 1px solid color-mix(in srgb, var(--st-frozen) 30%, transparent); }
.as-slip.settled.ai { border-style: dashed; border-color: color-mix(in srgb, var(--st-frozen) 55%, transparent); }
.as-aifrom { flex-basis: 100%; font-size: 12.5px; }
.as-ainote, .ai-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--st-frozen) 35%, transparent); background: var(--st-frozen-bg); color: var(--ink); font-size: 13.5px; }
.as-ainote { margin-top: 10px; }
.as-ainote[hidden] { display: none; }
.as-ainote .ai-badge, .ai-note .ai-badge { color: var(--st-frozen); }
.as-ainote > span:not(.ai-badge), .ai-note > span:not(.ai-badge) { flex: 1 1 0; min-width: 10em; }
.as-ainote .linkish { font-size: 13px; }
.ai-note { margin-bottom: 12px; font-size: 14.5px; }
/* 收起的窄边、手机按钮上的数字：读屏念按钮的名字（里面写着几件） */
.as-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--st-frozen); color: var(--surface); font-size: 12px; font-weight: 700; line-height: 1; writing-mode: horizontal-tb; letter-spacing: 0; }
.as-railbtn .as-count { margin-top: 8px; }
.as-fab .as-count { margin-left: 8px; border: 2px solid var(--accent-ink); }
.as-fab { display: inline-flex; align-items: center; }

/* ---------- 我的：连接 AI ---------- */
.connect h3 { font-size: 14px; font-weight: 650; }
.con-intro { max-width: 46em; }
.con-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.con-label { font-size: 13.5px; font-weight: 600; }
.con-url { font-size: 14.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); overflow-wrap: anywhere; user-select: all; }
.con-note { font-size: 13px; color: var(--muted); }
.connect code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
.con-steps { margin: 0; padding-left: 1.5em; max-width: 46em; }
.con-steps li + li { margin-top: 6px; }
.con-steps code { padding: 1px 5px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.con-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; }
.con-two ul { margin: 6px 0 0; padding-left: 1.2em; }
.con-two li + li { margin-top: 4px; }

/* ---------- 最后一轮修改（第二批） ---------- */
/* 普通表格外面一层：正文变窄（右边助手栏开着）放不下时在这一层里横滚，不压到助手栏下面、不截掉；时间和日期不拆行 */
.tablewrap { overflow-x: auto; max-width: 100%; }
td.nw { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 760px) { .tablewrap { overflow-x: visible; } }
/* 别人写的字（名字、备注）：小一号、灰色、左边一道细线，像引用来的内容；标签写明是什么；长了照样折行，不截断 */
.as-quote { font-size: 13px; color: var(--muted); padding: 2px 0 2px 9px; border-left: 2px solid var(--line); overflow-wrap: anywhere; white-space: normal; line-height: 1.45; font-weight: 400; }
.as-qlabel { font-weight: 600; margin-right: 2px; }
.as-qval { font-style: normal; }
.as-qinline { color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.slip .as-quote { margin-top: 8px; }
.slip-sum { font-size: 13.5px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.slip .timer.low { color: var(--out); }
/* 发起它的钥匙已经作废：写明，仍然能确认或取消 */
.via-revoked { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.as-revoked { font-size: 12.5px; color: var(--muted); }
.as-origin { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.as-origin .chip, .as-revchip { font-size: 11.5px; }
.as-revchip { margin-left: 6px; }
/* 输入框上面单独一行：跳到最新一张待确认的单子 */
/* 「到待确认」：输入框上面单独一行，细一点 */
.as-jump { flex: 1 0 100%; min-height: 34px; padding: 4px 10px; font-size: 13px; color: var(--accent); border-color: var(--accent); }
.as-compose .as-jump { min-height: 34px; }
.as-jump[hidden] { display: none; }
/* 宽屏的表：短的格子（时间、状态、游戏名、数字）不拆行，放不下就横滚；长的字（事项、摘要、备注、结果）照样折行，但留出最少的宽度 */
@media (min-width: 761px) {
  .tablewrap td { white-space: nowrap; overflow-wrap: normal; }
  .tablewrap td.lead, .tablewrap td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 9em; }
  .tablewrap td.wrap { min-width: 6em; }
}
/* 助手栏开着、正文变窄（1200–1459px）：下线页的工具条用窄一档的排法，搜索框的标签不被挤成一列 */
@media (min-width: 1200px) and (max-width: 1459px) {
  .desk[data-aside="open"] .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 160px) minmax(0, 100px); }
  .desk[data-aside="open"] .toolbar .make { grid-column: 1 / -1; justify-content: flex-start; }
}
.connect td .chip { white-space: normal; line-height: 1.3; }
/* 表放不下、正在横滚时：两边有一道淡淡的阴影，看得出右边（或左边）还有栏 */
@media (min-width: 761px) {
  .tablewrap {
    background:
      linear-gradient(to right, var(--surface) 30%, transparent) left center / 32px 100% no-repeat local,
      linear-gradient(to left, var(--surface) 30%, transparent) right center / 32px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 22%, transparent), transparent) right center / 12px 100% no-repeat scroll;
  }
}

/* ---------- 助手栏里的小表：放不下时一行一块（第二批语言整理） ----------
   页面量过表的宽度才换：第一栏当这一块的标题，其余两列「栏名 — 值」，数字右对齐、等宽 */
.as-probe { height: 0; }
.as-fit > * + * { margin-top: 0; }
.as-stack { list-style: none; margin: 0; padding: 0; }
.as-stack[hidden], .as-tablewrap[hidden] { display: none; }
.as-stack > li { padding: 7px 0; border-top: 1px solid var(--line-soft); }
.as-stack > li:first-child { border-top: 0; padding-top: 2px; }
.as-shead { font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.as-stack dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin: 3px 0 0; }
.as-stack dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; min-width: 0; }
.as-stack dt { font-size: 12px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.as-stack dd { margin: 0; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.as-stack dd.num { white-space: nowrap; }
/* 外部 AI 发来的单子：服务器那句原话（AI 用什么语言问就是什么语言），小字、带标签，放在页面画的内容下面 */
.as-orig { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.4; }
.as-olabel { font-weight: 600; margin-right: 2px; }
.slip .as-orig { margin-top: 8px; font-size: 13px; }
.slip .as-bal { margin-top: 6px; }
/* 首页「等你确认的请求」：正文照确认单的样子画，但在表格里小一号、靠左；表下「还有 N 件」 */
.waiting-what { display: grid; gap: 4px; }
.waiting-what .as-slipmain { justify-content: flex-start; }
.waiting-what .as-who { font-size: 15px; }
.waiting-what .as-amt { font-size: 18px; }
.waiting-what .as-orig { font-weight: 400; }
.waiting-more { margin-top: 8px; }
/* 首页最上面那一行庄家警示：一行短的，记号 + 「警示」+ 数字 + 去庄家那一块；不只靠颜色 */
.house-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; margin-bottom: 16px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--st-blocked) 55%, transparent); background: var(--st-blocked-bg); color: var(--ink); font-size: 14px; }
.house-top > strong { color: var(--st-blocked); font-weight: 700; }
.house-top b { font-weight: 700; }
.house-top .linkish { color: var(--st-blocked); margin-left: auto; min-height: 24px; }
/* 看这一手被浏览器拦住时的说明块：贴在页面底下，带「在这一页打开」 */
.handnote { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 41; display: grid; gap: 10px; width: max-content; max-width: min(34rem, calc(100% - 32px)); padding: 12px 14px; border-radius: 6px; border: 1px solid var(--out); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.handnote p { font-weight: 600; }
.handnote-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* 确认单里那几项：金额带单位比较长，一行少放几项，免得顶出纸边 */
.held-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.held-facts > div { min-width: 0; }
.held-facts dd { font-size: 17px; }
/* 每一手：状态词不拦腰换行；前后余额之间夹着别的进出时的小字 */
.st-word { white-space: nowrap; }
.hand-span { display: block; font-size: 12.5px; white-space: normal; }
.hand-after { display: inline-block; text-align: right; }

/* 能玩的游戏：分组是大开关，组里的游戏是小开关。开关上写「开着 / 关了」，关了的旋钮在左、底色是灰的（不只靠颜色）；
   上级关的带一把小锁和字；不能动的调淡，原因照样清楚 */
.tag.games { background: var(--st-closed-bg); color: var(--st-closed); }
/* 限红档位的记号：带字（「C 档」「档位 ABC」「没有档位」），不只靠颜色 */
.tag.tier { background: var(--st-frozen-bg); color: var(--st-frozen); }
.gsheet { display: grid; gap: 12px; }
.ggroup { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; gap: 6px; }
.ggames { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line-soft); }
.gempty { font-size: 13px; padding-left: 14px; }
.grow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; min-height: 40px; }
.grow .gname { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.grow.big .gname, .ggroup > .gname { font-size: 15px; font-weight: 650; margin: 0; }
.gkey { font-size: 12px; font-weight: 400; color: var(--muted); }
.grow .gnote { grid-column: 1; grid-row: 2; font-size: 12.5px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.grow .gswitch, .grow .btn { grid-column: 2; grid-row: 1 / span 2; }
.gswitch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.gswitch .gknob { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--st-closed-bg); border: 1px solid var(--line); flex: none; }
.gswitch .gknob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); }
.gswitch[aria-checked="true"] { border-color: var(--accent); }
.gswitch[aria-checked="true"] .gknob { background: var(--accent); border-color: var(--accent); }
.gswitch[aria-checked="true"] .gknob::after { left: auto; right: 2px; background: var(--accent-ink); }
.gswitch.big { min-height: 40px; font-size: 14px; }
.gswitch[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; }
/* 小锁：画出来的（锁梁 + 锁身），不用图片 */
.glock { position: relative; display: inline-block; width: 10px; height: 12px; flex: none; vertical-align: -1px; margin-right: 4px; }
.glock::before { content: ""; position: absolute; left: 2px; top: 0; width: 6px; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
.glock::after { content: ""; position: absolute; left: 0; bottom: 0; width: 10px; height: 7px; border-radius: 1.5px; background: currentColor; }
@media (max-width: 420px) { .ggames { padding-left: 8px; } .gswitch { padding-right: 8px; } }

/* 打印（结算单「打印」按钮，别的页面也一样）：只留正文；导航、顶栏、助手栏、按钮、表单都不印；黑字白底 */
@media print {
  .nopr, .nav, .topbar, .scrim, .as-col, .as-rail, .as-fab, button, .rtabs, .stform, .wlform, .wlquick, .filter, .menu, .toast { display: none !important; }
  :root, body, .desk, main, .panel { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .desk, .desk[data-aside] { display: block !important; }
  .panel { border: 1px solid #000 !important; break-inside: avoid; }
  a { color: #000 !important; text-decoration: none !important; }
  .muted, .stcheck.ok, .in, .out { color: #000 !important; }
  .chsvg .y-label, .chsvg .x-label, .chsvg .zero-label { fill: #000 !important; }
  .stcheck.bad { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
  .trcheck.ok { color: #000 !important; }
  .trcheck.bad { background: #fff !important; color: #000 !important; border: 3px solid #000 !important; }
  .trself td { background: #fff !important; }
  .trpartners[hidden] { display: block !important; }
  table.plain th, table.plain td { border-color: #000 !important; color: #000 !important; }
}

/* 子账号 PART B：员工号登录时的外框和标签、老板的「员工号」页 */
/* 每一页顶上那一条：你在谁的后台里、以哪个员工号办事。带记号、带字，去不掉 */
.staff-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; margin: 0 0 14px; padding: 8px 12px; border-radius: 6px; border: 1px solid currentColor; background: var(--st-frozen-bg); color: var(--st-frozen); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
/* 那句话占满剩下的宽度；24 小时的已用 / 上限是单独一块：宽屏跟在后面（前面一个「·」），窄屏自己一行、和那句话对齐（补丁第二轮） */
.staff-bar-text { flex: 1 1 16em; min-width: 0; }
.staff-bar-mark { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 2px; border: 2px solid currentColor; }
.who-name { overflow-wrap: anywhere; }
.top-staff { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-staff .tag { margin-left: 0; }
/* 「员工 xxx」小标签：字写明，加一道细框（不只靠颜色和别的标签分开） */
.tag.staff { background: var(--st-frozen-bg); color: var(--st-frozen); box-shadow: inset 0 0 0 1px currentColor; overflow-wrap: anywhere; white-space: normal; }
.perm-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.perm-list li { display: flex; gap: 6px; align-items: baseline; }
.perm-list li.off { color: var(--muted); }
.perm-mark { width: 1em; flex: none; font-weight: 700; text-align: center; }
.staff-never ul, .staff-may { margin: 0; padding-left: 20px; }
.staff-never li, .staff-may li { margin: 2px 0; }
.staff-fullid { font-size: 13.5px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; white-space: normal; }
.staff-form .choices label.check small { display: block; color: var(--muted); font-size: 13px; }
.staff-form { max-width: 560px; }
.staff-cap { font-size: 13.5px; }
/* batch-4 P3：员工的 24 小时上分合计上限（上分表里还能上多少、顶上那一条、员工号页那一格） */
.staff-caps { gap: 4px; }
.staff-daycap { font-size: 13.5px; }
/* 上分表里那两行带大数：能折行，不把单子撑出手机屏幕（补丁第三轮；.num 默认不折行） */
.staff-cap, .staff-daycap { white-space: normal; overflow-wrap: anywhere; }
.staff-bar-daycap { font-weight: 600; flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .staff-bar-daycap { flex-basis: 100%; padding-left: 18px; }
}
.staff-daycap-cell, .daycap-dd { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
td.cap-col { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  /* 手机上那一格的列名可以缩、可以折行，两个大数也能折行：页面不被撑宽 */
  table.plain td.cap-col::before { flex: 0 1 auto; min-width: 0; }
}
.staff-created { display: block; font-size: 12.5px; font-weight: 400; }
.staff-idcell { min-width: 0; }
.staff-idcell .as-qinline { display: block; font-size: 13.5px; }
.staff-slip { flex-direction: column; align-items: flex-start; gap: 6px; }
.staff-slip-note { font-size: 13px; max-width: 32em; white-space: normal; }
.as-staff { font-size: 13px; font-weight: 600; color: var(--st-frozen); overflow-wrap: anywhere; }
.guard-note { margin-top: 4px; }
.count.num { font-size: 13px; font-weight: 500; color: var(--muted); }

/* batch-5 B5-1：闲置退出前的「还在吗？」，盖在别的弹出层上面（下面那张表不动） */
.idle-veil { z-index: 35; }
.idle-dlg { width: min(400px, 100%); }
.idle-count { font-size: 22px; font-weight: 650; }

/* batch-5 B1：余额低于提醒线 */
.low-line { margin-top: 12px; }
/* 终审修改 3：一整句话（带数字）的段落、提示框可以折行（.num 默认不折行，句子长了把手机页面撑宽：低余额提醒在 en / fr 390 宽撑到 469px）。
   数字本身没有空格，照样不会从中间断开；实在放不下才在任意处断（overflow-wrap） */
p.num, .notice.num, li.num { white-space: normal; overflow-wrap: anywhere; }
.low-set { margin-top: 8px; font-size: 14px; }
.staff-bar-low { margin-left: 8px; }

/* batch-5 B2：金额异常大的上分（只提醒，不挡）：醒目，字写明，不只靠颜色 */
.unusual { margin: 8px 0; padding: 8px 10px; border: 2px solid var(--out); border-radius: 6px; font-weight: 650; color: var(--ink); }

/* batch-5 B5-2：公告。正文是别人写的字：保留换行、长串字（网址、没有空格的字）照样折行，窄屏不横滚 */
.nt-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; min-width: 0; max-width: 60em;  overflow: hidden; contain: paint; padding: 0.15em 0; }
/* 修改第一轮 M-1：正文框里画不下的（叠在一起的组合记号）一律裁掉，不会画到横条或别的地方上 */
.nt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.nt-item { padding: 12px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.nt-item:first-child { border-top: 0; padding-top: 4px; }
.nt-item.read .nt-text { color: var(--muted); }
.nt-item > div:last-child:has(button) { margin-top: 8px; }
.nt-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13.5px; min-width: 0; }
.nt-head .tag { margin-left: 0; }
.nt-from { font-weight: 650; overflow-wrap: anywhere; }
.nt-when { font-size: 13px; }
.nt-name { overflow-wrap: anywhere; min-width: 0; }
.nt-until { margin-top: 4px; font-size: 13px; }
.nt-more { margin-top: 10px; font-size: 14px; }
.tag.nt-new { background: var(--accent); color: var(--accent-ink); }
.tag.maint { background: var(--st-blocked-bg); color: var(--st-blocked); }
.nt-foot { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: 13px; }
.nt-who { font-weight: 600; overflow-wrap: anywhere; }
.tag.nt-state.active { background: var(--st-active-bg); color: var(--st-active); }
.tag.nt-state.expired, .tag.nt-state.withdrawn { background: var(--st-closed-bg); color: var(--st-closed); }
.nt-item.mine.expired .nt-text, .nt-item.mine.withdrawn .nt-text { color: var(--muted); }
.nt-quote .nt-text { color: var(--ink); }
.nt-post textarea { width: 100%; min-height: 7em; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); resize: vertical; box-sizing: border-box; }
.nt-post textarea[aria-invalid="true"] { border-color: var(--out); }
.nt-aud { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.nt-aud legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.nt-aud[disabled] { opacity: 0.55; }
.counter.over { color: var(--out); font-weight: 650; }
/* 维护公告：每一页最上面一条细的横条（不能收起）；登录页在最上面 */
.maint-bar { display: grid; gap: 6px; margin: 0 0 14px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--st-blocked); background: var(--st-blocked-bg); color: var(--ink); font-size: 14px; min-width: 0; }
.maint-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.maint-item .tag { margin-left: 0; flex: none; }
.maint-item .nt-text { margin: 0; flex: 1 1 18em; font-weight: 600; }
.maint-until { font-size: 13px; color: var(--muted); }
.gate-maint { margin: 0; border-radius: 0; border-width: 0 0 1px; padding: 10px 16px; }

/* batch-5 修改第二轮 1：标签页看不见时先遮住；重新看得见时问清楚登录还在才揭开（上一次的样子不先露出来） */
body.veiled > * { visibility: hidden; }

/* batch-5 B5-3 会员入口：二维码在左（窄屏在上），地址和按钮在右。二维码跟着容器缩，最宽 320px；永远白底黑格 */
.entry-intro { margin: 0 0 12px; }
.entry-card .entry-note { margin: 14px 0 0; }
.entry-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.entry-qr { margin: 0; flex: 0 1 320px; width: 100%; max-width: 320px; min-width: 0; background: #ffffff; border-radius: 4px; }
.entry-qr svg.qr { display: block; width: 100%; height: auto; max-width: 320px; }
.entry-side { flex: 1 1 16em; min-width: 0; }
.entry-label { margin: 0; font-size: 13px; }
.entry-line { margin: 0; }
.entry-url { display: block; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; word-break: break-all; user-select: all; -webkit-user-select: all; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); }
.entry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* 打印：只有标题、二维码和地址，都放大 */
@media print {
  .desk.print-entry main > :not(h1):not(.entry-card) { display: none !important; }
  .desk.print-entry .entry-card > :not(.entry-body), .desk.print-entry .entry-label, .desk.print-entry .entry-actions { display: none !important; }
  .desk.print-entry .entry-card { border: 0 !important; padding: 0 !important; }
  .desk.print-entry h1 { font-size: 30pt; text-align: center; margin: 0 0 0.8cm; }
  .desk.print-entry .entry-body { display: block; text-align: center; }
  .desk.print-entry .entry-qr { width: 12cm; max-width: 100%; margin: 0 auto 0.8cm; }
  .desk.print-entry .entry-qr svg.qr { max-width: none; }
  .desk.print-entry .entry-url { font-size: 20pt; border: 0; background: #fff; color: #000; text-align: center; }
}

/* batch-5 B5-4 推广链接：申请一条一张卡（和被拦的派彩同一种），名字、联系方式是别人写的字，长了就折行 */
.promo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); gap: 6px 16px; margin: 0; }
.promo-facts dt { font-size: 13px; color: var(--muted); }
.promo-facts dd { margin: 0; overflow-wrap: anywhere; }
.promo-row .held-who, .promo-row p { margin: 0; overflow-wrap: anywhere; }
.promo-row .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* batch-5 B5-5 交班小结：时间段一行（带 UTC 差多少）、谁的、合计小表、第一次 / 最后一次、被拒的那一格写明原因。手机上不横着滚 */
.shift-window { margin: 0; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.shift-who { margin: 0; overflow-wrap: anywhere; }
.shift-sum .tablewrap { max-width: 520px; }
.shift-times { margin-top: 8px; }
.shift-times dd { white-space: normal; overflow-wrap: anywhere; }
.shift-no { overflow-wrap: anywhere; }
.shift-partial { margin: 8px 0 0; font-size: 14px; }
@media print {
  .shift-sum, .shift-rows { border: 0 !important; padding: 0 !important; }
}
/* batch-5 B5-5 收据：一张小单子，手机宽度上整张能截图。没办成的那一句是醒目的框 + 粗字（不只靠颜色） */
.receipt .receipt-status { margin: 4px 0 0; }
.receipt-no { padding: 8px 10px; border: 2px solid currentColor; border-radius: 6px; color: var(--st-blocked); overflow-wrap: anywhere; }
.receipt-amount { font-size: 28px; font-weight: 700; margin: 6px 0 0; white-space: normal; overflow-wrap: anywhere; }
.receipt.no .receipt-amount { text-decoration: line-through; }
.receipt-facts { margin-top: 6px; }
.receipt-facts dd { overflow-wrap: anywhere; white-space: normal; }
.receipt-test { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; }
.receipt-actions { flex-wrap: wrap; }
@media print {
  /* 只印收据：别的都不印，单子从遮罩里拿出来平放 */
  body.print-receipt > :not(.veil) { display: none !important; }
  body.print-receipt .veil { position: static !important; display: block !important; background: #fff !important; padding: 0 !important; overflow: visible !important; }
  body.print-receipt .receipt { width: auto !important; box-shadow: none !important; border: 1px solid #000 !important; color: #000 !important; }
  body.print-receipt .receipt-no { color: #000 !important; }
}
/* 终审修改 4（取代修改第一轮 M-7 的缩小二维码）：二维码是拿来扫的，窄屏上照样整宽（最多 320px；360 宽约 296px、390 宽 320px）。
   不让右下角的「助手」按钮（位置固定）盖住东西的办法：
   - 链接那几行（「链接」两个字、地址框、复制、打印）右边留出按钮的宽度：不管滚到哪里，按钮都盖不到它。--fab-clear 量过：八种语言、带数字时按钮最宽 157px，
     卡片自己右边有 18px 内边距，留 152px 时离按钮至少 8px；
   - 正文底下留出按钮的高度 + 空隙（48 + 16 + 24），最后的内容能滚到按钮上面；
   - 「推广链接」页开着时链接那张卡排在最前面、提示那一句排在卡片最后（app.js），一打开二维码就在按钮上面（360×740、390×844 八种语言量过，见报告）。 */
@media (max-width: 1199px) {
  .desk { --fab-clear: 152px; }
  .entry-label, .entry-line, .entry-actions { padding-right: var(--fab-clear); }
  .desk main { padding-bottom: calc(48px + 16px + 24px + env(safe-area-inset-bottom, 0px)); }
}

/* 合伙人（合伙分账）：合伙人自己的登录只有这一个外框（没有后台的导航和助手栏）——顶上一条「代理位 — 合伙人 号」、语言、退出，下面两个标签 */
.pn-shell { min-height: 100vh; min-height: 100dvh; background: var(--paper); }
.pn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px clamp(16px, 3vw, 36px); background: var(--surface); border-bottom: 1px solid var(--line); }
.pn-who { min-width: 0; overflow-wrap: anywhere; }
.pn-who b { font-size: 15px; }
.pn-tools select { max-width: 9em; }
.pn-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px clamp(16px, 3vw, 36px) 0; }
.pn-tabs a { padding: 8px 14px; border-radius: 6px 6px 0 0; color: var(--ink); text-decoration: none; border: 1px solid transparent; border-bottom: 0; }
.pn-tabs a[aria-current="page"] { background: var(--surface); border-color: var(--line); font-weight: 650; }
.pn-main { padding: 20px clamp(16px, 3vw, 36px) 64px; max-width: 1100px; min-width: 0; }
.pn-main > h1 { font-size: 22px; font-weight: 650; margin-bottom: 16px; }
.pn-changed { text-decoration: underline; text-underline-offset: 3px; }
.tag.pn-signed { background: var(--st-active-bg); color: var(--st-active); margin-left: 0; }
.tag.pn-unsigned { background: var(--st-suspended-bg); color: var(--st-suspended); margin-left: 0; }
.tag.pn-tag { margin-left: 0; }
.pn-sum { font-weight: 650; }
.pn-conseq { margin: 0 0 4px 1.2em; padding: 0; }
.pn-conseq li + li { margin-top: 4px; }
#pn-up { margin-top: 16px; }
/* 密码那一格：每一件事单独一行（窄屏的卡片上也一样），不挤成一串 */
.pn-pw { display: flex; flex-direction: column; gap: 2px; text-align: start; }
.pn-pwline { display: block; overflow-wrap: anywhere; }
/* 合伙人自己的份额页：份额被改少的每一次。有的时候醒目（红边），一次都没有时是平常的一句 */
.pn-lowered { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.pn-lowered.alert { border: 2px solid var(--st-blocked); background: var(--st-blocked-bg); }
.pn-lowered h2 { font-size: 15px; font-weight: 650; margin-bottom: 8px; overflow-wrap: anywhere; }
.pn-lowlist { margin: 0 0 8px 1.2em; padding: 0; }
.pn-lowlist li + li { margin-top: 4px; }
.pn-mine h3 { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.pn-lowcount { color: var(--st-blocked); font-weight: 600; }
