.debt-page {
    max-width: var(--medium-width);
    margin: 0 auto;
    padding: 30px;
}

.debt-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.debt-input {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-debt-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: #8b5cf6;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-debt-btn:hover {
    background: #7c3aed;
}

.debt-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.debt-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.debt-row input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 13px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.debt-row input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.remove-debt-btn {
    padding: 10px;
    border-radius: 8px;
    background: #fef2f2;
    color: #ef4444;
    border: 2px solid #fee2e2;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-debt-btn:hover {
    background: #fee2e2;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.input-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-item label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.input-item input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-item input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.strategy-section {
    margin-top: 20px;
}

.strategy-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
}

.strategy-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.strategy-option {
    position: relative;
    cursor: pointer;
}

.strategy-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.strategy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    transition: all 0.3s ease;
}

.strategy-option input[type="radio"]:checked + .strategy-card {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.strategy-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.strategy-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.strategy-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.debt-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.summary-card {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #fff;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.summary-label {
    font-size: 13px;
    opacity: 0.9;
}

.strategy-explanation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.strategy-explanation > div {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.strategy-explanation h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.strategy-explanation p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.timeline-section, .monthly-plan {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.timeline-title, .plan-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.payoff-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.timeline-month {
    font-size: 13px;
    font-weight: 600;
    color: #8b5cf6;
}

.timeline-event {
    font-size: 13px;
    color: #1e293b;
}

.timeline-empty, .plan-empty {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.monthly-plan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
}

.plan-month {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.plan-details {
    display: flex;
    gap: 12px;
}

.plan-payment {
    font-size: 12px;
    color: #1e293b;
}

.plan-note {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 1024px) {
    .debt-container {
        grid-template-columns: 1fr;
    }

    .debt-row {
        grid-template-columns: 1fr 1fr;
    }

    .debt-row input {
        grid-column: span 1;
    }

    .remove-debt-btn {
        grid-column: span 2;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .debt-page {
        padding: 16px;
    }

    .debt-row {
        grid-template-columns: 1fr;
    }

    .remove-debt-btn {
        grid-column: span 1;
    }

    .strategy-options {
        grid-template-columns: 1fr;
    }

    .result-summary {
        grid-template-columns: 1fr;
    }

    .strategy-explanation {
        grid-template-columns: 1fr;
    }

    .plan-details {
        flex-direction: column;
        gap: 4px;
    }
}