:root { --ink: #0b1220; --text: #111827; --muted: #64748b; --line: #e2e8f0; --blue: #1d6fe0; --cyan: #22a6dc; --red: #dc2626; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--text); -webkit-font-smoothing: antialiased; }

.auth { display: grid; grid-template-columns: 58fr 42fr; min-height: 100vh; }

/* Left: brand panel */
.hero { position: relative; overflow: hidden; color: #e2e8f0; padding: 44px 48px; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(29,111,224,.38), transparent 60%),
    radial-gradient(700px 480px at 88% 100%, rgba(20,184,166,.16), transparent 60%),
    #070b14; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); }
.hero > * { position: relative; }
.hero-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; color: #fff; letter-spacing: .3px; }
.mark { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 6px 20px rgba(34,166,220,.35); }
.mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.hero-copy { margin: auto 0; max-width: 520px; }
.hero h1 { font-size: 42px; line-height: 1.12; font-weight: 300; margin: 0 0 18px; color: #f8fafc; letter-spacing: -.5px; }
.hero h1 span { font-weight: 650; background: linear-gradient(90deg, #60a5fa, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #94a3b8; font-size: 15px; line-height: 1.6; margin: 0 0 26px; max-width: 440px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.chips div { border: 1px solid rgba(148,163,184,.18); background: rgba(15,23,42,.55); border-radius: 10px; padding: 10px 14px; backdrop-filter: blur(6px); }
.chips small { display: block; font-size: 10.5px; letter-spacing: .9px; text-transform: uppercase; color: #64748b; margin-bottom: 3px; }
.chips strong { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.flow { width: 100%; max-width: 460px; height: auto; }
.flow .node rect { fill: rgba(15,23,42,.8); stroke: rgba(148,163,184,.25); }
.flow .node text { fill: #94a3b8; font-size: 9.5px; text-anchor: middle; font-family: inherit; }
.flow .core rect { fill: rgba(29,111,224,.25); stroke: #38bdf8; }
.flow .core text { fill: #e0f2fe; font-size: 11px; font-weight: 700; }
.hero-foot { margin: 0; font-size: 12px; color: #475569; }

/* Right: form panel */
.panel { background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card { width: 100%; max-width: 380px; }
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.steps span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #e2e8f0; color: var(--muted); }
.steps span.on { background: var(--blue); color: #fff; }
.steps span.done { background: #dcfce7; color: #15803d; }
.steps i { width: 34px; height: 2px; background: #e2e8f0; border-radius: 2px; }
.steps i.on { background: var(--blue); }
h2 { font-size: 24px; font-weight: 400; margin: 0 0 6px; color: var(--ink); letter-spacing: -.2px; }
.lead { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 22px; }
.lead strong { color: var(--text); font-weight: 600; }
label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin: 0 0 6px; }
.field { position: relative; margin-bottom: 16px; }
.field > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: #94a3b8; stroke-width: 1.7; }
input { width: 100%; font: inherit; font-size: 14.5px; color: var(--text); background: #fff; border: 1px solid #dbe3ee; border-radius: 9px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.field input { padding-left: 40px; padding-right: 44px; }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,111,224,.12); }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 6px; }
.eye:hover { background: #f1f5f9; }
.eye svg { width: 17px; height: 17px; fill: none; stroke: #94a3b8; stroke-width: 1.7; display: block; }
input.code { font-family: Consolas, "SFMono-Regular", monospace; font-size: 26px; letter-spacing: 10px; text-align: center; padding: 12px; margin-bottom: 16px; }
.go { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; border: 0; border-radius: 9px; padding: 13px; font: inherit; font-size: 14.5px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 8px 22px rgba(29,111,224,.28); transition: transform .1s, box-shadow .15s, filter .15s; }
.go:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(29,111,224,.36); }
.go:active { transform: translateY(1px); }
.go svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: #94a3b8; font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ms { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #cbd5e1; border-radius: 9px; padding: 12px; background: #fff; color: #1e293b; font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s; }
.ms:hover { border-color: #94a3b8; background: #f8fafc; }
.ms svg { width: 17px; height: 17px; }
.alert { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 13px; border-radius: 9px; padding: 10px 12px; margin-bottom: 16px; }
.back { text-align: center; margin: 16px 0 0; font-size: 13px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--blue); }
.howto { margin: 0 0 16px; padding-left: 18px; color: #334155; font-size: 13.5px; line-height: 1.6; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 18px; text-align: center; }
.qr-img svg { width: 184px; height: 184px; display: block; margin: 0 auto; }
.qr details { margin-top: 10px; text-align: left; }
.qr summary { cursor: pointer; font-size: 12.5px; color: var(--blue); text-align: center; list-style: none; }
.secret { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0 6px; }
.secret span { font-family: Consolas, monospace; font-size: 13px; background: #f1f5f9; border-radius: 6px; padding: 4px 7px; color: var(--ink); }
.hint { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
.secure { display: flex; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.secure svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linejoin: round; margin-top: 1px; }
.secure p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .hero { padding: 28px 24px; min-height: auto; }
  .hero-copy, .hero-foot { display: none; }
}
