/* 颜色都在 :root 里定义，改品牌色只改 --brand 这几行 */
:root {
  /* 品牌色取自 logo：深绿 + 陶土橙 + 米白 */
  --brand: #0f4a30;
  --brand-2: #b45c38;            /* 点缀色（logo 里的鼠标箭头和「.」） */
  --brand-ink: #ffffff;
  --brand-soft: #e3eee6;
  --bg: #f8f4ec;
  --surface: #fffdf9;
  --ink: #1b241f;
  --muted: #66706a;
  --line: #e7e1d4;
  --ok: #1f7a4d;
  --ok-soft: #e1f1e7;
  --warn: #a8641a;
  --warn-soft: #fbefdc;
  --bad: #b8322e;
  --bad-soft: #fbe6e3;
  --info-soft: #f3ede0;
  --side: #0c3a26;               /* 左侧导航栏 */
  --side-ink: #cfe0d5;
  --side-hover: #145234;
  --shadow: 0 1px 2px rgba(27, 36, 31, .04), 0 4px 14px rgba(27, 36, 31, .05);
  --radius: 14px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", "Songti SC", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4fae7e; --brand-2: #d9784f; --brand-ink: #0b1a12; --brand-soft: #173826; --bg: #0d1511; --surface: #142019;
    --ink: #e9efe9; --muted: #9aaca1; --line: #24352b; --ok: #4fcf8e; --ok-soft: #12301f; --warn: #f0a84a; --warn-soft: #33270f;
    --bad: #ff7a6e; --bad-soft: #3a1a17; --info-soft: #1b2a21; --side: #08140e; --side-ink: #b9cdbf; --side-hover: #163222;
    --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--serif); font-weight: 700; color: var(--brand); font-size: 26px; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 20px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 0 0 12px; }
h4 { font-size: 13px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
code { font: 12px var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.num { text-align: right; white-space: nowrap; }
.err-text { color: var(--bad); min-height: 1em; margin: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 16px; }
[hidden] { display: none !important; }

/* ---------- 按钮和表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  background: var(--surface); color: var(--ink); text-decoration: none !important; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 25%, transparent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { border-color: var(--line); color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }

input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; min-height: 40px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
textarea { resize: vertical; font-family: var(--mono); font-size: 13px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 500; font-size: 13px; }
.field > .seg, .field > .btn, .field > input[type=datetime-local] { align-self: flex-start; }
.field > input[type=datetime-local] { width: auto; min-width: 220px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.inline select { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid.inner { gap: 12px; }
.span2 { grid-column: span 2; }
.help { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--line); color: var(--muted); font: 600 10px var(--font); cursor: help; font-style: normal; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.check input { width: auto; min-height: 0; }
.days { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.range { display: flex; align-items: center; gap: 8px; margin: 8px 0; max-width: 360px; }

/* 分段按钮 / 筛选标签 */
.seg, .chips { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; flex-wrap: wrap; }
.seg button, .chips button { border: 0; background: none; font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.seg button.on, .chips button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; }
.chips b { font-weight: 600; color: var(--ink); margin-left: 2px; }

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.logo { color: var(--brand); }
.logo .mark { width: 38px; height: 38px; flex: none; }
.logo .mark .cursor { fill: var(--brand-2); stroke: var(--surface); stroke-width: 1.6; stroke-linejoin: round; }
.side .logo .mark .cursor, .login-hero .logo .mark .cursor { stroke: var(--side); }
.logo .word { display: flex; flex-direction: column; line-height: 1.15; }
.logo .name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.logo .name i { font-style: normal; color: var(--brand-2); }
.logo .word small { font-weight: 500; font-size: 11px; letter-spacing: .02em; opacity: .65; }
.side .logo { color: #f8f4ec; }
.side nav { display: flex; flex-direction: column; gap: 3px; }
.side nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--side-ink); text-decoration: none; }
.side nav a i { font-style: normal; width: 18px; text-align: center; opacity: .7; }
.side nav a:hover { background: var(--side-hover); color: #fff; }
.side nav a.on { background: #f8f4ec; color: var(--side); font-weight: 600; }
.side nav a.on i { opacity: 1; color: var(--brand-2); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 6px 0; border-top: 1px solid var(--side-hover); }
.tenant { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .muted { color: var(--side-ink); opacity: .7; }
.side .btn.ghost { background: transparent; color: var(--side-ink); border-color: var(--side-hover); }
.side .btn.ghost:hover { background: var(--side-hover); color: #fff; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; }
.side .lang { border-color: var(--side-hover); }
.lang button { border: 0; background: none; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted); }
.side .lang button { color: var(--side-ink); }
.lang button.on { background: var(--brand); color: var(--brand-ink); }
.side .lang button.on { background: #f8f4ec; color: var(--side); }
main { min-width: 0; }
.mock-banner { background: var(--warn-soft); color: var(--warn); padding: 8px 24px; font-size: 13px; border-bottom: 1px solid var(--line); }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; overflow-wrap: anywhere; }
.page-head > * { min-width: 0; }
.back { font-size: 13px; margin-bottom: -8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar.pad { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search { max-width: 260px; }

/* ---------- 数字卡片 ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 16px 0 6px; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-height: 96px; position: relative; overflow: hidden; }
.kpis:not(.compact) .kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand-2); }
.kpis.compact .kpi { box-shadow: none; background: var(--bg); min-height: 0; padding: 10px 12px; }
.kpi.skel { background: linear-gradient(90deg, var(--surface), var(--bg), var(--surface)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpis.compact .kpi-value { font-size: 20px; }
.kpi-hint { color: var(--muted); font-size: 12px; }
.big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big small { font-size: 14px; color: var(--muted); font-weight: 500; }

/* ---------- 进度条、状态 ---------- */
.bar { height: 6px; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 6px 0; }
.bar span { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.bar.lg { height: 10px; border-radius: 5px; }
.bar.warn span { background: var(--warn); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge.s0 { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.s1 { background: var(--brand-soft); color: var(--brand); }
.badge.s2 { background: var(--ok-soft); color: var(--ok); }
.badge.s3 { background: var(--warn-soft); color: var(--warn); }
.badge.s4 { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.s5 { background: var(--warn-soft); color: var(--warn); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: var(--line); vertical-align: 1px; }
.dot.answered { background: var(--ok); }
.dot.unanswered { background: var(--bad); }
.dot.calling, .dot.retry { background: var(--brand); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.sm td, .table.sm th { padding: 7px 10px; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover { background: var(--bg); }
.table .num { text-align: right; }
.w-prog { width: 180px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.empty { padding: 44px 16px; text-align: center; color: var(--muted); }
.empty-ic { font-size: 28px; opacity: .5; }
.empty .btn { margin-top: 6px; }

/* ---------- 提示框 ---------- */
.callout { padding: 11px 14px; border-radius: 8px; font-size: 13px; border: 1px solid var(--line); }
.callout.info { background: var(--info-soft); border-color: transparent; }
.callout.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 11px 16px; border-radius: 8px; background: var(--ink); color: var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 13px; transition: opacity .4s, transform .4s; }
.toast.err { background: var(--bad); color: #fff; }
.toast.info { background: var(--brand); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

#overlay { position: fixed; inset: 0; background: rgba(12, 30, 20, .45); backdrop-filter: blur(2px); display: none; z-index: 40; }
#overlay.show { display: grid; place-items: center; padding: 16px; }
#overlay.show.right { place-items: stretch end; padding: 0; }
.modal { background: var(--surface); border-radius: 12px; padding: 22px; width: min(440px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h3 { font-size: 17px; }
.modal p { color: var(--muted); margin: 0 0 20px; }
.drawer { background: var(--surface); width: min(560px, 100vw); height: 100vh; overflow-y: auto; position: relative; box-shadow: -10px 0 30px rgba(0,0,0,.15); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer .close { position: absolute; right: 12px; top: 12px; }
.drawer-body { padding: 26px 24px; }
.drawer audio { width: 100%; margin: 12px 0 4px; }

/* ---------- 对话记录 ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--bg); border-radius: var(--radius); margin-bottom: 14px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.ai { align-self: flex-start; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: 11px; color: var(--muted); margin: 0 4px 3px; }
.bubble { padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; }
.msg.ai .bubble { border-top-left-radius: 4px; }
.msg.user .bubble { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-top-right-radius: 4px; }
.msg .meta { font-size: 11px; color: var(--muted); margin: 3px 4px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 120px; }
.tag span { font-size: 12px; color: var(--muted); }

/* ---------- 新建任务向导 ---------- */
.stepper { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; counter-reset: s; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 130px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.stepper li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-size: 12px; font-weight: 600; flex: none; }
.stepper li.on { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.stepper li.on span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stepper li.done span { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.wizard-nav { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.agent { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.agent:hover { border-color: var(--brand); }
.agent.on { border-color: var(--brand); background: var(--brand-soft); }
.agent.static { cursor: default; }
.agent.static:hover { border-color: var(--line); }
.agent .btn { align-self: flex-start; margin-top: 6px; }
.vars { display: flex; flex-wrap: wrap; gap: 4px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; margin: 14px 0 8px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-ic { font-size: 26px; color: var(--brand); }
#inputArea { margin-top: 14px; }
.summary { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; background: var(--bg); border-radius: 8px; margin-top: 14px; }
.summary .ok { color: var(--ok); font-weight: 600; }
.summary .bad { color: var(--bad); font-weight: 600; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.invalid { margin: 8px 0; padding-left: 20px; font-size: 13px; columns: 2; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0 0 16px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------- 图表 ---------- */
.chart { margin: 6px 0; }
.bars { width: 100%; height: 180px; display: block; }
.bars rect { fill: var(--brand); opacity: .85; }
.bars rect.live { opacity: .45; }
.bars rect:hover { opacity: 1; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.spark { width: 100%; height: 70px; display: block; margin: 10px 0 4px; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.spark .quota { stroke: var(--warn); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: var(--bg); }
.login.split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); place-items: stretch; padding: 0; }
.login-hero { position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(600px 380px at 100% 0%, color-mix(in srgb, var(--brand-2) 28%, transparent), transparent), var(--side); }
.login-hero .logo { color: #f8f4ec; }
.hero-copy { max-width: 520px; }
.hero-copy h1 { font-family: var(--serif); font-weight: 700; color: #f8f4ec; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.18; letter-spacing: -.01em; display: block; }
.hero-copy p { color: #cfe0d5; font-size: 16px; margin: 16px 0 26px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.hero-points li { display: flex; gap: 12px; align-items: center; color: #e9f0eb; }
.hero-points li::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: rgba(248, 244, 236, .12); color: #e6956f; font-weight: 700; font-size: 13px; }
.hero-foot { color: #8fae9b; font-size: 12px; margin: 0; }
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: 0 20px 60px rgba(20, 22, 41, .08); display: flex; flex-direction: column; gap: 14px; }
.login.split .login-card { border: 0; box-shadow: none; background: transparent; }
.login-card h2 { margin-top: 2px; font-family: var(--serif); font-size: 28px; color: var(--brand); }
.login-card p { margin: 0; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.login-card .btn.primary { height: 44px; font-size: 15px; }
.login .logo { padding: 0; }

/* ---------- 管理后台 ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.tool { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.tool p { margin: 2px 0 0; }
.tool > div { min-width: 0; }
.tool .btn { flex-shrink: 0; }
.key-box { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.key-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; border: 0; background: none; font-size: 14px; user-select: all; }
.callout.ok-box { background: var(--ok-soft); border-color: transparent; }
fieldset.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
fieldset.box legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
details.add-user { margin-top: 10px; }
details.add-user > summary { list-style: none; display: inline-flex; }
details.add-user > summary::-webkit-details-marker { display: none; }
details.add-user[open] > summary { margin-bottom: 12px; }
tr.pending td { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
ul.plain { margin: 8px 0 0; padding-left: 18px; }
.field small { font-size: 12px; }
.drawer-body h3 { margin-top: 22px; }
.w-name { min-width: 150px; }
.nowrap { white-space: nowrap; }

/* ---------- 手机和窄屏 ---------- */
@media (max-width: 900px) {
  .login.split { grid-template-columns: minmax(0, 1fr); }
  .login-hero { padding: 28px 20px; gap: 18px; }
  .hero-copy h1 { font-size: 28px; }
  .hero-points, .hero-foot { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-value { font-size: 22px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 10px; }
  .side nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; }
  .side nav a { white-space: nowrap; padding: 6px 10px; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; padding: 0; }
  .tenant { display: none; }
  .side { height: auto; }
  .page { padding: 16px; }
  .mock-banner { padding: 8px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .search { max-width: none; }
  .w-prog { width: 110px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .invalid { columns: 1; }
}
