:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #66716b;
  --line: #dce3df;
  --surface: #ffffff;
  --soft: #f4f7f5;
  --brand: #1d7a52;
  --brand-strong: #145b3d;
  --warm: #c86d2d;
  --danger: #b64040;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: #f7f9f8; letter-spacing: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-rows: 72px 1fr 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--brand); font-size: 18px; }
.top-note { color: var(--muted); font-size: 13px; }
.main { display: grid; place-items: center; padding: 32px 24px; }
.login-layout { width: min(940px, 100%); display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 56px; align-items: center; }
.intro h1 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; font-weight: 750; }
.intro p { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.feature-list { display: grid; gap: 15px; margin-top: 34px; }
.feature { display: flex; gap: 12px; align-items: flex-start; color: #39443e; }
.feature-bullet { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border: 1px solid #b6c7bd; border-radius: 50%; color: var(--brand); font-size: 12px; }
.qr-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px; box-shadow: 0 18px 50px rgba(31,52,41,.08); text-align: center; }
.qr-panel h2 { margin: 0; font-size: 22px; }
.qr-panel .sub { margin: 8px 0 22px; color: var(--muted); font-size: 14px; }
.qr-frame { width: 282px; height: 282px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; place-items: center; background: white; position: relative; }
.qr-frame img { width: 100%; height: 100%; display: block; }
.qr-placeholder { color: var(--muted); font-size: 14px; }
.qr-overlay { position: absolute; inset: 12px; display: none; place-items: center; background: rgba(255,255,255,.94); color: var(--ink); }
.qr-overlay.show { display: grid; }
.status { min-height: 26px; margin: 18px 0 12px; color: var(--muted); font-size: 14px; }
.status.active { color: var(--brand-strong); font-weight: 650; }
.status.error { color: var(--danger); }
.refresh { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.refresh:hover { border-color: #9cb2a5; background: var(--soft); }
.privacy { margin-top: 18px; color: #8a938e; font-size: 12px; line-height: 1.6; }
.footer { display: grid; place-items: center; color: #8a938e; font-size: 12px; }

.mobile-shell { min-height: 100vh; padding: 20px; background: #f6f8f7; }
.mobile-card { width: min(480px, 100%); margin: 24px auto; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 26px; }
.mobile-card h1 { margin: 22px 0 8px; font-size: 27px; }
.mobile-card p { color: var(--muted); line-height: 1.7; }
.identity { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 14px; background: var(--soft); border-left: 3px solid var(--brand); }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-weight: 700; }
.role-title { margin: 26px 0 10px; font-weight: 700; }
.roles { display: grid; gap: 10px; }
.role-option { display: grid; grid-template-columns: 42px 1fr 20px; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; }
.role-option.selected { border-color: var(--brand); background: #f2f8f4; }
.role-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; background: #e7f1eb; color: var(--brand-strong); font-weight: 700; }
.role-name { display: block; font-weight: 700; }
.role-desc { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.radio-dot { width: 18px; height: 18px; border: 2px solid #a7b4ad; border-radius: 50%; position: relative; }
.selected .radio-dot { border-color: var(--brand); }
.selected .radio-dot::after { content: ""; position: absolute; inset: 3px; background: var(--brand); border-radius: 50%; }
.primary { width: 100%; min-height: 48px; margin-top: 22px; border: 0; border-radius: 7px; color: white; background: var(--brand); font-weight: 700; }
.primary:disabled { cursor: not-allowed; opacity: .45; }
.primary:not(:disabled):hover { background: var(--brand-strong); }
.mobile-message { padding: 30px 0; text-align: center; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { padding: 24px 18px; color: white; background: #20352b; }
.sidebar .brand { margin-bottom: 36px; }
.nav-item { padding: 11px 12px; margin-bottom: 5px; border-radius: 6px; color: #cedbd4; }
.nav-item.active { color: white; background: #315443; }
.content { padding: 36px; }
.content h1 { margin: 0 0 8px; font-size: 30px; }
.content > p { margin-top: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin-top: 9px; font-size: 28px; font-weight: 750; }

@media (max-width: 780px) {
  .top-note, .intro { display: none; }
  .login-layout { display: block; width: min(380px, 100%); }
  .qr-panel { padding: 22px 18px; }
  .qr-frame { width: min(282px, 80vw); height: min(282px, 80vw); }
  .stats { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 24px; }
}
