button[x-on\:click*="window.history.back"] {
    display: none !important;
}

/* =====================================================
   REPEATER TABLE - Horizontal scroll + always table layout
   ===================================================== */

/* Remove parent override (was causing vertical scrollbar) */
.fi-fo-field-content-col:has(.fi-fo-table-repeater) {
    overflow: visible;
    width: 100%;
}

/* Scroll on the repeater itself — 6 rows visible, rest scrollable */
.fi-fo-table-repeater {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 350px;
    -webkit-overflow-scrolling: touch;
}

/* Force table display on all screen sizes */
.fi-fo-table-repeater table {
    display: table !important;
    min-width: 1100px;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.fi-fo-table-repeater-add  {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

.fi-fo-table-repeater table thead { display: table-header-group !important; }
.fi-fo-table-repeater table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #111827; /* Filament dark bg */
}
.dark .fi-fo-table-repeater table thead th {
    background: #111827;
}
.light .fi-fo-table-repeater table thead th,
:not(.dark) .fi-fo-table-repeater table thead th {
    background: #f9fafb;
}
.fi-fo-table-repeater table tbody { display: table-row-group !important; }
.fi-fo-table-repeater table tr    { display: table-row !important; }

.fi-fo-table-repeater table th,
.fi-fo-table-repeater table td {
    display: table-cell !important;
    white-space: nowrap !important;
    padding: 6px 8px;
    vertical-align: middle;
}

/* Column widths — default (all roles except role_id=2) */
.fi-fo-table-repeater table th:nth-child(1),
.fi-fo-table-repeater table td:nth-child(1) { width: 280px; } /* Product */
.fi-fo-table-repeater table th:nth-child(2),
.fi-fo-table-repeater table td:nth-child(2) { width: 120px; } /* Category */
.fi-fo-table-repeater table th:nth-child(3),
.fi-fo-table-repeater table td:nth-child(3) { width: 120px;  } /* Satuan */
.fi-fo-table-repeater table th:nth-child(4),
.fi-fo-table-repeater table td:nth-child(4) { width: 100px; } /* Jumlah */
.fi-fo-table-repeater table th:nth-child(5),
.fi-fo-table-repeater table td:nth-child(5) { width: 150px; } /* Harga Satuan */
.fi-fo-table-repeater table th:nth-child(6),
.fi-fo-table-repeater table td:nth-child(6) { width: 150px; } /* Total */
.fi-fo-table-repeater table th:nth-child(7),
.fi-fo-table-repeater table td:nth-child(7) { width: 80px;  } /* Manual */
.fi-fo-table-repeater table th:nth-child(8),
.fi-fo-table-repeater table td:nth-child(8) { width: 150px; } /* Harga Final */
.fi-fo-table-repeater table th:nth-child(9),
.fi-fo-table-repeater table td:nth-child(9) { width: 150px; } /* Total Final */
.fi-fo-table-repeater table th:nth-child(10),
.fi-fo-table-repeater table td:nth-child(10) { width: 220px; } /* Delivery Date */
.fi-fo-table-repeater table th:last-child,
.fi-fo-table-repeater table td:last-child    { width: 80px;  } /* Actions */

/* Column widths — role_id=2 (Manual, Harga Final, Total Final are hidden) */
/* Columns: Product | Category | Satuan | Jumlah | Harga Satuan | Total | Delivery Date | Actions */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(1),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(1) { width: 280px; } /* Product */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(2),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(2) { width: 120px; } /* Category */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(3),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(3) { width: 120px; } /* Satuan */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(4),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(4) { width: 100px; } /* Jumlah */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(5),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(5) { width: 150px; } /* Harga Satuan */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(6),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(6) { width: 150px; } /* Total */
.fi-fo-table-repeater[data-role="2"] table th:nth-child(7),
.fi-fo-table-repeater[data-role="2"] table td:nth-child(7) { width: 220px; } /* Delivery Date */
.fi-fo-table-repeater[data-role="2"] table th:last-child,
.fi-fo-table-repeater[data-role="2"] table td:last-child   { width: 80px;  } /* Actions */

/* Inputs fill column */
.fi-fo-table-repeater .fi-fo-select,
.fi-fo-table-repeater .fi-select-input,
.fi-fo-table-repeater .fi-select-input-ctn,
.fi-fo-table-repeater .fi-input-wrp,
.fi-fo-table-repeater .fi-input {
    width: 100% !important;
    min-width: 0 !important;
}

/* Dropdown z-index */
.fi-fo-table-repeater .fi-dropdown-panel {
    z-index: 9999 !important;
}

/* Hide duplicate labels inside cells, but NOT for checkboxes */
.fi-fo-table-repeater .fi-fo-field-label-col {
    display: none !important;
}
.fi-fo-table-repeater .fi-fo-field-label-col:has(.fi-checkbox-input) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
/* Hide the redundant label text next to checkbox (header already shows column name) */
.fi-fo-table-repeater .fi-fo-field-label-col:has(.fi-checkbox-input) .fi-fo-field-label-content {
    display: none !important;
}

/* =====================================================
   LIST TABLE - Horizontal scroll
   ===================================================== */
.fi-ta-wrp {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.fi-ta-wrp table {
    min-width: 700px;
}

.fi-ta-wrp table thead th,
.fi-ta-wrp table td {
    white-space: nowrap !important;
}

/* =====================================================
   LIST TABLE - Horizontal scroll
   ===================================================== */
.fi-ta-wrp {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.fi-ta-wrp table {
    min-width: 700px;
}

.fi-ta-wrp table thead th,
.fi-ta-wrp table td {
    white-space: nowrap !important;
}

:is(.fi-main,.fi-simple-main).fi-width-7xl {
    max-width: 100% !important;
}

/* =====================================================
   REPEATER TABLE - Hover effect on rows
   ===================================================== */
.fi-fo-table-repeater table tbody tr:hover {
    background-color: #f5f5f5; /* Light gray background on hover */
    cursor: pointer; /* Optional: change cursor to pointer */
}

/* =====================================================
   REPEATER TABLE - Dark mode adjustments
   ===================================================== */
.dark .fi-fo-table-repeater table tbody tr:hover {
    background-color: #374151; /* Dark gray for dark mode */
}

.dark .fi-fo-table-repeater table thead th:hover {
    background-color: #4b5563; /* Slightly lighter for th hover in dark mode */
}

.dark .fi-fo-table-repeater table thead th {
    background-color: #4b5563; /* Slightly lighter for th hover in dark mode */
}