/* ===== FINANCE.CSS - FIXED NO NESTED CARDS ===== */

.finance-steps {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== STEP CONTENT (REPLACES INPUT-SECTION) ===== */
.step-content {
    padding: 25px 30px;
    /* Remove all card styling - no background, no border, no border-radius */
}

/* ===== SHARED INPUT GRID ===== */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px 20px;
    margin-bottom: 20px;
}

/* 4 columns for desktop when many inputs */
.input-grid-4col {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* 3 columns for medium sections */
.input-grid-3col {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* 2 columns for fewer inputs */
.input-grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== SHARED INPUT GROUP ===== */
.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* ===== CALCULATE SECTION ===== */
.calculate-section {
    text-align: center;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 2px solid #e3e8ff;
}

.calculate-section .calculate-btn {
    max-width: 350px;
    margin: 0 auto;
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* ===== FINANCE RESULTS ===== */
.results-section {
    padding: 30px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 2px solid #e3e8ff;
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.result-main {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
}

.result-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

.result-details {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
}

.detail-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

.progress-section {
    grid-column: 1 / -1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .input-grid-4col {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 1024px) {
    .input-grid,
    .input-grid-4col,
    .input-grid-3col {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px 15px;
    }
    
    .input-grid-2col {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .finance-steps {
        padding: 20px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-number {
        font-size: 2.5rem;
    }

    .result-details {
        padding: 20px;
    }

    .step-content {
        padding: 20px;
    }

    .input-grid,
    .input-grid-4col,
    .input-grid-3col,
    .input-grid-2col {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px 12px;
    }
}

@media (max-width: 480px) {
    .input-grid,
    .input-grid-4col,
    .input-grid-3col,
    .input-grid-2col {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .step-content {
        padding: 15px;
    }
}

/* Updated CSS for 2-column result details */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* result-main nhỏ hơn result-details */
    gap: 24px;
    margin-bottom: 24px;
}

.result-main {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
    text-align: center;
}

.result-details {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
}

.detail-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 16px;
}

.detail-col-label {
    font-weight: 600;
    color: #333;
}

.detail-col-actual, .detail-col-desired {
    font-weight: 700;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
}

.detail-col-actual {
    background: #e3f2fd;
    color: #1976d2;
}

.detail-col-desired {
    background: #e8f5e8;
    color: #2e7d32;
}

.detail-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.detail-value {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    color: #333;
}

.detail-row:nth-child(2) .detail-value {
    background: #fff3e0;
    color: #f57c00;
}

.detail-row:nth-child(3) .detail-value {
    background: #e8f5e8;
    color: #2e7d32;
}

.detail-row:nth-child(4) .detail-value {
    background: #fce4ec;
    color: #c2185b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .detail-header, .detail-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .detail-col-actual, .detail-col-desired {
        margin-bottom: 8px;
    }
}