/*! mow.kim 首页登入页 · Graphite Minimal（UPG-202）
 * token 源 = 设计师/设计/mowkim首页-stitch/DESIGN.md（与 203 portal.css 同族·独立文件）
 * 零外链：无 CDN、无字体外链（系统字体栈）、图标=内联 SVG
 */
:root {
  --surface: #f9f9f9;
  --surface-bright: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #444748;
  --outline: #747878;
  --ink-muted: #6a6d6d;
  --outline-variant: #c4c7c7;
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1a1c1c;
  --success: #0a7d33;
  --danger: #b3261e;
  --radius-card: 14px;
  --radius-btn: 8px;
  --radius-full: 999px;
  --font-head: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, .04);
  --shadow-float: 0 8px 32px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 15px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ── 顶栏 ─────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(249, 249, 249, .84);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline-variant);
}
.header-inner {
  height: 56px; max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--on-surface); }
.brand-mark { width: 32px; height: 32px; object-fit: contain; display: block; }
.brand-word { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--on-surface-variant); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14px; color: var(--on-surface-variant); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--on-surface); }
.btn-login-pill {
  display: inline-flex; align-items: center; padding: 7px 16px; border-radius: var(--radius-full);
  background: var(--primary); color: var(--on-primary); font-size: 14px; font-weight: 500; text-decoration: none;
}
.btn-login-pill:hover { background: var(--primary-container); }

/* ── 主区：居中登入卡 ─────────────────────────────── */
.stage { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 15vh 16px 48px; }
.card {
  width: 100%; max-width: 420px; background: var(--surface-bright); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 32px; position: relative; overflow: hidden;
}
.brand-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 26px; }
.brand-orb { width: 48px; height: 48px; object-fit: contain; display: block; margin-bottom: 12px; }
h1 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.subtitle { font-size: 12px; color: var(--ink-muted); margin: 0; }

/* 身份模拟（预演件·仅 ?preview=1） */
.sim-row { display: none; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius-btn); background: var(--surface-container-low); align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
body.preview-on .sim-row { display: flex; }
.sim-row label { color: var(--on-surface-variant); font-weight: 600; }
.sim-row select { background: var(--surface-bright); color: var(--on-surface); padding: 5px 8px; border: 0; border-radius: 6px; font-size: 12px; cursor: pointer; }

/* 表单 */
form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; height: 44px; border: 0; border-radius: var(--radius-btn);
  background: var(--surface-container); color: var(--on-surface);
  font-family: var(--font-body); font-size: 14px; padding: 0 14px; outline: none;
}
.input::placeholder { color: #9a9d9d; }
.input:focus { box-shadow: 0 0 0 2px var(--primary) inset; }
.input.mono { font-family: var(--font-mono); letter-spacing: .16em; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; }
.btn-code {
  flex: 0 0 auto; height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-btn);
  background: var(--surface-container-highest); color: var(--on-surface); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-code:hover { background: var(--surface-container-high); }
.btn-code:disabled { opacity: .5; cursor: not-allowed; }

.notice { display: none; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius-btn); background: #fdeeec; color: #7a1712; font-size: 12px; }
.notice.show { display: flex; }
.notice.ok { background: #eef8f1; color: #0a5c2b; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px; margin-top: 8px; border: 0; border-radius: var(--radius-btn);
  background: var(--primary); color: var(--on-primary); font-family: var(--font-body);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary:hover { background: var(--primary-container); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.hint { text-align: center; font-size: 11px; color: var(--ink-muted); margin: 2px 0 0; }

/* 无角色弹层 */
.no-role { position: absolute; inset: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); z-index: 20; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.no-role.show { display: flex; }
.no-role .icon { width: 44px; height: 44px; border-radius: 50%; background: #fdeeec; color: var(--danger); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.no-role h2 { font-size: 17px; margin: 0 0 6px; }
.no-role p { font-size: 12px; color: var(--ink-muted); margin: 0 0 22px; }
.no-role .actions { display: flex; gap: 10px; width: 100%; }
.no-role .actions .btn-ghost { flex: 1; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px;
  border: 0; border-radius: var(--radius-btn); background: var(--surface-container); color: var(--on-surface);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { background: var(--surface-container-high); }
.btn-ghost.solid { background: var(--primary); color: var(--on-primary); }
.btn-ghost.solid:hover { background: var(--primary-container); }

/* 跳转遮罩 */
.redirect { position: absolute; inset: 0; background: rgba(255,255,255,.97); z-index: 30; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.redirect.show { display: flex; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.redirect p { font-size: 14px; font-weight: 600; margin: 0; }

/* 官网行 + 法务页脚 */
.official-line { margin-top: 22px; text-align: center; font-size: 12px; color: var(--ink-muted); }
.official-line a { color: var(--on-surface); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: 26px; text-align: center; font-size: 11px; color: var(--ink-muted); }
.legal a { color: var(--ink-muted); }

/** 建设中页 */
.construction { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 20px 60px; }
.construction .badge { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; }
.construction h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 10px; }
.construction p { color: var(--on-surface-variant); font-size: 14px; margin: 0 0 6px; }
.construction .actions { display: flex; gap: 12px; margin-top: 24px; }
.construction .btn-ghost { height: 40px; padding: 0 18px; }
.site-foot { border-top: 1px solid var(--outline-variant); margin-top: auto; }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 22px 24px 30px; text-align: center; font-size: 12px; color: var(--ink-muted); }
.foot-in a { color: var(--ink-muted); }
.foot-in .beian { height: 13px; vertical-align: middle; margin-right: 3px; }

@media (max-width: 760px) {
  .nav { gap: 16px; }
  .brand-sub { display: none; }
  .header-inner { padding: 0 16px; }
  .stage { padding-top: 11vh; }
  .card { padding: 26px 20px; }
  .legal { font-size: 10px; }
}
