/* --- General Layout & Cards --- */
.card {
    background: #fff; border-radius: 8px;
    box-shadow: var(--box-shadow); margin-bottom: 2rem;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color);
}
.card-header h2 { margin: 0; font-size: 1.25rem; }

/* --- Tab Bar Styles --- */
.boq-tabs-container { display: flex; align-items: center; padding: 0.5rem 1rem; }
.boq-tabs-list { list-style: none; padding: 0; margin: 0; display: flex; overflow-x: auto; }
.boq-tabs-list li {
    padding: 0.75rem 1.5rem; cursor: pointer; border-bottom: 3px solid transparent;
    white-space: nowrap; transition: all 0.2s; color: #6c757d;
}
.boq-tabs-list li:hover { color: var(--primary-color); }
.boq-tabs-list li.active {
    border-bottom-color: var(--primary-color);
    font-weight: 700; color: var(--primary-color);
}
.add-tab-btn { margin-left: auto; white-space: nowrap; }

/* --- Detail Table Styles --- */
.boq-table-container { overflow-x: auto; }
.boq-table { width: 100%; min-width: 1200px; border-collapse: collapse; }
.boq-table th, .boq-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: middle; }
.boq-table th { background-color: #f8f9fa; }
.boq-table tr:last-child td { border-bottom: none; }
.boq-row.is-header { background-color: #f8f9fa; font-weight: bold; }
.boq-row.is-header .summary-value { font-size: 1.1em; }
.item-description { display: flex; align-items: center; gap: 0.5rem; }
.level-0 { padding-left: 1rem !important; }
.level-1 { padding-left: 3rem !important; }
.level-2 { padding-left: 5rem !important; }
.row-actions { display: flex; gap: 0.25rem; opacity: 0; transition: opacity 0.2s; }
.boq-row:hover .row-actions { opacity: 1; }
.action-btn { background: none; border: none; cursor: pointer; padding: 0.2rem; font-size: 1.1em; }
.text-center { text-align: center !important; }
.summary-value { text-align: right; font-family: monospace, sans-serif; }

/* --- Grand Total Section --- */
.grand-total-section { display: flex; justify-content: flex-end; }
.grand-total-table { width: 100%; max-width: 600px; }
.grand-total-table td { padding: 0.75rem 1rem; border: none; }
.grand-total-row { font-weight: bold; font-size: 1.2em; }
.grand-total-row td { padding-top: 1rem; border-top: 2px solid #333; }
.summary-input { width: 80px; text-align: right; border: 1px solid #ccc; border-radius: 4px; padding: 0.2rem; }