.table-fixed {
    table-layout: fixed;
}

.table-fixed td,
.table-fixed th {
    vertical-align: middle;
}

.table-fixed .form-control {
    height: 44px;
    font-size: 1.1rem;
}

/* totals card */
.bg-light {
    background-color: #f8f9fa !important;
}

/* POS touch comfort */
.form-select-lg,
.btn-lg {
    border-radius: 12px;
}

/* stronger separation */
hr {
    opacity: 0.2;
}

.table-fixed {
    table-layout: fixed;
}

.pos-order-table td,
.pos-order-table th {
    vertical-align: middle;
}

.pos-order-table input {
    height: 48px;
    font-size: 1.25rem;
}

.pos-order-table .btn-lg {
    width: 48px;
    height: 48px;
    padding: 0;
}

.pos-order-table td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#orderModal .modal-header {
    padding: 5px;
}

#orderModal h5 {
    font-size: 1rem;
}

#orderModal .modal-body {
    padding: .55rem !important;
}

.unit_box {
    border: 1px solid #e1e3ea;
    border-radius: 10px;
    padding: 20px 30px;
    min-width: 210px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: all .12s ease-in-out;
}

.unit_box:hover {
    transform: translateY(-1px);
    border-color: #50cd89;
}

.unit_box.active {
    border-color: #50cd89;
    background: #e8fff3;
    box-shadow: 0 0 0 3px rgba(80, 205, 137, .15);
}

.unit_box .unit_name {
    font-weight: 700;
    font-size: 14px;
    color: #181c32;
}

.unit_box .unit_meta {
    font-size: 12px;
    color: #7e8299;
}

.unit_box .unit_price {
    font-weight: 800;
    font-size: 14px;
    color: #50cd89;
    margin-top: 2px;
}

.pos_item_card {
    border: 1px solid #e1e3ea;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    transition: all .12s ease-in-out;
    height: 100%;
}

.pos_item_card:hover {
    transform: translateY(-1px);
    border-color: #50cd89;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.pos_item_card.disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pos_item_name {
    font-weight: 800;
    font-size: 18px;
    color: #181c32;
    line-height: 1.2;
}

.pos_item_meta {
    font-size: 12px;
    color: #7e8299;
    margin-top: 4px;
}

.pos_item_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

.pos_item_price {
    font-weight: 900;
    font-size: 16px;
    color: #50cd89;
    white-space: nowrap;
}

.unit_box_disabled {
    opacity: 0.45;
    pointer-events: none;
    /* makes it not clickable */
    cursor: not-allowed;
    border-color: #f1416c !important;
}

.quantity_wrapper {
    white-space: nowrap;
}

.quantity_wrapper .btn-xs,
.remove_to_list {
    padding: 5px 10px !important;
    font-size: .85rem;
    line-height: 1;
}

.quantity_input {
    width: 35px;
    padding: 2px;
    font-size: .75rem;
}

.payment_method_card {
    background: rgba(255, 255, 255, .65);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .04);
}

.payment_method_btn {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
    border-radius: 14px;
    padding: 12px 12px;
    text-align: left;
    transition: transform .08s ease, border-color .12s ease, background .12s ease;
}

.payment_method_btn:hover {
    transform: translateY(-1px);
}

.payment_method_btn .pm_dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .20);
}

.payment_method_btn .pm_check {
    opacity: 0;
    transform: scale(.9);
    transition: opacity .12s ease, transform .12s ease;
    color: #1f9d55;
}

.payment_method_btn.is_active {
    border-color: rgba(31, 157, 85, .55);
    background: rgba(31, 157, 85, .06);
}

.payment_method_btn.is_active .pm_dot {
    background: #1f9d55;
}

.payment_method_btn.is_active .pm_check {
    opacity: 1;
    transform: scale(1);
}

.btn-amount,
.btn-exact_amount,
.btn_minus_cart,
.btn_plus_cart,
.remove_to_list,
.btn-clear {
    border-radius: 5px;
    font-size: 2.0rem;
    padding: 0.71rem 1.2rem !important;
}

.dash-kpi {
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dash-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}

.dash-kpi .kpi-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.8rem;
    opacity: .13;
}

.dash-kpi .kpi-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .35rem;
}

.dash-kpi .kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.dash-kpi .kpi-sub {
    font-size: .75rem;
    margin-top: .3rem;
    opacity: .7;
}

.section-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #b5b5c3;
    margin-bottom: 1rem;
}

.chart-card {
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    background: #fff;
    padding: 1.4rem;
    height: 100%;
}

.chart-card .chart-title {
    font-size: .82rem;
    font-weight: 700;
    color: #3f4254;
    margin-bottom: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.shift-badge {
    display: inline-block;
    padding: .25rem .7rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
}

.shift-open {
    background: #e8fff3;
    color: #50cd89;
}

.shift-closed {
    background: #fff5f8;
    color: #f1416c;
}

.txn-amount {
    font-weight: 700;
    font-size: .9rem;
}

.progress-bar-custom {
    height: 6px;
    border-radius: 4px;
    background: #e4e6ef;
    overflow: hidden;
}

.progress-bar-custom .fill {
    height: 100%;
    border-radius: 4px;
}

.small {
    font-size: .775rem !important;
}

#orderModal .card .card-body {
    padding: .35rem !important;
}

#search_product_inflow~.svg-icon,
.d-flex.position-relative>.svg-icon.position-absolute {
    pointer-events: none;
}

/* =====================================================================
 * iPOS THEME — Navy shell + bright-blue accent (POS look, Metronic-safe)
 * Loaded AFTER style.bundle.css, so these only remap tokens/skins; no
 * vendor files are edited. All colours flow from the variables below.
 * ===================================================================== */
:root,
[data-bs-theme="light"] {
    /* Bright action blue */
    --bs-primary: #2F80FF;
    --bs-primary-active: #1F63D6;
    --bs-primary-light: #E8F0FF;
    --bs-primary-inverse: #FFFFFF;
    --bs-primary-rgb: 47, 128, 255;
    --bs-text-primary: #2F80FF;

    /* Links follow the accent */
    --bs-link-color: #2F80FF;
    --bs-link-hover-color: #1F63D6;

    /* POS palette (used by the shell + POS screens) */
    --pos-navy: #0B1F4D;
    --pos-navy-dark: #081633;
    --pos-primary: #2F80FF;
    --pos-primary-active: #1F63D6;
    --pos-primary-light: #E8F0FF;
    --pos-menu-idle: #A9B8DA;
    /* idle menu text on navy */
}

/* ---- Buttons: guarantee the accent even where hex leaked in ---- */
.btn.btn-primary {
    background-color: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #fff;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
.btn.btn-primary.active,
.btn.btn-primary:first-child:active,
.show>.btn.btn-primary.dropdown-toggle {
    background-color: var(--pos-primary-active) !important;
    border-color: var(--pos-primary-active) !important;
    color: #fff !important;
}

.btn.btn-light-primary {
    background-color: var(--pos-primary-light);
    color: var(--pos-primary);
}

.btn.btn-light-primary:hover,
.btn.btn-light-primary:focus,
.btn.btn-light-primary:active {
    background-color: var(--pos-primary) !important;
    color: #fff !important;
}

/* =========================== NAVY SHELL =========================== */
/* Sidebar */
.aside,
.aside.aside-dark {
    background-color: var(--pos-navy) !important;
}

.aside .aside-logo,
.aside.aside-dark .aside-logo {
    background-color: var(--pos-navy-dark) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

/* Idle menu items */
.aside .menu .menu-item .menu-link {
    color: var(--pos-menu-idle);
    border-radius: 8px;
}

.aside .menu .menu-item .menu-link .menu-icon i,
.aside .menu .menu-item .menu-link .menu-icon .svg-icon {
    color: var(--pos-menu-idle);
}

/* Hover */
.aside .menu .menu-item .menu-link:hover:not(.active) {
    background-color: rgba(47, 128, 255, .12);
}

.aside .menu .menu-item .menu-link:hover .menu-title,
.aside .menu .menu-item .menu-link:hover .menu-icon i {
    color: #fff !important;
}

/* Active / open — solid blue pill */
.aside .menu .menu-item .menu-link.active,
.aside .menu .menu-item.here>.menu-link,
.aside .menu .menu-item.show>.menu-link {
    background-color: var(--pos-primary) !important;
}

.aside .menu .menu-item .menu-link.active .menu-title,
.aside .menu .menu-item .menu-link.active .menu-icon i,
.aside .menu .menu-item.here>.menu-link .menu-title,
.aside .menu .menu-item.show>.menu-link .menu-title {
    color: #fff !important;
}

/* Submenu accordion background inside navy */
.aside .menu .menu-sub .menu-link.active {
    background-color: rgba(47, 128, 255, .18) !important;
}

/* Header / topbar */
.header {
    background-color: var(--pos-navy-dark) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04);
}

.header .menu-title,
.header .menu-link,
.header .btn-icon i {
    color: #DCE6FA !important;
}

.header .menu-link.active,
.header .menu-link:hover .menu-title,
.header .menu-link:hover {
    color: #fff !important;
}

/* ===================== POS SCREEN POLISH ===================== */
/* Summary/stat tiles used on Orders, Inflow, dashboards */
.card.card-flush.shadow-sm {
    border-radius: 14px;
    border-top: 3px solid var(--pos-primary);
    transition: box-shadow .15s ease, transform .15s ease;
}

.card.card-flush.shadow-sm:hover {
    box-shadow: 0 .5rem 1.5rem rgba(11, 31, 77, .12) !important;
    transform: translateY(-2px);
}

/* Touch-friendly primary actions */
.btn.btn-primary.btn-lg,
.pos-pay-btn {
    letter-spacing: .3px;
}

/* ===================== POS AUTH (login + error pages) ===================== */
.pos-auth-bg {
    background: radial-gradient(1200px 620px at 50% -12%, #143a86 0%, #0B1F4D 46%, #081633 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

.pos-auth-card {
    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .55);
}

.pos-auth-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2F80FF, #1F63D6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 26px -8px rgba(47, 128, 255, .65);
}

.pos-auth-logo i {
    color: #fff;
    font-size: 2.3rem;
}

.pos-auth-logo svg {
    width: 40px;
    height: 40px;
    color: #fff;
}

.pos-auth-footer {
    color: #8aa0c8;
}

/* Large, touch-friendly inputs */
.pos-input {
    height: 58px;
    border-radius: 14px;
    font-size: 1.12rem;
    border: 1.5px solid #e3e8f0;
    background: #f8fafc;
}

.pos-input:focus {
    background: #fff;
    border-color: #2F80FF;
    box-shadow: 0 0 0 .25rem rgba(47, 128, 255, .15);
}

.pos-input-group {
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid #e3e8f0;
    background: #f8fafc;
}

.pos-input-group:focus-within {
    border-color: #2F80FF;
    box-shadow: 0 0 0 .25rem rgba(47, 128, 255, .15);
    background: #fff;
}

.pos-input-group .pos-input {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.pos-input-group .pos-eye {
    border: 0;
    background: transparent;
    color: #7a8aa8;
    width: 54px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-input-group .pos-eye svg {
    width: 22px;
    height: 22px;
}

.pos-auth-btn {
    height: 60px;
    border-radius: 14px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .3px;
}

/* Error pages */
.pos-error-code {
    font-size: 6.5rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #2F80FF, #8ab6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pos-error-badge {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    background: linear-gradient(135deg, #2F80FF, #1F63D6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px -10px rgba(47, 128, 255, .6);
}

.pos-error-badge i {
    color: #fff;
    font-size: 2.6rem;
}

.pos-error-badge svg {
    width: 46px;
    height: 46px;
    color: #fff;
}

#stock_branch_results_table_wrapper {
    min-height: 500px;
}