/* ==========================================================================
   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;
}
