@media (max-width: 767px) {
    .main-header .navbar-custom-menu {
        float: none !important;
        display: block !important;
    }

    .main-header .navbar-custom-menu .dropdown-menu {
        left: auto !important;
    }

    .skin-blue-light .main-header .navbar .dropdown-menu li a {
        color: #777;
    }

    .main-header .navbar {
        height: auto;
    }
}

.bg-danger {
    background-color: #f2dede !important;
}

.btn-big {
    padding: 10px 30px;
    font-size: 18px;
    line-height: 1.3333333;
}

.of-visible {
    overflow: visible !important;
}

#online_indicator {
    font-size: 8px;
    vertical-align: middle;
}

.pt-0 {
    padding-top: 0px;
}

.f-right {
    float: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.discount-badge {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 18px;
    padding: 7px;
}

.discount-badge-small {
    position: absolute;
    top: -2px;
    left: 10px;
    font-size: 12px;
    padding: 6px;
}

.product-info-table td,
.product-info-table th {
    font-size: 12px;
}

.catalogue {
    max-height: 127px;
    margin: auto;
    margin-bottom: 18px;
}

.catalogue-title {
    display: inline-block;
    font-size: 18px;
    margin: 0;
    line-height: 1;
    margin-bottom: 10px;
}

.bg-light-gray {
    background-color: #f8f8f8 !important;
}

.p-5-5 {
    padding: 5px 5px !important;
}

.m-4 {
    margin: 4px;
}

.skin-black .main-header,
.skin-black-light .main-header {
    color: #525f7f !important;
}

.skin-black .main-header .navbar .nav .open>a {
    color: #999 !important;
}

.skin-black .main-header .navbar .nav>li>a:hover {
    color: #999 !important;
}

.skin-black .main-header .navbar>.sidebar-toggle:hover {
    color: #999 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.table-pdf thead tr {
    background-color: #357ca5 !important;
    color: #fff;
}

.table-pdf thead tr th {
    color: #fff !important;
}

.blue-heading {
    background-color: #357ca5;
    color: #fff;
}

.table-pdf .odd {
    background-color: #DCE6F1;
}

.p-4 {
    padding: 4px;
}

.p-10 {
    padding: 10px !important;
}

.jquery-top-scrollbar {
    height: 6px !important;
}

.jquery-top-scrollbar div {
    height: 6px !important;
}

.scroll-top-bottom {
    width: 100%;
    overflow: scroll;
}

.scroll-top-bottom::-webkit-scrollbar {
    height: 6px;
}

.scrolltop {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    width: auto;
    height: auto;
    margin: 0;
}

.scroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #475569;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 14px 0 rgba(15, 23, 42, 0.08), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -moz-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.scroll:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 10px 22px -3px rgba(15, 23, 42, 0.22), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
    transform: translateY(-3px);
    -webkit-transform: translateY(-3px);
}

.scroll:hover svg,
.scroll:hover i,
.scroll:hover .fas {
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
}

.scroll:active {
    transform: translateY(-1px) scale(0.95);
    -webkit-transform: translateY(-1px) scale(0.95);
    box-shadow: 0 4px 8px 0 rgba(15, 23, 42, 0.15);
}

.scroll svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll .fas,
.scroll i {
    font-size: 16px;
    line-height: 1;
    margin: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.f-left {
    float: left;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

.table-pdf {
    border-collapse: collapse;
    width: 100%;
    border-spacing: 8px 10px;
}

.td-border td,
.td-border th {
    border-bottom: 1px solid lightgrey;
    padding: 8px 5px;
}

.ws-nowrap {
    white-space: nowrap;
}

.btn-app>.fas,
.btn-app>.fab {
    font-size: 20px;
    display: block;
}

.dropdown-menu>li>a>.fas {
    margin-right: 6px;
}

.mt-5 {
    margin-top: 5px !important;
}

.pos-form-actions {
    height: auto;
    padding-top: 12px;
    padding-bottom: 20px;
    position: fixed;
    bottom: 0px;
    /* background-color: #D1D5DC; */
    width: 100%;
    z-index: 1000;
}

.mb-12 {
    margin-bottom: 12px !important;
}

.pb-0 {
    padding-bottom: 0px !important;
}

.pr-12 {
    padding-right: 12px !important;
}

.main-header .sidebar-toggle:before {
    content: "" !important;
}

.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    /* prevent horizontal scrollbar */
    overflow-x: hidden;
}

.margin-bottom-20 {
    margin-bottom: 20px !important;
}

.text-white {
    color: #fff;
}

.wizard>.steps>ul>li {
    width: 33.33% !important;
}

.wizard>.content {
    /* background: #445867 !important; */
}

legend {
    color: #fff;
    margin-bottom: 6px;
    border-bottom: none;
}

.left-col {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(51, 51, 51, 0.32)), url(../img/home-bg.jpg);
    text-align: center;
    background-size: cover;
    background-position: center;
}

.left-col-content {
    color: #1A7BF9;
    width: 100%;
}

.login-header {
    font-size: 27px;
    font-weight: 600;
}

.login-header a {
    color: #fff;
}

.form-header {
    font-size: 18px;
    margin: 16px 0;
}

.btn-login {
    padding: 6px 52px !important;
}

/* .right-col {
  background-color: #243949;
  height: 100%;
  min-height: 100vh;
} */

/* Background color added by Prashant */
.right-col {
    background: linear-gradient(to right, #6366f1, #3b82f6);
    height: 100%;
}

/* .right-col label {
  color: #fff;
}

.right-col a, .text-white a {
  color: #fff;
  font-weight: 600;
  font-size: 15px
}
.right-col a:hover, .text-white a:hover {
  color: #ccc;
}
.right-col-content {
  padding: 10% 16%;
  padding-bottom: 3%;
}
.right-col-content-register {
  padding: 2% 8%;
} */

.input_inline {
    width: 100%;
    display: inline-flex;
}

.input_inline input,
.input_inline span {
    width: 50%;
}

.bg-manufacturing {
    background-color: #ff851b;
}

.img-thumbnail {
    position: relative;
    width: 70px;
    height: 70px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    transition: border .2s ease-in-out;
    padding: 4px;
    margin: 3px;
    text-align: center;
}

.img-thumbnail>.badge {
    position: absolute;
    top: -5px;
    right: -7px;
    font-size: 9px;
    font-weight: 400;
    cursor: pointer;
}

.navbar-nav>.notifications-menu>.dropdown-menu>li .menu {
    max-height: 350px;
}

.bg-aqua-lite {
    background-color: #7FFFD4;
}

.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a {
    white-space: normal;
}

.spacer {
    margin-top: 20px;
}

#product_list_body {
    max-height: 485px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.div-overlay {
    cursor: not-allowed;
    background: #e9e9e9;
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.5;
}

.d-inline-table {
    display: inline-table;
}

.label-round {
    font-size: 8px;
    border-radius: 44%;
}

.table>tbody+tbody {
    border-top: 0;
}

.table-pl-12 td,
.table-pl-12 th {
    padding-left: 12px !important;
}

table tbody td.pl-20-td {
    padding-left: 20px !important;
}

table.table-border-center>tbody>tr>td:first-child,
table.table-border-center>thead>tr>th:first-child,
table.table-border-center>tfoot>tr>td:first-child {
    border-right: 1px solid darkgray;
}

table.table-border-center-col>tbody>tr>td:nth-child(2),
table.table-border-center-col>thead>tr>th:nth-child(2),
table.table-border-center-col>tfoot>tr>td:nth-child(2) {
    border-right: 1px solid darkgray;
    border-left: 1px solid darkgray;
}

.bg-transparent {
    background-color: transparent !important;
}

.mb-0 {
    margin-bottom: 0;
}

.nav-tabs>li>a {
    font-size: 18px;
    font-weight: 600;
}

.table-transparent,
.table-transparent th {
    background-color: transparent !important;
    color: #000 !important;
}

.td-full-width {
    white-space: nowrap;
}

.font-17 {
    font-size: 17px !important;
}

table.dataTable tbody>tr.selected {
    background-color: #B0BED9;
}

tr.footer-total>td {
    vertical-align: middle !important;
}

.error {
    color: red !important;
}

.product-validation-errors {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #9f1239;
}

.product-validation-errors .btn-link {
    color: #9f1239;
}

.product-validation-errors .btn-link:hover,
.product-validation-errors .btn-link:focus {
    color: #881337;
    text-decoration: underline;
}

/*  pos tab */
div.pos-tab-container {
    z-index: 10;
    background-color: #ffffff;
    padding: 0 !important;
    border-radius: 4px;
    -moz-border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 28px;
    -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    background-clip: padding-box;
}

div.pos-tab-menu {
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 0;
}

div.pos-tab-menu div.list-group {
    margin-bottom: 0;
}

div.pos-tab-menu div.list-group>a {
    margin-bottom: 0;
}

div.pos-tab-menu div.list-group>a .glyphicon,
div.pos-tab-menu div.list-group>a .fa {
    color: #5A55A3;
}

div.pos-tab-menu div.list-group>a:first-child {
    border-top-right-radius: 0;
    -moz-border-top-right-radius: 0;
}

div.pos-tab-menu div.list-group>a:last-child {
    border-bottom-right-radius: 0;
    -moz-border-bottom-right-radius: 0;
}


/* div.pos-tab-menu div.list-group>a.active,
div.pos-tab-menu div.list-group>a.active .glyphicon,
div.pos-tab-menu div.list-group>a.active .fa{
  background-color: #3c8dbc;
  color: #ffffff;
    border-color: #3c8dbc;
} */

div.pos-tab-menu div.list-group>a.active,
div.pos-tab-menu div.list-group>a.active .glyphicon,
div.pos-tab-menu div.list-group>a.active .fa {
    background: linear-gradient(to right, #6366f1, #3b82f6);
    color: #ffffff;
    border-color: transparent;
}


div.pos-tab-menu div.list-group>a.active:after {
    /* content: ''; */
    position: absolute;
    left: 100%;
    top: 50%;
    margin-top: -13px;
    border-left: 0;
    border-bottom: 13px solid transparent;
    border-top: 13px solid transparent;
    border-left: 10px solid #3c8dbc;
}

div.pos-tab-content {
    background-color: #ffffff;
    /* border: 1px solid #eeeeee; */
    padding-left: 20px;
    padding-top: 20px;
}

div.pos-tab div.pos-tab-content:not(.active) {
    display: none;
}

.add-product-price-table th {
    background-color: #5cb85c;
    color: white;
}

.blue-header th {
    background-color: #3c8dbc;
    color: white;
}

.table-th-green th {
    background-color: #5cb85c;
    color: white;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}

.active-cell {
    border: 2px dotted #3c8dbc !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.pos_product_div {
    /* min-height: 47vh;
    max-height: 57vh; */
    overflow-y: auto;
    /* margin-bottom: 20px; */
    height: 40vh !important;
}

.bg-lightgray {
    background-color: #F0EDED !important;
}

.balance_due_box>li {
    padding: 11px 5px 0px 5px;
}

.option-div {
    padding: 15px;
    background-color: #d2d6de;
    color: #333;
    border: 1px solid #d2d6de;
    cursor: pointer;
}

.option-div input[type="radio"] {
    display: none;
}

.option-div-group .icon {
    color: #d33724;
    display: none;
}

.option-div-group .option-div:hover {
    border: 1px solid gray;
}

.option-div-group .active .icon {
    display: block;
}

.margin-left-10 {
    margin-left: 10px;
}

.margin-bottom-12 {
    margin-bottom: 12px;
}

.bg-info {
    background-color: #00c0ef !important;
}

.bg-info>a {
    color: #FFFFFF !important;
}

.bg-info>a:hover {
    background-color: #337ab7 !important;
}

ul.dt-button-collection {
    background-color: #00c0ef;
}

td.details-control {
    background: url('/img/details_open.png') no-repeat center center;
    cursor: pointer;
}

tr.details td.details-control {
    background: url('/img/details_close.png') no-repeat center center;
}

.icheckbox_square-blue,
.iradio_square-blue {
    margin-right: 10px;
}

.header-right-div {
    right: 10px;
    float: right;
    position: absolute;
    top: 15px;
}

.header-left-div {
    margin-top: 15px;
    display: inline-flex;
}

.m-8 {
    margin: 8px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.m-5 {
    margin: 5px;
}

.icon-link {
    text-align: center;
    display: block;
    margin-bottom: 18px;
}

.icon-link>a {
    display: grid;
}

.icon-link>.badge {
    position: absolute;
    top: 20px;
    right: 67px;
}

.link-des {
    display: inline-block;
    text-align: left;
}

.navbar-nav>.user-menu>.dropdown-menu>li.user-header>img {
    border: none;
    height: auto;
    width: 100%;
    max-height: 120px;
}

.bg-light-green {
    background-color: #98D973 !important;
    color: #fff !important
}

.hover-q {
    font-size: 16px;
    margin-left: 3px;
    cursor: help;
}

.input-group-addon .hover-q {
    margin-left: 0px;
}

.text-bold {
    font-weight: bold;
}

.tour .popover-content {
    padding: 18px 14px;
}

.popover {
    max-width: 320px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    font-family: inherit;
    z-index: 1060;
}

.popover-content {
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    padding: 10px 14px;
}

.table-slim>tbody>tr>td,
.table-slim>tbody>tr>th,
.table-slim>tfoot>tr>td,
.table-slim>tfoot>tr>th,
.table-slim>thead>tr>td,
.table-slim>thead>tr>th {
    padding: 1px;
}

/* Custom scroll bar start*/

/* width */
/* ::-webkit-scrollbar {
    width: 7px;
} */

/* Track */
/* ::-webkit-scrollbar-track {
    background: #f1f1f1; 
} */

/* Handle */
/* ::-webkit-scrollbar-thumb {
    background: #888; 
} */

/* Handle on hover */
/* ::-webkit-scrollbar-thumb:hover {
    background: #555; 
} */

/* Custom scroll bar end*/

.product_cell {
    height: 100px;
    padding: 1%;
}

.product_cell_div {
    height: 100% !important;
    width: 100% !important;
    text-align: center;
    vertical-align: middle;
    padding-top: 5px;
    cursor: pointer;
    overflow: hidden;
}

/*CSS to print receipts*/
.print_section {
    display: none;
}

@media print {
    @page {
        size: auto;
        margin: 0mm;
    }

    .print_section {
        display: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    .print_section:not(:empty) {
        display: block !important;
        width: 100% !important;
        page-break-after: avoid !important;
        page-break-before: avoid !important;
        break-after: avoid !important;
        break-before: avoid !important;
    }

    .print_section:empty {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .modal-xl {
        width: 100% !important;
    }

    ::-webkit-scrollbar {
        display: none !important;
    }

    #toast-container,
    .daterangepicker,
    .select2-container,
    .modal-backdrop,
    .popover,
    .tooltip,
    .sweet-alert,
    .swal2-container,
    .jconfirm,
    .ui-autocomplete,
    .ui-datepicker,
    .datetimepicker,
    .bootstrap-datetimepicker-widget {
        display: none !important;
    }
}

.input-number .btn-default {
    background-color: white;
    padding: 6px 9px;
}

.width-50 {
    width: 50% !important;
}

.width-40 {
    width: 40% !important;
}

.width-60 {
    width: 60% !important;
}

.width-100 {
    width: 100% !important;
}

.font-30 {
    font-size: 30px !important;
}

.font-23 {
    font-size: 23px !important;
}

.padding-5 {
    padding: 5px !important;
}

.padding-10 {
    padding: 10px !important;
}

.padding-side-15 {
    /*padding-left: 15px !important;
    padding-right: 15px !important;*/
}

.text-muted-imp {
    color: #A3A3A3 !important;
}

.table-no-top-cell-border td {
    border-top: 0px !important;
    border-bottom: 0px !important;
}

.table-no-top-cell-border th {
    border-top: 0px !important;
    border-bottom: 0px !important;
}

.table-no-side-cell-border td {
    border-left: 0px !important;
    border-right: 0px !important;
}

.table-no-side-cell-border th {
    border-left: 0px !important;
    border-right: 0px !important;
}

.color-555 {
    color: #555555 !important;
}

.color-555 * {
    color: #555555 !important;
}

.color-white {
    color: white !important;
}

.col-no-padding {
    padding-left: 0px;
    padding-right: 0px;
}

.col-2px-padding {
    padding: 2px;
}

.pos-express-btn {
    font-size: 23px !important;
    overflow: hidden !important;
    height: 73px !important;
    white-space: normal;
}

.word-wrap {
    word-wrap: break-word !important;
}

.modal-xl {
    width: 90%;
    /* respsonsive width */
    margin-left: auto !important;
    margin-right: auto !important;
}

table.ajax_view tbody tr {
    cursor: pointer;
}

.bg-white {
    background-color: #fff;
}

.product-thumbnail-small {
    height: 50px;
    width: 50px;
}

table.table-text-center td,
table.table-text-center th {
    vertical-align: middle !important;
}

.product_list {
    padding-left: 3px;
    padding-right: 3px;
}

.product_box {
    width: 100%;
    /*padding-top: 5px;
  padding-bottom: 2px;*/
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    /*border: 1px solid darkgray;*/
    font-weight: 600;
    background-color: #fff;
    border-radius: 12px;
    padding: 8px;
}

.product_box .image-container {
    height: 50px;
    margin: auto;
    width: 100%;
    margin-bottom: 4px;

}

.product_box .image-container img {
    height: 100%;
    width: 100%;
    border-radius: 12px;
}

.eq-height-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
}

.eq-height-col {
    display: flex;
}

.product_box .text_div {
    margin-top: 3px;
}

.product_box .text {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    /* number of lines to show */
    line-height: 14px;
    /* fallback */
    max-height: 14px;
    /* fallback */
}

.small-box.bg-gray:hover {
    color: #000;
    text-decoration: none;
}

#calendar table tbody td {
    cursor: pointer;
}

.min-height-90hv {
    min-height: 90vh !important;
}

/* Grow Shadow */
.hvr-grow-shadow {
    display: inline-block;
    vertical-align: middle;
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    -webkit-transition-property: box-shadow, transform;
    transition-property: box-shadow, transform;
}

.hvr-grow-shadow:hover,
.hvr-grow-shadow:focus,
.hvr-grow-shadow:active {
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.5);
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}

.text-link {
    cursor: pointer;
}

.text-link:hover {
    text-decoration: underline;
}

.v-center {
    vertical-align: middle !important;
}

.bg-woocommerce {
    background-color: #9E458B !important;
}

/*.box, .info-box, .nav-tabs-custom, .external-event{
  box-shadow: 0 4px 6px 0 hsla(0, 0%, 0%, 0.2) !important;
}*/

.user_avatar {
    border-radius: 50%;
    width: 25px;
    height: 25px;
    margin: 1px;
}

.fs-10 {
    font-size: 10px;
}

.timeline-lode-more-btn {
    margin-left: 50px;
    margin-top: 25px;
    padding-right: 12px;
    padding-left: 12px;
}

.pa-0 {
    padding: 0px !important;
}

.mt-56 {
    margin-top: 56px !important;
}

.m-2 {
    margin: 2px !important;
}

.treeview-menu i {
    display: none !important;
}

.treeview-menu a {
    padding-left: 25px !important;
    font-size: 95% !important;
}

.treeview-menu a::before {
    content: "\2192 ";
}

@media only screen and (max-width: 600px) {
    .pos-form-actions {
        position: absolute;
    }
}

.mr-8 {
    margin-right: 8px !important;
}

@media (max-width: 1024px) {
    .pos_form_totals {
        margin-bottom: 40px;
    }
}

.swal-modal .swal-text {
    text-align: center;
}

.pos-total {
    /* display: inline-block; */
    padding: 8px 10px;
    vertical-align: middle;
    margin-left: 5px;
    margin-right: 5px;
}

.pos-total span.number {
    font-size: 26px;
    vertical-align: middle;
    font-weight: bolder;
}

.pos-total span.text {
    font-weight: bolder;
    display: inline-block;
    width: 60px;
    vertical-align: middle;
}

.mb-40 {
    margin-bottom: 40px !important;
}

@media print {
    a:after {
        content: '';
    }

    a[href]:after {
        content: none !important;
    }
}

.fa-times {
    font-size: 30px
}

.mb-5 {
    margin-bottom: 5px !important;
}

.tree-actions {
    margin-left: 20px;
    display: none;
}

.jstree-hovered .tree-actions {
    display: inherit;
}

/* Latin POS - Modern Sidebar Submenu Styling */
.sidebar-submenu-container {
    padding: 0 !important;
    margin: 4px -12px 10px -12px !important;
}

.sidebar-submenu-header {
    background-color: #e8ecf2;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 5px 12px;
    margin: 4px 0 2px 0;
    user-select: none;
    border-top: 1px solid #dfe5ee;
    border-bottom: 1px solid #dfe5ee;
}

.sidebar-submenu-header:first-child {
    margin-top: 2px;
}

.sidebar-child-link {
    display: flex;
    align-items: center;
    padding: 7px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b !important;
    text-decoration: none !important;
    border-left: 3.5px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.sidebar-child-link:hover:not(.active) {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.sidebar-child-link.active,
.sidebar-child-link.is-active {
    background-color: #e9ecfa !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-left: 3.5px solid #101c4e !important;
}

.sidebar-child-link .sidebar-item-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-right: 11px;
    flex-shrink: 0;
    color: #1e293b;
    stroke-width: 1.6;
}

.sidebar-child-link.active .sidebar-item-icon {
    color: #0f172a;
}

.sidebar-child-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #cbd5e1;
    margin-right: 12px;
    margin-left: 6px;
    flex-shrink: 0;
}

.sidebar-child-link.active .sidebar-child-dot {
    background-color: #101c4e;
    transform: scale(1.25);
}

.sidebar-submenu-divider {
    margin: 4px 0;
    border-top: 1px solid #e2e8f0;
}

/* ======================================================
   Latin POS - Enhanced Contact 360 View Styling
   ====================================================== */
.contact-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-back-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-back-contact:hover {
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    transform: translateX(-2px);
}

.contact-header-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 2px;
}

.contact-header-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
}

.contact-header-breadcrumbs a:hover {
    color: #4338ca;
}

.contact-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.contact-switcher-box {
    position: relative;
    min-width: 280px;
}

.contact-switcher-box .select2-container--default .select2-selection--single {
    height: 42px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 10px !important;
}

.contact-switcher-box .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    font-size: 13.5px !important;
}

.contact-switcher-box .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 8px !important;
}

/* Contact Hero Profile Card */
.contact-profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.contact-profile-main {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.contact-avatar-wrapper {
    flex-shrink: 0;
}

.contact-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.contact-identity-details {
    flex: 1;
}

.contact-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.contact-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.contact-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-contact-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}

.badge-contact-type.badge-customer {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-contact-type.badge-supplier {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.badge-contact-type.badge-both {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}

.badge-contact-type.badge-lead {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.badge-contact-id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

.badge-contact-biz {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    background: #f8fafc;
    color: #334155;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

/* Metadata items */
.contact-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
}

.contact-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.meta-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.meta-icon-phone {
    background: #ecfdf5;
    color: #10b981;
}

.meta-icon-address {
    background: #fff1f2;
    color: #f43f5e;
}

.meta-icon-email {
    background: #eef2ff;
    color: #6366f1;
}

.meta-icon-tax {
    background: #f0fdf4;
    color: #16a34a;
}

.meta-icon-credit {
    background: #fef3c7;
    color: #d97706;
}

.meta-icon-terms {
    background: #f1f5f9;
    color: #64748b;
}

.meta-content {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    line-height: 1.2;
}

.meta-value-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none !important;
}

a.meta-value:hover {
    color: #4f46e5;
}

.btn-wa-quick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #25d366;
    color: #ffffff !important;
    font-size: 12px;
    transition: transform 0.15s ease, background 0.15s ease;
    text-decoration: none !important;
}

.btn-wa-quick:hover {
    background: #1ebc59;
    transform: scale(1.1);
}

/* Right side actions & balance */
.contact-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.contact-financial-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 210px;
}

.contact-financial-pill.has-due {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.contact-financial-pill.is-paid {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.due-info {
    display: flex;
    flex-direction: column;
}

.due-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e11d48;
}

.due-amount {
    font-size: 18px;
    font-weight: 800;
    color: #be123c;
    line-height: 1.2;
}

.btn-pay-due {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #e11d48;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.btn-pay-due:hover {
    background: #be123c;
    transform: translateY(-1px);
}

.contact-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-contact-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    transition: all 0.2s ease;
    text-decoration: none !important;
    cursor: pointer;
}

.btn-contact-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.btn-contact-action.btn-add-discount {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.btn-contact-action.btn-add-discount:hover {
    background: #e0e7ff;
    color: #3730a3;
}

/* Modern Segmented Navigation Tabs */
.contact-tabs-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.contact-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 8px;
    gap: 4px;
    list-style: none;
    margin: 0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.contact-tabs-nav>li {
    margin: 0;
}

.contact-tabs-nav>li>a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b !important;
    border-radius: 9px;
    border: 0 !important;
    background: transparent;
    transition: all 0.18s ease;
    text-decoration: none !important;
}

.contact-tabs-nav>li>a:hover {
    color: #0f172a !important;
    background: #edf2f7;
}

.contact-tabs-nav>li.active>a,
.contact-tabs-nav>li.active>a:hover,
.contact-tabs-nav>li.active>a:focus {
    color: #4338ca !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-weight: 700;
}

.contact-tabs-content {
    padding: 20px 22px;
}

/* ==========================================================================
   Modern Global Filters Component (Latin POS)
   ========================================================================== */

.lp-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.lp-filter-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

.lp-filter-card.has-active-filters {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px -2px rgba(59, 130, 246, 0.12);
}

/* Header */
.lp-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #ffffff;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lp-filter-card:has(.collapse.in) .lp-filter-header {
    border-bottom-color: #f1f5f9;
    background: #fafafa;
}

.lp-filter-header-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    margin-right: 12px;
}

.lp-filter-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-filter-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.lp-filter-card.has-active-filters .lp-filter-icon-badge {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.lp-filter-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.lp-filter-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.lp-filter-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    display: inline-block;
    animation: lpPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes lpPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

.lp-filter-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 600;
}

.lp-filter-toggle-text .text-show-filters {
    display: none;
}

.lp-filter-toggle-text .text-hide-filters {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lp-filter-header-trigger.collapsed .lp-filter-toggle-text .text-show-filters {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lp-filter-header-trigger.collapsed .lp-filter-toggle-text .text-hide-filters {
    display: none;
}

.lp-filter-chevron {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lp-filter-header-trigger.collapsed .lp-filter-chevron {
    transform: rotate(180deg);
}

/* Actions */
.lp-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.lp-filter-reset-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.lp-filter-reset-btn:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

/* Filter Body */
.lp-filter-body {
    padding: 20px 20px 8px 20px;
    background: #ffffff;
}

.lp-filter-row {
    margin-left: -8px;
    margin-right: -8px;
}

.lp-filter-row>[class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* Labels */
.lp-filter-card label:not(.lp-checkbox-label) {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* Form groups inside filter */
.lp-filter-card .form-group {
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

/* Select2 Modernization inside Filter Card */
.lp-filter-card .select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    transition: all 0.15s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
}

.lp-filter-card .select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8 !important;
    background-color: #ffffff !important;
}

.lp-filter-card .select2-container--default.select2-container--open .select2-selection--single,
.lp-filter-card .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.lp-filter-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 36px !important;
    padding-left: 12px !important;
    padding-right: 28px !important;
}

.lp-filter-card .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

.lp-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
}

.lp-filter-card .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

/* Active Control Highlight */
.lp-filter-card .lp-has-active-value .select2-selection--single {
    border-color: #93c5fd !important;
    background-color: #eff6ff !important;
}

.lp-filter-card .lp-has-active-value .select2-selection__rendered {
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

/* Inputs & Datepickers inside Filter Card */
.lp-filter-card .form-control:not(.select2-search__field) {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    font-size: 13px !important;
    color: #1e293b !important;
    padding: 6px 12px !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

.lp-filter-card .form-control:hover {
    border-color: #94a3b8 !important;
    background-color: #ffffff !important;
}

.lp-filter-card .form-control:focus {
    border-color: #3b82f6 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

/* Checkbox Alignment */
.lp-filter-card .lp-checkbox-group {
    display: flex;
    align-items: center;
    height: 38px;
    margin-top: 24px;
    margin-bottom: 16px;
    padding: 0 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.lp-filter-card .lp-checkbox-group:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.lp-filter-card .lp-checkbox-group.lp-has-active-value {
    background: #eff6ff;
    border-color: #93c5fd;
}

.lp-filter-card .lp-checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* ==========================================================================
   Modern Product Create / Edit Styles (Latin POS)
   ========================================================================== */

/* Section Card */
.lp-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    margin-bottom: 24px;
    overflow: visible !important;
    transition: all 0.2s ease-in-out;
    display: flow-root;
}

.lp-section-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

.lp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.lp-section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-section-number {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid #dbeafe;
}

.lp-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.lp-section-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    margin-bottom: 0;
}

.lp-section-body {
    padding: 24px;
    display: flow-root;
}

.lp-section-card::after,
.lp-section-body::after,
#product_form_part::after {
    content: "";
    display: table;
    clear: both;
}

.lp-section-card .lp-section-body .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.lp-section-card .lp-section-body .row>[class*="col-"] {
    min-width: 0 !important;
}

.lp-section-card .lp-section-body .row:before,
.lp-section-card .lp-section-body .row:after {
    display: none !important;
}

.lp-file-upload-box {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 8px;
    padding: 5px 12px;
    height: 40px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Form Controls & Labels inside Product Form */
.lp-section-card .form-group {
    margin-bottom: 18px;
}

.lp-section-card label:not(.lp-checkbox-label):not(.lp-type-card):not(.btn) {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Tooltip Icon positioning beside label */
.lp-section-card .hover-q,
.lp-section-card i.fa-info-circle,
.quick_add_product_modal .hover-q,
.quick_add_product_modal i.fa-info-circle,
.form-group>.hover-q,
.form-group>i.fa-info-circle,
label+.hover-q,
label+i.fa-info-circle {
    display: inline-block !important;
    margin-left: 5px !important;
    margin-bottom: 6px !important;
    vertical-align: middle !important;
    color: #0284c7 !important;
    font-size: 13.5px !important;
    cursor: pointer !important;
}

/* Ensure standalone inputs and select2 start cleanly on new line under label + tooltip */
.lp-section-card .form-group>.form-control,
.lp-section-card .form-group>.select2-container,
.quick_add_product_modal .form-group>.form-control,
.quick_add_product_modal .form-group>.select2-container {
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

/* Ensure flex containers clear and maintain horizontal flex layout */
.lp-section-card .form-group>.input-group,
.lp-section-card .form-group>.lp-input-group-select2,
.lp-section-card .form-group>.lp-pay-term-group,
.quick_add_product_modal .form-group>.input-group {
    display: flex !important;
    width: 100% !important;
    clear: both !important;
}

/* Modern Unified Input Group with Addons */
.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item),
.quick_add_product_modal .input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .input-group-addon,
.quick_add_product_modal .input-group .input-group-addon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    height: 40px !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
    font-size: 14px !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .input-group-addon:first-child,
.quick_add_product_modal .input-group .input-group-addon:first-child {
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .input-group-addon:last-child,
.quick_add_product_modal .input-group .input-group-addon:last-child {
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .input-group-btn,
.quick_add_product_modal .input-group .input-group-btn {
    display: flex !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .form-control:not(.input-sm),
.quick_add_product_modal .input-group .form-control:not(.input-sm) {
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .input-group-addon+.form-control,
.quick_add_product_modal .input-group .input-group-addon+.form-control {
    border-radius: 0 8px 8px 0 !important;
}

.lp-section-card .input-group:not(.lp-input-group-select2):not(.lp-installment-item) .form-control:first-child,
.quick_add_product_modal .input-group .form-control:first-child {
    border-radius: 8px 0 0 8px !important;
}

.lp-section-card .form-control:not(.select2-search__field) {
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 13.5px;
    color: #0f172a;
    padding: 6px 14px;
    box-shadow: none;
    transition: all 0.15s ease-in-out;
}

.lp-section-card .form-control:hover {
    border-color: #94a3b8;
}

.lp-section-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Product Name Hero */
.lp-hero-input {
    font-size: 15px !important;
    font-weight: 600 !important;
    height: 44px !important;
    border-color: #94a3b8 !important;
}

.lp-hero-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.18) !important;
}

/* Select2 Modernization */
.lp-section-card .select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
}

.lp-section-card .select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8 !important;
}

.lp-section-card .select2-container--default.select2-container--open .select2-selection--single,
.lp-section-card .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.lp-section-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 38px !important;
    padding-left: 14px !important;
    padding-right: 32px !important;
}

.lp-section-card .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.lp-section-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 10px !important;
    width: 20px !important;
}

.lp-section-card .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4.5px 0 4.5px !important;
    margin-top: -2px !important;
}

.lp-section-card .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #2563eb transparent !important;
    border-width: 0 4.5px 5px 4.5px !important;
}

/* Global Select2 Dropdown Overrides */
.select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
    z-index: 99999 !important;
    padding: 6px !important;
}

.select2-dropdown--below {
    border-top: 1px solid #cbd5e1 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.select2-dropdown--above {
    border-bottom: 1px solid #cbd5e1 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.select2-search--dropdown {
    padding: 6px !important;
    background-color: #ffffff !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.select2-search--dropdown .select2-search__field:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.select2-results__options {
    padding: 4px 0 !important;
    max-height: 220px !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 13px !important;
    color: #334155 !important;
    border-radius: 6px !important;
    margin: 1px 0 !important;
    cursor: pointer !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

.select2-results__option[aria-selected="true"] {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

.select2-results__message {
    padding: 10px 12px !important;
    font-size: 12.5px !important;
    color: #64748b !important;
}

/* Seamless Select2 in Input Group (Supplier & Customer) */
.lp-section-card .input-group.lp-input-group-select2,
.lp-input-group-select2 {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    position: relative !important;
}

.lp-input-group-select2 .lp-addon-icon {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 40px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 42px !important;
    padding: 0 !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.lp-input-group-select2 .select2-container {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: block !important;
}

.lp-input-group-select2 .select2-container .selection {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.lp-input-group-select2 .select2-selection--single {
    border-radius: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    height: 40px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    position: relative !important;
}

.lp-input-group-select2 .select2-container--focus .select2-selection--single,
.lp-input-group-select2 .select2-container--open .select2-selection--single {
    border-top-color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

/* Truncar el texto del cliente/proveedor si es largo para evitar desbordes */
.lp-section-card .lp-input-group-select2 .select2-container--default .select2-selection--single .select2-selection__rendered,
.lp-input-group-select2 .select2-container--default .select2-selection--single .select2-selection__rendered,
.lp-input-group-select2 .select2-selection__rendered {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-left: 14px !important;
    padding-right: 32px !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
}

.lp-input-group-select2 .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 8px !important;
    width: 20px !important;
    position: absolute !important;
    top: 1px !important;
}

.lp-input-group-select2 .input-group-btn {
    display: flex !important;
    align-items: stretch !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.lp-input-group-select2 .lp-addon-btn {
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    color: #2563eb !important;
    padding: 0 14px !important;
    background: #f8fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
}

.lp-input-group-select2 .lp-addon-btn:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #cbd5e1 !important;
}

/* Payment Term Joined Input Group */
.lp-section-card .lp-pay-term-group,
.lp-pay-term-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    clear: both !important;
}

.lp-pay-term-group input.form-control {
    flex: 1 1 50% !important;
    width: 50% !important;
    border: 1px solid #cbd5e1 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-right: 0 !important;
    height: 40px !important;
    box-sizing: border-box !important;
}

.lp-pay-term-group .select2-container {
    flex: 1 1 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    display: block !important;
}

.lp-pay-term-group .select2-selection--single {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
}

/* Select2 Multiple (e.g. Business Locations) */
.lp-section-card .select2-container--default .select2-selection--multiple {
    min-height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 3px 6px !important;
}

.lp-section-card .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 3px !important;
}

/* Input Group with Add Modal Button (+) */
.lp-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.lp-input-group .select2-container {
    flex: 1 1 auto;
    width: auto !important;
}

.lp-input-group .select2-selection {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.lp-btn-quick-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #f8fafc;
    color: #2563eb;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none !important;
}

.lp-btn-quick-add:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Image Dropzone */
.lp-image-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 22px 18px;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.lp-image-dropzone:hover,
.lp-image-dropzone.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.lp-image-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.lp-image-dropzone>*:not(input[type="file"]) {
    pointer-events: none;
}

.lp-image-dropzone .file-input,
.lp-image-dropzone .btn-file,
.lp-image-dropzone .file-preview,
.lp-image-dropzone .file-caption {
    display: none !important;
}

.lp-image-preview-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lp-image-preview-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Styled variation image file input in Spanish */
input[type="file"].variation_images {
    font-size: 11px;
    color: #64748b;
    max-width: 100%;
}

input[type="file"].variation_images::file-selector-button {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    margin-right: 6px;
    transition: all 0.2s ease;
}

input[type="file"].variation_images::file-selector-button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

input[type="file"].variation_images::-webkit-file-upload-button {
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    margin-right: 6px;
    transition: all 0.2s ease;
}

input[type="file"].variation_images::-webkit-file-upload-button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Product Type Segmented Cards (Section 2) */
.lp-product-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

@media (max-width: 991px) {
    .lp-product-type-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 640px) {
    .lp-product-type-cards {
        grid-template-columns: 1fr;
    }
}

.lp-type-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    margin: 0 !important;
    position: relative;
}

.lp-type-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.lp-type-card.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.12) !important;
}

.lp-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lp-type-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.lp-type-card.active .lp-type-card-icon {
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.lp-type-card-info {
    flex: 1;
}

.lp-type-card-title {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
}

.lp-type-card.active .lp-type-card-title {
    color: #1d4ed8;
}

.lp-type-card-desc {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.lp-type-card-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: #ffffff;
}

.lp-type-card.active .lp-type-card-radio {
    border-color: #2563eb;
    background: #2563eb;
}

.lp-type-card-radio-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.lp-type-card.active .lp-type-card-radio .lp-type-card-radio-inner {
    opacity: 1;
    transform: scale(1);
}

/* Price Table Overrides */
.add-product-price-table {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

.add-product-price-table>thead>tr>th,
.table-th-green th,
.blue-header th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 12px 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

.add-product-price-table>tbody>tr>td {
    padding: 14px !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
}

/* Specific styling for the variation table and seamless nested values table */
#product_variation_form_part {
    border: none !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
}

#product_variation_form_part>tbody>tr.variation_row {
    border-bottom: 2px solid #e2e8f0 !important;
    background: #ffffff !important;
}

#product_variation_form_part>tbody>tr.variation_row:last-child {
    border-bottom: none !important;
}

#product_variation_form_part>tbody>tr>td {
    border: none !important;
    border-right: 1px solid #f1f5f9 !important;
    vertical-align: top !important;
    padding: 16px 14px !important;
}

#product_variation_form_part>tbody>tr>td:first-child {
    vertical-align: middle !important;
    text-align: center !important;
    padding: 12px 8px !important;
    width: 50px !important;
}

#product_variation_form_part>tbody>tr>td:nth-child(2) {
    width: 210px !important;
}

#product_variation_form_part>tbody>tr>td:last-child {
    border-right: none !important;
    padding: 0 !important;
}

/* Inner variation table: seamless inside outer row */
.variation_value_table {
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    border-collapse: collapse !important;
}

.variation_value_table>thead>tr>th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    white-space: nowrap !important;
    border: none !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
    border-right: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    letter-spacing: 0.03em !important;
}

.variation_value_table>thead>tr>th:last-child {
    border-right: none !important;
}

.variation_value_table>tbody>tr>td {
    padding: 12px 10px !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
}

.variation_value_table>tbody>tr:last-child>td {
    border-bottom: none !important;
}

.variation_value_table>tbody>tr>td:last-child {
    border-right: none !important;
}

.lp-purchase-price-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
}

.lp-purchase-price-group>div {
    flex: 1 1 50% !important;
    min-width: 0 !important;
}

.variation_value_table .input-group,
.lp-section-card .variation_value_table .input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    height: 36px !important;
}

.variation_value_table .form-control,
.variation_value_table .form-control.input-sm,
.lp-section-card .variation_value_table .form-control,
.lp-section-card .variation_value_table .form-control.input-sm {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.variation_value_table .form-control.input-sm:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.variation_value_table .input-group .form-control,
.variation_value_table .input-group .form-control.input-sm,
.lp-section-card .variation_value_table .input-group .form-control,
.lp-section-card .variation_value_table .input-group .form-control.input-sm {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.variation_value_table .input-group .input-group-btn,
.lp-section-card .variation_value_table .input-group .input-group-btn {
    display: flex !important;
    align-items: stretch !important;
    width: auto !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.variation_value_table .input-group .btn.apply-all,
.lp-section-card .variation_value_table .input-group .btn.apply-all {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    color: #64748b !important;
    background: #f8fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: all 0.15s ease !important;
}

.variation_value_table .input-group .btn.apply-all:hover,
.lp-section-card .variation_value_table .input-group .btn.apply-all:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.variation_value_table input[type="file"].variation_images {
    font-size: 11.5px !important;
    color: #64748b !important;
    max-width: 170px !important;
    cursor: pointer !important;
}

.variation_value_table input[type="file"].variation_images::file-selector-button {
    border: 1px solid #cbd5e1 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 11.5px !important;
    cursor: pointer !important;
    margin-right: 6px !important;
    transition: all 0.2s ease !important;
}

.variation_value_table input[type="file"].variation_images::file-selector-button:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #2563eb !important;
}

.lp-table-input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    position: relative !important;
}

.lp-table-addon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    height: 38px !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
}

.lp-addon-left {
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
}

.lp-addon-right {
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
}

.lp-table-input-group .form-control {
    height: 38px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 0 !important;
    flex: 1 1 auto !important;
    width: 1% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    position: relative !important;
    z-index: 1 !important;
}

.lp-table-input-group .lp-addon-left+.form-control {
    border-radius: 0 8px 8px 0 !important;
}

.lp-table-input-group .form-control:first-child {
    border-radius: 8px 0 0 8px !important;
}

.lp-table-input-group .form-control:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
    z-index: 2 !important;
}

/* Variation Module Modern Styling */
.lp-sku-format-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.lp-sku-format-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-sku-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.lp-sku-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.lp-sku-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.lp-variation-action-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.lp-variation-action-bar h4 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.lp-btn-add-variation {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2) !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.lp-btn-add-variation:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px);
}

/* Outer and Inner Variations Table */
#product_variation_form_part {
    margin-bottom: 0;
    background: #ffffff;
}

#product_variation_form_part>thead>tr>th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    border: 1px solid #e2e8f0 !important;
}

#product_variation_form_part>tbody>tr>td {
    padding: 12px !important;
    border: 1px solid #e2e8f0 !important;
    vertical-align: top !important;
    background: #ffffff;
}

.variation_value_table {
    margin-bottom: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.variation_value_table>thead>tr>th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 8px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    vertical-align: middle !important;
}

.variation_value_table>tbody>tr>td {
    padding: 8px 10px !important;
    border: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    background: #ffffff !important;
}

.variation_value_table .form-control.input-sm {
    height: 34px !important;
    font-size: 12.5px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 4px 6px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.variation_value_table .form-control.input-sm:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

.variation_value_table .input-group {
    display: flex !important;
    width: 100% !important;
    position: relative !important;
}

.variation_value_table .input-group .form-control {
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
    border-radius: 6px 0 0 6px !important;
}

.variation_value_table .input-group .input-group-btn {
    width: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    position: relative !important;
    white-space: nowrap !important;
}

.variation_value_table .input-group .btn.apply-all {
    height: 34px !important;
    padding: 4px 7px !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-radius: 0 6px 6px 0 !important;
    color: #64748b !important;
    background: #f8fafc !important;
    font-size: 11px !important;
}

.variation_value_table .input-group .btn.apply-all:hover {
    background: #e2e8f0 !important;
    color: #2563eb !important;
}

/* Action icon buttons */
.delete_complete_row {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
}

.delete_complete_row:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.add_variation_value_row {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #2563eb !important;
    padding: 0 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.add_variation_value_row:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

.remove_variation_value_row {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    background: #fef2f2 !important;
    border: 1px solid #fee2e2 !important;
    color: #ef4444 !important;
    padding: 0 !important;
    font-size: 12px !important;
    transition: all 0.2s ease !important;
}

.remove_variation_value_row:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* Stock Toggle Box */
.lp-stock-toggle-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.2s ease;
}

.lp-stock-toggle-box:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.lp-stock-toggle-box.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.lp-stock-toggle-box.disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

#opening_stock_button:disabled,
#opening_stock_button[disabled],
button.submit_product_form:disabled,
button.submit_product_form[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(40%) !important;
    box-shadow: none !important;
}

/* Accordion Section 4 */
.lp-accordion-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.lp-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: all 0.15s ease;
}

.lp-accordion-header:hover {
    background: #f1f5f9;
}

.lp-accordion-header.active {
    border-bottom-color: #e2e8f0;
    background: #ffffff;
}

.lp-accordion-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-accordion-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.lp-accordion-chevron {
    font-size: 13px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.lp-accordion-header.active .lp-accordion-chevron {
    transform: rotate(180deg);
}

/* Sticky Action Footer */
.lp-form-footer {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 24px;
    margin-top: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

.lp-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.lp-btn-cancel:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Stat Cards */
.lp-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.lp-stat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04);
}

.lp-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Instruction Callout Panels */
.lp-instruction-panel {
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid;
    height: 100%;
}

.lp-panel-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.lp-panel-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

/* Label Setting Cards */
.lp-setting-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    min-height: 98px;
}

.lp-setting-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* Page Header Component */
.lp-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: 24px;
}

.lp-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lp-header-icon {
    width: 46px;
    height: 46px;
    background: #eff6ff;
    color: #2563eb;
    border: 1.5px solid #dbeafe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.lp-header-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-header-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    margin-bottom: 0;
}

.lp-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #334155 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.lp-btn-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Step 1 Search Box */
.lp-search-box-wrapper {
    max-width: 650px;
    margin: 0 auto 28px auto;
}

.lp-search-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    text-align: center;
}

.lp-search-input-group {
    position: relative;
    width: 100%;
}

.lp-search-input-group .lp-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.lp-search-input-group input.form-control,
.lp-section-card .lp-search-input-group input.form-control {
    width: 100% !important;
    height: 48px !important;
    padding-left: 48px !important;
    padding-right: 16px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}

.lp-search-input-group input.form-control:focus,
.lp-section-card .lp-search-input-group input.form-control:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

/* Step 2 Subsections and Grid */
.lp-subgroup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.lp-subgroup-title span {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lp-subgroup-title .lp-divider {
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.lp-label-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .lp-label-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .lp-label-grid {
        grid-template-columns: 1fr;
    }

    .lp-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Variation Chips & Badges */
.lp-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    margin: 2px 2px;
    white-space: nowrap;
    transition: background 0.15s;
}

.lp-badge-chip:hover {
    background: #e2e8f0;
}

.lp-badge-chip .lp-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
    flex-shrink: 0;
}

.lp-badge-more {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
    margin: 2px 2px;
    transition: all 0.15s ease;
    user-select: none;
}

.lp-badge-more:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}

/* Purchase Create & Edit Modernization */
.lp-section-card .lp-installment-item,
.lp-installment-item {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    clear: both !important;
}

.lp-installment-item .input-group-addon {
    width: 42px !important;
    min-width: 42px !important;
    height: 40px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 42px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.lp-installment-item .form-control,
.lp-installment-item input.installment_due_date {
    border-radius: 0 !important;
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    flex: 1 1 auto !important;
    width: 1% !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    padding: 6px 12px !important;
}

.lp-installment-item .input-group-btn {
    display: flex !important;
    align-items: stretch !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.lp-installment-item .btn-remove-installment {
    height: 40px !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    background: #fef2f2 !important;
    color: #ef4444 !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

.lp-installment-item .btn-remove-installment:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

#purchase_entry_table .form-control,
.add_opening_stock_table .form-control {
    height: 34px !important;
    padding: 4px 8px !important;
    font-size: 12.5px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    transition: all 0.15s ease !important;
}

#purchase_entry_table .form-control:focus,
.add_opening_stock_table .form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

#purchase_entry_table td,
.add_opening_stock_table td {
    padding: 8px 10px !important;
    vertical-align: middle !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

#purchase_entry_table tbody tr:hover td {
    background-color: #f8fafc !important;
}

#purchase_entry_table th,
.add_opening_stock_table th {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 12px 10px !important;
    border: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
    text-align: center;
}

#purchase_entry_table .row_subtotal_after_tax {
    display: inline-block !important;
    padding: 5px 10px !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    min-width: 75px !important;
    text-align: right !important;
}

#purchase_entry_table .remove_purchase_entry_row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #ef4444 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

#purchase_entry_table .remove_purchase_entry_row:hover {
    background: #ef4444 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3) !important;
}

.nav-tabs > li > a.lp-btn-add-purchase:hover,
.nav-tabs > li > a.lp-btn-add-purchase:focus {
    background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.45) !important;
}

.file-input .input-group {
    border-radius: 8px !important;
    overflow: hidden !important;
    width: 100% !important;
}

.file-input .file-caption {
    height: 38px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    background: #f8fafc !important;
    font-size: 13px !important;
    color: #475569 !important;
    box-shadow: none !important;
}

.file-input .btn-file {
    height: 38px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    transition: all 0.15s ease !important;
}

.file-input .btn-file:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

/* ==========================================================================
   Modern Pos / Sell Table Styling
   ========================================================================== */
#pos_table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
    background: #ffffff !important;
    border: none !important;
}

#pos_table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 14px !important;
    border: none !important;
    border-bottom: 1.5px solid #e2e8f0 !important;
}

#pos_table tbody td {
    padding: 14px 12px !important;
    vertical-align: top !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff;
}

#pos_table tbody tr:hover td {
    background-color: #fcfdfd;
}

#pos_table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Stepper Component */
.pos-stepper {
    display: inline-flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 38px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.pos-stepper:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.pos-stepper button {
    width: 32px !important;
    height: 100% !important;
    background: #f8fafc !important;
    border: none !important;
    color: #475569 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background 0.15s, color 0.15s !important;
    outline: none !important;
}

.pos-stepper button:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.pos-stepper button:active {
    background: #cbd5e1 !important;
}

.pos-stepper input.pos_quantity {
    width: 54px !important;
    height: 100% !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    background: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Modern inputs and selects inside pos_table */
#pos_table input.form-control:not(.pos_quantity),
#pos_table select.form-control {
    height: 38px !important;
    font-size: 13px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

#pos_table input.form-control:focus,
#pos_table select.form-control:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

#pos_table .input-group {
    display: flex !important;
    align-items: stretch !important;
}

#pos_table .input-group-addon {
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #64748b !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    height: 38px !important;
    box-sizing: border-box !important;
}

#pos_table .input-group.input-group-sm,
#pos_table .input-group-sm {
    height: 32px !important;
}

#pos_table .input-group-sm .input-group-addon,
#pos_table .input-group.input-group-sm .input-group-addon {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-right: 0 !important;
    border-radius: 6px 0 0 6px !important;
    box-sizing: border-box !important;
}

#pos_table .input-group-sm input.form-control,
#pos_table .input-group.input-group-sm input.form-control {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    font-size: 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
}

.add_opening_stock_table .input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.add_opening_stock_table .input-group .form-control {
    border-radius: 6px 0 0 6px !important;
    border-right: 0 !important;
    flex: 1 1 auto !important;
    width: 1% !important;
}

.add_opening_stock_table .input-group-addon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    border-radius: 0 6px 6px 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.cm-amount-in, .tw-text-emerald-600 {
    color: #059669 !important;
}

.cm-amount-out, .tw-text-rose-600 {
    color: #e11d48 !important;
}

.cm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cm-badge-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.cm-badge-entrada {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.cm-badge-entrada .cm-badge-icon {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.cm-badge-salida {
    background-color: #fff1f2 !important;
    color: #9f1239 !important;
    border: 1px solid #fecdd3 !important;
}

.cm-badge-salida .cm-badge-icon {
    background-color: #f43f5e !important;
    color: #ffffff !important;
}

.lp-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.lp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lp-summary-row:last-child {
    margin-bottom: 0;
}

/* Global Bootstrap DateTimePicker Popups */
.bootstrap-datetimepicker-widget {
    z-index: 999999 !important;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 6px 12px -4px rgba(15, 23, 42, 0.08) !important;
    padding: 12px !important;
    background: #ffffff !important;
}

.bootstrap-datetimepicker-widget table th {
    font-weight: 700 !important;
    color: #475569 !important;
    padding: 6px 4px !important;
}

.bootstrap-datetimepicker-widget table td.day {
    border-radius: 8px !important;
    font-size: 13px !important;
    height: 32px !important;
    line-height: 32px !important;
    width: 32px !important;
    transition: all 0.15s ease !important;
}

.bootstrap-datetimepicker-widget table td.day:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.bootstrap-datetimepicker-widget table td.today:before {
    border-bottom-color: #2563eb !important;
}

/* ==========================================================================
   Quick Add Product Modal Modernization
   ========================================================================== */
.quick_add_product_modal .modal-dialog {
    max-width: 980px !important;
    width: 95% !important;
    margin: 24px auto !important;
}

.quick_add_product_modal .modal-content {
    border-radius: 18px !important;
    border: none !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

.quick_add_product_modal .modal-body {
    padding: 24px 28px !important;
    background: #fbfcfe;
}

.quick_add_product_modal .form-control:not(.select2-search__field):not(.input-sm) {
    height: 40px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

.quick_add_product_modal .form-control:not(.select2-search__field):focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.quick_add_product_modal label:not(.lp-checkbox-label):not(.btn):not(.lp-modal-check-label) {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 5px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    transition: all 0.15s ease-in-out !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8 !important;
}

.quick_add_product_modal .select2-container--default.select2-container--open .select2-selection--single,
.quick_add_product_modal .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 37px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 37px !important;
    right: 8px !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--multiple {
    min-height: 40px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 2px 6px !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1e40af !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
    margin-top: 4px !important;
}

.quick_add_product_modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #3b82f6 !important;
    margin-right: 4px !important;
}

.lp-modal-group-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.lp-modal-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.lp-modal-group-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #dbeafe;
}

.lp-modal-check-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    min-height: 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.15s ease;
}

.lp-modal-check-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.lp-modal-check-label {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    cursor: pointer !important;
}

.lp-modal-check-desc {
    font-size: 11px !important;
    color: #64748b !important;
    margin: 3px 0 0 0 !important;
    padding-left: 28px !important;
}

/* Cabeceras de widgets/tarjetas: evitar que el botón flote encima del título en móvil */
@media (max-width: 767.98px) {
    .box-header {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .box-header .box-title {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        line-height: 1.3;
    }

    .box-header > .box-tools,
    .box-header .box-tools {
        float: none !important;
        margin: 0 0 0 auto !important;
        flex: 0 0 auto;
    }

    .box-header > .box-tools.pull-right,
    .box-header .box-tools .pull-right {
        float: none !important;
    }
}

/* Secciones tipo tarjeta (pasos): ajuste móvil para que no se compriman */
@media (max-width: 767.98px) {
    .lp-section-header {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 14px 16px;
        gap: 10px;
    }

    .lp-section-header-left {
        align-items: flex-start;
        min-width: 0;
    }

    .lp-section-title {
        overflow-wrap: anywhere;
    }

    .lp-section-body {
        padding: 16px;
    }

    .lp-btn-cancel {
        max-width: 100%;
        white-space: normal;
    }
}

/* Footer de acciones de compras: apilar botones en móvil */
@media (max-width: 767.98px) {
    .lp-form-footer.lp-purchase-footer {
        flex-wrap: wrap;
    }

    .lp-form-footer.lp-purchase-footer > a.lp-btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .lp-form-footer.lp-purchase-footer > div {
        display: flex !important;
        flex-wrap: wrap;
        width: 100%;
        gap: 10px !important;
    }

    .lp-form-footer.lp-purchase-footer > div > button {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* Barra de filtros: evitar desbordes en móvil */
@media (max-width: 767.98px) {
    .lp-filter-header {
        flex-wrap: wrap;
        row-gap: 8px;
        column-gap: 12px;
        padding: 10px 12px;
    }

    .lp-filter-header-trigger {
        margin-right: 0;
    }

    /* El texto Mostrar/Ocultar se reemplaza por el chevron para ahorrar espacio */
    .lp-filter-toggle-text {
        display: none;
    }

    .lp-filter-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* Formulario de venta en móvil: término de pago, adjuntos y textos de ayuda */
@media (max-width: 767.98px) {
    /* Término de pago: apilar número y tipo en vez de compartir 50/50 */
    .lp-pay-term-group {
        flex-direction: column !important;
        gap: 8px;
    }

    .lp-pay-term-group input.form-control {
        flex: 1 1 auto !important;
        width: 100% !important;
        border-radius: 8px !important;
        border-right: 1px solid #cbd5e1 !important;
    }

    .lp-pay-term-group .select2-container {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    .lp-pay-term-group .select2-selection--single {
        border-radius: 8px !important;
    }

    /* Adjunto: permitir que el widget crezca y no se recorte */
    .lp-file-upload-box {
        height: auto !important;
        min-height: 40px;
        padding: 6px 8px !important;
    }

    .lp-file-upload-box .file-input,
    .lp-file-upload-box .file-caption-main,
    .lp-file-upload-box .input-group {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Texto de ayuda largo (formatos permitidos) */
    .form-group > .help-block {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Footer de acciones de ventas: apilar botones en móvil */
@media (max-width: 767.98px) {
    .lp-form-footer.lp-sell-footer {
        flex-wrap: wrap;
    }

    .lp-form-footer.lp-sell-footer > a.lp-btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .lp-form-footer.lp-sell-footer > div {
        display: flex !important;
        flex-wrap: wrap;
        width: 100%;
        gap: 10px !important;
    }

    .lp-form-footer.lp-sell-footer > div > button {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* Resumen de Pago (Cambio / Vuelto y Saldo) */
.lp-payment-summary-box {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
}

.lp-payment-summary-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}

.lp-summary-change {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
}

.lp-summary-change .lp-summary-label {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #15803d !important;
}

.lp-summary-change .lp-summary-amount {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #166534 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.lp-summary-balance {
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
}

.lp-summary-balance .lp-summary-label {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #9a3412 !important;
}

.lp-summary-balance .lp-summary-amount {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #c2410c !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Cliente / Proveedor (select2) y columnas en móvil: ocupar el 100% y recortar nombres largos */
@media (max-width: 767.98px) {
    /* Forzar que las columnas sin col-xs explícito ocupen 100% de ancho en móvil y no se encojan */
    .lp-section-card .lp-section-body .row > [class*="col-"]:not([class*="col-xs-"]) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .lp-input-group-select2 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .lp-input-group-select2 .select2-container {
        flex: 1 1 0% !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .lp-input-group-select2 .select2-container .selection,
    .lp-input-group-select2 .select2-selection--single {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .lp-section-card .lp-input-group-select2 .select2-container--default .select2-selection--single .select2-selection__rendered,
    .lp-input-group-select2 .select2-container--default .select2-selection--single .select2-selection__rendered,
    .lp-input-group-select2 .select2-selection__rendered {
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Asegurar que el dropdown de Select2 tenga un ancho cómodo en pantallas táctiles */
    .select2-dropdown {
        min-width: 260px !important;
        max-width: calc(100vw - 32px) !important;
    }

    /* Resumen de pago en móvil: apilar tarjetas al 100% con separación clara */
    .lp-payment-summary-box {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .lp-payment-summary-item {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
    }
}
