/* CN39 workbench 公共样式 — data-terminal 风（T_2026_1112 全站重设计）
 * 规则：色彩只上数据；选中=1px/2px 薄荷线；卡片暗于地面；无阴影无渐变无斑马纹；
 *       数字等宽 tabular；12px 灰 sentence-case 表头。
 * 注意：admin 页的 admin.css 以 body.admin-console 作用域重复定义 ac-*（值一致），
 *       改动此处时同步检查 admin.css。 */
:root {
  color-scheme: dark; /* 防 WebKit/微信内置浏览器暗色模式强制反转表单控件 */
  --bg:#06131d;         /* 地面 */
  --card:#050e15;       /* 卡片：比地面暗一档 */
  --card-2:#081722;     /* 控件底 */
  --rule:#14283a;       /* 行规则线 */
  --border:#1b3548;     /* 控件边 */
  --text:#dceeff; --ink:#ffffff; --muted:#8fa9bc; --faint:#7d95a7;
  --accent:#8cf3d4;     /* 薄荷：选中线 + 数据主色，全屏 <3% */
  --pos:#57d9a6; --neg:#ff8f7d; --amber:#f0c060; --blue:#7fc4ff;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
a { color:var(--accent); }
button,input,select,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }

/* ── 顶栏 ── */
.topbar { display:flex; align-items:center; gap:12px; padding:12px 24px;
  background:var(--card); border-bottom:1px solid var(--rule); position:sticky; top:0; z-index:10; }
.brand-mark { width:36px; height:36px; display:grid; place-items:center; border-radius:8px;
  background:var(--card-2); color:var(--accent); font-weight:800; border:1px solid var(--border);
  font-family:var(--mono); font-size:12px; letter-spacing:.5px; }
.tb-title, .topbar h1 { font-size:16px; margin:0; font-weight:600; color:var(--ink); }
.topbar .sub { font-size:12px; color:var(--muted); }
.topbar .spacer { margin-left:auto; }
.topbar .user { font-size:13px; color:var(--accent); font-family:var(--mono); }
.btn { border:1px solid var(--border); border-radius:6px; background:var(--card-2);
  padding:7px 14px; color:var(--text); font-size:13px; text-decoration:none; box-shadow:none; }
.btn:hover { border-color:var(--accent); color:var(--accent); }
.btn.primary { background:var(--card-2); border:1px solid var(--accent); color:var(--accent); }
.btn.danger { background:var(--card-2); border:1px solid var(--neg); color:var(--neg); }

/* ── Tab 导航：中性规则线卡，选中=底部 2px 薄荷线，无光晕 ── */
.tabs { display:flex; gap:8px; padding:16px 24px 0; flex-wrap:wrap; }
.tab { display:block; padding:12px 16px; min-width:170px; border:1px solid var(--rule);
  border-radius:8px; background:var(--card); color:var(--text); text-decoration:none; }
.tab:hover { border-color:var(--border); }
.tab.active { border-color:var(--rule); box-shadow:none; border-bottom:2px solid var(--accent); }
.tab.disabled { opacity:.45; cursor:not-allowed; }
.tab b { display:block; font-size:14px; font-weight:600; color:var(--ink); }
.tab span { display:block; margin-top:4px; font-size:12px; color:var(--muted); }

.wrap { padding:16px 24px 48px; max-width:1160px; margin:0 auto; }

/* ── KPI / metric：一个容器 1px 分隔 ── */
.metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); margin-bottom:14px;
  background:var(--card); border:1px solid var(--rule); border-radius:8px; }
.metric { padding:16px 18px 14px; border-left:1px solid var(--rule); }
.metric:first-child { border-left:0; }
.metric label { font-size:12px; color:var(--muted); display:block; }
.metric strong { display:block; margin-top:6px; font-size:24px; font-weight:500; color:var(--ink);
  font-family:var(--mono); font-variant-numeric:tabular-nums; }
.metric span { display:block; margin-top:4px; font-size:12px; color:var(--faint); }

/* ── 卡片与页内结构（与 admin 页 ac-* 同一套）── */
.panel { padding:18px 20px 14px; border:1px solid var(--rule); border-radius:8px;
  background:var(--card); margin-bottom:14px; }
.panel > h2 { margin:0 0 4px; font-size:16px; font-weight:600; color:var(--ink); }
.panel > .desc { margin:0 0 12px; font-size:13px; color:var(--muted); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:800px){ .grid2{grid-template-columns:1fr} }

.ac-wrap { display:flex; flex-direction:column; gap:16px; }
.ac-title { display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; }
.ac-title h1 { margin:0; font-size:24px; font-weight:600; color:var(--ink); }
.ac-title .sub { font-size:13px; color:var(--muted); }
.ac-card { background:var(--card); border:1px solid var(--rule); border-radius:8px; padding:18px 20px 14px; }
.ac-head { display:flex; align-items:baseline; gap:12px; margin-bottom:12px;
  border-bottom:1px solid var(--rule); padding-bottom:10px; }
.ac-head h2 { margin:0; font-size:16px; font-weight:600; color:var(--ink); }
.ac-head .count { font-size:13px; color:var(--muted); font-family:var(--mono); font-variant-numeric:tabular-nums; }
.ac-head .hint { font-size:12px; color:var(--faint); margin-left:auto; }
.panel-notice { border:1px dashed var(--border); border-radius:8px; padding:14px 16px;
  font-size:13px; color:var(--text); }

/* ── 表单 ── */
form.stack { display:flex; flex-direction:column; gap:10px; max-width:420px; }
form.stack.wide { max-width:none; }
input,textarea,select { border:1px solid var(--border); border-radius:6px; padding:8px 11px;
  background:var(--card-2); color:var(--text); width:100%; font-size:13px; }
input::placeholder { color:var(--faint); }
input:focus,textarea:focus,select:focus { outline:none; border-color:var(--accent); }
/* 自动填充（WebKit autofill）会用不透明黄/白底盖字——强制固定字色与底色 */
input:-webkit-autofill { -webkit-text-fill-color:#eaf6ff; caret-color:#eaf6ff;
  -webkit-box-shadow:0 0 0 1000px #081722 inset; }
button.primary, form .primary { background:var(--accent); border:1px solid var(--accent);
  color:#04241c; font-weight:600; padding:9px 16px; }
button.primary:hover, form .primary:hover { background:#a5f6e0; }
.btn.primary.big, form .primary.big { padding:11px; font-size:15px; }

/* ── 结果条 ── */
.result { margin-top:10px; padding:10px 12px; border:0; background:var(--card-2); border-radius:6px;
  font:12px/1.6 var(--mono); white-space:pre-wrap; word-break:break-all; display:none; color:var(--text); }
.result.show { display:block; }
.result.ok { color:var(--text); }
.result.err { color:var(--neg); }

/* ── 状态 pill ── */
.pill { display:inline-block; padding:1px 8px; border-radius:4px; font-size:12px;
  background:rgba(87,217,166,.12); color:var(--pos); }
.pill.warn { background:rgba(240,192,96,.12); color:var(--amber); }
.pill.bad { background:rgba(255,143,125,.12); color:var(--neg); }

.hint { font-size:12px; color:var(--faint); }
iframe.pdf-frame { width:100%; height:520px; border:1px solid var(--rule); border-radius:8px; background:#fff; }
footer { padding:20px; text-align:center; font-size:12px; color:var(--faint); border-top:1px solid var(--rule); }

/* ── 登录/注册/改密页：同 tokens，纯地面 + 暗卡，无渐变无投影 ── */
.auth-body { background:var(--bg); }
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth-card { width:100%; max-width:400px; padding:32px 28px; border:1px solid var(--rule);
  border-radius:10px; background:var(--card); }
.auth-brand { text-align:center; margin-bottom:22px; }
.auth-brand h1 { margin:12px 0 4px; font-size:20px; font-weight:600; color:var(--ink); }
.auth-brand p { margin:0; font-size:13px; color:var(--muted); }
.brand-mark.lg { width:52px; height:52px; font-size:14px; margin:0 auto; box-shadow:none; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:18px; }
.auth-tab { padding:10px; border:1px solid var(--rule); border-radius:6px;
  background:transparent; color:var(--muted); }
.auth-tab.active { background:var(--card-2); border-color:var(--rule);
  border-bottom:2px solid var(--accent); color:var(--ink); }
.auth-back { text-align:center; margin:16px 0 0; font-size:13px; }

/* ── 39 位码 X/Y/Z 三段分色（色彩只上数据）— Task 1.7/3.5/4.5 ── */
.code-39 { font-family:var(--mono); font-size:18px; letter-spacing:1px; word-break:break-all;
  font-variant-numeric:tabular-nums; }
.seg { padding:2px 6px; border-radius:6px; }
.seg-x { color:#8cf3d4; background:rgba(67,206,162,.12); }
.seg-y { color:#7fc4ff; background:rgba(24,90,157,.25); }
.seg-z { color:#f0c060; background:rgba(217,155,40,.14); }

/* v0.4.1：密码显隐切换 + 注册两步 — T_2026_1002_CN39_AUTH_V2 §2.8 */
.pwd-wrap { position:relative; display:block; }
.pwd-wrap input { width:100%; padding-right:96px; }
.pwd-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%);
  padding:4px 8px; font-size:12px; border:1px solid var(--border); border-radius:6px;
  background:transparent; color:var(--muted); cursor:pointer; }
.pwd-toggle[aria-pressed="true"] { color:var(--accent); border-color:var(--accent); }
#codeRow { display:block; }

/* ── 手机 ── */
@media (max-width:760px) {
  .wrap { padding:14px 16px 40px; }
  .tabs { padding:14px 16px 0; }
  .topbar { padding:10px 16px; }
  .metric { border-top:1px solid var(--rule); }
}
