/* =============================================
   AUTHENTICATION PAGES STYLING
   Login, Register, Forgot Password
   ============================================= */

/* CSS Variables */
:root {
    --brand-gold: #D4AF37;
    --brand-navy: #1a2332;
    --brand-teal: #1e4d5f;
    --brand-white: #ffffff;
    --brand-gray-light: #f7f8fa;
    --brand-gray-medium: #4a5568;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-teal) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Main Container - Split Layout */
.auth-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    min-height: 600px;
    background: var(--brand-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Left Side - Welcome Section */
.auth-welcome {
    flex: 1;
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.95) 0%, rgba(30, 77, 95, 0.95) 100%),
                url('/assets/chart-background.jpg') center/cover;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--brand-white);
    position: relative;
}

.auth-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,100 600,250 T1200,300 L1200,600 L0,600 Z" fill="rgba(212,175,55,0.05)"/></svg>') bottom/cover no-repeat;
    opacity: 0.3;
}

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

.auth-welcome h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-logo {
    max-width: 280px;
    height: auto;
    margin: 30px 0;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.auth-welcome-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 400px;
    margin: 0 auto;
}

/* Right Side - Form Section */
.auth-form-section {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--brand-white);
}

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

.auth-form-header {
    margin-bottom: 30px;
}

.auth-form-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin-bottom: 10px;
}

.auth-form-subtitle {
    font-size: 1rem;
    color: var(--brand-gray-medium);
}

/* Alert Messages */
.auth-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.auth-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.auth-alert i {
    font-size: 1.2rem;
}

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

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

.auth-input-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 54px;
    background: var(--brand-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px 0 0 10px;
    color: var(--brand-navy);
    font-size: 1.2rem;
}

.auth-input-label {
    position: absolute;
    left: 60px;
    top: -8px;
    background: var(--brand-white);
    padding: 0 8px;
    font-size: 0.75rem;
    color: var(--brand-gray-medium);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.auth-input {
    width: 100%;
    padding: 16px 16px 16px 60px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.auth-input:focus {
    outline: none;
    border-color: var(--brand-gold);
    background: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

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

/* Select Dropdown */
.auth-select {
    width: 100%;
    padding: 16px 16px 16px 60px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.auth-select:focus {
    outline: none;
    border-color: var(--brand-gold);
    background-color: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--brand-gray-medium);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--brand-gold);
}

/* Remember Me Checkbox */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-gold);
}

.auth-checkbox-label {
    font-size: 0.95rem;
    color: var(--brand-navy);
    cursor: pointer;
    user-select: none;
}

/* reCAPTCHA */
.auth-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--brand-gold) 0%, rgba(212, 175, 55, 0.9) 100%);
    color: var(--brand-navy);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #c19d2e 0%, #D4AF37 100%);
}

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

/* Footer Links */
.auth-footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.auth-link {
    color: var(--brand-gray-medium);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.auth-link:hover {
    color: var(--brand-gold);
}

.auth-link-primary {
    color: var(--brand-gold);
    font-weight: 600;
}

.auth-link-primary:hover {
    color: var(--brand-navy);
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: var(--brand-white);
    padding: 0 15px;
    position: relative;
    color: var(--brand-gray-medium);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .auth-welcome {
        padding: 40px 30px;
        min-height: 300px;
    }
    
    .auth-welcome h1 {
        font-size: 2rem;
    }
    
    .auth-logo {
        max-width: 200px;
        margin: 20px 0;
    }
    
    .auth-form-section {
        padding: 40px 30px;
    }
    
    .auth-form-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-container {
        border-radius: 15px;
    }
    
    .auth-welcome {
        padding: 30px 20px;
    }
    
    .auth-welcome h1 {
        font-size: 1.6rem;
    }
    
    .auth-form-section {
        padding: 30px 20px;
    }
    
    .auth-form-title {
        font-size: 1.5rem;
    }
    
    .auth-input-icon {
        width: 45px;
        height: 50px;
    }
    
    .auth-input,
    .auth-select {
        padding: 14px 14px 14px 55px;
    }
    
    .auth-footer-links {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================
   OTP VERIFICATION PAGE STYLING
   ============================================= */

/* OTP Input Container */
.otp-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Individual OTP Digit Input */
.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    transition: all 0.3s ease;
    color: var(--brand-navy);
}

.otp-digit:focus {
    outline: none;
    border-color: var(--brand-gold);
    background: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.otp-digit:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* OTP Info Box */
.otp-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--brand-gold);
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

.otp-info-box h4 {
    color: var(--brand-navy);
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.otp-info-box p {
    color: var(--brand-gray-medium);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* OTP Timer */
.otp-timer {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
    color: var(--brand-gray-medium);
}

.otp-timer-digits {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-gold);
    margin: 0 5px;
}

.otp-timer-expired {
    color: #dc2626 !important;
}

/* OTP Resend Section */
.otp-resend-link {
    text-align: center;
    margin-top: 20px;
}

.otp-resend-link p {
    color: var(--brand-gray-medium);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--brand-gold);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95rem;
    padding: 5px 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.otp-resend-btn:hover:not(:disabled) {
    color: var(--brand-navy);
    transform: scale(1.05);
}

.otp-resend-btn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.6;
}

.otp-resend-btn i {
    font-size: 0.9rem;
}

/* OTP Success Message */
.otp-success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #10b981;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .otp-digit {
        width: 45px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .otp-input-container {
        gap: 8px;
    }
    
    .otp-timer {
        font-size: 1rem;
    }
    
    .otp-timer-digits {
        font-size: 1.3rem;
    }
}
