:root {
    --navy: #0c1e3e;
    --mint: #6ee7b7;
    --mint-dark: #059669;
    --cream: #f9fafb;
    --amber: #f59e0b;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-800: #1e293b;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(12, 30, 62, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(12, 30, 62, 0.1), 0 2px 4px -1px rgba(12, 30, 62, 0.06);
    --shadow-lg: 0 20px 40px -5px rgba(12, 30, 62, 0.1), 0 10px 15px -5px rgba(12, 30, 62, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--navy);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.mono-font {
    font-family: var(--font-mono) !important;
    letter-spacing: 0.05em;
}

.hidden {
    display: none !important;
}

/* Background Image styling */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 45vh;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/r29jr7/site/media/69f11a3367bba0.40177163.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.page-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(12, 30, 62, 0.4), var(--cream));
}

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Header */
.app-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    color: var(--white);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.secure-pill {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 0.375rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Card */
.onboarding-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(12, 30, 62, 0.05);
    margin-bottom: 2rem;
}

/* Progress Bar */
.progress-container {
    padding: 2rem 2.5rem 0;
    position: relative;
}

.progress-track {
    position: absolute;
    top: 2.75rem;
    left: 4rem;
    right: 4rem;
    height: 2px;
    background: var(--gray-200);
    z-index: 1;
}

.progress-fill {
    position: absolute;
    top: 2.75rem;
    left: 4rem;
    height: 2px;
    background: var(--mint-dark);
    z-index: 2;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.step-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.step-indicator.active {
    color: var(--navy);
}

.step-indicator.active .step-icon {
    border-color: var(--mint-dark);
    background: var(--mint-dark);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.2);
}

.step-indicator.completed {
    color: var(--navy);
}

.step-indicator.completed .step-icon {
    border-color: var(--mint-dark);
    background: var(--white);
    color: var(--mint-dark);
}

/* Form Steps */
#onboarding-form {
    padding: 2rem 2.5rem 2.5rem;
}

.form-step {
    animation: fadeIn 0.4s ease;
}

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

.step-header {
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.step-header p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row.split > * {
    flex: 1;
}

.input-group {
    margin-bottom: 1.25rem;
    position: relative;
    width: 100%;
}

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--navy);
    background: var(--white);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

select {
    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='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--mint-dark);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.3);
}

input::placeholder {
    color: var(--gray-400);
}

.error-msg {
    display: none;
    color: var(--amber);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.input-group.error input,
.input-group.error select {
    border-color: var(--amber);
}

.input-group.error .error-msg {
    display: block;
}

/* Upload Mock UI */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upload-card {
    border: 2px dashed var(--gray-300);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.upload-card:hover {
    border-color: var(--mint-dark);
    background: var(--white);
}

.upload-card.uploaded {
    border: 2px solid var(--mint-dark);
    background: rgba(110, 231, 183, 0.05);
}

.upload-card.uploaded .upload-icon {
    color: var(--mint-dark);
    background: rgba(110, 231, 183, 0.2);
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.upload-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.upload-status {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Bank Selection */
.bank-selection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.bank-card {
    display: block;
    cursor: pointer;
}

.bank-card input[type="radio"] {
    display: none;
}

.bank-card-inner {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    transition: all 0.2s ease;
    background: var(--white);
}

.bank-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--navy);
}

.bank-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bank-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.bank-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.radio-circle {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    position: relative;
    transition: all 0.2s ease;
}

.bank-card input[type="radio"]:checked + .bank-card-inner {
    border-color: var(--navy);
    background: var(--gray-50);
}

.bank-card input[type="radio"]:checked + .bank-card-inner .radio-circle {
    border-color: var(--navy);
}

.bank-card input[type="radio"]:checked + .bank-card-inner .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--navy);
    border-radius: 50%;
}

/* Summary Blocks */
.summary-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-block {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.summary-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.edit-link {
    background: none;
    border: none;
    color: var(--mint-dark);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.edit-link:hover {
    color: var(--navy);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: var(--gray-500);
}

.summary-value {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.success-text {
    color: var(--mint-dark);
}

.terms-check {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Buttons */
.step-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.step-actions.split-actions {
    justify-content: space-between;
}

.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #172a50;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

/* Success Card */
.success-content {
    padding: 3rem 2.5rem;
    text-align: center;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(110, 231, 183, 0.2);
    color: var(--mint-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.success-content p {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.success-details {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    display: inline-block;
}

.success-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-800);
}

#wbx-powered-by-slot {
    margin-top: 1rem;
    width: 100%;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem 3rem;
    }
    
    .progress-container {
        padding: 1.5rem 1.5rem 0;
    }
    
    .progress-track, .progress-fill {
        left: 2rem;
        right: 2rem;
    }

    #onboarding-form {
        padding: 1.5rem;
    }

    .form-row.split, .form-row.multi {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row.multi .input-group {
        width: 100% !important;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }
}