/* ==========================================================================
   Header Selector Cards (Branch & Store)
   ========================================================================== */
.header-selection-item {
    display: flex;
    align-items: center;
}

.header-selector-card {
    display: inline-flex;
    align-items: center;
    background-color: #f7f9fc;
    border: 1.5px solid #d8e2ef;
    border-radius: 6px;
    padding: 5px 12px;
    margin: 4px 6px;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.header-selector-card:hover,
.header-selector-card:focus-within {
    border-color: #3d34a5;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(61, 52, 165, 0.15);
}

.main-header-right .main-profile-menu>.main-img-user {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-header-right .main-profile-menu>.main-img-user i {
    font-size: 28px !important;
    line-height: 1;
}

.header-selector-card .selector-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-right: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.header-selector-card .selector-label i {
    font-size: 14px;
    margin-right: 4px;
}

.header-selector-card .selector-dropdown {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #1a202c;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
}

.header-selector-card .selector-dropdown:focus {
    outline: none;
}

@media (max-width: 991px) {
    .header-selector-card {
        margin: 6px 0;
        width: 100%;
        justify-content: space-between;
    }

    .header-selector-card .selector-dropdown {
        flex-grow: 1;
        text-align: right;
    }
}

/* ==========================================================================
   Login Page - Password Visibility Toggle
   ========================================================================== */

.login-page .header-brand-img {
    height: 3.9rem;
    margin-bottom: 15px;
}

.login-page .form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.login-page .form-buttons .btn {
    width: 48%;
    padding: 10px 15px;
}

/* Disable Microsoft Edge / IE built-in reveal & clear icons so only the custom eye icon shows */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.password-toggle-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.password-toggle-wrapper .form-control {
    padding: 10px 42px 10px 12px;
}

.password-toggle-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #76839a;
    z-index: 5;
    background: transparent;
    border: none;
    outline: none;
    padding: 5px;
    margin: 0;
    line-height: 1;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease-in-out;
}

.password-toggle-wrapper .toggle-password:hover,
.password-toggle-wrapper .toggle-password:focus {
    color: #3b4863;
    outline: none;
    box-shadow: none;
}

/* ==========================================================================
   Dispatch Report Page - Strictly scoped to #dispatch-report-page
   ========================================================================== */
#dispatch-report-page #example2>thead>tr>th {
    font-size: 13px;
    font-weight: 500;
    text-transform: unset;
}

#dispatch-report-page .no-border {
    padding: 0;
    border: unset;
}

#dispatch-report-page #example2_length {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#dispatch-report-page #example2_filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

#dispatch-report-page #btn-export-excel {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
    border-radius: 4px;
}

#dispatch-report-page #btn-export-excel:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #fff;
}

#dispatch-report-page .select2-container {
    width: 100% !important;
}

/* ==========================================================================
   Page-Specific Scoped Styles (Added 12-Oct-2026 - Zero Conflicts)
   ========================================================================== */

/* Total Stock Value Page */
#total-stock-page .page-header {
    padding-top: -10px !important;
    padding-bottom: -10px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    min-height: auto !important;
}

#total-stock-page .page-header h4 {
    margin: -10px 0 !important;
    line-height: 1.2;
}

#total-stock-page .select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #e1e6f1 !important;
}

#total-stock-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}

#total-stock-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* Put Away Pending List Page */
#put-away-page .page-header {
    padding: 0 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    min-height: auto !important;
}

#put-away-page .page-header h3 {
    margin: 0 !important;
    line-height: 1.3;
}

#put-away-page .select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #e1e6f1 !important;
}

#put-away-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    padding-right: 20px !important;
}

#put-away-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

@media (min-width: 992px) {
    #put_away_filter_form .row {
        flex-wrap: nowrap !important;
    }
}

#put_away_filter_form .col-md {
    min-width: 0 !important;
    flex: 1 1 0 !important;
}

#put_away_filter_form .col-md-auto {
    flex: 0 0 auto !important;
}

#put_away_filter_form .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Product Stock Page */
#product-stock-page .page-header {
    padding: 0 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    min-height: auto !important;
}

#product-stock-page .page-header h3 {
    margin: 0 !important;
    line-height: 1.3;
}

#product-stock-page .select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #e1e6f1 !important;
}

#product-stock-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    padding-right: 20px !important;
}

#product-stock-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

#product-stock-page .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

#product-stock-page .col-md {
    min-width: 0 !important;
}

/* QC Pending / GRN Stock Page */
#grn-stock-page .page-header {
    padding: 0 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    min-height: auto !important;
}

#grn-stock-page .page-header h3 {
    margin: 0 !important;
    line-height: 1.3;
}

#grn-stock-page .select2-container .select2-selection--single {
    height: 38px !important;
    border: 1px solid #e1e6f1 !important;
}

#grn-stock-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}

#grn-stock-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* Vendor PO List Page */
#vendor-po-list-page .page-header {
    padding-top: -10px !important;
    padding-bottom: -10px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    min-height: auto !important;
}

#vendor-po-list-page .page-header h4 {
    margin: -10px 0 !important;
    line-height: 1.2;
}

/* Merge Vendor PO Page */
#merge-vendor-po-page .table>thead>tr>th {
    font-size: 13px;
    font-weight: 500;
    text-transform: unset;
}

#merge-vendor-po-page .no-border {
    padding: 0;
    border: unset;
}

#merge-vendor-po-page .richText .richText-editor {
    height: 80px;
}

#merge-vendor-po-page .hid-tbl,
#merge-vendor-po-page .h-id {
    display: none;
}

/* Dispatch Detail Page */
#dispatch-detail-page .table>thead>tr>th {
    font-size: 13px;
    font-weight: 500;
    text-transform: unset;
}

/* Quality Check List Page */
#quality-check-page .page-header,
.quality-check-page .page-header {
    padding-top: -10px !important;
    padding-bottom: -10px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    min-height: auto !important;
}

#quality-check-page .page-header h4,
.quality-check-page .page-header h4 {
    margin: -10px 0 !important;
    line-height: 1.2;
}

/* Category List Page */
.category-table {
    table-layout: auto !important;
    width: 100% !important;
}

.category-table td.cat-name-cell,
.category-table th:nth-child(2) {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.category-table td.cat-action-cell,
.category-table th:nth-child(4) {
    white-space: nowrap !important;
    min-width: 90px !important;
    width: 100px !important;
    text-align: center !important;
}

#toggle-category-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Sub Category List Page */
.subcategory-table {
    table-layout: auto !important;
    width: 100% !important;
}

.subcategory-table td.subcat-name-cell,
.subcategory-table th:nth-child(2) {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.subcategory-table td.subcat-action-cell,
.subcategory-table th:nth-child(4) {
    white-space: nowrap !important;
    min-width: 90px !important;
    width: 100px !important;
    text-align: center !important;
}

#toggle-subcategory-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Inline Parsley Validation Error Styling */
.parsley-errors-list.filled,
.form-group .select2-container+.parsley-errors-list,
.form-group div[id$="_error"] .parsley-errors-list {
    list-style: none;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 0;
    padding-left: 0;
    font-weight: 500;
    display: block;
    width: 100%;
    clear: both;
}

/* Sub Category, Size, Model & Material Edit Page */
#subcategory-edit-page .table>thead>tr>th,
#size-edit-page .table>thead>tr>th,
#model-edit-page .table>thead>tr>th,
#quality-edit-page .table>thead>tr>th,
#uom-edit-page .table>thead>tr>th {
    font-size: 13px;
    font-weight: 500;
    text-transform: unset;
}

#subcategory-edit-page .no-border,
#size-edit-page .no-border,
#model-edit-page .no-border,
#quality-edit-page .no-border,
#uom-edit-page .no-border {
    padding: 0;
    border: unset;
}

#subcategory-edit-page .richText .richText-editor,
#size-edit-page .richText .richText-editor,
#model-edit-page .richText .richText-editor,
#quality-edit-page .richText .richText-editor,
#uom-edit-page .richText .richText-editor {
    height: 80px;
}

/* Size List Page */
.size-table {
    table-layout: auto !important;
    width: 100% !important;
}

.size-table th:nth-child(1),
.size-table td:nth-child(1) {
    width: 8% !important;
    min-width: 60px !important;
    text-align: center !important;
}

.size-table th:nth-child(2),
.size-table td.size-name-cell {
    width: 45% !important;
    min-width: 240px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.size-table th:nth-child(3),
.size-table td:nth-child(3),
.size-table td.size-category-cell {
    width: 30% !important;
    min-width: 150px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.size-table th:nth-child(4),
.size-table td:nth-child(4),
.size-table td.size-action-cell {
    width: 17% !important;
    min-width: 90px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

#toggle-size-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* GRN Type List Page */
.grn-type-table {
    table-layout: auto !important;
    width: 100% !important;
}

.grn-type-table td.grn-type-name-cell,
.grn-type-table th:nth-child(2) {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.grn-type-table td.grn-type-action-cell,
.grn-type-table th:nth-child(3) {
    white-space: nowrap !important;
    min-width: 90px !important;
    width: 100px !important;
    text-align: center !important;
}

#toggle-grn-type-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Model List Page */
.model-table {
    table-layout: auto !important;
    width: 100% !important;
}

.model-table th:nth-child(1),
.model-table td:nth-child(1) {
    width: 8% !important;
    min-width: 60px !important;
    text-align: center !important;
}

.model-table th:nth-child(2),
.model-table td.model-name-cell {
    width: 45% !important;
    min-width: 240px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.model-table th:nth-child(3),
.model-table td:nth-child(3),
.model-table td.model-category-cell {
    width: 30% !important;
    min-width: 150px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.model-table th:nth-child(4),
.model-table td:nth-child(4),
.model-table td.model-action-cell {
    width: 17% !important;
    min-width: 90px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

#toggle-model-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Material (Quality) List Page */
.quality-table {
    table-layout: auto !important;
    width: 100% !important;
}

.quality-table th:nth-child(1),
.quality-table td:nth-child(1) {
    width: 8% !important;
    min-width: 60px !important;
    text-align: center !important;
}

.quality-table th:nth-child(2),
.quality-table td.quality-name-cell {
    width: 45% !important;
    min-width: 240px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.quality-table th:nth-child(3),
.quality-table td:nth-child(3),
.quality-table td.quality-category-cell {
    width: 30% !important;
    min-width: 150px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.quality-table th:nth-child(4),
.quality-table td:nth-child(4),
.quality-table td.quality-action-cell {
    width: 17% !important;
    min-width: 90px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

#toggle-quality-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Unit of Measure List Page */
.uom-table {
    table-layout: auto !important;
    width: 100% !important;
}

.uom-table th:nth-child(1),
.uom-table td:nth-child(1) {
    width: 10% !important;
    min-width: 60px !important;
    text-align: center !important;
}

.uom-table th:nth-child(2),
.uom-table td.uom-name-cell {
    width: 65% !important;
    min-width: 240px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.uom-table th:nth-child(3),
.uom-table td:nth-child(3),
.uom-table td.uom-action-cell {
    width: 25% !important;
    min-width: 100px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

#toggle-uom-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}

/* Unit Conversion List Page */
.unit-conversion-table td {
    white-space: normal !important;
    word-break: break-word;
}

/* Store List Page */
.store-table td.store-name-cell,
.store-table td.store-branch-cell {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#toggle-store-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1;
}


/* ==========================================================================
   Fixed / Sticky Header & Navigation Bar on Scroll (Harpa-style)
   ========================================================================== */
.main-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1025 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e1e6f1 !important;
    margin-bottom: 0 !important;
}

@media (min-width: 992px) {
    .main-sidebar.side-menu {
        position: sticky !important;
        top: 65px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1020 !important;
        margin-top: 0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    }
}

.jumps-prevent {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* DataTable Excel export button layout */
.dataTables_length.d-flex,
div.dataTables_wrapper div.dataTables_length {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

div.dataTables_wrapper div.dataTables_length label {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

div.dataTables_wrapper div.dataTables_length label select {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
}

div.dataTables_wrapper div.dataTables_length #btn_excel_export,
div.dataTables_wrapper div.dataTables_length #btn-export-excel {
    margin: 0 0 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.dataTables_filter.d-flex {
    gap: 8px;
}

.dataTables_filter.d-flex label {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.dataTables_filter.d-flex #btn_excel_export,
.dataTables_filter.d-flex #btn-export-excel {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

/* Header AI Logo next to User Profile Icon */
.header-ai-logo-item {
    display: flex !important;
    align-items: center !important;
    margin-left: 10px !important;
    margin-right: 6px !important;
}

.header-ai-logo {
    height: 38px !important;
    width: 38px !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform 0.2s ease !important;
}

.header-ai-logo:hover {
    transform: scale(1.08) !important;
}
/* ===================================================
   Pick List & Create Pick List Module Styles
   =================================================== */
.create-pick-list-page .table > thead > tr > th,
#sales_order_detail_table > thead > tr > th {
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: unset !important;
}

.create-pick-list-page .no-border {
    padding: 0 !important;
    border: unset !important;
}

.create-pick-list-page .richText .richText-editor {
    height: 80px !important;
}

.create-pick-list-page .hid-tbl,
.create-pick-list-page .h-id,
.create-pick-list-page .pick-list-tbl,
.create-pick-list-page .hid-btn {
    display: block !important;
}

.create-pick-list-page .box_detail {
    margin-top: 20px !important;
}

.create-pick-list-page .page-header,
.pick-list-detail-page .page-header,
.picking-list-page .page-header {
    padding-top: -10px !important;
    padding-bottom: -10px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
    min-height: auto !important;
}

.create-pick-list-page .page-header h4,
.pick-list-detail-page .page-header h4,
.picking-list-page .page-header h4 {
    margin: -10px 0 !important;
    line-height: 1.2 !important;
}

/* Product Alias Page Styles */
.product-alias-page .table > thead > tr > th {
    font-size: 13px;
    font-weight: 600;
    text-transform: unset;
}

.product-alias-page #product-alias-tbl tbody td {
    vertical-align: middle;
}

/* GRN Box Mismatch Error */
.box-error {
    font-size: 11px;
    font-weight: 600;
    color: #dc3545;
    margin-top: 5px;
    line-height: 1.35;
    word-break: break-word;
}
.box-error:empty {
    display: none;
}
input[name^='box_item_'].parsley-error,
input[name^='box_item_'].is-invalid,
.no_of_boxes.parsley-error,
.no_of_boxes.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}


/* ===================================================
   Sales Order Detail - Availability Status Buttons
   =================================================== */
.so-avail-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 2px 0;
}

.so-avail-btn {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 5px 18px;
    border: none;
    min-width: 105px;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    line-height: 1.5;
}

.so-avail-btn.btn-so-green {
    background-color: #16a34a !important;
    color: #ffffff !important;
}

.so-avail-btn.btn-so-yellow {
    background-color: #eab308 !important;
    color: #000000 !important;
}

.so-avail-btn.btn-so-blue {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

.so-avail-btn.btn-so-orange {
    background-color: #ea580c !important;
    color: #ffffff !important;
}

.so-avail-btn.btn-so-red {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.so-avail-label {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    margin-top: 4px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.so-col-avail-header {
    font-weight: 700;
    font-size: 12px;
    color: #334155;
    min-width: 145px;
}

.so-col-avail-cell {
    font-size: 13px;
    vertical-align: middle;
}

/* Blinking Animation for Green Availability Status Button when Unreserved Stock < Product MOQ */
@keyframes so-blink-green {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(22, 163, 74, 0.85);
    }
    50% {
        opacity: 0.35;
        box-shadow: 0 0 2px rgba(22, 163, 74, 0.2);
    }
}

.so-avail-btn.so-btn-blink {
    animation: so-blink-green 1s infinite ease-in-out;
}


/* ==========================================================================
   Stock Adjustment, Scrap & Stock Audit Dedicated Styles
   (Zero Conflict Namespaced Utilities)
   ========================================================================== */
.page-header-compact {
    min-height: unset !important;
}

.table-bordered-left {
    border-left: 1px solid #e1e6f1 !important;
}

.col-w-sl {
    width: 70px !important;
}

.col-w-action {
    width: 80px !important;
}

.adj-badge {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    display: inline-block;
}

.adj-preview-container {
    display: none;
    margin-bottom: 12px;
}

.adj-preview-alert {
    font-size: 13px;
}

.adj-diff-minus {
    color: #dc3545;
    font-size: 14px;
    font-weight: 700;
}

.adj-diff-plus {
    color: #28a745;
    font-size: 14px;
    font-weight: 700;
}

.stock-audit-empty-icon {
    font-size: 36px;
    color: #a8afc7;
}

.stock-audit-empty-text {
    font-size: 14px;
}

/* ==========================================================================
   Create Scrap & Stock Adjustment Scoped Styles (Zero Conflict)
   ========================================================================== */
.create-scrap-page .table > thead > tr > th,
.create-stock-adj-page .table > thead > tr > th {
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: unset !important;
}

.create-scrap-page .no-border,
.create-stock-adj-page .no-border {
    padding: 0 !important;
    border: unset !important;
}

.create-scrap-page .richText .richText-editor,
.create-stock-adj-page .richText .richText-editor {
    height: 80px !important;
}

.create-scrap-page .hid-tbl,
.create-scrap-page .h-id,
.create-scrap-page .scrap-list-tbl,
.create-scrap-page .hid-btn,
.create-stock-adj-page .hid-tbl,
.create-stock-adj-page .h-id,
.create-stock-adj-page .scrap-list-tbl,
.create-stock-adj-page .hid-btn {
    display: block !important;
}

.create-scrap-page .box_detail,
.create-stock-adj-page .box_detail {
    margin-top: 20px !important;
}

/* ==========================================================================
   Footer Positioning & Alignment Fix
   ========================================================================== */
.page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.main-content {
    flex: 1 0 auto !important;
}

.create-pick-list-page {
    min-height: calc(100vh - 120px) !important;
}

.main-footer {
    margin-top: auto !important;
    background-color: #ffffff !important;
    border-top: 1px solid #e1e6f1 !important;
}

/* ==========================================================================
   Sales Order Detail - Component Styles (Namespace: .sod-*)
   ========================================================================== */
.sod-header-min-unset {
    min-height: unset !important;
}

.sod-page-title {
    color: #1a202c !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.sod-btn-dark {
    font-weight: 600 !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    background-color: #eb6f33 !important;
    border-color: #eb6f33 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
}

.sod-card-bordered {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.sod-table-collapse {
    border-collapse: collapse !important;
    width: 100% !important;
}

.sod-thead-row {
    background-color: #f8fafc !important;
}

.sod-th-summary {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    letter-spacing: 0.5px !important;
    border-color: #e2e8f0 !important;
    color: #4a5568 !important;
}

.sod-td-summary {
    padding: 12px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-color: #e2e8f0 !important;
    color: #2d3748 !important;
}

.sod-table-bordered-left {
    width: 100% !important;
    border-left: 1px solid #e1e6f1 !important;
}

.sod-items-th {
    font-weight: 700 !important;
    font-size: 12px !important;
    color: #334155 !important;
}

.sod-items-td {
    font-size: 13px !important;
}

.sod-items-td-dark {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

.sod-items-td-slate {
    font-size: 13px !important;
    color: #334155 !important;
}

.sod-items-td-bold {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

.sod-valign-middle {
    vertical-align: middle !important;
}

.sod-badge-rounded {
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
}

.sod-badge-btn {
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 4px 10px !important;
}

.sod-arrow-icon {
    font-size: 10px !important;
}

.sod-badge-btn-sm {
    font-size: 11px !important;
    font-weight: 600 !important;
}

.sod-bom-table {
    font-size: 11px !important;
}

.sod-bom-thead {
    background-color: #e2e8f0 !important;
}

.sod-bom-col-delivery {
    min-width: 130px !important;
}

.sod-bom-col-status {
    min-width: 120px !important;
}

.sod-bom-row-red {
    background-color: rgba(239, 68, 68, 0.05) !important;
    border-left: 4px solid #ef4444 !important;
}

.sod-bom-row-green {
    background-color: rgba(16, 185, 129, 0.05) !important;
    border-left: 4px solid #10b981 !important;
}

.sod-bom-row-blue {
    background-color: rgba(59, 130, 246, 0.05) !important;
    border-left: 4px solid #3b82f6 !important;
}

.sod-bom-row-yellow {
    background-color: rgba(245, 158, 11, 0.06) !important;
    border-left: 4px solid #f59e0b !important;
}

.sod-bom-row-disabled {
    background-color: #f8fafc !important;
    border-left: 4px solid #94a3b8 !important;
}

.sod-bom-ext-link {
    font-size: 8px !important;
}

.sod-bom-bal-cost {
    font-size: 10px !important;
}

.sod-bom-delivery-badge {
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.sod-bom-dot-icon {
    font-size: 6px !important;
}

.sod-bom-del-sub {
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

/* Sales Order Detail Status Dot Badges & Row Accents */
.badge-so-red {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.badge-so-yellow {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.badge-so-blue {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.badge-so-green {
    background-color: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.badge-so-orange {
    background-color: #f97316 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.badge-so-disable {
    background-color: #94a3b8 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    opacity: 0.65 !important;
}

.so-waterfall-dots .badge {
    font-size: 13px !important;
    font-weight: 700 !important;
    min-width: 28px !important;
    height: 24px !important;
    padding: 2px 8px !important;
    line-height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.so-waterfall-dots-sm .badge,
.so-waterfall-dots-sm .so-dot {
    font-size: 0 !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
}

.so-waterfall-dots-sm .badge.active-dot,
.so-waterfall-dots-sm .so-dot.active-dot {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    border: 2px solid #ffffff !important;
    transform: scale(1.15);
    position: relative !important;
    z-index: 2 !important;
}

/* 4-Color Dual-Track Exact Palette (RTS: Green, Blue | PLAN: Red, Yellow) */
.so-waterfall-dots-sm .so-dot.bg-danger { background-color: #e53935 !important; }
.so-waterfall-dots-sm .so-dot.bg-warning { background-color: #f5c518 !important; }
.so-waterfall-dots-sm .so-dot.bg-primary { background-color: #2f9cff !important; }
.so-waterfall-dots-sm .so-dot.bg-success { background-color: #22a652 !important; }

/* Hatched & Hatched-Blink States for Makeable FG (Row 9, Row 10, Row 11) */
.so-waterfall-dots-sm .so-dot.bg-success.active-dot.hatched,
.so-waterfall-dots-sm .so-dot.bg-success.active-dot.hatched-blink {
    background-image: repeating-linear-gradient(
        135deg,
        #22a652 0px,
        #22a652 3px,
        #a7f3d0 3px,
        #a7f3d0 6px
    ) !important;
    border-color: #15803d !important;
}

.so-waterfall-dots-sm .so-dot.bg-primary.active-dot.hatched,
.so-waterfall-dots-sm .so-dot.bg-primary.active-dot.hatched-blink {
    background-image: repeating-linear-gradient(
        135deg,
        #2f9cff 0px,
        #2f9cff 3px,
        #bae6fd 3px,
        #bae6fd 6px
    ) !important;
    border-color: #1d4ed8 !important;
}

/* Active Blinking Dot Animation - Scoped strictly to SO status dots */
.so-waterfall-dots-sm .so-dot.active-dot.blink,
.so-waterfall-dots-sm .so-dot.active-dot.hatched-blink {
    animation: soDotBlink 1.2s infinite ease-in-out !important;
}

.so-track-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background-color: #cbd5e1;
    margin: 0 3px;
}

.so-track-chip {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    text-transform: uppercase;
    line-height: 1;
}

.so-legend-dot {
    width: 11px !important;
    height: 11px !important;
    min-width: 11px !important;
    display: inline-block;
    border-radius: 50%;
    vertical-align: middle;
}

.so-legend-dot.hatched-green {
    background-image: repeating-linear-gradient(135deg, #22a652 0px, #22a652 2px, #a7f3d0 2px, #a7f3d0 4px) !important;
    border: 1px solid #15803d;
}

.so-legend-dot.hatched-blue {
    background-image: repeating-linear-gradient(135deg, #2f9cff 0px, #2f9cff 2px, #bae6fd 2px, #bae6fd 4px) !important;
    border: 1px solid #1d4ed8;
}

@keyframes soDotBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
        transform: scale(1.22);
    }
    50% {
        opacity: 0.22;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
        transform: scale(1.02);
    }
}

/* Accessibility: reduce motion if user preferred */
@media (prefers-reduced-motion: reduce) {
    .so-waterfall-dots-sm .so-dot.active-dot.blink,
    .so-waterfall-dots-sm .so-dot.active-dot.hatched-blink {
        animation: none !important;
        border: 2px dashed #000000 !important;
    }
}

.so-waterfall-dots-sm .badge.inactive-dot,
.so-waterfall-dots-sm .so-dot.inactive-dot {
    opacity: 0.28 !important;
}

.table tr.so-row-green > td:first-child {
    border-left: 4px solid #10b981 !important;
}

.table tr.so-row-blue > td:first-child {
    border-left: 4px solid #3b82f6 !important;
}

.table tr.so-row-yellow > td:first-child {
    border-left: 4px solid #f59e0b !important;
}

.table tr.so-row-red > td:first-child {
    border-left: 4px solid #ef4444 !important;
}

.table tr.so-row-orange > td:first-child {
    border-left: 4px solid #f97316 !important;
}

.table tr.so-row-disabled > td:first-child {
    border-left: 4px solid #94a3b8 !important;
}

#customer_order_detail_table tr.shown {
    background-color: #f8fafc !important;
}

/* ==========================================================================
   Scrap Views - Component Styles (Namespace: .scrap-*)
   ========================================================================== */
.scrap-header-min-unset {
    min-height: unset !important;
}

.scrap-table-border-left {
    border-left: 1px solid #e1e6f1 !important;
}

/* ==========================================================================
   Sales Order List - Component Styles (Namespace: .sol-*)
   ========================================================================== */
.sol-header-min-unset {
    min-height: unset !important;
}

.sol-custom-alert {
    display: none;
}

.sol-import-card {
    display: none;
    margin-bottom: 10px !important;
}

.sol-card-header-padded {
    padding-left: 15px !important;
}

.sol-sample-download {
    float: right !important;
    padding: 0 5px !important;
}

.sol-table-border-left {
    border-left: 1px solid #e1e6f1 !important;
}

.sol-badge-picked {
    background-color: #ffc107 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.sol-badge-packed-active {
    background-color: #28a745 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.sol-badge-packed-dark {
    background-color: #343a40 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.sol-badge-dispatch-active {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.sol-badge-dispatch-dark {
    background-color: #343a40 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.sol-td-nowrap {
    white-space: nowrap !important;
}

.sol-btn-view {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background-color: #00b0ff !important;
    border-color: #00b0ff !important;
    color: #ffffff !important;
}

.sol-btn-edit-disabled {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.sol-btn-edit-active {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.sol-btn-status-pill {
    padding: 4px 10px !important;
    border-radius: 4px !important;
    opacity: 0.85 !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   Global Uniform Orange Back Button (.btn-back-orange)
   ========================================================================== */
.btn-back-orange {
    background-color: #eb6f33 !important;
    border-color: #eb6f33 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.btn-back-orange:hover,
.btn-back-orange:focus,
.btn-back-orange:active {
    background-color: #d45d22 !important;
    border-color: #d45d22 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(212, 93, 34, 0.28) !important;
}

.btn-back-orange i {
    font-size: 13px !important;
    line-height: 1 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Project-Wide Centered Floating Popup-Style Flash Alert
   ========================================================================== */
.vpo-flash-wrap,
.jsk-flash-wrap {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10900;
    width: min(500px, calc(100vw - 32px));
    pointer-events: none;
}

.vpo-flash-wrap .alert,
.jsk-flash-wrap .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    opacity: 1 !important;
}

.vpo-flash-wrap .alert-success,
.jsk-flash-wrap .alert-success {
    background-color: #d1e7dd !important;
    border-color: #a3cfbb !important;
    color: #0a3622 !important;
}

.vpo-flash-wrap .alert-danger,
.jsk-flash-wrap .alert-danger {
    background-color: #f8d7da !important;
    border-color: #f1aeb5 !important;
    color: #58151c !important;
}

.vpo-flash-wrap .alert-warning,
.jsk-flash-wrap .alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffe69c !important;
    color: #664d03 !important;
}

.vpo-flash-wrap .alert-info,
.jsk-flash-wrap .alert-info {
    background-color: #cff4fc !important;
    border-color: #9eeaf9 !important;
    color: #055160 !important;
}
