/* G3 Collections — POS Billing (responsive) */
:root {
    --pos-maroon: #1e40af;
    --pos-maroon-dark: #172554;
    --pos-maroon-light: #2563eb;
    --pos-pink: #1e40af;
    --pos-pink-soft: #e8f0fc;
    --pos-pink-mid: #a8c8f5;
    --pos-bg: #e8f2fc;
    --pos-card: #ffffff;
    --pos-border: #a8c4f0;
    --pos-text: #0a1628;
    --pos-muted: #4a6285;
    --pos-green: #059669;
    --pos-green-dark: #047857;
    --pos-sidebar-w: 272px;
    --pos-radius: 12px;
    --pos-shadow: 0 8px 28px rgba(30, 64, 175, 0.12);
    --bq-space-xs: 6px;
    --bq-space-sm: 10px;
    --bq-space-md: 16px;
    --bq-space-lg: 20px;
    --bq-space-xl: 24px;
    --bq-field-gap: 8px;
    --bq-section-gap: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

.pos-body {
    margin: 0;
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--pos-text);
    background: var(--pos-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ─── Sidebar ─── */
.pos-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 8, 18, 0.45);
    z-index: 90;
}

.pos-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--pos-sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--pos-maroon) 0%, var(--pos-maroon-dark) 100%);
    color: #fff;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.28s ease;
}

.pos-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.pos-sidebar-close {
    display: none;
    margin-left: auto;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.pos-sidebar-close:hover,
.pos-sidebar-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
}

.pos-sidebar-close:active {
    transform: scale(0.96);
}

.pos-sidebar-close i {
    font-size: 1rem;
    line-height: 1;
}

.pos-sidebar-logo-dress {
    font-size: 1.05rem;
}

.pos-sidebar-logo,
.pos-topbar-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--pos-logo-bg, linear-gradient(145deg, #7eb4f7, #1e40af));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.pos-brand-logo-img {
    display: block;
    object-fit: contain;
    background: transparent;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: none;
}

.pos-brand-logo-img--icon {
    padding: 0;
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.pos-brand-logo-img--icon.pos-brand-logo-img--sm {
    width: 40px;
    height: 40px;
}

.pos-brand-logo-img--icon.pos-brand-logo-img--sidebar {
    width: 48px;
    height: 48px;
    border-width: 0;
}

.pos-brand-logo-img--icon.pos-brand-logo-img--login {
    width: min(360px, 100%);
    height: auto;
    max-height: 150px;
    border-width: 0;
}

.pos-brand-logo-img--sm {
    width: 44px;
    height: 44px;
    padding: 3px;
}

.pos-brand-logo-img--md {
    width: 100%;
    max-width: 196px;
    height: auto;
    max-height: 88px;
    padding: 6px 8px;
}

.pos-brand-logo-img--lg {
    width: auto;
    max-width: 210px;
    height: auto;
    max-height: 132px;
    padding: 10px 12px;
    border-radius: 14px;
}

.pos-sidebar-brand--logo {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.pos-sidebar-brand--logo .pos-brand-logo-img--sidebar {
    flex-shrink: 0;
}

.pos-sidebar-brand-meta {
    min-width: 0;
}

.pos-sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.pos-sidebar-sub {
    font-size: 0.72rem;
    opacity: 0.75;
    margin-top: 2px;
}

.pos-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pos-nav-link,
.pos-nav-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    border: none;
    background: transparent;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    overflow: visible;
    transition: background 0.15s, color 0.15s;
}

.pos-nav-link > i,
.pos-nav-button > i {
    width: 1.15em;
    flex: 0 0 1.15em;
    max-width: 1.15em;
    text-align: center;
    opacity: 0.9;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1;
    font-style: normal;
}

.pos-nav-link > i::before,
.pos-nav-button > i::before {
    display: block;
    width: 1.15em;
    max-width: 1.15em;
    overflow: hidden;
}

.pos-nav-link > span,
.pos-nav-button > span,
.pos-nav-reports-trigger > span {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
    overflow: visible;
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    font-style: normal;
}

.pos-nav-link:hover,
.pos-nav-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pos-nav-link.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
}

.pos-nav-logout {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pos-sidebar-card {
    margin: 12px;
    padding: 14px;
    border-radius: var(--pos-radius);
    background: var(--pos-icon-grad, linear-gradient(145deg, #a8c8f5, #7eb4f7));
    color: var(--pos-maroon-dark);
    text-align: center;
}

.pos-sidebar-card-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.pos-sidebar-card-text {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

/* ─── Main shell ─── */
.pos-main {
    position: relative;
    margin-left: var(--pos-sidebar-w);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
}

/* Keep invoice / form rails sticky relative to the viewport */
.pos-main:has(.si-app),
.pos-main:has(.bd-record),
.pos-main:has(.bq-quote-form-page) {
    overflow: visible;
}

.pos-app {
    flex: 1;
    padding: var(--bq-space-md, 16px) var(--bq-space-lg, 20px) var(--bq-space-sm, 12px);
    max-width: 1600px;
}

/* ─── Top bar ─── */
.pos-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    background: linear-gradient(90deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--pos-radius);
    margin: 0 0 12px;
    box-shadow: var(--pos-shadow);
    position: relative;
    z-index: 2;
    overflow: visible;
}

.pos-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Workspace bar hamburger — visible on white header */
.bq-workspace-bar .bq-workspace-menu {
    display: none;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    box-shadow: 0 2px 8px rgba(107, 21, 53, 0.08);
}

.bq-workspace-bar .bq-workspace-menu:hover {
    background: #ffe0ef;
}

/* POS fullscreen nav hamburger */
.pos-screen-nav__menu {
    display: none;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    width: 40px;
    height: 40px;
}

.pos-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.pos-topbar-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-topbar-sub {
    margin: 2px 0 0;
    font-size: 0.78rem;
    opacity: 0.85;
}

.pos-topbar-meta {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 0;
    background: transparent !important;
    min-width: 0;
}

.pos-meta-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pos-meta-label {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.pos-meta-block strong {
    font-size: 0.9rem;
}

.pos-bill-badge {
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: 8px;
}

.pos-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pos-chip-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.pos-chip-accent {
    background: var(--pos-pink);
    border-color: var(--pos-pink);
}

/* ─── Panels ─── */
.pos-panel {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    padding: var(--bq-space-md, 18px);
    box-shadow: var(--pos-shadow);
}

.pos-panel-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

/* ─── Search row ─── */
.pos-search-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--bq-space-md, 16px);
    margin-bottom: var(--bq-space-md, 16px);
    align-items: stretch;
}

.pos-search-panel {
    position: relative;
    z-index: 30;
}

.pos-search-dropdown-wrap {
    position: relative;
}

.pos-search-dropdown-wrap.is-open {
    z-index: 120;
}

.pos-search-bar {
    display: flex;
    align-items: stretch;
    min-height: 48px;
    border: 1px solid color-mix(in srgb, var(--pos-border) 70%, var(--pos-pink));
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(107, 21, 53, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pos-search-dropdown-wrap.is-open .pos-search-bar,
.pos-search-bar:focus-within {
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 4px rgba(233, 30, 140, 0.1);
}

.pos-search-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.pos-search-field__icon-wrap {
    display: grid;
    place-items: center;
    width: 44px;
    flex-shrink: 0;
    color: var(--pos-muted);
    font-size: 0.88rem;
    pointer-events: none;
}

.pos-search-field__input {
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 40px 0 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--pos-text);
    line-height: 1.4;
}

.pos-search-field__input::placeholder {
    color: color-mix(in srgb, var(--pos-muted) 85%, transparent);
}

.pos-search-field__input:focus {
    outline: none;
    box-shadow: none;
}

.pos-search-field__clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.pos-search-field__clear:hover {
    background: var(--pos-pink);
    color: #fff;
}

.pos-search-field__clear[hidden] {
    display: none !important;
}

.pos-search-toggle {
    width: 48px;
    flex-shrink: 0;
    align-self: stretch;
    border: none;
    border-left: 1px solid var(--pos-border);
    border-radius: 0;
    background: linear-gradient(180deg, #fff 0%, #fdf9fb 100%);
    color: var(--pos-maroon);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s;
}

.pos-search-toggle i {
    font-size: 0.82rem;
    transition: transform 0.2s ease;
}

.pos-search-toggle.is-open i {
    transform: rotate(180deg);
}

.pos-search-toggle:hover,
.pos-search-toggle.is-open {
    background: var(--pos-pink-soft);
}

.pos-input-group {
    display: flex;
    gap: 8px;
}

.pos-input {
    flex: 1;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: var(--pos-text);
}

.pos-input:focus {
    outline: none;
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.12);
}

.pos-input-btn {
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: var(--pos-maroon);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.pos-input-btn-outline {
    background: #fff;
    color: var(--pos-maroon);
    border: 1px solid var(--pos-border);
}

/* ─── Categories ─── */
.pos-categories-row {
    margin-bottom: 14px;
}

.pos-categories-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
}

.pos-categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.pos-categories-scroll::-webkit-scrollbar-thumb {
    background: var(--pos-pink-mid);
    border-radius: 99px;
}

.pos-category-card {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    border: 1px solid var(--pos-border);
    background: var(--pos-card);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pos-category-card:hover {
    transform: none;
    border-color: var(--pos-maroon);
}

.pos-category-card.is-active {
    border-color: var(--pos-maroon);
    background: var(--pos-maroon);
    box-shadow: none;
}

.pos-category-card.is-active .pos-category-name {
    color: #fff;
}

.pos-category-thumb {
    display: none;
}

.pos-category-thumb-all {
    display: none;
}

.pos-category-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-text);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

/* ─── Workspace: cart + summary ─── */
.pos-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    grid-template-areas: "cart summary";
    gap: var(--bq-space-md);
    margin-bottom: var(--bq-space-md);
    align-items: start;
}

.pos-cart-panel {
    grid-area: cart;
}

.pos-summary-panel {
    grid-area: summary;
    min-width: 0;
    overflow: visible;
}

.pos-cart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--bq-space-sm);
    margin-bottom: 14px;
}

.pos-cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pos-action-btn {
    padding: 7px 10px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pos-muted);
    cursor: pointer;
}

.pos-action-btn:hover {
    border-color: var(--pos-pink);
    color: var(--pos-maroon);
}

.pos-kbd {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--pos-pink-soft);
    font-size: 0.65rem;
    margin-left: 4px;
    font-weight: 600;
    line-height: 1.4;
}

.pos-btn-save .pos-kbd,
.pos-btn-pay .pos-kbd,
.pos-btn-sms .pos-kbd,
.pos-btn-whatsapp .pos-kbd,
.pos-btn-send-bill .pos-kbd {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: inherit;
    margin-left: 6px;
}

.pos-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
}

.pos-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 0;
    table-layout: auto;
}

.pos-cart-table thead th {
    text-align: center;
    padding: 10px 8px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.pos-cart-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #f5eef2;
    vertical-align: middle;
    text-align: center;
}

.pos-cart-table thead th:nth-child(2),
.pos-cart-table tbody td:nth-child(2) {
    text-align: left;
    padding-left: 12px;
}

.pos-cart-table tbody tr:hover {
    background: #fdf8fa;
}

.pos-item-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pos-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--pos-maroon);
    flex-shrink: 0;
}

.pos-item-cell strong {
    display: block;
    font-size: 0.85rem;
}

.pos-item-cell small {
    color: var(--pos-muted);
    font-size: 0.72rem;
}

.pos-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-color-chip i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pos-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.pos-qty-control button {
    width: 28px;
    height: 30px;
    border: none;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    cursor: pointer;
    font-size: 1rem;
}

.pos-qty-control input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 0.85rem;
    padding: 4px;
}

.pos-mini-input {
    width: 64px;
    padding: 6px 8px;
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    font-size: 0.82rem;
    text-align: center;
}

.pos-mini-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: min(100%, 128px);
    margin: 0 auto;
    vertical-align: middle;
}

.pos-mini-select-wrap::after {
    content: '';
    position: absolute;
    right: 11px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 1.8px solid var(--pos-maroon);
    border-bottom: 1.8px solid var(--pos-maroon);
    transform: rotate(45deg);
    pointer-events: none;
}

.pos-mini-select-wrap.is-disabled::after {
    display: none;
}

.pos-attr-na {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    color: var(--pos-muted, #94a3b8);
    font-weight: 600;
}

.pos-mini-select {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff none;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-maroon);
    line-height: 32px;
    text-align: center;
    text-align-last: center;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
}

.pos-mini-select::-ms-expand {
    display: none;
}

.pos-mini-select option {
    text-align: left;
}

.pos-mini-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-disc-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.pos-disc-switch {
    min-width: 42px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: #f6f3f5;
    color: var(--pos-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.pos-disc-switch.is-on {
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
    color: #fff;
}

.pos-disc-mode {
    display: inline-flex;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.pos-disc-mode button {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    color: var(--pos-muted);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.pos-disc-mode button + button {
    border-left: 1px solid var(--pos-border);
}

.pos-disc-mode button.is-active {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.pos-disc-input {
    width: 58px;
    text-align: center;
}

.pos-disc-off {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-muted);
}

.pos-cart-card-attrs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
    gap: 8px;
    margin: 10px 0 8px;
    align-items: center;
}

.pos-cart-card-attrs .pos-mini-select-wrap {
    width: 100%;
    max-width: none;
}

@media (max-width: 1360px) {
    .pos-cart-table thead th,
    .pos-cart-table tbody td {
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    .pos-mini-select-wrap {
        width: min(100%, 108px);
    }

    .pos-mini-select {
        height: 32px;
        line-height: 30px;
        font-size: 0.74rem;
        padding: 0 24px 0 8px;
    }

    .pos-mini-select-wrap::after {
        right: 9px;
        width: 6px;
        height: 6px;
        margin-top: -4px;
    }

    .pos-disc-switch {
        min-width: 38px;
        height: 26px;
    }

    .pos-disc-mode button {
        width: 26px;
        height: 26px;
    }

    .pos-disc-input,
    .pos-cart-table .pos-mini-input {
        width: 52px;
        min-height: 32px;
    }
}

.pos-remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: #fee;
    color: #c33;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.pos-cart-foot {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--pos-muted);
}

.pos-cart-foot strong {
    color: var(--pos-maroon);
}

/* Mobile cart cards (hidden on desktop) */
.pos-cart-cards {
    display: none;
}

.pos-cart-card {
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.pos-cart-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pos-cart-card-head > div {
    flex: 1;
    min-width: 0;
}

.pos-cart-card-head .pos-remove-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.pos-cart-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--pos-muted);
    margin: 8px 0;
}

.pos-cart-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pos-cart-card-disc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
    letter-spacing: 0.02em;
}

.pos-cart-card-disc .disc-input,
.pos-cart-card-disc .pos-mini-input {
    width: 72px;
    min-height: 36px;
    text-align: center;
    font-size: 0.9rem;
}

/* ─── Bill summary ─── */
.pos-summary-list {
    margin: 0 0 14px;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--pos-border);
    font-size: 0.85rem;
}

.pos-summary-row dt {
    color: var(--pos-muted);
    font-weight: 500;
    min-width: 0;
}

.pos-summary-row dd {
    margin: 0;
    font-weight: 600;
    flex-shrink: 0;
    text-align: right;
}

.pos-grand-total {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 14px;
}

.pos-grand-label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.pos-grand-note {
    display: block;
    font-size: 0.72rem;
    opacity: 0.75;
    margin-bottom: 6px;
}

.pos-grand-amount {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
}

.pos-coupon-row {
    display: flex;
    gap: 8px;
}

/* ─── Bottom grid ─── */
.pos-bottom-grid {
    display: grid;
    grid-template-columns: minmax(200px, 0.75fr) minmax(260px, 1fr) minmax(0, 1.35fr);
    grid-template-areas: "customer payment recent";
    gap: 14px;
    align-items: stretch;
}

.pos-customer-panel {
    grid-area: customer;
}

.pos-payment-panel {
    grid-area: payment;
}

.pos-recent-panel {
    grid-area: recent;
}

.pos-checkout-head {
    margin-bottom: 12px;
}

.pos-checkout-head--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pos-checkout-head--row .pos-panel-title {
    margin: 0;
}

.pos-checkout-head .pos-panel-title {
    margin: 0 0 4px;
}

.pos-checkout-sub {
    margin: 4px 0 0;
    font-size: 0.72rem;
    color: var(--pos-muted);
    line-height: 1.35;
}

.pos-panel.pos-customer-panel,
.pos-panel.pos-payment-panel {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
}

@media (min-width: 1025px) {
    .pos-panel.pos-customer-panel,
    .pos-panel.pos-payment-panel {
        min-height: 100%;
    }
}

.pos-customer-fields {
    margin-bottom: 0;
    gap: 12px;
}

.pos-loyalty-field {
    margin-top: 2px;
}

.pos-field-hint {
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--pos-muted);
    line-height: 1.3;
}

.pos-input--loyalty {
    max-width: 160px;
    font-weight: 700;
    color: var(--pos-maroon);
}

.pos-checkout-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.pos-payment-panel .pos-pay-actions {
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px solid var(--pos-border);
    flex-shrink: 0;
}

.pos-cash-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdfb 0%, #fff 100%);
    border: 1px solid var(--pos-border);
}

.pos-field--amount {
    margin: 0;
    gap: 8px;
}

.pos-input--amount {
    min-height: 44px;
    padding: 11px 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.pos-cash-block__quick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-cash-block__quick-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pos-muted);
}

.pos-recent-panel .pos-table-wrap {
    max-height: none;
    overflow: visible;
}

.pos-recent-bills-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pos-recent-bills-wrap .dataTables_wrapper {
    display: none !important;
}

.pos-recent-table tbody tr.pos-empty-row {
    display: table-row;
}

@media (max-width: 768px) {
    .pos-recent-table tbody tr.pos-empty-row {
        display: block !important;
        text-align: center;
    }

    .pos-recent-table tbody tr.pos-empty-row td {
        display: block !important;
        text-align: center;
    }

    .pos-recent-table tbody tr.pos-empty-row td::before {
        content: none !important;
    }
}

.pos-recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.pos-recent-table th,
.pos-recent-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f5eef2;
}

.pos-recent-table th {
    color: var(--pos-muted);
    font-weight: 600;
    font-size: 0.7rem;
}

.pos-empty-row td {
    text-align: center;
    color: var(--pos-muted);
    padding: 20px;
}

.pos-search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--pos-pink) 25%, var(--pos-border));
    border-radius: 14px;
    box-shadow:
        0 4px 12px rgba(107, 21, 53, 0.06),
        0 20px 48px rgba(107, 21, 53, 0.14);
    max-height: min(420px, 52vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pos-search-dropdown[hidden] {
    display: none !important;
}

.pos-search-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f5eef2;
    background: linear-gradient(180deg, #fff 0%, #fdf9fb 100%);
    font-size: 0.7rem;
    color: var(--pos-muted);
    flex-shrink: 0;
}

.pos-search-dropdown__head #product_search_count {
    font-weight: 700;
    color: var(--pos-maroon);
}

.pos-search-dropdown__hint {
    font-size: 0.64rem;
    white-space: nowrap;
}

.pos-search-dropdown__list {
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pos-search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.pos-search-dropdown-item:hover,
.pos-search-dropdown-item.is-active {
    background: var(--pos-pink-soft);
    border-color: color-mix(in srgb, var(--pos-pink) 35%, transparent);
}

.pos-search-dropdown-thumb {
    display: none;
}

.pos-search-dropdown-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pos-search-dropdown-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.pos-search-dropdown-title strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--pos-maroon);
    line-height: 1.3;
    min-width: 0;
    flex: 1;
}

.pos-search-dropdown-copy small {
    font-size: 0.74rem;
    color: var(--pos-muted);
    line-height: 1.25;
}

.pos-search-dropdown-meta {
    display: inline-block;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--pos-pink) 30%, var(--pos-border));
    color: var(--pos-maroon);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
    white-space: nowrap;
}

.pos-search-dropdown-empty {
    margin: 8px;
    padding: 20px 16px;
    text-align: center;
    color: var(--pos-muted);
    font-size: 0.84rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    background: #fdf9fb;
    border: 1px dashed var(--pos-border);
}

.pos-product-picker {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.pos-product-picker.is-search-active .pos-product-grid,
.pos-product-picker.is-search-active .pos-product-empty {
    visibility: hidden;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.pos-product-picker.is-search-active::after {
    content: '';
    display: block;
    min-height: 8px;
}

.pos-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pos-panel-title-row .pos-panel-title {
    margin: 0;
}

.pos-quick-add-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--pos-pink-mid);
    border-radius: 999px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.pos-quick-add-link:hover {
    background: #fff;
}

.pos-quick-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.pos-quick-add-btn:hover {
    filter: brightness(1.05);
}

.pos-quick-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: var(--bq-space-md, 16px);
}

.pos-quick-modal[hidden] {
    display: none !important;
}

.pos-quick-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 8, 18, 0.5);
}

.pos-quick-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(740px, 100%);
    max-height: min(92dvh, 900px);
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(107, 21, 53, 0.2);
}

.pos-quick-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px 22px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(90deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
}

.pos-quick-modal__head h2 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-quick-billing-only {
    margin: 4px 0 0;
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.92;
    line-height: 1.35;
}

.pos-quick-billing-only strong {
    font-weight: 700;
}

.pos-quick-modal__close {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.pos-quick-modal__form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pos-quick-modal__scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 22px;
    -webkit-overflow-scrolling: touch;
}

.pos-quick-field {
    display: flex;
    flex-direction: column;
    gap: var(--bq-field-gap, 8px);
    flex: 1;
    min-width: 0;
}

.pos-quick-field label {
    display: block;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.pos-required {
    color: #c0392b;
}

.pos-quick-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bq-space-md, 16px);
}

.pos-quick-error {
    flex-shrink: 0;
    margin: 0 22px 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fdecea;
    color: #a93226;
    font-size: 0.84rem;
}

.pos-quick-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    margin: 0;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--pos-border);
    background: #fff;
}

body.pos-modal-open {
    overflow: hidden;
}

.pos-quick-section {
    display: flex;
    flex-direction: column;
    gap: var(--bq-space-md, 16px);
    padding-bottom: var(--bq-space-lg, 20px);
    margin-bottom: var(--bq-space-lg, 20px);
    border-bottom: 1px solid var(--pos-border);
}

.pos-quick-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 8px;
}

.pos-quick-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.pos-quick-section__title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pos-maroon);
}

.pos-quick-textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.45;
}

.pos-quick-field-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pos-quick-field--swatch {
    max-width: 96px;
}

.pos-quick-swatch {
    width: 100%;
    height: 44px;
    padding: 4px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.pos-quick-hint {
    margin: -4px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--pos-muted);
}

.pos-quick-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px dashed var(--pos-pink-mid);
    border-radius: 999px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.pos-quick-variations-wrap {
    overflow-x: auto;
    margin-top: 4px;
}

.pos-quick-variations {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 0.82rem;
}

.pos-quick-variations th,
.pos-quick-variations td {
    padding: 4px 6px;
    text-align: left;
    vertical-align: middle;
}

.pos-quick-variations th {
    padding-bottom: 8px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pos-muted);
    font-weight: 700;
}

.pos-quick-variations .pos-input {
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
    font-size: 0.82rem;
}

.pos-quick-variations .pos-quick-swatch {
    height: 40px;
}

.pos-quick-remove-row {
    border: none;
    background: #fdecea;
    color: #a93226;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 720px) {
    .pos-quick-field-row--3 {
        grid-template-columns: 1fr;
    }

    .pos-quick-modal__scroll {
        padding: 16px 18px;
    }

    .pos-quick-modal__foot {
        padding: 12px 18px 16px;
    }
}

@media (max-width: 560px) {
    .pos-quick-field-row {
        grid-template-columns: 1fr;
    }
}

.pos-search-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    max-height: 220px;
    overflow-y: auto;
}

.pos-product-picker {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
    gap: 10px;
    padding: 4px 2px 6px;
}

.pos-product-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 14px 14px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    min-width: 0;
    min-height: 88px;
    overflow: visible;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pos-product-card:hover {
    border-color: var(--pos-pink);
    box-shadow: var(--pos-shadow);
}

.pos-product-card-thumb {
    display: none;
}

.pos-product-card-thumb--photo,
.pos-search-dropdown-thumb--photo {
    padding: 0;
}

.pos-product-card-thumb--photo img,
.pos-search-dropdown-thumb--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pos-product-card-body {
    min-width: 0;
    width: 100%;
    display: grid;
    gap: 4px;
    padding-top: 1px;
}

.pos-product-card-body strong {
    font-size: 0.88rem;
    color: var(--pos-maroon);
    line-height: 1.35;
    text-transform: none;
}

.pos-product-card-body small {
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.pos-product-card-body em {
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-text);
}

.pos-product-empty {
    margin: 0;
    padding: 18px;
    text-align: center;
    border: 1px dashed var(--pos-border);
    border-radius: 12px;
    color: var(--pos-muted);
    background: #fff;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pos-search-hit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: var(--pos-pink-soft);
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.pos-search-hit strong {
    font-size: 0.85rem;
    color: var(--pos-maroon);
}

.pos-search-hit span {
    font-size: 0.75rem;
    color: var(--pos-muted);
}

.pos-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pos-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pos-field span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.pos-field-full {
    grid-column: 1 / -1;
}

.pos-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.pos-btn-outline {
    background: #fff;
    border: 1px solid var(--pos-border);
    color: var(--pos-maroon);
}

.pos-pay-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.pos-pay-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 54px;
    padding: 8px 4px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pos-muted);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.12s;
}

.pos-pay-tab i {
    font-size: 0.95rem;
    line-height: 1;
}

.pos-pay-tab:hover {
    border-color: var(--pos-pink);
    color: var(--pos-maroon);
}

.pos-pay-tab.is-active {
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
    color: #fff;
    box-shadow: 0 4px 12px rgba(107, 21, 53, 0.22);
}

.pos-split-pay {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdfb 0%, #fff 100%);
    border: 1px solid var(--pos-border);
}

.pos-split-pay__hint {
    margin: 0;
    font-size: 0.72rem;
    color: var(--pos-muted);
    line-height: 1.35;
}

.pos-split-pay__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pos-split-pay__grid .pos-field span i {
    margin-right: 4px;
    opacity: 0.75;
}

.pos-split-pay__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--pos-pink-soft);
    border: 1px solid color-mix(in srgb, var(--pos-pink) 30%, transparent);
    font-size: 0.78rem;
    color: var(--pos-maroon);
}

.pos-split-pay__total strong {
    font-size: 0.92rem;
}

.pos-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.pos-quick-amounts button {
    padding: 11px 8px;
    min-height: 42px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: var(--pos-pink-soft);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--pos-maroon);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pos-quick-amounts button:hover {
    border-color: var(--pos-pink);
    background: #fff;
}

.pos-change-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #ecfbf1 0%, #e8f8ee 100%);
    border: 1px solid #c8ebd4;
    border-radius: 12px;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--pos-text);
}

.pos-change-row strong {
    color: var(--pos-green);
    font-size: 1.05rem;
}

.pos-pay-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pos-pay-actions .pos-btn {
    min-height: 54px;
    padding: 14px 12px;
    font-size: 0.82rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.pos-btn-save-print {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(107, 21, 53, 0.28);
}

.pos-btn-whatsapp-bill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 6px 18px rgba(18, 140, 126, 0.28);
}

.pos-btn-save-print .pos-kbd,
.pos-btn-whatsapp-bill .pos-kbd {
    margin-left: 2px;
}

.pos-btn-send-bill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(107, 21, 53, 0.28);
}

.pos-btn-send-bill__icons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.pos-btn-send-bill .pos-kbd {
    margin-left: 4px;
}

.pos-btn-save,
.pos-btn-sms {
    background: var(--pos-chip-grad, linear-gradient(135deg, #2563eb, #1e40af));
    color: #fff;
}

.pos-btn-pay,
.pos-btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
}

@media (max-width: 640px) {
    .pos-pay-actions {
        grid-template-columns: 1fr;
    }
}

/* ─── Footer ─── */
.pos-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 14px 24px;
    background: var(--pos-card);
    border-top: 1px solid var(--pos-border);
    font-size: 0.8rem;
    color: var(--pos-muted);
}

.pos-footer strong {
    color: var(--pos-text);
}

/* ─── Responsive ─── */
@media (max-width: 1400px) {
    .pos-workspace {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cart"
            "summary";
    }

    .pos-bottom-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "customer payment"
            "recent recent";
    }

    .pos-pay-tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .pos-cart-table {
        display: none;
    }

    .pos-cart-cards {
        display: block;
    }

    .pos-table-wrap:has(.pos-cart-cards) {
        border: none;
        overflow: visible;
    }

    .pos-app--fullscreen .pos-product-picker,
    .pos-product-picker {
        max-height: none;
        overflow: visible;
        padding-top: 8px;
    }
}

@media (max-width: 1279px) {
    .pos-sidebar {
        transform: translateX(-100%);
    }

    .pos-sidebar-close {
        display: grid;
    }

    .pos-body.pos-sidebar-open {
        overflow: hidden;
        touch-action: none;
    }

    .pos-body.pos-sidebar-open .pos-sidebar {
        transform: translateX(0);
    }

    .pos-body.pos-sidebar-open .pos-overlay {
        display: block;
    }

    .pos-main {
        margin-left: 0;
    }

    .pos-menu-toggle {
        display: grid;
        place-items: center;
    }

    .bq-workspace-bar .bq-workspace-menu,
    .pos-screen-nav__menu {
        display: grid !important;
        place-items: center;
    }

    /* Fullscreen POS: sidebar off-canvas on tablet/mobile only */
    .pos-body--fullscreen .pos-sidebar--fullscreen-nav {
        display: flex;
        transform: translateX(-100%);
    }

    .pos-body--fullscreen.pos-sidebar-open .pos-sidebar--fullscreen-nav {
        transform: translateX(0);
    }

    .pos-topbar-meta {
        margin-left: auto;
        width: auto;
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .pos-app {
        padding: 12px;
        max-width: 100%;
    }

    .pos-search-row {
        grid-template-columns: 1fr;
    }

    .pos-search-dropdown {
        max-height: min(360px, 45vh);
    }

    .pos-search-dropdown__hint {
        display: none;
    }

    .pos-topbar-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .pos-meta-block {
        min-width: 0;
    }

    .pos-bill-badge {
        grid-column: 1 / -1;
    }

    .pos-topbar-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .pos-topbar-actions .pos-chip-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        min-height: 40px;
    }

    .pos-bottom-grid {
        grid-template-columns: 1fr;
    }

    .pos-cart-table {
        display: none;
    }

    .pos-cart-cards {
        display: block;
    }

    .pos-table-wrap {
        border: none;
        overflow: visible;
    }

    .pos-table-wrap.pos-table-compact {
        overflow-x: auto;
    }

    .pos-table-wrap.pos-table-compact:has(.bq-table-responsive) {
        overflow: visible;
    }

    .pos-cart-actions {
        width: 100%;
    }

    .pos-action-btn {
        flex: 1;
        text-align: center;
        font-size: 0.68rem;
    }

    .pos-pay-actions {
        grid-template-columns: 1fr;
    }

    .pos-pay-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-pay-tab:nth-child(4),
    .pos-pay-tab:nth-child(5) {
        grid-column: span 1;
    }

    .pos-quick-amounts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-topbar-brand {
        flex: 1;
        min-width: 0;
    }

    .pos-chip-btn {
        font-size: 0.7rem;
        padding: 7px 10px;
    }

    .pos-footer {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .pos-topbar-title {
        font-size: 1rem;
    }

    .pos-category-card {
        width: auto;
        padding: 7px 12px;
    }

    .pos-category-thumb {
        display: none;
    }

    .pos-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .pos-product-grid {
        grid-template-columns: 1fr;
    }

    .pos-category-name {
        max-width: min(78vw, 220px);
    }

    .pos-product-card {
        min-height: 0;
    }
}

/* Print */
@media print {
    .pos-sidebar,
    .pos-overlay,
    .pos-menu-toggle,
    .pos-topbar-actions,
    .pos-cart-actions,
    .pos-search-row,
    .pos-categories-row,
    .pos-bottom-grid,
    .pos-footer,
    .pos-pay-actions,
    .pos-coupon-row {
        display: none !important;
    }

    .pos-main {
        margin: 0;
    }

    .pos-app {
        padding: 0;
    }

    .pos-workspace {
        grid-template-columns: 1fr;
    }
}

/* ─── POS fullscreen (no sidebar) ─── */
.pos-body--fullscreen .pos-main {
    margin-left: 0;
}

@media (min-width: 1280px) {
    .pos-body--fullscreen .pos-sidebar--fullscreen-nav,
    .pos-body--fullscreen .pos-overlay {
        display: none !important;
    }
}

.pos-body--fullscreen .pos-app,
.pos-app--fullscreen {
    max-width: none;
    width: 100%;
    padding: 10px 16px 8px;
}

.pos-modules-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 0;
    margin: 0 0 14px;
    position: relative;
    z-index: 1;
}

.pos-modules-strip__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--pos-border);
    background: #fff;
    color: var(--pos-maroon);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

.pos-modules-strip__link.is-active {
    background: linear-gradient(135deg, var(--pos-maroon), var(--pos-maroon-light));
    border-color: transparent;
    color: #fff;
}

@media (max-width: 1024px) {
    .pos-body--fullscreen .pos-footer {
        display: none;
    }

    .pos-modules-strip {
        margin: 0 0 12px;
        padding: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .pos-modules-strip__link {
        padding: 9px 12px;
        font-size: 0.78rem;
    }

    .pos-modules-strip__link span {
        max-width: none;
    }
}


.pos-screen-nav {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: nowrap;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid var(--pos-border);
    box-shadow: 0 2px 12px rgba(107, 21, 53, 0.06);
    position: sticky;
    top: 0;
    z-index: 80;
}

.pos-screen-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pos-screen-nav__logo {
    flex-shrink: 0;
}

.pos-screen-nav__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pos-maroon);
    white-space: nowrap;
}

.pos-screen-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pos-screen-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.pos-screen-nav__link:hover {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.pos-screen-nav__link.is-active {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
}

.pos-screen-nav__link i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.pos-screen-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.pos-screen-nav__form {
    margin: 0;
}

.pos-screen-nav__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: var(--pos-bg);
    color: var(--pos-maroon);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pos-screen-nav__pill:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-pink-mid);
}

.pos-screen-nav .bq-user-menu__trigger {
    border-color: var(--pos-border);
}

/* Tablet/phone: 2-row header — brand row + scrollable module links */
@media (max-width: 1024px) {
    .pos-screen-nav {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "menu brand actions"
            "links links links";
        align-items: center;
        gap: 8px 10px;
        padding: 8px 10px;
    }

    .pos-screen-nav__menu {
        grid-area: menu;
    }

    .pos-screen-nav__brand {
        grid-area: brand;
        min-width: 0;
    }

    .pos-screen-nav__links {
        grid-area: links;
        width: 100%;
        padding-bottom: 2px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .pos-screen-nav__actions {
        grid-area: actions;
        margin-left: 0;
        gap: 6px;
    }

    .pos-screen-nav__link {
        padding: 8px 12px;
        border: 1px solid var(--pos-border);
        background: var(--pos-bg);
        scroll-snap-align: start;
        flex: 0 0 auto;
    }

    .pos-screen-nav__link.is-active {
        border-color: transparent;
    }

    .pos-screen-nav__link span,
    .pos-screen-nav__pill-label {
        display: inline;
    }

    .pos-screen-nav .bq-user-menu__name,
    .pos-screen-nav .bq-user-menu__caret {
        display: none;
    }

    .pos-screen-nav .bq-user-menu__trigger--with-name {
        padding: 4px;
    }
}

@media (max-width: 640px) {
    .pos-screen-nav {
        padding: 8px 10px;
        gap: 8px;
    }

    .pos-screen-nav__title {
        font-size: 0.82rem;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }

    .pos-screen-nav__pill {
        padding: 8px 10px;
        min-width: 40px;
        justify-content: center;
    }

    .pos-screen-nav__pill-label {
        display: none;
    }
}

/* ─── Barcode camera scanner ─── */
.pos-input-btn--camera {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 52px;
    padding: 0 14px;
    background: linear-gradient(135deg, var(--pos-pink), var(--pos-maroon-light));
}

.pos-input-btn--camera .fa-camera {
    font-size: 1rem;
}

.pos-scan-input-group .pos-input {
    font-size: 1rem;
    min-height: 48px;
}

.pos-scan-hint {
    margin: 8px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.pos-scan-hint--success {
    color: var(--pos-green);
}

.pos-scan-hint--error {
    color: #c62828;
}

.pos-scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pos-scanner-modal--mobile {
    align-items: stretch;
}

.pos-scanner-modal[hidden] {
    display: none !important;
}

.pos-scanner-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 8, 14, 0.72);
}

.pos-scanner-modal__sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: 96dvh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
    animation: posScannerSlideUp 0.24s ease;
}

.pos-scanner-modal--mobile .pos-scanner-modal__sheet {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}

.pos-scanner-modal--mobile .pos-scanner-modal__head p,
.pos-scanner-modal--mobile .pos-scanner-modal__hint {
    display: none;
}

.pos-scanner-modal--mobile .pos-scanner-modal__head {
    margin-bottom: 8px;
    flex-shrink: 0;
}

.pos-scanner-modal--mobile .pos-scanner-modal__status {
    flex-shrink: 0;
    margin-bottom: 8px;
    font-size: 0.78rem;
    text-align: center;
}

@keyframes posScannerSlideUp {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}

.pos-scanner-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pos-scanner-modal__head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--pos-maroon);
}

.pos-scanner-modal__head p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.pos-scanner-modal__close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.pos-scanner-modal__viewport {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 260px;
    height: min(58vh, 420px);
    max-height: min(58vh, 420px);
    flex-shrink: 0;
}

.pos-scanner-modal--mobile .pos-scanner-modal__viewport {
    /* Fixed height — avoid flex:1 collapse that blacks the camera feed */
    flex: 0 0 auto;
    width: 100%;
    height: min(62dvh, 520px);
    min-height: 280px;
    max-height: min(70dvh, 560px);
    aspect-ratio: auto;
    border-radius: 12px;
}

.pos-scanner-modal__region {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
    background: #111;
}

/* Live camera only — never style Quagga processing canvases as opaque covers */
.pos-scanner-modal__region video,
.pos-scanner-modal__video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #111 !important;
    z-index: 1 !important;
    transform: translateZ(0);
}

.pos-scanner-modal__region canvas.drawingBuffer,
.pos-scanner-modal__region canvas:not(.overlayCanvas) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.pos-scanner-modal__region canvas.overlayCanvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    opacity: 1 !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

.pos-scanner-modal__region #interactive,
.pos-scanner-modal__region .viewport,
.pos-scanner-modal__region > div {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    min-height: 100% !important;
    background: transparent !important;
}

.pos-scanner-modal__guide {
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 30%;
    min-height: 88px;
    max-height: 132px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
    z-index: 3;
}

.pos-scanner-modal--mobile .pos-scanner-modal__guide {
    width: 92%;
    height: 26%;
    min-height: 100px;
    max-height: 160px;
}

.pos-scanner-modal__guide::before,
.pos-scanner-modal__guide::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 18%;
    height: 2px;
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-50%);
}

.pos-scanner-modal__guide::before {
    left: -20%;
}

.pos-scanner-modal__guide::after {
    right: -20%;
}

.pos-scanner-modal__hint {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.76rem;
    color: var(--pos-muted);
}

.pos-scanner-modal__status {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.pos-scanner-modal__status--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.pos-scanner-modal__status--error {
    background: #ffebee;
    color: #c62828;
}

body.pos-scanner-open {
    overflow: hidden;
}

/* Mobile / tablet checkout bar */
.pos-mobile-checkout-bar {
    display: none;
}

@media (max-width: 1024px) {
    .pos-mobile-checkout-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--pos-border);
        box-shadow: 0 -8px 24px rgba(107, 21, 53, 0.12);
        backdrop-filter: blur(8px);
    }

    .pos-app--fullscreen {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .pos-scan-panel {
        order: -1;
    }

    .pos-scan-panel .pos-panel-title {
        font-size: 0.95rem;
    }

    .pos-input-btn__label {
        display: inline;
    }

    .pos-mobile-checkout-bar__total {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .pos-mobile-checkout-bar__total span {
        font-size: 0.68rem;
        color: var(--pos-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .pos-mobile-checkout-bar__total strong {
        font-size: 1.15rem;
        color: var(--pos-maroon);
        white-space: nowrap;
    }

    .pos-mobile-checkout-bar__actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .pos-mobile-checkout-bar__scan,
    .pos-mobile-checkout-bar__print,
    .pos-mobile-checkout-bar__pay {
        border: none;
        border-radius: 12px;
        min-height: 48px;
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
    }

    .pos-mobile-checkout-bar__scan {
        width: 48px;
        background: linear-gradient(135deg, var(--pos-pink), var(--pos-maroon-light));
        color: #fff;
        font-size: 1.1rem;
    }

    .pos-mobile-checkout-bar__print {
        padding: 0 12px;
        background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
        color: #fff;
        font-size: 0.8rem;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .pos-mobile-checkout-bar__pay {
        padding: 0 12px;
        background: linear-gradient(135deg, #25d366, #128c7e);
        color: #fff;
        font-size: 0.8rem;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .pos-pay-actions .pos-kbd,
    .pos-action-btn .pos-kbd {
        display: none;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
        gap: 10px;
    }

    .pos-product-card {
        min-height: 84px;
        padding: 10px 12px;
    }
}

@media (min-width: 769px) {
    .pos-input-btn__label {
        display: none;
    }
}

.si-barcode-row {
    grid-column: 1 / -1;
}

.si-product-search .pos-input-btn--camera {
    min-height: 42px;
}

@media (max-width: 768px) {
    .si-product-search {
        grid-template-columns: 1fr;
    }
}

/* Billing document builder & shared barcode fields */
.billing-item-lookup-grid {
    align-items: end;
}

.billing-barcode-field-wrap .form-label {
    display: block;
    margin-bottom: 6px;
}

.billing-barcode-field .form-control,
.billing-barcode-field .bq-form-control {
    min-height: 46px;
    border-radius: 8px 0 0 8px;
}

.billing-item-lookup-grid .module-button-secondary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

@media (max-width: 768px) {
    .billing-item-lookup-grid {
        grid-template-columns: 1fr !important;
    }

    .billing-item-lookup-grid .module-button-secondary {
        width: 100%;
    }

    .billing-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .billing-quick-actions .module-button-secondary {
        width: 100%;
        min-height: 42px;
    }
}

.pos-quick-field--sku-scan .pos-input-group {
    margin-top: 4px;
}

.pos-quick-field--sku-scan .pos-input-btn--camera {
    min-height: 42px;
    padding: 0 12px;
}

@media (max-width: 520px) {
    .pos-quick-field-row {
        grid-template-columns: 1fr;
    }
}

/* ─── POS mobile / tablet layout (billing counter) ─── */
.pos-scan-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.pos-scan-field .pos-input {
    flex: 1;
    min-width: 0;
    width: auto;
    min-height: 44px;
    height: 44px;
}

.pos-scan-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--pos-maroon, #1e40af) 25%, transparent);
    border-radius: 10px;
    background: var(--pos-chip-grad, linear-gradient(145deg, #2563eb 0%, #1e40af 100%));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--pos-maroon, #1e40af) 22%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.pos-scan-now-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 4px 12px rgba(107, 21, 53, 0.22);
}

.pos-scan-now-btn:active {
    transform: scale(0.96);
}

.pos-scan-now-btn i {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1;
}

.pos-scan-now-btn__label {
    display: none;
}

body.pos-send-bill-open {
    overflow: hidden;
}

.pos-send-bill-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pos-send-bill-modal[hidden] {
    display: none !important;
}

.pos-send-bill-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 10, 18, 0.55);
    backdrop-filter: blur(3px);
}

.pos-send-bill-modal__sheet {
    position: relative;
    width: min(100%, 420px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 22px 20px 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(107, 21, 53, 0.25);
    text-align: center;
}

.pos-send-bill-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    cursor: pointer;
}

.pos-send-bill-modal__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f8ee;
    color: var(--pos-green);
    font-size: 1.5rem;
}

.pos-send-bill-modal__title {
    margin: 0 0 6px;
    font-size: 1.2rem;
    color: var(--pos-maroon);
}

.pos-send-bill-modal__subtitle,
.pos-send-bill-modal__customer {
    margin: 0 0 8px;
    font-size: 0.92rem;
    color: var(--pos-text);
}

.pos-send-bill-modal__customer {
    font-weight: 700;
}

.pos-send-bill-modal__hint {
    margin: 0 0 16px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--pos-muted);
}

.pos-send-bill-modal__icon.is-loading {
    background: #fff4e8;
    color: #c9921a;
}

.pos-send-bill-modal__icon.is-error {
    background: #fdecec;
    color: #c62828;
}

.pos-send-bill-modal__results {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    text-align: left;
}

.pos-send-bill-modal__result {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pos-send-bill-modal__result.is-ok {
    background: #e8f8ee;
    color: #1b7f45;
}

.pos-send-bill-modal__result.is-fail {
    background: #fdecec;
    color: #c62828;
}

.pos-send-bill-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pos-send-bill-modal__btn {
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pos-send-bill-modal__btn--wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.pos-send-bill-modal__btn--sms {
    background: var(--pos-chip-grad, linear-gradient(135deg, #2563eb, #1e40af));
}

.pos-send-bill-modal__btn--both {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--pos-maroon), var(--pos-maroon-light));
}

.pos-send-bill-modal__skip {
    border: none;
    background: transparent;
    color: var(--pos-muted);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .pos-scan-now-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .pos-scan-field .pos-input {
        min-height: 42px;
        height: 42px;
    }

    .pos-send-bill-modal {
        align-items: flex-end;
        padding: 0;
    }

    .pos-send-bill-modal__sheet {
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 1024px) {
    .pos-app--fullscreen {
        padding: 10px 10px calc(84px + env(safe-area-inset-bottom, 0px));
    }

    /* Cart table overflows on tablet — use cards earlier */
    .pos-cart-table {
        display: none;
    }

    .pos-cart-cards {
        display: block;
    }

    .pos-table-wrap:has(.pos-cart-cards) {
        border: none;
        overflow: visible;
    }

    .pos-cart-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pos-cart-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .pos-cart-actions .pos-action-btn {
        min-height: 40px;
        justify-content: center;
        text-align: center;
        font-size: 0.65rem;
        padding: 8px 4px;
    }

    .pos-cart-card {
        overflow: hidden;
    }

    .pos-cart-card-head {
        flex-wrap: wrap;
    }

    .pos-cart-card-head > div {
        min-width: 0;
    }

    .pos-cart-card-head strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pos-cart-card-foot {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }

    .pos-cart-card-foot .pos-disc-cell {
        flex-wrap: wrap;
        justify-content: center;
        min-width: 0;
        width: 100%;
    }

    .pos-cart-card-attrs {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .pos-cart-card-attrs .pos-mini-input {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 120px;
        justify-self: center;
    }

    .pos-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--pos-maroon), var(--pos-maroon-dark));
        color: #fff;
    }

    .pos-topbar-title,
    .pos-topbar-sub {
        color: #fff;
    }

    .pos-topbar-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .pos-meta-block {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 8px 10px;
    }

    .pos-meta-label {
        color: rgba(255, 255, 255, 0.75);
    }

    .pos-meta-block strong {
        color: #fff;
    }

    .pos-bill-badge {
        grid-column: 1 / -1;
    }

    .pos-topbar-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pos-topbar-actions .pos-chip-btn {
        justify-content: center;
        min-height: 42px;
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .pos-chip-accent {
        background: linear-gradient(135deg, #f0b429, #d49a12) !important;
        border: none !important;
        color: #fff !important;
    }

    .pos-scan-panel {
        border: 2px solid var(--pos-pink-soft);
        box-shadow: var(--pos-shadow);
    }

    .pos-search-row {
        gap: 10px;
    }

    .pos-categories-scroll {
        gap: 10px;
        padding-bottom: 4px;
    }

    .pos-category-card {
        width: auto;
        flex-shrink: 0;
        padding: 7px 12px;
    }

    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .pos-product-card {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 12px 12px 10px;
        min-height: 0;
        gap: 0;
        min-width: 0;
        overflow: visible;
    }

    .pos-product-card-thumb {
        display: none;
    }

    .pos-product-card-body {
        min-width: 0;
    }

    .pos-product-card-body strong {
        font-size: 0.78rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        padding-top: 1px;
    }

    .pos-product-card-body small {
        font-size: 0.72rem;
    }

    .pos-workspace {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cart"
            "summary";
        gap: 12px;
    }

    .pos-summary-panel {
        position: static;
        top: auto;
        z-index: auto;
        box-shadow: var(--pos-shadow);
    }

    .pos-grand-total {
        padding: 12px;
    }

    .pos-grand-amount {
        font-size: 1.45rem;
    }

    .pos-bottom-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pos-bottom-grid > .pos-panel {
        min-height: 0;
        height: auto;
        overflow: visible;
    }

    .pos-recent-panel {
        display: flex;
        flex-direction: column;
        margin-bottom: 4px;
        overflow: hidden;
        height: auto;
        max-height: none;
    }

    .pos-recent-panel .pos-table-wrap,
    .pos-recent-panel .pos-recent-bills-wrap {
        max-height: none !important;
        overflow: visible !important;
        height: auto;
        flex: 1 1 auto;
    }

    .pos-recent-panel .pos-recent-table,
    .pos-recent-panel .pos-recent-table > tbody {
        display: block;
        width: 100%;
        height: auto;
    }

    .pos-customer-panel {
        margin-bottom: 4px;
    }

    .pos-payment-panel {
        margin-bottom: 12px;
    }

    .pos-pay-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pos-pay-tab {
        min-height: 48px;
        border-radius: 12px;
        font-size: 0.78rem;
    }

    .pos-pay-actions {
        position: static;
        z-index: auto;
        background: transparent;
        padding: 0;
        backdrop-filter: none;
    }

    .pos-pay-actions .pos-btn {
        min-height: 50px;
        font-size: 0.85rem;
    }

    .pos-cart-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .pos-action-btn {
        min-height: 38px;
        font-size: 0.62rem;
        padding: 6px 4px;
    }

    .pos-customer-fields {
        grid-template-columns: 1fr;
    }

    .dataTables_wrapper .pos-recent-table {
        margin-bottom: 0;
    }

    .pos-recent-panel + .pos-customer-panel,
    .pos-customer-panel + .pos-payment-panel {
        margin-top: 0;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .pos-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-cart-actions {
        grid-template-columns: 1fr;
    }
}

/* ─── POS mobile / tablet section order ─── */
@media (max-width: 1024px) {
    .pos-app--fullscreen {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .pos-workspace {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cart"
            "summary";
        gap: 12px;
    }

    .pos-bottom-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        grid-template-areas: none;
        align-items: stretch;
    }

    .pos-customer-panel,
    .pos-payment-panel,
    .pos-recent-panel {
        grid-area: auto;
        width: 100%;
    }

    .pos-payment-panel {
        margin-bottom: 12px;
    }

    .pos-recent-panel {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: auto;
        max-height: none;
        margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .pos-recent-panel .pos-checkout-head {
        flex-shrink: 0;
    }

    .pos-recent-panel .pos-table-wrap,
    .pos-recent-panel .pos-recent-bills-wrap {
        max-height: none !important;
        overflow: visible !important;
        height: auto;
        flex: 0 0 auto;
    }

    .pos-recent-panel .pos-recent-table,
    .pos-recent-panel .pos-recent-table > tbody {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    .pos-recent-panel .pos-recent-table tbody tr {
        height: auto !important;
    }

    .pos-summary-panel {
        position: static;
        top: auto;
        z-index: auto;
    }
}

/* ─── POS confirm modal ─── */
body.pos-confirm-open {
    overflow: hidden;
}

.pos-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pos-confirm-modal[hidden] {
    display: none !important;
}

.pos-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 10, 18, 0.55);
    backdrop-filter: blur(3px);
}

.pos-confirm-modal__sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 24px 20px 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(107, 21, 53, 0.28);
    text-align: center;
    animation: posConfirmIn 0.22s ease-out;
}

@keyframes posConfirmIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.pos-confirm-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--pos-pink-soft, #fce8f0);
    color: var(--pos-maroon, #6b1535);
    cursor: pointer;
}

.pos-confirm-modal__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fce8f0;
    color: var(--pos-maroon, #6b1535);
    font-size: 1.45rem;
}

.pos-confirm-modal__icon--print {
    background: #fce8f0;
    color: var(--pos-maroon, #6b1535);
}

.pos-confirm-modal__icon--whatsapp {
    background: #e8f8ee;
    color: #1f9d55;
}

.pos-confirm-modal__icon--danger {
    background: #fdecec;
    color: #c62828;
}

.pos-confirm-modal__title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
}

.pos-confirm-modal__message {
    margin: 0 0 16px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--pos-text, #2a1a22);
}

.pos-confirm-modal__meta {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff7fa 0%, #f8eef2 100%);
    border: 1px solid #f0d5e0;
    text-align: left;
}

.pos-confirm-modal__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #edd0dc;
}

.pos-confirm-modal__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pos-confirm-modal__row:first-child {
    padding-top: 0;
}

.pos-confirm-modal__row dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted, #8a6b78);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pos-confirm-modal__row dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-text, #2a1a22);
    text-align: right;
    word-break: break-word;
}

.pos-confirm-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pos-confirm-modal__btn {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    padding: 10px 14px;
}

.pos-confirm-modal__btn--cancel {
    background: #fff;
    border-color: #e4ccd6;
    color: var(--pos-maroon, #6b1535);
}

.pos-confirm-modal__btn--ok {
    background: var(--pos-maroon, #6b1535);
    color: #fff;
    box-shadow: 0 8px 18px rgba(107, 21, 53, 0.28);
}

.pos-confirm-modal__btn--ok:hover {
    filter: brightness(1.05);
}

.pos-confirm-modal__btn--cancel:hover {
    background: #fff7fa;
}

@media (max-width: 640px) {
    .pos-confirm-modal {
        align-items: flex-end;
        padding: 0;
    }

    .pos-confirm-modal__sheet {
        width: 100%;
        max-height: min(92vh, 100%);
        border-radius: 20px 20px 0 0;
        padding: 22px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        animation: posConfirmSheetUp 0.24s ease-out;
    }

    @keyframes posConfirmSheetUp {
        from { opacity: 0; transform: translateY(24px); }
        to { opacity: 1; transform: none; }
    }

    .pos-confirm-modal__actions {
        grid-template-columns: 1fr;
    }

    .pos-confirm-modal__btn--ok {
        order: -1;
    }

    .pos-confirm-modal__title {
        font-size: 1.15rem;
        padding-right: 28px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .pos-confirm-modal__sheet {
        width: min(100%, 480px);
    }
}
