/* ===============================================
Auth Page & Modal Css Start
=============================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(var(--ColorPrimaryRGB), 0.05) 0%, rgba(var(--ColorSecondaryRGB), 0.05) 100%),
        url('https://images.unsplash.com/photo-1495020689067-958852a7765e?q=80&w=2069&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 80px 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: var(--ColorPrimary);
    border-radius: 18px;
    /* Modern squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px var(--ColorPrimaryAlpha);
    transform: rotate(-5deg);
    /* Playful tilt */
}

.auth-logo i {
    font-size: 30px;
    color: white;
}

.auth-title {
    font-size: 24px;
    color: var(--ColorDarkPrimary);
    margin-bottom: 8px;
    font-weight: 800;
    font-family: var(--FontPrimary);
}

.auth-subtitle {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Modal Specific Adjustments */
.modal-content.auth-modal {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header.auth-modal-header {
    background: var(--BgPrimaryBanner);
    border: none;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* Modern Form Controls */
.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ColorDarkPrimary);
    margin-bottom: 8px;
    display: block;
    font-family: var(--FontPrimary);
}

.form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.3s ease;
    color: var(--ColorDarkPrimary);
}

.form-control:focus {
    background: #fff;
    border-color: var(--ColorPrimary);
    box-shadow: 0 0 0 4px var(--ColorPrimaryAlpha);
    outline: none;
}

.password-wrapper .form-control {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.3s ease;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--ColorPrimary);
    background: transparent;
}

/* Segmented Tabs (Login/Register Tabs) */
.login-tabs,
.contact-nav {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 25px;
    gap: 5px;
}

.login-tab,
.contact-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    border-radius: 10px;
    transition: all 0.33s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-tab i,
.contact-tab i {
    font-size: 16px;
}

.login-tab.active,
.contact-tab.active {
    background: white;
    color: var(--ColorPrimary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.divider span {
    position: relative;
    z-index: 2;
    background: white;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

/* Social Login Buttons */
.social-login .btn {
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: var(--ColorDarkPrimary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-login .btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.social-login .btn i {
    font-size: 18px;
}

.social-login .btn i.fa-google {
    color: #ea4335;
}

.social-login .btn i.fa-facebook-f {
    color: #1877f2;
}

/* multi-step indicators */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 10px;
}

/* Background Line */
.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

/* Active Progress Line */
.step-indicator::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 30px;
    height: 3px;
    background: var(--ColorPrimary);
    z-index: 1;
    transition: width 0.4s ease;
}

/* Dynamic Widths based on JS data-step attribute */
.step-indicator[data-step="1"]::after {
    width: 0%;
}

.step-indicator[data-step="2"]::after {
    width: calc(50% - 30px);
}

.step-indicator[data-step="3"]::after {
    width: calc(100% - 60px);
}

.step-indicator .step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
    transition: all 0.4s ease;
}

.step.active .step-number {
    border-color: var(--ColorPrimary);
    background: var(--ColorPrimary);
    color: white;
    box-shadow: 0 0 0 5px var(--ColorPrimaryAlpha);
}

.step.completed .step-number {
    background: var(--ColorSecondary);
    border-color: var(--ColorSecondary);
    color: white;
}

.step-label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.step.active .step-label {
    color: var(--ColorPrimary);
}

/* Visibility Utilities for Steps and Tabs */
.tab-pane,
.tab-content,
.registration-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active,
.tab-content.active {
    display: block;
}

.registration-step:not(.hidden) {
    display: block;
}

.hidden {
    display: none !important;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OTP Input Specifics */
.otp-boxes {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.otp-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--ColorDarkPrimary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.otp-box:focus {
    border-color: var(--ColorPrimary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 0 4px var(--ColorPrimaryAlpha);
    transform: translateY(-4px);
    outline: none;
}

.otp-box.filled {
    border-color: var(--ColorPrimary);
    background: #f0fdf4;
    /* Very light green tint */
}

.otp-box.error {
    border-color: #ef4444;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Helper Text Badge */
.otp-help {
    text-align: center;
    margin-top: 15px;
}

.otp-help-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.otp-help-badge strong {
    color: var(--ColorPrimary);
    font-weight: 700;
}

/* Utils */
.remember-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.remember-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ColorPrimary);
}

.text-link {
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--ColorSecondary) !important;
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* ===============================================
Auth Page & Modal Css End
=============================================== */


/* ===============================================
Form Error & Message System
=============================================== */

/* --- Invalid Form Controls --- */
.is-invalid {
    border-color: #ef4444 !important;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    transition: none !important;
}

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

/* --- Error Messages --- */

/* Base error message - for inline field errors */
.error-message {
    display: none;
    margin-top: 6px;
    color: #ef4444;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    border-radius: 8px;
    animation: slideInDown 0.3s ease-out;
}

/* Show error message when not hidden */
.error-message:not(.hidden) {
    display: block !important;
}

.error-message i {
    margin-right: 6px;
    color: #ef4444;
}

.error-message .error-text {
    display: block;
}

/* Support for multiple errors in error-text */
.error-message .error-text>div {
    margin-top: 4px;
    line-height: 1.4;
}

.error-message .error-text>div:first-child {
    margin-top: 0;
}

/* General error message - for form-level errors */
.error-message.general {
    display: block;
    margin-top: 0;
    margin-bottom: 25px;
    background: #fef2f2;
    color: #991b1b;
    padding: 15px 20px;
    border-left: 5px solid #ef4444;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

.error-message.general.hidden {
    display: none;
}

/* Bootstrap-style invalid feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 8px;
    font-size: var(--FontSizeExtraSmall, 14px);
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #dc3545;
    animation: slideInDown 0.3s ease-out;
}

/* --- Success Messages --- */
.success-message {
    display: block;
    background: #efe;
    color: #363;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: var(--FontSizeExtraSmall, 14px);
    border-left: 4px solid #363;
    animation: slideInDown 0.5s ease-out;
}

.success-message.hidden {
    display: none;
}

.success-message i {
    margin-right: 8px;
    color: #363;
}

/* --- Warning Messages --- */
.warning-message {
    display: block;
    background: #fffbeb;
    color: #92400e;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: var(--FontSizeExtraSmall, 14px);
    border-left: 4px solid #f59e0b;
    animation: slideInDown 0.5s ease-out;
}

.warning-message.hidden {
    display: none;
}

.warning-message i {
    margin-right: 8px;
    color: #f59e0b;
}

/* --- Info Messages --- */
.info-message {
    display: block;
    background: #eff6ff;
    color: #1e40af;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: var(--FontSizeExtraSmall, 14px);
    border-left: 4px solid #3b82f6;
    animation: slideInDown 0.5s ease-out;
}

.info-message.hidden {
    display: none;
}

.info-message i {
    margin-right: 8px;
    color: #3b82f6;
}

/* --- Animations --- */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
Form Error & Message System End
=============================================== */