/* 手机基础服务 · 内部网站。设计语言与写实人像生图站一致：深色底、柔光、青→靛→紫渐变、玻璃面板。
   不引外部字体和框架；页面不允许内联样式（内容安全策略），所有样式都在这里。 */
:root {
  --bg: #090b11;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --text: #e8ecf5;
  --text-2: #a3acc0;
  --text-3: #6f788c;
  --accent-1: #22d3ee;
  --accent-2: #6366f1;
  --accent-3: #a855f7;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --topbar-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.6; color: var(--text); background: var(--bg);
       -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: #a5b4fc; text-decoration: none; }
a:hover { color: #c7d2fe; }
code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2);
       color: #cbd5f5; border: 1px solid var(--line); }
.hidden { display: none !important; }

/* 背景柔光 */
.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vw 50vh at 6% -8%, rgba(34, 211, 238, .14), transparent 62%),
              radial-gradient(50vw 50vh at 100% 0%, rgba(168, 85, 247, .13), transparent 60%),
              radial-gradient(70vw 60vh at 55% 112%, rgba(99, 102, 241, .14), transparent 62%),
              linear-gradient(180deg, #0a0c13 0%, #080a0f 100%); }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 10px rgba(99, 102, 241, .45)); }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  background: linear-gradient(90deg, #f1f5ff 0%, #c7d2fe 60%, #e9d5ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 登录页 ---------- */
.page-login { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
.login-card { width: min(100%, 392px); padding: 34px 30px 26px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 70px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; text-align: center; }
.login-brand .brand-mark { width: 58px; height: 58px; }
.login-title { margin: 0; font-size: 22px; }
.login-sub { margin: 0; font-size: 13px; color: var(--text-3); }
.login-foot { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- 表单 ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: 13px; color: var(--text-2); }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px;
  background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: rgba(255, 255, 255, .2); }
.input:focus { outline: none; border-color: rgba(103, 232, 249, .7); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; }
.pw-toggle:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-error, .form-ok { margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.form-error { border: 1px solid rgba(248, 113, 113, .32); background: rgba(248, 113, 113, .1); color: #fecaca; }
.form-ok { border: 1px solid rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .1); color: #bbf7d0; }

/* ---------- 按钮 ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: filter .15s, box-shadow .15s, background .15s, transform .08s; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { border-color: transparent; color: #fff; background: var(--accent-grad);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .32), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { background: var(--accent-grad); filter: brightness(1.1); box-shadow: 0 8px 28px rgba(99, 102, 241, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-lg { height: 48px; padding: 0 18px; font-size: 16px; font-weight: 600; border-radius: 12px; }
.btn-block { display: flex; width: 100%; margin-top: 6px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; height: var(--topbar-h);
  padding: 0 max(20px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 19, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.nav { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 12px; border-radius: 9px; color: var(--text-2); white-space: nowrap; font-size: 14px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: rgba(99, 102, 241, .18); color: #e0e7ff; box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .35); }
.userbox { display: flex; align-items: center; gap: 10px; flex: none; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-grad);
  color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.userbox form { margin: 0; }

/* ---------- 页面 ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 26px 24px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: .02em; }
.meta { color: var(--text-3); font-size: 13px; }
.meta b { color: var(--text-2); font-weight: 600; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 12px; }
.section-title h2 { margin: 0; font-size: 17px; }
.notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, .3);
  background: rgba(251, 191, 36, .08); color: #fde68a; font-size: 13px; }
.notice ul { margin: 0; padding-left: 18px; }

/* 玻璃面板 */
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .022));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 40px rgba(0, 0, 0, .28); }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.stat { position: relative; padding: 18px 20px; overflow: hidden; }
.stat .stat-icon { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; padding: 7px; border-radius: 10px;
  background: rgba(99, 102, 241, .14); color: #a5b4fc; }
.stat .stat-label { color: var(--text-2); font-size: 13px; }
.stat .stat-value { margin-top: 6px; font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.stat .stat-value.is-time { font-size: 26px; padding-top: 4px; }
.stat .stat-value small { margin-left: 4px; font-size: 14px; font-weight: 500; color: var(--text-3); }
.stat .stat-hint { margin-top: 8px; color: var(--text-3); font-size: 12.5px; }

/* 卡片网格：开发板、手机 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.item { padding: 18px 20px 16px; }
.item-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.item-no { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent-grad);
  color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 6px 18px rgba(99, 102, 241, .35); }
.item-no.phone { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.item-no.pc { background: linear-gradient(135deg, #14b8a6, #6366f1); }
.item-no .icon { width: 20px; height: 20px; }
.item-title { min-width: 0; flex: 1; }
.item-title b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-title span { color: var(--text-3); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.kv code { display: inline-block; max-width: 100%; font-size: 12px; overflow-wrap: anywhere; }
.sub { color: var(--text-3); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.chip.good { color: var(--text); }
.chip.good::before { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.chip.bad::before { background: var(--bad); }

/* 状态标签 */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.good { color: var(--ok); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .28); }
.pill.warn { color: var(--warn); background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .28); }
.pill.bad { color: var(--bad); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .28); }
.pill.good::before { box-shadow: 0 0 8px var(--ok); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-3); font-weight: 600; font-size: 12.5px; white-space: nowrap; background: rgba(255, 255, 255, .02); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.ok { color: var(--ok); } .fail { color: var(--bad); }

/* 手机任务明细 */
.phone-block { margin-top: 18px; }
.phone-block .block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); }
.phone-block .block-head h2 { margin: 0; font-size: 16px; }
.structure th, .structure td { white-space: nowrap; }

/* 文档 */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.doc { padding: 10px 34px 30px; }
.doc h1 { font-size: 24px; margin: 22px 0 14px; }
.doc h2 { font-size: 19px; margin: 30px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 22px 0 10px; color: #e0e7ff; }
.doc p, .doc li { color: #d3d9e6; }
.doc-table { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.doc-table table { margin: 0; }
.doc th { background: rgba(99, 102, 241, .1); color: #c7d2fe; }
.doc pre { margin: 12px 0; padding: 14px 16px; border-radius: 12px; overflow-x: auto; background: rgba(0, 0, 0, .38);
  border: 1px solid var(--line); }
.doc pre code { padding: 0; border: 0; background: transparent; color: #dbe4ff; font-size: 12.5px; }
.doc blockquote { margin: 12px 0; padding: 8px 16px; border-left: 3px solid #6366f1; background: rgba(99, 102, 241, .08);
  border-radius: 0 10px 10px 0; color: var(--text-2); }
.doc-list { list-style: none; margin: 0; padding: 6px 0; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list a { font-weight: 600; }

/* 账号 */
.narrow { max-width: 440px; padding: 24px 26px; }

@media (max-width: 760px) {
  /* 手机上顶栏分两行：品牌和账号一行，导航单独一行可左右滑 */
  .topbar { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 10px 12px 8px; }
  .topbar .brand-title { display: inline; font-size: 15px; }
  .userbox { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -12px; padding: 0 12px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .container { padding: 18px 14px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .stat-icon { top: 12px; right: 12px; width: 28px; height: 28px; padding: 5px; }
  .stat .stat-value { font-size: 24px; }
  .stat .stat-value.is-time { font-size: 19px; }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 76px 1fr; }
  .doc { padding: 6px 18px 22px; }
  /* 窄屏表格不硬挤：每列留够宽度、代码不折行，放不下就左右滑 */
  .doc-table th, .doc-table td { min-width: 5.5em; }
  .doc-table code { white-space: nowrap; }
  .input { font-size: 16px; }
  .userbox .who { display: none; }
}
