:root {
    --primary: #0052EA;
    --primary-hover: #003eb3;
    --navy: #03113D;
    --text-main: #0f172a;
    --text-muted: #64748B;
    --bg-body: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --error: #ef4444;
    --success-color: #057A55;
    --radius-md: 12px;
    --radius-lg: 16px;
}

*, *::before, *::after {
    font-family: 'Sora', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

input, button, select, textarea, label, a {
    font-family: 'Sora', sans-serif;
}

/* Layout Setup */
.authPage { display: flex; min-height: 100vh; flex-direction: row-reverse; }

/* Right Carousel Panel */
.authRight {
    display: none;
    flex: 1;
    background: var(--navy);
    color: #fff;
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}
@media (min-width: 900px) { .authRight { display: flex; } }

.authRight::before {
    content: ''; 
    position: absolute; 
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(0, 82, 234, 0.15) 0%, transparent 50%);
    z-index: 1; pointer-events: none;
}

.carouselWrap { max-width: 480px; margin: 0 auto; z-index: 2; }
.cSlide { display: none; animation: fadeIn 0.5s ease; }
.cSlide.show { display: block; }
.slideTitle { font-size: 32px; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.slideDesc { font-size: 16px; color: #cbd5e1; line-height: 1.6; }
.cDots { display: flex; gap: 8px; margin-top: 40px; }
.cDot { width: 32px; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.2); border: none; cursor: pointer; transition: 0.3s; }
.cDot.on { background: var(--primary); width: 48px; }

/* Left Form Panel */
.authLeft {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    background: var(--bg-white); padding: 24px; box-shadow: -10px 0 30px rgba(0,0,0,0.03); z-index: 5;
}
.authInner { width: 100%; max-width: 440px; margin: 0 auto; }
.logoWrap { margin-bottom: 40px; text-align: left; }
.logoText { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.logoText span { color: var(--primary); }

/* Panel Logic */
.panel { display: none; }
.panel.show { display: block; animation: panelIn 0.25s ease forwards; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.panelTitle { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--navy); letter-spacing: -0.5px; }
.panelSub { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; font-weight: 400; }

/* Form Fields */
.field { margin-bottom: 16px; }
.field-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.field-header .fieldLabel { margin-bottom: 0 !important; }
.field-bottom-gap { margin-bottom: 24px; }
.fieldLabel { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }

.inputWrap { position: relative; display: flex; align-items: center; }
.inputIcon { position: absolute; left: 16px; color: #94a3b8; width: 20px; height: 20px; transition: 0.3s; }
.inputField {
    width: 100%; padding: 16px 16px 16px 48px; background: #fff;
    border: 1.5px solid var(--border-color); border-radius: var(--radius-lg);
    font-size: 15px; font-weight: 600; color: var(--navy); transition: all 0.3s ease; outline: none;
}
.inputField::placeholder { color: #94a3b8; font-weight: 400; }
.inputField:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 82, 234, 0.1); }
.inputField:focus + .inputIcon, .inputWrap:focus-within .inputIcon { color: var(--primary); }

.eyeBtn { position: absolute; right: 16px; background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.eyeBtn:active { opacity: 0.6; }

.phonePrefix { position: absolute; left: 48px; font-weight: 600; color: var(--navy); font-size: 15px; border-right: 1.5px solid var(--border-color); padding-right: 10px; line-height: 1; }
.phoneInput { padding-left: 95px !important; }
.twoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Custom Checkbox */
.remember-wrap { margin-top: 10px; margin-bottom: 24px; display: flex; align-items: center; }
.custom-checkbox { display: flex; align-items: center; cursor: pointer; user-select: none; gap: 10px; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { width: 18px; height: 18px; background-color: #f9fafb; border: 1.5px solid #d1d5db; border-radius: 5px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.custom-checkbox:hover input ~ .checkmark { border-color: var(--primary); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark::after { content: ""; display: none; width: 4px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.custom-checkbox input:checked ~ .checkmark::after { display: block; }
.rem-text { font-size: 13px; color: #4b5563; font-weight: 600; }

/* Errors & Feedback */
.errMsg { color: var(--error); font-size: 12px; font-weight: 600; display: block; margin-top: 6px; }
.errMsg:empty { display: none; }
.errTop { display: block; color: var(--error); font-size: 14px; margin-bottom: 16px; font-weight: 600; text-align: center; background: #fef2f2; border-radius: 8px; transition: 0.3s; padding: 0; }
.errTop:not(:empty) { padding: 12px; }

/* Password Strength Bar */
.strBar { display: flex; gap: 4px; margin-top: 10px; }
.strSeg { height: 4px; flex: 1; border-radius: 2px; background: var(--border-color); transition: 0.3s; }
.strSeg.s1 { background-color: #E02424; }
.strSeg.s2 { background-color: #D97706; }
.strSeg.s3 { background-color: #2563EB; }
.strSeg.s4 { background-color: var(--success-color); }
.strHint { font-size: 12px; margin-top: 6px; color: var(--text-muted); text-align: right; font-weight: 600; }

/* Buttons & Links */
.submitBtn { width: 100%; background: var(--primary); color: #fff; padding: 18px; border: none; border-radius: var(--radius-lg); font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s ease; margin-top: 12px; box-shadow: 0 4px 12px rgba(0, 82, 234, 0.2); -webkit-tap-highlight-color: transparent; }
.submitBtn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 82, 234, 0.3); }
.submitBtn:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(0, 82, 234, 0.2); }
.submitBtn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.switchLine { text-align: center; margin-top: 32px; color: var(--text-muted); font-size: 15px; }
.switchBtn { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 15px; margin-left: 4px; -webkit-tap-highlight-color: transparent; }
.switchBtn:hover { text-decoration: underline; }
.switchBtn:active { opacity: 0.6; }
.forgot-link { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }
.forgot-link:hover { text-decoration: underline; }

/* Forgot Password Enhancements */
.fp-success-card { display: none; text-align: center; padding: 8px 0 4px; animation: panelIn 0.3s ease forwards; }
.fp-success-card.show { display: block; }
.fp-envelope { width: 72px; height: 72px; background: linear-gradient(135deg, #0052EA 0%, #003cb3 100%); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 8px 24px rgba(0,82,234,0.3); animation: envPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes envPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fp-envelope svg { width: 32px; height: 32px; color: #fff; }
.fp-email-pill { display: inline-flex; align-items: center; gap: 6px; background: #f0f4ff; border: 1px solid #c7d7ff; border-radius: 20px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: #1e3a8a; margin: 12px 0 20px; }
.fp-email-pill svg { width: 14px; height: 14px; }
.fp-change-link { font-size: 13px; color: var(--primary); cursor: pointer; background: none; border: none; text-decoration: underline; font-weight: 600; display: inline-block; margin-bottom: 20px; }
.fp-resend-wrap { margin-top: 4px; }
.fp-resend-btn { background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--primary); padding: 0; text-decoration: underline; transition: opacity 0.15s; }
.fp-resend-btn:disabled { color: #94a3b8; cursor: not-allowed; text-decoration: none; }
.fp-resend-btn:not(:disabled):active { opacity: 0.6; }
.fp-countdown { font-size: 13px; color: #6b7280; }
.fp-countdown strong { color: #374151; }
.fp-divider { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }
.fp-rate-badge { display: none; background: #fef3c7; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #92400e; font-weight: 600; margin-bottom: 14px; text-align: center; }
.fp-rate-badge.show { display: block; animation: panelIn 0.2s ease; }

/* Loading Spinner for Buttons */
.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.submitBtn.loading .btn-spinner { display: inline-block; }
.submitBtn.loading .btn-label { opacity: 0.7; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
    .authLeft { padding: 32px 20px; justify-content: flex-start; }
    .logoWrap { text-align: center; margin-bottom: 30px; margin-top: 20px; }
    .panelTitle { font-size: 24px; text-align: center; }
    .panelSub { text-align: center; }
}