/* Auth pages (Login & Onboard) - split layout and grid background */
/* Prevent dark body background showing when content scrolls past viewport */
html body.auths,
html body.theme-cyan {
    min-height: 100vh;
/*    background-color: #fff;*/
    background-image:
        linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
    background-size: 24px 24px;
}
.auth-page-grid {
    background-color: #fff;
    background-image:
        linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
    background-size: 24px 24px;
}
.auth-right-panel {
    padding: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.auth-right-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Shared: Login & Onboard - left scrollable, right fixed */
.auth-single-screen .row,
.onboard-single-screen .row { height: 100%; margin: 0; }
.auth-single-screen .row > [class*="col-"],
.onboard-single-screen .row > [class*="col-"] { height: 100%; min-height: 0; }
.auth-left-col {
    padding: 24px 32px;
    overflow-y: auto;
    overflow-x: hidden;
}
.auth-form-scroll {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 24px;
}
.auth-copyright {
    font-size: 12px;
    color: #6b7280;
    padding-top: 24px;
}
/* Fixed right column (Login & Onboard): gif stays fixed, no scroll */
.auth-fixed-right-col,
.onboard-right-col {
    padding: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.auth-fixed-right-col img,
.onboard-right-col img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-step-panel { display: none; }
.auth-step-panel.active { display: block; }

/* FIXED: Progress step - horizontal layout with proper alignment */
.auth-progress-step { 
    display: flex; 
    align-items: center; 
    gap: 0;
    justify-content: flex-start;
}
.auth-progress-step .step-dot {
    width: 28px; 
    height: 28px; 
    border-radius: 50%;
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    font-size: 12px; 
    font-weight: 600;
    flex-shrink: 0;
}
.auth-progress-step .step-dot.done { background: #0B2C7B; color: #fff; }
.auth-progress-step .step-dot.current { background: #0B2C7B; color: #fff; border: 2px solid #0B2C7B; }
.auth-progress-step .step-dot.pending { background: #e5e7eb; color: #6b7280; }

/* FIXED: Progress line - consistent width between dots */
.auth-progress-line { 
    flex: 0 0 auto;
    width: 80px;
    height: 2px; 
}
.auth-progress-line.done { background: #0B2C7B; }
.auth-progress-line.pending { background: #e5e7eb; }

/* Compact step header: Back + progress in one row (professional layout) */
.onboard-step-header {
    display: flex;
    justify-content: center;   /* horizontal center */
    align-items: center;       /* vertical center */
    width: 100%;
    margin-top: 24px;
}
.onboard-back-link {
    font-size: 14px;
    color: #0B2C7B;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    padding-top: 4px;
}
.onboard-back-link:hover { color: #0B2C7B; text-decoration: underline; }
.onboard-progress-block {
    flex: 1;
    min-width: 0;
}
.onboard-progress-block .auth-progress-step { margin-bottom: 0.5rem; }
.onboard-progress-block .auth-progress-labels { margin-top: 4px; }

/* FIXED: Step labels under progress dots - properly aligned with dots */
.auth-progress-labels {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 8px;
    font-size: 11px;
    color: #6b7280;
}
.auth-progress-labels .step-label {
    flex: 0 0 auto;
    width: 108px; /* 28px dot + 80px line = 108px per section */
    text-align: left;
    padding-right: 8px;
}
.auth-progress-labels .step-label:last-child {
    width: 28px; /* Last label just covers the dot */
    flex: 1 1 auto;
}
.auth-progress-labels .step-label.done { color: #6b7280; }
.auth-progress-labels .step-label.current { color: #111827; font-weight: 600; }
.auth-progress-labels .step-label.pending { color: #9ca3af; }

/* FIXED: Step 2 buttons - Previous gray, Continue blue; placed close together */
.onboard-step2-btns {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.onboard-step2-btns .onboard-btn-prev {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    flex: 0 0 auto;
}
.onboard-step2-btns .onboard-btn-prev:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}
.onboard-step2-btns .onboard-btn-continue {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    background: #0B2C7B;
    color: #fff;
    flex: 0 0 auto;
}
.onboard-step2-btns .onboard-btn-continue:hover {
    background: #091f5a;
    color: #fff;
}

.auth-upload-zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    min-height: 42px;
    background: #f9fafb;
    cursor: pointer;
}
.auth-upload-zone:hover { border-color: #0B2C7B; background: #eff6ff; }
.auth-upload-zone .auth-upload-icon { font-size: 1.25rem; color: #9ca3af; flex-shrink: 0; }
.auth-upload-zone .auth-upload-text { font-size: 14px; color: #6b7280; }
.auth-password-toggle { cursor: pointer; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #6b7280; }

/* Onboard: left column scrollable (uses shared row/right-col above) */
.onboard-left-col {
    padding: 24px 32px;
    overflow-y: auto;
    overflow-x: hidden;
}
.onboard-form-scroll {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 24px;
}
.onboard-copyright {
    font-size: 12px;
    color: #6b7280;
    padding-top: 24px;
}
.w-45 {
    width: 49%;
}
/* Spacing inside scrollable form */
.onboard-form-scroll .form-group { margin-bottom: 0.75rem; }
.onboard-form-scroll #onboard-step1 h1 { font-size: 20px; }
.onboard-form-scroll #onboard-logos img[alt="VALUE CRM"] { height: 40px; }

/* Modern Onboarding Styles */
.onboard-container {
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.onboard-left {
    background: #ffffff;
    padding: 40px 60px;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.onboard-right {
    background: linear-gradient(135deg, rgba(11, 44, 123, 0.05) 0%, rgba(11, 44, 123, 0.1) 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .onboard-right::before {
        content: '';
        position: absolute;
        width: 150%;
        height: 150%;
        background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" x="50" y="50" fill="%230B2C7B" opacity="0.1"/></svg>');
        animation: float 20s infinite linear;
    }

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-50px, -50px) rotate(360deg);
    }
}

.onboard-right-image {
    width: 85%;
    max-width: 600px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

/* Logo Section */
.logo-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.logo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .logo-left img {
        height: 45px;
    }

.logo-text {
    line-height: 1.2;
}

.logo-text-main {
    font-size: 16px;
    font-weight: 700;
    color: #0B2C7B;
    letter-spacing: 0.5px;
}

.logo-text-sub {
    font-size: 10px;
    font-weight: 500;
    color: #6B7280;
    letter-spacing: 0.3px;
}

.logo-right img {
    height: 50px;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 30px;
    transition: color 0.2s;
}

    .back-button:hover {
        color: #0B2C7B;
        text-decoration: none;
    }

    .back-button svg {
        width: 16px;
        height: 16px;
    }

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 50px;
    padding: 0 20px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

    .progress-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 20px;
        left: 50%;
        width: 100%;
        height: 2px;
        background: #E5E7EB;
        z-index: 0;
    }

    .progress-step.completed:not(:last-child)::after {
        background: #0B2C7B;
    }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #9CA3AF;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.completed .step-circle {
    background: #0B2C7B;
    border-color: #0B2C7B;
    color: #FFFFFF;
}

.progress-step.active .step-circle {
    background: #FFFFFF;
    border-color: #0B2C7B;
    border-width: 3px;
    color: #0B2C7B;
    box-shadow: 0 0 0 4px rgba(11, 44, 123, 0.1);
}

.step-label {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #9CA3AF;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
    color: #374151;
}

/* Form Content */
.form-content {
    flex: 1;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

    .form-label .required {
        color: #EF4444;
        margin-left: 2px;
    }

.form-control {
    height: 48px;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s;
    background: #FFFFFF;
}

    .form-control:focus {
        border-color: #0B2C7B;
        box-shadow: 0 0 0 3px rgba(11, 44, 123, 0.1);
        outline: none;
    }

    .form-control::placeholder {
        color: #9CA3AF;
    }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

/* File Upload */
.file-upload-zone {
    border: 1.5px dashed #D1D5DB;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FAFB;
}

    .file-upload-zone:hover {
        border-color: #0B2C7B;
        background: #F3F4F6;
    }

.file-upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    background: #E5E7EB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    font-size: 18px;
}

.file-upload-text {
    display: block;
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

/* Password Input */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.2s;
}

    .password-toggle:hover {
        color: #6B7280;
    }

/* Buttons */
.btn-primary-custom {
    width: 100%;
    height: 50px;
    background: #0B2C7B;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary-custom:hover {
        background: #092354;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(11, 44, 123, 0.3);
    }

    .btn-primary-custom:active {
        transform: translateY(0);
    }

.btn-secondary-custom {
    width: 48%;
    height: 50px;
    background: #FFFFFF;
    color: #374151;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary-custom:hover {
        background: #F9FAFB;
        border-color: #D1D5DB;
    }

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    font-size: 14px;
    color: #6B7280;
}

    .form-footer a {
        color: #0B2C7B;
        font-weight: 600;
        text-decoration: none;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    font-size: 12px;
    color: #9CA3AF;
}

/* Responsive */
@media (max-width: 768px) {
    .onboard-left {
        padding: 30px 20px;
    }

    .logo-section {
        margin-bottom: 30px;
    }

    .progress-indicator {
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .step-label {
        font-size: 9px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-secondary-custom {
        width: 100%;
    }
}

/* Hide/Show Steps */
.step-panel {
    display: none;
}

    .step-panel.active {
        display: block;
    }

/* Loader */
.page-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #E5E7EB;
    border-top-color: #0B2C7B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 30px;
    transition: color 0.2s;
}

    .back-button:hover {
        color: #0B2C7B;
        text-decoration: none;
    }

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 50px;
    padding: 0 20px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

    .progress-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 20px;
        left: 50%;
        width: 100%;
        height: 2px;
        background: #E5E7EB;
        z-index: 0;
    }

    .progress-step.completed:not(:last-child)::after {
        background: #0B2C7B;
    }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #9CA3AF;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.completed .step-circle {
    background: #0B2C7B;
    border-color: #0B2C7B;
    color: #FFFFFF;
}

.progress-step.active .step-circle {
    background: #FFFFFF;
    border-color: #0B2C7B;
    border-width: 3px;
    color: #0B2C7B;
    box-shadow: 0 0 0 4px rgba(11, 44, 123, 0.1);
}

.step-label {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #9CA3AF;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
    color: #374151;
}

/* File Upload Input Styling - Same height and width as regular inputs */
.file-upload-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    border: 1.5px dashed #D1D5DB;
    border-radius: 8px;
    padding: 0 16px;
    background: #F9FAFB;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0;
}

    .file-upload-input-wrapper:hover {
        border-color: #0B2C7B;
        background: #EFF6FF;
    }

    .file-upload-input-wrapper.has-file {
        border-color: #10B981;
        background: #ECFDF5;
        border-style: solid;
    }

.file-upload-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.file-upload-icon-inline {
    font-size: 18px;
    color: #9CA3AF;
    flex-shrink: 0;
}

.file-upload-input-wrapper.has-file .file-upload-icon-inline {
    color: #10B981;
}

.file-upload-text-inline {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.file-upload-name {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status-indicator {
    flex-shrink: 0;
    font-size: 18px;
}

/* Additional styling improvements */
.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 35px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

/* Select2 Custom Styling to match form inputs */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 8px !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    transition: all 0.2s;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 48px !important;
        padding-left: 16px !important;
        padding-right: 45px !important;
        font-size: 14px !important;
        color: #111827 !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #9CA3AF !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 48px !important;
        right: 16px !important;
    }

        .select2-container--default .select2-selection--single .select2-selection__arrow b {
            border-color: #6B7280 transparent transparent transparent !important;
            border-width: 6px 5px 0 5px !important;
            margin-left: -5px !important;
            margin-top: -3px !important;
        }

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #6B7280 transparent !important;
    border-width: 0 5px 6px 5px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #0B2C7B !important;
    box-shadow: 0 0 0 3px rgba(11, 44, 123, 0.1) !important;
    outline: none !important;
}

.select2-dropdown {
    border: 1.5px solid #E5E7EB !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.select2-container--default .select2-results__option {
    padding: 10px 16px !important;
    font-size: 14px !important;
    color: #374151 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #EFF6FF !important;
    color: #0B2C7B !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #0B2C7B !important;
    color: #FFFFFF !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid #E5E7EB !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

    .select2-container--default .select2-search--dropdown .select2-search__field:focus {
        border-color: #0B2C7B !important;
        outline: none !important;
    }

/* Make select2 width 100% */
.select2-container {
    width: 100% !important;
}