﻿/* ===============================
   CSS VARIABLES
================================ */
:root {
    --primary: #dc2626;
    --primary-light: #ef4444;
    --primary-dark: #b91c1c;
    --secondary: #eab308;
    --secondary-light: #facc15;
    --dark: #0f0f0f;
    --dark-light: #1a1a1a;
    --dark-lighter: #262626;
    --dark-card: #141414;
}

/* ===============================
   AUTH CONTAINER
================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    position: relative;
    overflow: hidden;
}

    .auth-container::before {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(220, 38, 38, 0.15), transparent 70%);
        border-radius: 50%;
        top: -250px;
        right: -200px;
        filter: blur(60px);
        animation: float 8s ease-in-out infinite;
    }

    .auth-container::after {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(234, 179, 8, 0.1), transparent 70%);
        border-radius: 50%;
        bottom: -150px;
        left: -100px;
        filter: blur(50px);
        animation: float 10s ease-in-out infinite reverse;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* ===============================
   AUTH CARD (Glassmorphism Dark)
================================ */
.auth-card {
    flex: 1;
    max-width: 520px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

    .auth-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), rgba(234, 179, 8, 0.3), transparent);
    }

/* ===============================
   LOGO
================================ */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(234, 179, 8, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .logo-circle::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: logoShine 4s ease-in-out infinite;
    }

    .logo-circle:hover {
        transform: translateY(-5px) scale(1.05);
        border-color: rgba(220, 38, 38, 0.5);
        box-shadow: 0 25px 60px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .logo-circle img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.5));
        position: relative;
        z-index: 1;
        transition: all 0.3s ease;
    }

    .logo-circle:hover img {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(220, 38, 38, 0.7));
    }

    .logo-circle i {
        font-size: 2.5rem;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.auth-logo h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===============================
   AUTH HEADER
================================ */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .auth-header h3 {
        font-size: 1.75rem;
        font-weight: 700;
        color: #ffffff;
        margin-bottom: 0.5rem;
    }

    .auth-header p {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.95rem;
    }

/* ===============================
   FORM STYLES
================================ */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

        .form-group label i {
            color: var(--primary-light);
            font-size: 1rem;
        }

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

    .form-control:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15), 0 0 20px rgba(220, 38, 38, 0.1);
    }

    .form-control:hover:not(:focus) {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.07);
    }

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 8px;
}

    .toggle-password:hover {
        color: var(--primary-light);
        background: rgba(220, 38, 38, 0.1);
    }

.password-hint {
    display: block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.form-check-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    margin: 0;
}

    .form-check-label a {
        color: var(--primary-light);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

        .form-check-label a:hover {
            color: var(--secondary);
        }

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .forgot-link:hover {
        color: var(--secondary);
    }

/* ===============================
   AUTH BUTTON
================================ */
.btn-auth {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

    .btn-auth::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .btn-auth:hover::before {
        opacity: 1;
    }

.btn-auth-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

    .btn-auth-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(220, 38, 38, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    }

    .btn-auth-primary:active {
        transform: translateY(-1px);
    }

    .btn-auth-primary i {
        transition: transform 0.3s ease;
    }

    .btn-auth-primary:hover i {
        transform: translateX(5px);
    }

/* ===============================
   DIVIDER
================================ */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

    .auth-divider::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }

    .auth-divider span {
        position: relative;
        background: var(--dark-card);
        padding: 0 1rem;
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.85rem;
    }

/* ===============================
   SOCIAL LOGIN
================================ */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.btn-social {
    flex: 1;
    max-width: 80px;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-social:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        color: #ffffff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

/* ===============================
   AUTH FOOTER
================================ */
.auth-footer {
    text-align: center;
}

    .auth-footer p {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.9rem;
    }

    .auth-footer a {
        color: var(--primary-light);
        text-decoration: none;
        font-weight: 600;
        transition: all 0.2s ease;
    }

        .auth-footer a:hover {
            color: var(--secondary);
        }

/* ===============================
   AUTH SIDE PANEL
================================ */
.auth-side {
    flex: 1;
    background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

    .auth-side::before {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(234, 179, 8, 0.1), transparent 70%);
        border-radius: 50%;
        bottom: -200px;
        left: -150px;
        filter: blur(60px);
        animation: float 12s ease-in-out infinite;
    }

    .auth-side::after {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(220, 38, 38, 0.08), transparent 70%);
        border-radius: 50%;
        top: -150px;
        right: -100px;
        filter: blur(50px);
        animation: float 15s ease-in-out infinite reverse;
    }

.auth-side-content {
    max-width: 480px;
    position: relative;
    z-index: 1;
}

    .auth-side-content h2 {
        font-size: 2.75rem;
        font-weight: 700;
        margin-bottom: 1rem;
        line-height: 1.2;
        background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .auth-side-content > p {
        font-size: 1.15rem;
        margin-bottom: 2.5rem;
        color: rgba(255, 255, 255, 0.6);
        line-height: 1.6;
    }

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(220, 38, 38, 0.2);
        transform: translateX(5px);
    }

    .feature-item i {
        font-size: 1.5rem;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
    .auth-side {
        display: none;
    }

    .auth-card {
        max-width: 100%;
        border-right: none;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
    }

        .logo-circle img {
            width: 55px;
            height: 55px;
        }

    .auth-header h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-header h3 {
        font-size: 1.35rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .btn-auth {
        padding: 0.875rem;
    }
}

/* ===============================
   AUTOFILL STYLES (Chrome/Safari)
================================ */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(30, 30, 30, 1) inset;
    box-shadow: 0 0 0px 1000px rgba(30, 30, 30, 1) inset;
    border-color: rgba(255, 255, 255, 0.2);
    transition: background-color 5000s ease-in-out 0s;
}

/* ===============================
   LOADING STATE
================================ */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.8;
}

    .btn-auth.loading span {
        opacity: 0;
    }

    .btn-auth.loading::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        border: 2px solid transparent;
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===============================
   ERROR STATES
================================ */
.form-control.is-invalid {
    border-color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

    .form-control.is-invalid:focus {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
    }

.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    color: var(--primary-light);
    font-size: 0.8rem;
}

/* ===============================
   SUCCESS STATES
================================ */
.form-control.is-valid {
    border-color: #22c55e;
}

    .form-control.is-valid:focus {
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    }
