/* ===================================
   Authentication Pages Styles
   =================================== */

.auth-page {
    min-height: 100vh;
    background: var(--dark-bg);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Left Side - Branding */
.auth-left {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.auth-branding {
    position: relative;
    z-index: 2;
}

.logo-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-large i {
    font-size: 4rem;
    color: white;
    animation: float 3s ease-in-out infinite;
}

.logo-large h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.tagline {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 1.1rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: #10b981;
}

.auth-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2;
}

#authCanvas {
    width: 100%;
    height: 100%;
}

/* Right Side - Form */
.auth-right {
    background: var(--dark-bg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 500px;
}

.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-link a:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    padding: 1rem;
    background: var(--dark-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--danger);
    transition: all 0.3s ease;
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    display: none;
}

.form-group.error input {
    border-color: var(--danger);
}

.form-group.error .error-message {
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-group {
    margin-top: -0.5rem;
}

.checkbox-group .checkbox-container {
    font-size: 0.9rem;
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--secondary-color);
}

.btn-submit {
    padding: 1.2rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    position: relative;
    background: var(--dark-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: var(--dark-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.social-btn.google:hover {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.social-btn.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-btn i {
    font-size: 1.2rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Security Notice */
.security-notice {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--success);
    font-size: 0.9rem;
}

.security-notice i {
    font-size: 1.2rem;
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
}

.btn-submit.loading span {
    opacity: 0;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Success Message */
.success-message {
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.success-message i {
    font-size: 1.5rem;
}

/* Error Alert */
.error-alert {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.error-alert i {
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        padding: 2rem 1.5rem;
    }
    
    .auth-form-container {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .auth-header h2 {
        font-size: 2rem;
    }
    
    .auth-form {
        gap: 1rem;
    }
    
    .form-group input,
    .btn-submit {
        padding: 0.9rem 1rem;
    }
    
    .social-btn {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
