:root {
    --void: #03080d;
    --abyss: #070f17;
    --deep: #0c1a28;
    --panel: rgba(255, 255, 255, 0.038);
    --panel-h: rgba(9, 141, 203, 0.06);
    --border: rgba(255, 255, 255, 0.07);
    --border-h: rgba(9, 141, 203, 0.35);
    --mint: #098DCB;
    /**--mint: #00ffb3;**/
    --mint-dim: rgba(9, 141, 203, 0.14);
    /**--mint-dim: rgba(9, 141, 203, 0.14);**/
    --mint-glow: rgba(9, 141, 203, 0.07);
    /**--mint-glow: rgba(9, 141, 203, 0.07);**/
    --ember: #ff6b35;
    --crimson: #ff3366;
    --txt: rgba(190, 230, 255, 0.82);
    --txt-muted: rgba(150, 190, 220, 0.42);
    --txt-head: #e8f4ff;
    --ff-h: "Orbitron", monospace;
    --ff-b: "Outfit", sans-serif;
    --ff-m: "Space Mono", monospace;
    --r: 10px;
    /**--glow-mint: 0 0 40px rgba(9, 141, 203, 0.18), 0 0 80px rgba(9, 141, 203, 0.08);**/
    --glow-mint: 0 0 40px rgba(9, 141, 203, 0.18), 0 0 80px rgba(9, 141, 203, 0.08);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    height: 100%;
}
body {
    font-family: var(--ff-b);
    background: var(--void);
    color: var(--txt);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}
a {
    text-decoration: none;
    color: inherit;
}

/* BG GRID */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(0deg, rgba(9, 141, 203, 0.022) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(90deg, rgba(9, 141, 203, 0.018) 0 1px, transparent 1px 48px);
    background-size: 48px 48px;
}

/* SCANLINE */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 9999;
    background: linear-gradient(90deg, transparent, var(--mint), transparent);
    animation: scan 7s linear infinite;
    opacity: 0.28;
}
@keyframes scan {
    0% {
        top: -2px;
    }
    100% {
        top: 100vh;
    }
}

/* AMBIENT ORBS */
.orb-wrap {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
}
.orb1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(9, 141, 203, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}
.orb2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
    bottom: -100px;
    left: -150px;
}

/* TOPBAR */
.topbar {
    position: relative;
    z-index: 10;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: var(--ff-h);
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--txt-head);
    letter-spacing: 0.1em;
}
.logo span {
    color: var(--mint);
}
.back-link {
    font-family: var(--ff-m);
    font-size: 0.65rem;
    color: var(--txt-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--mint);
}

/* MAIN WRAPPER */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    position: relative;
    z-index: 2;
}

/* AUTH CARD */
.auth-card {
    background: var(--abyss);
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: cardIn 0.5s ease both;
}
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card-header {
    background: linear-gradient(135deg, rgba(9, 141, 203, 0.06), rgba(255, 107, 53, 0.04));
    border-bottom: 1px solid var(--border);
    padding: 28px 32px 22px;
}
.card-tag {
    font-family: var(--ff-m);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--mint);
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}
.card-tag::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--mint);
}
.card-title {
    font-family: var(--ff-h);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--txt-head);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.card-sub {
    font-size: 0.85rem;
    color: var(--txt-muted);
    line-height: 1.6;
}

.card-body {
    padding: 28px 32px;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 20px;
    position: relative;
}
.form-label {
    font-family: var(--ff-m);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--txt-muted);
    margin-bottom: 8px;
    display: block;
}
.input-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--txt-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 13px 14px 13px 40px;
    font-family: var(--ff-b);
    font-size: 0.9rem;
    color: var(--txt-head);
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
    -webkit-appearance: none;
}
.form-input::placeholder {
    color: var(--txt-muted);
    font-size: 0.85rem;
}
.form-input:focus {
    border-color: rgba(9, 141, 203, 0.4);
    background: rgba(9, 141, 203, 0.03);
    box-shadow: 0 0 0 3px rgba(9, 141, 203, 0.07);
}
.form-input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--mint);
}
/* reorder - icon left using sibling trick via wrapper */
.input-wrap .form-input {
    padding: 13px 40px 13px 40px;
}
.input-wrap .input-icon.left {
    left: 14px;
    right: auto;
}
.input-wrap .input-icon.right {
    right: 14px;
    left: auto;
    cursor: pointer;
    pointer-events: all;
}
.input-wrap .input-icon.right:hover {
    color: var(--mint);
}

/* password eye toggle */
.pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--txt-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
    z-index: 1;
}
.pw-toggle:hover {
    color: var(--mint);
}

/* strength bar */
.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}
.sb {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.3s;
}
.sb.weak {
    background: var(--crimson);
}
.sb.fair {
    background: var(--ember);
}
.sb.strong {
    background: var(--mint);
}
.strength-label {
    font-family: var(--ff-m);
    font-size: 0.58rem;
    color: var(--txt-muted);
    margin-top: 5px;
}

/* checkbox */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}
.custom-check {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    transition:
        border-color 0.2s,
        background 0.2s;
    margin-top: 1px;
}
.custom-check.checked {
    background: var(--mint-dim);
    border-color: rgba(9, 141, 203, 0.4);
    color: var(--mint);
}
.check-txt {
    font-size: 0.82rem;
    color: var(--txt-muted);
    line-height: 1.5;
}
.check-txt a {
    color: var(--mint);
    transition: opacity 0.2s;
}
.check-txt a:hover {
    opacity: 0.7;
}

/* submit btn */
.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--ff-h);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 15px;
    border-radius: var(--r);
    cursor: pointer;
    border: none;
    background: var(--mint);
    color: var(--void);
    box-shadow: var(--glow-mint);
    transition: all 0.25s;
    margin-top: 4px;
}
.submit-btn:hover {
    background: #0EA3E7;
    box-shadow: 0 0 60px rgba(9, 141, 203, 0.4);
    transform: translateY(-1px);
}
.submit-btn:active {
    transform: translateY(0);
}

/* divider */
.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.or-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.or-txt {
    font-family: var(--ff-m);
    font-size: 0.6rem;
    color: var(--txt-muted);
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* social btns */
.social-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.soc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: var(--r);
    background: var(--panel);
    border: 1px solid var(--border);
    font-family: var(--ff-m);
    font-size: 0.62rem;
    color: var(--txt-muted);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
}
.soc-btn:hover {
    border-color: rgba(9, 141, 203, 0.25);
    color: var(--txt-head);
    background: var(--panel-h);
}
.soc-btn i {
    font-size: 0.95rem;
}

/* link row */
.link-row {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--txt-muted);
}
.link-row a {
    color: var(--mint);
    font-weight: 500;
    transition: opacity 0.2s;
}
.link-row a:hover {
    opacity: 0.7;
}

/* forgot link */
.forgot-link {
    text-align: right;
    margin-top: 6px;
}
.forgot-link a {
    font-family: var(--ff-m);
    font-size: 0.62rem;
    color: var(--txt-muted);
    letter-spacing: 0.06em;
    transition: color 0.2s;
}
.forgot-link a:hover {
    color: var(--mint);
}

/* OTP */
.otp-wrap {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 4px;
}
.otp-input {
    width: 50px;
    height: 58px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-family: var(--ff-h);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mint);
    text-align: center;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
    -webkit-appearance: none;
}
.otp-input:focus {
    border-color: rgba(9, 141, 203, 0.4);
    background: rgba(9, 141, 203, 0.03);
    box-shadow: 0 0 0 3px rgba(9, 141, 203, 0.07);
}
.otp-filled {
    border-color: rgba(9, 141, 203, 0.3);
    background: rgba(9, 141, 203, 0.04);
}

/* resend */
.resend-row {
    text-align: center;
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--txt-muted);
}
.resend-btn {
    background: none;
    border: none;
    font-family: var(--ff-m);
    font-size: 0.7rem;
    color: var(--mint);
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: opacity 0.2s;
}
.resend-btn:hover {
    opacity: 0.7;
}
.resend-timer {
    font-family: var(--ff-m);
    font-size: 0.7rem;
    color: var(--ember);
}

/* success state */
.success-state {
    text-align: center;
    padding: 8px 0 16px;
}
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--mint-dim);
    border: 1px solid rgba(9, 141, 203, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--mint);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.success-title {
    font-family: var(--ff-h);
    font-size: 1.1rem;
    color: var(--txt-head);
    margin-bottom: 8px;
}
.success-sub {
    font-size: 0.85rem;
    color: var(--txt-muted);
    line-height: 1.65;
    max-width: 300px;
    margin: 0 auto 24px;
}

/* alert */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 18px;
}
.alert-info {
    background: rgba(9, 141, 203, 0.06);
    border: 1px solid rgba(9, 141, 203, 0.18);
    color: rgba(9, 141, 203, 0.9);
}
.alert-err {
    background: rgba(255, 51, 102, 0.07);
    border: 1px solid rgba(255, 51, 102, 0.2);
    color: #ff6699;
}
.alert i {
    flex-shrink: 0;
    margin-top: 1px;
}

/* info row below input */
.input-help {
    font-family: var(--ff-m);
    font-size: 0.6rem;
    color: var(--txt-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* PAGE TABS (hidden router) */
.page {
    display: none;
}
.page.active {
    display: block;
}

/* progress dots */
.prog-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
}
.pd {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.3s;
}
.pd.active {
    background: var(--mint);
    box-shadow: 0 0 8px rgba(9, 141, 203, 0.5);
}
.pd.done {
    background: rgba(9, 141, 203, 0.4);
}

/* FOOTER */
.auth-footer {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}
.auth-footer p {
    font-family: var(--ff-m);
    font-size: 0.6rem;
    color: rgba(150, 190, 220, 0.25);
    letter-spacing: 0.04em;
}
