:root{
  --ink:#0f172a; --muted:#64748b; --line:#e2e8f0; --bg:#f4f6fb;
  --brand:#2563eb; --brand-dark:#1d4ed8; --good:#16a34a; --bad:#dc2626;
  --radius:12px;
}
*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Sarabun",Arial,sans-serif;
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:32px 16px;
}
.wrap{width:100%; max-width:420px}
.brand{font-weight:700; font-size:20px; text-align:center; margin-bottom:18px; letter-spacing:.02em}
.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:28px 26px; box-shadow:0 1px 3px rgba(15,23,42,.06);
}
h1{font-size:20px; margin:0 0 6px}
.sub{color:var(--muted); font-size:14px; margin:0 0 20px}
label{display:block; font-size:13px; font-weight:600; margin:14px 0 6px}
input[type=text],input[type=email],input[type=password]{
  width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:8px;
  font-size:15px; outline:none; transition:border-color .15s;
}
input:focus{border-color:var(--brand)}
.btn{
  display:block; width:100%; padding:12px; margin-top:20px; border:0; border-radius:8px;
  background:var(--brand); color:#fff; font-size:15px; font-weight:600; cursor:pointer;
  text-align:center; text-decoration:none;
}
.btn:hover{background:var(--brand-dark)}
.btn-outline{
  background:#fff; color:var(--ink); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.btn-outline:hover{background:#f8fafc}
.btn-outline svg{flex:none}
.divider{display:flex; align-items:center; gap:10px; margin:20px 0; color:var(--muted); font-size:12px}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
.links{margin-top:18px; text-align:center; font-size:14px; color:var(--muted)}
.links a{color:var(--brand); text-decoration:none}
.links a:hover{text-decoration:underline}
.foot-link{margin-top:6px}
.alert{padding:11px 14px; border-radius:8px; font-size:13.5px; margin-bottom:16px; line-height:1.5}
.alert-success{background:#f0fdf4; color:#166534; border:1px solid #bbf7d0}
.alert-error{background:#fef2f2; color:#991b1b; border:1px solid #fecaca}
.errors{margin:0 0 16px; padding-left:18px; color:var(--bad); font-size:13.5px}
.errors li{margin:3px 0}
.hint{color:var(--muted); font-size:12.5px; margin-top:6px}
.avatar{width:56px; height:56px; border-radius:50%; object-fit:cover; display:block; margin:0 auto 14px}
.center{text-align:center}
.field-row{display:flex; justify-content:space-between; align-items:center}
.field-row a{font-size:12.5px; color:var(--brand); text-decoration:none}
.field-row a:hover{text-decoration:underline}
dl.meta{margin:18px 0 0; font-size:14px}
dl.meta dt{color:var(--muted); font-size:12px; margin-top:10px}
dl.meta dd{margin:2px 0 0; font-weight:600}
