/* Auth login — responsive 3D glass layout */

:root {
    --auth-primary: #5B5FEF;
    --auth-primary-dark: #4f46e5;
    --auth-accent: #06b6d4;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-glass: rgba(255, 255, 255, 0.72);
    --auth-glass-border: rgba(255, 255, 255, 0.55);
    --auth-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 25px 60px rgba(79, 70, 229, 0.18),
        0 10px 24px rgba(15, 23, 42, 0.08);
    --auth-shadow-card:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 18px 45px rgba(99, 102, 241, 0.14),
        0 6px 16px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

.auth-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--auth-text);
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 35%, #172554 70%, #0e7490 100%);
    overflow-x: hidden;
}

.auth-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99, 102, 241, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 45% at 85% 75%, rgba(6, 182, 212, 0.28), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(139, 92, 246, 0.2), transparent 55%);
}

.auth-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: auth-orb-float 14s ease-in-out infinite;
}

.auth-login-orb--1 {
    width: 280px;
    height: 280px;
    top: 8%;
    left: 6%;
    background: #6366f1;
}

.auth-login-orb--2 {
    width: 220px;
    height: 220px;
    top: 55%;
    right: 8%;
    background: #06b6d4;
    animation-delay: -4s;
}

.auth-login-orb--3 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    left: 35%;
    background: #8b5cf6;
    animation-delay: -8s;
}

@keyframes auth-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -18px) scale(1.05); }
}

.auth-login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr;
    align-items: stretch;
}

.auth-login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
    color: #fff;
}

.auth-login-hero__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 12px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
}

.auth-login-hero__brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.auth-login-hero__title {
    font-size: clamp(1.85rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.auth-login-hero__title span {
    display: block;
    background: linear-gradient(90deg, #a5f3fc, #c4b5fd, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-login-hero__sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 28rem;
    line-height: 1.65;
    margin: 0 auto 1.75rem;
}

.auth-login-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 32rem;
}

.auth-login-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.auth-login-feature i {
    color: #67e8f9;
}

.auth-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem 2.5rem;
}

.auth-login-card-wrap {
    width: 100%;
    max-width: 440px;
    perspective: 1200px;
}

.auth-login-card-glow {
    position: absolute;
    inset: -8%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
    border-radius: 28px;
    filter: blur(40px);
    opacity: 0.65;
    z-index: 0;
}

.auth-login-card-wrap {
    position: relative;
}

.auth-login-card {
    position: relative;
    z-index: 1;
    background: var(--auth-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: 24px;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: var(--auth-shadow);
    transform: rotateX(2deg) rotateY(-1deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: auth-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-login-card:hover {
    transform: rotateX(0) rotateY(0) translateY(-4px);
    box-shadow: var(--auth-shadow-card);
}

@keyframes auth-card-in {
    from {
        opacity: 0;
        transform: translateY(28px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: rotateX(2deg) rotateY(-1deg);
    }
}

.auth-login-card__head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-login-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--auth-primary-dark);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.auth-login-card__title {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    background: linear-gradient(135deg, #4f46e5, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-login-card__sub {
    font-size: 0.9rem;
    color: var(--auth-muted);
    margin: 0;
}

.auth-login-field {
    margin-bottom: 1.1rem;
}

.auth-login-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.auth-login-field label i {
    width: 18px;
    color: var(--auth-primary);
}

.auth-login-input-wrap {
    position: relative;
}

.auth-login-input {
    width: 100%;
    padding: 0.8rem 2.75rem 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-login-input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.auth-login-input.is-invalid {
    border-color: #ef4444;
}

.auth-login-toggle-pw {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--auth-muted);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: 8px;
}

.auth-login-toggle-pw:hover {
    color: var(--auth-primary);
    background: #f1f5f9;
}

.auth-login-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.auth-login-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.auth-login-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary);
}

.auth-login-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #0891b2 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 10px 28px rgba(79, 70, 229, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.auth-login-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(79, 70, 229, 0.45);
}

.auth-login-submit:hover::before {
    left: 100%;
}

.auth-login-submit:active {
    transform: translateY(0);
}

.auth-login-submit.loading {
    color: transparent;
    pointer-events: none;
}

.auth-login-submit.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-login-alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-login-footer {
    text-align: center;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.82rem;
    color: var(--auth-muted);
}

.auth-login-footer a {
    color: var(--auth-primary-dark);
    font-weight: 600;
    text-decoration: none;
}

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

@media (min-width: 992px) {
    .auth-login-shell {
        grid-template-columns: 1.05fr 1fr;
    }

    .auth-login-hero {
        align-items: flex-start;
        text-align: left;
        padding: 3rem 3.5rem 3rem 4vw;
    }

    .auth-login-hero__sub {
        margin-left: 0;
    }

    .auth-login-features {
        justify-content: flex-start;
    }

    .auth-login-panel {
        padding: 2.5rem 3rem 2.5rem 1.5rem;
        background: rgba(255, 255, 255, 0.04);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 991.98px) {
    .auth-login-card {
        transform: none;
    }

    .auth-login-card:hover {
        transform: translateY(-2px);
    }

    .auth-login-panel {
        padding-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .auth-login-hero {
        padding: 1.75rem 1rem 1rem;
    }

    .auth-login-panel {
        padding: 0.75rem 1rem 2rem;
    }

    .auth-login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }

    .auth-login-row {
        justify-content: center;
    }
}
