/* ===========================================
   Compound Interest Calculator - Tool Specific Styles
   =========================================== */

/* Tool Layout */
.ci-box {
    max-width: 900px;
    margin: 0 auto;
}

/* Controls and Inputs */
.ci-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: #f0fdf4; /* Light Green BG */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
    margin-bottom: 30px;
}

.ci-input-group {
    display: flex;
    flex-direction: column;
}

.ci-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #065f46; /* Dark Green Label */
    margin-bottom: 6px;
}

.ci-input, .ci-select {
    padding: 10px;
    border: 1px solid #34d399; /* Medium Green Border */
    border-radius: 6px;
    font-size: 1rem;
    color: #1f2937;
    width: 100%;
}

/* Calculate Button */
.ci-btn-calc {
    grid-column: 1 / -1; /* Spans all columns */
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #059669; /* Darker Green Button */
    color: white;
    transition: background 0.2s;
    margin-top: 10px;
}
.ci-btn-calc:hover {
    background: #047857;
}

/* --- Results Section --- */

.ci-results-section {
    margin-top: 30px;
}

.ci-summary-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ci-card {
    flex: 1;
    min-width: 250px;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.ci-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 5px;
}

.ci-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
}

.ci-value.total-interest {
    color: #f59e0b; /* Orange for Interest */
}
.ci-value.future-value {
    color: #059669; /* Green for Final Value */
}

/* --- Amortization Table --- */
.ci-table-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 15px;
    padding-top: 10px;
}

.ci-table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.ci-amortization-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 0.95rem;
}

.ci-amortization-table th, .ci-amortization-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.ci-amortization-table th {
    background: #f9fafb;
    font-weight: 700;
    text-align: left;
    color: #1f2937;
    position: sticky;
    top: 0;
}

.ci-amortization-table td:first-child {
    text-align: left;
    font-weight: 500;
}

/* Responsive Table Styling */
@media (max-width: 600px) {
    .ci-controls {
        grid-template-columns: 1fr;
    }
    .ci-summary-cards {
        flex-direction: column;
    }
    .ci-card {
        min-width: 100%;
    }
}