* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0; padding: 0;
}

body {
    background-color: #f5f5f5;
    padding: 10px;
    width: 100%;
}

/* ENLARGED CONTROLLER: Expands container wrapper from 95% to 100% width edge-to-edge */
.container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Header layout bars padding properties */
.batch-header-wrapper, .calendar-header-wrapper, .comp-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px 20px 10px 20px;
    border-bottom: 2px solid #eee;
}

.control-actions-group {
    display: flex;
    gap: 10px;
}

.action-trigger-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    color: white;
}
.blue-btn { background-color: #007bff; }
.blue-btn:hover { background-color: #0056b3; }
.grey-btn { background-color: #6c757d; }
.grey-btn:hover { background-color: #5a6268; }

/* Navigation Top Tab Bar */
.tab-bar {
    background-color: #eaeaea;
    border-bottom: 1px solid #ccc;
    display: flex;
    flex-wrap: wrap;
    padding-top: 5px;
}

.tab-btn {
    background: none; border: none;
    border-right: 1px solid #ccc;
    color: #333; cursor: pointer;
    font-size: 14px; padding: 10px 20px;
    transition: background 0.2s;
    display: block;
}
.tab-btn.hidden { display: none !important; }
.tab-btn:hover { background-color: #dbdbdb; }
.tab-btn.active {
    background-color: #ffffff;
    border-bottom: 1px solid transparent;
    font-weight: bold;
}

/* Tab Panels Content Windows padding spacing alignment rules */
.tab-content {
    display: none;
    padding: 20px;
    min-height: 550px;
    width: 100%;
}
.tab-content.active { display: block; }
h2 { color: #222; margin-bottom: 5px; }

/* ENLARGED VIEW WINDOW: Increased max-height layout tracking boundary from 500px to 750px */
.table-scroll-container {
    max-height: 750px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    white-space: nowrap;
}

/* Frozen/Sticky Header positioning offsets rules layers */
#tableHeaderSortRow th, #compTableHeaderSortRow th, #rawTableHeaderSortRow th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
    box-shadow: inset 0 -1px 0 #ddd;
}

#tableHeaderFilterRow td, #compTableHeaderFilterRow td, #rawTableHeaderFilterRow td {
    position: sticky;
    top: 37px;
    z-index: 9;
    background-color: #fafafa !important;
    box-shadow: inset 0 -1px 0 #ddd;
}

thead tr th.checkbox-col, thead tr td.checkbox-col {
    z-index: 11 !important;
}

th:hover { background-color: #eef1f3; }
.sort-indicator { color: #888; margin-left: 4px; font-size: 11px; }

.table-filter-input, .comp-filter-input, .raw-filter-input {
    width: 100%;
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Standard structural column widths selectors formatting profiles */
.checkbox-col { width: 40px; text-align: center; border-right: 1px solid #ddd; }
.checkbox-col input { cursor: pointer; width: 14px; height: 14px; }
.action-col { width: 85px; text-align: center; }

/* Forces the Code column to stay tiny and tight instead of stretching wide */
table th:nth-child(3), 
table td:nth-child(3) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    text-align: center;
}

tbody tr:hover { background-color: #fafafa; }
tbody tr.selected-row-highlight { background-color: #fff4e6 !important; }
tbody tr.comp-selected-row-highlight { background-color: #e8f4fd !important; }
tbody tr.raw-selected-row-highlight { background-color: #f1f3f5 !important; }

/* Inline Action Controls buttons styles descriptors */
.inline-action-btn {
    padding: 3px 8px; font-size: 11px; font-weight: bold;
    border-radius: 3px; cursor: pointer; border: none; color: white;
}
.edit-btn-accent { background-color: #007bff; }
.edit-btn-accent:hover { background-color: #0056b3; }
.save-btn-accent { background-color: #28a745; }
.save-btn-accent:hover { background-color: #218838; }
.table-inline-edit-input { width: 100%; padding: 4px 6px; font-size: 13px; border: 1px solid #007bff; border-radius: 3px; background-color: #fff; }

/* Components Dynamic Tables specific color tokens */
.week-header-accent { background-color: #f1f3f5 !important; }
.date-header-accent { background-color: #fafbfc !important; color: #6c757d !important; font-size: 11px !important; }
.total-mtd-accent { background-color: #e9ecef !important; font-weight: bold; }

/* Operation toolbar bars configuration */
.mass-operations-bar {
    background-color: #fafafa; border: 1px solid #e2e2e2; border-radius: 4px; padding: 12px;
    margin: 0 20px 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; width: calc(100% - 40px);
}
.upload-group, .delete-group { display: flex; align-items: center; gap: 10px; }
.mass-btn { padding: 8px 14px; font-size: 12px; font-weight: 600; border-radius: 4px; cursor: pointer; border: none; }
.upload-label { background-color: #28a745; color: white; }
.export-csv-btn { background-color: #17a2b8; color: white; }
.delete-selected-btn { background-color: #fd7e14; color: white; }
.delete-all-btn { background-color: #dc3545; color: white; }

/* Calendar structural grid layouts definitions */
.annual-calendar-grid { padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; width: 100%; }
.month-card-box { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px; }
.month-title-header { font-size: 14px; font-weight: bold; color: #007bff; text-align: center; margin-bottom: 10px; }
.month-table-grid { width: 100%; }
.month-table-grid th, .month-table-grid td { padding: 4px 2px; font-size: 11px; border: none; }
.week-number-cell { color: #fd7e14; font-weight: bold; background-color: #fdf2e9; width: 25px; }

/* Date month controls panels dropdown elements wrappers rules */
.comp-title-block { display: flex; align-items: center; gap: 20px; }
.date-scope-selector-tool { display: flex; gap: 10px; background-color: #f0f4f8; padding: 4px 8px; border-radius: 4px; border: 1px solid #d0daf0; }
.scope-input-group { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.scope-input-group input { width: 65px; text-align: center; }

/* Settings Overlay Card Backdrops structural selectors definitions */
.modal-overlay-backdrop { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.4); }
.modal-content-card { background-color: #ffffff; margin: 8% auto; padding: 20px; border-radius: 8px; width: 500px; max-width: 90%; box-shadow: 0 4px 20px rgba(0,0,0,0.15); position: relative; }
.narrow-card { width: 360px; }
.modal-close-x { color: #aaa; position: absolute; right: 15px; top: 10px; font-size: 24px; font-weight: bold; cursor: pointer; }
.modal-close-x:hover { color: #333; }
.modal-scrollable-fields-area { max-height: 380px; overflow-y: auto; border: 1px solid #efefef; padding: 10px; background-color: #fafafa; border-radius: 4px; margin-bottom: 15px; }
.form-section-subtitle { font-size: 12px; font-weight: bold; color: #777; margin: 15px 0 6px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.scrollable-form-dates-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline-field-group { margin-bottom: 0; }
.visibility-list { list-style: none; max-height: 150px; overflow-y: auto; border: 1px solid #ddd; padding: 8px; background: #fafafa; border-radius: 4px; }
.visibility-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #eee; }
.toggle-btn { color: white; border: none; padding: 4px 8px; border-radius: 3px; cursor: pointer; font-size: 11px; }
/* ==========================================================================
   REPAIRED COLUMN LAYOUTS: LOCK SMALL SIZES EXCLUSIVELY TO BATCH TABLE
   ========================================================================== */

/* Target Code Column ONLY inside the Batch Generation Table */
#batchGenTable th:nth-child(3), 
#batchGenTable td:nth-child(3) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    text-align: center;
}

/* Target 9th Column ONLY inside the Batch Generation Table */
#batchGenTable th:nth-child(4), 
#batchGenTable td:nth-child(4) {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    text-align: center;
}

/* Target 10th Column ONLY inside the Batch Generation Table */
#batchGenTable th:nth-child(5), 
#batchGenTable td:nth-child(5) {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    text-align: center;
}
/* ==========================================================================
   REPAIRED RAW DATA TAB COLUMNS STRUCTURES (REMOVES OVERLAPS)
   ========================================================================== */

/* Set a clear custom width for the Posting Date column inside Raw Data */
#rawDataTable th:nth-child(3), 
#rawDataTable td:nth-child(3) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: center;
}

/* Set a clean spacing layout configuration for the Material column */
#rawDataTable th:nth-child(4), 
#rawDataTable td:nth-child(4) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    text-align: center;
}
/* ==========================================================================
   REPAIRED COMPONENTS OUTPUT COLUMNS STRUCTURES (REMOVES OVERLAPS)
   ========================================================================== */

/* Set a clear custom width for the Article column inside Components Output */
#componentsOutputTable th:nth-child(3), 
#componentsOutputTable td:nth-child(3) {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    text-align: left;
}

/* Allow the Description column to expand dynamically and hold long text safely */
#componentsOutputTable th:nth-child(4), 
#componentsOutputTable td:nth-child(4) {
    width: 320px !important;
    min-width: 250px !important;
    max-width: 450px !important;
    text-align: left;
    white-space: normal; /* Allows long descriptions to wrap if needed */
}
/* ==========================================================================
   REPAIRED COMPONENTS OUTPUT LAYOUT: CRASH AND OVERLAP CORRECTION
   ========================================================================== */

/* 1. Reset the master table format layout rule */
#componentsOutputTable {
    table-layout: auto !important; /* Switch back to auto to save day columns from crashing */
    width: 100% !important;
}

/* 2. Lock explicit clean sizing on the base parameter columns precisely */
#componentsOutputTable th:nth-child(1), #componentsOutputTable td:nth-child(1) { width: 40px !important; min-width: 40px !important; } /* Checkbox */
#componentsOutputTable th:nth-child(2), #componentsOutputTable td:nth-child(2) { width: 85px !important; min-width: 85px !important; } /* Action */
#componentsOutputTable th:nth-child(3), #componentsOutputTable td:nth-child(3) { width: 140px !important; min-width: 140px !important; } /* Article */
#componentsOutputTable th:nth-child(4), #componentsOutputTable td:nth-child(4) { width: 320px !important; min-width: 250px !important; } /* Description */

/* 3. Tighten Machine and Mold No. perfectly without breaking other cells */
#componentsOutputTable th:nth-child(5), #componentsOutputTable td:nth-child(5) { width: 90px !important; min-width: 90px !important; max-width: 90px !important; text-align: center; } /* Machine */
#componentsOutputTable th:nth-child(6), #componentsOutputTable td:nth-child(6) { width: 95px !important; min-width: 95px !important; max-width: 95px !important; text-align: center; } /* Mold No. */

/* 4. Enforce clear spacing boundaries for the remaining metadata fields */
#componentsOutputTable th:nth-child(7), #componentsOutputTable td:nth-child(7) { width: 100px !important; min-width: 100px !important; } /* Mold's Cavity */
#componentsOutputTable th:nth-child(8), #componentsOutputTable td:nth-child(8) { width: 100px !important; min-width: 100px !important; } /* Total Cavity */
#componentsOutputTable th:nth-child(9), #componentsOutputTable td:nth-child(9) { width: 110px !important; min-width: 110px !important; } /* Running Cavity */
#componentsOutputTable th:nth-child(10), #componentsOutputTable td:nth-child(10) { width: 95px !important; min-width: 95px !important; } /* Cycle Time */
#componentsOutputTable th:nth-child(11), #componentsOutputTable td:nth-child(11) { width: 130px !important; min-width: 130px !important; } /* Product Group */
#componentsOutputTable th:nth-child(12), #componentsOutputTable td:nth-child(12) { width: 80px !important; min-width: 80px !important; } /* Code */

/* 5. PROTECT DYNAMIC DATE FIELDS: Force calendar days and weeks to have a safe width padding */
#componentsOutputTable th.week-header-accent, 
#componentsOutputTable td.week-header-accent {
    min-width: 80px !important;
    text-align: center;
}

#componentsOutputTable th.date-header-accent, 
#componentsOutputTable td.date-header-accent {
    min-width: 50px !important;
    text-align: center;
}

#componentsOutputTable th.total-mtd-accent, 
#componentsOutputTable td.total-mtd-accent {
    min-width: 90px !important;
    text-align: center;
}
/* ==========================================================================
   PERMANENT DATA REPAIR: TAG-DRIVEN STABLE SIZING FOR MACHINE & MOLD FIELDS
   ========================================================================== */

/* Target Machine cells cleanly anywhere across the table grid */
#componentsOutputTable th:nth-child(5),
#componentsOutputTable td[data-col="machine"] {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    text-align: center !important;
}

/* Target Mold No cells cleanly anywhere across the table grid */
#componentsOutputTable th:nth-child(6),
#componentsOutputTable td[data-col="mold"] {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    text-align: center !important;
}
/* ==========================================================================
   FEATURE REPAIR: POPUP OVERLAY FORM ELEMENTS STRUCTURE CLEAN-UP
   ========================================================================== */

/* Expand the central popup card layout to give input blocks healthy room */
.modal-content-card {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 25px;
    border-radius: 8px;
    width: 550px;
    max-width: 95%;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    position: relative;
}

/* Ensure the scrollable field block interior stays inside clean bounds */
.modal-scrollable-fields-area {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    padding: 15px 20px;
    background-color: #fdfdfd;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* STACK LAYOUT RULES: Forces labels directly ABOVE their input controls box */
.form-field-group {
    margin-bottom: 16px !important;
    display: flex;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
}

/* Format block text headers labels cleanly */
.form-field-group label {
    display: block !important;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px !important;
    text-align: left;
}

/* UNIFORM CONTROL INPUTS: stretches input bars to match boundaries cleanly */
.form-field-group input {
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 13px;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
    color: #212529 !important;
    transition: border-color 0.15s ease-in-out;
}

/* Apply focus accent colors when clicked inside input boxes */
.form-field-group input:focus {
    border-color: #80bdff !important;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Standard sectional sub-titles divider padding blocks rules */
.form-section-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    margin: 25px 0 12px 0 !important;
    padding-bottom: 4px;
    border-bottom: 1px solid #dee2e6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: 100%;
}

/* Dynamic Grid Split for Weekly Values fields elements rows */
#compDynamicWeekFieldsContainer {
    width: 100%;
}

/* Clean formatting adjustment for the final form confirmation append button */
.form-add-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.1s ease;
}
.form-add-btn:hover {
    background-color: #0056b3;
}
/* Japan Output Widescreen Table Layout Parameters Fix */
#japanOutputTable {
    table-layout: auto !important;
    width: 100% !important;
}

/* ==========================================================================
   REPAIRED JAPAN SUMMARY GRID COLUMNS SPACE MAPPINGS
   ========================================================================== */

/* Set a clear custom width for the Article column inside Japan Output */
#japanOutputTable th:nth-child(3), 
#japanOutputTable td:nth-child(3) {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    text-align: left;
}

/* Allow the Description column to expand dynamically and wrap long text safely */
#japanOutputTable th:nth-child(4), 
#japanOutputTable td:nth-child(4) {
    width: 320px !important;
    min-width: 250px !important;
    max-width: 450px !important;
    text-align: left;
    white-space: normal;
}

/* Tighten Machine and Mold No. inside Japan Output */
#japanOutputTable th:nth-child(5), #japanOutputTable td[data-col="jp-machine"] { width: 90px !important; min-width: 90px !important; max-width: 90px !important; text-align: center !important; }
#japanOutputTable th:nth-child(6), #japanOutputTable td[data-col="jp-mold"] { width: 95px !important; min-width: 95px !important; max-width: 95px !important; text-align: center !important; }

/* Spacing parameters for the metadata fields */
#japanOutputTable th:nth-child(7), #japanOutputTable td:nth-child(7) { width: 100px !important; min-width: 100px !important; }
#japanOutputTable th:nth-child(8), #japanOutputTable td:nth-child(8) { width: 100px !important; min-width: 100px !important; }
#japanOutputTable th:nth-child(9), #japanOutputTable td:nth-child(9) { width: 110px !important; min-width: 110px !important; }
#japanOutputTable th:nth-child(10), #japanOutputTable td:nth-child(10) { width: 95px !important; min-width: 95px !important; }
#japanOutputTable th:nth-child(11), #japanOutputTable td:nth-child(11) { width: 130px !important; min-width: 130px !important; }
#japanOutputTable th:nth-child(12), #japanOutputTable td:nth-child(12) { width: 80px !important; min-width: 80px !important; }


.jp-filter-input { width: 100%; padding: 6px; font-size: 12px; border: 1px solid #ddd; border-radius: 3px; }
tbody tr.jp-selected-row-highlight { background-color: #f3f0ff !important; }
/* Japan Raw Data Table Layout Configurations (Protects columns spacing fields) */
#rawJpDataTable th:nth-child(3), #rawJpDataTable td:nth-child(3) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; text-align: center; }
#rawJpDataTable th:nth-child(4), #rawJpDataTable td:nth-child(4) { width: 110px !important; min-width: 110px !important; max-width: 110px !important; text-align: center; }

.rawjp-filter-input { width: 100%; padding: 6px; font-size: 12px; border: 1px solid #ddd; border-radius: 3px; }
#rawJpTableHeaderSortRow th { position: sticky; top: 0; z-index: 10; background-color: #f8f9fa !important; box-shadow: inset 0 -1px 0 #ddd; }
#rawJpTableHeaderFilterRow td { position: sticky; top: 37px; z-index: 9; background-color: #fafafa !important; box-shadow: inset 0 -1px 0 #ddd; }
tbody tr.rawjp-selected-row-highlight { background-color: #fdf2e9 !important; }
/* ==========================================================================
   REPAIR: SPACIOUS STACKED LAYOUT FOR THE JAPAN CUSTOM COLUMN POPUP
   ========================================================================== */

/* Target the Japan narrow card layout to give input fields healthy room */
.narrow-card {
    width: 480px !important; /* Made the card wider */
    padding: 25px !important;
}

/* Forces the input field elements inside the popup to stack spacious and full-width */
#jpAddColumnModal .form-group {
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
}

#jpAddColumnModal .form-group label {
    display: block !important;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px !important;
}

#jpAddColumnModal .form-group input {
    width: 100% !important;
    padding: 10px 14px !important; /* Increased padding inside input box */
    font-size: 14px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
}

/* Expands the green confirmation button cleanly with extra height padding */
#jpAddColumnModal .form-add-btn {
    width: 100% !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    font-weight: 600;
    border-radius: 4px !important;
    margin-top: 5px !important;
}
/* ==========================================================================
   GREEN SYSTEM HIGHLIGHTS: JP SORTING RECORD SPECIFIC ACCENTS
   ========================================================================== */
#jpsTableHeaderSortRow th {
    background-color: #2e7d32 !important;
    color: #ffffff !important;
    font-weight: bold;
}
#jpsTableHeaderFilterRow td {
    background-color: #388e3c !important;
}
.jps-filter-input {
    width: 100%; padding: 6px; font-size: 12px; border: 1px solid #ced4da; border-radius: 3px;
}
tbody tr.jps-selected-row-highlight {
    background-color: #e8f5e9 !important;
}
/* ==========================================================================
   STICKY SCROLL CHANNELS FOR JP SORTING RECORD TABLE HEADERS
   ========================================================================== */

/* Pin the main sorting headers (Row 1) securely to the top edge */
#jpsTableHeaderSortRow th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    box-shadow: inset 0 -1px 0 #ddd;
}

/* Pin the inline filter text input slots (Row 2) directly underneath Row 1 */
#jpsTableHeaderFilterRow td {
    position: sticky !important;
    top: 37px !important;
    z-index: 9 !important;
    box-shadow: inset 0 -1px 0 #ddd;
}

/* Ensure the leading checkbox elements stay pinned in their correct layers */
#jpsOutputTable thead tr th.checkbox-col, 
#jpsOutputTable thead tr td.checkbox-col {
    z-index: 11 !important;
}
/* Employee Data Table Sizing Layout Configurations (Clean 2-Column Space) */
#empDataTable th:nth-child(2), #empDataTable td:nth-child(2) { 
    width: 140px !important; 
    min-width: 140px !important; 
    max-width: 140px !important; 
    text-align: center; 
}
#empDataTable th:nth-child(3), #empDataTable td:nth-child(3) { 
    width: 320px !important; 
    min-width: 250px !important; 
    text-align: left; 
}

.emp-filter-input { width: 100%; padding: 6px; font-size: 12px; border: 1px solid #ddd; border-radius: 3px; }
#empTableHeaderSortRow th { position: sticky; top: 0; z-index: 10; background-color: #f8f9fa !important; box-shadow: inset 0 -1px 0 #ddd; }
#empTableHeaderFilterRow td { position: sticky; top: 37px; z-index: 9; background-color: #fafafa !important; box-shadow: inset 0 -1px 0 #ddd; }
tbody tr.emp-selected-row-highlight { background-color: #e8f4fd !important; }
/* ==========================================================================
   REPAIRED COMPACT WIDTH LOCKS FOR JAPAN OUTPUT DAILY CALENDAR COLUMNS
   ========================================================================== */

/* 1. Force all daily numeric header columns to lock into a clean, compact width */
#japanOutputTable th.date-header-accent,
#japanOutputTable td.date-cell-accent {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    text-align: center !important;
    padding: 6px 2px !important;
    font-size: 11px !important;
}

/* 2. Style the inline input search filter slots inside the daily calendar columns */
#jpTableHeaderFilterRow td input.jp-filter-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px 2px !important;
    font-size: 11px !important;
    text-align: center !important;
    height: 24px !important;
    border: 1px solid #ced4da !important;
    border-radius: 3px !important;
}

/* 3. Center align the calculated actual production balances inside the data cells */
#japanOutputTableBody tr td:nth-child(n+13) {
    text-align: center !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    padding: 6px 4px !important;
}

/* 4. Smooth out horizontal container scrolls tracking across 31 consecutive columns */
#japan-output .table-scroll-container {
    overflow-x: auto !important;
    max-width: 100% !important;
    border: 1px solid #dee2e6;
    background: #ffffff;
}
/* ==========================================================================
   STICKY SCROLL LAYOUT CHANNELS FOR JAPAN ORDER OUTPUT TABLE HEADERS
   ========================================================================== */

/* 1. Pin the primary text headers row (Row 1) securely to the top edge */
#jpTableHeaderSortRow th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: #f8f9fa !important;
    box-shadow: inset 0 -1px 0 #ddd, inset 0 1px 0 #ddd;
}

/* 2. Pin the secondary inline input search rows (Row 2) directly beneath Row 1 */
#jpTableHeaderFilterRow td {
    position: sticky !important;
    top: 36px !important; /* Calibrated exact boundary height offset */
    z-index: 9 !important;
    background-color: #fafafa !important;
    box-shadow: inset 0 -1px 0 #ddd;
}

/* 3. Protect leading structural action and checkbox cells layer layering overlays */
#japanOutputTable thead tr th.checkbox-col,
#japanOutputTable thead tr th.action-col,
#japanOutputTable thead tr td.checkbox-col,
#japanOutputTable thead tr td.action-col {
    z-index: 11 !important; /* Holds them above standard data scroll lanes */
}

/* 4. Smooth out independent horizontal container scrolling frameworks */
#japan-output .table-scroll-container {
    overflow: auto !important;
    max-height: 72vh !important; /* Gives a widescreen scrolling frame window view */
    border: 1px solid #dee2e6;
    background: #ffffff;
}

