/* Table wrapper */
.table-wrap {
           /* scrollable height */
    overflow-y: auto;         /* vertical scroll */
    border: 1px solid #ddd;
}
.table-wrap {
    max-height: calc(100vh - 250px);  /* adjust 250px depending on header size */
    overflow-y: auto;
}
/* Table */
.table-custom {
    border-collapse: collapse;
    
         /* fixed column widths */
    min-width: 1200px;        /* ensures table doesn't shrink too much */
}

/* First column width */
#itemsTbl th:first-child,
#itemsTbl td:first-child {
    width: 100px;          /* adjust as needed */
    max-width: 100px;
    white-space: normal;  /* allow wrapping if necessary */
}

/* Input inside first column */
#itemsTbl td:first-child input.qty-input {
    width: 80px;          /* input field fixed width */
}

/* Cells */
.table-custom th,
.table-custom td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    word-wrap: break-word;    /* wrap long words */
}

/* Header */
.table-custom thead th {
    background: #a9abb0;
    position: sticky;
    top: 0;
    z-index: 2;

    background-color: #1f2937;
    color: #ffffff;
    font-weight: 600;

    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Highlighted row */
#itemsTbl tbody tr.marked > td {
    background-color: #e7f1ff !important;

}
/* Optional: responsive smaller tables */
@media (max-width: 768px) {
    .table-custom {
        min-width: 0;
    }
}
/* If you may add more footer rows later:*/
/*
tfoot tr:first-child {
    border-top: 4px solid #000;
}
*/

.table-custom tfoot {
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.table-custom tfoot tr {
    box-shadow: inset 0 5px 0 0 #000;  /* strong top separator */
    font-weight: bold;
    background-color: #f8f9fa;
}


/* Description column: wrap and keep width reasonable */
#itemsTbl td.desc-col,
#itemsTbl th.desc-col {
    max-width: 320px;           /* adjust to taste */
    white-space: normal;        /* allow multi-line */
    word-break: break-word;     /* break long words/urls */
    overflow-wrap: anywhere;    /* best wrapping */
}


.navbar { position: relative; z-index: 2000; }
.dropdown-menu { z-index: 2000; }




