/* Define CSS variables FIRST - must be at top of file */
:root {
    --primary-color: #ffb600;
    --secondary-color: #011530;
}

.table-action-btn {
    background: var(--primary-color) !important;
    border-color: color-mix(in srgb,
            var(--primary-color) 70%,
            black 30%) !important;
    border-radius: 4px;
    font-weight: 400;
    font-size: 12px;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
    vertical-align: middle;
    padding: 5px 7px;
}

.table-action-btn:hover {
    color: #fff !important;
}

.table-action-delete-btn {
    background: #e50b0b !important;
    border-color: #e50b0b !important;
    border-radius: 4px;
    font-weight: 400;
    font-size: 12px;
    cursor: pointer;
    color: #fff !important;
    white-space: nowrap;
    vertical-align: middle;
    padding: 5px 7px;
}

.table-action-delete-btn:hover {
    color: #fff !important;
}

.box.box-primary {
    border: none;
}

.box,
.info-box {
    margin-bottom: 30px;
    box-shadow: none;
    border-radius: 0;
}

.box .box-body,
.box .box-footer,
.box .box-header {
    padding: 0;
}

.box-body {
    padding: 24px 0px;
}

.center-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.box.box-primary {
    border: none;
}

.box,
.info-box {
    margin-bottom: 30px;
    box-shadow: none;
    border-radius: 0;
}

.btn-wrapper-overide {
    display: flex;
    justify-content: right;
    margin-top: 10px;
}

.box .box-body,
.box .box-footer,
.box .box-header {
    padding: 10px;
}

h3.box-title a {
    color: var(--primary-color);
}

.max-add-btn {
    background: var(--primary-color);
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 24px;
    color: var(--secondary-color);
    cursor: pointer;
    text-transform: capitalize;
}

.btn-group,
.btn-group-vertical {
    /* float: left; */
}

.bg-max {
    background-color: #eff6ff !important;
    color: #000 !important;
}

.bg-max-tr {
    color: #000;
    background-color: #f9fafb;
    font-size: 0.875rem;
}

.bg-info {
    background-color: var(--secondary-color) !important;
}

.input-group-addon {
    border-radius: 4px 0px 0px 4px !important;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    background-color: #fff;
    opacity: 1;
}

.btn-info {
    background: var(--secondary-color) !important;
    border: none !important;
    margin: 5px;
    color: #fff !important;
}

.btn-group>.btn:last-child:not(:first-child),
.btn-group>.dropdown-toggle:not(:first-child) {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-default-submit {
    background-color: #fff;
    color: #444;
    border: #333 1px solid;
    height: 48px;
    margin-left: 5px !important;
    margin-right: 5px !important;
}

.btn-default-submit:hover {
    background-color: #ccc;
}

.btn-info:hover {
    background: #010e1f !important;
    border-color: var(--secondary-color) !important;
}

.btn-danger {
    color: #fff;
    background-color: #d9534f !important;
    border-color: #d43f3a !important;
}

.btn-danger:hover {
    color: #fff;
    background-color: #c9302c !important;
    border-color: #ac2925 !important;
}

/* #product_list_body {
    max-height: 485px;
    overflow-y: scroll;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
} */

.pos-wrapper .pos-content .pos-product-list .product-list {
    height: auto;
}

.pos-wrapper .pos-content .pos-product-list .product-list {
    grid-template-columns: 1fr;
}

div.dataTables_wrapper div.dataTables_processing {
    padding: 0;
}

.panel-default {
    border: none;
}

.pagination>li>a {
    font-size: 12px;
}

.pagination>li>a,
.pagination>li>span {
    padding: 3px 5px;
}

/* datatables button Styling */
.dt-buttons.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    box-sizing: border-box;
}

.dt-buttons.btn-group>a {
    flex-shrink: 0;
    margin: 5px;
    border: 1px solid;
    border-radius: 10px;
    white-space: nowrap;
}

.dt-buttons.btn-group>.buttons-html5 {
    border: 1px solid;
    border-radius: 10px !important;
    margin: 5px;
    padding: 6px 5px !important;
}

.dt-buttons.btn-group>.btn:last-child:not(:first-child),
.dt-buttons.btn-group>.dropdown-toggle:not(:first-child) {
    border-radius: 10px !important;
}

@media (max-width: 600px) {
    .dt-buttons.btn-group>a {
        border: none !important;
        border-radius: 0 !important;
        padding: 6px;
    }

    .dt-buttons.btn-group>a .btn-text {
        display: none;
    }

    .dt-buttons.btn-group>a i {
        font-size: 18px !important;
    }
}

@media (max-width: 400px) {
    .dt-buttons.btn-group>a i {
        font-size: 14px !important;
    }
}

.short-list-item .dt-buttons.btn-group>a {
    border: none !important;
    border-radius: 0 !important;
    padding: 6px;
}

.short-list-item .dt-buttons.btn-group>a .btn-text {
    display: none;
}

.short-list-item .dt-buttons.btn-group>a i {
    font-size: 20px;
}

@media screen and (max-width: 767px) {
    div.dataTables_wrapper div.dataTables_length select {
        width: 80px !important;
    }
}

.add-product-price-table>thead>tr>th {
    background: #eff6ff;
    color: #111827;
}

.bg-green {
    background: #eff6ff !important;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: #000000 !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    line-height: 130%;
    font-weight: 600;
}

.btn-navy {
    background: #001f3f !important;
    border-color: #000000;
    color: #ffffff;
}

.btn-navy:hover {
    color: #fff !important;
    text-decoration: none;
    background-color: #000000 !important;
}

/* @keyframes pulse {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    70% {
      transform: scale(1.05);
      opacity: 0.9;
    }
  } */

/* .product_list {
    border: 1px solid #ededed;

    border-radius: 10px;

    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product_box:hover {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  } */
/* #product_list_body {
    gap: 10px;
} */

.btn-primary.hover,
.btn-primary:active,
.btn-primary:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff;
}

.overview-filter .filter a .btn-primary.active,
.btn-primary:active,
.open>.dropdown-toggle.btn-primary {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary.hover,
.btn-primary:active,
.btn-primary:hover {
    background-color: color-mix(in srgb,
            var(--primary-color) 90%,
            black 10%) !important;
}

.btn-primary {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 8px;
}

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: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color);
}

.alert-info,
.bg-aqua,
.callout.callout-info,
.label-info,
.modal-info .modal-body,
.progress-bar-aqua,
.progress-bar-info {
    background-color: var(--primary-color) !important;
}

.alert-info {
    border-color: var(--primary-color) !important;
}

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 var(--primary-color);
}

table.dataTable {
    width: 100% !important;
}

@media screen and (max-width: 767px) {

    table.dataTable td,
    table.dataTable th {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .pos-wrapper .pos-content .pos-table .pos-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pos-wrapper .pos-content .pos-table .pos-buttons .suspend {
        display: block;
    }

    .pos-buttons .cash,
    .quotation-button,
    .suspend,
    .multipay {
        width: 100% !important;
    }
}

.modal-title {
    justify-content: normal;
}

.modal-content {
    max-width: 100%;
}

.daterangepicker.opensright:before {
    right: 20px;
}

.datepicker {
    left: auto;
    /* Reset any unwanted left positioning */
    right: auto;
    /* Reset any unwanted right positioning */
}

.pos_product_div {
    min-height: calc(116px - 100vh) !important;
    margin-bottom: 0px !important;
    overflow-y: inherit;
    max-height: inherit;
}

@media (max-width: 768px) {
    .mobile {
        display: flex;
        justify-content: flex-start;
    }
}

@media (max-width: 1111px) {
    .kitchen-order-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .kitchen-wrapper {
        margin: 1.75rem 1rem;
    }

    .kitchen-order-list {
        margin-top: 1.5rem;
        display: block;
    }

    .kitchen-order-list .kitchen-order-item {
        margin-bottom: 0.75rem;
    }

    .pos-topbar {
        padding: 0 0.5rem;
    }

    .pos-topbar .top-right {
        gap: 1rem;
    }
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--secondary-color) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary-color) !important;
    color: #fff;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
}

.auto-overflow {
    overflow: auto !important;
}

input.input_number {
    direction: ltr !important;
}

.dataTables_scrollBody {
    max-height: fit-content !important;
}

@media (max-width: 768px) {

    input.form-control.input-sm.input_number.purchase_quantity.input_quantity,
    input.form-control.input-sm.os_exp_date,
    input.form-control.input-sm.os_date {
        width: 70px;
    }
}

@media screen and (max-width: 767px) {
    .table-responsive {
        overflow-y: auto;
    }
}

.container.grid {
    display: flex;
}

#main-sidebar {
    flex-shrink: 0;
    width: 280px;
    animation: none;
}

#main-sidebar.hidden {
    transform: translateX(-100%);
}

main {
    flex-grow: 1;
    transition: margin-left 0.3s ease-in-out;
}

#toggle-sidebar.toggle-sidebar {
    position: relative;
    z-index: 1000;
}

.input-group-addon:last-child {
    border-left: 0 !important;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
}

.box.box-warning {
    border-top-color: var(--primary-color) !important;
}

.form-group select {
    position: relative;
    z-index: 11;
    height: 50px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding-left: 20px;
    color: #444;
    min-width: 200px;
}

@media (max-width: 440px) {
    .customize-btn {
        font-size: 0;
    }
}

textarea {
    height: 50px !important;
}

.btn {
    border-radius: 8px;
}

/* .well{
    padding: 19px 0;
  } */

/* Payment option modal */
.payment-option-accordion {
    margin-top: 5px;
}

.payment-options-modal {
    width: 90vw;
    max-width: 1200px;
}

.payment-options-modal .modal-content {
    background: transparent;
    box-shadow: none;
    border: none;
}

.payment-options-modal .modal-header,
.payment-options-modal .modal-body,
.payment-options-modal .modal-footer {
    background: transparent;
    border: none;
}

.payment-option-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.payment-option-heading {
    background: #f9fafb;
    padding: 14px 16px;
}

.payment-option-trigger {
    display: block;
    color: #111827;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 16px;
}

.payment-option-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
}

.payment-option-label-text {
    color: #fff !important;
}

.payment-option-trigger,
.payment-option-trigger:hover,
.payment-option-trigger:focus {
    color: #111827;
}

.payment-option-trigger .payment-option-label-text {
    color: #fff !important;
}

.payment-option-title--branch {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.payment-option-title--delivery {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.payment-option-title--other {
    background: linear-gradient(135deg, #6b7280, #111827);
}

.payment-option-trigger:hover,
.payment-option-trigger:focus {
    text-decoration: none;
    color: #0f172a;
}

.payment-option-trigger .fa {
    transition: transform 120ms ease;
}

.panel-collapse.in+.payment-option-trigger .payment-option-chevron,
.panel-collapse.collapse.in~.payment-option-trigger .payment-option-chevron {
    transform: rotate(180deg);
}

.payment-options-grid {
    margin-top: 5px;
}

.payment-option-col {
    margin-bottom: 15px;
}

.payment-option-btn {
    height: 110px;
    font-size: 15px;
    white-space: normal;
    border: none;
    border-radius: 12px;
    color: #fff !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.payment-option-btn:hover,
.payment-option-btn:focus {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.payment-option-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.payment-option-icon .fa {
    line-height: 1;
}

.payment-option--card-branch {
    background: #2563eb !important;
}

.payment-option--card-branch:hover {
    background: #1d4ed8 !important;
}

.payment-option--cash-branch {
    background: #0ea5e9 !important;
}

.payment-option--cash-branch:hover {
    background: #0284c7 !important;
}

.payment-option--card-delivery {
    background: #ea580c !important;
}

.payment-option--card-delivery:hover {
    background: #c2410c !important;
}

.payment-option--cash-delivery {
    background: #f59e0b !important;
}

.payment-option--cash-delivery:hover {
    background: #d97706 !important;
}

.payment-option--multi {
    background: #4b5563 !important;
}

.payment-option--multi:hover {
    background: #374151 !important;
}

.payment-option-panel .panel-body {
    padding: 12px;
}

.payment-option--card-branch .payment-option-icon i,
.payment-option--cash-branch .payment-option-icon i {
    color: #dbeafe;
}

.payment-option--card-delivery .payment-option-icon i,
.payment-option--cash-delivery .payment-option-icon i {
    color: #fff3e0;
}

.payment-option--multi .payment-option-icon i {
    color: #e5e7eb;
}

.cart-total-summary.animate-pulse {
    animation: cartPulse 0.8s ease;
}

@keyframes cartPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.cart-layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-divider {
    height: 1px;
    width: 100%;
    background: #e5e7eb;
}

/* Compact ticket list styling */
.pos-product-table thead {
    display: none;
}

.instant-pos-tax-column {
    display: none !important;
}

.instant-pos-enabled .pos-product-table img,
.instant-pos-enabled .pos-product-table .quantity-inputs,
.instant-pos-enabled .pos-product-table .quantity-col {
    display: none !important;
}

.pos-product-table .quantity-inputs {
    display: none !important;
}

.pos-wrapper .pos-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 12px;
    align-items: stretch;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.pos-wrapper .pos-content .pos-product-list {
    border-left: 1px solid #d2d5da;
    padding: 0.5rem 0.75rem;
    width: 100%;
}

.pos-wrapper .pos-content .pos-table {
    padding: 0.5rem 0.75rem;
    width: 100%;
}

@media (max-width: 992px) {
    .pos-wrapper .pos-content {
        display: block;
    }
}

.pos-product-table .quantity-col {
    display: none;
}

/* Clean ticket rows */
.pos-product-table thead {
    display: none;
}

.pos-product-table tbody tr.product_row td {
    border: none !important;
    padding: 6px 6px;
    vertical-align: middle;
}

.pos-product-table tbody tr.product_row td.v-center {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pos-product-table tbody tr.product_row td.v-center .fa-times {
    font-size: 12px;
    padding: 4px;
    color: #d9534f;
}

.pos-product-table tbody tr.product_row .pos-line-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-product-table tbody tr.product_row .pos-line-qty-inline {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.pos-product-table tbody tr.product_row td.text-center {
    margin-left: auto;
    text-align: right;
    min-width: 90px;
}

.content.no-print {
    width: 100% !important;
    max-width: 100% !important;
}

/* Fix modal z-index appearing behind backdrop */
/* Modals need higher z-index than POS autocomplete (2050) and select2 (2050) */
.modal,
div.modal,
div[class*="modal"],
#view_product_modal,
#modal_payment,
#modal_suspend,
#posEditDiscountModal,
.invoice_modal,
.view_product_modal,
.view_modal,
.product_modal,
.quick_add_product_modal,
.close_register_modal,
.register_details_modal,
.account_model,
.invoice_edit_modal {
    z-index: 9999 !important;
}

.modal-backdrop,
div.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.in,
.modal-backdrop.show {
    z-index: 9998 !important;
}

/* Ensure modals are hidden by default */
.modal {
    display: none !important;
}

.modal.fade.in,
.modal.show {
    display: block !important;
    margin-top: 74px !important;
}

.modal-dialog {
    z-index: 10000 !important;
    position: relative;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
    z-index: 10001 !important;
}

/* Ensure modals are positioned correctly */
body.modal-open {
    overflow: hidden;
}

.modal.fade .modal-dialog {
    transform: translate(0, -25%);
    transition: transform 0.3s ease-out;
}

.modal.in .modal-dialog {
    transform: translate(0, 0);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Fix for nested or multiple modals */
.modal-backdrop.in {
    opacity: 0.5;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Ensure modal is centered and has proper dimensions */
.modal-dialog {
    max-width: 1200px;
    margin: 30px auto;
    margin-top: 90px;
}

.modal-dialog.modal-lg {
    max-width: 900px;
}

.modal-dialog.modal-sm {
    max-width: 300px;
}

/* Force all dynamically loaded modals to appear above backdrop */
body>.modal,
body>div.modal,
body>div[class*="_modal"] {
    z-index: 9999 !important;
}

body>.modal-backdrop,
body>div.modal-backdrop {
    z-index: 9998 !important;
}

/* Modal button styling */
.btn-modal {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.btn-modal:hover {
    background-color: color-mix(in srgb,
            var(--primary-color) 90%,
            black 10%) !important;
    color: #fff !important;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Button styling consolidated below at line 967+ */

/* Force all button variants to have opaque backgrounds */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
    background-attachment: scroll !important;
    background-clip: border-box !important;
    background-origin: padding-box !important;
}

/* Primary Button - Full Style Override */
.btn-primary,
.btn.btn-primary,
a.btn-primary,
button.btn-primary,
input.btn-primary,
.btn-primary:where([class~="btn"]),
a[class*="btn-primary"],
button[class*="btn-primary"],
.btn-block.btn-primary,
.btn.btn-block.btn-primary {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
    background-image: none !important;
    background-attachment: scroll !important;
    background-clip: border-box !important;
    background-origin: padding-box !important;
    border: 1px solid var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
    color: #ffffff !important;
    background-color: color-mix(in srgb,
            var(--primary-color) 85%,
            black 15%) !important;
    border-color: color-mix(in srgb,
            var(--primary-color) 80%,
            black 20%) !important;
    text-decoration: none !important;
}

/* Success Button - Full Style Override */
.btn-success,
.btn.btn-success,
a.btn-success,
button.btn-success,
input.btn-success,
.btn-success:where([class~="btn"]),
a[class*="btn-success"],
button[class*="btn-success"],
.pull-right>.btn-success,
.pull-left>.btn-success,
.margin-left-10.btn-success {
    color: #fff !important;
    background-color: #10b981 !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    color: #fff !important;
    background-color: #059669 !important;
    border-color: #047857 !important;
}

/* Info Button - Full Style Override */
.btn-info,
.btn.btn-info,
a.btn-info,
button.btn-info,
input.btn-info,
a[class*="btn-info"],
button[class*="btn-info"] {
    color: #fff !important;
    background-color: #0ea5e9 !important;
    background-image: none !important;
    border: none !important;
    border-radius: 6px !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    color: #fff !important;
    background-color: #0284c7 !important;
    border-color: #0369a1 !important;
}

/* Warning Button - Full Style Override */
.btn-warning,
.btn.btn-warning,
a.btn-warning,
button.btn-warning,
input.btn-warning,
a[class*="btn-warning"],
button[class*="btn-warning"] {
    color: #fff !important;
    background-color: #f59e0b !important;
    background-image: none !important;
    border: 1px solid #d97706 !important;
    border-color: #d97706 !important;
    border-radius: 6px !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    color: #fff !important;
    background-color: #d97706 !important;
    border-color: #b45309 !important;
}

/* Danger Button - Full Style Override */
.btn-danger,
.btn.btn-danger,
a.btn-danger,
button.btn-danger,
input.btn-danger,
a[class*="btn-danger"],
button[class*="btn-danger"] {
    color: #fff !important;
    background-color: #ef4444 !important;
    background-image: none !important;
    border: 1px solid #dc2626 !important;
    border-color: #dc2626 !important;
    border-radius: 6px !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    color: #fff !important;
    background-color: #dc2626 !important;
    border-color: #b91c1c !important;
}

/* Nuclear option - force all buttons to have proper backgrounds */
[class*="btn-"][class*="btn-success"]:not(.btn-default):not(.btn-link) {
    background-color: #10b981 !important;
    color: white !important;
}

[class*="btn-"][class*="btn-primary"]:not(.btn-default):not(.btn-link) {
    background-color: var(--primary-color) !important;
    color: white !important;
}

[class*="btn-"][class*="btn-info"]:not(.btn-default):not(.btn-link) {
    background-color: #0ea5e9 !important;
    color: white !important;
}

[class*="btn-"][class*="btn-warning"]:not(.btn-default):not(.btn-link) {
    background-color: #f59e0b !important;
    color: white !important;
}

[class*="btn-"][class*="btn-danger"]:not(.btn-default):not(.btn-link) {
    background-color: #ef4444 !important;
    color: white !important;
}

/* Fix Tailwind CSS overriding button backgrounds - Consolidated at line 967+ */

/* Extra specificity for links styled as buttons */
a.btn-success:link,
a.btn-success:visited {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

a.btn-primary:link,
a.btn-primary:visited {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

a.btn-info:link,
a.btn-info:visited {
    background-color: var(--secondary-color) !important;
    color: #ffffff !important;
}

a.btn-warning:link,
a.btn-warning:visited {
    background-color: #f0ad4e !important;
    color: #ffffff !important;
}

/* Specific fixes for dynamically loaded modals */
.view_product_modal .modal-dialog,
.invoice_modal .modal-dialog,
.view_modal .modal-dialog,
#view_product_modal .modal-dialog {
    z-index: 1051 !important;
}

.view_product_modal .modal-content,
.invoice_modal .modal-content,
.view_modal .modal-content,
#view_product_modal .modal-content {
    background-color: #fff !important;
    z-index: 1052 !important;
}

/* Ensure all modals have proper stacking */
div[class*="_modal"].modal,
div[id*="_modal"].modal {
    z-index: 1050 !important;
}

div[class*="_modal"].modal .modal-dialog,
div[id*="_modal"].modal .modal-dialog {
    z-index: 1051 !important;
}

div[class*="_modal"].modal .modal-content,
div[id*="_modal"].modal .modal-content {
    z-index: 1052 !important;
    background-color: #fff !important;
}

/* Additional button variants and default button */

/* Auth page link colors - orange theme */
.login-layout .form-content .form-footer a,
.login-layout .form-content form .forget-password {
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
}

.login-layout .form-content .form-footer a:hover,
.login-layout .form-content form .forget-password:hover {
    color: color-mix(in srgb, var(--primary-color) 80%, black 20%) !important;
    text-decoration: none;
}

/* Modern login/register button animation */
.login-layout .form-content form .button-wrapper button {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 182, 0, 0.3);
}

.login-layout .form-content form .button-wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 182, 0, 0.4);
}

.login-layout .form-content form .button-wrapper button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 182, 0, 0.3);
}

/* Fix input-group alignment and border-radius */
.input-group .input-group-addon {
    border-right: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

.input-group .form-control:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group .form-control:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group-btn:last-child>.btn,
.input-group-btn:last-child>.btn-group {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: -1px !important;
}

.input-group-btn:first-child>.btn,
.input-group-btn:first-child>.btn-group {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-right: -1px !important;
}

/* Ensure borders connect correctly */
.input-group .form-control {
    z-index: 2 !important;
}

.input-group-addon,
.input-group-btn {
    white-space: nowrap;
    vertical-align: middle;
}

/* Modern Contact Form Styles */
.modern-form-group {
    margin-bottom: 20px;
}

.modern-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #374151;
}

.modern-form-control {
    height: 50px !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    background-color: #fff !important;
}

.modern-form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 182, 0, 0.1) !important;
    outline: none;
}

.input-group-addon-modern {
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    /* border-right: none !important; */
    /* border-radius: 8px 0 0 8px !important; */
    color: #6b7280 !important;
    width: 45px;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.modern-section-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-section-header i {
    color: var(--primary-color);
}

.radio-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 10px;
    background: #fff;
}

.radio-modern input {
    margin: 0 !important;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.radio-modern:hover {
    background: #f9fafb;
}

.radio-modern.active {
    border-color: var(--primary-color);
    background: rgba(255, 182, 0, 0.05);
}

.more-info-btn-modern {
    background: #fff !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    padding: 10px 25px !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
    margin: 20px auto !important;
    display: block;
}

.more-info-btn-modern:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.btn-save-modern {
    background: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    border: none !important;
    padding: 12px 35px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
}

.modal-content-modern {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}

.modal-header-modern {
    background: #fff !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 20px 30px !important;
}

.modal-body-modern {
    padding: 30px !important;
    background: #fff !important;
}

.modern-action-area {
    margin-top: 30px;
    padding: 25px 0 0 0;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-default-modern {
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    padding: 12px 35px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s !important;
}

.btn-default-modern:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
}

:root {
    --primary-color: #fbbf24;
    --primary-hover: #f59e0b;
    --primary-text: #1e293b;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

.modern-modal .modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--bg-color);
    overflow: hidden;
}

.modern-modal .modal-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-modal .modal-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.25rem;
    margin: 0;
}

.modern-modal .modal-title .text-success {
    color: var(--primary-hover) !important;
}

.modern-modal .close {
    background: var(--border-color);
    opacity: 0.7;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: 0;
    padding: 0;
    float: none;
    line-height: 1;
}

.modern-modal .close:hover {
    opacity: 1;
    background: #cbd5e1;
    transform: rotate(90deg);
}

.modern-modal .modal-body {
    padding: 24px;
}

.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#search_product {
    padding-left: 40px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
    font-size: 1rem;
}

#search_product:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
    outline: none;
}

.table-responsive-custom {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

#add-modifier-table {
    margin-bottom: 0;
}

#add-modifier-table thead th {
    background: #fef3c7;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid #fde68a;
}

#add-modifier-table tbody td {
    padding: 16px;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

#add-modifier-table tbody tr:last-child td {
    border-bottom: none;
}

.remove_modifier_product {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #fee2e2;
    color: var(--danger-color);
    border: none;
    transition: all 0.2s;
}

.remove_modifier_product:hover {
    background: var(--danger-color);
    color: white;
}

.modern-modal .modal-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-modern {
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary-modern {
    background: var(--primary-color);
    color: var(--primary-text);
}

.btn-primary-modern:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-info-modern {
    background: #fffbeb;
    color: #92400e;
    margin-right: auto;
    border: 1px solid #fef3c7;
}

.btn-info-modern:hover {
    background: #fef3c7;
}

.btn-default-modern {
    background: var(--border-color);
    color: var(--text-main);
}

.btn-default-modern:hover {
    background: #cbd5e1;
}

/* Autocomplete styling */
.ui-autocomplete {
    z-index: 9999 !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
    border: 1px solid var(--border-color) !important;
    padding: 8px 0 !important;
}

.ui-menu-item {
    padding: 10px 16px !important;
    cursor: pointer;
}

.ui-menu-item:hover {
    background-color: #f1f5f9 !important;
}

/* ============================================================
   Variation Form Redesign - Card Layout
   ============================================================ */

/* Section header above the variation cards */
.variation-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 14px 0;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.variation-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
}

.variation-add-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Hide the outer table used as a JS hook — only the tbody is used for appending */
#product_variation_form_part,
table#product_variation_form_part {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#product_variation_form_part>thead,
table#product_variation_form_part>thead {
    display: none;
}

#product_variation_form_part>tbody>tr,
#product_variation_form_part>tbody>tr>td {
    display: block;
    border: none !important;
    padding: 0 0 16px 0 !important;
    background: transparent !important;
}

/* Individual variation group card */
.variation-group-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 0;
    transition: box-shadow 0.2s;
}

.variation-group-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Card header: variation template selector + add value button */
.variation-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.variation-group-header-left {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.variation-group-header-right {
    flex-shrink: 0;
    padding-top: 22px;
    /* align with input */
}

.variation-add-value-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.variation-delete-group-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Variation type dropdown wrapper */
.variation-type-select-wrap {
    min-width: 180px;
    flex-shrink: 0;
}

.variation-type-select-wrap .variation-type-select {
    min-width: 180px;
}

/* Multiselect wrapper for variation values */
.variation-values-multiselect {
    flex: 1;
    min-width: 200px;
}

.variation-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    margin-bottom: 5px;
}

/* Values table wrapper */
.variation-values-wrapper {
    padding: 0;
    overflow-x: auto;
}

/* Variation values table overrides */
.variation-values-table {
    margin-bottom: 0 !important;
    border: none !important;
    border-collapse: collapse;
    width: 100%;
}

.variation-values-table thead tr.variation-values-header-row th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 10px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
    vertical-align: bottom;
}

.variation-values-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.variation-values-table tbody tr:last-child {
    border-bottom: none;
}

.variation-values-table tbody tr:hover {
    background: #faf9ff;
}

.variation-values-table tbody td {
    padding: 8px 10px !important;
    vertical-align: middle !important;
}

/* Column widths */
.variation-col-sku {
    width: 110px;
    min-width: 90px;
}

.variation-col-value {
    width: 200px;
    min-width: 160px;
}

.variation-col-price {
    width: 220px;
    min-width: 180px;
}

.variation-col-profit {
    width: 130px;
    min-width: 110px;
}

.variation-col-dsp {
    width: 160px;
    min-width: 120px;
}

.variation-col-images {
    width: 100px;
    min-width: 80px;
}

.variation-col-action {
    width: 50px;
    text-align: center;
}

/* Sub-labels under column headers (Exc. Tax / Inc. Tax) */
.variation-price-sub-labels {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 3px;
    font-size: 0.68rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

/* Price pair (exc/inc) layout inside a cell */
.variation-price-pair {
    display: flex;
    gap: 6px;
}

.variation-price-input {
    flex: 1;
    min-width: 0;
}

/* Purchase Price & DSP cells: stack the two fields vertically */
.variation-col-dsp input,
.variation-col-price input {
    display: block;
    width: 100%;
    margin-bottom: 4px;
}

.variation-col-dsp input:last-child,
.variation-col-price input:last-child {
    margin-bottom: 0;
}


/* Remove button */
.variation-remove-btn {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
}

/* Select2 inside variation header */
.variation-group-header .select2-container {
    max-width: 100% !important;
}

/* Ensure inputs inside variation table are tighter */
.variation-values-table .form-control.input-sm {
    height: 32px;
    font-size: 0.82rem;
    padding: 4px 8px;
    border-radius: 5px;
}

/* apply-all micro button */
.variation-values-table .apply-all {
    height: 32px;
    width: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 5px 5px 0 !important;
    border: 1px solid #d1d5db !important;
}

/* Hide the outer variation table's own header row (JS-hook table, not styled) */
.variation-form-outer-thead {
    display: none;
}


/* ============================================================
   End Variation Form Redesign
   ============================================================ */