/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============================================
   LEFT SIDE (Hero)
   ============================================ */
.auth-left {
    flex: 1;
    background: var(--gradient-bg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

.logo-link {
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.auth-hero {
    margin-top: 4rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.auth-hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

/* ============================================
   RIGHT SIDE (Form)
   ============================================ */
.auth-right {
    flex: 1;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
}

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

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

.auth-header h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ============================================
   SOCIAL AUTH BUTTONS
   ============================================ */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    padding: 0.9rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

.google-btn {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd;
}

.google-btn:hover {
    background: #f8f9fa !important;
}

.apple-btn:hover {
    border-color: #000000;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--bg-card);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   FORM STYLES
   ============================================ */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-form .input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.auth-form .form-control::placeholder {
    color: var(--text-secondary);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary-purple);
}

/* ============================================
   CHECKBOX
   ============================================ */
.form-check {
    margin-bottom: 2rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-darker);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-check-label {
    margin-left: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-check-label a {
    color: var(--primary-purple);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-purple);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   AUTH FOOTER
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    margin: 0;
}

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

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

/* ============================================
   FORGOT PASSWORD LINK
   ============================================ */
.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: var(--primary-purple);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left {
        min-height: 300px;
        padding: 2rem;
    }
    
    .auth-hero {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .auth-hero h2 {
        font-size: 2rem;
    }
    
    .auth-hero p {
        font-size: 1rem;
    }
    
    .auth-image {
        display: none;
    }
    
    .auth-right {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .auth-left {
        padding: 1.5rem;
    }
    
    .auth-hero h2 {
        font-size: 1.8rem;
    }
    
    .auth-right {
        padding: 1.5rem;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PASSWORD STRENGTH INDICATOR (Optional)
   ============================================ */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
    background: #EF4444;
}

.strength-fill.weak {
    width: 33%;
    background: #EF4444;
}

.strength-fill.medium {
    width: 66%;
    background: #F59E0B;
}

.strength-fill.strong {
    width: 100%;
    background: #10B981;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
/* ============================================
   PASSWORD STRENGTH INDICATOR
   ============================================ */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-progress {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-progress.weak {
    background-color: #dc3545;
}

.strength-progress.medium {
    background-color: #ffc107;
}

.strength-progress.strong {
    background-color: #28a745;
}

.strength-progress.very-strong {
    background-color: #28a745;
    background-image: linear-gradient(45deg, rgba(255,255,255,.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.2) 75%, transparent 75%, transparent);
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

/* ============================================
   FORM OPTIONS (Remember me + Forgot password)
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color, #8B5CF6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-hover, #7C3AED);
    text-decoration: underline;
}

/* ============================================
   LOADING STATE
   ============================================ */
.btn-submit {
    position: relative;
}

.btn-loader {
    display: none;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   FORM VALIDATION
   ============================================ */
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}

.form-check-input.is-invalid ~ .form-check-label {
    color: #dc3545;
}

.form-check-input.is-invalid {
    border-color: #dc3545;
}

/* ============================================
   ALERT STYLES
   ============================================ */
#alertContainer {
    margin-bottom: 20px;
}

#alertContainer .alert {
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d1f2eb;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .forgot-password {
        margin-left: 0;
    }
}

/* ============================================
   FORGOT PASSWORD LINK
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-password {
    font-size: 14px;
    font-weight: 500;
    color: #8B5CF6;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B5CF6, #7C3AED);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #7C3AED;
}

.forgot-password:hover::after {
    width: 100%;
}

/* ============================================
   FORGOT PASSWORD PAGE
   ============================================ */
.forgot-password-container {
    max-width: 480px;
    margin: 0 auto;
}

.forgot-password-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    }
}

.forgot-password-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    text-align: center;
}

.forgot-password-header p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.6;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.back-to-login i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-to-login:hover {
    color: #8B5CF6;
}

.back-to-login:hover i {
    transform: translateX(-4px);
}

/* Success State */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h4 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.success-message p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.6;
}

.email-sent-to {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f1f5f9;
    border-radius: 8px;
    font-weight: 500;
    color: #8B5CF6;
    margin-bottom: 24px;
}

/* Resend Timer */
.resend-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.resend-timer {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.resend-timer .countdown {
    font-weight: 600;
    color: #8B5CF6;
}

.btn-resend {
    background: transparent;
    border: 2px solid #8B5CF6;
    color: #8B5CF6;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-resend:hover:not(:disabled) {
    background: #8B5CF6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Email Icon Animation */
.email-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.email-animation i {
    font-size: 60px;
    color: #8B5CF6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.email-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Instructions Box */
.instructions-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f5ff 100%);
    border-left: 4px solid #8B5CF6;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.instructions-box h5 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.instructions-box h5 i {
    margin-right: 8px;
    color: #8B5CF6;
}

.instructions-box ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.instructions-box li {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.instructions-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #8B5CF6;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .forgot-password {
        margin-top: 8px;
    }
    
    .forgot-password-header h3 {
        font-size: 24px;
    }
    
    .forgot-password-icon,
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Loading State for Submit Button */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    display: inline-block;
}

/* Check Inbox Illustration */
.check-inbox-illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    position: relative;
}

.check-inbox-illustration svg {
    width: 100%;
    height: 100%;
}

/* Spam Folder Notice */
.spam-notice {
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    display: flex;
    align-items: start;
}

.spam-notice i {
    color: #f59e0b;
    margin-right: 12px;
    font-size: 18px;
    margin-top: 2px;
}

.spam-notice p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

.spam-notice strong {
    color: #78350f;
}

/* ============================================
   PASSWORD REQUIREMENTS
   ============================================ */
.password-requirements {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.password-requirements h6 {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.password-requirements li i {
    font-size: 8px;
    margin-right: 8px;
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.password-requirements li.valid {
    color: #059669;
}

.password-requirements li.valid i {
    color: #059669;
}

.password-requirements li.invalid {
    color: #dc2626;
}

.password-requirements li.invalid i {
    color: #dc2626;
}

/* ============================================
   SUCCESS DETAILS
   ============================================ */
.success-details {
    margin: 24px 0;
}

.success-item {
    display: flex;
    align-items: start;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.success-item i {
    font-size: 24px;
    color: #059669;
    margin-right: 16px;
    margin-top: 4px;
}

.success-item strong {
    display: block;
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 4px;
}

.success-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.redirect-message {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-top: 20px;
}

.redirect-message strong {
    color: #8B5CF6;
    font-weight: 600;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
}

.success-icon i {
    animation: checkmark 0.6s ease;
}