body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f6f8;
    color: #222;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.form-container,
.result-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

h2, h3 {
    margin-top: 0;
    color: #1f2937;
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    box-sizing: border-box;
}

input:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button {
    margin-top: 20px;
    padding: 12px;
    width: 100%;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

button:hover {
    background-color: #1d4ed8;
}

.message {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.hidden {
    display: none;
}

.result-card {
    margin-top: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.total-box {
    grid-column: span 2;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
}

.label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.value {
    font-size: 18px;
    font-weight: bold;
    color: #111827;
}

.total-value {
    font-size: 24px;
    color: #1d4ed8;
}

.table-wrapper {
    overflow-x: auto;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.cost-table th,
.cost-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.cost-table th {
    background-color: #f8fafc;
    color: #374151;
    font-size: 14px;
}

.cost-table td {
    font-size: 14px;
}

.cost-table tbody tr:hover {
    background-color: #f9fafb;
}

@media (max-width: 900px) {
    .page-container {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .total-box {
        grid-column: span 1;
    }
}

/* Loader Overlay */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 12px;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-container {
    position: relative;
}

.loader-overlay.hidden {
    display: none;
}