:root {
  color-scheme: dark;
  --bg: #05080d;
  --panel: rgba(10, 15, 24, .86);
  --line: rgba(151, 167, 192, .14);
  --text: #eef2f8;
  --muted: #8e98aa;
  --accent: #ff5c3d;
  --accent-2: #f4a214;
  --good: #67e59a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 78, 43, .12), transparent 34%),
    radial-gradient(circle at 15% 85%, rgba(35, 72, 120, .12), transparent 32%),
    linear-gradient(145deg, #04070c, #080c13 50%, #05070b);
}
#authCanvas { position: fixed; inset: 0; pointer-events: none; }
.auth-grain { position: fixed; inset: 0; pointer-events: none; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E"); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; position: relative; }
.auth-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 23, 34, .92), rgba(7, 11, 18, .94));
  box-shadow: 0 32px 100px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(24px);
}
.auth-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-brand > span:last-child { display: grid; gap: 2px; letter-spacing: .16em; }
.auth-brand b { font-size: 14px; }
.auth-brand small { color: var(--muted); font-size: 9px; }
.auth-orbit { width: 42px; height: 42px; border: 1px solid rgba(255,92,61,.6); border-radius: 50%; display: grid; place-items: center; position: relative; box-shadow: 0 0 24px rgba(255,74,42,.18); }
.auth-orbit::before { content: ""; width: 18px; height: 18px; border: 2px solid #ff8a2d; border-radius: 50%; box-shadow: 0 0 16px rgba(255,94,43,.55); }
.auth-orbit i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: orbit 3.8s linear infinite; transform-origin: 0 20px; top: 1px; left: 19px; }
.auth-orbit u { position: absolute; inset: 5px; border: 1px dashed rgba(255,255,255,.12); border-radius: 50%; text-decoration: none; }
@keyframes orbit { to { transform: rotate(360deg); } }
.auth-lock-state { display: flex; gap: 14px; align-items: flex-start; margin: 24px 0 18px; }
.auth-lock-state > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: #ffb02e; background: rgba(255,102,38,.1); border: 1px solid rgba(255,100,40,.22); }
.auth-lock-state b { display: block; font-size: 18px; margin: 1px 0 5px; }
.auth-lock-state p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-lock-state.blocked > span { color: #ff765f; }
.auth-error { margin: 0 0 16px; padding: 11px 13px; border: 1px solid rgba(255,83,67,.28); border-radius: 11px; background: rgba(125,24,22,.16); color: #ffaaa0; font-size: 12px; line-height: 1.45; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; color: #aeb7c6; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.auth-form input { width: 100%; border: 1px solid rgba(151,167,192,.16); border-radius: 11px; outline: none; background: rgba(4,8,14,.68); color: var(--text); padding: 13px 14px; font: inherit; font-size: 14px; box-shadow: inset 0 1px rgba(255,255,255,.025); transition: border-color .18s, box-shadow .18s; }
.auth-form input:focus { border-color: rgba(255,97,55,.65); box-shadow: 0 0 0 3px rgba(255,83,45,.09); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 36px; border: 0; border-radius: 8px; color: #7e899a; background: transparent; cursor: pointer; }
.password-field button:hover, .password-field button.active { color: #ff9d42; background: rgba(255,100,40,.08); }
#capsLockHint { color: #ffb15a; text-transform: none; letter-spacing: 0; }
.auth-submit { margin-top: 5px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border: 1px solid rgba(255,114,36,.46); border-radius: 12px; color: white; font-weight: 700; cursor: pointer; background: linear-gradient(115deg, #d92828, #ed5d21 54%, #d9890b); box-shadow: 0 12px 30px rgba(180,39,20,.2); }
.auth-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-submit i { font-style: normal; font-size: 20px; }
.auth-footer { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-footer > span { display: flex; align-items: center; gap: 7px; }
.auth-footer > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px rgba(103,229,154,.7); }
.auth-footer details { margin-top: 14px; }
.auth-footer summary { cursor: pointer; color: #9da7b7; }
.auth-footer p { margin: 9px 0 7px; }
.auth-footer code, .auth-help code { display: block; overflow-wrap: anywhere; padding: 9px 10px; border-radius: 8px; background: rgba(0,0,0,.24); color: #d9e0ea; text-transform: none; }
.auth-help { color: var(--muted); font-size: 13px; line-height: 1.55; }
@media (max-width: 540px) { .auth-shell { padding: 14px; } .auth-card { padding: 22px 18px; border-radius: 18px; } }
@media (prefers-reduced-motion: reduce) { .auth-orbit i { animation: none; } .auth-submit { transition: none; } }
