/* LOG11DX auth pages (login / register / forgot / reset) — globe theme */
@property --auth-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --a-bg: #050a17;
  --a-ink: #e2e8f0;
  --a-muted: #94a3b8;
  --a-dim: #64748b;
  --a-cyan: #38bdf8;
  --a-cyan-2: #22d3ee;
  --a-amber: #fbbf24;
  --a-green: #34d399;
  --a-red: #f87171;
  --a-field: rgba(2, 6, 23, .55);
  --a-line: rgba(148, 163, 184, .2);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.auth-body {
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.auth-body a { color: var(--a-cyan); }

/* ---------- background ---------- */
#authGlobe { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.auth-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(3, 6, 14, .7) 100%);
}

/* ---------- top bar ---------- */
.auth-top { position: fixed; top: 0; left: 0; right: 0; z-index: 3; padding: 16px 24px; pointer-events: none; }
.auth-brand { display: inline-block; pointer-events: auto; transition: transform .25s, filter .25s; }
.auth-brand img { display: block; width: 64px; height: 64px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .6)); }
.auth-brand:hover { transform: scale(1.05); filter: brightness(1.1); }

/* ---------- layout (Orbit: card centred on the globe) ---------- */
.auth-stage {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 90px 16px 36px;
}
.auth-live, .auth-ticker { text-shadow: 0 2px 16px rgba(5, 10, 23, .95), 0 0 2px rgba(5, 10, 23, .9); }
.auth-live { display: flex; justify-content: center; gap: 36px; text-align: center; animation: auth-fadeup 1s .35s both; }
.auth-live > div { font-size: 12px; color: var(--a-muted); }
.auth-live strong { display: block; font-size: 22px; color: var(--a-ink); font-variant-numeric: tabular-nums; margin-top: 2px; }
@keyframes auth-fadeup { from { opacity: 0; transform: translateY(12px); } }
.auth-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px;
  animation: auth-ping 1.6s infinite;
}
@keyframes auth-ping {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}
.auth-ticker {
  margin-top: -10px; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #cbd5e1; min-height: 1.4em; max-width: min(520px, 92vw); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-ticker b { color: var(--a-amber); font-weight: 600; }
.auth-ticker .tk-in { display: inline-block; animation: auth-tick .5s ease both; }
@keyframes auth-tick { from { opacity: 0; transform: translateY(8px); } }

/* ---------- card ---------- */
.auth-card {
  position: relative; width: min(420px, calc(100vw - 32px)); margin: 0 auto;
  padding: 30px 30px 24px; border-radius: 22px;
  background: rgba(8, 15, 32, .6);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: auth-rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--auth-ang), rgba(148,163,184,.14) 0 60%, var(--a-cyan) 75%, var(--a-amber) 85%, rgba(148,163,184,.14) 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: auth-spin 6s linear infinite;
}
.auth-card.is-shaking { animation: auth-rise .9s cubic-bezier(.2, .8, .2, 1) both, auth-shake .5s .75s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes auth-spin { to { --auth-ang: 360deg; } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes auth-fade { from { opacity: 0; transform: translateX(-16px); } }
@keyframes auth-shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); }
}

.auth-logo { display: block; max-width: 150px; height: auto; margin: 0 auto 14px; }
.auth-card h2 { margin: 0 0 4px; font-size: 24px; font-weight: 750; text-align: center; }
.auth-card .auth-sub { margin: 0 0 22px; color: var(--a-muted); font-size: 14px; text-align: center; line-height: 1.5; }

/* ---------- alerts ---------- */
.auth-alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: 12px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.45; border: 1px solid; animation: auth-rise .45s both;
}
.auth-alert i { font-size: 16px; line-height: 1.3; }
.auth-alert a { color: inherit; font-weight: 600; }
.auth-alert--error   { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.auth-alert--warn    { background: rgba(251, 191, 36, .1);  border-color: rgba(251, 191, 36, .35);  color: #fde68a; }
.auth-alert--success { background: rgba(52, 211, 153, .1);  border-color: rgba(52, 211, 153, .35);  color: #a7f3d0; }
.auth-alert ul { margin: 0; padding-left: 18px; }

/* ---------- floating-label fields ---------- */
.auth-field { position: relative; margin-bottom: 14px; }
.auth-field input {
  width: 100%; height: 54px; padding: 20px 46px 6px 14px;
  font-size: 15px; color: var(--a-ink); border-radius: 12px;
  background: var(--a-field); border: 1px solid var(--a-line); outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
  font-family: inherit;
}
/* Browser autofill: stop Chrome/Edge/Firefox painting a light box with unreadable white text */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--a-ink) !important;
  -webkit-box-shadow: 0 0 0 1000px #0a1326 inset !important;
  box-shadow: 0 0 0 1000px #0a1326 inset !important;
  caret-color: var(--a-ink);
  transition: background-color 99999s ease-out 0s;
}
.auth-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0a1326 inset, 0 0 0 4px rgba(56, 189, 248, .13) !important;
  box-shadow: 0 0 0 1000px #0a1326 inset, 0 0 0 4px rgba(56, 189, 248, .13) !important;
}
.auth-field input:autofill { background: #0a1326 !important; color: var(--a-ink) !important; filter: none; }
.auth-field label {
  position: absolute; left: 15px; top: 17px; font-size: 15px; color: var(--a-muted);
  pointer-events: none; transition: top .2s, font-size .2s, color .2s, letter-spacing .2s;
}
.auth-field input:focus { border-color: rgba(56, 189, 248, .65); box-shadow: 0 0 0 4px rgba(56, 189, 248, .13); background: rgba(2, 6, 23, .7); }
.auth-field input:focus + label,
.auth-field input:not(:placeholder-shown) + label,
.auth-field input:-webkit-autofill + label { top: 7px; font-size: 11px; color: var(--a-cyan); letter-spacing: .04em; }
.auth-field.is-callsign input { text-transform: uppercase; letter-spacing: .08em; }
.auth-field.is-invalid input { border-color: rgba(248, 113, 113, .6); }

.auth-hint { font-size: 12px; color: var(--a-dim); margin: -8px 2px 14px; line-height: 1.45; min-height: 1em; transition: color .2s; }
.auth-hint.ok { color: var(--a-green); }
.auth-hint.warn { color: var(--a-amber); }
.auth-hint.bad { color: var(--a-red); }
.auth-hint a { color: inherit; font-weight: 600; }

.auth-lock {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%) scale(.6);
  width: 18px; height: 18px; border-radius: 50%; opacity: 0; transition: .3s;
  border: 2px solid var(--a-green);
}
.auth-lock::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--a-green);
}
.auth-field.is-locked .auth-lock { opacity: 1; transform: translateY(-50%) scale(1); animation: auth-lock 1.8s infinite; }
@keyframes auth-lock { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }

.auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent;
  color: var(--a-muted); font-size: 17px; cursor: pointer; transition: .2s;
}
.auth-eye svg { width: 20px; height: 20px; display: block; margin: auto; }
.auth-eye .eye-off { display: none; }
.auth-eye[aria-pressed="true"] .eye-on { display: none; }
.auth-eye[aria-pressed="true"] .eye-off { display: block; }
.auth-eye:hover, .auth-eye:focus-visible { color: var(--a-ink); background: rgba(148, 163, 184, .12); outline: none; }

/* ---------- S-meter (password strength) ---------- */
.auth-smeter { display: flex; gap: 3px; align-items: flex-end; height: 18px; margin: -4px 2px 4px; }
.auth-smeter i { flex: 1; height: 35%; background: rgba(148, 163, 184, .15); border-radius: 2px; transition: background .25s, height .25s; }
.auth-smeter i.on { background: var(--c); height: var(--h); box-shadow: 0 0 8px var(--c); }
.auth-smeter-l { display: flex; justify-content: space-between; font: 11px ui-monospace, monospace; color: var(--a-dim); margin: 0 2px 16px; }

/* ---------- checkbox ---------- */
.auth-check { display: flex; align-items: center; gap: 10px; margin: 4px 2px 18px; font-size: 14px; color: var(--a-muted); cursor: pointer; user-select: none; }
.auth-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auth-check .box {
  width: 38px; height: 22px; border-radius: 999px; background: rgba(148, 163, 184, .22);
  position: relative; transition: .25s; flex: none;
}
.auth-check .box::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #cbd5e1; transition: .25s cubic-bezier(.3, 1.4, .5, 1);
}
.auth-check input:checked + .box { background: rgba(56, 189, 248, .55); }
.auth-check input:checked + .box::after { left: 19px; background: #fff; }
.auth-check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(56, 189, 248, .35); }

/* ---------- button ---------- */
.auth-btn {
  position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; overflow: hidden;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; color: #03121f; letter-spacing: .02em;
  background: linear-gradient(90deg, var(--a-cyan), var(--a-cyan-2));
  box-shadow: 0 10px 30px rgba(56, 189, 248, .25);
  transition: transform .15s, box-shadow .25s, filter .25s;
}
.auth-btn:hover { box-shadow: 0 12px 36px rgba(56, 189, 248, .4); filter: brightness(1.06); }
.auth-btn:active { transform: scale(.985); }
.auth-btn:focus-visible { outline: 3px solid rgba(56, 189, 248, .5); outline-offset: 3px; }
.auth-btn .lbl { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.auth-btn .rip {
  position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9);
  transform: translate(-50%, -50%); animation: auth-tx .9s ease-out forwards; pointer-events: none;
}
@keyframes auth-tx { from { width: 0; height: 0; opacity: 1; } to { width: 520px; height: 520px; opacity: 0; } }
.auth-btn.is-busy .lbl::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(3, 18, 31, .35); border-top-color: #03121f; animation: auth-rot .7s linear infinite;
}
@keyframes auth-rot { to { transform: rotate(360deg); } }

.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 13px; flex-wrap: wrap; }
.auth-links a { color: var(--a-muted); text-decoration: none; transition: color .2s; display: inline-flex; gap: 6px; align-items: center; }
.auth-links a:hover { color: var(--a-cyan); }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12px; color: var(--a-dim); }
.auth-foot a { color: var(--a-muted); text-decoration: none; }


/* ---------- register: steps ---------- */
.auth-steps { list-style: none; display: flex; justify-content: space-between; gap: 6px; margin: 0 0 20px; padding: 0; position: relative; counter-reset: s; }
.auth-steps::before { content: ""; position: absolute; left: 14%; right: 14%; top: 13px; height: 2px; background: rgba(148, 163, 184, .18); }
.auth-steps::after { content: ""; position: absolute; left: 14%; top: 13px; height: 2px; width: calc(72% * var(--p, 0));
  background: linear-gradient(90deg, var(--a-cyan), var(--a-amber)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.auth-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--a-dim); position: relative; z-index: 1; transition: color .3s; }
.auth-steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: #0b1428; border: 2px solid rgba(148, 163, 184, .25); color: var(--a-muted); transition: .35s; }
.auth-steps li.is-done span { background: #0c2c44; border-color: var(--a-cyan); color: transparent; position: relative; }
.auth-steps li.is-done span::after { content: ""; position: absolute; left: 8px; top: 5px; width: 6px; height: 11px;
  border: solid var(--a-cyan); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.auth-steps li.is-on { color: var(--a-ink); }
.auth-steps li.is-on span { background: var(--a-cyan); border-color: var(--a-cyan); color: #03121f; box-shadow: 0 0 0 5px rgba(56, 189, 248, .16); }
.auth-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.js-steps .auth-step { display: none; }
.js-steps .auth-step.is-active { display: block; animation: auth-stepin .45s cubic-bezier(.2, .8, .2, 1) both; }
.js-steps .auth-step.is-active.from-left { animation-name: auth-stepin-l; }
@keyframes auth-stepin { from { opacity: 0; transform: translateX(24px); } }
@keyframes auth-stepin-l { from { opacity: 0; transform: translateX(-24px); } }
.auth-step + .auth-step { margin-top: 18px; }
.js-steps .auth-step + .auth-step { margin-top: 0; }
.auth-step-nav { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.auth-step-nav .auth-btn { flex: 1; }
.auth-back { height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--a-line); background: transparent; color: var(--a-muted);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: .2s; }
.auth-back:hover { color: var(--a-ink); border-color: rgba(148, 163, 184, .45); }
.auth-note { font-size: 13px; color: var(--a-muted); margin: 0 2px 14px; line-height: 1.5; }
.auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-row2 .auth-field input { padding-right: 12px; }
.auth-captcha { display: flex; justify-content: center; margin: 4px 0 16px; min-height: 78px; }
@media (max-width: 360px) { .auth-captcha { transform: scale(.9); transform-origin: center; } }

/* geolocation button */
.auth-geo { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; cursor: pointer;
  border: 1px dashed rgba(56, 189, 248, .45); background: rgba(56, 189, 248, .06); color: #bae6fd; font-family: inherit; font-size: 14px; font-weight: 600; text-align: left; transition: .25s; }
.auth-geo:hover { background: rgba(56, 189, 248, .12); border-style: solid; }
.auth-geo-ic { width: 22px; height: 22px; flex: none; border-radius: 50%; position: relative; border: 2px solid var(--a-cyan); }
.auth-geo-ic::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--a-cyan); }
.auth-geo.is-busy .auth-geo-ic { animation: auth-lock 1s infinite; }
.auth-geo.is-ok { border-style: solid; border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .08); color: #a7f3d0; }
.auth-geo.is-ok .auth-geo-ic { border-color: var(--a-green); } .auth-geo.is-ok .auth-geo-ic::after { background: var(--a-green); }
.auth-geo.is-err { border-color: rgba(251, 191, 36, .5); color: #fde68a; }

.auth-field.is-bad input { border-color: rgba(248, 113, 113, .65); box-shadow: 0 0 0 4px rgba(248, 113, 113, .1); }
.auth-card--wide { width: min(440px, calc(100vw - 32px)); }

html:not(.auth-js) [data-next], html:not(.auth-js) [data-prev] { display: none; }
/* With JS on, show only the starting step from the very first paint (no layout jump while the script loads) */
.auth-js [data-steps-form] .auth-step { display: none; }
.auth-js [data-steps-form][data-start-step="1"] .auth-step[data-step="1"],
.auth-js [data-steps-form][data-start-step="2"] .auth-step[data-step="2"],
.auth-js [data-steps-form][data-start-step="3"] .auth-step[data-step="3"] { display: block; }
.auth-js [data-steps-form].js-steps .auth-step { display: none; }
.auth-js [data-steps-form].js-steps .auth-step.is-active { display: block; }
.auth-js .auth-step + .auth-step { margin-top: 0; }
.auth-card.is-nudge { animation: auth-rise 0s both, auth-shake .45s cubic-bezier(.36, .07, .19, .97) both; }

/* ---------- "sent" / success badge ---------- */
.auth-sent { position: relative; width: 84px; height: 84px; margin: 4px auto 16px; display: grid; place-items: center; }
.auth-sent i { position: relative; z-index: 1; font-size: 30px; color: var(--a-cyan); width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(56, 189, 248, .14); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .45); animation: auth-pop .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.auth-sent span { position: absolute; inset: 10px; border-radius: 50%; border: 2px solid rgba(56, 189, 248, .55); animation: auth-wave 2.4s ease-out infinite; }
.auth-sent span:nth-child(2) { animation-delay: .8s; } .auth-sent span:nth-child(3) { animation-delay: 1.6s; }
.auth-sent--ok i { color: var(--a-green); background: rgba(52, 211, 153, .14); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .45); }
.auth-sent--ok span { border-color: rgba(52, 211, 153, .55); }
@keyframes auth-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes auth-wave { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.1); opacity: 0; } }
a.auth-btn--link { display: flex; align-items: center; justify-content: center; text-decoration: none; color: #03121f; }

/* ---------- responsive / a11y ---------- */
@media (max-width: 600px) {
  .auth-top { padding: 12px 16px; }
  .auth-brand img { width: 48px; height: 48px; }
  .auth-stage { padding: 72px 12px 28px; gap: 18px; }
  .auth-card { padding: 26px 20px 20px; background: rgba(10, 18, 36, .66); }
  .auth-live { gap: 26px; }
}
@media (max-height: 700px) { .auth-stage { padding-top: 76px; } .auth-ticker { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .auth-card::before, .auth-dot, .auth-field.is-locked .auth-lock, .auth-sent span, .auth-geo.is-busy .auth-geo-ic { animation: none; }
  .js-steps .auth-step.is-active, .auth-sent i { animation: none; }
  .auth-card, .auth-card.is-shaking, .auth-live, .auth-alert { animation: none; }
}
.auth-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
