/* table.css: all table-related styles */
.table-responsive { 
    width: 100%; 
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
    max-height: 320px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #219fac 0%, #1a7f89 100%);
    color: white;
}

.data-table thead th {
    padding: 12px 8px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border: none;
    position: relative;
    line-height: 1.2;
}

.data-table thead th:first-child {
    background: linear-gradient(135deg, #f9b140 0%, #e09a2b 100%);
    font-weight: 700;
    border-radius: 8px 0 0 0;
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 80px;
    max-width: 100px;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tbody tr:hover {
    background-color: #e3f2fd;
    transform: scale(1.001);
}

.data-table tbody td {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.data-table tbody td:first-child {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #2c3e50;
    border-right: 2px solid #dee2e6;
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 80px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Numeric cell styling */
.data-table tbody td:not(:first-child) {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-variant-numeric: tabular-nums;
}

/* Total row styling */
.data-table .total-row td {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 700;
    border-top: 2px solid #20c997;
}

.data-table .total-row td:first-child {
    background: linear-gradient(135deg, #155724 0%, #0f5132 100%);
}

/* No data message */
.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
    color: #6c757d;
    width: 100%;
    max-width: 400px;
}

.no-data-message::before {
    content: "📊";
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.no-data-message p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Data note */
.data-note {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .data-table {
        font-size: 12px;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 8px 6px;
    }
}
