/* Table Component */
.table-container {
    position: relative;
    max-height: calc(100vh - 400px);
    margin: 0;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-container-full {
    position: relative;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-header {
    flex-shrink: 0;
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
}

.table-body {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.table-footer {
    flex-shrink: 0;
    background-color: #f9fafb;
    border-top: 2px solid #e5e7eb;
    overflow-x: auto;
}

.sortable-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    border: none;
}

.sortable-table thead,
.sortable-table tbody,
.sortable-table tfoot {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.sortable-table thead {
    background-color: #f9fafb;
}

.sortable-table th {
    border-bottom: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    white-space: nowrap;
    background-color: #f9fafb;
    position: relative;
}

.sortable-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #4b5563;
    white-space: nowrap;
}

.sortable-table tbody tr:hover {
    background-color: #f9fafb;
}

.sortable-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sortable header styles */
.sortable-table th.sortable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.sortable-table th.sortable:hover {
    background-color: #f3f4f6;
}

.sortable-table .sort-icon {
    display: inline-block;
    transition: transform 0.2s;
    margin-left: 0.25rem;
    color: #9ca3af;
}

.sortable-table th.sort-asc .sort-icon,
.sortable-table th.sort-desc .sort-icon {
    color: #4b5563;
}

.sortable-table .sort-asc .sort-icon {
    transform: rotate(180deg);
}

.sortable-table .sort-desc .sort-icon {
    transform: rotate(0deg);
}

/* Column specific styles */
.sortable-table td:first-child,
.sortable-table th:first-child {
    font-weight: 500;
    color: #111827;
}

/* Numeric value styles */
.numeric-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
}

/* Totals row styles */
.totals-row td {
    border-bottom: none;
    padding: 0.875rem 1rem;
    font-weight: 600;
    background-color: #f9fafb;
    color: #1f2937;
}

.totals-row td:first-child {
    font-weight: 600;
    color: #111827;
}

/* Scrollbar styling */
.table-body::-webkit-scrollbar,
.table-header::-webkit-scrollbar,
.table-footer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-body::-webkit-scrollbar-track,
.table-header::-webkit-scrollbar-track,
.table-footer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-body::-webkit-scrollbar-thumb,
.table-header::-webkit-scrollbar-thumb,
.table-footer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-body::-webkit-scrollbar-thumb:hover,
.table-header::-webkit-scrollbar-thumb:hover,
.table-footer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 

.text-center {
    text-align: center !important;
}
.text-right {
    text-align: right !important;
}
.text-left {
    text-align: left !important;
}

.menu-item-container {
    position: relative;
    display: flex;
}
.menu-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    margin-top: -10px !important;
}