/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    background: var(--bg-secondary);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--gradient-hero);
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 36px 36px 0;
}

.auth-header .logo-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-body {
    padding: 32px 36px;
}

.auth-footer {
    padding: 20px 36px;
    text-align: center;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary-600);
    font-weight: 600;
}

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

/* Role Selection Tabs */
.role-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: 28px;
}

.role-tab {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-500);
    background: transparent;
}

.role-tab.active {
    background: white;
    color: var(--primary-700);
    box-shadow: var(--shadow-sm);
}

.role-tab:hover:not(.active) {
    color: var(--gray-700);
}

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-full {
    width: 100%;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all var(--transition-fast);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-700);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

/* Conditional fields animation */
.conditional-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.conditional-fields.show {
    max-height: 500px;
}

@media (max-width: 480px) {

    .auth-body,
    .auth-header,
    .auth-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Default Mobile Styling */
.auth-side-panel {
    display: none;
}
.auth-form-area {
    width: 100%;
}

/* Horizontal layout for Desktop */
@media (min-width: 900px) {
    .auth-container {
        max-width: 960px;
    }
    
    .auth-card {
        display: flex;
        flex-direction: row;
        min-height: 520px;
        align-items: stretch;
    }

    .auth-side-panel {
        display: flex;
        flex: 1.2;
        background: var(--gradient-hero);
        color: white;
        padding: 50px 40px;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .auth-side-panel::before {
        content: '';
        position: absolute;
        width: 300px;
        height: 300px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        top: -100px;
        left: -100px;
    }

    .side-panel-content {
        position: relative;
        z-index: 2;
    }

    .side-logo-icon {
        font-size: 5rem;
        display: block;
        margin-bottom: 24px;
        animation: float 4s ease-in-out infinite;
    }

    .side-panel-content h2 {
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .side-panel-content p {
        font-size: 1.05rem;
        opacity: 0.9;
        line-height: 1.6;
        padding: 0 10px;
    }

    .auth-form-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: var(--bg-elevated);
    }

    .auth-header {
        padding-top: 20px;
    }
    
    .mobile-only {
        display: none !important;
    }
}