@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── Green theme — light, fresh, no cards ── */
:root {
    --w-bg: #f8fafc;
    --w-bg-warm: #f0fdf4;
    --w-surface: #ffffff;
    --w-text: #0f172a;
    --w-muted: #64748b;
    --w-line: #e2e8f0;
    --w-green-900: #14532d;
    --w-green-700: #15803d;
    --w-green-500: #22c55e;
    --w-green-400: #4ade80;
    --w-green-100: #dcfce7;
    --w-green-soft: #ecfdf5;
    --w-danger-bg: #fef2f2;
    --w-danger: #dc2626;
    --w-font: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --w-radius: 18px;
    --w-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

body.auth-portal {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--w-font);
    color: var(--w-text);
    background: linear-gradient(160deg, var(--w-bg-warm) 0%, var(--w-green-soft) 45%, var(--w-bg) 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background scene */
.auth-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-scene__mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 10% 20%, rgba(34, 197, 94, 0.16), transparent),
        radial-gradient(ellipse 60% 45% at 90% 10%, rgba(21, 128, 61, 0.1), transparent),
        radial-gradient(ellipse 50% 40% at 50% 90%, rgba(74, 222, 128, 0.08), transparent);
}

.auth-scene__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    opacity: 0.7;
}

/* Nav */
.auth-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
}

.auth-nav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1rem;
    color: var(--w-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.auth-nav__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--w-green-700), var(--w-green-500));
    color: #fff;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.auth-nav__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-nav__link {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--w-muted);
    text-decoration: none;
    border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}

.auth-nav__link:hover {
    color: var(--w-text);
    background: rgba(255, 255, 255, 0.6);
}

.auth-nav__link--cta {
    background: linear-gradient(135deg, var(--w-green-700), var(--w-green-500));
    color: #fff;
}

.auth-nav__link--cta:hover {
    background: linear-gradient(135deg, var(--w-green-900), var(--w-green-700));
    color: #fff;
}

/* Shell */
.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1.25rem, 4vw, 2.5rem) 3rem;
    min-height: calc(100dvh - 72px);
    align-items: center;
}

/* Intro panel */
.auth-intro {
    padding: 1rem 0;
}

.auth-intro__label {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--w-green-100);
    color: var(--w-green-700);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-intro__headline {
    margin: 0 0 1.25rem;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-intro__headline span {
    background: linear-gradient(135deg, var(--w-green-700), var(--w-green-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-intro__text {
    margin: 0 0 1.75rem;
    max-width: 26rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--w-muted);
}

.auth-intro__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.auth-chip {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--w-line);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--w-text);
}

.auth-intro__visual {
    position: relative;
    height: 180px;
    max-width: 320px;
}

.auth-map-dots {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(236,253,245,0.8));
    border: 1px solid var(--w-line);
    box-shadow: var(--w-shadow);
    overflow: hidden;
}

.auth-map-dots::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34,197,94,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,197,94,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.auth-map-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--w-green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.auth-map-dot--a { top: 28%; left: 22%; animation: wDotFloat 4s ease-in-out infinite; }
.auth-map-dot--b { top: 55%; left: 58%; animation: wDotFloat 4s 1s ease-in-out infinite; }
.auth-map-dot--c { top: 38%; left: 78%; animation: wDotFloat 4s 2s ease-in-out infinite; }

.auth-map-dot--pulse {
    top: 48%;
    left: 38%;
    width: 18px;
    height: 18px;
    background: var(--w-green-400);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: wPulse 2s ease-out infinite;
}

@keyframes wDotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes wPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    70% { box-shadow: 0 0 0 16px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Form panel — open, no card */
.auth-panel {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.auth-page {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-page-header {
    margin-bottom: 2rem;
}

.auth-page-header__tag {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--w-green-700);
}

.auth-page-header h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--w-text);
}

.auth-page-header .subtitle {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--w-muted);
}

/* Form fields */
.auth-form-full {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.auth-form-full .form-group {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-field__label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--w-text);
    letter-spacing: 0.01em;
}

.auth-field__wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.1rem;
    min-height: 56px;
    border-radius: var(--w-radius);
    background: var(--w-surface);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field__wrap:focus-within {
    border-color: var(--w-green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 4px 20px rgba(15, 23, 42, 0.04);
}

.auth-field__icon {
    flex-shrink: 0;
    color: var(--w-muted);
    display: flex;
    transition: color 0.2s;
}

.auth-field__wrap:focus-within .auth-field__icon {
    color: var(--w-green-700);
}

.auth-field__wrap input {
    flex: 1;
    width: 100%;
    padding: 0.85rem 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--w-text) !important;
    -webkit-text-fill-color: var(--w-text);
    caret-color: var(--w-green-700);
}

.auth-field__wrap input::placeholder {
    color: #94a3b8;
}

.auth-field__wrap input:-webkit-autofill,
.auth-field__wrap input:-webkit-autofill:hover,
.auth-field__wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--w-text) !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}

/* PIN */
.form-group--pin {
    text-align: center;
}

.form-group--pin .auth-field {
    align-items: center;
}

.pin-board {
    width: 100%;
    padding: 1.5rem 0;
}

.pin-board__label {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--w-text);
}

.pin-cells {
    display: flex;
    justify-content: center;
    gap: clamp(0.45rem, 2vw, 0.7rem);
    margin-bottom: 0.5rem;
}

.pin-cell {
    width: clamp(46px, 9vw, 56px);
    height: clamp(54px, 11vw, 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--w-surface);
    border: 2px solid var(--w-line);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--w-green-700);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.pin-cell.filled {
    border-color: var(--w-green-500);
    background: var(--w-green-100);
    transform: scale(1.04);
}

.pin-cell.active {
    border-color: var(--w-green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.pin-input-overlay {
    position: relative;
    height: 0;
    margin-top: -4.2rem;
    height: 4.2rem;
}

.pin-input-overlay input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: text;
    font-size: 16px;
    z-index: 2;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--w-muted);
    cursor: pointer;
}

.auth-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--w-green-500);
    cursor: pointer;
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--w-radius);
    background: linear-gradient(135deg, var(--w-green-700) 0%, var(--w-green-500) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn-auth:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 36px rgba(34, 197, 94, 0.38);
}

.btn-auth:active {
    transform: scale(0.98);
}

.alert-error {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: var(--w-danger-bg);
    border: 1px solid #fecaca;
    color: var(--w-danger);
    font-size: 0.88rem;
    line-height: 1.5;
}

.alert-error ul {
    margin: 0;
    padding-left: 1.2rem;
}

.auth-links {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--w-muted);
}

.auth-links a {
    color: var(--w-green-700);
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ── Wave splash ── */
.lt-splash--wave {
    background: linear-gradient(165deg, #f0fdf4 0%, #ecfdf5 50%, #f8fafc 100%);
}

.lt-splash--wave .lt-splash__vignette {
    display: none;
}

.lt-splash__mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(34, 197, 94, 0.18), transparent),
        radial-gradient(ellipse 70% 50% at 80% 20%, rgba(21, 128, 61, 0.12), transparent);
}

.lt-splash__rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 200px;
    height: 200px;
}

.lt-splash__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.25);
    animation: wRing 2.5s ease-out infinite;
}

.lt-splash__ring:nth-child(2) { animation-delay: 0.6s; }
.lt-splash__ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes wRing {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.lt-splash__pins {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lt-splash__pin {
    position: absolute;
    font-size: 1.4rem;
    opacity: 0.35;
    animation: wPinDrift 6s ease-in-out infinite;
}

.lt-splash__pin--1 { top: 18%; left: 12%; animation-delay: 0s; }
.lt-splash__pin--2 { top: 72%; right: 15%; animation-delay: 2s; }
.lt-splash__pin--3 { top: 30%; right: 22%; animation-delay: 4s; }

@keyframes wPinDrift {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-12px) rotate(8deg); }
}

.lt-splash--wave .lt-splash__content {
    position: relative;
    z-index: 2;
}

.lt-splash__emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--w-green-700), var(--w-green-500));
    color: #fff;
    box-shadow: 0 16px 40px rgba(34, 197, 94, 0.35);
    animation: wEmblemIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes wEmblemIn {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

.lt-splash--wave .lt-splash__logo {
    font-family: var(--w-font);
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--w-text);
    text-shadow: none;
    animation: none;
    margin: 0 0 0.5rem;
    animation: wFadeUp 0.6s 0.15s ease both;
}

.lt-splash--wave .lt-splash__sub {
    font-family: var(--w-font);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: var(--w-muted);
    margin-bottom: 2.5rem;
    animation: wFadeUp 0.6s 0.25s ease both;
}

.lt-splash__loader {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: min(360px, 80vw);
    margin: 0 auto;
    animation: wFadeUp 0.6s 0.35s ease both;
}

.lt-splash__loader-track {
    flex: 1;
    height: 6px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.lt-splash__loader-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--w-green-700), var(--w-green-500), var(--w-green-400));
    transition: width 0.12s linear;
}

.lt-splash__loader-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--w-green-700);
    font-variant-numeric: tabular-nums;
    min-width: 2.5rem;
}

.lt-splash--wave .lt-splash__skip {
    font-family: var(--w-font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--w-muted);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--w-line);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lt-splash--wave .lt-splash__skip:hover {
    color: var(--w-green-700);
    border-color: var(--w-green-500);
    background: #fff;
}

@keyframes wFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Override splash.css hacker auth */
body.auth-portal .auth-form-full .form-group {
    border-bottom: none;
    padding: 0;
    background: transparent;
}

body.auth-portal .auth-form-full .form-group input[type="email"],
body.auth-portal .auth-form-full .form-group input[type="password"],
body.auth-portal .auth-form-full .form-group input[type="text"] {
    color: var(--w-text) !important;
    font-family: inherit;
    background: transparent !important;
}

body.auth-portal .auth-page-header h2 {
    font-family: inherit;
    color: var(--w-text);
}

/* Responsive — mobile: form only, full page */
@media (max-width: 960px) {
    .auth-intro {
        display: none !important;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: none;
        min-height: calc(100dvh - 64px);
        padding: 0;
        align-items: stretch;
    }

    .auth-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        width: 100%;
        min-height: calc(100dvh - 64px);
        padding: 1.5rem clamp(1.15rem, 5vw, 2rem) 2.5rem;
    }

    .auth-page {
        max-width: none;
        width: 100%;
    }

    .auth-nav__links .auth-nav__link:not(.auth-nav__link--cta) {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-nav {
        padding: 0.85rem 1.15rem;
    }

    .auth-panel {
        padding: 1.25rem 1.15rem 2rem;
        justify-content: flex-start;
        padding-top: 1.75rem;
    }

    .auth-page-header {
        margin-bottom: 1.75rem;
    }

    .auth-page-header h2 {
        font-size: 1.65rem;
    }

    .pin-cells {
        gap: 0.4rem;
    }

    .pin-cell {
        border-radius: 14px;
    }
}
