/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1000px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-height: 95vh;
}

/* Left Side (Form) */
.login-left {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 20px;
    text-decoration: none;
    cursor: pointer;
    width: fit-content;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-container:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.logo-icon {
    width: 70px;
    height: 50px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #0056b3;
}

.logo-text::after {
    content: 'Bridge';
    color: #f58220;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #042a47;
    margin-bottom: 12px;
}

.welcome-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.input-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
}

.input-wrapper input,
.input-wrapper select {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #1e293b;
    padding-left: 12px;
    font-family: inherit;
    width: 100%;
}

.input-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.select-arrow {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    position: absolute;
    right: 16px;
    pointer-events: none;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #1e293b;
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #042a47;
}

.forgot-password {
    font-size: 14px;
    font-weight: 600;
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #042a47;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    background-color: #042a47;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-bottom: 16px;
}

.submit-btn:hover {
    background-color: #031c30;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
}

.register-link {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.register-link a {
    color: #f58220;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #d97018;
    text-decoration: underline;
}

/* Right Side (Info) */
.login-right {
    flex: 1;
    background-color: #042a47;
    color: #ffffff;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
}

/* Add a subtle background pattern or gradient */
.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 0%, rgba(245, 130, 32, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(0, 86, 179, 0.2) 0%, transparent 50%);
    z-index: 1;
}

.hero-image-container {
    width: 100%;
    max-width: 360px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    max-height: 250px;
    object-fit: cover;
    opacity: 0.95;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.03);
    opacity: 1;
}

.right-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.2px;
    z-index: 2;
}

.right-subtitle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14.5px;
    color: #cbd5e1;
    text-align: center;
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 24px auto;
    z-index: 2;
    font-weight: 400;
    opacity: 0.95;
}

.right-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    width: 100%;
}

.features-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 9999px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
    user-select: none;
}

.feature-tag:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.feature-tag svg {
    flex-shrink: 0;
}

/* Animations */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 600px;
    }

    .login-right {
        padding: 40px 30px;
    }

    .hero-image-container {
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .login-left {
        padding: 40px 20px;
    }

    .welcome-title {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ==========================================================================
   Forgot Password Modal & Multi-Step Flow Styles
   ========================================================================== */

.fp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 42, 71, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.fp-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fp-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 36px 32px;
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 92vh;
    overflow-y: auto;
    text-align: center;
}

.fp-modal-overlay.show .fp-modal-card {
    transform: translateY(0) scale(1);
}

.fp-close-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fp-close-btn:hover {
    background: #e2e8f0;
    color: #042a47;
    transform: rotate(90deg);
}

/* Step Progress Indicator */
.fp-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0 20px;
}

.fp-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.fp-step-dot.active {
    background: #0056b3;
    width: 28px;
    border-radius: 6px;
}

.fp-step-dot.completed {
    background: #10b981;
}

.fp-step-line {
    flex: 1;
    max-width: 40px;
    height: 2px;
    background: #e2e8f0;
    transition: background 0.3s ease;
}

.fp-step-line.active {
    background: #10b981;
}

/* Step Views */
.fp-step-view {
    display: none;
    animation: fpFadeIn 0.35s ease forwards;
}

.fp-step-view.active {
    display: block;
}

@keyframes fpFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Icon */
.fp-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(0, 86, 179, 0.1);
    color: #0056b3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.fp-header-icon svg {
    width: 28px;
    height: 28px;
}

.fp-header-icon.fp-otp-icon {
    background: rgba(245, 130, 32, 0.12);
    color: #f58220;
}

.fp-header-icon.fp-success-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.fp-title {
    font-size: 22px;
    font-weight: 700;
    color: #042a47;
    margin-bottom: 8px;
}

.fp-subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.fp-highlight-email {
    color: #042a47;
    font-weight: 600;
    word-break: break-all;
}

/* OTP 6-Box Grid */
.otp-inputs-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 16px;
}

.otp-box {
    width: 48px;
    height: 56px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #042a47;
    background-color: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.otp-box:focus {
    border-color: #0056b3;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.12);
    transform: translateY(-2px);
}

.otp-box.filled {
    border-color: #042a47;
    background-color: #ffffff;
}

.otp-box.error {
    border-color: #ef4444;
    background-color: #fef2f2;
    animation: shake 0.4s ease;
}

/* Verified Email Badge in Step 3 */
.fp-verified-email-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 22px;
    text-align: left;
}

.fp-verified-email-badge svg {
    width: 24px;
    height: 24px;
    color: #16a34a;
    flex-shrink: 0;
}

.fp-badge-text {
    display: flex;
    flex-direction: column;
}

.fp-badge-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #15803d;
    font-weight: 600;
}

.fp-verified-email-badge strong {
    font-size: 14px;
    color: #0f172a;
    word-break: break-all;
}

/* Action Button & Links */
.fp-action-btn {
    margin-top: 10px;
    margin-bottom: 12px;
}

.fp-error-msg {
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
    display: block;
    text-align: left;
    min-height: 18px;
}

.fp-text-btn {
    background: none;
    border: none;
    color: #0056b3;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.fp-text-btn:hover {
    color: #042a47;
}

.fp-resend-wrapper {
    font-size: 14px;
    color: #64748b;
    margin-top: 12px;
}

.fp-timer-text {
    color: #94a3b8;
    font-weight: 600;
    margin-left: 4px;
}

.fp-footer-link {
    font-size: 14px;
    color: #64748b;
    margin-top: 14px;
}

.fp-footer-link a {
    color: #0056b3;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.fp-footer-link a:hover {
    text-decoration: underline;
}

/* Modal Responsive */
@media (max-width: 480px) {
    .fp-modal-card {
        padding: 28px 20px;
    }

    .otp-inputs-wrapper {
        gap: 6px;
    }

    .otp-box {
        width: 38px;
        height: 48px;
        font-size: 20px;
        border-radius: 8px;
    }
}