/*
|--------------------------------------------------------------------------
| ONBOARDING PORTAL — Premium Stylesheet
|--------------------------------------------------------------------------
| Matches the DeligoXpress public theme with Outfit font, glassmorphism,
| multi-step progress tracking, subtle glows, and animations.
|--------------------------------------------------------------------------
*/

:root {
    --onb-primary: #dc2626; /* DeligoXpress Red */
    --onb-primary-hover: #b91c1c;
    --onb-primary-soft: rgba(220, 38, 38, 0.1);
    --onb-primary-glow: rgba(220, 38, 38, 0.25);
    
    --onb-dark: #f8fafc;
    --onb-dark-soft: #ffffff;
    --onb-dark-border: #e2e8f0;
    
    --onb-gold: #c58b2a;
    --onb-gold-soft: rgba(197, 139, 42, 0.15);
    
    --onb-success: #10b981;
    --onb-success-soft: rgba(16, 185, 129, 0.15);
    
    --onb-text-main: #0f172a;
    --onb-text-muted: #64748b;
    
    --onb-radius-sm: 8px;
    --onb-radius-md: 12px;
    --onb-radius-lg: 16px;
    --onb-radius-xl: 24px;
    
    --onb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets specifically for onboarding container */
.onboarding-main-wrapper {
    background-color: var(--onb-dark);
    min-height: 100vh;
    padding: 120px 20px 80px;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    position: relative;
    overflow: hidden;
    color: var(--onb-text-main);
}

/* Background Elements */
.onb-bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.onb-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 2;
    pointer-events: none;
}

.onb-glow-red {
    background: rgba(220, 38, 38, 0.15);
    width: 600px;
    height: 600px;
    top: -100px;
    right: -100px;
}

.onb-glow-gold {
    background: rgba(197, 139, 42, 0.12);
    width: 500px;
    height: 500px;
    bottom: -100px;
    left: -100px;
}

/* Container */
.onboarding-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* Header */
.onboarding-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeUp 1s ease-out backwards;
}

.onboarding-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--onb-text-main);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.onboarding-header h1 .gradient-text {
    background: linear-gradient(135deg, #f87171, #991b1b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Typing Effect — Natural Character Animation */
.intro-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 200px);
    transition: all 0.8s ease;
}

/* Each character spawns with this micro-animation */
.type-char {
    display: inline;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.18s ease-out, filter 0.22s ease-out;
}
.type-char-visible {
    opacity: 1;
    filter: blur(0);
}

/* Smooth blinking cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--onb-primary);
    vertical-align: middle;
    margin-left: 4px;
    border-radius: 2px;
    animation: cursorBlink 1s ease-in-out infinite;
}
.typing-cursor.hide {
    display: none !important;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.onboarding-header p {
    font-size: 16px;
    color: var(--onb-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Glass Card */
.onboarding-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--onb-dark-border);
    border-radius: var(--onb-radius-xl);
    box-shadow: 0 25px 60px rgba(0,0,0,0.06);
    padding: 40px;
    animation: fadeUp 0.8s ease-out 0.2s backwards;
}


/* ===== PROGRESS STEPPER ===== */
.onb-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 40px;
    padding: 0 20px;
}

.onb-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--onb-dark-border);
    z-index: 1;
}

.onb-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100px;
}

.onb-step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--onb-dark-soft);
    border: 2px solid var(--onb-dark-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--onb-text-muted);
    transition: var(--onb-transition);
}

.onb-step-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--onb-text-muted);
    text-align: center;
    transition: var(--onb-transition);
}

/* Active Step */
.onb-step.active .onb-step-icon {
    background: var(--onb-primary);
    border-color: var(--onb-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--onb-primary-soft), 0 0 20px var(--onb-primary-glow);
}
.onb-step.active .onb-step-text {
    color: var(--onb-text-main);
}

/* Completed Step */
.onb-step.completed .onb-step-icon {
    background: var(--onb-gold);
    border-color: var(--onb-gold);
    color: #fff;
}
.onb-step.completed .onb-step-text {
    color: var(--onb-gold);
}


/* ===== FORM STEPS ===== */
.form-step-content {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}
.form-step-content.active {
    display: block;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.step-title i {
    color: var(--onb-primary);
}


/* ===== FORM CONTROLS ===== */
.onb-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.onb-row.single {
    grid-template-columns: 1fr;
}

.onb-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onb-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--onb-text-muted);
}
.onb-label span.req {
    color: var(--onb-primary);
    margin-left: 2px;
}

.onb-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.onb-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--onb-text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: var(--onb-transition);
}

.onb-input {
    width: 100%;
    height: 48px;
    background: var(--onb-dark-soft);
    border: 1px solid var(--onb-dark-border);
    border-radius: var(--onb-radius-sm);
    padding: 0 16px 0 42px;
    color: var(--onb-text-main);
    font-size: 14px;
    font-family: inherit;
    transition: var(--onb-transition);
    outline: none;
}

.onb-input:focus {
    border-color: var(--onb-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--onb-primary-soft);
}

.onb-input:focus ~ i {
    color: var(--onb-primary);
}

.onb-input::placeholder {
    color: #94a3b8;
}


/* ===== FILE UPLOADS ===== */
.onb-file-upload {
    background: var(--onb-dark-soft);
    border: 1px dashed var(--onb-dark-border);
    border-radius: var(--onb-radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--onb-transition);
    position: relative;
    overflow: hidden;
}

.onb-file-upload:hover {
    border-color: var(--onb-gold);
    background: rgba(197, 139, 42, 0.05);
}

.onb-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.onb-file-icon {
    font-size: 28px;
    color: var(--onb-text-muted);
    margin-bottom: 8px;
    transition: var(--onb-transition);
}

.onb-file-upload:hover .onb-file-icon {
    color: var(--onb-gold);
    transform: translateY(-2px);
}

.onb-file-text {
    font-size: 13px;
    color: var(--onb-text-main);
    font-weight: 500;
}
.onb-file-subtext {
    font-size: 11px;
    color: var(--onb-text-muted);
    margin-top: 4px;
}

.onb-file-upload.has-file {
    border: 1px solid var(--onb-success);
    background: var(--onb-success-soft);
}
.onb-file-upload.has-file .onb-file-icon {
    color: var(--onb-success);
}


/* ===== ACTION BUTTONS ===== */
.onb-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--onb-dark-border);
}

.btn-onb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 28px;
    border-radius: var(--onb-radius-sm);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--onb-transition);
    border: none;
    outline: none;
}

.btn-onb-back {
    background: #ffffff;
    color: var(--onb-text-main);
    border: 1px solid var(--onb-dark-border);
}

.btn-onb-back:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-onb-next, .btn-onb-submit {
    background: var(--onb-primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--onb-primary-glow);
}

.btn-onb-next:hover, .btn-onb-submit:hover {
    background: var(--onb-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-onb-submit {
    background: linear-gradient(135deg, var(--onb-primary), #f87171);
}

/* ===== SUCCESS STATE ===== */
.onb-success-state {
    text-align: center;
    padding: 40px 20px;
}

.success-icon-wrap {
    width: 80px;
    height: 80px;
    background: var(--onb-success-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--onb-success);
    font-size: 40px;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.onb-success-state h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.onb-success-state p {
    font-size: 15px;
    color: var(--onb-text-muted);
    max-width: 400px;
    margin: 0 auto 30px;
}


/* ===== ANIMATIONS ===== */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== ERROR STYLES ===== */
.onb-input.error {
    border-color: var(--onb-primary);
    background: rgba(220, 38, 38, 0.05);
}
.onb-error-msg {
    color: #f87171;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.onb-input.error ~ .onb-error-msg {
    display: block;
}

/* ===== TOAST ALERTS ===== */
.onb-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #ffffff;
    border-radius: var(--onb-radius-sm);
    padding: 16px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--onb-dark-border);
}

.onb-toast.show {
    transform: translateX(0);
}

.onb-toast-danger {
    border-left-color: #ef4444;
    color: #0f172a;
}
.onb-toast-danger i {
    color: #ef4444;
    font-size: 20px;
}

/* Form Alert Banner */
.onb-alert-banner {
    padding: 16px 20px;
    border-radius: var(--onb-radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeDown 0.4s ease-out;
}
.onb-alert-danger {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171;
}
.onb-alert-danger i {
    font-size: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .onboarding-main-wrapper {
        padding: 90px 16px 40px;
    }
    
    .onboarding-card {
        padding: 24px 20px;
    }

    .onb-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .onboarding-header h1 {
        font-size: 28px;
    }
    
    .onb-stepper::before {
        left: 20px;
        right: 20px;
    }
    
    .onb-step-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .onb-step-text {
        font-size: 11px;
    }
}
