/* Auth pages — same tokens & language as landing (home.css) */

:root {
    --lp-yellow: #f5d84a;
    --lp-yellow-2: #ffe56a;
    --lp-yellow-deep: #e8c230;
    --lp-magenta: #c2185b;
    --lp-magenta-2: #e91e8c;
    --lp-purple: #9c27b0;
    --lp-ink: #1a1a1a;
    --lp-muted: #3a3a3a;
    --lp-grad-btn: linear-gradient(90deg, #9c27b0 0%, #e91e8c 55%, #ff2d95 100%);
    --lp-grad-btn-hover: linear-gradient(90deg, #8e24aa 0%, #d81b7a 55%, #f5007a 100%);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body.lp-auth-body {
    min-height: 100%;
    font-family: 'Montserrat', sans-serif;
    background: #fff8d6 !important;
    color: var(--lp-ink) !important;
    -webkit-font-smoothing: antialiased;
}

body.lp-auth-body {
    background-image: none !important;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

.lp-auth {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    isolation: isolate;
    overflow: hidden;
}

/* ===== Background (same as landing stage) ===== */
.lp-auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.lp-auth-bg-yellow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 80% at 35% 40%, #ffe978 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 10% 80%, #f0d040 0%, transparent 50%),
        linear-gradient(115deg, #f3d23a 0%, #f7de55 38%, #ffec7a 62%, #f5d84a 100%);
}

.lp-auth-bg-magenta {
    position: absolute;
    right: -8%;
    bottom: -18%;
    width: 58%;
    height: 78%;
    background: linear-gradient(145deg, #d81b60 0%, #ad1457 45%, #880e4f 100%);
    clip-path: polygon(38% 0%, 100% 0%, 100% 100%, 0% 100%);
    transform: skewX(-8deg);
    box-shadow: -40px 0 80px rgba(136, 14, 79, 0.25);
}

.lp-auth-scene {
    position: absolute;
    right: 4%;
    top: 18%;
    width: min(420px, 42vw);
    height: min(420px, 42vw);
    perspective: 900px;
}

.lp-auth-ray {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    opacity: 0.8;
    animation: lpAuthRay 3.5s ease-in-out infinite;
}
.lp-auth-ray--1 { top: 30%; left: 10%; width: 55%; transform: rotate(-16deg); }
.lp-auth-ray--2 { top: 58%; left: 18%; width: 48%; transform: rotate(10deg); animation-delay: 0.7s; }

.lp-auth-frame {
    position: absolute;
    top: 16%;
    left: 22%;
    width: 200px;
    height: 200px;
    transform: rotateX(18deg) rotateY(-28deg) rotateZ(12deg);
    animation: lpAuthFloat 5.5s ease-in-out infinite;
    filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.28));
}
.lp-auth-frame span { position: absolute; }
.lp-auth-frame span:nth-child(1) { top: 0; left: 0; width: 100%; height: 22px; background: linear-gradient(180deg, #fff3a0, #d4b020 40%, #b8940a); }
.lp-auth-frame span:nth-child(2) { bottom: 0; left: 0; width: 100%; height: 22px; background: linear-gradient(180deg, #fff3a0, #d4b020 40%, #b8940a); }
.lp-auth-frame span:nth-child(3) { top: 0; left: 0; width: 22px; height: 100%; background: linear-gradient(90deg, #c9a818, #f0d84a 50%, #a88810); }
.lp-auth-frame span:nth-child(4) { top: 0; right: 0; width: 22px; height: 100%; background: linear-gradient(90deg, #c9a818, #f0d84a 50%, #a88810); }

.lp-auth-ball {
    position: absolute;
    border-radius: 50%;
    box-shadow:
        inset -10px -12px 22px rgba(0, 0, 0, 0.28),
        inset 8px 8px 16px rgba(255, 255, 255, 0.45),
        0 14px 28px rgba(0, 0, 0, 0.28);
    animation: lpAuthBob 4s ease-in-out infinite;
}
.lp-auth-ball--orange {
    width: 44px; height: 44px; top: 8%; left: 38%;
    background: radial-gradient(circle at 32% 28%, #ffe0b2, #ff9800 45%, #e65100);
}
.lp-auth-ball--pink {
    width: 32px; height: 32px; top: 20%; right: 10%;
    background: radial-gradient(circle at 32% 28%, #f8bbd0, #ec407a 45%, #ad1457);
    animation-delay: 0.9s;
}
.lp-auth-ball--green {
    width: 36px; height: 36px; bottom: 18%; left: 12%;
    background: radial-gradient(circle at 32% 28%, #c8e6c9, #43a047 45%, #1b5e20);
    animation-delay: 1.3s;
}

.lp-auth-box {
    position: absolute;
    width: 30px; height: 30px;
    border-radius: 6px;
    transform: rotate(28deg) skewY(-8deg);
    box-shadow:
        inset -6px -8px 14px rgba(0, 0, 0, 0.25),
        inset 5px 5px 10px rgba(255, 255, 255, 0.35),
        0 12px 22px rgba(0, 0, 0, 0.25);
    animation: lpAuthSpin 7s ease-in-out infinite;
}
.lp-auth-box--blue {
    bottom: 24%; right: 22%;
    background: linear-gradient(145deg, #90caf9, #1565c0);
}
.lp-auth-box--purple {
    top: 48%; left: 8%;
    width: 24px; height: 24px;
    background: linear-gradient(145deg, #ce93d8, #7b1fa2);
    animation-delay: 0.6s;
}

@keyframes lpAuthFloat {
    0%, 100% { transform: rotateX(18deg) rotateY(-28deg) rotateZ(12deg) translateY(0); }
    50% { transform: rotateX(18deg) rotateY(-28deg) rotateZ(12deg) translateY(-12px); }
}
@keyframes lpAuthBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes lpAuthSpin {
    0%, 100% { transform: rotate(28deg) skewY(-8deg) translateY(0); }
    50% { transform: rotate(36deg) skewY(-8deg) translateY(-8px); }
}
@keyframes lpAuthRay {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.95; }
}
@keyframes lpAuthRise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

/* ===== Nav (same as landing) ===== */
.lp-auth-nav {
    position: relative;
    z-index: 5;
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lp-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.lp-auth-mark {
    width: 42px;
    height: 42px;
    border: 2.5px solid #111;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.lp-auth-diamond {
    width: 16px;
    height: 16px;
    background: var(--lp-grad-btn);
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.45);
}

.lp-auth-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.lp-auth-brand-text strong {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111;
}
.lp-auth-brand-text small {
    margin-top: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #555;
}

.lp-auth-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--lp-grad-btn);
    box-shadow: 0 10px 24px rgba(156, 39, 176, 0.35);
    transition: transform 0.2s, filter 0.2s;
}
.lp-auth-nav-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* ===== Main form area ===== */
.lp-auth-main {
    position: relative;
    z-index: 4;
    width: min(520px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0 56px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 100px);
    min-height: calc(100dvh - 100px);
}

.lp-auth-panel {
    width: 100%;
    margin-top: 12px;
    animation: lpAuthRise 0.8s ease 0.08s both;
}

.lp-auth-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 30px 26px 26px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 236, 122, 0.5), transparent 42%),
        linear-gradient(165deg, #ffffff 0%, #fff8e1 100%);
    border: 1px solid rgba(194, 24, 91, 0.14);
    box-shadow:
        0 24px 50px rgba(156, 39, 176, 0.16),
        0 6px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    isolation: isolate;
}

.lp-auth-card-shape {
    position: absolute;
    right: -16%;
    bottom: -24%;
    width: 58%;
    height: 48%;
    background: linear-gradient(145deg, rgba(216, 27, 96, 0.16), rgba(156, 39, 176, 0.08));
    clip-path: polygon(28% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
    pointer-events: none;
}

.lp-auth-card-head,
.lp-auth-form,
.lp-auth-switch,
.lp-auth-ref {
    position: relative;
    z-index: 1;
}

.lp-auth-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lp-magenta);
    background: rgba(194, 24, 91, 0.1);
}

.lp-auth-card-head h2 {
    margin: 0 0 6px;
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #111;
}

.lp-auth-card-head p {
    margin: 0 0 22px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #666;
}

.lp-auth-ref {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -8px 0 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(194, 24, 91, 0.08);
    border: 1px solid rgba(194, 24, 91, 0.16);
    font-size: 12px;
    font-weight: 700;
    color: #555;
}
.lp-auth-ref i,
.lp-auth-ref b { color: var(--lp-magenta); }

.lp-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lp-auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.lp-auth-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lp-magenta);
    padding-left: 4px;
}

.lp-auth-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(194, 24, 91, 0.16);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lp-auth-control:focus-within {
    border-color: rgba(194, 24, 91, 0.5);
    box-shadow:
        0 10px 24px rgba(156, 39, 176, 0.12),
        0 0 0 3px rgba(233, 30, 140, 0.12);
}

.lp-auth-field.is-ok .lp-auth-control {
    border-color: rgba(46, 125, 50, 0.45);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}
.lp-auth-field.is-bad .lp-auth-control {
    border-color: rgba(194, 24, 91, 0.55);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.1);
}
.lp-auth-field.is-loading .lp-auth-control {
    border-color: rgba(233, 30, 140, 0.35);
}

.lp-auth-status-ico {
    flex-shrink: 0;
    font-size: 15px;
    display: none !important;
}
.lp-auth-field.is-ok .lp-auth-status-ico.is-ok { display: inline-block !important; }
.lp-auth-field.is-bad .lp-auth-status-ico.is-bad { display: inline-block !important; }
.lp-auth-field.is-loading .lp-auth-status-ico.is-loading { display: inline-block !important; }
.lp-auth-status-ico.is-ok { color: #2e7d32; }
.lp-auth-status-ico.is-bad { color: #c2185b; }
.lp-auth-status-ico.is-loading { color: #e91e8c; }

.lp-auth-hint {
    min-height: 16px;
    padding-left: 4px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #777;
}
.lp-auth-field.is-ok .lp-auth-hint { color: #1b5e20; }
.lp-auth-field.is-bad .lp-auth-hint { color: #c2185b; }
.lp-auth-field.is-loading .lp-auth-hint { color: #ad1457; }

.lp-auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(0.15);
}

.lp-auth-control > i {
    color: var(--lp-magenta-2);
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.lp-auth-control input {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    -webkit-appearance: none;
}

.lp-auth-control input::placeholder {
    color: #9aa0a6;
    font-weight: 500;
}

.lp-auth-control--pw {
    padding-right: 8px;
}

/* Hide browser built-in password reveal (Edge/Chrome) — we use our own eye */
.lp-auth-control--pw input[type="password"]::-ms-reveal,
.lp-auth-control--pw input[type="password"]::-ms-clear,
.lp-auth-control--pw input::-webkit-credentials-auto-fill-button,
.lp-auth-control--pw input::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lp-auth-eye {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: rgba(194, 24, 91, 0.08);
    color: var(--lp-magenta-2);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.lp-auth-eye i {
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}
.lp-auth-eye:active {
    background: rgba(194, 24, 91, 0.16);
}

.lp-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    padding-left: 2px;
}
.lp-auth-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--lp-magenta-2);
}

.lp-auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--lp-grad-btn);
    box-shadow: 0 14px 30px rgba(156, 39, 176, 0.4);
    transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
.lp-auth-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 18px 36px rgba(156, 39, 176, 0.48);
}
.lp-auth-submit:active { transform: scale(0.98); }

.lp-auth-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}
.lp-auth-switch a {
    color: var(--lp-magenta);
    font-weight: 800;
}
.lp-auth-switch a:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .lp-auth-nav {
        padding-top: 18px;
        padding-bottom: 8px;
    }

    .lp-auth-main {
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .lp-auth-panel {
        width: 100%;
        margin-top: 8px;
    }

    .lp-auth-scene {
        opacity: 0.35;
        right: -8%;
        top: auto;
        bottom: 8%;
        width: 220px;
        height: 220px;
        z-index: 0;
    }

    .lp-auth-card {
        margin: 0 auto;
        max-width: 480px;
    }

    .lp-auth-card-head {
        text-align: center;
    }

    .lp-auth-chip {
        margin-left: auto;
        margin-right: auto;
    }

    .lp-auth-bg-magenta {
        width: 72%;
        height: 40%;
        right: -20%;
        bottom: -10%;
        opacity: 0.9;
    }
}

@media (max-width: 640px) {
    .lp-auth-nav,
    .lp-auth-main {
        width: calc(100% - 28px);
    }

    .lp-auth-nav {
        justify-content: space-between;
        padding-top: 16px;
        padding-bottom: 4px;
    }

    .lp-auth-main {
        padding-top: 48px;
        padding-bottom: 36px;
    }

    .lp-auth-panel {
        margin-top: 12px;
    }

    .lp-auth-nav-btn {
        padding: 10px 18px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .lp-auth-brand-text strong {
        font-size: 1rem;
    }

    .lp-auth-card {
        padding: 24px 18px 22px;
        border-radius: 24px;
    }

    .lp-auth-control {
        min-height: 50px;
        border-radius: 14px;
    }

    .lp-auth-control input { height: 48px; font-size: 15px; }
    .lp-auth-submit { min-height: 50px; font-size: 0.88rem; }

    .lp-auth-frame { width: 120px; height: 120px; }
    .lp-auth-ball--green,
    .lp-auth-box--purple,
    .lp-auth-ray--2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-auth-frame,
    .lp-auth-ball,
    .lp-auth-box,
    .lp-auth-ray,
    .lp-auth-panel {
        animation: none !important;
    }
}
