/* Authentication Theme Variables */
:root {
    /* Default Student Theme */
    --auth-bg-primary: #3FB6DC;
    --auth-bg-primary-dark: #3FA5DC;
    --auth-brand-color: var(--sp-text-secondary);
    --auth-brand-dark: var(--sp-text-primary);
    --auth-badge-color: var(--sp-primary);
    --auth-badge-text: white;
}

/* Admin Theme Override */
.admin-theme {
    --auth-bg-primary: #3FB6DC;
    --auth-bg-primary-dark: #3FA5DC;
    --auth-brand-color: var(--sp-text-secondary);
    --auth-brand-dark: var(--sp-text-primary);
    --auth-badge-color: #3498db;
    --auth-badge-text: white;
}

/* Legacy Auth Card Styles */
.auth-card {
    max-width: 28rem;
    margin: 4rem auto;
    border: 1px solid var(--sp-border-light);
    border-radius: var(--sp-radius-md);
    padding: var(--sp-spacing-xl);
    box-shadow: var(--sp-shadow-box-lg);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Modern Auth System */
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Split Screen Layout */
.auth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Left Branding Section */
.auth-branding {
    background-color: var(--sp-bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-spacing-lg) var(--sp-spacing-md);
}

.auth-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.auth-logo {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
}

.auth-brand-text {
    text-align: center;
}

.auth-brand-text .welcome {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--auth-brand-color);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.auth-brand-text .brand-name {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.auth-brand-text .brand-name .safe {
    color: var(--auth-brand-color);
}

.auth-brand-text .brand-name .point {
    color: var(--sp-primary-teal);
}

/* Right Form Section */
.auth-form-section {
    background-color: var(--auth-bg-primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-spacing-lg) var(--sp-spacing-md);
    flex: 1;
    overflow: hidden;
}

.auth-diagonal-overlay {
    position: absolute;
    background-color: var(--auth-bg-primary);
}

.auth-form-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: calc(100% - 2rem);
}

/* Tab Switcher */
.auth-tab-switcher {
    display: flex;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.auth-tab-btn.active {
    background-color: var(--sp-bg-white);
    color: var(--auth-brand-dark);
}

.auth-tab-btn:not(.active) {
    background-color: transparent;
    color: var(--sp-bg-white);
}

.auth-tab-btn:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Enhanced Form Floating */
.auth-form-floating {
    margin-bottom: 1rem;
}

.auth-form-floating .form-control {
    width: 100%;
    padding: var(--sp-spacing-md) var(--sp-spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--sp-radius-sm);
    background-color: var(--sp-bg-white);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
    height: auto;
}

.auth-form-floating .form-control:focus {
    border-color: var(--auth-bg-primary-dark);
    box-shadow: 0 0 0 2px rgba(63, 165, 220, 0.2);
}

.auth-form-floating label {
    color: var(--sp-bg-white);
    font-size: 0.875rem;
    margin-bottom: var(--sp-spacing-xs);
    font-family: 'Inter', sans-serif;
}

.auth-forgot-link {
    display: block;
    color: var(--sp-bg-white);
    font-size: 0.75rem;
    text-decoration: none;
    margin-bottom: var(--sp-spacing-xl);
    font-family: 'Inter', sans-serif;
}

.auth-forgot-link:hover {
    opacity: 0.8;
}

.auth-btn {
    width: 100%;
    padding: var(--sp-spacing-md) var(--sp-spacing-xl);
    background-color: var(--auth-brand-dark);
    color: var(--sp-bg-white);
    border: none;
    border-radius: var(--sp-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Inter', sans-serif;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
}

.auth-btn:hover {
    background-color: var(--sp-text-secondary);
}

/* Additional Links */
.auth-additional-links {
    margin-top: var(--sp-spacing-xl);
    text-align: center;
}

.auth-additional-links a {
    display: block;
    color: var(--sp-bg-white);
    font-size: 0.75rem;
    text-decoration: none;
    margin-top: var(--sp-spacing-sm);
    font-family: 'Inter', sans-serif;
}

.auth-additional-links a:hover {
    opacity: 0.8;
}

/* Admin Badge - Only admin-specific override */
.admin-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--auth-badge-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--auth-badge-text);
    font-weight: bold;
    border: 2px solid var(--sp-bg-white);
}

/* Admin form uses same classes as student auth for consistency */

/* Password Strength Indicator */
.password-strength-container {
    margin-bottom: var(--sp-spacing-xl);
    padding: var(--sp-spacing-sm);
    border-radius: var(--sp-radius-sm);
    background-color: rgba(255, 255, 255, 0.1);
}

.password-strength-meter {
    height: 4px;
    border-radius: 2px;
    margin-top: var(--sp-spacing-sm);
    transition: all 0.3s;
    background-color: #e5e7eb;
}

.password-strength-weak { background-color: var(--bs-danger); }
.password-strength-fair { background-color: var(--bs-warning); }
.password-strength-good { background-color: var(--bs-success); }
.password-strength-strong { background-color: var(--bs-success); }

/* Form Feedback */
.auth-form-feedback {
    font-size: 0.75rem;
    margin-top: var(--sp-spacing-xs);
    color: var(--sp-bg-white);
    opacity: 0;
    transition: opacity 0.3s;
}

.auth-form-feedback.show {
    opacity: 1;
}

.auth-form-floating .form-control.is-valid {
    border-color: var(--bs-success);
}

.auth-form-floating .form-control.is-invalid {
    border-color: var(--bs-danger);
}

/* Enhanced Status Pages */
.status-container {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    padding: var(--sp-spacing-xl);
    border-radius: var(--sp-radius-md);
    background-color: var(--sp-bg-white);
    box-shadow: var(--sp-shadow-box-md);
}

/* Auth Status Card - Centered in viewport */
.auth-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--sp-bg-white);
    border-radius: var(--sp-radius-xl);
    padding: var(--sp-spacing-xl);
    box-shadow: var(--sp-shadow-box-lg);
    width: 100%;
    max-width: calc(100% - 2rem);
    margin: 0 auto;
}

.auth-status-action {
    width: 100%;
    margin-top: var(--sp-spacing-lg);
    text-align: center;
}

.auth-status-action .auth-btn {
    min-height: 48px;
    height: auto;
    text-align: center;
    line-height: 1.4;
    padding: var(--sp-spacing-md) var(--sp-spacing-lg);
    white-space: normal;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Icon */
    width: 80px;
    height: 80px;
    margin: 0 auto var(--sp-spacing-lg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.status-icon.success { 
    background-color: var(--bs-success); 
    color: var(--sp-bg-white); 
}

.status-icon.error { 
    background-color: var(--bs-danger); 
    color: var(--sp-bg-white); 
}

.status-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--auth-brand-dark);
    margin-bottom: var(--sp-spacing-lg);
    font-family: 'Inter', sans-serif;
}

.status-message {
    font-size: 1rem;
    color: var(--sp-text-secondary);
    margin-bottom: var(--sp-spacing-lg);
    font-family: 'Inter', sans-serif;
}

.status-action {
    display: inline-block;
    padding: var(--sp-spacing-md) var(--sp-spacing-lg);
    background-color: #3FB6DC;
    color: var(--sp-bg-white);
    border-radius: var(--sp-radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s;
}

.status-action:hover {
    background-color: #3FA5DC;
}

.status-action.me-2 {
    margin-left: var(--sp-spacing-xl);
}

/* Responsive Design */
@media (max-width: 479px) {
    .auth-btn {
        font-size: 0.875rem;
        padding: var(--sp-spacing-sm) var(--sp-spacing-md);
        min-height: 44px;
    }
    
    .auth-status-action .auth-btn {
        font-size: 0.875rem;
        padding: var(--sp-spacing-sm) var(--sp-spacing-md);
        min-height: 44px;
    }
}

@media (min-width: 768px) {
    .auth-container {
        flex-direction: row;
    }

    .auth-branding {
        width: 50%;
        padding: 3rem;
    }

        .auth-logo {
            width: clamp(80px, 15vw, 120px);
            height: clamp(80px, 15vw, 120px);
        }

        .auth-brand-text .welcome {
            font-size: clamp(1.25rem, 2.5vw, 1.5rem);
        }

        .auth-brand-text .brand-name {
            font-size: clamp(2rem, 4vw, 2.5rem);
        }

    .auth-form-section {
        width: 50%;
        padding: 3rem;
    }

    .auth-form-container {
        max-width: 360px;
    }
    
    .auth-status-card {
        max-width: 320px;
    }
}