/* ========================================================= */
/* --- PURCHASE COMMAND CENTER (OVERRIDES & LAYOUT) ---      */
/* ========================================================= */

/* --- 1. GLOBAL & SCROLLBARS (Clutter-Free) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- 2. HIGH-DENSITY TABLE ADJUSTMENTS --- */
.premium-data-table {
    table-layout: fixed; /* Forces strict column widths */
}

.premium-data-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #F8FAFC;
    box-shadow: 0 1px 0 var(--border-light); 
}

/* Ensure long text doesn't break the layout on small screens */
.premium-data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clickable Rows for Purchase Deep-Dive */
.purchase-row {
    cursor: pointer;
}
.purchase-row:hover td {
    background-color: var(--bg-hover);
}

/* Sorting Indicators */
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { background: #F1F5F9; }
.sortable i { 
    font-size: 10px; 
    color: #9CA3AF; 
    margin-left: 4px; 
    transition: color 0.2s; 
}
.sortable:hover i { color: #64748B; }

/* --- 3. EXCEL-STYLE DENSITY & TYPOGRAPHY --- */

/* Force uppercase globally on designated tables/panels */
.uppercase-table,
.uppercase-table th,
.uppercase-table td,
.uppercase-table span,
.uppercase-table strong,
.uppercase-table div {
    text-transform: uppercase;
}

/* Excel 14.5 Equivalent Row Height & Tight Padding */
.premium-data-table td {
    height: 20px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    line-height: 16px;
    vertical-align: middle;
}

/* Compress header height to match the dense rows */
.premium-data-table th {
    padding: 4px 8px !important;
    font-size: 10px !important;
    height: 24px;
}

/* Adjust footer grand totals for the new height */
#reportFooter td {
    padding: 4px 8px !important;
    font-size: 12px !important;
}

/* --- 4. PURCHASE SPECIFIC ACCENTS --- */

/* Badge styling specifically for Tax Types (Local vs Interstate) */
.type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-local { background: #E0E7FF; color: #4338CA; border: 1px solid #C7D2FE; }
.type-interstate { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }

/* --- 5. KPI DASHBOARD RESPONSIVENESS (6-CARD GRID) --- */
#viewDashboard > div:first-child {
    display: grid;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 16px;
}

@media (max-width: 1600px) {
    #viewDashboard > div:first-child {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1100px) {
    #viewDashboard > div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #viewDashboard > div:first-child {
        grid-template-columns: 1fr !important;
    }
}