/* Modern Authentication Pages Styling */

/* Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    overflow-y: auto;
}

/* Container */
.auth-container {
    display: flex;
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-height: 650px;
    position: relative;
}

/* Brand Side */
.auth-brand-side {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

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

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
}

.brand-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 50px;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 500;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Form Side */
.auth-form-side {
    flex: 1;
    padding: 60px 50px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}

.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    z-index: 10;
}

.auth-close a {
    color: #999;
    text-decoration: none;
}

.auth-close:hover,
.auth-close a:hover {
    color: #333;
}

.auth-form-content {
    max-width: 400px;
    margin: 0 auto;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.auth-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

/* Social Auth Buttons */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn svg {
    flex-shrink: 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #9ca3af;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 15px;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f3f4f6;
    padding: 5px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2937;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-hint {
    font-size: 13px;
    color: #6b7280;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Alert */
.alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert p {
    margin: 0;
}

/* Button */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 15px;
    color: #6b7280;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* reCAPTCHA */
.g-recaptcha,
#recaptcha-container,
#recaptcha-container-signup {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

/* OTP Input Styling */
.otp-input-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Timer */
#timer {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin: 15px 0;
}

#countdown {
    font-weight: bold;
    color: #667eea;
}

/* OTP Page Specific */
.otp-container {
    max-width: 900px;
}

.otp-form-content {
    text-align: center;
}

.otp-icon {
    margin: 0 auto 30px;
    width: 80px;
    height: 80px;
}

.otp-phone-display {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 30px;
}

.otp-timer-section {
    text-align: center;
    margin: 20px 0;
}

.otp-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #667eea;
    border-radius: 12px;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn:hover {
    background: #667eea;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-brand-side {
        display: none;
    }
    
    .auth-container {
        max-width: 500px;
    }
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: 0;
    }
    
    .auth-container {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .auth-form-side {
        padding: 40px 25px;
    }
    
    .auth-title {
        font-size: 28px;
    }
    
    .social-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}

/* Loading State */
.btn:disabled::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Transitions */
* {
    box-sizing: border-box;
}

input, button, select, textarea {
    font-family: inherit;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
