:root {
    --ezr-navy: #0B1B3F;
    --ezr-navy-2: #12294F;
    --ezr-teal: #0E7C86;
    --ezr-amber: #F5A623;
    --ezr-coral: #FF6B4A;
    --ezr-cream: #F7F5F0;
    --ezr-ink: #1B2333;
    --ezr-muted: #5C6478;
    --ezr-line-dark: rgba(255,255,255,0.28);
    --ezr-line-light: rgba(11,27,63,0.16);
    --ezr-display: "Space Grotesk", sans-serif;
    --ezr-body: "Inter", sans-serif;
    --ezr-mono: "IBM Plex Mono", monospace;
    --field-bg: #F4F1EA;
    --field-border: rgba(11,27,63,0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body.auth-body {
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
    font-family: var(--ezr-body);
    color: var(--ezr-ink);
    background: #eef1f7;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--ezr-display); }
img { max-width: 100%; height: auto; }
a { color: inherit; }

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: #eef1f7;
}

/* ========== LEFT 3D STAGE ========== */
.auth-promo {
    position: relative;
    flex: 0 0 48%;
    max-width: 48%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(22px, 3.2vw, 36px) clamp(24px, 4vw, 48px) clamp(24px, 3vw, 32px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 0% 0%, #1a3a78 0%, transparent 55%),
        radial-gradient(800px 600px at 100% 100%, #071022 0%, transparent 60%),
        linear-gradient(155deg, #0B1B3F 0%, #12294F 42%, #0a1733 100%);
    perspective: 1400px;
}
.auth-promo::before,
.auth-promo::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}
.auth-promo::before {
    width: 360px; height: 360px;
    background: #0E7C86;
    top: -90px; right: -110px;
    opacity: .38;
    animation: floatSlow 10s ease-in-out infinite;
}
.auth-promo::after {
    width: 280px; height: 280px;
    background: #FF6B4A;
    bottom: -80px; left: -90px;
    opacity: .22;
    animation: floatSlow 12s ease-in-out infinite reverse;
}

.promo-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 35% 40%, #000 0%, transparent 72%);
    pointer-events: none;
}

.auth-logo {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
}
.auth-logo a { display: inline-flex; }
.auth-logo img {
    width: clamp(132px, 16vw, 190px);
    background: #fff;
    border-radius: 16px;
    padding: 8px 14px;
    box-shadow: 0 14px 0 rgba(11,27,63,.18), 0 22px 36px rgba(0,0,0,.28);
}

.promo-copy {
    position: relative;
    z-index: 3;
    flex: 1;
    min-height: 0;
    padding-bottom: 8px;
}
.promo-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ezr-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ezr-amber);
    font-weight: 600;
    margin: 0 0 10px;
}
.promo-copy h1 {
    font-size: clamp(1.45rem, 1.05rem + 1.6vw, 2.15rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 10px;
    text-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.promo-copy h1 span { color: var(--ezr-amber); }
.promo-copy .lead {
    color: rgba(255,255,255,.76);
    font-size: clamp(.86rem, .8rem + .3vw, .98rem);
    max-width: 430px;
    margin: 0 0 16px;
    line-height: 1.5;
}

.perk-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 4;
}
.perk-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: clamp(.82rem, .78rem + .2vw, .93rem);
    color: rgba(255,255,255,.9);
}
.perk-icon {
    flex: 0 0 24px;
    width: 24px; height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1ad0c4, #0E7C86);
    box-shadow: 0 6px 0 #0a5c64, 0 10px 16px rgba(0,0,0,.25);
    color: #fff;
    font-size: .72rem;
    margin-top: 1px;
}

.promo-chip {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(10px);
    font-family: var(--ezr-mono);
    font-size: .82rem;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.promo-chip span { color: var(--ezr-amber); }

/* 3D floating parcels */
.scene-3d {
    position: absolute;
    right: 4%;
    top: 18px;
    width: 180px;
    height: 150px;
    perspective: 900px;
    z-index: 1;
    pointer-events: none;
    opacity: .72;
}
.iso {
    position: absolute;
    width: 88px;
    height: 88px;
    transform-style: preserve-3d;
    transform: rotateX(-18deg) rotateY(-28deg);
    animation: bob 5.5s ease-in-out infinite;
}
.iso-1 { left: 20px; top: 30px; animation-delay: 0s; }
.iso-2 { left: 118px; top: 8px; animation-delay: .6s; animation-name: bob2; }
.iso-3 { left: 90px; top: 108px; animation-delay: 1.1s; animation-name: bob3; }
.iso .face {
    position: absolute;
    width: 88px;
    height: 88px;
    backface-visibility: hidden;
}
.iso .top {
    background: linear-gradient(135deg, #ffd27a, #F5A623);
    transform: rotateX(90deg) translateZ(44px);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.iso .left {
    background: linear-gradient(180deg, #c47e1c, #8d5a12);
    transform: rotateY(-90deg) translateZ(44px);
}
.iso .right {
    background: linear-gradient(180deg, #F5A623, #dd8a12);
    transform: rotateY(0deg) translateZ(44px);
}
.iso-2 .top { background: linear-gradient(135deg, #7fe0ef, #23A6D5); }
.iso-2 .left { background: linear-gradient(180deg, #1683A8, #0d5f7c); }
.iso-2 .right { background: linear-gradient(180deg, #23A6D5, #1683A8); }
.iso-3 .top { background: linear-gradient(135deg, #ff9b7a, #FF6B4A); }
.iso-3 .left { background: linear-gradient(180deg, #c24a30, #8d2f1c); }
.iso-3 .right { background: linear-gradient(180deg, #FF6B4A, #dd5538); }

.tape {
    position: absolute;
    left: 38px; top: 0;
    width: 12px; height: 88px;
    background: rgba(255,255,255,.35);
    transform: translateZ(45px);
}

/* ========== RIGHT FORM ========== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px);
    width: 100%;
    min-width: 0;
    background:
        radial-gradient(600px 400px at 90% 10%, rgba(245,166,35,.08), transparent 60%),
        linear-gradient(180deg, #f7f8fb 0%, #eef1f7 100%);
}

.auth-form-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 24px;
    padding: clamp(24px, 3vw, 40px);
    position: relative;
    transform: perspective(1400px) rotateX(1.4deg) rotateY(-2.2deg);
    box-shadow:
        0 1px 0 rgba(255,255,255,1) inset,
        0 18px 40px rgba(11,27,63,.12),
        0 40px 80px rgba(11,27,63,.08),
        8px 18px 0 rgba(11,27,63,.04);
    transition: transform .35s ease, box-shadow .35s ease;
}
.auth-form-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    pointer-events: none;
    border: 1px solid rgba(11,27,63,.06);
}
.auth-form-card:hover {
    transform: perspective(1400px) rotateX(0) rotateY(0) translateY(-4px);
    box-shadow:
        0 1px 0 #fff inset,
        0 24px 50px rgba(11,27,63,.16),
        0 50px 90px rgba(11,27,63,.1);
}
.auth-form-card.wide { max-width: 490px; }

.welcome-title {
    font-size: clamp(1.5rem, 1.3rem + .8vw, 1.9rem);
    font-weight: 700;
    color: var(--ezr-navy);
    margin: 0 0 6px;
}
.welcome-sub {
    color: var(--ezr-muted);
    font-size: clamp(.88rem, .84rem + .2vw, .96rem);
    margin: 0 0 24px;
    line-height: 1.5;
}

.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ezr-navy);
    margin-bottom: 7px;
}
.field-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 7px;
}
.forgot-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ezr-coral);
    text-decoration: none;
}
.forgot-link:hover { color: var(--ezr-navy); text-decoration: underline; }

.styled-input,
select.styled-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--field-border);
    background: var(--field-bg);
    font-size: 16px;
    color: var(--ezr-ink);
    font-family: var(--ezr-body);
    box-shadow: inset 0 2px 4px rgba(11,27,63,.04);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}
.styled-input:focus,
select.styled-input:focus {
    outline: none;
    border-color: var(--ezr-teal);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14,124,134,.12), inset 0 1px 2px rgba(11,27,63,.04);
    transform: translateY(-1px);
}
.styled-input.error,
.styled-input.is-invalid,
select.styled-input.is-invalid {
    border-color: var(--ezr-coral);
    background: #fff6f4;
}
.styled-input.is-valid,
select.styled-input.is-valid { border-color: var(--ezr-teal); }

.password-wrapper { position: relative; }
.password-wrapper input { width: 100%; padding-right: 46px; }
.password-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    border: 0; background: none;
    color: #8a90a0;
    cursor: pointer;
    padding: 6px;
    font-size: 1.15rem;
    line-height: 1;
}
.password-toggle:hover { color: var(--ezr-teal); }

.remember-row,
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
}
.remember-row input,
.terms-row input {
    width: 18px; height: 18px;
    accent-color: var(--ezr-teal);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}
.remember-row label,
.terms-row label {
    font-size: .88rem;
    color: var(--ezr-muted);
    margin: 0;
    cursor: pointer;
}
.terms-row label a {
    color: var(--ezr-coral);
    font-weight: 600;
    text-decoration: none;
}
.terms-row label a:hover { text-decoration: underline; color: var(--ezr-navy); }

.captcha-container { margin-bottom: 20px; }
.captcha-box {
    border: 1.5px solid var(--ezr-line-light);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--ezr-cream);
    cursor: pointer;
    box-shadow: 0 8px 0 rgba(11,27,63,.04);
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.captcha-box:hover { border-color: var(--ezr-teal); transform: translateY(-1px); }
.captcha-box.verified { border-color: #2e7d32; background: #e8f5e9; }
.captcha-box.error { border-color: var(--ezr-coral); background: #fff6f4; }
.captcha-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.captcha-box input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ezr-teal); flex-shrink: 0; }
.captcha-label { font-size: .9rem; color: var(--ezr-ink); user-select: none; }
.captcha-status {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ezr-muted);
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,.05);
}
.captcha-box.verified .captcha-status { color: #2e7d32; background: rgba(46,125,50,.12); }
.captcha-icon { font-size: 1.35rem; color: var(--ezr-teal); }
.captcha-box.verified .captcha-icon { color: #2e7d32; }
.captcha-error { color: var(--ezr-coral); font-size: .8rem; margin-top: 6px; display: none; }
.captcha-error.visible { display: block; }

.btn-signin {
    width: 100%;
    border: 0;
    padding: 15px 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ezr-navy);
    background: linear-gradient(180deg, #ffc14a, var(--ezr-amber) 55%, #e09414);
    box-shadow: 0 8px 0 #c47e12, 0 16px 28px rgba(245,166,35,.32);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: var(--ezr-display);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-signin::before {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.5), transparent);
    transform: skewX(-20deg);
    transition: left .55s ease;
}
.btn-signin:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #c47e12, 0 20px 32px rgba(245,166,35,.4); }
.btn-signin:hover::before { left: 130%; }
.btn-signin:active { transform: translateY(4px); box-shadow: 0 4px 0 #c47e12, 0 8px 16px rgba(245,166,35,.28); }
.btn-signin:disabled { opacity: .65; cursor: not-allowed; transform: none !important; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1.5px solid var(--ezr-line-light);
    background: #fff;
    color: var(--ezr-navy);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--ezr-display);
    box-shadow: 0 6px 0 rgba(11,27,63,.06);
}
.btn-ghost:hover { transform: translateY(-1px); color: var(--ezr-navy); }

.signup-hint {
    text-align: center;
    font-size: .88rem;
    color: var(--ezr-muted);
    margin: 22px 0 0;
}
.signup-hint a {
    color: var(--ezr-coral);
    font-weight: 700;
    text-decoration: none;
}
.signup-hint a:hover { text-decoration: underline; color: var(--ezr-navy); }

.field-error,
.invalid-feedback {
    color: var(--ezr-coral);
    font-size: .8rem;
    margin-top: 6px;
}
.invalid-feedback { display: none; }
.field-error.show,
.invalid-feedback.show { display: block; }

.status-banner {
    background: rgba(14,124,134,.08);
    color: var(--ezr-teal);
    border: 1px dashed rgba(14,124,134,.4);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: .88rem;
    margin-bottom: 18px;
}
.status-banner.ok { background: #e8f5e9; color: #2e7d32; border-color: rgba(46,125,50,.35); }

.auth-actions { display: flex; flex-direction: column; gap: 10px; }

.password-strength-container { margin-top: 10px; }
.password-strength-bar {
    height: 5px;
    background: var(--field-border);
    border-radius: 99px;
    overflow: hidden;
}
.password-strength-progress {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width .3s ease, background-color .3s ease;
}
.password-strength-text { font-size: .8rem; margin-top: 4px; font-weight: 600; }
.password-requirements { list-style: none; padding: 0; margin: 10px 0 0; font-size: .82rem; }
.password-requirements li {
    margin-bottom: 4px;
    color: var(--ezr-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.password-requirements li.valid { color: var(--ezr-teal); }
.password-requirements li.invalid { color: var(--ezr-coral); }
.password-suggestions {
    background: var(--ezr-cream);
    border-left: 3px solid var(--ezr-amber);
    padding: 10px 12px;
    margin-top: 10px;
    border-radius: 8px;
    font-size: .83rem;
    display: none;
}
.password-suggestions.show { display: block; }
.password-suggestions ul { margin: 5px 0 0; padding-left: 20px; }

.iti { width: 100%; }
.iti input.styled-input { width: 100%; }
.iti__selected-flag { background: transparent; border-radius: 12px 0 0 12px; }
.iti__country-list { z-index: 40; }

.mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 18px;
}
.mobile-brand img { width: 150px; }

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(14px, -22px); }
}
@keyframes bob {
    0%, 100% { transform: rotateX(-18deg) rotateY(-28deg) translateY(0); }
    50% { transform: rotateX(-18deg) rotateY(-28deg) translateY(-14px); }
}
.iso-2 { animation-name: bob2; }
.iso-3 { animation-name: bob3; }
@keyframes bob2 {
    0%, 100% { transform: scale(.82) rotateX(-18deg) rotateY(-28deg) translateY(0); }
    50% { transform: scale(.82) rotateX(-18deg) rotateY(-28deg) translateY(-12px); }
}
@keyframes bob3 {
    0%, 100% { transform: scale(.7) rotateX(-18deg) rotateY(-28deg) translateY(0); }
    50% { transform: scale(.7) rotateX(-18deg) rotateY(-28deg) translateY(-10px); }
}

@media (max-width: 991px) {
    .auth-shell { flex-direction: column; min-height: auto; }
    .auth-promo {
        position: relative;
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        min-height: 0;
        height: auto;
        max-height: none;
        padding: 28px 24px 36px;
    }
    .scene-3d { display: none; }
    .auth-form-card {
        transform: none;
        box-shadow: 0 16px 40px rgba(11,27,63,.1);
    }
    .auth-form-card:hover { transform: translateY(-3px); }
    .auth-form-panel { padding: 28px 20px 48px; }
}
@media (max-width: 767px) {
    .auth-logo img { width: clamp(130px, 34vw, 180px); }
    .auth-promo { padding: 24px 18px 28px; text-align: center; }
    .promo-copy .lead { margin-left: auto; margin-right: auto; }
    .perk-list { text-align: left; max-width: 420px; margin: 0 auto; }
    .promo-chip { margin-left: auto; margin-right: auto; }
    .auth-form-panel { padding: 22px 16px 40px; }
    .auth-form-card { max-width: 100%; border-radius: 20px; }
}
@media (max-width: 575px) {
    .auth-promo { padding: 22px 16px 24px; }
    .btn-signin { padding: 14px; font-size: .9rem; }
    .captcha-box { padding: 12px 14px; }
}
@media (max-width: 380px) {
    .welcome-title { font-size: 1.38rem; }
    .auth-form-panel { padding: 18px 12px 32px; }
}
@media (max-width: 991px) and (max-height: 480px) and (orientation: landscape) {
    .auth-shell { flex-direction: row; }
    .auth-promo { flex: 0 0 40%; max-width: 40%; min-height: 100vh; min-height: 100dvh; padding: 18px 20px; overflow-y: auto; }
    .scene-3d { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .auth-form-card { transform: none; }
}
