/* Professional Table Styling - Compact and Modern */

/* Base table improvements */
.table {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Reduced padding for compact look */
.table th,
.table td {
    padding: 0.35rem 0.5rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

/* Header styling - more professional */
.table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.5rem;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

/* Striped rows - subtle and professional */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff;
}

/* Hover effect - smooth and professional */
.table tbody tr {
    transition: all 0.2s ease-in-out;
}

.table tbody tr:hover {
    background-color: #f1f3f5 !important;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Bordered table - cleaner borders */
.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e9ecef;
}

.table-bordered thead th,
.table-bordered thead td {
    border-bottom-width: 2px;
    border-color: #dee2e6;
}

/* Action buttons in tables - more compact */
.table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    margin: 0 0.125rem;
}

.table .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
}

/* Dropdown in tables */
.table .dropdown-toggle {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.table .dropdown-menu {
    font-size: 0.8125rem;
    padding: 0.25rem 0;
    min-width: 150px;
}

.table .dropdown-item {
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
}

.table .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Text alignment improvements */
.table td {
    color: #495057;
}

/* Number formatting - right align for better readability */
.table td[style*="text-align: right"],
.table th[style*="text-align: right"] {
    text-align: right !important;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Status badges - more compact */
.table .badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Remove extra spacing */
.table tbody tr td:first-child,
.table thead tr th:first-child {
    padding-left: 0.5rem;
}

.table tbody tr td:last-child,
.table thead tr th:last-child {
    padding-right: 0.5rem;
}

/* Responsive table improvements */
.table-responsive {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Empty state */
.table tbody tr:empty {
    display: none;
}

/* Focus state for accessibility */
.table tbody tr:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* Compact table variant */
.table-sm th,
.table-sm td {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
}

/* Compact table for New Products - reduced height */
.table-card .table th,
.table-card .table td {
    padding: 0.25rem 0.5rem;
    line-height: 1.3;
    font-size: 0.75rem;
}

.table-card .table thead th {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

.table-card .table .badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    line-height: 1.2;
}

/* Print styles */
@media print {
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.3rem 0.5rem;
    }
    
    .table tbody tr:hover {
        background-color: transparent !important;
        transform: none;
        box-shadow: none;
    }
}

