:root {
    --auth-bg: #030303;
    --accent-gold: #f0c27b;
    --accent-platinum: #e5e4e2;
    --glass-bg: rgba(255, 255, 255, 0.015);
    --glass-border: rgba(255, 255, 255, 0.07);
    --card-width: 950px;
    --input-bg: rgba(255, 255, 255, 0.03);
}

body.auth-page {
    background-color: var(--auth-bg);
    overflow: hidden;
    min-height: 100vh;
    font-family: 'Rubik', sans-serif;
    color: #fff;
}

/* --- Background Animation Layer --- */
#tubes-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.8;
    filter: blur(2px);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    background-image:
        radial-gradient(circle at 50% 50%, transparent 0%, var(--auth-bg) 85%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}

/* --- Main Layout --- */
.auth-main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: var(--card-width);
    animation: authEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
}

@keyframes authEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Branding --- */
.auth-branding {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 100px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(240, 194, 123, 0.3));
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

/* --- The Card --- */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    min-height: 520px;
    overflow: hidden;
    position: relative;
}

.auth-card-sidebar {
    background: radial-gradient(circle at top right, rgba(240, 194, 123, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

.auth-card-sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.auth-card-form {
    padding: 60px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* --- Form Elements --- */
.contact-field {
    margin-bottom: 25px;
}

.contact-label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px 24px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(240, 194, 123, 0.03);
    box-shadow: 0 0 25px rgba(240, 194, 123, 0.15),
        inset 0 0 10px rgba(240, 194, 123, 0.05);
    transform: translateY(-2px) scale(1.01);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.auth-password-toggle:hover {
    color: var(--accent-gold);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -10px;
    margin-bottom: 30px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.auth-checkbox input {
    accent-color: var(--accent-gold);
    width: 18px;
    height: 18px;
}

.auth-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.auth-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- Buttons --- */
.auth-submit-btn {
    width: 100%;
    height: 60px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d4a76a 100%);
    color: #000;
    border: none;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(240, 194, 123, 0.2);
}

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

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

.auth-submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(240, 194, 123, 0.4);
    filter: brightness(1.15);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-social-btn {
    width: 100%;
    height: 56px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-social-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.auth-social-btn img {
    width: 22px;
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* --- Navigation Fixing --- */
#navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-card-sidebar {
        display: none;
    }

    .auth-card-form {
        padding: 40px 30px;
    }

    .login-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .auth-card {
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
    }

    .auth-card-form {
        padding: 20px 0;
    }

    .auth-container {
        max-width: 100%;
    }
}