/* ===========================================
   Amortization Calculator - Tool Specific Styles
   =========================================== */

/* Tool Layout */
.am-box {
    max-width: 950px;
    margin: 0 auto;
}

/* Controls and Inputs */
.am-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: #e0f2fe; /* Light Blue BG */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #7dd3fc;
    margin-bottom: 30px;
}

.am-input-group {
    display: flex;
    flex-direction: column;
}

.am-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0369a1; /* Dark Blue Label */
    margin-bottom: 6px;
}

.am-input, .am-select {
    padding: 10px;
    border: 1px solid #38bdf8; /* Medium Blue Border */
    border-radius: 6px;
    font-size: 1rem;
    color: #1f2937;
    width: 100%;
}

/* Calculate Button */
.am-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: #0ea5e9; /* Primary Blue Button */
    color: white;
    transition: background 0.2s;
    margin-top: 10px;
}
.am-btn-calc:hover {
    background: #0284c7;
}

/* --- Results Section --- */

.am-results-section {
    margin-top: 30px;
}

.am-summary-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.am-card {
    flex: 1;
    min-width: 250px;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.am-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 5px;
}

.am-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
}

.am-value.interest {
    color: #ef4444; /* Red for Interest */
}
.am-value.payment {
    color: #0ea5e9; /* Blue for Payment */
}

/* --- Amortization Table --- */
.am-table-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 15px;
    padding-top: 10px;
}

.am-table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.am-amortization-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    font-size: 0.95rem;
}

.am-amortization-table th, .am-amortization-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.am-amortization-table th {
    background: #f8fafc;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    position: sticky;
    top: 0;
}

.am-amortization-table td:first-child {
    text-align: center;
    font-weight: 500;
}

/* Responsive Styling */
@media (max-width: 600px) {
    .am-controls {
        grid-template-columns: 1fr;
    }
    .am-summary-cards {
        flex-direction: column;
    }
    .am-card {
        min-width: 100%;
    }
}