:root {
    --primary-blue: #0b57d0;
    --primary-blue-hover: #0842a0;
    --ecocash-blue: #004bba;
    --ecocash-red: #e2231a;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-input: #cbd5e1;
    --active-border: #0b57d0;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --info-text: #1d4ed8;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px;
}

.app-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Card Container */
.loan-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px 28px 24px;
    position: relative;
    overflow: hidden;
}

/* EcoCash Logo Header */
.brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.ecocash-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-block;
}

.logo-eco {
    color: var(--ecocash-blue);
}

.logo-cash {
    color: var(--ecocash-red);
}

/* Stepper Navigation */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: #ffffff;
    border: 1.5px solid var(--border-input);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step-label {
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.step-item.active .step-circle {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
}

.step-item.active .step-label {
    color: var(--primary-blue);
    font-weight: 600;
}

.step-item.completed .step-circle {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
}

.step-item.completed .step-label {
    color: var(--primary-blue);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-light);
    margin: 0 6px 20px;
    transition: background 0.3s ease;
}

.step-line.filled {
    background: var(--primary-blue);
}

/* Step Content visibility */
.step-content {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headings */
.section-title-wrap {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Sliders */
.slider-group {
    margin-bottom: 24px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-label {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.slider-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(11, 87, 208, 0.4);
    border: 2px solid #ffffff;
    transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.custom-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(11, 87, 208, 0.4);
    border: 2px solid #ffffff;
}

/* Calculation summary */
.calculation-summary {
    margin: 28px 0 20px;
    padding-top: 10px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.calc-label {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.calc-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Rate info box */
.rate-info-box {
    background-color: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
}

.info-icon-badge {
    background: var(--primary-blue);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-text {
    font-size: 0.8rem;
    color: var(--info-text);
    line-height: 1.45;
}

/* Quote Summary in Step 2 */
.quote-summary-bar {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 24px;
}

.quote-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.quote-summary-row:last-child {
    margin-bottom: 0;
}

.quote-label {
    color: var(--text-muted);
}

.quote-value {
    font-weight: 700;
    color: var(--text-main);
}

/* Form Groups & Inputs */
.form-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.custom-input,
.custom-textarea,
.custom-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-main);
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-input:focus,
.custom-textarea:focus,
.custom-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
}

.custom-input::placeholder,
.custom-textarea::placeholder {
    color: #94a3b8;
}

.custom-textarea {
    resize: vertical;
    min-height: 90px;
}

/* Loan Type Grid */
.loan-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.type-pill-btn {
    background: #ffffff;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.type-pill-btn:hover {
    border-color: var(--primary-blue);
}

.type-pill-btn.selected {
    border: 2px solid var(--primary-blue);
    background: #f0f7ff;
    color: var(--primary-blue);
    font-weight: 600;
}

/* Review Block Styles */
.review-block {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.review-block:last-of-type {
    border-bottom: none;
}

.block-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.review-label {
    color: var(--text-muted);
}

.review-val {
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
    max-width: 65%;
    word-break: break-word;
}

/* Schedule Table */
.schedule-table-wrap {
    overflow-x: auto;
    margin-top: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.schedule-table th,
.schedule-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
}

.schedule-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

.schedule-toggle-wrap {
    text-align: center;
    margin-top: 10px;
}

.btn-link-toggle {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-link-toggle:hover {
    text-decoration: underline;
}

/* Terms Box */
.terms-scroll-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    height: 120px;
    overflow-y: auto;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
}

.terms-scroll-box p {
    margin-bottom: 6px;
    font-weight: 500;
}

.terms-scroll-box ul {
    padding-left: 16px;
}

.terms-scroll-box li {
    margin-bottom: 4px;
}

.terms-agree-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
}

.terms-agree-check input {
    margin-top: 3px;
}

/* Buttons */
.btn-actions {
    margin-top: 24px;
}

.btn-actions.flex-row {
    display: flex;
    gap: 12px;
}

.flex-fill {
    flex: 1;
}

.btn {
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid var(--border-input);
    color: #334155;
    min-width: 90px;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Step Confirm (Screenshot 9) */
.confirm-content-wrap {
    text-align: center;
    padding: 15px 10px 25px;
}

.confirm-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.confirm-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.redirect-countdown-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 14px;
}

.card-footer-banner {
    background: var(--primary-blue);
    color: #ffffff;
    text-align: center;
    padding: 14px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: 20px -28px -24px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
