﻿:root {
    --navy: #242b3d;
    --navy-deep: #1a2030;
    --teal-light: #3fe0c9;
    --teal: #17a798;
    --teal-deep: #0c6e63;
    --ink: #1c2230;
    --white: #ffffff;
    --panel-light: #eef1f5;
    --muted: #6b7280;
    --line: #e1e5eb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: var(--ink);
}

h1, h2, h3, .brand, .btn-navy {
    font-family: 'Poppins', sans-serif;
}

/* ---------- Navbar ---------- */
.navbar-tesaluna {
    background: var(--navy);
    padding: 1rem 2.5rem;
}

    .navbar-tesaluna .brand {
        color: var(--white);
        font-weight: 700;
        font-size: 1.35rem;
        letter-spacing: .01em;
    }

    .navbar-tesaluna .nav-link {
        color: #dfe3ec;
        font-weight: 600;
        font-size: .85rem;
        letter-spacing: .05em;
        text-transform: uppercase;
        padding: .5rem 1rem;
        transition: color .2s ease;
    }

        .navbar-tesaluna .nav-link:hover {
            color: var(--teal-light);
        }

/* ---------- Stage backdrop ---------- */
.auth-stage {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(120% 140% at 10% 0%, #cdeee7 0%, #b7d3e0 45%, #9fb9cf 100%);
}

/* ---------- Split floating shell ---------- */
.auth-shell {
    position: relative;
    width: 100%;
    max-width: 1080px;
    min-height: 640px;
    display: flex;
    background: var(--panel-light);
    border-radius: 32px;
    box-shadow: 0 40px 80px -30px rgba(20,40,55,0.35);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    animation: cardIn .6s ease forwards .1s;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Left: form panel ----- */
.panel-form {
    flex: 1 1 50%;
    padding: 3.5rem 3.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .panel-form h2 {
        font-weight: 800;
        font-size: 2.1rem;
        margin-bottom: .35rem;
        color: var(--ink);
    }

    .panel-form .sub {
        color: var(--muted);
        font-size: .92rem;
        margin-bottom: 1.6rem;
    }

/* segmented tab switch, light variant */
.tab-switch {
    position: relative;
    display: flex;
    background: #e3e7ec;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 1.9rem;
    max-width: 260px;
}

.tab-btn {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .5rem .5rem;
    border-radius: 999px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    color: var(--muted);
    background: transparent;
    border: none;
    transition: color .25s ease;
    overflow: hidden;
}

    .tab-btn.active {
        color: var(--white);
    }

.tab-switch .thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--navy);
    border-radius: 999px;
    transition: transform .35s cubic-bezier(.65,0,.35,1);
    z-index: 1;
}

.tab-switch.signup-active .thumb {
    transform: translateX(100%);
}

/* form pane crossfade */
.form-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease;
}

    .form-pane.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

.form-label {
    font-size: .78rem;
    font-weight: 600;
    color: #4a5265;
    margin-bottom: .4rem;
}

/* icon + input + (optional) toggle button fused into one seamless control */
.input-icon {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    transition: box-shadow .2s ease, border-color .2s ease;
}

    .input-icon:focus-within {
        border-color: var(--navy);
        box-shadow: 0 0 0 3px rgba(36,43,61,0.12);
    }

    .input-icon .glyph {
        flex: 0 0 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--navy);
        color: var(--white);
        font-size: 1rem;
        line-height: 1;
        transition: background .2s ease;
    }

.form-control {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: .72rem .9rem;
    font-size: .95rem;
    color: var(--ink);
}

    .form-control:focus {
        box-shadow: none;
        outline: none;
    }

    .form-control::placeholder {
        color: #a3abba;
    }

.input-icon.focused .glyph {
    background: var(--teal-deep);
}

.toggle-password {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color .2s ease;
}

    .toggle-password:hover {
        color: var(--ink);
    }

    .toggle-password:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: -2px;
    }

/* invalid shake feedback */
.shake {
    animation: shake .4s ease;
}

@keyframes shake {
    10%,90% {
        transform: translateX(-1px);
    }

    20%,80% {
        transform: translateX(2px);
    }

    30%,50%,70% {
        transform: translateX(-4px);
    }

    40%,60% {
        transform: translateX(4px);
    }
}

/* ---------- Buttons + ripple + loading ---------- */
.btn-navy {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: .82rem 1rem;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

    .btn-navy:hover:not(:disabled) {
        background: var(--navy-deep);
        color: var(--white);
        box-shadow: 0 10px 22px -8px rgba(20,30,45,0.55);
    }

    .btn-navy:active:not(:disabled) {
        transform: translateY(1px);
    }

    .btn-navy:disabled {
        opacity: .85;
        cursor: progress;
    }

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    transform: scale(0);
    animation: ripple .6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-right: .5rem;
    vertical-align: -3px;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.link-navy {
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .link-navy:hover {
        text-decoration: underline;
    }

a.small-link {
    font-size: .83rem;
    color: var(--muted);
    text-decoration: none;
}

    a.small-link:hover {
        text-decoration: underline;
        color: var(--ink);
    }

.form-check-label {
    font-size: .85rem;
    color: var(--muted);
}

.form-check-input:checked {
    background-color: var(--navy);
    border-color: var(--navy);
}

.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
    font-size: .78rem;
    margin: 1.6rem 0 1.25rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

    .divider::before, .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }

.social-row {
    display: flex;
    gap: .75rem;
}

.social-btn {
    position: relative;
    overflow: hidden;
    flex: 1;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

    .social-btn:hover {
        border-color: var(--navy);
        box-shadow: 0 6px 16px -8px rgba(20,30,45,0.35);
    }

    .social-btn:active {
        transform: translateY(1px);
    }

    .social-btn svg {
        width: 19px;
        height: 19px;
    }

/* ----- Right: illustration panel ----- */
.panel-art {
    flex: 1 1 50%;
    padding: 14px 14px 14px 0;
    display: flex;
}

.art-frame {
    position: relative;
    flex: 1;
    border-radius: 24px;
    overflow: hidden;
    background: radial-gradient(60% 45% at 30% 22%, #ffe8b8 0%, rgba(255,232,184,0) 60%), linear-gradient(200deg, #1a2030 0%, #17607a 38%, #17a798 72%, #3fe0c9 100%);
}

    .art-frame .glow {
        position: absolute;
        top: 16%;
        left: 14%;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: radial-gradient(circle, #fff6dc 0%, rgba(255,246,220,0.25) 55%, transparent 75%);
        filter: blur(1px);
    }

    .art-frame svg.scene {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 62%;
    }

.art-caption {
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    bottom: 1.5rem;
    color: var(--white);
}

    .art-caption p {
        font-family: 'Poppins', sans-serif;
        font-size: 1.35rem;
        font-weight: 600;
        max-width: 22ch;
        line-height: 1.35;
        text-shadow: 0 2px 12px rgba(0,0,0,0.25);
        margin-bottom: 1.1rem;
        min-height: 2.7em;
        transition: opacity .3s ease, transform .3s ease;
    }

.art-nav {
    display: flex;
    gap: .6rem;
}

    .art-nav button {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1.5px solid rgba(255,255,255,0.55);
        background: rgba(255,255,255,0.08);
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: background .2s ease, border-color .2s ease;
    }

        .art-nav button:hover {
            background: rgba(255,255,255,0.22);
            border-color: var(--white);
        }

@media (max-width: 900px) {
    .panel-art {
        display: none;
    }

    .panel-form {
        padding: 3rem 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-tesaluna {
        padding: .85rem 1.25rem;
    }

        .navbar-tesaluna .nav-link {
            font-size: .78rem;
            padding: .4rem .6rem;
        }

    .auth-stage {
        padding: 1.5rem .75rem;
    }

    .auth-shell {
        border-radius: 22px;
        min-height: auto;
    }

    .panel-form {
        padding: 2.25rem 1.5rem;
    }
}
