:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #3b82f6;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

/* WIZARD BOX */
.wizard-box {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
    margin-bottom: 10px;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.wizard-step.active {
    display: block;
}

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

.step-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.input-wrapper.large input {
    width: 100%;
    padding: 15px 20px;
    font-size: 2.5rem;
    font-weight: 800;
    border: 3px solid var(--border-color);
    border-radius: 16px;
    outline: none;
    color: var(--primary-color);
    transition: border-color 0.2s;
}

.input-wrapper.large input:focus {
    border-color: var(--primary-color);
}

.input-wrapper.large .currency-unit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-nav {
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-nav {
    background: var(--primary-color);
    color: white;
}

.btn-nav.secondary {
    background: #f1f5f9;
    color: var(--text-main);
}

.btn-nav:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* DASHBOARD RESULTS */
.card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.result-card.primary {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: white;
    text-align: center;
}

.result-value {
    font-size: 3rem;
    font-weight: 800;
    margin: 10px 0;
}

.max-loan-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.info-item .lbl { font-size: 0.7rem; font-weight: 700; opacity: 0.8; text-transform: uppercase; }
.info-item .val { font-size: 1.2rem; font-weight: 800; display: block; }
.info-item .val.secondary { color: #fecaca; }

.advice-box {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 10px;
    display: inline-block;
}

.status-safe { background: #dcfce7; color: #166534; }
.status-warning { background: #fef9c3; color: #854d0e; }
.status-danger { background: #fee2e2; color: #991b1b; }

/* LOADING SPINNER */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.welcome-modal {
    background: white;
    padding: 40px;
    border-radius: 30px;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideUp 0.4s ease-out;
}

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

.btn-start {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-start:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #94a3b8;
}

.step-list { text-align: left; margin: 25px 0; }
.step-item { display: flex; gap: 15px; margin-bottom: 20px; }
.step-num {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .wizard-box { padding: 25px; }
    .step-title { font-size: 1.2rem; }
    .input-wrapper.large input { font-size: 1.8rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .max-loan-info { grid-template-columns: 1fr; }
}
