/* pos.css */
/* 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);
    }
}

/* boutique-dashboard.css */
/* Boutique dashboard â€” matches POS maroon/pink theme */

/* Shared spacing scale (billing + product dashboards) */
.bq-app,
.pos-app,
.pos-main {
    --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;
}

.bq-app {
    flex: 1;
    padding: var(--bq-space-lg) 22px var(--bq-space-md);
    max-width: 1600px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.bq-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    background: linear-gradient(90deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    padding: 16px 20px;
    border-radius: var(--pos-radius);
    margin-bottom: 18px;
    box-shadow: var(--pos-shadow);
}

.bq-topbar h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bq-topbar p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    opacity: 0.88;
}

.bq-topbar-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.bq-stat-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    padding: 18px;
    box-shadow: var(--pos-shadow);
    display: grid;
    gap: 8px;
}

.bq-stat-card.is-accent {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light));
    color: #fff;
    border-color: transparent;
}

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

.bq-stat-card.is-accent .bq-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.bq-stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pos-maroon);
}

.bq-stat-card.is-accent .bq-stat-value {
    color: #fff;
}

.bq-stat-note {
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.bq-stat-card.is-accent .bq-stat-note {
    color: rgba(255, 255, 255, 0.75);
}

.bq-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 1rem;
}

.bq-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.bq-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.bq-module-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    padding: 18px;
    box-shadow: var(--pos-shadow);
    display: grid;
    gap: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.bq-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(107, 21, 53, 0.12);
}

.bq-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.bq-module-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--pos-icon-grad, linear-gradient(145deg, #a8c8f5, #7eb4f7));
    color: var(--pos-maroon);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bq-module-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-module-desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--pos-muted);
    line-height: 1.5;
}

.bq-board {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.bq-board-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

/* Billing dashboard layout */
.bq-dashboard {
    max-width: 1400px;
}

.bq-dashboard-topbar .bq-dashboard-topbar-text {
    min-width: 0;
    flex: 1;
}

.bq-dashboard-topbar .bq-topbar-actions {
    flex-wrap: wrap;
}

.bq-chip-label {
    white-space: nowrap;
}

.bq-dashboard-kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.bq-dashboard-kpi-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    padding: 18px 20px;
    box-shadow: var(--pos-shadow);
    display: grid;
    gap: 6px;
    min-width: 0;
}

.bq-dashboard-kpi-card.is-hero {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light));
    border-color: transparent;
    color: #fff;
}

.bq-dashboard-kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pos-muted);
}

.bq-dashboard-kpi-card.is-hero .bq-dashboard-kpi-label {
    color: rgba(255, 255, 255, 0.82);
}

.bq-dashboard-kpi-value {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--pos-maroon);
    word-break: break-word;
}

.bq-dashboard-kpi-card.is-hero .bq-dashboard-kpi-value {
    color: #fff;
}

.bq-dashboard-kpi-meta {
    font-size: 0.76rem;
    color: var(--pos-muted);
    line-height: 1.4;
}

.bq-dashboard-kpi-card.is-hero .bq-dashboard-kpi-meta {
    color: rgba(255, 255, 255, 0.78);
}

.bq-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.bq-dashboard-metric {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    box-shadow: var(--pos-shadow);
    min-width: 0;
}

.bq-dashboard-metric>i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bq-dashboard-metric>div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.bq-dashboard-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pos-muted);
}

.bq-dashboard-metric strong {
    font-size: 0.95rem;
    color: var(--pos-maroon);
    line-height: 1.2;
}

.bq-dashboard-metric small {
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-dashboard-insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.bq-dashboard-panel {
    margin-bottom: 0;
}

.bq-panel-body {
    padding: var(--bq-space-md) var(--bq-space-lg) var(--bq-space-lg);
}

.bq-dashboard-mix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bq-mix-title {
    display: block;
    font-size: 0.82rem;
    color: var(--pos-maroon);
    margin: 0 0 8px;
    font-weight: 700;
}

.bq-dashboard-modules {
    margin-bottom: 18px;
}

.bq-dashboard-modules-head {
    margin-bottom: 12px;
}

.bq-dashboard-modules-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-dashboard-modules-head p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--pos-muted);
}

.bq-dashboard-module-grid {
    margin-bottom: 0;
}

.bq-module-open {
    width: fit-content;
}

.bq-dashboard-recent {
    margin-bottom: 18px;
}

.bq-empty-note {
    font-size: 0.82rem;
    color: var(--pos-muted);
    margin: 0;
}

.bq-panel-pad {
    padding: var(--bq-space-md) var(--bq-space-lg);
}

.bq-dues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    padding: 16px 18px;
}

.bq-due-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fdf8fa;
}

.bq-due-card strong {
    display: block;
    color: var(--pos-maroon);
    font-size: 0.88rem;
}

.bq-empty-note {
    margin: 0;
    padding: 16px 18px;
    font-size: 0.85rem;
    color: var(--pos-muted);
}

.bq-table-empty {
    text-align: center;
    padding: 24px 14px !important;
    color: var(--pos-muted);
}

.bq-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bq-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pos-maroon);
    cursor: pointer;
}

.bq-form-aside {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    font-size: 0.82rem;
    color: var(--pos-muted);
}

.bq-form-aside p {
    margin: 0 0 6px;
}

.bq-form-shell .btn-primary {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .bq-board-2 {
        grid-template-columns: 1fr;
    }
}

.bq-panel {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
    overflow: hidden;
}

.bq-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(180deg, #fff, var(--pos-pink-soft));
}

.bq-panel-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

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

.bq-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-pink);
    text-decoration: none;
}

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

.bq-table-wrap {
    overflow-x: auto;
}

.bq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 560px;
}

.bq-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bq-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pos-border);
    vertical-align: middle;
    color: var(--pos-text);
}

.bq-table tbody tr:hover {
    background: color-mix(in srgb, var(--pos-pink-soft) 50%, #fff);
}

.bq-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-badge-paid,
.bq-badge-success {
    background: #e8f8ee;
    color: var(--pos-green);
}

.bq-badge-pending,
.bq-badge-warning {
    background: #fff4e5;
    color: #b86e00;
}

.bq-badge-info {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.bq-badge-danger {
    background: #fde8ee;
    color: #c0392b;
}

.bq-mix-list {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}

.bq-mix-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdf8fa;
    font-size: 0.85rem;
}

.bq-mix-row strong {
    color: var(--pos-maroon);
}

.bq-chart-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
    align-items: end;
}

.bq-chart-bar {
    display: grid;
    gap: 6px;
    text-align: center;
}

.bq-chart-track {
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bq-chart-fill {
    width: 100%;
    max-width: 36px;
    height: var(--h, 20%);
    min-height: 8px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--pos-pink), var(--pos-maroon));
}

.bq-chart-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-chart-val {
    font-size: 0.68rem;
    color: var(--pos-muted);
}

.bq-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 18px;
}

.bq-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--pos-border);
    color: var(--pos-maroon);
    background: #fff;
}

.bq-quick-btn.primary {
    background: linear-gradient(135deg, var(--pos-pink), #ff6eb4);
    color: #fff;
    border-color: transparent;
}

.bq-progress-list {
    padding: 16px 18px;
    display: grid;
    gap: 14px;
}

.bq-progress-item {
    display: grid;
    gap: 6px;
}

.bq-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.bq-progress-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--pos-pink-soft);
    overflow: hidden;
}

.bq-progress-bar span {
    display: block;
    height: 100%;
    width: var(--w, 0%);
    border-radius: 99px;
    background: linear-gradient(90deg, var(--pos-pink), var(--pos-maroon));
}

.bq-product-list {
    padding: 12px 18px 18px;
    display: grid;
    gap: 10px;
}

.bq-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--pos-border);
}

.bq-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--pos-icon-grad, linear-gradient(145deg, #bfdbfe, #60a5fa));
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--pos-maroon);
    flex-shrink: 0;
}

.bq-product-info {
    flex: 1;
    min-width: 0;
}

.bq-product-info strong {
    display: block;
    font-size: 0.85rem;
}

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

.pos-footer-highlight {
    color: var(--pos-pink) !important;
}

.pos-footer-highlight strong {
    color: var(--pos-maroon) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .bq-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-dashboard-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bq-dashboard-insights {
        grid-template-columns: 1fr;
    }

    .bq-dashboard-mix {
        grid-template-columns: 1fr;
    }

    .bq-module-grid,
    .bq-dashboard-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-board {
        grid-template-columns: 1fr;
    }
}

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

    .bq-stat-grid,
    .bq-module-grid,
    .bq-quick-grid,
    .bq-dashboard-kpi,
    .bq-dashboard-module-grid {
        grid-template-columns: 1fr;
    }

    .bq-dashboard-metrics {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .bq-dashboard-metric {
        flex: 0 0 min(78vw, 220px);
        scroll-snap-align: start;
    }

    .bq-dashboard-insights,
    .bq-dashboard-mix {
        grid-template-columns: 1fr;
    }

    .bq-board-2 {
        grid-template-columns: 1fr;
    }

    .bq-chart-bars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bq-dashboard-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-topbar-actions,
    .bq-dashboard-topbar .bq-topbar-actions {
        margin-left: 0;
        width: 100%;
    }

    .bq-panel-head,
    .bq-dashboard .bq-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bq-filter-bar,
    .bq-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-legacy-body .module-card-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bq-legacy-header .header-actions {
        width: 100%;
    }

    .bq-legacy-header .module-button,
    .bq-legacy-header .module-button-secondary,
    .bq-legacy-header .module-button-danger {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .bq-legacy-body .module-inline-filter,
    .bq-legacy-body .module-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-workspace-bar {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .bq-chart-bars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Sidebar dress logo */
.pos-sidebar-logo-dress {
    font-size: 1.1rem;
}

/* Forms, filters & DataTables in boutique pages */
.bq-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pos-border);
    align-items: center;
}

.bq-documents-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
    gap: 10px;
    align-items: center;
}

.bq-documents-filter-bar .bq-form-control {
    min-width: 0;
    width: 100%;
}

.bq-documents-filter-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.bq-documents-table-wrap .bq-dt-controls {
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .bq-documents-filter-bar {
        grid-template-columns: 1fr;
    }

    .bq-documents-filter-actions {
        width: 100%;
    }

    .bq-documents-filter-actions .pos-chip-btn {
        flex: 1;
        justify-content: center;
    }
}

.bq-form-control,
.bq-filter-bar input[type="text"],
.bq-filter-bar select {
    padding: 10px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    min-width: 140px;
    background: #fff;
}

.bq-form-control:focus,
.bq-filter-bar input:focus,
.bq-filter-bar select:focus {
    outline: none;
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.bq-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    background: var(--pos-pink-soft);
    border-bottom: 1px solid var(--pos-border);
    font-size: 0.82rem;
}

.bq-cell-title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pos-text);
}

.bq-cell-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--pos-muted);
    margin-top: 2px;
}

.bq-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--pos-border);
}

.bq-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--pos-icon-grad, linear-gradient(145deg, #bfdbfe, #60a5fa));
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--pos-maroon);
    font-size: 0.9rem;
}

.bq-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Action chips on light surfaces (tables, panels, bulk bars) */
.bq-app .pos-chip-btn,
.bq-legacy-body .pos-chip-btn,
.dataTables_wrapper .pos-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff;
    color: var(--pos-maroon);
    text-decoration: none;
    line-height: 1.25;
    font-size: 0.78rem;
    font-weight: 600;
    box-sizing: border-box;
    cursor: pointer;
}

.bq-app .pos-chip-btn:hover,
.bq-legacy-body .pos-chip-btn:hover,
.dataTables_wrapper .pos-chip-btn:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-pink-mid);
    color: var(--pos-maroon);
}

.bq-app .pos-chip-btn.pos-chip-accent,
.bq-legacy-body .pos-chip-btn.pos-chip-accent,
.dataTables_wrapper .pos-chip-btn.pos-chip-accent {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    border-color: transparent;
    color: #fff;
}

.bq-app .pos-chip-btn.pos-chip-accent:hover,
.bq-legacy-body .pos-chip-btn.pos-chip-accent:hover,
.dataTables_wrapper .pos-chip-btn.pos-chip-accent:hover {
    filter: brightness(1.06);
    color: #fff;
}

.bq-app .pos-chip-btn.bq-btn-danger,
.bq-legacy-body .pos-chip-btn.bq-btn-danger,
.dataTables_wrapper .pos-chip-btn.bq-btn-danger {
    background: #fde8ee;
    color: #c0392b;
    border-color: #f5c6cb;
}

.bq-app .pos-chip-btn.bq-btn-danger:hover,
.bq-legacy-body .pos-chip-btn.bq-btn-danger:hover,
.dataTables_wrapper .pos-chip-btn.bq-btn-danger:hover {
    background: #fcd5de;
    color: #a93226;
    border-color: #f0b4be;
}

/* Ghost chips only on dark header bars — not filter bars on light pages */
.bq-app .bq-topbar .pos-chip-btn,
.bq-app .pos-topbar .pos-chip-btn,
.bq-app .bq-page-header .pos-chip-btn:not(.pos-chip-accent):not(.bq-btn-danger),
.pos-topbar .pos-chip-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.bq-app .bq-topbar .pos-chip-btn:hover,
.bq-app .pos-topbar .pos-chip-btn:hover,
.bq-app .bq-page-header .pos-chip-btn:not(.pos-chip-accent):not(.bq-btn-danger):hover,
.pos-topbar .pos-chip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.bq-app .bq-topbar .pos-chip-btn.pos-chip-accent,
.bq-app .pos-topbar .pos-chip-btn.pos-chip-accent,
.bq-app .bq-page-header .pos-chip-btn.pos-chip-accent,
.pos-topbar .pos-chip-btn.pos-chip-accent {
    background: var(--pos-maroon-dark);
    border-color: transparent;
    color: #fff;
}

.bq-action-row form {
    margin: 0;
    display: inline-flex;
}

.bq-pagination {
    padding: 14px 18px;
}

.bq-pagination nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bq-pagination a,
.bq-pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--pos-border);
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--pos-maroon);
}

.bq-pagination span[aria-current="page"] {
    background: var(--pos-maroon);
    color: #fff;
    border-color: var(--pos-maroon);
}

/* DataTables â€” all boutique / billing modules (no Bootstrap dependency) */
.dataTables_wrapper {
    width: 100%;
    clear: both;
}

.dataTables_wrapper::after {
    content: '';
    display: block;
    clear: both;
}

.bq-dt-controls,
.bq-dt-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 12px 18px;
    font-size: 0.82rem;
    background: #fff;
    border-top: 1px solid var(--pos-border);
}

.bq-table-wrap .dataTables_wrapper>.bq-dt-controls {
    border-top: none;
    border-bottom: 1px solid var(--pos-border);
}

.bq-dt-controls .dataTables_length,
.bq-dt-controls .dataTables_filter,
.bq-dt-meta .dataTables_info,
.bq-dt-meta .dataTables_paginate {
    float: none !important;
    margin: 0 !important;
}

.bq-dt-controls .dataTables_length label,
.bq-dt-controls .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    font-weight: 600;
    color: var(--pos-muted);
}

.bq-dt-controls .dataTables_filter {
    margin-left: auto !important;
}

.bq-dt-controls .dataTables_filter input,
.bq-dt-controls .dataTables_length select {
    float: none !important;
    margin: 0 !important;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 38px;
    font-size: 0.82rem;
    color: var(--pos-text, #1a1a1a);
    background: #fff;
}

.bq-dt-controls .dataTables_filter input {
    min-width: min(100%, 220px);
    width: 220px;
}

.bq-dt-controls .dataTables_filter input:focus,
.bq-dt-controls .dataTables_length select:focus {
    outline: none;
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 2px var(--pos-pink-soft);
}

.bq-dt-meta .dataTables_info {
    color: var(--pos-muted);
    font-weight: 600;
    padding-top: 0;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Bootstrap5 DataTables uses <li class="paginate_button page-item"> — keep the LI unboxed */
.dataTables_wrapper .dataTables_paginate .pagination .page-item,
.dataTables_wrapper .dataTables_paginate li.paginate_button {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    float: none !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item .page-link,
.dataTables_wrapper .dataTables_paginate a.paginate_button,
.dataTables_wrapper .dataTables_paginate > a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    min-height: 2.1rem;
    padding: 6px 12px !important;
    margin: 0 !important;
    border: 1px solid var(--pos-border) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--pos-maroon) !important;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    list-style: none;
}

.dataTables_wrapper .dataTables_paginate > span {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item .page-link:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button:hover,
.dataTables_wrapper .dataTables_paginate > a:hover {
    background: var(--pos-pink-soft) !important;
    border-color: var(--pos-pink) !important;
    color: var(--pos-maroon) !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button.current,
.dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover {
    background: var(--pos-maroon) !important;
    border-color: var(--pos-maroon) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .pagination .page-item.disabled .page-link:hover,
.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover {
    opacity: 0.45;
    cursor: default;
    background: #f8f8f8 !important;
    border-color: var(--pos-border) !important;
    color: var(--pos-muted) !important;
    pointer-events: none;
}

.pos-recent-panel .bq-panel-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Responsive tables â†’ cards (all modules) */
@media (max-width: 1024px) {

    .bq-table-wrap,
    .module-table-wrap,
    .module-table-wrap.tight {
        overflow: visible;
    }

    table.bq-table-responsive,
    table.bq-table-responsive > tbody,
    table.dataTable.bq-table-responsive,
    table.dataTable.bq-table-responsive > tbody,
    .bq-legacy-body table.display.bq-table-responsive,
    .bq-legacy-body table.display.bq-table-responsive > tbody,
    .bq-legacy-body table.bq-table-responsive,
    .bq-legacy-body table.bq-table-responsive > tbody,
    .pos-recent-table.bq-table-responsive,
    .pos-recent-table.bq-table-responsive > tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0;
    }

    table.bq-table-responsive thead,
    table.dataTable.bq-table-responsive thead,
    .bq-legacy-body table.display.bq-table-responsive thead,
    .bq-legacy-body table.bq-table-responsive thead,
    .pos-recent-table.bq-table-responsive thead {
        display: none !important;
    }

    table.bq-table-responsive tbody tr,
    table.dataTable.bq-table-responsive tbody tr,
    .bq-legacy-body table.display.bq-table-responsive tbody tr,
    .bq-legacy-body table.bq-table-responsive tbody tr,
    .pos-recent-table.bq-table-responsive tbody tr {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 12px !important;
        border: 1px solid var(--pos-border);
        border-radius: 10px;
        padding: 10px 12px;
        background: #fff;
        box-shadow: var(--pos-shadow);
        clear: both;
    }

    table.bq-table-responsive tbody tr:last-child,
    table.dataTable.bq-table-responsive tbody tr:last-child,
    .pos-recent-table.bq-table-responsive tbody tr:last-child {
        margin-bottom: 0 !important;
    }

    table.bq-table-responsive tbody td,
    table.dataTable.bq-table-responsive tbody td,
    .bq-legacy-body table.display.bq-table-responsive tbody td,
    .bq-legacy-body table.bq-table-responsive tbody td,
    .pos-recent-table.bq-table-responsive tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        width: 100% !important;
        padding: 8px 4px;
        border: none;
        text-align: right;
        box-sizing: border-box;
        float: none !important;
        position: static !important;
    }

    table.bq-table-responsive tbody td::before,
    table.dataTable.bq-table-responsive tbody td::before,
    .bq-legacy-body table.display.bq-table-responsive tbody td::before,
    .bq-legacy-body table.bq-table-responsive tbody td::before,
    .pos-recent-table.bq-table-responsive tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.72rem;
        color: var(--pos-muted);
        text-transform: uppercase;
        text-align: left;
        flex-shrink: 0;
        max-width: 42%;
    }

    .bq-table.bq-table-responsive tbody td[data-label=""],
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label=""],
    table.dataTable.bq-table-responsive tbody td[data-label=""] {
        justify-content: flex-end;
    }

    .bq-table.bq-table-responsive tbody td[data-label=""]::before,
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label=""]::before,
    table.dataTable.bq-table-responsive tbody td[data-label=""]::before {
        content: none;
    }

    .bq-table.bq-table-responsive tbody td[data-label="Action"],
    .bq-table.bq-table-responsive tbody td[data-label="Actions"],
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Action"],
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Actions"],
    table.dataTable.bq-table-responsive tbody td[data-label="Action"],
    table.dataTable.bq-table-responsive tbody td[data-label="Actions"] {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 10px;
        border-top: 1px dashed var(--pos-border);
    }

    .bq-table.bq-table-responsive tbody td[data-label="Action"]::before,
    .bq-table.bq-table-responsive tbody td[data-label="Actions"]::before,
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Action"]::before,
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Actions"]::before,
    table.dataTable.bq-table-responsive tbody td[data-label="Action"]::before,
    table.dataTable.bq-table-responsive tbody td[data-label="Actions"]::before {
        max-width: none;
    }

    .bq-table.bq-table-responsive tbody td[data-label="Action"] .bq-action-row,
    .bq-table.bq-table-responsive tbody td[data-label="Actions"] .bq-action-row,
    .bq-table.bq-table-responsive tbody td[data-label="Action"] .table-action-row,
    .bq-table.bq-table-responsive tbody td[data-label="Actions"] .table-action-row,
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Action"] .table-action-row,
    .bq-legacy-body table.display.bq-table-responsive tbody td[data-label="Actions"] .table-action-row {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .bq-dt-controls,
    .bq-dt-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .bq-dt-controls .dataTables_filter {
        margin-left: 0 !important;
        width: 100%;
    }

    .bq-dt-controls .dataTables_length label,
    .bq-dt-controls .dataTables_filter label {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .bq-dt-controls .dataTables_filter input,
    .bq-dt-controls .dataTables_length select {
        width: 100%;
        min-width: 0;
    }

    .bq-dt-meta .dataTables_info {
        width: 100%;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center;
        width: 100%;
    }
}

/* â”€â”€â”€ Workspace header bar â”€â”€â”€ */
.bq-workspace-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 16px;
    min-height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--pos-border);
    box-shadow: 0 2px 12px rgba(107, 21, 53, 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}

.bq-workspace-bar__start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
    flex: 1 1 280px;
}

.bq-workspace-bar__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.bq-workspace-context {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-right: 12px;
    border-right: 1px solid var(--pos-border);
}

.bq-workspace-bar--single .bq-workspace-context {
    border-right: none;
    padding-right: 0;
}

.bq-workspace-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pos-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bq-workspace-eyebrow i {
    color: var(--pos-pink);
    font-size: 0.7rem;
}

.bq-workspace-current {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pos-maroon);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.bq-workspace-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    gap: 4px;
    border-radius: 999px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
}

.bq-workspace-form {
    margin: 0;
}

.bq-workspace-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--pos-maroon);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.bq-workspace-btn:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--pos-border);
}

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

.bq-workspace-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pos-maroon);
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    white-space: nowrap;
}

.bq-workspace-bar .bq-user-menu {
    margin-left: 0;
}

@media (max-width: 992px) and (min-width: 769px) {
    .bq-workspace-bar {
        padding: 10px 14px;
    }

    .bq-workspace-context {
        padding-right: 10px;
    }

    .bq-workspace-btn {
        padding: 6px 12px;
        font-size: 0.74rem;
    }

    .bq-user-menu__name {
        max-width: 88px;
    }
}

/* â”€â”€â”€ User profile dropdown â”€â”€â”€ */
.bq-user-menu {
    position: relative;
    flex-shrink: 0;
}

.bq-user-menu__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 4px 4px 4px 4px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.bq-user-menu__trigger--with-name {
    padding: 4px 10px 4px 4px;
    width: auto;
}

.bq-user-menu__name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-user-menu__caret {
    font-size: 0.65rem;
    color: var(--pos-muted);
    transition: transform 0.15s;
}

.bq-user-menu.is-open .bq-user-menu__caret {
    transform: rotate(180deg);
}

.bq-user-menu__trigger:hover,
.bq-user-menu.is-open .bq-user-menu__trigger {
    border-color: var(--pos-pink);
    box-shadow: 0 4px 14px rgba(107, 21, 53, 0.12);
}

.bq-user-menu__avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.bq-user-menu__avatar--lg {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.bq-user-menu__panel {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 8px);
    width: min(92vw, 300px);
    min-width: 260px;
    overflow: hidden;
    border-radius: var(--pos-radius);
    background: #fff;
    border: 1px solid var(--pos-border);
    box-shadow: 0 16px 40px rgba(107, 21, 53, 0.14);
    z-index: 120;
}

.bq-user-menu__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--pos-pink-soft) 0%, #fff 100%);
    border-bottom: 1px solid var(--pos-border);
}

.bq-user-menu__meta {
    min-width: 0;
    flex: 1;
}

.bq-user-menu__meta strong {
    display: block;
    color: var(--pos-maroon);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.bq-user-menu__role {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pos-maroon);
    background: #fff;
    border: 1px solid var(--pos-border);
}

.bq-user-menu__nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
}

.bq-user-menu__footer {
    padding: 8px;
    border-top: 1px solid var(--pos-border);
    background: var(--pos-pink-soft);
}

.bq-user-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--pos-maroon);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.bq-user-menu__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    color: var(--pos-maroon);
    font-size: 0.9rem;
}

.bq-user-menu__label {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.bq-user-menu__arrow {
    font-size: 0.65rem;
    color: var(--pos-muted);
    opacity: 0.6;
    transition: transform 0.15s, opacity 0.15s;
}

.bq-user-menu__item:hover,
.bq-user-menu__item:focus-visible {
    background: var(--pos-pink-soft);
    outline: none;
}

.bq-user-menu__item:hover .bq-user-menu__arrow {
    opacity: 1;
    transform: translateX(2px);
    color: var(--pos-pink);
}

.bq-user-menu__item--logout {
    justify-content: flex-start;
    color: #b42318;
}

.bq-user-menu__icon--logout {
    background: #fff;
    border-color: rgba(180, 35, 24, 0.2);
    color: #b42318;
}

.bq-user-menu__item--logout:hover,
.bq-user-menu__item--logout:focus-visible {
    background: #fff;
    color: #991b1b;
}

.bq-user-menu__item--logout:hover .bq-user-menu__icon--logout {
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.35);
}

.bq-user-menu__logout-form {
    margin: 0;
}

.bq-user-menu.is-open .bq-user-menu__trigger {
    background: var(--pos-pink-soft);
}

@media (max-width: 992px) {
    /* Escape sticky/overflow clipping on tablets & phones */
    .bq-user-menu__panel {
        position: fixed;
        top: 62px;
        right: 10px;
        left: auto;
        width: min(calc(100vw - 20px), 300px);
        min-width: 240px;
        z-index: 400;
    }
}

@media (max-width: 640px) {
    .bq-user-menu__panel {
        right: 10px;
        width: min(calc(100vw - 20px), 300px);
        min-width: 240px;
    }

    .bq-user-menu__name {
        display: none;
    }

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

    .bq-user-menu__caret {
        display: none;
    }
}

/* â”€â”€â”€ Mobile layout containment â”€â”€â”€ */
@media (max-width: 768px) {
    .gc-theme-strip,
    .gc-theme-strip--compact {
        margin: 0 0 8px;
        padding: 10px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .pos-theme-options {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .bq-app,
    .si-app.bq-app {
        padding: 12px;
    }

    .bq-topbar,
    .si-app .bq-topbar {
        padding: 14px;
        margin-bottom: 14px;
        width: 100%;
        max-width: 100%;
    }

    .bq-topbar h1 {
        font-size: 1.05rem;
        flex-wrap: wrap;
    }

    .bq-topbar p {
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .bq-topbar-actions {
        width: 100%;
    }

    .bq-topbar-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .si-layout,
    .si-main {
        min-width: 0;
        max-width: 100%;
    }

    .si-section.bq-panel {
        overflow: hidden;
        max-width: 100%;
    }

    .si-section-head {
        padding: 14px 16px;
    }

    .si-section.bq-panel> :not(.si-section-head) {
        padding: 0 16px 18px;
    }

    .si-section-head h2 {
        font-size: 0.95rem;
    }

    .si-section-head h2 i {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
    }

    .si-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .si-items-table {
        min-width: 640px;
    }

    .si-app .bq-form-control,
    .si-app textarea.bq-form-control {
        min-width: 0;
        max-width: 100%;
    }

    .si-product-search .pos-chip-btn {
        width: 100%;
    }

    .pos-footer {
        padding: 12px 14px;
    }
}

.bq-flash {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.bq-flash-error {
    background: #fde8ee;
    color: #c0392b;
}

.bq-flash-info {
    background: #eef4ff;
    color: #1e40af;
}

.bq-flash-success {
    background: #e8f8ee;
    color: var(--pos-green);
}

/* â”€â”€â”€ Connected dashboards banner â”€â”€â”€ */
.bq-connect-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: var(--pos-radius);
    background: linear-gradient(135deg, #fff0f7, #fff);
    border: 1px solid var(--pos-border);
    box-shadow: var(--pos-shadow);
}

.bq-connect-banner.is-admin {
    background: linear-gradient(135deg, #fff5f9, #ffe8f2);
}

.bq-connect-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pos-pink);
    margin-bottom: 4px;
}

.bq-connect-copy h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--pos-maroon);
}

.bq-connect-copy p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--pos-muted);
}

.bq-connect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* â”€â”€â”€ Legacy admin module classes â†’ boutique theme â”€â”€â”€ */
.bq-mobile-menu {
    display: none;
    margin-bottom: 12px;
}

.bq-legacy-header .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, var(--pos-maroon), var(--pos-maroon-light));
    color: #fff;
    padding: 16px 20px;
    border-radius: var(--pos-radius);
    margin-bottom: 16px;
    box-shadow: var(--pos-shadow);
}

.bq-legacy-header .page-header h2,
.bq-legacy-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff !important;
}

.bq-legacy-header .page-header p,
.bq-legacy-header p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.88) !important;
}

.bq-legacy-header .header-actions,
.bq-legacy-header .module-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-legacy-body .module-shell,
.bq-legacy-body .py-8,
.bq-legacy-body .mt-6 {
    padding: 0 !important;
    margin: 0 !important;
}

.bq-legacy-body .module-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
    overflow: hidden;
    margin-bottom: 16px;
}

.bq-legacy-body .module-card-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(180deg, #fff, var(--pos-pink-soft));
}

.bq-legacy-body .module-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-legacy-body .module-card-subtitle {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.bq-legacy-body .module-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    background: var(--pos-pink-soft);
    border-bottom: 1px solid var(--pos-border);
}

.bq-legacy-body .module-button,
.bq-legacy-body .header-actions .module-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--pos-pink), #ff6eb4);
    color: #fff;
}

.bq-legacy-body .module-button-secondary,
.bq-legacy-body .header-actions .module-button-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bq-legacy-body .module-card .module-button-secondary {
    background: #fff;
    color: var(--pos-maroon);
    border: 1px solid var(--pos-border);
}

.bq-legacy-body .module-button-danger {
    background: #fde8ee;
    color: #c0392b;
    border: 1px solid #f5c6cb;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.bq-legacy-body .form-control,
.bq-legacy-body .search-input,
.bq-legacy-body input[type="text"],
.bq-legacy-body input[type="email"],
.bq-legacy-body input[type="number"],
.bq-legacy-body input[type="password"],
.bq-legacy-body input[type="tel"],
.bq-legacy-body input[type="date"],
.bq-legacy-body select,
.bq-legacy-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
}

.bq-legacy-body .form-control:focus,
.bq-legacy-body input:focus,
.bq-legacy-body select:focus,
.bq-legacy-body textarea:focus {
    outline: none;
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.bq-legacy-body label,
.bq-legacy-body .input-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-muted);
    margin-bottom: 4px;
}

.bq-legacy-body .module-table-wrap,
.bq-legacy-body .module-table-wrap.tight {
    overflow-x: auto;
}

.bq-legacy-body table.display,
.bq-legacy-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.bq-legacy-body table thead th {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-legacy-body table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5eef2;
    vertical-align: middle;
}

.bq-legacy-body .table-title {
    font-weight: 700;
    color: var(--pos-text);
}

.bq-legacy-body .table-meta {
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-legacy-body .table-badge.success {
    background: #e8f8ee;
    color: var(--pos-green);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-legacy-body .table-badge.danger {
    background: #fde8ee;
    color: #c0392b;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-legacy-body .table-badge.neutral,
.bq-legacy-body .table-badge.info {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-legacy-body .table-badge.warning {
    background: #fff4e5;
    color: #b86e00;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.bq-legacy-body .table-action-row,
.bq-legacy-body .module-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bq-legacy-body .module-inline-filter,
.bq-legacy-body .module-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid var(--pos-border);
}

.bq-legacy-body .grid,
.bq-legacy-body .grid-cols-1 {
    display: grid;
    gap: 14px;
}

@media (min-width: 768px) {
    .bq-legacy-body .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bq-legacy-body .rounded-2xl.border {
    border-color: var(--pos-border) !important;
    border-radius: var(--pos-radius) !important;
}

/* â”€â”€â”€ Login page â€” simple â”€â”€â”€ */
.bq-login-simple {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--pos-text);
    background: #f5f0f3;
}

.bq-login-simple__wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.bq-login-simple__card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(107, 21, 53, 0.08);
}

.bq-login-simple__brand {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pos-border);
}

.bq-login-simple__logo,
.bq-login-simple__logo.pos-brand-logo-img--icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    padding: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 28%;
    background: #fff;
    border: 2px solid var(--pos-border);
}

.bq-login-simple__logo-fallback {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.bq-login-simple__brand h1 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-login-simple__brand p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--pos-muted);
}

.bq-login-simple__label {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bq-login-simple__label i {
    margin-right: 6px;
    color: var(--pos-maroon);
}

.bq-login-simple__choices {
    display: grid;
    gap: 10px;
}

.bq-login-simple__choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
    color: var(--pos-maroon);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: border-color 0.15s, background 0.15s;
}

.bq-login-simple__choice:hover {
    border-color: var(--pos-pink);
    background: var(--pos-pink-soft);
}

.bq-login-simple__choice i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.95rem;
}

.bq-login-simple__submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: var(--pos-maroon);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}

.bq-login-simple__submit:hover {
    opacity: 0.92;
}

.bq-login-simple__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--pos-border);
    font-size: 0.82rem;
}

.bq-login-form {
    display: grid;
    gap: 14px;
}

.bq-field {
    display: grid;
    gap: var(--bq-field-gap);
}

.bq-field span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-muted);
}

.bq-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

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

.bq-field-error {
    color: #c0392b;
    font-size: 0.78rem;
    margin-top: -8px;
}

.bq-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--pos-muted);
}

.bq-flash-success {
    padding: 10px 14px;
    border-radius: 10px;
    background: #e8f8ee;
    color: var(--pos-green);
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .bq-login-simple__card {
        padding: 24px 20px;
    }
}

/* legacy login v2 â€” unused, kept minimal for reference */
.bq-login-v2 {
    display: none;
}

.pos-sidebar-portals-label {
    display: block;
    padding: 8px 14px 0;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
    color: #fff;
}

/* â”€â”€â”€ Separate Product vs Billing sidebars â”€â”€â”€ */
.pos-sidebar-portal-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pos-sidebar-brand--product .pos-sidebar-logo {
    background: var(--pos-logo-bg);
}

.pos-sidebar-brand--billing .pos-sidebar-logo {
    background: var(--pos-logo-bg);
}

.bq-portal-product .pos-sidebar {
    background: var(--pos-sidebar-bg) !important;
}

.bq-portal-billing .pos-sidebar {
    background: var(--pos-sidebar-bg) !important;
}

.pos-nav-section {
    display: block;
    padding: 14px 14px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
    color: rgba(255, 255, 255, 0.85);
}

.pos-sidebar-interconnect {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pos-nav-interconnect {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    justify-content: space-between;
}

.pos-nav-interconnect:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

.pos-nav-arrow {
    opacity: 0.7;
    font-size: 0.75rem;
}

/* Sidebar submenu â€” Billing Reports */
.pos-nav-group {
    margin: 6px 0;
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pos-nav-group--reports {
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pos-nav-group--reports.is-open {
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pos-nav-group-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.pos-nav-group-main {
    flex: 1;
    min-width: 0;
    width: auto !important;
    padding: 10px 8px 10px 12px !important;
    border-radius: 10px 0 0 10px;
}

/* Billing Reports â€” sidebar submenu (always visible in billing portal) */
.pos-nav-reports {
    margin: 2px 0 6px;
    border-radius: 10px;
}

.pos-nav-reports-trigger {
    list-style: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.pos-nav-reports-trigger::-webkit-details-marker {
    display: none;
}

.pos-nav-reports-trigger .pos-nav-reports-caret {
    margin-left: auto;
    font-size: 0.68rem;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.pos-nav-reports[open] .pos-nav-reports-caret,
.pos-nav-reports.is-open .pos-nav-reports-caret {
    transform: rotate(180deg);
}

.pos-nav-reports-trigger.pos-nav-link {
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
}

.pos-nav-reports-submenu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px 10px;
    margin: 0 4px 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: min(52vh, 400px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.pos-nav-group-main.is-active {
    background: rgba(255, 255, 255, 0.1);
}

.pos-nav-group-expand {
    display: grid;
    place-items: center;
    width: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 0 10px 10px 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition: background 0.15s ease;
}

.pos-nav-group-expand:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pos-nav-group-expand .pos-nav-caret {
    font-size: 0.68rem;
    opacity: 0.85;
    transition: transform 0.22s ease;
}

.pos-nav-group.is-open .pos-nav-group-expand .pos-nav-caret {
    transform: rotate(180deg);
}

.pos-nav-group-toggle {
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
}

.pos-nav-group-toggle.is-active {
    background: rgba(255, 255, 255, 0.1);
}

.pos-nav-group-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.pos-nav-group-icon i {
    font-size: 0.9rem;
}

.pos-nav-group-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.pos-nav-group-title {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
}

.pos-nav-group-meta {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.65;
    letter-spacing: 0.02em;
}

.pos-nav-group-toggle .pos-nav-caret {
    margin-left: auto;
    font-size: 0.68rem;
    opacity: 0.8;
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.pos-nav-group.is-open .pos-nav-group-toggle .pos-nav-caret {
    transform: rotate(180deg);
}

.pos-nav-group .pos-nav-submenu {
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

.pos-nav-group.is-open .pos-nav-submenu {
    display: flex;
}

.pos-nav-details {
    margin: 2px 0 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pos-nav-details-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
}

.pos-nav-details-summary::-webkit-details-marker {
    display: none;
}

.pos-nav-details-summary .pos-nav-caret {
    margin-left: auto;
    font-size: 0.68rem;
    opacity: 0.8;
    transition: transform 0.22s ease;
}

.pos-nav-details[open] .pos-nav-details-summary .pos-nav-caret {
    transform: rotate(180deg);
}

.pos-nav-details .pos-nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px 8px 10px;
    max-height: min(46vh, 340px);
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.pos-nav-submenu-head {
    padding: 8px 14px 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.pos-nav-submenu-scroll {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px 8px 10px;
    max-height: min(50vh, 380px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.pos-nav-submenu-scroll::-webkit-scrollbar {
    width: 5px;
}

.pos-nav-submenu-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 4px;
}

.pos-nav-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.pos-nav-sublink-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.pos-nav-sublink-icon i {
    font-size: 0.72rem;
    opacity: 0.95;
}

.pos-nav-sublink-label {
    flex: 1;
    min-width: 0;
}

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

.pos-nav-sublink:hover .pos-nav-sublink-icon {
    background: rgba(255, 255, 255, 0.14);
}

.pos-nav-sublink.is-active {
    background: #fff;
    color: var(--pos-maroon-dark, #5c1028);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.pos-nav-sublink.is-active .pos-nav-sublink-icon {
    background: var(--pos-soft-grad, linear-gradient(145deg, #ffd8eb, #ffb8d4));
    color: var(--pos-maroon);
}

.bq-workspace-bar--single {
    justify-content: space-between;
}

.bq-workspace-bar--single .bq-workspace-bar__start {
    flex: 1 1 auto;
}

.bq-connect-banner--product {
    border-left: 4px solid var(--pos-maroon, #1e40af);
}

.bq-connect-banner--billing {
    border-left: 4px solid var(--pos-pink);
}

@media (max-width: 1023px) {
    .bq-mobile-menu {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 8px;
        background: var(--pos-pink-soft);
        color: var(--pos-maroon);
    }
}

@media (max-width: 768px) {
    .bq-connect-banner {
        flex-direction: column;
        align-items: flex-start;
    }

}

/* â”€â”€â”€ Boutique form shell (product create/edit & module forms) â”€â”€â”€ */
.bq-form-shell {
    font-family: 'DM Sans', system-ui, sans-serif;
}

.bq-form-shell .py-8,
.bq-form-shell .max-w-7xl,
.bq-form-shell .max-w-4xl,
.bq-form-shell .max-w-3xl {
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.bq-form-shell>.py-8>div,
.bq-form-shell .mx-auto.px-4 {
    padding: 0 !important;
}

.bq-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--bq-section-gap);
}

.bq-form-field {
    display: grid;
    gap: var(--bq-field-gap);
}

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

.bq-form-field label,
.bq-form-shell label {
    display: block;
    margin: 0 0 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-maroon);
}

.bq-field-hint {
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--pos-border);
}

.bq-input-group {
    display: flex;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.bq-input-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: var(--pos-pink-soft);
    color: var(--pos-muted);
    font-size: 0.75rem;
    border-right: 1px solid var(--pos-border);
    white-space: nowrap;
}

.bq-input-group .bq-form-control {
    border: none;
    border-radius: 0;
    flex: 1;
    min-width: 0;
}

.bq-inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.bq-alert {
    padding: 12px 16px;
    border-radius: var(--pos-radius);
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.bq-alert-success {
    background: #e8f8ee;
    border: 1px solid #b8e6c8;
    color: var(--pos-green);
}

.bq-color-dot {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--pos-border);
    vertical-align: middle;
    margin-right: 6px;
}

.bq-form-shell .bg-white.border,
.bq-form-shell .bg-white.border.rounded-lg,
.bq-form-shell .rounded-2xl.border {
    background: var(--pos-card) !important;
    border: 1px solid var(--pos-border) !important;
    border-radius: var(--pos-radius) !important;
    padding: 16px 18px !important;
    box-shadow: var(--pos-shadow);
}

.bq-form-shell input[type="text"],
.bq-form-shell input[type="email"],
.bq-form-shell input[type="number"],
.bq-form-shell input[type="password"],
.bq-form-shell input[type="tel"],
.bq-form-shell input[type="date"],
.bq-form-shell input[type="url"],
.bq-form-shell select,
.bq-form-shell textarea,
.bq-form-shell .form-control,
.bq-form-shell .border.rounded,
.bq-form-shell .border-gray-300,
.bq-form-shell .rounded-md.border-gray-300 {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pos-border) !important;
    border-radius: 8px !important;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: var(--pos-text);
}

.bq-form-shell input:focus,
.bq-form-shell select:focus,
.bq-form-shell textarea:focus {
    outline: none;
    border-color: var(--pos-pink) !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.bq-form-shell .bg-indigo-600,
.bq-form-shell button.bg-indigo-600,
.bq-form-shell .btn-save {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}

.bq-form-shell .bg-indigo-600:hover,
.bq-form-shell button.bg-indigo-600:hover {
    opacity: 0.92;
}

.bq-form-shell a.border-gray-300,
.bq-form-shell .btn-cancel {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--pos-border) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--pos-maroon) !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.bq-form-shell .text-sm.font-medium,
.bq-form-shell label.text-sm {
    color: var(--pos-maroon);
}

.bq-form-shell .text-gray-500,
.bq-form-shell .text-gray-600,
.bq-form-shell .text-xs.text-gray-500 {
    color: var(--pos-muted) !important;
}

.bq-form-shell .product-permalink-field {
    border-color: var(--pos-border) !important;
}

.bq-form-shell .product-permalink-field:focus-within {
    border-color: var(--pos-pink) !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.bq-form-shell .bg-gray-50 {
    background: var(--pos-pink-soft) !important;
    color: var(--pos-muted) !important;
}

.bq-form-shell .bg-red-50 {
    background: #fde8ee !important;
    border-color: #f5c6cb !important;
    color: #c0392b !important;
}

.bq-form-shell .grid.gap-6 {
    gap: 16px !important;
}

.bq-form-shell .form-card {
    background: transparent;
    padding: 0;
}

.bq-form-shell .form-card h3 {
    color: var(--pos-maroon);
    font-size: 1rem;
    font-weight: 700;
    border-bottom-color: var(--pos-border) !important;
}

.bq-form-shell input[type="checkbox"] {
    accent-color: var(--pos-maroon);
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .bq-form-grid {
        grid-template-columns: 1fr;
    }
}

/* â•â•â• Sales Invoice Form â•â•â• */
.si-app.bq-app {
    --si-sticky-top: 12px;
    padding: 20px 24px 24px;
    overflow: visible;
}

.si-app .bq-topbar {
    padding: 18px 22px;
    margin-bottom: 20px;
}

.si-form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.si-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 22px;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.si-main {
    display: grid;
    gap: 20px;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.si-section.bq-panel {
    padding: 0;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.si-section.bq-panel> :not(.si-section-head) {
    padding: 0 24px 24px;
}

.si-section {
    margin-bottom: 0;
}

.si-section-head {
    margin: 0 0 22px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(180deg, #fff 0%, var(--pos-pink-soft) 100%);
    border-radius: var(--pos-radius) var(--pos-radius) 0 0;
}

.si-section-head h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pos-maroon);
    display: flex;
    align-items: center;
    gap: 10px;
}

.si-section-head h2 i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.si-section-head p {
    margin: 0;
    padding-left: 42px;
    font-size: 0.82rem;
    color: var(--pos-muted);
    line-height: 1.45;
}

.si-grid {
    display: grid;
    gap: 18px 20px;
}

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

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

.si-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.si-field {
    display: grid;
    gap: 8px;
}

.si-field span {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--pos-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.si-field em {
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    opacity: 0.85;
}

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

.si-app .bq-form-control,
.si-app textarea.bq-form-control {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.si-app textarea.bq-form-control {
    min-height: auto;
    resize: vertical;
}

.si-app .bq-form-control:focus,
.si-app textarea.bq-form-control:focus {
    outline: none;
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.si-check-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
}

.si-check-field input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--pos-maroon);
}

.si-check-field span {
    text-transform: none;
    font-size: 0.88rem;
    color: var(--pos-text);
    letter-spacing: 0;
}

.si-category-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    max-height: 104px;
    overflow-y: auto;
    padding: 4px 2px;
}

.si-cat-btn {
    padding: 8px 16px;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-maroon);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.si-cat-btn:hover {
    border-color: var(--pos-pink);
    background: var(--pos-pink-soft);
}

.si-cat-btn.is-active {
    background: var(--pos-pink-soft);
    border-color: var(--pos-pink);
    box-shadow: 0 0 0 2px rgba(233, 30, 140, 0.12);
}

.si-product-search {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px;
}

.si-product-search .bq-form-control {
    min-height: 46px;
}

.si-product-search .pos-chip-btn {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.88rem;
    white-space: nowrap;
}

.si-search-dropdown {
    position: relative;
    z-index: 20;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    box-shadow: var(--pos-shadow);
    overflow: hidden;
}

.si-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f5eef2;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.si-dropdown-item:hover {
    background: var(--pos-pink-soft);
}

.si-dropdown-item strong {
    color: var(--pos-maroon);
    font-size: 0.88rem;
}

.si-dropdown-item span {
    color: var(--pos-muted);
    font-size: 0.78rem;
}

.si-table-wrap {
    margin-top: 4px;
    border: 1px solid var(--pos-border);
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.si-items-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.si-items-table th {
    padding: 14px 12px;
    font-size: 0.72rem;
}

.si-items-table td {
    padding: 12px 10px;
}

.si-items-table .si-mini {
    min-width: 68px;
    padding: 8px 10px;
    font-size: 0.82rem;
}

.si-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.si-remove:hover {
    background: #fecaca;
}

.si-empty-hint {
    text-align: center;
    padding: 28px 20px;
    color: var(--pos-muted);
    font-size: 0.88rem;
}

.si-empty-hint[hidden] {
    display: none;
}

.si-pay-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.si-pay-tab {
    padding: 10px 18px;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-maroon);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.si-pay-tab.is-active {
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
    color: #fff;
}

.si-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: var(--si-sticky-top, 12px);
    min-width: 0;
    width: 100%;
    max-width: 320px;
    align-self: start;
    z-index: 10;
    max-height: none;
    overflow: visible;
}

.si-sidebar .bq-panel {
    padding: 22px 20px;
}

.si-summary h3,
.si-stock-note h3,
.si-actions h3 {
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.si-summary-list {
    margin: 0;
    display: grid;
    gap: 12px;
}

.si-summary-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.86rem;
    color: var(--pos-muted);
    padding-bottom: 12px;
    border-bottom: 1px dashed #f0e4ea;
}

.si-summary-list div:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.si-summary-list dd {
    margin: 0;
    color: var(--pos-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.si-grand,
.si-due {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 16px 0 0;
    border-top: 2px solid var(--pos-border);
}

.si-grand {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.si-grand strong {
    font-size: 1.35rem;
    color: var(--pos-maroon);
    font-variant-numeric: tabular-nums;
}

.si-due {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--pos-border);
    font-size: 0.86rem;
}

.si-due strong {
    color: #b45309;
    font-size: 1rem;
}

.si-stock-note p {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: var(--pos-muted);
    line-height: 1.5;
}

.si-stock-row {
    padding: 10px 0;
    border-bottom: 1px dashed var(--pos-border);
    font-size: 0.8rem;
}

.si-stock-row span {
    display: block;
    color: var(--pos-maroon);
    font-weight: 600;
    margin-bottom: 2px;
}

.si-stock-row small {
    color: var(--pos-muted);
}

.si-actions {
    display: grid;
    gap: 10px;
}

.si-actions .pos-btn-pay {
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.si-actions .pos-chip-btn {
    border: 1px solid var(--pos-border);
    background: #fff;
    color: var(--pos-maroon);
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.si-actions .pos-chip-btn:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-pink);
}

.si-btn-block {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.si-flash {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.88rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .si-layout {
        grid-template-columns: 1fr;
    }

    .si-sidebar {
        position: static;
        max-width: none;
        max-height: none;
        overflow: visible;
        z-index: auto;
    }

    .si-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .si-app.bq-app {
        padding: 16px;
    }

    .si-section-head {
        padding: 16px 18px;
    }

    .si-section.bq-panel> :not(.si-section-head) {
        padding: 0 18px 20px;
    }

    .si-section-head p {
        padding-left: 0;
        margin-top: 8px;
    }

    .si-grid-2,
    .si-grid-3,
    .si-grid-4 {
        grid-template-columns: 1fr;
    }

    .si-product-search {
        grid-template-columns: 1fr;
    }

    .si-check-field {
        padding-top: 0;
    }
}

/* â•â•â• Billing Record View (show page) â•â•â• */
.bd-record-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 20px;
    align-items: start;
    min-width: 0;
    max-width: 100%;
}

.bd-record-main,
.bd-record-side {
    display: grid;
    gap: 20px;
    min-width: 0;
    max-width: 100%;
}

.bd-record-main {
    overflow-x: clip;
}

.bd-record-side {
    position: sticky;
    top: 16px;
    align-self: start;
}

.bd-record .bq-panel {
    overflow: hidden;
}

.bd-record .bq-panel-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bd-record .bq-table-wrap {
    width: 100%;
    max-width: 100%;
}

.bd-record .bq-topbar-actions form {
    display: inline-flex;
}

.bd-record .bq-topbar-actions .pos-chip-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.bd-record .bq-topbar-actions .pos-chip-btn.pos-chip-accent {
    background: var(--pos-pink);
    border-color: var(--pos-pink);
}

.bq-table-kv td:first-child {
    width: 42%;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fdf8fa;
}

.bq-table-kv td:last-child {
    font-weight: 600;
    color: var(--pos-text);
}

.bq-table-kv .bd-record-total-row td {
    border-top: 2px solid var(--pos-border);
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-size: 0.92rem;
}

.bq-table-kv .bd-record-total-row td:first-child {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.bq-table-kv .bd-record-due-row td {
    background: #fff8eb;
    color: #b45309;
}

.bq-table-kv .bd-record-due-row td:first-child {
    background: #fff8eb;
    color: #b45309;
}

.bd-record-empty {
    text-align: center;
    padding: 28px 16px !important;
    color: var(--pos-muted);
    font-size: 0.88rem;
}

.bd-record-flash {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.88rem;
    font-weight: 600;
}

.bd-record-actions {
    padding: 0 18px 18px;
    border-top: 1px solid var(--pos-border);
    padding-top: 16px;
}

.bd-record-wa {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none !important;
    background: linear-gradient(135deg, #25d366, #128c7e) !important;
    color: #fff !important;
}

@media (max-width: 1200px) {
    .bd-record-layout {
        grid-template-columns: 1fr;
    }

    .bd-record-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .bd-record .bq-topbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .bd-record .bq-topbar-actions form,
    .bd-record .bq-topbar-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Tailor module dashboard */
.bq-tailor-dashboard .bq-stat-card.is-accent .bq-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.bq-tailor-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.bq-tailor-panel--wide {
    margin-bottom: 18px;
}

.bq-tailor-panel .bq-panel-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bq-tailor-panel .bq-panel-head h2 i {
    font-size: 0.9rem;
    color: var(--pos-pink);
}

.bq-table-wrap--flush {
    padding: 0;
}

.bq-empty-state {
    padding: 36px 24px;
    text-align: center;
    color: var(--pos-muted);
}

.bq-empty-state > i {
    display: block;
    font-size: 2rem;
    color: var(--pos-pink);
    opacity: 0.85;
    margin-bottom: 12px;
}

.bq-empty-state p {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-empty-state span {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.bq-empty-state__cta {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    width: auto;
    max-width: 100%;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.18);
    text-decoration: none;
}

.bq-empty-state__cta i {
    display: inline-block;
    font-size: 0.72rem;
    margin: 0;
    opacity: 1;
    color: inherit;
}

.bq-pill-count {
    display: inline-flex;
    min-width: 2rem;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
    font-weight: 700;
    font-size: 0.85rem;
}

.bq-col-num {
    text-align: right;
    white-space: nowrap;
}

.bq-due-badge {
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .bq-tailor-board {
        grid-template-columns: 1fr;
    }
}

.bq-tailor-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(140px, 1fr)) auto;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--pos-border);
}

.bq-tailor-form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bq-tailor-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.bq-tailor-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bq-tailor-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bq-tailor-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bq-tailor-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.bq-tailor-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 8px;
}

.bq-field--span-2 {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .bq-tailor-filters {
        grid-template-columns: 1fr;
    }

    .bq-tailor-grid--2,
    .bq-tailor-grid--3,
    .bq-tailor-grid--4,
    .bq-tailor-grid--5 {
        grid-template-columns: 1fr 1fr;
    }

    .bq-field--span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .bq-tailor-grid--2,
    .bq-tailor-grid--3,
    .bq-tailor-grid--4,
    .bq-tailor-grid--5 {
        grid-template-columns: 1fr;
    }

    .bq-field--span-2 {
        grid-column: span 1;
    }
}

/* Quotation module â€” nav, form, workflow, responsive */
.bq-quote-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
}

.bq-quote-module-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--pos-border);
    background: #fff;
    color: var(--pos-maroon);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bq-quote-module-nav__link:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-pink);
}

.bq-quote-module-nav__link.is-active {
    background: linear-gradient(135deg, var(--pos-maroon), var(--pos-maroon-light));
    border-color: var(--pos-maroon);
    color: #fff;
}

.bq-quote-form-page {
    padding-bottom: 8px;
    min-width: 0;
    max-width: 100%;
}

.bq-quote-form-page .bq-app,
.bq-quote-form-page #quotation_form {
    min-width: 0;
    max-width: 100%;
}

.bq-quote-workflow {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
    overflow: hidden;
}

.bq-quote-workflow--compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    overflow: visible;
    box-shadow: none;
}

.bq-quote-workflow-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pos-muted);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--pos-border);
    background: #fff;
    white-space: nowrap;
}

.bq-quote-workflow-pill.is-done {
    color: var(--pos-maroon);
    border-color: #c9a8b4;
}

.bq-quote-workflow-pill.is-active {
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
    color: #fff;
}

.bq-quote-workflow--dashboard {
    margin-bottom: 16px;
}

.bq-quote-workflow-step {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 10px 8px 10px 28px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--pos-muted);
    background: #faf6f7;
    border-right: 1px solid var(--pos-border);
    position: relative;
    counter-increment: bq-quote-step;
}

.bq-quote-workflow-step::before {
    content: counter(bq-quote-step);
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--pos-border);
    color: var(--pos-muted);
}

.bq-quote-workflow {
    counter-reset: bq-quote-step;
}

.bq-quote-workflow-step:last-child {
    border-right: none;
}

.bq-quote-workflow-step.is-done {
    color: var(--pos-maroon);
    background: var(--pos-pink-soft);
}

.bq-quote-workflow-step.is-done::before {
    content: 'âœ“';
    font-size: 0.55rem;
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
    color: #fff;
}

.bq-quote-workflow-step.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--pos-maroon), var(--pos-maroon-light));
}

.bq-quote-workflow-step.is-active::before {
    background: #fff;
    border-color: #fff;
    color: var(--pos-maroon);
}

.bq-quote-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    grid-template-areas: 'main rail';
    gap: 20px;
    align-items: start;
}

.bq-quote-form-main {
    grid-area: main;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bq-quote-form-rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    position: sticky;
    top: 12px;
}

.bq-quote-form-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bq-quote-form-totals {
    min-width: 0;
}

.bq-quote-side-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 16px;
}

.bq-quote-side-fields .bq-field label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.bq-quote-side-fields .bq-form-control {
    min-height: 38px;
    font-size: 0.88rem;
}

.bq-quote-discounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.bq-quote-side-card .bq-panel-head {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(180deg, #fff, var(--pos-pink-soft));
}

.bq-quote-side-card .bq-panel-head h2 {
    font-size: 0.95rem;
}

.bq-quote-form-page .bq-quote-side-fields .bq-form-control,
.bq-quote-form-page .bq-quote-notes-grid .bq-form-control,
.bq-quote-form-page .bq-quote-line .bq-form-control {
    border: 1px solid #cdb3be;
    background: #fffcfd;
    box-shadow: inset 0 1px 2px rgba(90, 20, 50, 0.04);
}

.bq-quote-form-page .bq-form-control:focus {
    border-color: var(--pos-maroon);
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.12);
}

.bq-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bq-req {
    color: var(--pos-pink);
}

.bq-quote-alert {
    padding: 12px 16px;
    border-radius: var(--pos-radius);
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.bq-quote-alert--error {
    background: #fde8ee;
    color: #922b21;
    border: 1px solid #f5c6cb;
}

.bq-quote-alert ul {
    margin: 8px 0 0 18px;
}

.bq-quote-quick-panel {
    border-bottom: 1px solid var(--pos-border);
}

.bq-quote-quick-panel-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--pos-maroon);
    background: var(--pos-pink-soft);
    border-bottom: 1px solid var(--pos-border);
}

.bq-quote-quick-panel-head small {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.bq-quote-quick-panel-head i {
    color: var(--pos-pink);
    margin-right: 4px;
}

.bq-quote-quick-groups {
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bq-quote-quick-group {
    display: grid;
    grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
    padding: 10px 12px;
    background: #faf6f7;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    min-width: 0;
}

.bq-quote-quick-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pos-maroon);
    min-width: 5.5rem;
    padding-top: 4px;
    flex-shrink: 0;
}

.bq-quote-quick-label i {
    margin-right: 4px;
    color: var(--pos-pink);
}

.bq-quote-quick-count {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--pos-muted);
}

.bq-quote-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bq-quote-quick-chips .pos-chip-btn {
    font-size: 0.74rem;
    padding: 5px 10px;
    border-color: #d4b8c4;
    background: #fff;
    color: var(--pos-maroon);
    white-space: normal;
    text-align: left;
    line-height: 1.3;
    max-width: 100%;
}

.bq-quote-quick-chips .pos-chip-btn:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-maroon);
}

.bq-quote-lines-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bq-quote-lines-table {
    --bq-line-cols: minmax(96px, 118px) minmax(0, 1fr) minmax(64px, 80px) minmax(80px, 104px) minmax(64px, 80px) 40px;
    --bq-line-gap: 12px;
    min-width: 0;
    width: 100%;
}

.bq-quote-lines-head,
.bq-quote-line {
    display: grid;
    grid-template-columns: var(--bq-line-cols);
    column-gap: var(--bq-line-gap);
    row-gap: 8px;
    align-items: center;
    padding: 12px 18px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.bq-quote-lines-head {
    background: var(--pos-pink-soft);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pos-maroon);
    border-bottom: 1px solid var(--pos-border);
    padding-top: 10px;
    padding-bottom: 10px;
}

.bq-quote-lines-head>span {
    display: block;
    white-space: nowrap;
    line-height: 1.2;
}

.bq-quote-lines-head>span:nth-child(3),
.bq-quote-lines-head>span:nth-child(4),
.bq-quote-lines-head>span:nth-child(5) {
    text-align: right;
    padding-right: 4px;
}

.bq-quote-line {
    border-bottom: 1px solid var(--pos-border);
}

.bq-quote-line:last-child {
    border-bottom: none;
}

.bq-quote-line-field {
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.bq-quote-line-field--type {
    min-width: 0;
}

.bq-quote-line-field--name {
    min-width: 0;
}

.bq-quote-line-field--qty,
.bq-quote-line-field--rate,
.bq-quote-line-field--tax {
    justify-self: stretch;
}

.bq-quote-line-field--actions {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

.bq-quote-line .bq-form-control {
    display: block;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.86rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bq-quote-line-field--type .bq-form-control {
    font-size: 0.84rem;
}

.bq-quote-line-field--qty .bq-form-control,
.bq-quote-line-field--rate .bq-form-control,
.bq-quote-line-field--tax .bq-form-control {
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-right: 10px;
    padding-left: 8px;
}

.bq-quote-line input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bq-quote-line input[type="number"]::-webkit-outer-spin-button,
.bq-quote-line input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bq-quote-main-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 16px 16px;
    padding: 14px 18px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
}

.bq-quote-main-totals__row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--pos-muted);
    font-weight: 600;
    padding: 4px 0;
}

.bq-quote-main-totals__row strong {
    color: var(--pos-maroon);
    font-size: 1.08rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bq-quote-main-totals__row--grand {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed var(--pos-border);
}

.bq-quote-main-totals__row--grand strong {
    font-size: 1.35rem;
}

.bq-quote-add-line-btn {
    background: var(--pos-maroon) !important;
    border-color: var(--pos-maroon) !important;
    color: #fff !important;
    font-weight: 700;
}

.bq-quote-add-line-btn:hover {
    background: var(--pos-maroon-light) !important;
    border-color: var(--pos-maroon-light) !important;
    color: #fff !important;
}

.bq-quote-line-label {
    display: none;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pos-muted);
    margin-bottom: 4px;
}

.bq-quote-line-remove {
    position: static;
    width: 36px;
    height: 36px;
    margin: 0;
    flex-shrink: 0;
}

.bq-quote-form-page .bq-panel-head {
    flex-wrap: wrap;
    gap: 10px;
}

.bq-quote-form-page .bq-panel-head .pos-chip-btn {
    flex-shrink: 0;
}

.bq-quote-validity-hint {
    margin: -2px 0 0;
    padding: 6px 10px;
    font-size: 0.76rem;
    color: var(--pos-maroon);
    font-weight: 600;
    background: var(--pos-pink-soft);
    border-radius: 6px;
    border: 1px solid var(--pos-border);
}

.bq-quote-breakdown-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    opacity: 0.92;
}

.bq-quote-breakdown-mini>div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.bq-quote-notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 16px;
}

.bq-quote-notes-grid .bq-field:last-child {
    grid-column: 1 / -1;
}

.bq-badge-muted {
    background: #eee;
    color: #555;
}

.bq-quote-line-remove {
    width: 32px;
    height: 32px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff;
    color: var(--pos-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    flex-shrink: 0;
}

.bq-quote-line-remove:hover {
    background: #fde8ee;
    color: var(--pos-maroon);
    border-color: var(--pos-pink);
}

.bq-quote-form-meta .bq-quote-side-fields {
    padding-bottom: 12px;
}

.bq-quote-form-totals .bq-quote-totals-card {
    margin: 0;
    box-shadow: 0 8px 24px rgba(90, 20, 50, 0.22);
}

.bq-quote-more {
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    background: var(--pos-card);
    overflow: hidden;
}

.bq-quote-more-summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--pos-maroon);
    list-style: none;
}

.bq-quote-more-summary::-webkit-details-marker {
    display: none;
}

.bq-quote-more-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--pos-border);
}

.bq-quote-check {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-muted);
    cursor: pointer;
}

.bq-quote-pct-input {
    width: 4rem !important;
    min-height: 32px !important;
    padding: 4px 8px !important;
}

.bq-quote-totals-card {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light));
    color: #fff;
    border: none;
    border-radius: var(--pos-radius);
    overflow: hidden;
}

body[data-pos-theme] .bq-quote-form-page .bq-quote-totals-card {
    background: linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light));
    border: none;
    color: #fff;
}

.bq-quote-totals-head {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.08);
}

.bq-quote-totals-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.bq-quote-totals-head h2 i {
    margin-right: 6px;
    opacity: 0.9;
}

.bq-quote-totals-body {
    padding: 14px 16px 16px;
}

.bq-quote-form-page .bq-panel {
    margin-bottom: 0;
}

.bq-quote-totals-card .bq-quote-breakdown-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.8rem;
}

.bq-quote-totals-card .bq-quote-breakdown-mini>div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
}

.bq-quote-totals-card .bq-quote-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
    padding: 5px 0;
    color: #fff;
}

.bq-quote-totals-card .bq-quote-total-row span:last-child {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bq-quote-totals-card .bq-quote-total-row--grand {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.bq-quote-totals-card .bq-quote-total-row--grand span:last-child {
    font-size: 1.28rem;
}

.bq-quote-save-btn {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    background: #fff !important;
    color: var(--pos-maroon) !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    font-weight: 800;
    font-size: 0.9rem;
    min-height: 42px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bq-quote-save-btn:hover {
    background: var(--pos-pink-soft) !important;
    color: var(--pos-maroon) !important;
    border-color: #fff !important;
}

/* Wide desktop: 2Ã—2 quick-add only when there is room beside the sidebar */
@media (min-width: 1500px) {
    .bq-quote-quick-groups {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .bq-quote-quick-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .bq-quote-quick-label {
        padding-top: 0;
    }
}

/* Sidebar + rail: stack before main column gets crushed */
@media (max-width: 1280px) {
    .bq-quote-form-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            'meta'
            'main'
            'totals';
        gap: 14px;
        align-items: start;
    }

    .bq-quote-form-rail {
        display: contents;
    }

    .bq-quote-form-meta {
        grid-area: meta;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .bq-quote-form-main {
        grid-area: main;
    }

    .bq-quote-form-totals {
        grid-area: totals;
        margin-top: 0;
        position: sticky;
        bottom: 0;
        z-index: 30;
        margin-left: 0;
        margin-right: 0;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .bq-quote-form-totals .bq-quote-totals-card {
        border-radius: var(--pos-radius) var(--pos-radius) 0 0;
        box-shadow: 0 -8px 24px rgba(90, 20, 50, 0.18);
    }

    .bq-quote-form-page {
        padding-bottom: max(160px, calc(140px + env(safe-area-inset-bottom)));
    }

    .bq-quote-workflow {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .bq-quote-workflow-step {
        flex: 0 0 auto;
        min-width: 7rem;
        white-space: nowrap;
    }

    .bq-quote-module-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .bq-quote-module-nav__link {
        flex-shrink: 0;
    }
}

@media (min-width: 1281px) and (max-width: 1599px) {
    .bq-quote-form-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    }
}

@media (max-width: 1024px) {
    .bq-quote-lines-scroll {
        overflow-x: visible;
        margin: 0;
    }

    .bq-quote-lines-head {
        display: none;
    }

    .bq-quote-lines-table {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 8px;
    }

    .bq-quote-line {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        min-width: 0;
        padding: 12px 44px 12px 12px;
        margin: 0;
        position: relative;
        border: 1px solid var(--pos-border);
        border-radius: 10px;
        background: #fff;
        box-shadow: var(--pos-shadow);
    }

    .bq-quote-line-field--actions {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .bq-quote-line-label {
        display: block;
    }

    .bq-quote-line-field--type,
    .bq-quote-line-field--name {
        flex: 1 1 100%;
    }

    .bq-quote-line-field--qty,
    .bq-quote-line-field--rate,
    .bq-quote-line-field--tax {
        flex: 1 1 calc(33.333% - 7px);
        min-width: 72px;
    }

    .bq-quote-line-field--qty .bq-form-control,
    .bq-quote-line-field--rate .bq-form-control,
    .bq-quote-line-field--tax .bq-form-control {
        text-align: left;
    }

    .bq-quote-main-totals {
        margin-left: 8px;
        margin-right: 8px;
    }
}

@media (max-width: 900px) {
    .bq-quote-form-meta {
        grid-template-columns: 1fr;
    }

    .bq-quote-quick-group {
        grid-template-columns: 1fr;
    }

    .bq-quote-quick-label {
        min-width: 0;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .bq-quote-form-page .bq-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .bq-quote-form-page .bq-topbar-actions {
        width: 100%;
    }

    .bq-quote-form-page .bq-topbar-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    .bq-quote-form-page .bq-topbar p {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .bq-quote-notes-grid {
        grid-template-columns: 1fr;
    }

    .bq-quote-quick-chips {
        flex-wrap: wrap;
    }

    .bq-quote-line-field--qty,
    .bq-quote-line-field--rate,
    .bq-quote-line-field--tax {
        flex: 1 1 100%;
    }

    .bq-field-row {
        grid-template-columns: 1fr;
    }

    .bq-quote-form-meta .bq-panel {
        margin: 0;
    }

    .bq-quote-breakdown-mini {
        font-size: 0.72rem;
        gap: 2px;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .bq-quote-save-btn {
        min-height: 44px;
        font-size: 0.95rem;
    }
}

.bq-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.bq-quote-dashboard .bq-empty-state {
    padding: 28px 16px;
}

/* â•â•â• All modules â€” global responsive (billing + product + legacy) â•â•â• */
.bq-legacy-body .grid,
.bq-app .grid {
    display: grid;
    gap: 14px;
}

.bq-legacy-body .grid-cols-1,
.bq-app .grid-cols-1 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {

    .bq-legacy-body .md\:grid-cols-2,
    .bq-app .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {

    .bq-legacy-body .xl\:grid-cols-2,
    .bq-app .xl\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-legacy-body .xl\:grid-cols-4,
    .bq-app .xl\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.bq-legacy-body .module-shell,
.bq-legacy-body .mt-6 {
    margin-top: 0 !important;
}

.bq-label-card {
    padding: 12px 14px;
    border: 1px dashed var(--pos-border);
    border-radius: 10px;
    background: #fff;
}

.bq-label-card strong {
    display: block;
    color: var(--pos-maroon);
    font-size: 0.88rem;
}

.bq-label-card .bq-cell-meta {
    margin-top: 4px;
}

.bq-scope-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fdf8fa;
}

.bq-scope-card strong {
    color: var(--pos-maroon);
}

.bq-scope-meta {
    text-align: right;
    font-size: 0.78rem;
    color: var(--pos-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {

    .bq-topbar .pos-menu-toggle,
    .bq-legacy-header+.bq-legacy-body,
    .bq-app>.pos-menu-toggle {
        flex-shrink: 0;
    }

    .bq-legacy-header .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bq-legacy-header .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bq-tailor-board {
        grid-template-columns: 1fr;
    }

    .si-layout {
        grid-template-columns: 1fr;
    }

    .si-rail {
        position: static;
    }
}

@media (max-width: 900px) {
    .bq-table-wrap--scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bq-quote-module-nav,
    .bq-module-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .bq-quote-module-nav__link,
    .bq-module-nav .pos-chip-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .bq-board-2 {
        grid-template-columns: 1fr;
    }

    .bq-dues-grid {
        grid-template-columns: 1fr;
    }

    .bq-due-card {
        flex-direction: column;
        align-items: stretch;
    }

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

    .bq-connect-actions .pos-chip-btn,
    .bq-connect-actions form {
        flex: 1 1 auto;
        min-width: min(100%, 160px);
    }

    .bq-connect-actions button.pos-chip-btn {
        width: 100%;
    }

    .bq-action-row,
    .table-action-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .bq-action-row .pos-chip-btn,
    .table-action-row .module-button-secondary,
    .table-action-row .module-button-danger {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        text-align: center;
        min-height: 40px;
    }

    .bq-topbar-actions .pos-chip-btn,
    .pos-topbar-actions .pos-chip-btn {
        flex: 0 0 auto;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }

    .bq-form-control,
    .bq-filter-bar input,
    .bq-filter-bar select {
        min-width: 0;
        width: 100%;
    }

    .bq-filter-bar .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    .bq-legacy-body .md\:grid-cols-2,
    .bq-app .md\:grid-cols-2,
    .bq-legacy-body .xl\:grid-cols-2,
    .bq-app .xl\:grid-cols-2,
    .bq-legacy-body .xl\:grid-cols-4,
    .bq-app .xl\:grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .bq-legacy-body .p-5.grid,
    .bq-scope-card {
        flex-direction: column;
    }

    .bq-scope-meta {
        text-align: left;
        width: 100%;
    }

    .bq-panel-pad {
        padding: 14px;
    }

    .pos-footer {
        padding: 12px 14px;
        font-size: 0.72rem;
        text-align: center;
    }

    .pos-footer>span {
        display: block;
        width: 100%;
    }

    /* DataTables card rows â€” checkbox & bulk */
    .bq-table.bq-table-responsive tbody td:first-child:has(input[type="checkbox"]),
    table.dataTable.bq-table-responsive tbody td:first-child:has(input[type="checkbox"]) {
        justify-content: flex-start;
    }

    .bq-table.bq-table-responsive tbody td:first-child:has(input[type="checkbox"])::before,
    table.dataTable.bq-table-responsive tbody td:first-child:has(input[type="checkbox"])::before {
        content: 'Select';
    }

    .module-table-wrap,
    .bq-table-wrap {
        padding: 0 12px 12px;
    }

    .bq-legacy-body .module-card .p-5 {
        padding: 14px !important;
    }
}

@media (max-width: 480px) {

    .bq-app,
    .si-app.bq-app {
        padding: 10px;
    }

    .bq-topbar,
    .pos-topbar {
        padding: 12px 14px;
    }

    .bq-topbar h1,
    .pos-topbar-title {
        font-size: 1rem;
    }

    .bq-stat-value {
        font-size: 1.35rem;
    }

    .bq-topbar-actions .pos-chip-btn,
    .pos-topbar-actions .pos-chip-btn,
    .bq-action-row .pos-chip-btn {
        flex: 1 1 100%;
    }

    .dataTables_wrapper .dataTables_paginate .pagination .page-item .page-link,
    .dataTables_wrapper .dataTables_paginate a.paginate_button {
        min-width: 2rem;
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }
}

/* â•â•â• Settings hub â•â•â• */
.bq-settings-app {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 12px 88px;
}

.bq-settings-topbar {
    margin-bottom: 14px;
}

.bq-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
}

.bq-settings-tab {
    border: 1px solid transparent;
    background: #fff;
    color: var(--pos-maroon);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.bq-settings-tab:hover {
    border-color: var(--pos-border);
    background: var(--pos-pink-soft);
}

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

.bq-settings-connect {
    margin-bottom: 14px;
    padding: 16px 18px;
}

.bq-settings-connect-note {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: var(--pos-muted);
}

.bq-settings-module-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-settings-module-chips .pos-chip-btn {
    cursor: default;
    pointer-events: none;
    opacity: 0.92;
}

.bq-settings-grid {
    display: grid;
    gap: 14px;
}

.bq-settings-panel {
    padding: 16px 18px 18px;
}

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

.bq-settings-panel-desc {
    margin: 0 0 14px;
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.bq-settings-fields {
    display: grid;
    gap: 12px;
}

.bq-settings-panel .gc-theme-strip {
    margin: 0;
    padding: 12px 0 0;
    border: none;
    background: transparent;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.bq-settings-panel .pos-theme-options {
    flex-wrap: wrap;
}

.pos-receipt-picker--settings {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.pos-receipt-picker--settings .pos-receipt-picker-head {
    display: none;
}

.pos-receipt-picker-layout--stack {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    align-items: start;
}

.pos-receipt-active-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}

/* â”€â”€ POS Receipt Studio (format picker + live preview) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pos-receipt-studio {
    margin-bottom: 14px;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--pos-maroon) 12%, var(--pos-border));
    box-shadow: 0 8px 28px rgba(107, 21, 53, 0.07);
}

.pos-receipt-studio::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--pos-maroon) 0%, var(--pos-gold, #c9a227) 50%, var(--pos-pink) 100%);
}

.pos-receipt-studio__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--pos-border);
    background: linear-gradient(180deg, #fff 0%, #fdf9fb 100%);
}

.pos-receipt-studio__intro {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pos-receipt-studio__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--pos-maroon), color-mix(in srgb, var(--pos-maroon) 80%, #000));
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(107, 21, 53, 0.25);
    flex-shrink: 0;
}

.pos-receipt-studio__title {
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon);
    letter-spacing: 0.01em;
}

.pos-receipt-studio__subtitle {
    margin: 0;
    font-size: 0.74rem;
    color: var(--pos-muted);
}

.pos-receipt-studio__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pos-receipt-studio__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pos-pink) 14%, #fff);
    border: 1px solid color-mix(in srgb, var(--pos-pink) 35%, transparent);
    color: var(--pos-maroon);
    font-size: 0.76rem;
    font-weight: 700;
}

.pos-receipt-studio__pill i {
    color: var(--pos-gold, #c9a227);
    font-size: 0.82rem;
}

.pos-receipt-studio__settings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--pos-border);
    background: var(--pos-card);
    color: var(--pos-muted);
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.pos-receipt-studio__settings:hover {
    border-color: var(--pos-pink);
    color: var(--pos-maroon);
    background: #fff;
}

.pos-receipt-studio__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 0;
    align-items: stretch;
    min-height: 340px;
}

.pos-receipt-studio__formats {
    padding: 16px 18px 18px;
    border-right: 1px solid var(--pos-border);
    background: #fff;
}

.pos-receipt-studio__formats-label {
    margin: 0 0 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pos-muted);
}

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

.pos-receipt-format-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 2px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    appearance: none;
    font: inherit;
    color: inherit;
}

.pos-receipt-format-tile:hover {
    border-color: var(--pos-pink);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(107, 21, 53, 0.08);
}

.pos-receipt-format-tile.is-active {
    border-color: var(--pos-gold, #c9a227);
    background: linear-gradient(180deg, #fffef8 0%, #fff 100%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos-gold, #c9a227) 22%, transparent),
        0 8px 20px rgba(107, 21, 53, 0.1);
}

.pos-receipt-format-tile .pos-receipt-card-mock {
    min-height: 44px;
    padding: 6px;
}

.pos-receipt-format-tile__copy {
    display: grid;
    gap: 1px;
}

.pos-receipt-format-tile__copy strong {
    font-size: 0.72rem;
    color: var(--pos-maroon);
    line-height: 1.2;
}

.pos-receipt-format-tile__copy strong i {
    margin-right: 3px;
    opacity: 0.85;
    font-size: 0.68rem;
}

.pos-receipt-format-tile__copy small {
    font-size: 0.62rem;
    color: var(--pos-muted);
    line-height: 1.2;
}

.pos-receipt-preview-wrap--studio {
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 100%;
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-head {
    padding: 12px 16px;
    background: linear-gradient(180deg, #f8f2f6 0%, #f3edf1 100%);
    border-bottom: 1px solid color-mix(in srgb, var(--pos-border) 80%, var(--pos-pink));
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-head__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--pos-maroon);
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-head__label i {
    opacity: 0.75;
    font-size: 0.78rem;
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-stage {
    min-height: 280px;
    max-height: none;
    flex: 1;
    padding: 16px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9) 0%, transparent 55%),
        linear-gradient(180deg, #ebe4ea 0%, #f3edf1 40%, #faf7f9 100%);
}

.pos-receipt-preview-desk {
    position: absolute;
    inset: 16px 24px 24px;
    border-radius: 8px;
    border: 1px dashed color-mix(in srgb, var(--pos-maroon) 12%, transparent);
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-zoom {
    position: relative;
    z-index: 1;
    padding: 8px 0 16px;
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-inner {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 12px 32px rgba(107, 21, 53, 0.16),
        0 0 0 1px rgba(107, 21, 53, 0.06);
    border-radius: 2px;
}

.pos-receipt-preview-wrap--studio .pos-receipt-preview-stage .pos-receipt-preview-inner {
    zoom: 0.82;
}

@supports not (zoom: 1) {
    .pos-receipt-preview-wrap--studio .pos-receipt-preview-stage .pos-receipt-preview-inner {
        transform: scale(0.82);
        transform-origin: top center;
    }
}

.pos-receipt-active-main {
    min-width: 0;
}

.pos-receipt-active-bar .pos-receipt-preview-wrap {
    min-height: 280px;
}

.pos-receipt-active-bar .pos-receipt-preview-stage {
    min-height: 240px;
    max-height: 320px;
}

.pos-receipt-picker--settings .pos-receipt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pos-receipt-active-bar {
    margin-bottom: 14px;
    padding: 14px 16px;
}

.pos-receipt-active-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.pos-receipt-settings-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--pos-border);
    background: var(--pos-card);
    color: var(--pos-muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.pos-receipt-settings-link:hover {
    border-color: var(--pos-pink);
    color: var(--pos-maroon);
}

.pos-receipt-quick-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pos-receipt-quick-chip {
    flex: 0 1 auto;
    white-space: nowrap;
}

.pos-receipt-active-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pos-receipt-active-title {
    margin: 0 0 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.pos-receipt-active-note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--pos-muted);
}

.bq-settings-save-row {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 16px;
    padding: 12px 0;
    display: flex;
    justify-content: flex-end;
    background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--pos-bg, #faf7f9) 70%, transparent) 30%, var(--pos-bg, #faf7f9) 100%);
}

.bq-settings-save-row .pos-btn-pay {
    min-width: 220px;
    min-height: 48px;
    font-size: 0.9rem;
}

@media (min-width: 900px) {
    .bq-settings-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bq-settings-panel--wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .pos-receipt-format-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-receipt-picker-layout--stack {
        grid-template-columns: 1fr !important;
    }

    .pos-receipt-studio__body {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    }
}

@media (max-width: 900px) {
    .pos-receipt-studio__body {
        grid-template-columns: 1fr;
    }

    .pos-receipt-studio__formats {
        border-right: none;
        border-bottom: 1px solid var(--pos-border);
    }

    .pos-receipt-format-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bq-settings-topbar .pos-topbar-actions {
        width: 100%;
    }

    .bq-settings-topbar .pos-topbar-actions .pos-chip-btn {
        flex: 1 1 calc(50% - 4px);
    }

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

    .pos-receipt-studio__head {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-receipt-studio__meta {
        width: 100%;
    }

    .pos-receipt-studio__pill,
    .pos-receipt-studio__settings {
        flex: 1 1 auto;
        justify-content: center;
    }

    .pos-receipt-preview-wrap--studio .pos-receipt-preview-stage {
        min-height: 220px;
    }

    .pos-receipt-active-layout {
        grid-template-columns: 1fr;
    }

    .pos-receipt-active-bar .pos-receipt-preview-stage {
        min-height: 200px;
        max-height: 280px;
    }

    .pos-receipt-picker-layout--stack {
        grid-template-columns: 1fr;
    }

    .pos-receipt-active-top {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-receipt-settings-link {
        width: 100%;
        justify-content: center;
    }

    .pos-receipt-quick-strip {
        gap: 6px;
    }

    .pos-receipt-quick-chip {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }

    .pos-receipt-active-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-receipt-active-inner .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    .pos-receipt-picker--settings .pos-receipt-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-settings-save-row .pos-btn-pay {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pos-receipt-picker--settings .pos-receipt-cards {
        grid-template-columns: 1fr;
    }

    .bq-settings-module-chips .pos-chip-btn {
        flex: 1 1 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ── Billing Reports Module ─────────────────────────────────────────────── */
.bq-reports-app {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 16px 20px;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.bq-reports-app > .bq-topbar,
.bq-reports-app > .bq-page-header,
.bq-reports-app > .bq-connect-banner,
.bq-reports-app > .bq-reports-filter,
.bq-reports-app > .bq-reports-layout {
    margin: 0;
}

.bq-reports-app .bq-page-header,
.bq-reports-app > .bq-topbar {
    padding: 12px 14px;
    margin: 0;
}

.bq-reports-filter {
    padding: 14px 16px;
    margin: 0;
    background: #fff;
    border: 1px solid rgba(30, 64, 175, 0.12);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(30, 64, 175, 0.04);
}

.bq-reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px 14px;
    align-items: end;
}

.bq-reports-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted, #6b5b63);
}

.bq-reports-filter-field .bq-form-control {
    min-height: 40px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.bq-reports-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.bq-reports-app {
    padding: 6px clamp(12px, 1.8vw, 20px) 20px;
    display: grid;
    gap: 12px;
    max-width: 1400px;
}

.bq-reports-app > .bq-page-header,
.bq-reports-app > .bq-topbar,
.bq-reports-app > .bq-panel,
.bq-reports-app > .bq-flash {
    margin: 0;
}

.bq-reports-app .bq-panel-pad {
    padding: 12px 14px;
}

.bq-reports-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    min-width: 0;
}

.bq-reports-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.bq-reports-filter-note {
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--pos-maroon) 10%, transparent);
    font-size: 0.8rem;
    color: var(--pos-muted);
    line-height: 1.4;
}

.bq-reports-section-head {
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--pos-maroon) 12%, transparent);
    border-radius: 12px;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--pos-maroon) 6%, transparent);
}

.bq-reports-section-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pos-text);
}

.bq-reports-section-head h2 i {
    color: var(--pos-maroon);
}

.bq-reports-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.bq-reports-app .bq-stat-card {
    margin: 0;
    padding: 12px 14px;
}

.bq-reports-app .bq-stat-label {
    color: var(--pos-muted);
}

.bq-reports-app .bq-stat-value {
    color: var(--pos-text);
}

.bq-reports-app .bq-stat-card.is-accent .bq-stat-value {
    color: #fff;
}

.bq-report-table-panel {
    margin: 0;
    overflow: hidden;
}

.bq-report-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pos-border);
    background: var(--pos-panel-head-bg, linear-gradient(180deg, #fff 0%, #f3f7fd 100%));
}

.bq-report-table-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--pos-text);
}

.bq-report-table-meta {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: var(--pos-muted, #6b5b63);
}

.bq-report-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-report-export-actions .pos-chip-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bq-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
}

.bq-report-data-table {
    width: 100%;
    min-width: 560px;
    margin: 0;
}

.bq-report-data-table thead th {
    white-space: nowrap;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 12px;
}

.bq-report-data-table tbody td {
    font-size: 0.88rem;
    vertical-align: middle;
    padding: 10px 12px;
}

/* Hide legacy in-page report listing chips (sidebar is the nav) */
.bq-reports-pills {
    display: none !important;
}

@media (max-width: 1100px) {
    .bq-reports-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .bq-reports-app {
        padding: 10px 12px 18px;
        gap: 12px;
    }

    .bq-reports-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bq-reports-filter-actions {
        grid-column: 1 / -1;
    }

    .bq-reports-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .bq-report-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .bq-report-export-actions {
        width: 100%;
    }

    .bq-report-export-actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 42px;
    }

    .bq-report-data-table {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .bq-reports-filter-grid {
        grid-template-columns: 1fr;
    }

    .bq-reports-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Date filter bar */
.bq-reports-filter {
    padding: 14px 16px;
    margin: 0;
    background: #fff;
    border: 1px solid rgba(122, 28, 46, 0.1);
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(61, 42, 50, 0.05);
}

.bq-reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.bq-reports-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted, #6b5b63);
}

.bq-reports-filter-field .bq-form-control {
    min-height: 40px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.bq-reports-filter-field .flatpickr-input[readonly] {
    background: #fff;
    cursor: pointer;
}

.bq-reports-app .flatpickr-calendar {
    border: 1px solid #dec2ce;
    box-shadow: 0 18px 40px rgba(70, 20, 42, 0.26);
}

.bq-reports-app .flatpickr-day.selected,
.bq-reports-app .flatpickr-day.startRange,
.bq-reports-app .flatpickr-day.endRange {
    background: var(--pos-maroon);
    border-color: var(--pos-maroon);
}

.bq-reports-app .flatpickr-day:hover {
    background: #f6eaf0;
    border-color: #ebd6e0;
}

.bq-reports-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.bq-reports-filter-actions .pos-chip-btn {
    margin: 0;
}

.bq-reports-filter-note {
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid rgba(122, 28, 46, 0.08);
    font-size: 0.82rem;
    color: var(--pos-muted, #6b5b63);
    line-height: 1.45;
}

.bq-report-table-panel {
    margin: 0;
    overflow: hidden;
}

.bq-report-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--pos-border, #e8dbe2);
    background: linear-gradient(180deg, #fff 0%, #f3f7fd 100%);
}

.bq-report-table-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--pos-maroon, #1e3a8a);
}

.bq-report-table-meta {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--pos-muted, #6b5b63);
}

.bq-report-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-report-export-actions .pos-chip-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bq-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bq-report-data-table {
    width: 100%;
    min-width: 560px;
    margin: 0;
}

.bq-report-data-table thead th {
    white-space: nowrap;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bq-report-data-table tbody td {
    font-size: 0.88rem;
    vertical-align: middle;
}

.bq-reports-table-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e8dbe2;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #fcf8fa 100%);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(66, 32, 47, 0.05);
}

.bq-reports-table-filter .bq-reports-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.bq-reports-table-filter .bq-reports-filter-field span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7a5a67;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bq-reports-table-filter .bq-form-control {
    min-height: 38px;
    border: 1px solid #dac6d0;
    border-radius: 10px;
    background: #fff;
}

.bq-reports-table-filter .bq-reports-filter-actions .pos-chip-btn {
    min-height: 38px;
    border-radius: 10px;
}

/* Report section chips removed — use sidebar Billing Reports submenu */
.bq-reports-pills,
.bq-reports-pill {
    display: none !important;
}

.bq-reports-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(122, 28, 46, 0.12);
    background: #fff;
    color: var(--pos-maroon, #6b1535);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bq-reports-pill i {
    color: #9e2a42;
    font-size: 0.72rem;
}

.bq-reports-pill.is-active,
.bq-reports-pill:hover {
    background: linear-gradient(135deg, #7a1c2e 0%, #9e2a42 100%);
    border-color: transparent;
    color: #fff;
}

.bq-reports-pill.is-active i,
.bq-reports-pill:hover i {
    color: #fff;
}

.bq-reports-layout,
.bq-reports-main {
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

.bq-reports-section {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.bq-reports-section.is-visible {
    display: flex;
}

.bq-reports-section-head {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--pos-maroon) 12%, transparent);
    border-left: 4px solid var(--pos-maroon, #166534);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--pos-maroon) 6%, transparent);
}

.bq-reports-section-head h2 {
    margin: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.08rem);
    font-weight: 700;
    color: var(--pos-text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-reports-section-head h2 i {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--pos-soft-grad, linear-gradient(145deg, #ffe8f2, #ffd0e4));
    color: var(--pos-maroon, #7a1c2e);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bq-reports-section-head p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--pos-muted, #6b5b63);
    line-height: 1.45;
}

.bq-reports-app .bq-reports-section-head p,
.bq-reports-app .bq-panel-head p,
.bq-reports-app .bq-stat-note {
    display: none;
}

/* KPI / stat blocks â€” no double margins */
.bq-reports-app .bq-stat-grid,
.bq-reports-app .bq-reports-stat-grid,
.bq-reports-app .bq-board-2,
.bq-reports-app .bq-reports-split {
    margin: 0;
    gap: 12px;
}

.bq-reports-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bq-reports-app .bq-stat-card {
    margin: 0;
    border-radius: 12px;
    padding: 14px 16px;
}

.bq-reports-app .bq-stat-card.is-accent {
    background: var(--pos-chip-grad, linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light)));
    color: #fff;
    border: 1px solid transparent;
}

.bq-reports-app .bq-stat-card.is-accent .bq-stat-label {
    color: rgba(255, 255, 255, 0.85);
}

.bq-reports-app .bq-stat-card.is-accent .bq-stat-value {
    color: #fff;
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
}

.bq-reports-app .bq-stat-card.is-accent .bq-stat-note {
    color: rgba(255, 255, 255, 0.75);
}

.bq-reports-app .bq-stat-icon {
    background: var(--pos-soft-grad, linear-gradient(145deg, #ffe8f2, #ffd0e4));
}

.bq-reports-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 0;
}

.bq-reports-kpi {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(122, 28, 46, 0.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bq-reports-kpi span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pos-muted, #6b5b63);
}

.bq-reports-kpi strong {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--pos-maroon, #6b1535);
    word-break: break-word;
}

.bq-reports-kpi.is-highlight {
    background: var(--pos-soft-grad, linear-gradient(135deg, rgba(122, 28, 46, 0.08) 0%, rgba(158, 42, 66, 0.04) 100%));
    border-color: color-mix(in srgb, var(--pos-maroon) 18%, transparent);
}

.bq-reports-kpi.is-highlight strong {
    color: var(--pos-maroon, #7a1c2e);
}

.bq-reports-footnote {
    margin: 0;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--pos-muted, #6b5b63);
    line-height: 1.5;
    background: #fff;
    border: 1px solid rgba(122, 28, 46, 0.08);
    border-radius: 10px;
}

.bq-reports-footnote a {
    color: var(--pos-maroon, #9e2a42);
    font-weight: 600;
}

/* Panels & tables */
.bq-reports-app .bq-reports-panel,
.bq-reports-app .bq-panel.bq-reports-panel {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(61, 42, 50, 0.05);
}

.bq-reports-app .bq-reports-panel--spaced {
    margin-top: 0;
}

.bq-reports-app .bq-panel-head {
    padding: 12px 16px;
    margin: 0;
}

.bq-reports-app .bq-panel-head h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
}

.bq-reports-app .bq-panel-head p {
    margin: 4px 0 0;
}

.bq-reports-app .bq-table-wrap {
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.bq-reports-app .bq-table {
    margin: 0;
    width: 100%;
    min-width: 0;
}

.bq-reports-app .bq-table th,
.bq-reports-app .bq-table td {
    padding: 10px 14px;
    white-space: nowrap;
}

.bq-reports-app .bq-table td:first-child,
.bq-reports-app .bq-table th:first-child {
    white-space: normal;
    min-width: 7.5rem;
}

.bq-reports-app .bq-table-empty {
    padding: 20px 14px !important;
    white-space: normal !important;
}

/* DataTables inside reports â€” tighten spacing */
.bq-reports-app .dataTables_wrapper {
    margin: 0;
    padding: 0;
    width: 100% !important;
}

.bq-reports-app .dataTables_wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.bq-reports-app .bq-dt-controls,
.bq-reports-app .bq-dt-meta {
    padding: 10px 14px;
    margin: 0;
    gap: 10px 12px;
}

.bq-reports-app .bq-dt-controls {
    border: 1px solid #ead9e1;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #fff;
    box-shadow: inset 0 -1px 0 #f1e7ec;
}

.bq-reports-app .bq-table-wrap>.dataTables_wrapper>.bq-dt-controls:first-child {
    border-top: none;
}

.bq-reports-app .dataTables_wrapper .dataTables_filter input {
    max-width: 100%;
    width: min(220px, 100%);
    border: 1px solid #dbc2ce;
    border-radius: 10px;
    min-height: 34px;
    padding: 7px 10px;
}

.bq-reports-app .bq-dt-controls .dataTables_filter label,
.bq-reports-app .bq-dt-controls .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #705a64;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bq-reports-app .bq-dt-controls .dataTables_filter {
    margin-left: auto;
}

.bq-reports-app .bq-reports-kpi {
    padding: 10px;
}

.bq-reports-app .bq-dt-column-filters {
    border: 1px solid #ead9e1;
    border-top: 0;
    background: #fff;
    padding: 8px 10px;
    margin-bottom: 0;
    border-radius: 0 0 12px 12px;
}

.bq-reports-app .bq-dt-column-filters__title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6a3a4d;
    margin-bottom: 8px;
    cursor: pointer;
    list-style: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 2px;
}

.bq-reports-app .bq-dt-column-filters__title::-webkit-details-marker {
    display: none;
}

.bq-reports-app .bq-dt-column-filters__title::after {
    content: 'â–¾';
    float: right;
    color: #8a5f73;
}

.bq-reports-app .bq-dt-column-filters:not([open]) .bq-dt-column-filters__grid,
.bq-reports-app .bq-dt-column-filters:not([open]) .bq-dt-column-filters__actions {
    display: none;
}

.bq-reports-app .bq-dt-column-filters__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.bq-reports-app .bq-dt-col-filter {
    display: grid;
    gap: 4px;
}

.bq-reports-app .bq-dt-col-filter span {
    font-size: 0.72rem;
    color: #6f5a63;
}

.bq-reports-app .bq-dt-col-filter__input {
    width: 100%;
    border: 1px solid #dbc2ce;
    border-radius: 8px;
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.78rem;
    background: #fff;
}

.bq-reports-app .bq-dt-column-filters__actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.bq-reports-app .bq-dt-column-filters__actions .pos-chip-btn {
    min-height: 34px;
    border-radius: 8px;
}

.bq-reports-app .bq-dt-controls--with-export {
    row-gap: 10px;
}

.bq-reports-app .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-reports-app .dt-buttons .dt-button {
    border-radius: 999px !important;
    border: 1px solid #d5b7c5 !important;
    background: #fff !important;
    color: #531338 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 7px 12px !important;
}

.bq-reports-app .dt-buttons .dt-button:hover {
    background: #f8e9f1 !important;
    border-color: #be9aad !important;
}

.bq-reports-pl-card.bq-reports-panel {
    padding: 16px 18px;
    max-width: 480px;
}

.bq-reports-pl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin: 0;
    border-bottom: 1px dashed rgba(122, 28, 46, 0.12);
    font-size: 0.9rem;
}

.bq-reports-pl-row:last-child {
    border-bottom: none;
}

.bq-reports-pl-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 2px solid rgba(122, 28, 46, 0.2);
    font-weight: 700;
    font-size: 1rem;
}

.bq-reports-pl-row .is-positive {
    color: #1a7a4a;
}

.bq-reports-pl-row .is-negative {
    color: #9e2a42;
}

.bq-reports-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.bq-reports-badge.is-ok {
    background: rgba(26, 122, 74, 0.12);
    color: #1a7a4a;
}

.bq-reports-badge.is-warn {
    background: rgba(180, 120, 20, 0.15);
    color: #8a5a00;
}

.bq-reports-badge.is-danger {
    background: rgba(158, 42, 66, 0.12);
    color: #9e2a42;
}

/* Reports tables â†’ card stack on tablet/phone (same pattern as other modules) */
@media (max-width: 1024px) {
    .bq-reports-app .bq-table-wrap,
    .bq-reports-app .bq-table-wrap .dataTables_wrapper,
    .bq-reports-app .dataTables_scroll,
    .bq-reports-app .dataTables_scrollBody {
        overflow: visible !important;
        max-width: 100%;
    }

    .bq-reports-app .bq-table,
    .bq-reports-app .bq-table.bq-reports-table,
    .bq-reports-app table.dataTable.bq-reports-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    .bq-reports-app .bq-table th,
    .bq-reports-app .bq-table td {
        white-space: normal;
    }

    .bq-reports-app table.bq-table-responsive tbody td,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td {
        white-space: normal;
        word-break: break-word;
    }

    .bq-reports-app table.bq-table-responsive tbody td.bq-table-empty,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td.bq-table-empty,
    .bq-reports-app table.bq-table-responsive tbody td[colspan],
    .bq-reports-app table.dataTable.bq-table-responsive tbody td[colspan] {
        display: block !important;
        justify-content: center;
        text-align: center !important;
        padding: 18px 12px !important;
    }

    .bq-reports-app table.bq-table-responsive tbody td.bq-table-empty::before,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td.bq-table-empty::before,
    .bq-reports-app table.bq-table-responsive tbody td[colspan]::before,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td[colspan]::before {
        content: none !important;
        display: none !important;
    }

    .bq-reports-app .dt-buttons {
        width: 100%;
    }

    .bq-reports-app .dt-buttons .dt-button {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 1100px) {
    .bq-reports-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-reports-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .bq-reports-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-reports-app .bq-board-2,
    .bq-reports-app .bq-reports-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .bq-reports-pills,
    .bq-reports-pill {
        display: none !important;
    }

    .bq-reports-pill {
        scroll-snap-align: start;
        min-height: 40px;
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .bq-report-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-report-export-actions {
        width: 100%;
    }

    .bq-report-export-actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 42px;
    }

    .bq-report-data-table {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .bq-reports-app {
        padding: 10px 10px 24px;
        gap: 12px;
    }

    .bq-reports-app>.bq-topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .bq-reports-app>.bq-topbar .bq-topbar-actions {
        margin-left: 0;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

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

    .bq-reports-filter {
        padding: 12px 14px;
    }

    .bq-reports-filter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bq-reports-table-filter {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
        margin-bottom: 12px;
    }

    .bq-reports-table-filter .bq-reports-filter-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: stretch;
    }

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

    .bq-reports-filter-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bq-reports-filter-actions .pos-chip-btn {
        flex: 1;
        justify-content: center;
        min-height: 40px;
    }

    .bq-reports-stat-grid {
        grid-template-columns: 1fr;
    }

    .bq-reports-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .bq-reports-kpi {
        padding: 12px;
        min-width: 0;
    }

    .bq-reports-kpi strong {
        font-size: 1rem;
        word-break: break-word;
    }

    .bq-reports-pl-card.bq-reports-panel {
        max-width: none;
    }

    .bq-reports-app .bq-reports-panel,
    .bq-reports-app .bq-panel.bq-reports-panel {
        padding: 12px;
        border-radius: 12px;
    }

    .bq-reports-app .bq-panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 10px;
    }

    .bq-reports-footnote {
        font-size: 0.8rem;
        line-height: 1.45;
        word-break: break-word;
    }

    .bq-reports-app .bq-dt-controls,
    .bq-reports-app .bq-dt-meta {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
    }

    .bq-reports-app .bq-dt-controls--with-export {
        gap: 10px;
    }

    .bq-reports-app .bq-dt-controls .dataTables_filter {
        margin-left: 0 !important;
        width: 100%;
    }

    .bq-reports-app .bq-dt-controls .dataTables_filter label {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .bq-reports-app .bq-dt-controls .dataTables_length {
        width: 100%;
    }

    .bq-reports-app .bq-dt-controls .dataTables_length label {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .bq-reports-app .bq-dt-controls .dataTables_filter input,
    .bq-reports-app .bq-dt-controls .dataTables_length select {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .bq-reports-app .bq-dt-column-filters__grid {
        grid-template-columns: 1fr;
    }

    .bq-reports-app .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bq-reports-app .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: max-content;
    }

    .bq-reports-app table.bq-table-responsive tbody tr,
    .bq-reports-app table.dataTable.bq-table-responsive tbody tr {
        margin-bottom: 10px !important;
        padding: 8px 10px;
        border-radius: 12px;
    }

    .bq-reports-app table.bq-table-responsive tbody td,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td {
        padding: 7px 2px !important;
        font-size: 0.86rem;
        gap: 10px;
    }

    .bq-reports-app table.bq-table-responsive tbody td::before,
    .bq-reports-app table.dataTable.bq-table-responsive tbody td::before {
        font-size: 0.68rem;
        max-width: 46%;
        line-height: 1.3;
    }

    .bq-reports-badge {
        white-space: normal;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .bq-reports-kpi-row {
        grid-template-columns: 1fr;
    }

    .bq-reports-section-head {
        padding: 12px 14px;
    }

    .bq-reports-app>.bq-topbar .bq-topbar-actions .pos-chip-btn,
    .bq-reports-table-filter .bq-reports-filter-actions .pos-chip-btn {
        flex: 1 1 100%;
    }
}

/* â”€â”€ Variation Products Module â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bq-variants-desk {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px 24px;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.bq-variants-desk>.bq-topbar,
.bq-variants-desk>.bq-connect-banner,
.bq-variants-desk>.bq-variants-kpi,
.bq-variants-desk>.bq-variants-board,
.bq-variants-desk>.bq-variants-panel {
    margin: 0;
}

.bq-variants-kpi.bq-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bq-variants-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 14px;
    align-items: start;
}

.bq-variants-panel .bq-panel-body {
    padding: 14px 16px;
}

.bq-variants-muted {
    color: var(--pos-muted, #6b5b63);
    font-size: 0.82rem;
}

.bq-variants-attr-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bq-variants-attr-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    font-size: 0.88rem;
}

.bq-variants-attr-list li strong {
    color: var(--pos-maroon);
    font-weight: 700;
}

.bq-variants-attr-btn {
    width: 100%;
    justify-content: center;
}

.bq-variants-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 2px 0;
}

.bq-variants-variant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(122, 28, 46, 0.1);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bq-variants-variant-row:hover {
    border-color: rgba(158, 42, 66, 0.35);
    box-shadow: 0 4px 12px rgba(61, 42, 50, 0.08);
}

.bq-variants-variant-row strong {
    display: block;
    font-size: 0.88rem;
    color: #3d2a32;
}

.bq-variants-variant-row span:not(.bq-badge) {
    display: block;
    font-size: 0.78rem;
    color: var(--pos-muted, #6b5b63);
    margin-top: 2px;
}

.bq-variants-empty {
    margin: 0;
    padding: 12px;
    text-align: center;
    color: var(--pos-muted, #6b5b63);
    font-size: 0.88rem;
}

.bq-variants-table .pos-chip-btn {
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .bq-variants-kpi.bq-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-variants-board {
        grid-template-columns: 1fr;
    }

    .bq-variants-aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Product list â€” inline variation chips */
.bq-product-variations-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.bq-variation-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    border: 1px solid rgba(122, 28, 46, 0.12);
    font-size: 0.72rem;
    line-height: 1.3;
    max-width: 100%;
}

.bq-variation-chip strong {
    color: var(--pos-maroon);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.bq-variation-chip span {
    color: var(--pos-muted, #6b5b63);
}

@media (max-width: 639px) {
    .bq-variation-chip {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    .bq-variation-chip strong {
        max-width: none;
        white-space: normal;
    }
}

@media (max-width: 639px) {
    .bq-variants-desk {
        padding: 12px 14px 20px;
    }

    .bq-variants-kpi.bq-stat-grid {
        grid-template-columns: 1fr;
    }

    .bq-variants-aside {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€â”€ Global spacing polish (panels, forms, layout rhythm) â”€â”€â”€ */
.bq-panel-head {
    padding: var(--bq-space-md) var(--bq-space-lg);
}

.bq-panel-head h2+p,
.bq-panel-head p {
    margin-top: 6px;
}

.bq-stat-grid,
.bq-module-grid,
.bq-board,
.bq-board-2,
.bq-dashboard-kpi,
.bq-dashboard-metrics {
    gap: var(--bq-section-gap);
}

.bq-stat-grid,
.bq-module-grid,
.bq-board,
.bq-board-2,
.bq-dashboard-kpi {
    margin-bottom: var(--bq-section-gap);
}

.bq-stat-card,
.bq-module-card,
.bq-dashboard-kpi-card {
    padding: var(--bq-space-lg);
}

.bq-topbar {
    padding: var(--bq-space-md) var(--bq-space-lg);
    margin-bottom: var(--bq-section-gap);
}

.bq-workspace-bar {
    padding: 10px var(--bq-space-lg);
}

.bq-form-actions {
    margin-top: var(--bq-space-lg);
    padding-top: var(--bq-space-md);
    gap: 12px;
}

.bq-form-shell .grid.gap-6 {
    gap: var(--bq-section-gap) !important;
}

.bq-form-shell .form-card {
    padding: var(--bq-space-lg);
}

.bq-form-shell .form-card h3 {
    margin: 0 0 var(--bq-space-md);
}

.bq-dues-grid {
    gap: var(--bq-space-md);
    padding: var(--bq-space-md) var(--bq-space-lg);
}

.bq-alert {
    margin-bottom: var(--bq-space-md);
    padding: 12px var(--bq-space-md);
}

.bq-flash,
.bq-flash-error,
.bq-flash-info,
.bq-flash-success {
    margin-bottom: var(--bq-space-md, 14px);
    padding: 10px var(--bq-space-md, 14px);
}

/* GST disabled globally â€” hide tax labels on bills, forms, and reports */
body[data-gst-enabled="0"] .gst-only,
body.gst-disabled .gst-only {
    display: none !important;
}

.bq-settings-gst-toggle {
    margin-bottom: 14px;
}

.bq-settings-switch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.bq-settings-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bq-settings-switch-ui {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d8c4cc;
    position: relative;
    transition: background 0.2s ease;
}

.bq-settings-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.bq-settings-switch input:checked+.bq-settings-switch-ui {
    background: var(--pos-maroon, #6b1535);
}

.bq-settings-switch input:checked+.bq-settings-switch-ui::after {
    transform: translateX(20px);
}

.bq-settings-switch-copy {
    display: grid;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--pos-muted);
}

.bq-settings-switch-copy strong {
    color: var(--pos-text, #2a1220);
    font-size: 0.88rem;
}

.bq-settings-gst-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff8e8;
    border: 1px solid #f0dfa8;
    color: #7a5a12;
    font-size: 0.78rem;
    line-height: 1.45;
}

.bq-settings-more {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--pos-border, #eadde4);
}

.bq-settings-more summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted, #7a6570);
    list-style: none;
    user-select: none;
}

.bq-settings-more summary::-webkit-details-marker {
    display: none;
}

.bq-settings-more summary::before {
    content: '+ ';
    font-weight: 700;
}

.bq-settings-more[open] summary::before {
    content: 'âˆ’ ';
}

.bq-settings-more-body {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.bq-settings-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--pos-muted, #7a6570);
    cursor: pointer;
}

.bq-settings-inline-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--pos-maroon, #6b1535);
}

.bq-settings-more-fields {
    max-width: 320px;
}

.bq-settings-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.bq-settings-module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    font-size: 0.72rem;
    color: var(--pos-muted, #7a6570);
}

.bq-settings-module-card__icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--pos-pink-soft, #fdf2f6);
    color: var(--pos-maroon, #6b1535);
    font-size: 0.85rem;
}

.bq-settings-module-card strong {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pos-text, #2a1220);
    line-height: 1.25;
}

.bq-settings-module-fields {
    margin-bottom: 14px;
}

.bq-settings-gst-panel {
    border-left: 3px solid color-mix(in srgb, var(--pos-maroon) 25%, var(--pos-border));
}

.bq-settings-gst-toggle {
    margin-top: 4px;
}

.bq-settings-gst-fields {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--pos-border, #eadde4);
}

.bq-settings-gst-off-note {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8f2f5;
    border: 1px solid color-mix(in srgb, var(--pos-border) 80%, transparent);
    font-size: 0.74rem;
    color: var(--pos-muted, #7a6570);
    line-height: 1.45;
    flex: 1;
}

.bq-settings-module-options {
    padding-top: 14px;
    margin-top: auto;
    border-top: 1px dashed var(--pos-border, #eadde4);
    display: grid;
    gap: 6px;
}

.pos-receipt-contact,
.pos-receipt-hours {
    margin: 4px 0 0;
    font-size: 0.72rem;
    color: var(--pos-muted, #7a6570);
    line-height: 1.35;
}

.pos-receipt-shop-meta {
    margin-bottom: 8px;
}

.bq-settings-module-options-note {
    font-size: 0.74rem;
    color: var(--pos-muted, #7a6570);
    line-height: 1.4;
}

.bq-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 18px;
    align-items: start;
}

.bq-settings-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.bq-settings-aside {
    position: sticky;
    top: 12px;
    min-width: 0;
}

.bq-settings-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.bq-settings-duo>.bq-settings-panel {
    display: block;
}

[data-settings-pane][hidden],
.bq-settings-duo[hidden] {
    display: none !important;
}

.bq-settings-panel-body {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.bq-settings-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.bq-settings-stack .pos-field {
    margin: 0;
}

.bq-settings-billing-panel {
    border-left: 3px solid color-mix(in srgb, var(--pos-gold, #c9a227) 35%, var(--pos-border));
}

.bq-settings-fields.pos-form-grid {
    margin-bottom: 0;
}

.bq-settings-fields--2.pos-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bq-settings-gst-rate-block {
    display: grid;
    gap: 10px;
    margin: 0;
}

.bq-settings-gst-rate-custom {
    max-width: none;
}

.bq-settings-gst-rate-custom .pos-input {
    max-width: 140px;
}

.bq-settings-gst-fields .bq-settings-fields--2 {
    margin-top: 4px;
}

.bq-settings-profile-grid {
    display: grid;
    gap: 0;
}

.bq-settings-panel--profile .bq-settings-subsection {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px dashed var(--pos-border, #eadde4);
}

.bq-settings-panel--profile .bq-settings-subsection:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.bq-settings-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    color: var(--pos-muted, #7a6570);
    line-height: 1.35;
}

.bq-settings-gst-rate-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-text, #2a1220);
}

.bq-settings-gst-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bq-settings-gst-rate-btn {
    min-width: 52px;
    padding: 8px 12px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 10px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-maroon, #6b1535);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bq-settings-gst-rate-btn:hover {
    border-color: color-mix(in srgb, var(--pos-maroon) 40%, var(--pos-border));
    background: #fdf8fa;
}

.bq-settings-gst-rate-btn.is-active {
    background: var(--pos-maroon, #6b1535);
    border-color: var(--pos-maroon, #6b1535);
    color: #fff;
}

.bq-settings-panel--receipt .pos-receipt-picker--settings {
    margin-top: 4px;
}

.bq-settings-panel--receipt .pos-receipt-picker-layout--stack {
    grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
    .bq-settings-layout {
        grid-template-columns: 1fr;
    }

    .bq-settings-aside {
        position: static;
        order: -1;
    }

    .bq-settings-fields--2,
    .bq-settings-fields--2.pos-form-grid {
        grid-template-columns: 1fr;
    }

    .bq-settings-duo {
        grid-template-columns: 1fr;
    }

    .bq-settings-preview-slip {
        padding: 16px 14px;
    }
}

@media (max-width: 768px) {
    .bq-settings-app {
        padding: 0 10px 110px;
    }

    .bq-settings-topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

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

    .bq-settings-topbar .pos-topbar-title {
        font-size: 0.95rem;
    }

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

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

    .bq-settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 6px;
        gap: 6px;
    }

    .bq-settings-tab {
        flex: 0 0 auto;
        min-height: 40px;
        white-space: nowrap;
    }

    .bq-settings-preview,
    .bq-settings-panel {
        padding: 14px !important;
        border-radius: 14px;
    }

    .bq-settings-preview-slip {
        padding: 16px 14px;
        gap: 10px;
    }

    .bq-settings-preview-brand strong,
    #preview_name {
        font-size: 1.05rem;
    }

    .bq-settings-gst-rate-custom {
        max-width: none;
    }

    .bq-settings-gst-rate-custom .pos-input {
        max-width: none;
        width: 100%;
    }

    .bq-settings-panel--receipt .pos-receipt-picker-layout--stack {
        grid-template-columns: 1fr;
    }

    .bq-settings-save-row {
        justify-content: stretch;
        padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .bq-settings-save-row .pos-btn-pay {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .bq-settings-topbar .pos-topbar-actions .pos-chip-btn {
        flex: 1 1 100%;
    }

    .bq-settings-preview-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-settings-preview-meta span {
        justify-content: center;
    }

    .bq-settings-preview-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .bq-settings-preview-row strong,
    .bq-settings-preview-row #preview_gst,
    .bq-settings-preview-row #preview_gstin,
    .bq-settings-preview-row #preview_gst_rate,
    .bq-settings-preview-row #preview_gst_scope,
    .bq-settings-preview-row #preview_receipt {
        text-align: left;
    }
}

.bq-settings-subsection {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px dashed var(--pos-border, #eadde4);
}

.bq-settings-subsection:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.bq-settings-subsection h3 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
}

.bq-settings-fields--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bq-settings-textarea {
    min-height: 84px;
    resize: vertical;
}

.bq-settings-advanced {
    border: 1px dashed var(--pos-border, #eadde4);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.bq-settings-advanced summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pos-maroon, #6b1535);
    font-size: 0.8rem;
    font-weight: 700;
}

.bq-settings-advanced summary::-webkit-details-marker {
    display: none;
}

.bq-settings-advanced-body {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.bq-settings-module-card small {
    display: block;
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--pos-muted, #7a6570);
}

.bq-settings-module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
}

.bq-settings-module-tags span {
    padding: 2px 6px;
    border-radius: 999px;
    background: #f8f2f5;
    font-size: 0.62rem;
    color: var(--pos-muted, #7a6570);
}

.bq-settings-preview {
    padding: 18px !important;
    overflow: hidden;
}

.bq-settings-preview-head {
    margin-bottom: 14px;
}

.bq-settings-preview-head .pos-panel-title {
    margin: 0 0 4px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bq-settings-preview-head .bq-settings-panel-desc {
    margin: 0;
    font-size: 0.8rem;
    color: #7a6570;
}

.bq-settings-preview-card {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.bq-settings-preview-slip {
    display: grid;
    gap: 12px;
    padding: 18px 16px;
    border: 1px dashed #d9c0cc;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(66, 32, 47, 0.06);
    color: var(--pos-text, #2a1220);
}

.bq-settings-preview-brand {
    display: grid;
    gap: 6px;
    min-width: 0;
    text-align: center;
    padding-bottom: 4px;
}

.bq-settings-preview-brand strong,
#preview_name {
    display: block;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--pos-maroon, #6b1535);
    word-break: break-word;
}

.bq-settings-preview-brand em,
#preview_tagline {
    display: block;
    margin: 0;
    font-style: italic;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #7a6570;
    word-break: break-word;
}

.bq-settings-preview-address,
.bq-settings-preview-hours,
.bq-settings-preview-foot {
    margin: 0;
    line-height: 1.5;
    word-break: break-word;
}

.bq-settings-preview-address {
    font-size: 0.82rem;
    color: #3a2430;
    text-align: center;
}

.bq-settings-preview-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: #7a6570;
    font-size: 0.76rem;
}

.bq-settings-preview-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #faf5f7;
    border: 1px solid #ead7e0;
}

.bq-settings-preview-meta i {
    color: var(--pos-maroon, #6b1535);
    font-size: 0.74rem;
}

.bq-settings-preview-hours {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #7a6570;
    text-align: center;
}

.bq-settings-preview-hours i {
    color: var(--pos-maroon, #6b1535);
}

.bq-settings-preview-foot {
    font-size: 0.78rem;
    color: #7a6570;
    text-align: center;
}

.bq-settings-preview-rule,
.bq-settings-preview hr {
    margin: 2px 0;
    border: none;
    border-top: 1px dashed #e0c8d3;
}

.bq-settings-preview-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border: 1px solid #ead7e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fcf8fa;
}

.bq-settings-preview-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0e2e8;
}

.bq-settings-preview-row:last-child {
    border-bottom: none;
}

.bq-settings-preview-row span {
    flex: 0 0 auto;
    min-width: 4.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a7380;
    line-height: 1.4;
    padding-top: 1px;
}

.bq-settings-preview-row strong,
.bq-settings-preview-row #preview_gst,
.bq-settings-preview-row #preview_gstin,
.bq-settings-preview-row #preview_gst_rate,
.bq-settings-preview-row #preview_gst_scope,
.bq-settings-preview-row #preview_receipt {
    display: block;
    margin: 0;
    flex: 1 1 auto;
    text-align: right;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--pos-maroon, #6b1535);
    word-break: break-word;
}

.bq-settings-preview-row[hidden],
.bq-settings-preview-badge[hidden],
.bq-settings-preview-meta[hidden] {
    display: none !important;
}

.bq-settings-preview-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.bq-settings-preview-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fcf8fa;
    border: 1px solid #ead7e0;
}

.bq-settings-preview-badge span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a7380;
}

.bq-settings-preview-badge strong,
.bq-settings-preview-badge #preview_gst,
.bq-settings-preview-badge #preview_gstin,
.bq-settings-preview-badge #preview_gst_rate,
.bq-settings-preview-badge #preview_gst_scope,
.bq-settings-preview-badge #preview_receipt {
    display: block;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pos-maroon, #6b1535);
    word-break: break-word;
    text-align: right;
}

/* Attributes & customers module polish */
.bq-panel--compact {
    margin-bottom: 18px;
}

.bq-panel-head--stack {
    flex-wrap: wrap;
    gap: 14px;
}

.bq-inline-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: min(100%, 420px);
}

.bq-inline-search .bq-form-control {
    flex: 1 1 200px;
    min-width: 0;
}

.bq-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bq-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pos-maroon), var(--pos-pink));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.bq-stat-grid--customers {
    margin-bottom: 18px;
}

.bq-attr-form {
    display: grid;
    gap: 14px;
}

.bq-attr-form-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr);
    gap: 14px;
    align-items: start;
}

.bq-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.bq-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-muted);
}

.bq-field-hint {
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-attr-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.bq-value-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.bq-value-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    color: var(--pos-maroon);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.bq-dropdown-danger {
    color: #c0392b !important;
}

.bq-table .bq-value-chips .bq-cell-meta {
    margin-top: 0;
}

@media (max-width: 900px) {
    .bq-attr-form-grid {
        grid-template-columns: 1fr;
    }

    .bq-inline-search {
        margin-left: 0;
        width: 100%;
    }

    .bq-panel-head--stack {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .bq-stat-grid--customers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-attr-form-actions {
        justify-content: stretch;
    }

    .bq-attr-form-actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .bq-stat-grid--customers {
        grid-template-columns: 1fr;
    }
}

/* Action dropdown â€” fixed positioning avoids table overflow clipping */
.bq-action-dropdown {
    position: relative;
    display: inline-flex;
}

.bq-action-dropdown .action-toggle i {
    font-size: 0.62rem;
    margin-left: 4px;
}

.bq-action-dropdown__menu,
.action-dropdown .action-menu {
    display: block;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(42, 18, 32, 0.14);
}

.bq-action-dropdown__menu[hidden],
.action-dropdown .action-menu[hidden] {
    display: none !important;
}

.bq-action-dropdown__item,
.bq-action-dropdown__form .bq-action-dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--pos-text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.bq-action-dropdown__item:hover,
.bq-action-dropdown__form .bq-action-dropdown__item:hover {
    background: var(--pos-pink-soft);
    color: var(--pos-maroon);
}

.bq-action-dropdown__form {
    margin: 0;
}

.bq-table-wrap--actions {
    overflow-x: auto;
    overflow-y: visible;
}

.bq-table .bq-td-actions {
    overflow: visible;
    white-space: nowrap;
}

.bq-stock-link {
    display: inline-grid;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.bq-stock-link:hover .bq-cell-title {
    color: var(--pos-maroon);
}

.bq-variation-more {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed var(--pos-border);
    color: var(--pos-maroon);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.bq-variation-more:hover {
    background: var(--pos-pink-soft);
}

.bq-badge--stack {
    margin-top: 4px;
    display: inline-flex;
}

.bq-form-grid--inventory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bq-field--check-row .bq-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
}

.bq-field--check-row .bq-check-row strong {
    display: block;
    color: var(--pos-maroon);
    font-size: 0.88rem;
}

.bq-field--check-row .bq-check-row small {
    display: block;
    margin-top: 2px;
    color: var(--pos-muted);
    font-size: 0.75rem;
}

.bq-field.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.bq-inventory-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: var(--pos-pink-soft);
}

.bq-inventory-note i {
    color: var(--pos-maroon);
    margin-top: 3px;
}

.bq-inventory-note strong {
    display: block;
    color: var(--pos-maroon);
}

.bq-inventory-note p {
    margin: 4px 0 8px;
    font-size: 0.8rem;
    color: var(--pos-muted);
}

.bq-inventory-variant-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.bq-inventory-variant-head,
.bq-inventory-variant-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) minmax(90px, 1fr) 120px 110px;
    gap: 10px;
    align-items: center;
}

.bq-inventory-variant-head {
    padding: 0 4px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-muted);
}

.bq-inventory-variant-row {
    padding: 10px 12px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
}

.bq-inventory-qty-input {
    width: 100%;
    min-width: 0;
}

.bq-inventory-summary {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
}

.bq-inventory-summary strong {
    font-size: 1.35rem;
    color: var(--pos-maroon);
}

.bq-inventory-summary span {
    font-size: 0.78rem;
    color: var(--pos-muted);
}

@media (max-width: 900px) {
    .bq-form-grid--inventory {
        grid-template-columns: 1fr;
    }

    .bq-inventory-variant-head {
        display: none;
    }

    .bq-inventory-variant-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* â”€â”€ Product Reports Module â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bq-product-reports-app {
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* Topbar: maroon header with white text (billing reports white-card rules conflict with themes) */
body[data-pos-theme] .bq-product-reports-app>.bq-topbar,
.bq-product-reports-app>.bq-topbar {
    background: linear-gradient(90deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--pos-shadow);
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar h1,
.bq-product-reports-app>.bq-topbar h1 {
    color: #fff;
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar h1 i,
.bq-product-reports-app>.bq-topbar h1 i {
    color: rgba(255, 255, 255, 0.92);
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar p,
.bq-product-reports-app>.bq-topbar p {
    color: rgba(255, 255, 255, 0.88);
    opacity: 1;
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar .pos-chip-btn,
.bq-product-reports-app>.bq-topbar .pos-chip-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar .pos-chip-btn:hover,
.bq-product-reports-app>.bq-topbar .pos-chip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

body[data-pos-theme] .bq-product-reports-app>.bq-topbar .pos-chip-btn.pos-chip-accent,
.bq-product-reports-app>.bq-topbar .pos-chip-btn.pos-chip-accent {
    background: var(--pos-pink);
    border-color: var(--pos-pink);
    color: #fff;
}

/* KPI row — solid theme accent with white text */
body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent,
.bq-product-reports-app .bq-stat-card.is-accent {
    background: var(--pos-chip-grad, linear-gradient(145deg, var(--pos-maroon), var(--pos-maroon-light)));
    color: #fff;
    border: 1px solid transparent;
}

body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-label,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-label {
    color: rgba(255, 255, 255, 0.85);
}

body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-value,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-value {
    color: #fff;
}

body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-note,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-note {
    color: rgba(255, 255, 255, 0.75);
}

/* Filter actions â€” maroon accent, not theme gold */
body[data-pos-theme] .bq-product-reports-app .bq-reports-filter-actions .pos-chip-btn.pos-chip-accent,
.bq-product-reports-app .bq-reports-filter-actions .pos-chip-btn.pos-chip-accent {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
    border-color: transparent;
    color: #fff;
}

body[data-pos-theme] .bq-product-reports-app .bq-reports-filter-actions .pos-chip-btn.pos-chip-accent:hover,
.bq-product-reports-app .bq-reports-filter-actions .pos-chip-btn.pos-chip-accent:hover {
    filter: brightness(1.06);
    color: #fff;
}

.bq-product-reports-app .bq-product-reports-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    gap: 12px;
}

.bq-product-reports-app .bq-stat-card {
    min-width: 0;
}

.bq-product-reports-app .bq-stat-value {
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    font-weight: 800;
    font-family: inherit;
    line-height: 1.15;
    word-break: break-word;
}

.bq-product-reports-app .bq-product-reports-chart,
.bq-product-reports-app .bq-product-reports-board,
.bq-product-reports-app>.bq-panel {
    margin: 0;
}

.bq-product-reports-app .bq-product-reports-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 16px 18px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.bq-product-reports-app .bq-product-reports-bars .bq-chart-bar {
    flex: 0 0 auto;
    min-width: 52px;
    max-width: 72px;
}

.bq-product-reports-app .bq-product-reports-status {
    min-height: 0;
}

.bq-product-reports-app .bq-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.bq-product-reports-app .bq-table {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .bq-product-reports-app .bq-product-reports-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .bq-product-reports-app .bq-table-wrap {
        overflow: visible;
    }

    .bq-product-reports-app .bq-table,
    .bq-product-reports-app .bq-table.bq-table-responsive {
        min-width: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .bq-product-reports-app {
        gap: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .bq-product-reports-app .bq-product-reports-stat-grid {
        grid-template-columns: 1fr;
    }

    .bq-product-reports-app .bq-product-reports-bars {
        gap: 6px;
        padding-bottom: 4px;
    }

    .bq-product-reports-app .bq-product-reports-bars .bq-chart-bar {
        min-width: 44px;
    }

    .bq-product-reports-app .bq-chart-track {
        height: 96px;
    }

    .bq-product-reports-app .bq-chart-val {
        font-size: 0.62rem;
    }

    .bq-product-reports-app .bq-topbar-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

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

    .bq-product-reports-app .bq-panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .bq-product-reports-app .bq-board-2,
    .bq-product-reports-app .bq-product-reports-board {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bq-product-reports-app .bq-reports-filter-grid {
        grid-template-columns: 1fr;
    }

    .bq-product-reports-app table.bq-table-responsive tbody tr {
        margin-bottom: 10px !important;
    }
}

@media (max-width: 480px) {
    .bq-product-reports-app .bq-topbar-actions .pos-chip-btn {
        flex: 1 1 100%;
    }
}

/* ===== Global compact module headers + cleaner report palette ===== */
.bq-app .bq-topbar,
.bq-app .pos-topbar {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.bq-app .bq-topbar h1,
.bq-app .pos-topbar-title {
    font-size: 1.05rem;
    line-height: 1.2;
}

.bq-app .bq-topbar p,
.bq-app .pos-topbar-sub {
    display: none;
}

.bq-reports-app>.bq-topbar {
    background: #faf7f9;
    border: 1px solid #ead7e0;
}

.bq-reports-app>.bq-topbar h1,
.bq-reports-app>.bq-topbar h1 i {
    color: #6f1f3b;
}

.bq-reports-section-head {
    padding: 10px 12px;
    border-radius: 12px;
    border-color: #eddde4;
    background: #fff;
}

.bq-reports-section-head h2 {
    font-size: 1rem;
}

.bq-reports-app .bq-stat-card,
.bq-reports-app .bq-reports-kpi,
.bq-reports-app .bq-reports-panel {
    border-color: #efe3e8;
    box-shadow: 0 1px 4px rgba(60, 35, 46, 0.05);
}

@media (max-width: 768px) {
    .bq-app .bq-topbar,
    .bq-app .pos-topbar {
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .bq-app .bq-topbar h1,
    .bq-app .pos-topbar-title {
        font-size: 0.96rem;
    }
}

/* ===== Final contrast safety: all modules ===== */
.bq-app .bq-topbar,
.bq-app .pos-topbar {
    color: #fff;
}

.bq-app .bq-topbar h1,
.bq-app .bq-topbar h1 i,
.bq-app .pos-topbar-title,
.bq-app .pos-topbar-sub {
    color: #fff !important;
}

.bq-app .bq-topbar .pos-chip-btn,
.bq-app .pos-topbar .pos-chip-btn {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.bq-app .bq-topbar .pos-chip-btn:hover,
.bq-app .pos-topbar .pos-chip-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.bq-app .bq-topbar .pos-chip-btn.pos-chip-accent,
.bq-app .pos-topbar .pos-chip-btn.pos-chip-accent {
    background: var(--pos-maroon-dark) !important;
    background-image: linear-gradient(145deg, var(--pos-maroon) 0%, var(--pos-maroon-dark) 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.bq-reports-app .bq-reports-section-head h2,
.bq-reports-app .bq-reports-section-head h2 i,
.bq-reports-app .bq-panel-head h3 {
    color: #5b1d35;
}

/* ===== Loyalty module ===== */
.bq-loyalty-app {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px 24px;
    max-width: 1400px;
}

.bq-loyalty-app > .bq-topbar,
.bq-loyalty-app > .bq-connect-banner,
.bq-loyalty-app > .pos-modules-strip,
.bq-loyalty-app > .bq-loyalty-kpi,
.bq-loyalty-app > .bq-loyalty-panels {
    margin: 0;
}

.bq-loyalty-app > .bq-topbar {
    padding: 14px 16px;
    gap: 10px;
}

.bq-loyalty-app > .bq-topbar h1 {
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
}

.bq-loyalty-app > .bq-topbar p {
    margin-top: 2px;
    font-size: 0.8rem;
}

.bq-loyalty-app > .bq-connect-banner {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 0;
}

.bq-loyalty-app > .bq-connect-banner .bq-connect-copy p {
    font-size: 0.78rem;
    line-height: 1.4;
}

.bq-loyalty-app > .pos-modules-strip {
    padding: 10px 12px;
    margin: 0;
    border-radius: var(--pos-radius);
    border: 1px solid var(--pos-border);
    background: #fff;
    box-shadow: var(--pos-shadow);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.bq-loyalty-app > .pos-modules-strip .pos-modules-strip__link {
    scroll-snap-align: start;
    flex-shrink: 0;
}

.bq-loyalty-kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.bq-loyalty-kpi__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(122, 28, 46, 0.1);
    background: #fff;
    box-shadow: 0 2px 10px rgba(61, 42, 50, 0.04);
}

.bq-loyalty-kpi__item--accent {
    background: linear-gradient(145deg, #fff8fb 0%, #ffeef5 55%, #fff 100%);
    border-color: rgba(158, 42, 66, 0.18);
}

.bq-loyalty-kpi__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pos-muted, #6b5b63);
    line-height: 1.3;
}

.bq-loyalty-kpi__item--accent .bq-loyalty-kpi__label {
    color: #9e2a42;
}

.bq-loyalty-kpi__value {
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--pos-maroon, #6b1535);
    word-break: break-word;
}

.bq-loyalty-kpi__item--accent .bq-loyalty-kpi__value {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
}

.bq-loyalty-panels {
    gap: 14px;
    margin-bottom: 0;
}

.bq-loyalty-app .bq-panel-head {
    padding: 14px 16px;
}

.bq-loyalty-app .bq-panel-head h2 {
    font-size: 1rem;
    margin: 0;
}

.bq-loyalty-app .bq-panel-head p {
    margin: 4px 0 0;
    font-size: 0.78rem;
}

.bq-loyalty-app .bq-table-wrap {
    padding: 0 12px 12px;
}

@media (max-width: 1100px) {
    .bq-loyalty-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bq-loyalty-app {
        padding: 12px;
        gap: 12px;
    }

    .bq-loyalty-app > .bq-connect-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-loyalty-app > .bq-connect-banner .bq-connect-actions {
        width: 100%;
    }

    .bq-loyalty-app > .bq-connect-banner .bq-connect-actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    .bq-loyalty-app > .bq-connect-copy p {
        display: none;
    }

    .bq-loyalty-app > .pos-modules-strip {
        padding: 8px 10px;
        gap: 6px;
    }

    .bq-loyalty-app > .pos-modules-strip .pos-modules-strip__link {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

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

    .bq-loyalty-kpi__item {
        padding: 10px 12px;
    }

    .bq-loyalty-app .bq-panel-head {
        padding: 12px 14px;
    }

    .bq-loyalty-app .bq-panel-head p {
        display: none;
    }

    .bq-loyalty-app .bq-table-wrap {
        padding: 0 10px 10px;
    }
}

@media (max-width: 420px) {
    .bq-loyalty-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .bq-loyalty-kpi__label {
        font-size: 0.65rem;
    }

    .bq-loyalty-kpi__value {
        font-size: 1.05rem;
    }
}

/* â•â•â• Recent Bills module â•â•â• */
.bq-recent-bills-kpi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.bq-recent-bills-kpi__item {
    background: #fff;
    border: 1px solid var(--pos-border, #f0d6e2);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(107, 21, 53, 0.05);
}

.bq-recent-bills-kpi__item--accent {
    background: var(--pos-chip-grad, linear-gradient(135deg, #1e40af, #2563eb));
    border-color: transparent;
    color: #fff;
}

.bq-recent-bills-kpi__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pos-muted, #8a6b78);
    margin-bottom: 6px;
}

.bq-recent-bills-kpi__item--accent .bq-recent-bills-kpi__label {
    color: rgba(255, 255, 255, 0.8);
}

.bq-recent-bills-kpi__value {
    font-size: 1.35rem;
    color: var(--pos-maroon, #6b1535);
}

.bq-recent-bills-kpi__item--accent .bq-recent-bills-kpi__value {
    color: #fff;
}

.bq-recent-bills-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(120px, 0.7fr)) repeat(2, minmax(120px, 0.8fr)) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.bq-recent-bills-pagination {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--pos-border, #f0d6e2);
}

@media (max-width: 1024px) {
    .bq-recent-bills-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .bq-recent-bills-filters {
        grid-template-columns: 1fr 1fr;
    }

    .bq-recent-bills-filters .bq-documents-filter-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 8px;
    }

    .bq-recent-bills-filters .bq-documents-filter-actions .pos-chip-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .bq-recent-bills-kpi {
        grid-template-columns: 1fr;
    }

    .bq-recent-bills-kpi__item--accent {
        order: -1;
    }

    .bq-recent-bills-filters {
        grid-template-columns: 1fr;
    }

    .bq-recent-bills-table.bq-table-responsive tbody td[data-label="Action"] .bq-action-row {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bq-recent-bills-table.bq-table-responsive tbody td[data-label="Action"] .pos-chip-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Global responsive polish â€” product & billing modules (v67)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Main content never overflows viewport */
.pos-main {
    min-width: 0;
    overflow-x: clip;
}

.pos-main > .bq-app,
.pos-main > .si-app,
.pos-main > .bq-reports-app,
.pos-main > .bq-loyalty-app,
.pos-main > .bq-recent-bills-app,
.pos-main > .bq-quote-form-page {
    min-width: 0;
    max-width: 100%;
}

/* Workspace bar: compact single row on phones */
@media (max-width: 1279px) {
    .bq-workspace-bar .bq-workspace-menu {
        display: grid !important;
        place-items: center;
        flex-shrink: 0;
        order: -1;
    }

    .bq-topbar > .pos-menu-toggle,
    .bq-mobile-menu,
    .bq-settings-topbar .pos-menu-toggle {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .bq-workspace-bar .bq-workspace-menu,
    .pos-screen-nav__menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bq-workspace-bar {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        min-height: 48px;
    }

    .bq-workspace-bar__start {
        flex: 1 1 auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .bq-workspace-bar__end {
        flex: 0 0 auto;
        width: auto;
        gap: 6px;
    }

    .bq-app,
    .si-app.bq-app {
        padding: 10px 12px 14px;
    }

    .bq-flash,
    .bq-flash-error,
    .bq-flash-info,
    .bq-flash-success {
        margin-bottom: 10px;
    }

    /* Page topbar details â€” layout handled in v70 */

    .bq-topbar > div:not(.bq-topbar-actions) {
        min-width: 0;
    }

    .bq-dashboard-topbar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Connect banner: compact */
    .bq-connect-banner {
        padding: 12px 14px;
        margin-bottom: 14px;
        gap: 10px;
    }

    .bq-connect-copy h3 {
        font-size: 0.9rem;
    }

    .bq-connect-copy p {
        display: none;
    }

    .bq-connect-actions {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
    }

    .bq-connect-actions .pos-chip-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Module grids & stat cards */
    .bq-stat-grid,
    .bq-dashboard-kpi,
    .bq-module-grid,
    .bq-dashboard-module-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bq-board,
    .bq-board-2,
    .bq-board-3,
    .bq-board-4 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .bq-stat-value,
    .bq-dashboard-kpi-value {
        font-size: 1.35rem;
    }

    .bq-dashboard-metrics {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding-bottom: 4px;
    }

    .bq-dashboard-metric {
        flex: 0 0 min(72vw, 200px);
        scroll-snap-align: start;
    }

    /* Panels & tables */
    .bq-panel-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }

    .bq-panel-head p {
        font-size: 0.76rem;
    }

    .bq-table-wrap {
        padding: 0 10px 12px;
    }

    .bq-filter-bar,
    .bq-bulk-bar {
        padding: 10px 12px;
        gap: 10px;
    }

    .bq-action-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Settings tabs scroll */
    .bq-settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding: 6px 8px;
        gap: 6px;
    }

    .bq-settings-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 7px 12px;
        font-size: 0.76rem;
    }

    /* Form pages */
    .bq-form-grid {
        grid-template-columns: 1fr;
    }

    .bq-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-form-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    /* Quotation / tailor module nav */
    .bq-quote-module-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scroll-snap-type: x proximity;
    }

    .bq-quote-module-nav a {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    /* Footer stacks on small screens */
    .pos-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
        font-size: 0.74rem;
    }
}

@media (max-width: 480px) {
    .bq-workspace-btn span {
        display: none;
    }

    .bq-workspace-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .bq-topbar h1 i {
        font-size: 0.95rem;
    }

    .bq-chip-label {
        display: none;
    }

    .bq-topbar-actions .pos-chip-btn,
    .bq-connect-actions .pos-chip-btn {
        font-size: 0.72rem;
        padding: 7px 10px;
    }

    .bq-module-card h3 {
        font-size: 0.92rem;
    }

    .bq-stat-note,
    .bq-dashboard-kpi-meta {
        font-size: 0.68rem;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Global responsive polish v70 â€” headers + all modules
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

@media (max-width: 1024px) {
    .bq-workspace-bar {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        overflow: visible;
    }

    .bq-workspace-bar__start {
        flex: 1 1 auto;
        flex-wrap: nowrap;
        min-width: 0;
        gap: 8px;
    }

    .bq-workspace-bar__end {
        flex: 0 0 auto;
        gap: 6px;
    }

    .bq-workspace-eyebrow {
        display: none;
    }

    .bq-workspace-context {
        border: none;
        padding: 0;
        min-width: 0;
        flex: 0 1 auto;
    }

    .bq-workspace-current {
        font-size: 0.8rem;
        max-width: 34vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bq-workspace-switch {
        flex-shrink: 0;
    }

    .bq-workspace-btn {
        padding: 7px 10px;
        font-size: 0.72rem;
    }

    .bq-workspace-badge {
        display: none;
    }

    .bq-workspace-bar .bq-user-menu__name,
    .bq-workspace-bar .bq-user-menu__caret {
        display: none;
    }

    .bq-workspace-bar .bq-user-menu__trigger--with-name {
        padding: 4px;
    }

    .product-labels-app .bq-topbar p {
        display: none;
    }

    .product-labels-app .bq-connect-banner {
        display: none;
    }

    .bq-loyalty-app > .bq-connect-banner {
        display: none;
    }

    .bq-dashboard-topbar .bq-topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        gap: 8px;
    }

    .bq-dashboard-topbar .bq-topbar-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    .si-items-table {
        min-width: 0 !important;
    }

    .si-table-wrap {
        overflow: visible;
    }

    table.si-items-table.bq-table-responsive tbody tr {
        display: block !important;
    }

    /* Page headers: keep title readable, actions scroll */
    .bq-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px 14px;
        align-items: start;
    }

    .bq-topbar > .pos-menu-toggle {
        display: none !important;
    }

    .bq-topbar > div:not(.bq-topbar-actions) {
        min-width: 0;
        max-width: 100%;
    }

    .bq-topbar h1 {
        font-size: 1.05rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .bq-topbar p {
        font-size: 0.74rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bq-topbar-actions {
        margin-left: 0;
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .bq-topbar-actions .pos-chip-btn,
    .bq-topbar-actions a.pos-chip-btn,
    .bq-topbar-actions form {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .bq-topbar-actions .pos-chip-btn {
        width: auto;
        min-height: 40px;
        white-space: nowrap;
    }

    .bq-legacy-header .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .bq-legacy-header .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bq-legacy-header .module-button,
    .bq-legacy-header .module-button-secondary,
    .bq-legacy-header .module-button-danger {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .bq-workspace-current {
        max-width: 28vw;
        font-size: 0.76rem;
    }

    .bq-workspace-btn {
        padding: 7px 9px;
        min-width: 36px;
        justify-content: center;
    }

    .bq-workspace-btn span {
        display: none;
    }

    .pos-main > .bq-app:not(.pos-app--fullscreen) {
        padding-bottom: 8px;
    }

    .pos-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
    }

    .pos-footer > span:not(.pos-footer-highlight) {
        display: none;
    }

    .pos-footer-highlight {
        font-size: 0.76rem;
    }

    .bq-panel-head .bq-link {
        align-self: flex-start;
    }

    .bq-inline-search {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .bq-inline-search .pos-chip-btn {
        width: 100%;
        justify-content: center;
    }

    .bq-table--compact:not(.bq-table-responsive) {
        min-width: 0;
    }

    .bq-table--compact:not(.bq-table-responsive) thead {
        display: none;
    }

    .bq-table--compact:not(.bq-table-responsive) tbody tr {
        display: block;
        margin-bottom: 10px;
        padding: 10px 12px;
        border: 1px solid var(--pos-border);
        border-radius: 10px;
        background: #fff;
    }

    .bq-table--compact:not(.bq-table-responsive) tbody td {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 0;
        border: none;
    }

    .bq-table--compact:not(.bq-table-responsive) tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.72rem;
        color: var(--pos-muted);
        text-transform: uppercase;
    }

    .bq-module-nav,
    .bq-quote-module-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 4px;
        margin-bottom: 12px;
    }

    .bq-module-nav .pos-chip-btn,
    .bq-quote-module-nav__link {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .bq-topbar h1 {
        font-size: 0.95rem;
    }

    .bq-workspace-current i {
        display: none;
    }

    .bq-app,
    .si-app.bq-app {
        padding: 8px 10px 12px;
    }
}

/* ─── Profile page ─── */
.bq-profile-app {
    max-width: 920px;
    margin: 0 auto;
}

.bq-profile-grid {
    display: grid;
    gap: 16px;
}

.bq-profile-card .bq-panel-head {
    margin-bottom: 0;
}

.bq-profile-card .bq-panel-pad {
    padding-top: 4px;
}

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

@media (min-width: 720px) {
    .bq-profile-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bq-profile-saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    color: #1f7a4d;
    font-size: 0.84rem;
    font-weight: 700;
}

.bq-profile-danger__copy {
    margin: 0 0 16px;
    color: var(--pos-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 58ch;
}

.bq-profile-card--danger {
    border-color: rgba(180, 35, 24, 0.22);
}

.bq-profile-card--danger .bq-panel-head h2 {
    color: #991b1b;
}

.bq-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 16px;
}

.bq-profile-modal[hidden] {
    display: none !important;
}

.bq-profile-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(48, 12, 28, 0.45);
}

.bq-profile-modal__sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--pos-border);
    box-shadow: 0 20px 48px rgba(107, 21, 53, 0.2);
}

.bq-profile-modal__sheet h3 {
    margin: 0 0 6px;
    color: var(--pos-maroon);
    font-size: 1.1rem;
}

.bq-profile-modal__sheet > p {
    margin: 0 0 16px;
    color: var(--pos-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

body.bq-profile-modal-open {
    overflow: hidden;
}

.bq-legacy-body .bq-profile-app,
.bq-legacy-body .bq-profile-grid {
    max-width: none;
}

.bq-legacy-body .bq-profile-app {
    padding: 0;
}

/* ---------- Payments module ---------- */
.bq-linked-product-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 1rem;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, var(--pos-pink-soft) 0%, #fff7fb 100%);
}

.bq-linked-product-banner__eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pos-maroon);
    margin-bottom: 4px;
}

.bq-linked-product-banner__copy p {
    margin: 0;
    font-size: 0.88rem;
    color: #5c3340;
}

.bq-linked-product-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.bq-payments-dashboard .bq-payments-dues {
    margin-bottom: 1rem;
}

.bq-payments-search {
    max-width: 260px;
    min-width: 180px;
}

.bq-payments-ledger th,
.bq-payments-ledger td {
    white-space: nowrap;
}

.bq-payments-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--pos-border);
}

.bq-payments-collect-page .bq-payments-collect-form {
    padding: 0;
    overflow: hidden;
}

.bq-payments-collect-form__head {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, #4a1630 100%);
    color: #fff;
    border-bottom: none;
    margin: 0;
    padding: 18px 20px;
}

.bq-payments-collect-form__head h2,
.bq-payments-collect-form__head p {
    color: #fff;
}

.bq-payments-collect-form__head h2 i {
    opacity: 0.9;
}

.bq-payments-collect-form__head .pos-chip-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.bq-payments-collect-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    padding: 20px;
}

.bq-payments-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bq-payments-field span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #5c3340;
}

.bq-payments-field--wide {
    grid-column: 1 / -1;
}

.bq-payments-collect-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px 20px;
}

.bq-empty-state--compact {
    padding: 28px 20px;
}

@media (max-width: 768px) {
    .bq-linked-product-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-linked-product-banner__actions {
        width: 100%;
    }

    .bq-linked-product-banner__actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .bq-payments-collect-grid {
        grid-template-columns: 1fr;
    }

    .bq-payments-search {
        max-width: none;
        width: 100%;
    }

    .bq-payments-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .bq-expenses-form-grid,
    .bq-expenses-search-label {
        width: 100%;
    }

    .bq-expenses-search-label {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- Expenses module ---------- */
.bq-expenses-search-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.bq-expenses-search {
    max-width: 260px;
    min-width: 180px;
}

.bq-expenses-ledger th,
.bq-expenses-ledger td {
    white-space: nowrap;
}

.bq-expenses-form-page .bq-expenses-collect-form {
    padding: 0;
    overflow: hidden;
}

.bq-expenses-collect-form__head {
    background: linear-gradient(135deg, var(--pos-maroon) 0%, #4a1630 100%);
    color: #fff;
    border-bottom: none;
    margin: 0;
    padding: 18px 20px;
}

.bq-expenses-collect-form__head h2,
.bq-expenses-collect-form__head p {
    color: #fff;
}

.bq-expenses-collect-form__head h2 i {
    opacity: 0.9;
}

.bq-expenses-collect-form__head .pos-chip-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.bq-expenses-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    padding: 20px;
}

.bq-expenses-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bq-expenses-field span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #5c3340;
}

.bq-expenses-field--wide {
    grid-column: 1 / -1;
}

.bq-expenses-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--pos-pink-soft);
    border: 1px solid var(--pos-border);
    font-size: 0.88rem;
    color: var(--pos-maroon);
}

.bq-expenses-total-bar strong {
    font-size: 1.05rem;
}

.bq-expenses-collect-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px 20px;
}

@media (max-width: 768px) {
    .bq-expenses-form-grid {
        grid-template-columns: 1fr;
    }

    .bq-expenses-search {
        max-width: none;
        width: 100%;
    }
}

/* ─── Module CRUD / Attributes page polish ─── */
.bq-crud-app {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 2px 20px;
    min-width: 0;
}

.bq-crud-app > .bq-page-header.bq-topbar {
    margin-bottom: 0;
    border-radius: 12px;
    padding: 14px 18px;
    align-items: center;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.bq-crud-app > .bq-page-header .bq-page-header-text p {
    margin-top: 2px;
    opacity: 0.9;
    max-width: 52ch;
}

.bq-crud-app .bq-crud-toolbar.bq-filter-bar {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: var(--pos-card, #fff);
    border-bottom: 1px solid var(--pos-border);
    align-items: center;
    gap: 10px;
}

.bq-crud-app .bq-crud-search.pos-input {
    flex: 1 1 220px;
    width: auto;
    min-width: 200px;
    max-width: 340px;
    min-height: 38px;
    height: 38px;
    box-sizing: border-box;
    margin: 0;
}

.bq-crud-app .bq-filter-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bq-crud-app .bq-page-header .pos-chip-btn {
    min-height: 36px;
    align-self: center;
}

.bq-crud-app .bq-crud-panel.bq-panel {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.bq-crud-app .bq-crud-table {
    min-width: 0;
    width: 100%;
}

.bq-crud-app .bq-crud-table th {
    color: var(--pos-maroon);
    background: color-mix(in srgb, var(--pos-pink-soft) 88%, #fff);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.bq-crud-app .bq-crud-table td {
    padding: 12px 14px;
    vertical-align: top;
}

.bq-crud-app .bq-crud-table .bq-col-actions,
.bq-crud-app .bq-crud-table th.bq-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

.bq-crud-app .bq-col-values {
    max-width: 420px;
}

.bq-value-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.bq-value-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pos-maroon);
    background: var(--pos-pink-soft);
    border: 1px solid color-mix(in srgb, var(--pos-pink-mid, #d4a5b8) 55%, transparent);
    white-space: nowrap;
}

.bq-app .pos-chip-btn.bq-btn-edit,
.bq-legacy-body .pos-chip-btn.bq-btn-edit,
.bq-crud-app .pos-chip-btn.bq-btn-edit {
    background: color-mix(in srgb, var(--pos-pink-soft) 70%, #fff);
    border-color: color-mix(in srgb, var(--pos-maroon) 28%, var(--pos-border));
    color: var(--pos-maroon);
    font-weight: 700;
}

.bq-app .pos-chip-btn.bq-btn-edit:hover,
.bq-legacy-body .pos-chip-btn.bq-btn-edit:hover,
.bq-crud-app .pos-chip-btn.bq-btn-edit:hover {
    background: var(--pos-pink-soft);
    border-color: var(--pos-maroon);
    color: var(--pos-maroon);
}

.bq-crud-app .bq-row-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.bq-crud-app .bq-crud-form {
    margin: 0;
    border-radius: 12px;
}

/* Workspace Product/Billing switch — sit flush with bar */
.bq-workspace-bar {
    background: var(--pos-card, #fff);
    border-bottom: 1px solid var(--pos-border);
    box-shadow: none;
}

.bq-workspace-switch {
    background: color-mix(in srgb, var(--pos-pink-soft) 65%, #eef2f7);
    border-color: var(--pos-border);
    padding: 3px;
    border-radius: 10px;
}

.bq-workspace-btn {
    border-radius: 8px;
}

.bq-workspace-btn.is-active {
    box-shadow: none;
}

.bq-workspace-context {
    border-right-color: var(--pos-border);
}

/* Sidebar section labels — clearer hierarchy */
.pos-nav-section {
    padding: 18px 16px 8px;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* Footer breathing room */
.pos-footer {
    gap: 14px 32px;
    padding: 12px 22px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.pos-footer-highlight {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

@media (max-width: 768px) {
    .bq-crud-app .bq-crud-search.pos-input {
        max-width: none;
        width: 100%;
        flex: 1 1 100%;
    }

    .bq-crud-app .bq-row-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .bq-crud-app .bq-crud-table .bq-col-actions,
    .bq-crud-app .bq-crud-table th.bq-col-actions {
        text-align: left;
    }
}


/* login.css */
/* Bilvo — Login / workspace chooser */
:root {
    --gc-maroon: #1e40af;
    --gc-maroon-dark: #172554;
    --gc-maroon-light: #2563eb;
    --gc-pink: #1e40af;
    --gc-pink-soft: #e8f0fc;
    --gc-border: #a8c4f0;
    --gc-text: #0a1628;
    --gc-muted: #4a6285;
    --gc-green: #059669;
    --gc-radius: 16px;
    --gc-shadow: 0 18px 48px rgba(23, 37, 84, 0.14);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body.gc-login {
    min-height: 100vh;
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--gc-text);
    background:
        radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.16), transparent 42%),
        radial-gradient(circle at 82% 88%, rgba(23, 37, 84, 0.14), transparent 46%),
        linear-gradient(160deg, #f4f8fd 0%, #e8f0fc 48%, #dce8f8 100%);
}

.gc-login__wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.gc-login__card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid rgba(168, 196, 240, 0.85);
    border-radius: var(--gc-radius);
    padding: 28px 28px 28px;
    box-shadow: var(--gc-shadow);
    overflow: hidden;
}

.gc-login__brand {
    text-align: center;
    margin: 0 0 8px;
    padding: 0;
}

.gc-login__logo-lockup {
    display: block;
    width: min(280px, 100%);
    height: auto;
    max-height: 108px;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    background: transparent;
}

.gc-login__mark {
    display: none;
}

.gc-login__logo,
.gc-login__logo.pos-brand-logo-img--icon,
.gc-login__logo.pos-brand-logo-img--login {
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14px;
    object-fit: contain;
    object-position: center;
    background: transparent;
    box-shadow: none;
}

.gc-login__wordmark h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gc-maroon-dark);
    line-height: 1.1;
}

.gc-login__tagline {
    margin: 4px 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gc-muted);
    letter-spacing: 0.01em;
}

.gc-login__subtitle {
    margin: 14px 0 0;
    color: var(--gc-text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.gc-login__logo-fallback {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, #2563eb, #1e40af);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.gc-login__brand h1 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gc-maroon);
    letter-spacing: -0.02em;
}

.gc-login__brand p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gc-muted);
}

.gc-login__card > main,
.gc-login__main {
    margin-top: 18px;
}

.gc-login__main--chooser {
    margin-top: 20px;
}

.gc-login__main--form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gc-login__main--form .gc-login-form {
    width: 100%;
}

.gc-login__section-title {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gc-muted);
    text-align: center;
}

.gc-login__choices {
    display: grid;
    gap: 12px;
}

.gc-login__choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 16px 18px;
    border: 1px solid var(--gc-border);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.15s;
}

.gc-login__choice:hover {
    border-color: var(--gc-maroon-light);
    background: #f8fbff;
    box-shadow: 0 8px 22px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.gc-login__choice--product:hover {
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow: 0 8px 22px rgba(30, 64, 175, 0.12);
}

.gc-login__choice--billing:hover {
    border-color: #16a34a;
    background: #f0fdf6;
    box-shadow: 0 8px 22px rgba(22, 101, 52, 0.12);
}

.gc-login__choice-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--gc-pink-soft);
    color: var(--gc-maroon);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.gc-login__choice--product .gc-login__choice-icon {
    background: #e8f0fc;
    color: #1e40af;
}

.gc-login__choice--billing .gc-login__choice-icon {
    background: #ecfdf5;
    color: #166534;
}

.gc-login__choice-text strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--gc-maroon-dark);
    margin-bottom: 3px;
}

.gc-login__choice-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--gc-muted);
    line-height: 1.35;
}

.gc-login__choice-arrow {
    color: var(--gc-maroon-light);
    font-size: 0.85rem;
    opacity: 0.75;
}

.gc-login__portal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gc-pink-soft);
    color: var(--gc-maroon);
    font-size: 0.82rem;
    font-weight: 700;
}

.gc-login__portal-badge i {
    font-size: 0.9rem;
}

.gc-login-form {
    display: grid;
    gap: 16px;
}

.gc-field {
    display: grid;
    gap: 6px;
}

.gc-field > span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gc-muted);
}

.gc-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gc-border);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--gc-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.gc-input:focus {
    outline: none;
    border-color: var(--gc-maroon-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.gc-password-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.gc-input--password {
    padding-right: 46px;
}

.gc-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--gc-muted);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.gc-password-toggle:hover {
    color: var(--gc-maroon);
    background: var(--gc-pink-soft);
}

.gc-password-toggle:focus-visible {
    outline: none;
    color: var(--gc-maroon);
    background: var(--gc-pink-soft);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.gc-password-toggle i {
    font-size: 0.95rem;
    pointer-events: none;
}

.gc-field-error {
    color: #c0392b;
    font-size: 0.78rem;
    margin-top: -6px;
}

.gc-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gc-muted);
}

.gc-check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--gc-maroon);
}

.gc-btn-primary {
    width: 100%;
    margin-top: 4px;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gc-maroon) 0%, var(--gc-maroon-light) 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.gc-btn-primary:hover {
    opacity: 0.94;
    transform: translateY(-1px);
}

.gc-login__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--gc-border);
    font-size: 0.82rem;
}

.gc-link {
    color: var(--gc-maroon);
    text-decoration: none;
    font-weight: 600;
}

.gc-link:hover {
    color: var(--gc-maroon-light);
    text-decoration: underline;
}

.gc-flash-success {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #e8f8ee;
    color: var(--gc-green);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 480px) {
    .gc-login__wrap {
        padding: 20px 12px;
    }

    .gc-login__card {
        padding: 22px 18px 22px;
    }

    .gc-login__logo-lockup {
        max-height: 92px;
        width: min(240px, 100%);
    }

    .gc-login__choice {
        min-height: 64px;
        padding: 14px 14px;
        gap: 12px;
    }

    .gc-login__choice-icon {
        width: 40px;
        height: 40px;
    }
}

/* product-labels.css */
/* Barcode label studio + print sheet */

.product-labels-app {
    --labels-gap: 12px;
    padding: 6px clamp(12px, 1.8vw, 20px) 20px;
    display: grid;
    gap: 12px;
}

.product-labels-app > .bq-page-header,
.product-labels-app > .bq-topbar {
    margin: 0;
}

.product-labels-app > .bq-flash {
    margin: 0;
}

.product-labels-app > .bq-panel {
    margin: 0;
    overflow: visible;
}

.product-labels-toolbar .product-labels-toolbar__row {
    align-items: center;
    padding: 12px 16px;
}

.product-labels-toolbar__actions {
    align-items: center;
}

.product-labels-panel-head {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px !important;
}

.product-labels-panel-head > div:first-child h2 {
    margin: 0;
    line-height: 1.25;
    color: var(--pos-text);
}

.product-labels-panel-head > div:first-child p {
    margin: 4px 0 0;
    line-height: 1.35;
    color: var(--pos-muted);
}

.product-labels-bulk-bar {
    margin: 8px 12px 8px !important;
    padding: 8px 12px !important;
    min-height: 40px;
    box-sizing: border-box;
}

.product-labels-table-wrap {
    padding: 0 8px 8px;
}

.product-labels-table thead th {
    padding: 8px 10px !important;
    vertical-align: middle;
    white-space: nowrap;
    color: var(--pos-muted) !important;
    background: var(--pos-pink-soft) !important;
    font-size: 0.68rem !important;
}

.product-labels-table tbody td {
    padding: 8px 10px !important;
    vertical-align: middle;
    color: var(--pos-text);
    border-bottom-color: var(--pos-border) !important;
}

.product-labels-table tbody tr:hover {
    background: color-mix(in srgb, var(--pos-pink-soft) 55%, #fff) !important;
}

.product-labels-table td[data-label="Price"] {
    font-weight: 700;
    color: var(--pos-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.product-labels-table .labels-print-one {
    background: var(--pos-maroon) !important;
    border-color: var(--pos-maroon) !important;
    color: #fff !important;
    min-height: 32px;
    padding: 6px 12px;
}

.product-labels-table .labels-print-one:hover {
    filter: brightness(1.06);
}

.product-labels-head-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.product-labels-visibility {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--pos-pink-soft, #fce4ef);
    border: 1px solid var(--pos-border);
}

.product-labels-visibility__btn {
    border: none;
    background: transparent;
    color: var(--pos-maroon);
    border-radius: 999px;
    padding: 8px 12px;
    min-height: 36px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
    box-sizing: border-box;
}

.product-labels-visibility__btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    min-height: 1.5em;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem;
    line-height: 1;
}

.product-labels-visibility__btn.is-active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(107, 21, 53, 0.12);
}

.product-labels-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.product-labels-toolbar__copy strong {
    display: block;
    color: var(--pos-maroon);
    margin-bottom: 4px;
}

.product-labels-toolbar__copy p {
    margin: 0;
    color: var(--pos-muted);
    font-size: 0.9rem;
    max-width: 52ch;
}

.product-labels-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.product-labels-copies-global {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.product-labels-copies-global input {
    width: 72px;
    min-height: 38px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 0 10px;
    font: inherit;
}

.product-labels-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(280px, 100%);
    max-width: 100%;
    padding: 0 6px 0 12px;
    min-height: 40px;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: #fff;
    color: var(--pos-muted);
    box-sizing: border-box;
    overflow: visible;
}

.product-labels-search > .fa-search {
    flex: 0 0 auto;
}

.product-labels-search input {
    border: none;
    outline: none;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    font: inherit;
    color: var(--pos-text);
    background: transparent;
}

.product-labels-search .pos-input-btn.pos-input-btn--camera.product-labels-scan-btn,
.product-labels-scan-btn {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    margin: 0;
    border-radius: 8px !important;
    border: 1px solid var(--pos-maroon) !important;
    background: var(--pos-maroon) !important;
    color: #fff !important;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--pos-maroon) 18%, transparent);
    z-index: 1;
    position: relative;
    cursor: pointer;
}

.product-labels-search .pos-input-btn.pos-input-btn--camera.product-labels-scan-btn:hover,
.product-labels-scan-btn:hover {
    filter: brightness(1.06);
    border-color: var(--pos-maroon-dark) !important;
    color: #fff !important;
}

.product-labels-search .pos-input-btn.pos-input-btn--camera.product-labels-scan-btn i,
.product-labels-scan-btn .fa-camera {
    font-size: 0.92rem;
    line-height: 1;
    color: inherit !important;
}

.product-labels-scan-btn .pos-input-btn__label {
    display: none;
}

.product-labels-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: var(--pos-text);
    font-weight: 600;
}

.product-labels-row.is-missing-sku {
    background: color-mix(in srgb, #fde8ee 35%, #fff);
}

.labels-preview-barcode {
    display: block;
    width: 150px;
    height: 34px;
    max-width: 180px;
    max-height: 40px;
}

.product-labels-preview-cell {
    min-width: 150px;
    vertical-align: middle;
}

.product-labels-preview-cell .labels-preview-barcode {
    background: #fff;
    border: 1px solid var(--pos-border, #dbe4f5);
    border-radius: 6px;
    padding: 4px 6px;
    box-sizing: content-box;
}

/* Combined SKU text + dark block barcode (gaps) */
.bq-sku-barcode-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.bq-barcode-strip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    height: 52px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #222;
    overflow: hidden;
    line-height: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

.bq-barcode-strip--short {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
    height: 52px;
}

.bq-barcode-strip__canvas {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: 42px !important;
    object-fit: contain;
}

.bq-barcode-strip__blocks {
    display: block;
    width: auto;
    max-width: 100%;
    height: 42px;
}

.product-labels-preview-cell {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    overflow: visible;
}

.product-labels-preview-cell .bq-barcode-strip {
    margin: 0;
}

.product-labels-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: min(100%, 260px);
    padding: 0 10px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
}

.product-labels-search .fa-search {
    color: var(--pos-muted);
    font-size: 0.85rem;
}

.product-labels-search .pos-input,
.product-labels-search input[type="search"] {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 38px;
    flex: 1;
    min-width: 0;
}

.labels-preview-barcode {
    display: block;
    width: 88px;
    height: 28px;
    max-width: 92px;
    max-height: 30px;
}

.labels-row-copies {
    width: 64px;
    min-height: 34px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 0 8px;
    font: inherit;
}

/* Select all bar */
.product-labels-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 12px !important;
    padding: 8px 12px !important;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: var(--pos-pink-soft);
    position: sticky;
    top: 52px;
    z-index: 4;
    box-sizing: border-box;
    min-height: 40px;
}

.product-labels-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pos-maroon);
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
}

.product-labels-select-all input,
.labels-row-check,
.product-labels-table thead input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--pos-maroon);
    cursor: pointer;
}

.labels-row-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.labels-row-select:has(input:disabled) {
    opacity: 0.45;
    cursor: not-allowed;
}

.product-labels-item-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.product-labels-item-head__text {
    min-width: 0;
    flex: 1 1 auto;
}

.product-labels-item-head__text .bq-cell-title {
    display: block;
    font-weight: 700;
    color: var(--pos-text);
    line-height: 1.3;
}

.product-labels-item-head__text .bq-cell-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--pos-muted);
    line-height: 1.35;
}

.product-labels-selected-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-muted);
    white-space: nowrap;
}

.product-labels-table-wrap {
    padding-top: 0;
    overflow-x: auto;
}

/* Print sheet — Technova 21L */
.barcode-print-body {
    margin: 0;
    background: #f3f4f6;
    color: #111;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.barcode-print-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.barcode-print-toolbar button {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
}

.barcode-print-hint {
    font-size: 0.85rem;
    color: #555;
}

.barcode-label-sheet {
    --lbl-page-w: 210mm;
    --lbl-page-h: 297mm;
    --lbl-top: 15.1mm;
    --lbl-left: 5.2mm;
    --lbl-col-pitch: 66mm;
    --lbl-row-pitch: 37.85mm;
    --lbl-w: 63.5mm;
    --lbl-h: 37.4mm;
    --lbl-inset-x: 1.25mm;
    position: relative;
    width: var(--lbl-page-w);
    height: var(--lbl-page-h);
    margin: 12px auto;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.barcode-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.2mm 2mm;
    border: 1px dashed #bbb;
    border-radius: 2px;
    background: #fff;
    width: var(--lbl-w);
    height: var(--lbl-h);
    max-height: var(--lbl-h);
    box-sizing: border-box;
    overflow: hidden;
    page-break-inside: avoid;
    break-inside: avoid;
}

.barcode-label__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.15mm;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.barcode-label__shop,
.barcode-label__sku {
    display: none;
}

.barcode-label__name {
    width: 100%;
    font-size: 9pt;
    font-weight: 800;
    line-height: 1;
    color: #111;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
    margin: 0;
}

.barcode-label__meta {
    width: 100%;
    font-size: 8pt;
    font-weight: 700;
    line-height: 1;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
    margin: 0 0 0.15mm;
}

.barcode-label__code-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex: 0 0 10mm;
    height: 10mm;
    min-height: 10mm;
    max-height: 10mm;
    margin: 0.2mm 0 0;
    padding: 0 0.6mm;
    box-sizing: border-box;
    background: #fff;
}

.barcode-label__code {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: 10mm !important;
    max-height: 10mm;
    width: auto !important;
    image-rendering: pixelated;
}

.barcode-label__price {
    font-size: 12pt;
    font-weight: 800;
    color: #111;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
    margin: 0.35mm 0 0;
}

.barcode-label__error {
    font-size: 6pt;
    color: #c00;
}

.barcode-print-empty {
    min-height: 100vh;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    padding: 24px;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    .no-print {
        display: none !important;
    }

    .barcode-print-body {
        background: #fff;
        margin: 0;
        padding: 0;
    }

    .barcode-label-sheet {
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always;
        break-after: page;
    }

    .barcode-label-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .barcode-label {
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
}

@media screen and (max-width: 900px) {
    .barcode-label-sheet {
        transform: scale(0.72);
        transform-origin: top center;
        margin-bottom: -80px;
    }
}

@media screen and (max-width: 640px) {
    .barcode-label-sheet {
        transform: scale(0.48);
        transform-origin: top center;
        margin-bottom: -150px;
    }
}

/* Mobile / tablet — responsive cards */
@media (max-width: 1024px) {
    .product-labels-toolbar__row {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .product-labels-toolbar__copy p {
        display: none;
    }

    .product-labels-toolbar__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .product-labels-copies-global {
        grid-column: 1 / -1;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .product-labels-toolbar__actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    #labels_print_selected {
        grid-column: 1 / -1;
    }

    .product-labels-panel-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .product-labels-head-tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .product-labels-visibility {
        width: 100%;
    }

    .product-labels-visibility__btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .product-labels-search {
        width: 100%;
        min-width: 0;
    }

    .product-labels-bulk-bar {
        margin: 12px 14px;
        padding: 10px 12px;
        position: sticky;
        top: 48px;
        z-index: 5;
    }

    .product-labels-table-wrap {
        overflow: visible;
        padding: 0 0 8px;
    }

    .product-labels-table,
    .product-labels-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .product-labels-table thead {
        display: none;
    }

    .product-labels-table tbody tr.product-labels-row {
        display: block;
        width: auto;
        margin: 0 12px 12px;
        padding: 12px 14px;
        border: 1px solid var(--pos-border);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 6px rgba(107, 21, 53, 0.05);
        box-sizing: border-box;
    }

    .product-labels-table tbody tr.product-labels-row td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        margin: 0;
        padding: 9px 0;
        border: none;
        border-bottom: 1px solid rgba(234, 221, 228, 0.9);
        box-sizing: border-box;
        float: none !important;
        position: static !important;
        text-align: left;
        min-width: 0;
    }

    .product-labels-table tbody tr.product-labels-row td:last-child {
        border-bottom: none;
        padding-bottom: 0;
        padding-top: 12px;
    }

    .product-labels-table tbody tr.product-labels-row td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 36%;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--pos-muted);
        line-height: 1.3;
    }

    .product-labels-table tbody tr.product-labels-row td.product-labels-product-cell {
        display: block;
        padding-top: 0;
        padding-bottom: 12px;
        border-bottom: 1px dashed var(--pos-border);
    }

    .product-labels-table tbody tr.product-labels-row td.product-labels-product-cell::before {
        content: none !important;
        display: none !important;
    }

    .product-labels-item-head {
        width: 100%;
        gap: 12px;
    }

    .product-labels-item-head .labels-row-check {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }

    .product-labels-table tbody tr.product-labels-row td[data-label="Actions"]::before {
        content: none !important;
        display: none !important;
    }

    .product-labels-table tbody tr.product-labels-row td > .bq-barcode-strip,
    .product-labels-table tbody tr.product-labels-row td > .bq-badge,
    .product-labels-table tbody tr.product-labels-row td > .product-labels-sku,
    .product-labels-table tbody tr.product-labels-row td > .labels-row-copies,
    .product-labels-table tbody tr.product-labels-row td > .labels-preview-barcode,
    .product-labels-table tbody tr.product-labels-row td > .bq-cell-meta {
        margin-left: auto;
        max-width: 62%;
        text-align: right;
        flex: 0 1 auto;
    }

    .product-labels-table tbody tr.product-labels-row .bq-barcode-strip,
    .product-labels-table tbody tr.product-labels-row .labels-preview-barcode {
        width: 168px !important;
        min-width: 168px !important;
        max-width: 168px !important;
        height: 52px !important;
        max-height: 52px !important;
    }

    .product-labels-table tbody tr.product-labels-row .pos-chip-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .labels-row-copies {
        width: 72px;
        min-height: 36px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-labels-toolbar__actions {
        grid-template-columns: 1fr;
    }
}

.labels-align-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 22, 18, 0.55);
}

.labels-align-dialog {
    width: min(920px, 100%);
    max-height: min(92vh, 900px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    padding: 16px 18px 20px;
}

.labels-align-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.labels-align-dialog__head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.labels-align-dialog__head p,
.labels-align-dialog__hint {
    margin: 4px 0 0;
    color: var(--pos-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.labels-align-dialog__hint {
    margin: 10px 0 14px;
}

.labels-align-dialog__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    margin-bottom: 14px;
}

.labels-align-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.labels-align-nudge {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.labels-align-nudge__mid {
    display: flex;
    gap: 6px;
}

.labels-align-nudge button,
.labels-align-values input {
    min-height: 36px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    background: #fff;
    color: var(--pos-text);
}

.labels-align-nudge button {
    min-width: 40px;
    cursor: pointer;
}

.labels-align-values {
    display: flex;
    gap: 12px;
}

.labels-align-values label {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.labels-align-values input {
    width: 88px;
    padding: 0 8px;
}

.labels-align-printer {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f6f5;
    border: 1px solid #d7e0dc;
}

.labels-align-printer label {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.labels-align-printer select {
    width: 100%;
    max-width: 520px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #c5d0cb;
    background: #fff;
    font-size: 0.9rem;
    color: #1a2b24;
}

.labels-align-printer__hint,
.labels-align-printer__error {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
}

.labels-align-printer__hint {
    color: var(--pos-muted);
}

.labels-align-printer__error {
    color: #b42318;
    font-weight: 600;
}

.labels-align-pages {
    display: grid;
    gap: 12px;
    justify-items: center;
    background: #e8edeb;
    border-radius: 10px;
    padding: 16px 12px;
}

.labels-align-page {
    position: relative;
    width: 104mm;
    height: 25mm;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.labels-align-page img {
    display: block;
    width: 104mm;
    height: 25mm;
    image-rendering: pixelated;
}

.labels-align-page__box {
    position: absolute;
    top: 0;
    height: 25mm;
    width: 50mm;
    box-sizing: border-box;
    border: 1px dashed #c2410c;
    pointer-events: none;
}

.labels-align-page__box--left {
    left: 3mm;
    width: 49mm;
}

.labels-align-page__box--right {
    left: 55mm;
    width: 49mm;
}

/* package-labels.css */
/* Package Address Labels — NovaJet Multipurpose 02L
   A4 210×297 mm · 2 labels · each 200×146 mm
   Margins: 5 mm left/right · 2.5 mm top/bottom
   Templates: compact | bold | framed | split
*/

.pkg-label-page {
    min-height: 100vh;
    background: #f3f0ee;
    color: #1f1a19;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

.pkg-label-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 20px;
    background: #2c2422;
    color: #fff;
}

.pkg-label-toolbar strong {
    font-size: 14px;
    letter-spacing: 0.04em;
}

.pkg-label-toolbar-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.pkg-label-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pkg-label-toolbar button,
.pkg-label-toolbar a {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    padding: 10px 16px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.pkg-label-toolbar button.primary {
    background: #9f082f;
    border-color: #9f082f;
}

/* Exact A4 sheet for NovaJet 02L */
.pkg-label-sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 24px auto;
    padding: 2.5mm 5mm;
    background: #fff;
    box-shadow: 0 18px 48px rgba(44, 36, 34, 0.12);
    box-sizing: border-box;
}

.pkg-label-sheet--dual {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding: 2.5mm 5mm;
}

/* Technova NovaJet 04P — 100 × 145 mm · 4 per A4
   A4 210×297 · left/right 5mm · top/bottom 3.5mm · no inter-label gap */
.pkg-label-sheet--04l {
    display: grid;
    grid-template-columns: repeat(2, 100mm);
    grid-template-rows: repeat(2, 145mm);
    justify-content: center;
    align-content: start;
    gap: 0;
    padding: 3.5mm 5mm;
}

.pkg-label-quarter {
    width: 100mm;
    height: 145mm;
    max-width: 100mm;
    max-height: 145mm;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5mm 4.5mm;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.pkg-label-sheet--04l .pkg-label-quarter {
    align-items: flex-start;
    justify-content: flex-start;
    /* Safe inset from die-cut edge so "Ship to" is never clipped */
    padding: 9mm 5.5mm 6mm;
}

/* Customer 3 & 4 (bottom row) — clear the horizontal cut between rows */
.pkg-label-sheet--04l .pkg-label-quarter:nth-child(n+3) {
    padding-top: 15mm;
    padding-bottom: 5mm;
}

.pkg-label-sheet--04l .pkg-label-quarter .pkg-label__eyebrow {
    margin-top: 0.5mm;
}

.pkg-label-quarter.is-empty {
    background: repeating-linear-gradient(
        -45deg,
        #faf7f6,
        #faf7f6 6px,
        #f3eeec 6px,
        #f3eeec 12px
    );
}

.pkg-label-sheet--04l .pkg-label {
    gap: 3.5mm;
}

.pkg-label-sheet--04l .pkg-label__from {
    padding-top: 3mm;
}

.pkg-label-sheet--04l .pkg-label--compact .pkg-label__recipient {
    font-size: calc(28px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--compact .pkg-label__heading,
.pkg-label-sheet--04l .pkg-label--compact .pkg-label__line,
.pkg-label-sheet--04l .pkg-label--compact .pkg-label__mobile,
.pkg-label-sheet--04l .pkg-label--compact .pkg-label__sender {
    font-size: calc(18.5px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--compact .pkg-label__eyebrow {
    font-size: calc(12px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--bold .pkg-label__recipient {
    font-size: calc(33px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--bold .pkg-label__heading,
.pkg-label-sheet--04l .pkg-label--bold .pkg-label__line,
.pkg-label-sheet--04l .pkg-label--bold .pkg-label__mobile,
.pkg-label-sheet--04l .pkg-label--bold .pkg-label__sender {
    font-size: calc(19px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--framed {
    padding: 4mm 4.5mm;
}

.pkg-label-sheet--04l .pkg-label--split {
    gap: 3mm;
}

.pkg-label-sheet--04l .pkg-label--split .pkg-label__recipient {
    font-size: calc(25px * var(--pkg-font-scale, 1));
}

.pkg-label-sheet--04l .pkg-label--split .pkg-label__heading,
.pkg-label-sheet--04l .pkg-label--split .pkg-label__line,
.pkg-label-sheet--04l .pkg-label--split .pkg-label__mobile,
.pkg-label-sheet--04l .pkg-label--split .pkg-label__sender {
    font-size: calc(16.5px * var(--pkg-font-scale, 1));
}

/* Each sticker: 200 × 146 mm — content centered as one block */
.pkg-label-half {
    flex: 0 0 146mm;
    width: 200mm;
    height: 146mm;
    max-width: 200mm;
    max-height: 146mm;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10mm 12mm;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.pkg-label-half[hidden] {
    display: none !important;
}

.pkg-label-cut {
    flex: 0 0 0;
    width: 200mm;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    position: relative;
    overflow: visible;
    color: #888;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}

.pkg-label-cut span {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0 10px;
    border: 1px dashed #9a9a9a;
    z-index: 2;
}

/* Stacked TO → FROM with even gaps (no huge empty middle) */
.pkg-label {
    width: 100%;
    height: auto;
    max-height: 100%;
    max-width: none;
    color: #111;
    --pkg-font-scale: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 7mm;
    box-sizing: border-box;
}

.pkg-label__to {
    flex: 0 0 auto;
    min-height: 0;
}

.pkg-label__from {
    flex: 0 0 auto;
    padding-top: 5mm;
    border-top: 1px solid #bdbdbd;
}

.pkg-label__eyebrow {
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6f6461;
    margin-bottom: 3px;
}

.pkg-label__recipient {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.pkg-label__heading {
    font-weight: 700;
    margin: 0 0 2px;
}

.pkg-label__line,
.pkg-label__sender,
.pkg-label__mobile {
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    margin: 0;
}

.pkg-label__from-address {
    white-space: normal;
    max-width: 100%;
}

.pkg-label__block {
    margin: 0 0 6px;
}

.pkg-label__mobile {
    margin-top: 0;
}

.pkg-label__sender {
    font-weight: 700;
    margin: 0 0 2px;
}

/* Compact — denser, balanced (default) */
.pkg-label--compact {
    gap: 6mm;
}

.pkg-label--compact .pkg-label__recipient {
    font-size: calc(44px * var(--pkg-font-scale, 1));
}

.pkg-label--compact .pkg-label__heading,
.pkg-label--compact .pkg-label__line,
.pkg-label--compact .pkg-label__mobile,
.pkg-label--compact .pkg-label__sender {
    font-size: calc(26px * var(--pkg-font-scale, 1));
}

.pkg-label--compact .pkg-label__eyebrow {
    font-size: calc(14px * var(--pkg-font-scale, 1));
}

.pkg-label--compact .pkg-label__from {
    padding-top: 4.5mm;
}

/* Bold — large recipient name */
.pkg-label--bold {
    gap: 7mm;
}

.pkg-label--bold .pkg-label__recipient {
    font-size: calc(54px * var(--pkg-font-scale, 1));
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.pkg-label--bold .pkg-label__heading,
.pkg-label--bold .pkg-label__line,
.pkg-label--bold .pkg-label__mobile,
.pkg-label--bold .pkg-label__sender {
    font-size: calc(28px * var(--pkg-font-scale, 1));
}

/* Framed — inner border; fill sticker evenly */
.pkg-label--framed {
    height: 100%;
    justify-content: space-between;
    gap: 6mm;
    border: 1.25pt solid #1f1a19;
    padding: 8mm 9mm;
}

.pkg-label--framed .pkg-label__recipient {
    font-size: calc(44px * var(--pkg-font-scale, 1));
}

.pkg-label--framed .pkg-label__heading,
.pkg-label--framed .pkg-label__line,
.pkg-label--framed .pkg-label__mobile,
.pkg-label--framed .pkg-label__sender {
    font-size: calc(26px * var(--pkg-font-scale, 1));
}

/* Split — TO left / FROM right, both top-aligned */
.pkg-label--split {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto;
    align-items: start;
    gap: 0 8mm;
    height: auto;
}

.pkg-label--split .pkg-label__to {
    padding-right: 4mm;
}

.pkg-label--split .pkg-label__from {
    border-top: 0;
    border-left: 1px solid #bdbdbd;
    padding-top: 0;
    padding-left: 8mm;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
}

.pkg-label--split .pkg-label__recipient {
    font-size: calc(42px * var(--pkg-font-scale, 1));
}

.pkg-label--split .pkg-label__heading,
.pkg-label--split .pkg-label__line,
.pkg-label--split .pkg-label__mobile,
.pkg-label--split .pkg-label__sender {
    font-size: calc(25px * var(--pkg-font-scale, 1));
}

/* ── Studio (form + live preview) ── */
.pkg-label-app.bq-app {
    --pkg-studio-sticky-top: 68px;
    overflow: visible;
}

.pos-main:has(.pkg-label-app) {
    overflow: visible;
}

.bq-panel.bq-form-shell:has(.pkg-label-studio) {
    overflow: visible;
}

.bq-panel.bq-form-shell:has(.pkg-label-studio) .bq-panel-pad {
    overflow: visible;
}

.pkg-label-studio {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pkg-label-studio__form {
    min-width: 0;
}

.pkg-label-studio__preview {
    min-width: 0;
    position: sticky;
    top: var(--pkg-studio-sticky-top, 68px);
    align-self: start;
    z-index: 4;
    max-height: calc(100dvh - var(--pkg-studio-sticky-top, 68px) - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.pkg-label-preview-card {
    background: #fff;
    border: 1px solid #eadfdb;
    padding: 16px;
    min-height: 0;
    box-shadow: 0 10px 28px rgba(31, 26, 25, 0.06);
}

.pkg-label-half.is-empty {
    background: repeating-linear-gradient(
        -45deg,
        #faf7f6,
        #faf7f6 8px,
        #f3eeec 8px,
        #f3eeec 16px
    );
}

.pkg-label-slot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.pkg-label-slot {
    margin: 0;
    border: 1px solid #eadfdb;
    padding: 16px;
    background: #fffaf8;
    border-radius: 2px;
}

.pkg-label-slot legend {
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pkg-label-slot legend strong {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9f082f;
}

.pkg-label-slot legend span {
    font-size: 12px;
    color: #6f6461;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.pkg-label-preview-card--dual {
    padding: 16px;
}

.pkg-label-preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #6f6461;
}

.pkg-label-preview-meta strong {
    color: #1f1a19;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 11px;
}

.pkg-label-preview-meta [data-preview-sheet-name] {
    margin-left: auto;
    font-weight: 700;
    color: #9f082f;
    letter-spacing: 0.06em;
}

.pkg-label-preview-sheet {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid #eadfdb;
    background: #fff;
    aspect-ratio: 210 / 297;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 1.2% 2.4%;
    box-sizing: border-box;
}

/* Dual (02L) preview: keep Cut between top/bottom after markup reorder */
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-half[data-preview-slot="1"] {
    order: 1;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-cut {
    order: 2;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-half[data-preview-slot="2"] {
    order: 3;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-half[data-preview-slot="3"],
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-half[data-preview-slot="4"] {
    display: none !important;
    order: 4;
    flex: 0 0 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* Dual (02L) cell sizing — must NOT apply to 04P grid */
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-half {
    position: relative;
    flex: 0 0 48.5%;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: 48.5%;
    min-height: 0;
    padding: 6% 7%;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label {
    height: auto;
    max-height: 100%;
    width: 100%;
    gap: 2.5mm;
    justify-content: flex-start;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label--framed {
    height: 100%;
    padding: 4% 5%;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label--split {
    height: auto;
    width: 100%;
}

/* Compact preview type so 80–130% still fits inside the mini sheet */
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__recipient {
    font-size: calc(14px * var(--pkg-font-scale, 1)) !important;
    line-height: 1.15 !important;
    margin-bottom: 3px !important;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__heading,
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__line,
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__mobile,
.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__sender {
    font-size: calc(11px * var(--pkg-font-scale, 1)) !important;
    line-height: 1.2 !important;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__eyebrow {
    font-size: calc(8px * var(--pkg-font-scale, 1)) !important;
    margin-bottom: 1px !important;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label__from {
    padding-top: 2mm;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-cut {
    width: 100%;
    flex: 0 0 auto;
    z-index: 2;
}

.pkg-label-preview-sheet:not(.pkg-label-preview-sheet--04l) .pkg-label-cut span {
    font-size: 8px;
}

/* ── Technova 04P live preview (2×2) ── */
.pkg-label-preview-sheet--04l {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2.2%;
    padding: 3.2%;
    align-content: stretch;
}

.pkg-label-preview-sheet--04l .pkg-label-half,
.pkg-label-preview-sheet--04l .pkg-label-quarter {
    position: relative;
    flex: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 14% 10% 10%;
    border: 1px solid #f0e4e0;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    background: #fff;
}

.pkg-label-preview-sheet--04l .pkg-label-half[data-preview-slot="3"],
.pkg-label-preview-sheet--04l .pkg-label-half[data-preview-slot="4"] {
    padding-top: 18%;
}

.pkg-label-preview-sheet--04l .pkg-label-cut {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.pkg-label-preview-sheet--04l .pkg-label {
    gap: 1.6mm;
    width: 100%;
    max-height: 100%;
    justify-content: flex-start;
}

.pkg-label-preview-sheet--04l .pkg-label__from {
    padding-top: 1.5mm;
}

.pkg-label-preview-sheet--04l .pkg-label__recipient {
    font-size: calc(11px * var(--pkg-font-scale, 1)) !important;
    line-height: 1.15 !important;
    margin-bottom: 2px !important;
}

.pkg-label-preview-sheet--04l .pkg-label__heading,
.pkg-label-preview-sheet--04l .pkg-label__line,
.pkg-label-preview-sheet--04l .pkg-label__mobile,
.pkg-label-preview-sheet--04l .pkg-label__sender {
    font-size: calc(9px * var(--pkg-font-scale, 1)) !important;
    line-height: 1.2 !important;
}

.pkg-label-preview-sheet--04l .pkg-label__eyebrow {
    font-size: calc(7px * var(--pkg-font-scale, 1)) !important;
    margin-bottom: 1px !important;
    letter-spacing: 0.1em;
}

.pkg-label-preview-sheet--04l .pkg-label--framed {
    padding: 3% 4%;
}

.pkg-label-preview-sheet--04l .pkg-label-slot-badge {
    top: 4px;
    right: 5px;
    font-size: 8px;
}

.pkg-label-preview-sheet--04l .pkg-label-empty-hint {
    margin-top: 8px;
    font-size: 10px;
}

.pkg-label-slot-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9f082f;
    z-index: 1;
}

.pkg-label-empty-hint {
    color: #8a7f7b;
    font-size: 12px;
    font-style: italic;
    margin-top: 18px;
}

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

.pkg-label-template-option {
    display: block;
    border: 1px solid #d9cdc8;
    padding: 14px 16px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 2px;
}

.pkg-label-template-option input {
    margin-right: 8px;
}

.pkg-label-template-option.is-active,
.pkg-label-template-option:has(input:checked) {
    border-color: #9f082f;
    box-shadow: 0 0 0 1px #9f082f;
}

.pkg-label-template-option strong {
    display: block;
    margin-bottom: 4px;
}

.pkg-label-template-option span {
    font-size: 12px;
    color: #6f6461;
    line-height: 1.35;
}

.pkg-label-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pkg-label-sheet-option {
    display: block;
    border: 1px solid #d9cdc8;
    padding: 14px 16px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 2px;
}

.pkg-label-sheet-option input {
    margin-right: 8px;
}

.pkg-label-sheet-option.is-active,
.pkg-label-sheet-option:has(input:checked) {
    border-color: #9f082f;
    box-shadow: 0 0 0 1px #9f082f;
}

.pkg-label-sheet-option strong {
    display: block;
    margin-bottom: 4px;
}

.pkg-label-sheet-option span {
    font-size: 12px;
    color: #6f6461;
    line-height: 1.35;
}

.pkg-label-font-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #eadfdb;
    background: #fffaf8;
}

.pkg-label-font-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid #d9cdc8;
    border-radius: 8px;
    background: #fff;
    color: #1f1a19;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pkg-label-font-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pkg-label-font-value {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.pkg-label-font-value strong {
    display: block;
    font-size: 18px;
    color: #1f1a19;
    line-height: 1.2;
}

.pkg-label-font-value span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #6f6461;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pkg-label__from-address {
    margin: 2px 0 4px;
}

.pkg-label-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #eadfdb;
    background: #fffaf8;
}

.pkg-label-toggle-row strong {
    display: block;
    font-size: 13px;
    color: #1f1a19;
}

.pkg-label-toggle-row span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6f6461;
}

.pkg-label-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.pkg-label-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pkg-label-switch-ui {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d9cdc8;
    position: relative;
    transition: background 0.2s;
}

.pkg-label-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.pkg-label-switch input:checked + .pkg-label-switch-ui {
    background: #9f082f;
}

.pkg-label-switch input:checked + .pkg-label-switch-ui::after {
    transform: translateX(20px);
}

.pkg-label-switch-text {
    min-width: 28px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6f6461;
}

.pkg-label-switch input:checked ~ .pkg-label-switch-text {
    color: #9f082f;
}

.pkg-label-mobile-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.pkg-label-mobile-row .bq-form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.pkg-label-fetch-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pkg-label-search-card {
    border: 1px solid #f0d3de;
    background: linear-gradient(135deg, #fff5f9, #fff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pkg-label-search-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pkg-label-search-head i {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #9f082f;
    color: #fff;
    font-size: 14px;
}

.pkg-label-search-head strong {
    display: block;
    font-size: 14px;
    color: #1f1a19;
}

.pkg-label-search-head span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #6f6461;
    line-height: 1.4;
}

.pkg-label-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.pkg-label-search-mobile-wrap {
    position: relative;
    flex: 1 1 200px;
    min-width: 0;
}

.pkg-label-search-row #pkg_search_mobile {
    width: 100%;
}

.pkg-label-suggest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #e8d5de;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 26, 25, 0.12);
}

.pkg-label-suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f3ecef;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.pkg-label-suggest-item:last-child {
    border-bottom: 0;
}

.pkg-label-suggest-item:hover,
.pkg-label-suggest-item.is-active {
    background: #fff5f9;
}

.pkg-label-suggest-item__mobile {
    font-size: 14px;
    font-weight: 600;
    color: #1f1a19;
    letter-spacing: 0.02em;
}

.pkg-label-suggest-item__meta {
    font-size: 12px;
    color: #6f6461;
    line-height: 1.35;
}

.pkg-label-suggest-item__city::before {
    content: ' · ';
}

.pkg-label-search-row #pkg_search_slot {
    flex: 0 1 200px;
    min-width: 0;
}

.pkg-label-search-row .pos-chip-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .pkg-label-search-mobile-wrap,
    .pkg-label-search-row #pkg_search_slot,
    .pkg-label-search-row .pos-chip-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

.pkg-label-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pkg-label-actions-note {
    flex: 1 1 220px;
    font-size: 12px;
    line-height: 1.45;
    color: #6f6461;
}

.pkg-label-lookup-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6f6461;
}

.pkg-label-lookup-hint.is-success {
    color: #166534;
}

.pkg-label-lookup-hint.is-muted {
    color: #6f6461;
}

.pkg-label-lookup-hint.is-error {
    color: #9f082f;
}

.pkg-label-lookup-hint.is-loading {
    color: #7a1c2e;
}

@media (max-width: 720px) {
    .pkg-label-toggle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
    }
}

/* Responsive modules */
@media (min-width: 1101px) {
    .pkg-label-studio__preview {
        position: sticky;
    }
}

@media (max-width: 1100px) {
    .pkg-label-studio {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .pkg-label-studio__preview {
        position: static;
        order: -1;
        width: 100%;
    }

    .pkg-label-preview-card,
    .pkg-label-preview-card--dual {
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pkg-label-preview-sheet {
        max-width: min(100%, 300px);
        margin-inline: auto;
    }
}

@media (max-width: 720px) {
    .pkg-label-studio {
        gap: 16px;
    }

    .pkg-label-slot-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 16px;
    }

    .pkg-label-template-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pkg-label-sheet-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pkg-label-template-option {
        padding: 12px 14px;
    }

    .pkg-label-preview-card,
    .pkg-label-preview-card--dual {
        padding: 14px;
    }

    .pkg-label-preview-meta {
        flex-wrap: wrap;
        gap: 6px 10px;
        margin-bottom: 12px;
    }

    .pkg-label-preview-sheet {
        max-width: 100%;
        width: min(100%, 280px);
    }

    .pkg-label-slot {
        padding: 14px;
    }

    .pkg-label-actions {
        margin-top: 18px;
        gap: 10px;
    }

    .pkg-label-actions .btn-save {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 980px) {
    .pkg-label-sheet {
        width: auto;
        height: auto;
        min-height: 0;
        margin: 16px;
        padding: 24px;
    }

    .pkg-label-half {
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        flex: 1 1 auto;
        min-height: 200px;
    }

    .pkg-label-sheet--dual {
        align-items: stretch;
    }

    .pkg-label-cut {
        width: 100%;
        height: auto;
        flex: 0 0 auto;
        margin: 12px 0;
        text-align: center;
    }

    .pkg-label-cut span {
        position: static;
        transform: none;
        display: inline-block;
    }
}

@page {
    size: A4 portrait;
    margin: 0;
}

@media print {
    html, body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 210mm;
        height: 297mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .pkg-label-page {
        background: #fff;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    .pkg-label-sheet,
    .pkg-label-sheet--dual,
    .pkg-label-sheet--04l {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: hidden;
        page-break-after: avoid;
        break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .pkg-label-sheet--dual {
        padding: 2.5mm 5mm !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .pkg-label-sheet--04l {
        display: grid !important;
        grid-template-columns: repeat(2, 100mm) !important;
        grid-template-rows: repeat(2, 145mm) !important;
        justify-content: center !important;
        align-content: start !important;
        padding: 3.5mm 5mm !important;
        gap: 0 !important;
    }

    .pkg-label-quarter {
        width: 100mm !important;
        height: 145mm !important;
        max-width: 100mm !important;
        max-height: 145mm !important;
        min-height: 145mm !important;
        padding: 9mm 5.5mm 6mm !important;
        overflow: hidden;
        page-break-inside: avoid;
        break-inside: avoid;
        background: transparent !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .pkg-label-sheet--04l .pkg-label-quarter:nth-child(n+3) {
        padding-top: 15mm !important;
        padding-bottom: 5mm !important;
    }

    .pkg-label-quarter.is-empty {
        background: transparent !important;
    }

    .pkg-label-half {
        flex: 0 0 146mm !important;
        width: 200mm !important;
        height: 146mm !important;
        max-width: 200mm !important;
        max-height: 146mm !important;
        min-height: 146mm !important;
        padding: 10mm 12mm !important;
        overflow: hidden;
        page-break-inside: avoid;
        break-inside: avoid;
        background: transparent !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .pkg-label {
        width: 100% !important;
        height: auto !important;
        max-height: 100% !important;
        max-width: 100% !important;
    }

    .pkg-label__recipient,
    .pkg-label__line,
    .pkg-label__sender,
    .pkg-label__mobile,
    .pkg-label__from-address {
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
    }

    .pkg-label--framed {
        height: 100% !important;
        padding: 7mm 8mm !important;
    }

    .pkg-label--split {
        height: auto !important;
        align-items: start !important;
    }

    .pkg-label-half.is-empty {
        background: transparent !important;
    }

    .pkg-label-cut {
        display: none !important;
    }

    .pkg-label-slot-badge,
    .pkg-label-empty-hint {
        display: none !important;
    }
}

/* ── Label history (billing) ── */

.pkg-label-history-app {
    min-width: 0;
    max-width: 100%;
}

.pkg-label-history-app .pkg-label-history-panel {
    margin-top: 0;
}

.pkg-label-history-body {
    padding-top: 16px;
}

.pkg-label-history-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.85fr) repeat(2, minmax(130px, 0.75fr)) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 0;
}

.pkg-label-history-filters .bq-form-control {
    min-width: 0;
    width: 100%;
    font-size: 0.86rem;
}

.pkg-label-history-filter-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.pkg-label-history-table-wrap {
    margin-top: 0;
    border: 1px solid var(--pos-border, #f0d6e2);
    border-radius: 10px;
    background: #fff;
}

.pkg-label-history-table {
    min-width: 720px;
}

.pkg-label-history-table .bq-cell-title {
    font-size: 0.86rem;
    line-height: 1.35;
}

.pkg-label-history-table .bq-cell-meta {
    font-size: 0.76rem;
}

.pkg-label-history-table thead th {
    font-size: 0.74rem;
    white-space: nowrap;
}

.pkg-label-history-table .bq-badge {
    font-size: 0.72rem;
}

.pkg-label-history-empty-row .bq-table-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--pos-muted, #6f6461);
}

.pkg-label-history-pagination {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pos-border, #f0d6e2);
}

.pkg-label-history-pagination .bq-pagination {
    padding: 0;
}

.pkg-label-history-pagination .bq-pagination nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pkg-label-history-pagination .bq-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
}

.pkg-label-history-pagination .bq-pagination__nav,
.pkg-label-history-pagination .bq-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--pos-border, #f0d6e2);
    background: #fff;
    color: var(--pos-maroon, #9f082f);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.pkg-label-history-pagination .bq-pagination__page {
    min-width: 36px;
    padding: 0 10px;
}

.pkg-label-history-pagination .bq-pagination__nav:hover,
.pkg-label-history-pagination .bq-pagination__page:hover {
    background: #fff5f9;
    border-color: #e8b8ca;
}

.pkg-label-history-pagination .bq-pagination__page.is-active {
    background: var(--pos-maroon, #9f082f);
    border-color: var(--pos-maroon, #9f082f);
    color: #fff;
}

.pkg-label-history-pagination .bq-pagination__nav.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pkg-label-history-pagination .bq-pagination__gap {
    padding: 0 4px;
    color: var(--pos-muted, #6f6461);
    font-size: 0.82rem;
}

.pkg-label-history-pagination .bq-pagination-meta {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--pos-muted, #6f6461);
    text-align: center;
}

.pkg-label-history-delete-form {
    margin: 0;
    display: inline-flex;
}

.pkg-label-history-table .pkg-label-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.pkg-label-history-table .pkg-label-history-action {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    white-space: nowrap;
}

.pkg-label-history-delete-btn {
    color: #9f082f;
    border-color: #e8b8ca;
    background: #fff;
}

@media (max-width: 1024px) {
    .pkg-label-history-filters {
        grid-template-columns: 1fr 1fr;
    }

    .pkg-label-history-filter-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pkg-label-history-filter-actions .pos-chip-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .pkg-label-history-table {
        min-width: 0;
    }

    .pkg-label-history-pagination .bq-pagination nav {
        justify-content: center;
    }

    .pkg-label-history-pagination .bq-pagination__nav span {
        display: none;
    }

    .pkg-label-history-pagination .bq-pagination__nav {
        min-width: 36px;
        padding: 0;
    }
}

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

    .pkg-label-history-table.bq-table-responsive tbody td[data-label="Action"] .pkg-label-history-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .pkg-label-history-table.bq-table-responsive tbody td[data-label="Action"] .pkg-label-history-action {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .pkg-label-history-table.bq-table-responsive tbody td[data-label="Customers"] .bq-cell-title {
        text-align: right;
        word-break: break-word;
    }
}

.pkg-label-batch-detail .pkg-label-batch-id {
    font-size: 12px;
    color: #6b5f5c;
    word-break: break-all;
}

.pkg-label-batch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pkg-label-batch-detail .bq-panel-head {
    align-items: flex-start;
    gap: 12px;
}

.pkg-label-batch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    padding: 0 18px 18px;
}

.pkg-label-batch-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pkg-label-batch-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #e8e0dc;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.pkg-label-batch-card.is-empty {
    background: #fbf8f6;
    border-style: dashed;
}

.pkg-label-batch-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #faf7f5;
    border-bottom: 1px solid #efe8e4;
}

.pkg-label-batch-card.is-empty .pkg-label-batch-card__head {
    background: #f5f0ed;
}

.pkg-label-batch-card__head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.pkg-label-batch-card__body {
    margin: 0;
    padding: 14px 16px 16px;
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
}

.pkg-label-batch-card__body > div {
    display: grid;
    gap: 4px;
}

.pkg-label-batch-card__body dt {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a7d78;
}

.pkg-label-batch-card__body dd {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2c2422;
    overflow-wrap: anywhere;
}

.pkg-label-batch-card__address dd {
    line-height: 1.55;
}

.pkg-label-batch-card__meta {
    color: #6b5f5c;
}

.pkg-label-batch-card__empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 16px;
    text-align: center;
    color: #8a7d78;
}

.pkg-label-batch-card__empty i {
    font-size: 1.25rem;
    color: #c4b4ae;
    margin-bottom: 4px;
}

.pkg-label-batch-card__empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #5c514d;
}

.pkg-label-batch-card__empty span {
    font-size: 12px;
    line-height: 1.4;
}

.bq-badge-muted {
    background: #efe8e4;
    color: #6b5f5c;
}

@media (max-width: 1100px) {
    .pkg-label-batch-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pkg-label-batch-detail .bq-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .pkg-label-batch-actions {
        width: 100%;
        justify-content: stretch;
    }

    .pkg-label-batch-actions .pos-chip-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }

    .pkg-label-batch-grid,
    .pkg-label-batch-grid--4 {
        grid-template-columns: 1fr;
        padding: 0 14px 14px;
    }
}

@media (max-width: 480px) {
    .pkg-label-batch-actions .pos-chip-btn {
        flex: 1 1 100%;
    }
}

/* product-form.css */
/* Product create / edit — reference layout, boutique theme, responsive */

.pf-form {
    max-width: 1280px;
    margin: 0 auto;
}

.pf-alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--pos-radius, 12px);
    background: #fde8ee;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    font-size: 0.85rem;
}

.pf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (min-width: 1024px) {
    .pf-layout {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 360px);
    }

    .pf-actions-mobile {
        display: none;
    }
}

.pf-actions-mobile {
    display: block;
}

@media (max-width: 1023px) {
    .pf-main {
        order: 1;
    }

    .pf-sidebar {
        order: 2;
    }

    .pf-actions-mobile {
        order: 3;
    }
}

.pf-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.pf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .pf-sidebar-inner {
        position: sticky;
        top: 12px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

.pf-card {
    background: var(--pos-card, #fff);
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: var(--pos-radius, 12px);
    padding: 16px 18px;
    box-shadow: var(--pos-shadow, 0 4px 16px rgba(107, 21, 53, 0.06));
}

.pf-card-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
    margin-bottom: 10px;
}

.pf-card-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-maroon, #6b1535);
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: none;
}

.pf-card .pf-data-shell {
    margin: 0;
}

.pf-card .pf-data-shell .pf-type-picker {
    margin-bottom: 4px;
}

.pf-input,
.pf-textarea,
.pf-select,
.pf-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--pos-text, #2a1520);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-input:focus,
.pf-textarea:focus,
.pf-select:focus,
.pf-form .form-control:focus {
    outline: none;
    border-color: var(--pos-pink, #e91e8c);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.pf-input--title {
    font-size: 1rem;
    font-weight: 600;
}

.pf-permalink {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pf-permalink:focus-within {
    border-color: var(--pos-pink, #e91e8c);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.pf-permalink-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-muted, #8a6b78);
    font-size: 0.72rem;
    border-right: 1px solid var(--pos-border, #eadde4);
    white-space: nowrap;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-permalink-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 10px 12px;
    font-size: 0.85rem;
    background: transparent;
}

.pf-permalink-input:focus {
    outline: none;
    box-shadow: none;
}

.pf-hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--pos-muted, #8a6b78);
    word-break: normal;
    overflow-wrap: anywhere;
}

.pf-hint a {
    color: var(--pos-maroon, #6b1535);
    text-decoration: none;
}

.pf-actions-desktop {
    display: none;
    gap: 10px;
    justify-content: flex-end;
}

@media (min-width: 1024px) {
    .pf-actions-desktop {
        display: flex;
    }
}

.pf-actions-mobile {
    display: block;
    margin-top: 0;
}

.pf-actions-mobile .pf-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 0.95rem;
}

.pf-actions-mobile .pf-btn-cancel {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--pos-muted, #8a6b78);
    text-decoration: none;
    border: none;
    background: transparent;
    padding: 0;
}

.pf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--pos-maroon, #6b1535), var(--pos-maroon-light, #8a1f47));
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.pf-btn-primary:hover {
    opacity: 0.92;
}

.pf-btn-cancel {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 8px;
    background: #fff;
    color: var(--pos-maroon, #6b1535);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.pf-file-name {
    font-size: 0.72rem;
    color: var(--pos-muted, #8a6b78);
    margin: 6px 0 0;
    word-break: break-all;
}

.pf-image-preview {
    position: relative;
    display: none;
    margin-top: 12px;
    border: 1px dashed var(--pos-border, #eadde4);
    border-radius: 8px;
    padding: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    align-items: center;
    justify-content: center;
}

.pf-image-preview.is-visible {
    display: flex;
}

.pf-image-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 6px;
    object-fit: contain;
}

.pf-image-remove,
.pf-gallery-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(107, 21, 53, 0.85);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.pf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.pf-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--pos-border, #eadde4);
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.pf-category-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--pos-text, #2a1520);
    cursor: pointer;
}

.pf-category-option input {
    accent-color: var(--pos-maroon, #6b1535);
    width: 16px;
    height: 16px;
}

.pf-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    margin: 8px 0;
}

.pf-checkbox-row input {
    accent-color: var(--pos-maroon, #6b1535);
}

/* Rich text editor (TinyMCE) */
.pf-editor-wrap .tox-tinymce {
    border-radius: 10px;
    border-color: var(--pos-border, #eadde4) !important;
    overflow: hidden;
}

.pf-editor-wrap .tox .tox-edit-area__iframe {
    background: #fff;
}

.pf-textarea--editor {
    min-height: 280px;
}

/* Legacy quill hooks (safe to remove later) */
.pf-quill-wrap .ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: var(--pos-border, #eadde4);
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-quill-wrap .ql-container.ql-snow {
    border-color: var(--pos-border, #eadde4);
    border-radius: 0 0 8px 8px;
    font-size: 0.88rem;
}

.pf-quill-wrap #quill-editor {
    min-height: 240px;
    background: #fff;
}

/* Product data — stacked sections (responsive, not tab-sidebar) */
.pf-data-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.pf-type-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 400px) {
    .pf-type-picker {
        grid-template-columns: 1fr;
    }
}

.pf-type-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.pf-type-card:hover {
    border-color: rgba(158, 42, 66, 0.35);
}

.pf-type-card.is-selected {
    border-color: #9e2a42;
    background: #fffafb;
    box-shadow: 0 4px 16px rgba(107, 21, 53, 0.1);
}

.pf-type-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--pos-pink-soft, #fce4ef);
    color: #9e2a42;
    font-size: 1rem;
}

.pf-type-card.is-selected .pf-type-card-icon {
    background: #9e2a42;
    color: #fff;
}

.pf-type-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pf-type-card-text strong {
    font-size: 0.92rem;
    color: #3d2a32;
}

.pf-type-card-text small {
    font-size: 0.78rem;
    color: var(--pos-muted, #6b5b63);
}

.pf-type-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 1.35rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #9e2a42;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
}

.pf-data-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pf-data-section {
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin: 0;
}

.pf-data-section--variations.is-open {
    border-color: rgba(158, 42, 66, 0.25);
}

.pf-section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: #faf8f9;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d2a32;
    cursor: pointer;
    text-align: left;
}

.pf-data-section.is-open .pf-section-toggle {
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon);
    border-bottom: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px 12px 0 0;
}

.pf-section-toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #9e2a42;
    flex-shrink: 0;
}

.pf-section-toggle-label {
    flex: 1;
    min-width: 0;
}

.pf-section-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: #9e2a42;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.pf-section-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--pos-muted, #6b5b63);
    transition: transform 0.2s;
}

.pf-data-section.is-open .pf-section-chevron {
    transform: rotate(180deg);
}

.pf-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    padding: 0 18px;
}

.pf-data-section.is-open .pf-section-body {
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 20px 24px;
}

.pf-section-body > *:first-child {
    margin-top: 0;
}

.pf-section-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e8f2fc;
    border: 1px solid #c5daf5;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #2a4a6e;
}

.pf-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 18px;
}

@media (min-width: 520px) {
    .pf-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .pf-fields-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

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

.pf-field--check {
    justify-content: center;
}

.pf-select--tall {
    min-height: 120px;
    padding: 10px 12px;
    line-height: 1.5;
}

.pf-related-products {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--pos-border, #eadde4);
}

.pf-related-products .pf-field-label {
    margin-bottom: 8px;
}

.pf-related-products .pf-hint {
    margin-top: 10px;
}

@media (max-width: 519px) {
    .pf-section-toggle {
        padding: 12px 14px;
    }

    .pf-data-section.is-open .pf-section-body {
        padding: 16px 16px 20px;
        gap: 18px;
    }
}

.pf-variation-attrs-card {
    padding: 18px 20px;
    margin: 0;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(158, 42, 66, 0.2);
    box-shadow: inset 0 0 0 1px rgba(252, 228, 239, 0.6);
}

.pf-variation-attrs-card .pf-hint {
    margin: 0 0 14px;
    line-height: 1.5;
}

.pf-variation-attrs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pf-variation-attrs-card[hidden] {
    display: none !important;
}

.pf-empty-attrs {
    grid-column: 1 / -1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-empty-attrs code {
    font-size: 0.75rem;
    word-break: break-all;
}

.pf-variations-create-steps {
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #faf8f9 0%, #fce4ef 100%);
    border: 1px solid rgba(158, 42, 66, 0.15);
}

.pf-steps-list {
    margin: 0 0 10px;
    padding-left: 1.25rem;
    color: #3d2a32;
    font-size: 0.88rem;
    line-height: 1.6;
}

.pf-steps-list li {
    margin-bottom: 4px;
}

.pf-display-attrs-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-display-attrs-title {
    margin: 0;
}

.pf-card-heading-sm {
    margin: 0;
    font-size: 0.92rem;
    color: var(--pos-maroon);
}

.pf-variation-attr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.pf-check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--pos-border, #eadde4);
    cursor: pointer;
    min-height: 56px;
}

.pf-check-card input {
    margin-top: 3px;
}

.pf-check-card strong {
    display: block;
    font-size: 0.86rem;
}

.pf-check-card small {
    color: var(--pos-muted, #6b5b63);
    font-size: 0.75rem;
}

.pf-generate-all-hint {
    margin: 0 0 4px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8f4f6;
    border: 1px solid var(--pos-border, #eadde4);
    line-height: 1.5;
}

.pf-sku-assigned {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f0faf3;
    border: 1px solid #c8e6c9;
}

.pf-sku-assigned--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    background: transparent;
    border: none;
}

.pf-sku-code {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #c8e6c9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: #2e7d32;
    letter-spacing: 0.02em;
}

.pf-sku-pending {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #faf8f9;
    border: 1px dashed var(--pos-border, #eadde4);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--pos-muted, #6b5b63);
}

.pf-sku-pending--compact {
    margin: 0;
    padding: 10px 12px;
    min-height: 42px;
    align-items: center;
}

.pf-input--sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pf-sku-scan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.pf-sku-scan .pf-input--sku {
    width: 100%;
    min-width: 0;
}

.pf-sku-scan .pos-input-btn--camera {
    min-height: 42px;
    min-width: 44px;
}

.pf-v-sku-preview[readonly] {
    background: #f8f4f6;
    color: #2e7d32;
    font-weight: 600;
    cursor: default;
}

.pf-input--sku.pf-input--has-value,
.pf-v-sku.pf-input--has-value {
    font-weight: 600;
    color: #2e7d32;
}

.pf-variations-manager--draft {
    margin-top: 4px;
}

.pf-variations-manager--draft .pf-hint {
    margin-top: 4px;
}

.pf-variants-empty-state {
    padding: 20px 16px;
    margin-bottom: 8px;
}

.pf-variations-save-first i {
    font-size: 2rem;
    color: #9e2a42;
    margin-bottom: 10px;
}

.pf-variations-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pf-variants-heading {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--pos-maroon);
}

.pf-variants-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 10px 0 4px;
}

.pf-v-text-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--pos-pink, #c2185b);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-v-text-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pf-v-text-btn:hover:not(:disabled) {
    text-decoration: underline;
}

.pf-variations-card-head {
    margin-bottom: 8px;
}

.pf-variations-help {
    margin-top: 8px !important;
    max-width: 52rem;
}

.pf-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--pos-muted, #6b5b63);
}

.pf-variation-attr-row,
.pf-variation-price-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.pf-variation-stock-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
}

.pf-variation-stock-row .pf-field {
    max-width: 220px;
    flex: 1 1 160px;
}

.pf-variation-active {
    margin: 0 0 10px;
    font-weight: 600;
}

@media (min-width: 720px) {
    .pf-variation-attr-row,
    .pf-variation-price-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-variants-form-card summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pos-maroon);
    list-style: none;
}

.pf-variants-form-card summary::-webkit-details-marker {
    display: none;
}

.pf-variants-form-body {
    margin-top: 12px;
}

.pf-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

@media (min-width: 640px) {
    .pf-field-row {
        grid-template-columns: 140px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
    }
}

.pf-field-label {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0 0 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-muted, #8a6b78);
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background: none !important;
}

.pf-field-label::before,
.pf-field-label::after {
    content: none !important;
    display: none !important;
}

.pf-field {
    text-decoration: none;
}

.pf-data-section.is-open .pf-section-body {
    border-top: none;
}

.pf-empty-attrs a,
.pf-variation-attrs-head a,
.pf-hint a {
    color: var(--pos-maroon, #1e40af);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.pf-empty-attrs a:hover,
.pf-variation-attrs-head a:hover,
.pf-hint a:hover {
    text-decoration-thickness: 2px;
}

.pf-attr-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-attr-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--pos-border, #eadde4);
    background: #faf8f9;
}

@media (min-width: 640px) {
    .pf-attr-row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
    }

    .pf-attr-row > * {
        flex: 1;
        min-width: 0;
    }

    .pf-attr-row .pf-btn-remove {
        flex: 0 0 auto;
        align-self: center;
    }
}

.pf-btn-outline,
.pf-btn-remove {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--pos-border, #eadde4);
    background: #fff;
    color: var(--pos-maroon, #6b1535);
    white-space: nowrap;
}

.pf-btn-remove {
    color: #c0392b;
    border-color: #f5c6cb;
    background: #fde8ee;
}

.pf-btn-add {
    margin: 0;
    padding: 10px 16px;
    border: 1px dashed var(--pos-pink, #e91e8c);
    border-radius: 8px;
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon, #6b1535);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.pf-hidden {
    display: none !important;
}

@media (max-width: 639px) {
    .pf-permalink {
        flex-direction: column;
    }

    .pf-permalink-prefix {
        max-width: none;
        border-right: none;
        border-bottom: 1px solid var(--pos-border, #eadde4);
        white-space: normal;
        word-break: break-all;
    }

    .pf-quill-wrap .ql-toolbar.ql-snow {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ── Product variations tab ─────────────────────────────────────────── */
.pf-variants-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-variants-intro {
    margin: 0;
}

.pf-variants-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px dashed rgba(122, 28, 46, 0.25);
    background: var(--pos-pink-soft, #fce4ef);
}

.pf-variants-empty-state i {
    font-size: 1.75rem;
    color: #9e2a42;
}

.pf-variants-empty-state-inline,
.pf-variants-loading {
    margin: 0;
    padding: 16px;
    text-align: center;
    color: var(--pos-muted, #6b5b63);
    font-size: 0.9rem;
}

.pf-variants-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--pos-border, #eadde4);
}

.pf-variants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.pf-variants-table th,
.pf-variants-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--pos-border, #eadde4);
}

.pf-variants-table th {
    background: var(--pos-pink-soft, #fce4ef);
    color: var(--pos-maroon);
    font-weight: 600;
    font-size: 0.8rem;
}

.pf-variants-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-variant-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pf-variant-badge.is-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.pf-variant-badge.is-danger {
    background: #ffebee;
    color: #c62828;
}

.pf-variant-badge.is-muted {
    background: #f5f5f5;
    color: #757575;
}

.pf-variants-form-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(122, 28, 46, 0.12);
    background: #fff;
    box-shadow: 0 4px 16px rgba(61, 42, 50, 0.05);
}

.pf-variants-form-title {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--pos-maroon);
}

.pf-variants-attr-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.pf-variants-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.pf-variants-active-row {
    align-self: end;
}

.pf-variants-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 639px) {
    .pf-variants-table thead {
        display: none;
    }

    .pf-variants-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--pos-border, #eadde4);
        border-radius: 10px;
        overflow: hidden;
    }

    .pf-variants-table td {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        border-bottom: none;
        padding: 8px 12px;
    }

    .pf-variants-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--pos-maroon);
        flex-shrink: 0;
    }

    .pf-variants-table td:last-child {
        border-bottom: none;
    }
}

/* ── Product variations manager (dynamic rows) ─────────────────────── */
.pf-variations-manager {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-variations-manager-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.pf-variations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-variations-list-foot {
    margin: 4px 0 0;
    text-align: center;
}

.pf-variation-row {
    border: 1px solid var(--pos-border, #eadde4);
    border-radius: 12px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(61, 42, 50, 0.04);
}

.pf-variation-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pos-border, #eadde4);
}

.pf-variation-row-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pos-maroon);
}

.pf-variation-row-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-variation-row-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 560px) {
    .pf-variation-row-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .pf-variation-row-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pf-v-attr-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pf-v-image-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-v-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pf-v-image-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--pos-border, #eadde4);
}

@media (max-width: 559px) {
    .pf-variations-manager-head .pf-variants-toolbar-actions {
        width: 100%;
    }

    .pf-variations-manager-head .pf-variants-toolbar-actions .pos-chip-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }

    .pf-variation-row-head-actions {
        width: 100%;
    }

    .pf-variation-row-head-actions .pos-chip-btn {
        flex: 1;
        justify-content: center;
    }
}

/* product-catalog.css */
/* Product catalog list (Products desk) */

.pc-catalog-page .pc-catalog-panel {
  padding: 0;
  overflow: visible;
}

.pc-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pos-border, #eadde4);
  background: #fff;
}

.pc-catalog-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pc-selection-label {
  font-size: 0.85rem;
  color: var(--pos-muted, #6b5b63);
  font-weight: 600;
}

.pc-btn-danger {
  color: #c0392b !important;
  border-color: #f5c6cb !important;
}

.pc-btn-danger:disabled {
  opacity: 0.45;
}

.pc-search-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pos-maroon, #6b1535);
}

.pc-search-field .bq-form-control {
  min-width: 220px;
}

.pc-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 4px 4px 0;
}

.pc-catalog-table {
  width: 100%;
  min-width: 1080px;
  table-layout: auto;
  border-collapse: collapse;
}

@media (max-width: 1024px) {
  .pc-catalog-table.bq-table-responsive {
    min-width: 0;
  }

  .pc-table-scroll:has(.bq-table-responsive) {
    overflow: visible;
  }
}

.pc-catalog-table thead th,
.pc-catalog-table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  box-sizing: border-box;
}

.pc-catalog-table thead th {
  background: var(--pos-pink-soft, #e8f0fc);
  color: var(--pos-maroon, #1e40af);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.35;
}

.pc-col-check {
  width: 44px;
  text-align: center;
}

.pc-col-image,
.pc-thumb {
  display: none !important;
}

.pc-col-product {
  min-width: 220px;
  text-align: left;
}

.pc-col-type {
  width: 96px;
}

.pc-col-price {
  width: 110px;
  white-space: nowrap;
}

.pc-col-stock {
  width: 72px;
  text-align: right;
}

.pc-catalog-table thead .pc-col-stock {
  text-align: right;
}

.pc-col-toggle {
  width: 104px;
  text-align: center;
}

.pc-col-toggle .pc-switch {
  justify-content: center;
}

.pc-col-status {
  width: 118px;
  white-space: nowrap;
}

.pc-col-status .pc-switch {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.pc-col-created {
  width: 108px;
  white-space: nowrap;
}

.pc-col-actions {
  width: 132px;
  text-align: right;
}

.pc-catalog-table thead .pc-col-actions {
  text-align: right;
}

.pc-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pos-pink-soft, #fce4ef);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pos-maroon, #6b1535);
}

.pc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-product-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.pc-product-cell strong {
  font-size: 0.9rem;
  color: #2a1520;
}

.pc-product-cell small {
  color: var(--pos-muted, #6b5b63);
  font-size: 0.75rem;
}

.pc-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.pc-variant-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pos-pink-soft, #fce4ef);
  color: var(--pos-maroon, #6b1535);
  font-size: 0.7rem;
  font-weight: 600;
}

.pc-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-type-badge--simple {
  background: #eef6ff;
  color: #1e5a8a;
}

.pc-type-badge--variable {
  background: var(--pos-pink-soft, #fce4ef);
  color: var(--pos-maroon, #6b1535);
}

.pc-price-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pc-price-cell s {
  color: var(--pos-muted, #6b5b63);
  font-size: 0.78rem;
}

.pc-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.pc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pc-switch span {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d8cfd4;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}

.pc-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}

.pc-switch input:checked + span {
  background: var(--pos-maroon, #6b1535);
}

.pc-switch.is-on input:checked + span {
  background: #2e7d32;
}

.pc-switch input:checked + span::after {
  transform: translateX(18px);
}

.pc-switch em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2e7d32;
}

.pc-catalog-table tr.is-inactive {
  opacity: 0.55;
}

.pf-page {
  max-width: 1400px;
}

.pf-actions-desktop {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 1024px) {
  .pf-actions-desktop {
    display: flex;
  }
}

@media (max-width: 720px) {
  .pc-search-field {
    width: 100%;
  }

  .pc-search-field .bq-form-control {
    flex: 1;
    min-width: 0;
  }
}

.pc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(42, 18, 32, 0.45);
}

.pc-modal {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--pos-border, #eadde4);
  box-shadow: 0 18px 40px rgba(42, 18, 32, 0.18);
}

.pc-modal h3 {
  margin: 0;
  color: var(--pos-maroon, #6b1535);
  font-size: 1.05rem;
}

.pc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.bq-action-dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
}

.bq-action-dropdown__menu.is-fixed {
  position: fixed;
  right: auto;
  z-index: 400;
}

.bq-dropdown-danger {
  color: #c0392b !important;
}

/* categories.css */
/* Category list + create/edit */

.cat-page .pc-catalog-table {
  min-width: 860px;
}

@media (max-width: 1024px) {
  .cat-page .pc-catalog-table {
    min-width: 0;
  }
}

.cat-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.cat-sort-btn i {
  font-size: 0.7rem;
  opacity: 0.65;
}

.cat-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.cat-status.is-on {
  color: #1b7a4a;
}

.cat-status.is-off {
  color: #c0392b;
}

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

.cat-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--pos-border, #eadde4);
  font-size: 0.82rem;
  color: var(--pos-muted, #6b5b63);
}

.cat-pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cat-pager-pages button,
.cat-pager-pages span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pos-maroon, #6b1535);
  font-weight: 700;
  cursor: pointer;
}

.cat-pager-pages button:disabled {
  opacity: 0.35;
  cursor: default;
}

.cat-pager-pages button.is-current {
  background: var(--pos-maroon, #6b1535);
  color: #fff;
}

.cat-form-page .cat-form {
  width: 100%;
  max-width: none;
}

.cat-details-card {
  padding: 22px 24px 18px;
}

.cat-details-head {
  margin-bottom: 18px;
}

.cat-details-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pos-text, #1f2937);
}

.cat-details-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--pos-muted, #6b7280);
}

.cat-details-card .cat-fields-grid,
.cat-details-card > .pf-field {
  padding: 0;
  margin-bottom: 18px;
}

.cat-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 800px) {
  .cat-fields-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.cat-fields-grid > .pf-field {
  min-width: 0;
  margin: 0;
}

.cat-slug-field {
  width: 100%;
  min-width: 0;
}

.cat-slug-field .pf-permalink-prefix {
  flex: 0 0 auto;
  max-width: none;
}

.cat-slug-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--pos-muted, #6b7280);
  word-break: break-all;
}

.cat-status-field {
  max-width: 280px;
}

.cat-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--pos-border, #eadde4);
}

.brand-logo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--pos-border, #eadde4);
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--pos-muted, #6b7280);
}

.brand-logo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name-cell small {
  color: var(--pos-muted, #6b7280);
  font-size: 0.75rem;
}

.brand-logo-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

@media (max-width: 720px) {
  .cat-details-card {
    padding: 16px;
  }

  .cat-form-actions {
    flex-direction: column-reverse;
  }

  .cat-form-actions .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }
}

/* inventory.css */
/* Stock / Inventory desk */

.inv-page {
  min-width: 0;
  padding-bottom: 8px;
}

.inv-page .bq-page-header {
  margin-bottom: 14px;
}

.inv-page .bq-flash {
  margin: 0 0 12px;
}

.inv-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.inv-stat {
  background: #fff;
  border: 1px solid var(--pos-border, #eadde4);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pos-muted, #6b7280);
}

.inv-stat strong {
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--pos-text, #111827);
}

.inv-stat.is-warn strong {
  color: #b45309;
}

.inv-stat.is-danger strong {
  color: #c0392b;
}

.inv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 14px;
}

.inv-form,
.inv-low {
  margin: 0;
  min-width: 0;
  padding: 16px;
}

.inv-form .pf-field {
  margin: 0 0 12px;
}

.inv-form .pf-field:last-of-type {
  margin-bottom: 0;
}

.inv-card-head {
  margin: 0 0 12px;
}

.inv-card-head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--pos-maroon, #6b1535);
}

.inv-card-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--pos-muted, #6b7280);
}

.inv-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.inv-form-row .pf-field {
  margin: 0;
}

.inv-type-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pos-muted, #6b7280);
}

.inv-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--pos-border, #eadde4);
}

.inv-selected,
.inv-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inv-selected {
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--pos-border, #eadde4);
  border-radius: 10px;
  background: #f8fafc;
}

.inv-selected small,
.inv-product-cell small {
  display: block;
  color: var(--pos-muted, #6b7280);
  font-size: 0.75rem;
}

.inv-thumb {
  display: none !important;
}

.inv-thumb.sm {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.inv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-low-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-low-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--pos-border, #eadde4);
}

.inv-low-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.inv-low-copy {
  min-width: 0;
}

.inv-low-copy strong,
.inv-product-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-low-list .pos-chip-btn {
  grid-column: 1 / -1;
  justify-content: center;
}

.inv-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #eef2ff;
  color: #3730a3;
}

.inv-pill.is-ok {
  background: #ecfdf3;
  color: #166534;
}

.inv-pill.is-low {
  background: #fff7ed;
  color: #c2410c;
}

.inv-pill.is-out,
.inv-type-damaged,
.inv-type-out,
.inv-type-sale {
  background: #fef2f2;
  color: #b91c1c;
}

.inv-type-in {
  background: #ecfdf3;
  color: #166534;
}

.inv-type-adjustment {
  background: #eff6ff;
  color: #1d4ed8;
}

.inv-qty-pos {
  color: #166534;
  font-weight: 700;
}

.inv-qty-neg {
  color: #b91c1c;
  font-weight: 700;
}

.inv-table-card {
  margin: 0 0 14px;
  padding: 0;
}

.inv-table-card .bq-panel-head {
  padding: 12px 16px;
}

.inv-table {
  min-width: 720px;
}

@media (max-width: 1024px) {
  .inv-table.bq-table-responsive {
    min-width: 0;
  }
}

.inv-move-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-move-filters .bq-form-control {
  min-width: 140px;
}

@media (min-width: 640px) {
  .inv-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inv-form-row {
    grid-template-columns: minmax(0, 1fr) 140px;
  }

  .inv-low-list li {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .inv-low-list .pos-chip-btn {
    grid-column: auto;
  }
}

@media (min-width: 980px) {
  .inv-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .inv-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: start;
  }
}

@media (max-width: 719px) {
  .inv-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .inv-table {
    min-width: 0;
  }

  .inv-form,
  .inv-low {
    padding: 14px;
  }

  .inv-form-actions .pos-chip-btn,
  .inv-page .bq-page-header .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }

  .inv-move-filters,
  .inv-move-filters .bq-form-control {
    width: 100%;
  }
}

/* product-upload.css */
.pf-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pf-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--pos-border, #eadde4);
  border-radius: 8px;
  background: #fff;
  color: var(--pos-maroon, #6b1535);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.pf-btn-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pf-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--pos-border, #eadde4);
}

.pf-toggle.pc-switch,
.pf-toggles .pf-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--pos-border, #eadde4);
  border-radius: 10px;
  background: #faf8f9;
  position: relative;
}

.pf-toggle.pc-switch span,
.pf-toggles .pf-toggle span {
  flex-shrink: 0;
  width: 42px;
  height: 24px;
}

.pf-toggle.pc-switch span::after,
.pf-toggles .pf-toggle span::after {
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
}

.pf-toggle.pc-switch input:checked + span::after,
.pf-toggles .pf-toggle input:checked + span::after {
  transform: translateX(18px);
}

.pf-toggle em,
.pf-toggles .pf-toggle em {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-style: normal;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pos-text, #2a1520);
  white-space: normal;
}

.pf-toggle.is-on em,
.pf-toggles .pf-toggle.is-on em {
  color: #2e7d32;
}

.pf-field--full .pf-toggle.pc-switch {
  flex: 1 1 auto;
  width: 100%;
  max-width: 320px;
}

@media (max-width: 560px) {
  .pf-toggles .pf-toggle,
  .pf-toggle.pc-switch {
    flex: 1 1 100%;
    min-width: 0;
  }
}

.pf-sku-scan .pf-btn-outline {
  min-width: 44px;
  min-height: 42px;
  padding: 0 12px;
}

/* pos-receipts.css */
/* ═══ POS Bill Receipt — 7 print layouts ═══ */

.pos-receipt-print-zone {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.pos-receipt {
    box-sizing: border-box;
    color: #1a1a1a;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    background: #fff;
}

.pos-receipt * {
    box-sizing: border-box;
}

.pos-receipt-header {
    text-align: center;
    margin-bottom: 10px;
}

.pos-receipt-brand {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 2px;
    letter-spacing: 0.02em;
}

.pos-receipt-tagline {
    margin: 0;
    font-size: 11px;
    opacity: 0.75;
}

.pos-receipt-meta {
    margin: 10px 0;
    font-size: 11px;
}

.pos-receipt-meta-row,
.pos-receipt-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 4px;
    text-align: left;
}

.pos-receipt-meta-row > span:first-child,
.pos-receipt-total-row > span:first-child {
    flex: 1 1 auto;
    text-align: left;
    color: #475569;
}

.pos-receipt-meta-row > strong,
.pos-receipt-total-row > span:last-child,
.pos-receipt-meta-row > span:last-child {
    flex: 0 0 auto;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.pos-receipt-divider {
    border: none;
    border-top: 1px dashed #bbb;
    margin: 8px 0;
}

.pos-receipt-divider-solid {
    border-top-style: solid;
}

.pos-receipt-items {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 11px;
    table-layout: fixed;
}

.pos-receipt-items th,
.pos-receipt-items td {
    padding: 6px 4px;
    text-align: left;
    vertical-align: top;
}

.pos-receipt-items th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #ccc;
}

.pos-receipt-items td.num,
.pos-receipt-items th.num {
    text-align: right;
    white-space: nowrap;
}

.pos-receipt-item-line {
    display: block;
    line-height: 1.35;
}

.pos-receipt-item-line + .pos-receipt-item-line {
    margin-top: 2px;
}

.pos-receipt-item-name,
.pos-receipt-item-line > strong {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
}

.pos-receipt-item-meta {
    font-size: 9px;
    font-weight: 400;
    color: #475569;
    line-height: 1.3;
}

.pos-receipt-items--detailed col,
.pos-receipt-items--detailed {
    table-layout: fixed;
}

.pos-receipt-items--detailed th:nth-child(1),
.pos-receipt-items--detailed td:nth-child(1) {
    width: 4%;
}

.pos-receipt-items--detailed th:nth-child(2),
.pos-receipt-items--detailed td:nth-child(2) {
    width: 28%;
}

.pos-receipt-col-sku,
.pos-receipt-col-hsn,
.pos-receipt-col-size,
.pos-receipt-items--detailed th:nth-child(3),
.pos-receipt-items--detailed td:nth-child(3),
.pos-receipt-items--detailed th:nth-child(4),
.pos-receipt-items--detailed td:nth-child(4),
.pos-receipt-items--detailed th:nth-child(5),
.pos-receipt-items--detailed td:nth-child(5) {
    font-size: 9px;
    word-break: break-word;
    white-space: normal;
    vertical-align: top;
}

.pos-receipt-items--detailed th:nth-child(3),
.pos-receipt-items--detailed td:nth-child(3) {
    width: 14%;
}

.pos-receipt-items--detailed th:nth-child(4),
.pos-receipt-items--detailed td:nth-child(4) {
    width: 8%;
}

.pos-receipt-items--detailed th:nth-child(5),
.pos-receipt-items--detailed td:nth-child(5) {
    width: 8%;
}

.pos-receipt-items--thermal .pos-receipt-item-meta {
    font-size: 8px;
}

.pos-receipt-totals {
    margin-top: 8px;
    font-size: 11px;
}

.pos-receipt-grand {
    font-size: 14px;
    font-weight: 800;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 2px solid #333;
}

.pos-receipt-footer {
    margin-top: 12px;
    text-align: center;
    font-size: 10px;
    opacity: 0.8;
}

.pos-receipt-gst-block {
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    font-size: 11px;
    background: #f8fafc;
}

.pos-receipt-gst-block .pos-receipt-meta-row {
    margin-bottom: 5px;
}

.pos-receipt-gst-block .pos-receipt-meta-row:last-child {
    margin-bottom: 0;
}

/* Legacy tax table (if any) — same left/right alignment */
.pos-receipt-tax-table {
    width: 100%;
    font-size: 11px;
    border-collapse: collapse;
    margin-top: 6px;
}

.pos-receipt-tax-table th,
.pos-receipt-tax-table td {
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    text-align: left;
}

.pos-receipt-tax-table th:not(:first-child),
.pos-receipt-tax-table td:not(:first-child) {
    text-align: right;
}

.pos-receipt--detailed .pos-receipt-items th {
    display: table-cell;
}

/* Shared A4-compatible canvas for every style except thermal */
.pos-receipt:not([data-receipt-type="thermal-80"]) {
    width: 100%;
    max-width: 190mm;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

/* ─── 1. Classic Boutique ─── */
.pos-receipt[data-receipt-type="classic-boutique"] {
    width: 100%;
    max-width: 190mm;
    padding: 18px 20px;
    border: 2px dashed var(--pos-maroon-light);
}

.pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-header {
    background: linear-gradient(90deg, var(--pos-maroon), var(--pos-maroon-light));
    color: #fff;
    margin: -18px -20px 12px;
    padding: 14px 16px;
    border-radius: 0;
    text-align: center;
}

.pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-tagline {
    color: rgba(255, 255, 255, 0.85);
}

.pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-brand {
    color: #fff;
}

.pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-items th {
    color: var(--pos-maroon);
    background: #fce4ef;
}

.pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-grand {
    color: var(--pos-maroon);
    border-color: var(--pos-pink);
}

/* ─── 2. Thermal 80mm (narrow slip only) ─── */
.pos-receipt[data-receipt-type="thermal-80"] {
    width: 80mm;
    max-width: 80mm;
    padding: 10px 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    margin-left: auto;
    margin-right: auto;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-brand {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-divider {
    border-top-style: dotted;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-items th {
    display: table-cell;
    font-size: 9px;
    padding: 2px 1px;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-items td {
    padding: 2px 1px;
    border-bottom: 1px dotted #ddd;
    font-size: 10px;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-item-line {
    display: block;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-item-name,
.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-item-line > strong {
    font-size: 9px;
    font-weight: 600;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-item-meta {
    font-size: 8px;
}

.pos-receipt[data-receipt-type="thermal-80"] .pos-receipt-grand {
    font-size: 13px;
    border-top: 1px dashed #000;
}

/* ─── 3. GST Detailed ─── */
.pos-receipt[data-receipt-type="gst-detailed"] {
    width: 100%;
    max-width: 190mm;
    padding: 18px 20px;
    border: 1px solid #333;
}

.pos-receipt[data-receipt-type="gst-detailed"] .pos-receipt-brand {
    font-size: 16px;
    text-transform: uppercase;
}

.pos-receipt[data-receipt-type="gst-detailed"] .pos-receipt-gst-block {
    background: #f8fafc;
}

.pos-receipt[data-receipt-type="gst-detailed"] .pos-receipt-items th {
    background: #f1f5f9;
    border-bottom: 2px solid #334155;
}

/* ─── 4. Luxury Gold ─── */
.pos-receipt[data-receipt-type="luxury-gold"] {
    width: 100%;
    max-width: 190mm;
    padding: 22px 24px;
    border: 3px double #c9a227;
    background: linear-gradient(180deg, #fffef9 0%, #faf6eb 100%);
    font-family: Georgia, 'Times New Roman', serif;
}

.pos-receipt[data-receipt-type="luxury-gold"] .pos-receipt-brand {
    font-size: 20px;
    color: #4a1942;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pos-receipt[data-receipt-type="luxury-gold"] .pos-receipt-tagline {
    color: #8b7355;
    font-style: italic;
}

.pos-receipt[data-receipt-type="luxury-gold"] .pos-receipt-divider {
    border-top: 1px solid #c9a227;
}

.pos-receipt[data-receipt-type="luxury-gold"] .pos-receipt-items th {
    color: #4a1942;
    border-bottom: 1px solid #c9a227;
}

.pos-receipt[data-receipt-type="luxury-gold"] .pos-receipt-grand {
    color: #4a1942;
    border-top: 2px double #c9a227;
}

/* ─── 5. Compact Detailed (A4 width, denser type) ─── */
.pos-receipt[data-receipt-type="compact-slip"] {
    width: 100%;
    max-width: 190mm;
    padding: 14px 16px;
    font-size: 11px;
}

.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-brand {
    font-size: 13px;
}

.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-meta,
.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-totals {
    font-size: 10px;
}

.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-items {
    font-size: 10px;
}

.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-items th,
.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-items td {
    display: table-cell;
}

.pos-receipt[data-receipt-type="compact-slip"] .pos-receipt-grand {
    font-size: 12px;
    border-top: 1px solid #000;
}

.pos-receipt-doc-type {
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.pos-receipt-address {
    margin: 6px 0 0;
    font-size: 10px;
    opacity: 0.8;
}

.pos-receipt-contact,
.pos-receipt-hours {
    margin: 4px 0 0;
    font-size: 9px;
    opacity: 0.75;
    line-height: 1.35;
}

.pos-receipt-shop-meta {
    margin-bottom: 6px;
}

/* ─── 6. A4 Formal ─── */
.pos-receipt[data-receipt-type="a4-formal"] {
    width: 100%;
    max-width: 190mm;
    padding: 22px 24px;
    border: 1px solid #cbd5e1;
    font-size: 11px;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-header-formal {
    text-align: left;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-brand {
    font-size: 17px;
    text-transform: uppercase;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-meta {
    display: block;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-items th {
    background: #334155;
    color: #fff;
    border-bottom: none;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-items td {
    border-bottom: 1px solid #e2e8f0;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-item-name,
.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-item-line > strong {
    font-size: 10px;
    font-weight: 600;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-item-meta {
    font-size: 9px;
    color: #64748b;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-col-sku,
.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-col-hsn,
.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-col-size {
    font-size: 9.5px;
    color: #334155;
}

.pos-receipt[data-receipt-type="a4-formal"] .pos-receipt-grand {
    border-top: 2px solid #334155;
    color: #334155;
}

/* ─── 7. Floral Pink ─── */
.pos-receipt[data-receipt-type="floral-pink"] {
    width: 100%;
    max-width: 190mm;
    padding: 18px 20px;
    border: 2px solid var(--pos-pink);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff8fb 0%, #fff 40%);
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-header-floral {
    text-align: center;
    padding-bottom: 8px;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-floral-ornament {
    display: block;
    font-size: 11px;
    color: var(--pos-pink);
    letter-spacing: 0.3em;
    margin-bottom: 4px;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-brand {
    color: var(--pos-maroon);
    font-size: 19px;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-tagline {
    color: #c2185b;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-divider {
    border-top-color: #f8bbd0;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-items th {
    color: var(--pos-maroon);
    background: #fce4ef;
    border-bottom: 1px solid #f48fb1;
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-grand {
    color: #ad1457;
    border-top: 2px solid var(--pos-pink);
}

.pos-receipt[data-receipt-type="floral-pink"] .pos-receipt-footer {
    color: #880e4f;
}

/* Receipt picker on POS */
.pos-receipt-picker {
    margin-bottom: 14px;
}

.pos-receipt-picker-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    align-items: start;
}

.pos-receipt-picker-main {
    min-width: 0;
}

.pos-receipt-picker-head {
    margin-bottom: 10px;
}

.pos-receipt-picker-title {
    margin: 0 0 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.pos-receipt-picker-note {
    margin: 0;
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.pos-receipt-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.pos-receipt-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 2px solid var(--pos-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    appearance: none;
    font: inherit;
    color: inherit;
}

.pos-receipt-card:hover {
    border-color: var(--pos-pink);
    transform: translateY(-1px);
}

.pos-receipt-card.is-active {
    border-color: var(--pos-pink);
    background: var(--pos-pink-soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos-pink) 18%, transparent);
}

.pos-receipt-card-mock {
    display: grid;
    gap: 4px;
    padding: 8px 6px;
    border-radius: 8px;
    background: #fafafa;
    min-height: 52px;
}

.pos-receipt-mock-line {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: #ddd;
}

.pos-receipt-mock-line--title {
    height: 6px;
    width: 70%;
    margin: 0 auto 2px;
}

.pos-receipt-mock-line--short {
    width: 55%;
    margin: 0 auto;
}

.pos-receipt-mock-line--total {
    width: 40%;
    margin: 2px auto 0;
    height: 5px;
}

.mock-classic {
    background: linear-gradient(180deg, var(--pos-maroon) 0%, var(--pos-maroon) 14px, #fff 14px);
}

.mock-classic .pos-receipt-mock-line { background: #e8b4cb; }

.mock-thermal {
    background: #fff;
    border: 1px dashed #999;
    font-family: monospace;
}

.mock-thermal .pos-receipt-mock-line {
    background: #bbb;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.mock-gst {
    background: #fff;
    border: 1px solid #334155;
}

.mock-gst .pos-receipt-mock-line--title { background: #334155; }

.mock-luxury {
    background: linear-gradient(180deg, #faf6eb, #fffef9);
    border: 2px double #c9a227;
}

.mock-luxury .pos-receipt-mock-line { background: #c9a227; opacity: 0.5; }

.mock-compact {
    background: #fff;
}

.mock-compact .pos-receipt-mock-line { height: 3px; }

.mock-a4 {
    background: #fff;
    border: 1px solid #cbd5e1;
}

.mock-a4 .pos-receipt-mock-line--title {
    background: #334155;
    width: 85%;
    margin-left: 0;
}

.mock-floral {
    background: linear-gradient(180deg, #fff8fb, #fff);
    border: 2px solid var(--pos-pink);
    border-radius: 8px;
}

.mock-floral .pos-receipt-mock-line { background: #f48fb1; }

.pos-receipt-card-copy {
    display: grid;
    gap: 2px;
}

.pos-receipt-card-copy strong {
    font-size: 0.72rem;
    color: var(--pos-maroon);
    line-height: 1.2;
}

.pos-receipt-card-copy strong i {
    margin-right: 4px;
    opacity: 0.85;
}

.pos-receipt-card-copy small {
    font-size: 0.64rem;
    color: var(--pos-muted);
    line-height: 1.25;
}

.pos-receipt-preview-head__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pos-receipt-preview-wrap {
    margin-top: 0;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    overflow: hidden;
    background: #faf7f9;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.pos-receipt-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--pos-card);
    border-bottom: 1px solid var(--pos-border);
    font-size: 0.72rem;
    color: var(--pos-muted);
    flex-shrink: 0;
}

.pos-receipt-preview-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff3e0;
    color: #e65100;
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pos-receipt-preview-head strong {
    color: var(--pos-maroon);
    font-size: 0.78rem;
}

.pos-receipt-preview-stage {
    position: relative;
    flex: 1;
    min-height: 320px;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    background: linear-gradient(180deg, #f3edf1 0%, #faf7f9 100%);
}

.pos-receipt-preview-zoom {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding-bottom: 12px;
}

.pos-receipt-preview-inner {
    flex-shrink: 0;
    width: max-content;
    max-width: 100%;
    box-shadow: 0 10px 28px rgba(107, 21, 53, 0.14);
}

.pos-receipt-preview-stage .pos-receipt-preview-inner {
    zoom: 0.78;
}

@supports not (zoom: 1) {
    .pos-receipt-preview-stage .pos-receipt-preview-inner {
        transform: scale(0.78);
        transform-origin: top center;
    }
}

.pos-receipt-preview-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 16px;
    text-align: center;
    font-size: 0.76rem;
    color: var(--pos-muted);
    background: rgba(250, 247, 249, 0.92);
}

.pos-receipt-preview-empty[hidden] {
    display: none !important;
}

.pos-receipt-selected-hint {
    margin: 8px 0 0;
    text-align: center;
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.pos-receipt-selected-hint strong {
    color: var(--pos-maroon);
}

@media (max-width: 1024px) {
    .pos-receipt-picker-layout {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 1200px) {
    .pos-receipt-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Receipt picker buttons (legacy top strip only) */
.pos-receipt-btn:not(.pos-receipt-card):not(.pos-receipt-format-tile) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 2px solid var(--pos-border);
    border-radius: 999px;
    background: var(--pos-card);
    color: var(--pos-text);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pos-receipt-btn:not(.pos-receipt-card):not(.pos-receipt-format-tile):hover {
    border-color: var(--pos-pink);
}

.pos-receipt-btn:not(.pos-receipt-card):not(.pos-receipt-format-tile).is-active {
    border-color: var(--pos-pink);
    background: var(--pos-pink-soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos-pink) 20%, transparent);
}

.gc-receipt-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
}

.gc-theme-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 24px;
    background: var(--pos-card);
    border-bottom: 1px solid var(--pos-border);
}

.gc-theme-strip--compact {
    padding: 10px 16px;
    border-bottom: none;
    gap: 10px;
    margin: 0 16px 8px;
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
}

@media (max-width: 768px) {
    .gc-theme-strip--compact {
        margin: 0 0 8px;
        padding: 10px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

.gc-theme-strip--compact .pos-theme-bar-label {
    margin-right: 0;
}

.gc-theme-dot {
    padding: 6px !important;
    border-radius: 50% !important;
    min-width: 0;
}

.gc-theme-dot span:not(.pos-theme-swatch) {
    display: none;
}

@media print {
    body.pos-printing-receipt * {
        visibility: hidden !important;
    }

    body.pos-printing-receipt .pos-receipt-print-zone,
    body.pos-printing-receipt .pos-receipt-print-zone * {
        visibility: visible !important;
    }

    body.pos-printing-receipt .pos-receipt-print-zone {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        display: flex !important;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    body.pos-printing-receipt .pos-receipt {
        margin: 0 auto;
    }

    .gc-theme-strip,
    .gc-receipt-strip,
    .pos-theme-bar,
    .pos-receipt-picker,
    .pos-receipt-selected-hint {
        display: none !important;
    }
}

/* ═══ Billing document print page (/billing/record/{id}/print) ═══ */
@page {
    margin: 10mm;
}

@page thermal-receipt {
    size: 80mm auto;
    margin: 2mm;
}

@page a4-receipt {
    size: A4 portrait;
    margin: 12mm;
}

.billing-print-page .billing-print-shell {
    align-items: flex-start;
}

.billing-print-page .billing-print-stage {
    overflow: hidden;
}

.billing-print-page .pos-receipt[data-receipt-type="thermal-80"] {
    width: 72mm;
    max-width: 72mm;
}

.billing-print-page .pos-receipt:not([data-receipt-type="thermal-80"]) {
    width: 100%;
    max-width: 190mm;
}

.billing-print-page .pos-receipt[data-receipt-type="a4-formal"] {
    width: 100%;
    max-width: 190mm;
}

@media print {
    .no-print,
    .billing-print-toolbar {
        display: none !important;
    }

    body.billing-print-page {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .billing-print-shell {
        display: block !important;
        padding: 0 !important;
        min-height: auto !important;
    }

    .billing-print-stage {
        box-shadow: none !important;
        background: transparent !important;
        margin: 0 auto !important;
    }

    .billing-print-page .pos-receipt {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .billing-print-page .pos-receipt[data-receipt-type="thermal-80"],
    .billing-print-page .billing-print-stage--thermal-80 .pos-receipt {
        page: thermal-receipt;
        width: 76mm !important;
        max-width: 76mm !important;
        margin: 0 auto !important;
        padding: 4mm 3mm !important;
    }

    .billing-print-page .pos-receipt:not([data-receipt-type="thermal-80"]),
    .billing-print-page .billing-print-stage:not(.billing-print-stage--thermal-80) .pos-receipt:not([data-receipt-type="thermal-80"]) {
        page: a4-receipt;
        width: 100% !important;
        max-width: none !important;
        min-height: auto;
        margin: 0 auto !important;
    }

    .billing-print-page .pos-receipt[data-receipt-type="a4-formal"],
    .billing-print-page .billing-print-stage--a4-formal .pos-receipt {
        page: a4-receipt;
        width: 100% !important;
        max-width: none !important;
        min-height: auto;
        border: none !important;
        padding: 0 !important;
    }

    .billing-print-page .pos-receipt[data-receipt-type="classic-boutique"] .pos-receipt-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .billing-print-page .pos-receipt-items {
        width: 100%;
    }

    .billing-print-page .pos-receipt-items th,
    .billing-print-page .pos-receipt-items td {
        padding: 5px 4px;
    }

    .billing-print-page .pos-receipt-item-name,
    .billing-print-page .pos-receipt-item-line > strong {
        font-size: 9.5px !important;
        font-weight: 600 !important;
    }

    .billing-print-page .pos-receipt-item-meta {
        font-size: 8.5px !important;
    }

    .billing-print-page .pos-receipt-items--detailed .pos-receipt-col-sku,
    .billing-print-page .pos-receipt-items--detailed .pos-receipt-col-hsn,
    .billing-print-page .pos-receipt-items--detailed .pos-receipt-col-size {
        font-size: 8.5px !important;
    }

    .billing-print-page .pos-receipt-meta-row,
    .billing-print-page .pos-receipt-total-row,
    .billing-print-page .pos-receipt-gst-block .pos-receipt-meta-row {
        justify-content: space-between;
        text-align: left;
    }

    .billing-print-page .pos-receipt-items th.num,
    .billing-print-page .pos-receipt-items td.num {
        text-align: right;
    }
}

/* bill-receipt-templates.css */
/* =========================================================
   G3 Bill Receipt Templates (separate from legacy pos-receipts)
   ========================================================= */

.bill-tpl,
.bill-tpl * {
    box-sizing: border-box;
}

.bill-tpl {
    --primary: #9b7b52;
    --dark: #222222;
    --muted: #666666;
    --light: #f5f5f5;
    --border: #dddddd;
    background: #ffffff;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto;
    overflow: hidden;
}

.bill-tpl.a4 {
    width: 210mm;
    min-height: auto;
    padding: 15mm;
}

.bill-tpl.thermal {
    width: 80mm;
    min-height: auto;
    padding: 8mm 5mm;
    color: #000;
    font-size: 11px;
    font-family: "Courier New", Courier, monospace;
    overflow: visible;
}

.bill-tpl.thermal,
.bill-tpl.thermal * {
    font-family: "Courier New", Courier, monospace;
}

.bill-tpl .flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.bill-tpl .text-center { text-align: center; }
.bill-tpl .text-right { text-align: right; }
.bill-tpl .amount { text-align: right; }
.bill-tpl .muted { color: #666; }
.bill-tpl .small { font-size: 12px; }

.bill-tpl table {
    width: 100%;
    border-collapse: collapse;
}

.bill-tpl th,
.bill-tpl td {
    padding: 9px 8px;
    text-align: left;
    vertical-align: top;
}

.bill-tpl .invoice-title {
    margin: 0 0 10px;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Template 1 — Classic GST */
.bill-tpl .classic-header {
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 3px solid #111;
}

.bill-tpl .classic-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.bill-tpl .classic-header p {
    margin: 0;
    line-height: 1.6;
    font-size: 13px;
}

.bill-tpl .classic-customer { margin-bottom: 25px; }

.bill-tpl .classic-customer h4 {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 1px;
}

.bill-tpl .classic-customer p {
    margin: 0;
    line-height: 1.6;
}

.bill-tpl .classic-table thead th {
    background: #222;
    color: #fff;
    font-size: 13px;
}

.bill-tpl .classic-table tbody td {
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

.bill-tpl .classic-total {
    width: 45%;
    margin: 25px 0 0 auto;
}

.bill-tpl .classic-total td {
    padding: 9px;
    border-bottom: 1px solid #ddd;
}

.bill-tpl .classic-total .grand td {
    background: #222;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

.bill-tpl .classic-footer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Template 2 — Modern Boutique */
.bill-tpl.modern { border-top: 10px solid #9b7b52; }

.bill-tpl .modern-brand {
    margin: 0;
    color: #9b7b52;
    font-size: 38px;
    letter-spacing: 5px;
}

.bill-tpl .modern-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #777;
    letter-spacing: 2px;
}

.bill-tpl .modern-title {
    margin: 0 0 10px;
    color: #9b7b52;
    font-size: 28px;
}

.bill-tpl .modern-customer {
    margin: 30px 0;
    padding: 20px;
    background: #f8f4ef;
    border-left: 5px solid #9b7b52;
}

.bill-tpl .modern-customer small {
    color: #888;
    font-size: 10px;
    letter-spacing: 1px;
}

.bill-tpl .modern-customer p {
    margin-bottom: 0;
    line-height: 1.6;
}

.bill-tpl .modern-table th {
    padding: 11px;
    color: white;
    background: #9b7b52;
    font-size: 13px;
}

.bill-tpl .modern-table td {
    padding: 13px 11px;
    border-bottom: 1px solid #eadfd2;
    font-size: 13px;
}

.bill-tpl .modern-summary {
    width: 42%;
    margin: 25px 0 0 auto;
}

.bill-tpl .modern-summary td { padding: 8px 10px; }

.bill-tpl .modern-grand {
    margin-top: 12px;
    padding: 15px;
    background: #9b7b52;
    color: white;
    text-align: right;
    font-size: 20px;
    font-weight: bold;
}

.bill-tpl .modern-footer {
    margin-top: 100px;
    text-align: center;
}

/* Template 3 — Thermal */
.bill-tpl.thermal h2 {
    margin: 0 0 5px;
    font-size: 18px;
    text-transform: uppercase;
}

.bill-tpl.thermal p { margin: 3px 0; }

.bill-tpl.thermal .thermal-doc-title {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.bill-tpl.thermal .thermal-tagline {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bill-tpl.thermal hr,
.bill-tpl.thermal .thermal-rule {
    margin: 8px 0;
    border: 0;
    border-top: 1px dashed #000;
    height: 0;
    page-break-after: avoid;
    break-after: avoid;
}

.bill-tpl .thermal-meta {
    font-size: 10px;
}

.bill-tpl .thermal-meta td {
    padding: 1px 0;
}

.bill-tpl .thermal-table { font-size: 10px; }

.bill-tpl .thermal-table th,
.bill-tpl .thermal-table td { padding: 4px 2px; }

.bill-tpl .thermal-table th { border-bottom: 1px dashed #000; }

.bill-tpl .thermal-item-meta {
    display: block;
    font-size: 9px;
    opacity: 0.85;
}

.bill-tpl .thermal-count {
    margin: 4px 0 0;
    font-size: 10px;
}

.bill-tpl .thermal-total td {
    padding: 3px 0;
    font-size: 11px;
}

.bill-tpl .thermal-grand td {
    padding: 6px 0;
    font-size: 14px;
    font-weight: bold;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
}

.bill-tpl .thermal-words {
    margin: 8px 0 4px;
    font-size: 10px;
    line-height: 1.35;
}

.bill-tpl .thermal-notes {
    font-size: 10px;
}

.bill-tpl .thermal-barcode {
    margin: 10px 0 4px;
    text-align: center;
}

.bill-tpl .thermal-barcode svg {
    display: block;
    width: 100%;
    height: 36px;
}

.bill-tpl .thermal-barcode p {
    margin: 4px 0 0;
    font-size: 10px;
    letter-spacing: 1px;
}

.bill-tpl .thermal-terms {
    font-size: 9px;
    line-height: 1.35;
}

/* Template 4 — Detailed GST */
.bill-tpl .gst-box { border: 2px solid #333; }

.bill-tpl .gst-header {
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #333;
}

.bill-tpl .gst-header h1 {
    margin: 8px 0;
    font-size: 27px;
}

.bill-tpl .gst-header p {
    margin: 0;
    line-height: 1.5;
    font-size: 12px;
}

.bill-tpl .gst-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.bill-tpl .gst-info > div {
    min-height: 120px;
    padding: 15px;
    line-height: 1.7;
    font-size: 12px;
    border-bottom: 1px solid #333;
}

.bill-tpl .gst-info > div:first-child { border-right: 1px solid #333; }

.bill-tpl .gst-table th,
.bill-tpl .gst-table td {
    padding: 8px 5px;
    border: 1px solid #333;
    font-size: 11px;
}

.bill-tpl .gst-table th {
    background: #eee;
    text-align: center;
}

.bill-tpl .gst-summary {
    display: flex;
    justify-content: flex-end;
    padding: 15px;
}

.bill-tpl .gst-summary table { width: 45%; }

.bill-tpl .gst-summary td {
    padding: 5px;
    font-size: 12px;
}

.bill-tpl .gst-grand td {
    padding-top: 10px;
    border-top: 2px solid #333;
    font-size: 16px;
    font-weight: bold;
}

.bill-tpl .amount-words {
    padding: 15px;
    border-top: 1px solid #333;
    font-size: 12px;
}

.bill-tpl .gst-footer {
    display: flex;
    justify-content: space-between;
    min-height: 130px;
    padding: 15px;
    border-top: 1px solid #333;
    font-size: 11px;
}

.bill-tpl .signature {
    align-self: flex-end;
    text-align: center;
}

/* Template 5 — Minimal */
.bill-tpl.minimal { padding: 20mm; }

.bill-tpl .minimal-header { margin-bottom: 45px; }

.bill-tpl .minimal-logo {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
}

.bill-tpl .minimal-number {
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.bill-tpl .minimal-customer { margin-bottom: 40px; }

.bill-tpl .minimal-customer p { margin: 7px 0 0; }

.bill-tpl .minimal-table th {
    padding: 12px 8px;
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #222;
}

.bill-tpl .minimal-table td {
    padding: 16px 8px;
    border-bottom: 1px solid #eee;
}

.bill-tpl .minimal-summary {
    width: 40%;
    margin: 30px 0 0 auto;
}

.bill-tpl .minimal-summary td { padding: 7px; }

.bill-tpl .minimal-total td {
    padding-top: 15px;
    font-size: 23px;
    font-weight: bold;
    border-top: 2px solid #222;
}

.bill-tpl .minimal-footer {
    margin-top: 150px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Template 6 — Tailoring */
.bill-tpl.tailor { padding: 15mm; }

.bill-tpl .tailor-header {
    margin: -15mm -15mm 30px;
    padding: 25px 15mm;
    background: #463f3a;
    color: white;
}

.bill-tpl .tailor-header h1 { margin: 10px 0 5px; }

.bill-tpl .tailor-header p {
    margin: 0;
    font-size: 12px;
}

.bill-tpl .order-badge {
    display: inline-block;
    padding: 6px 12px;
    color: #222;
    background: #e0afa0;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.bill-tpl .tailor-customer {
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.bill-tpl .tailor-section-title {
    margin: 25px 0 12px;
    font-size: 15px;
}

.bill-tpl .order-details td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.bill-tpl .measurement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.bill-tpl .measurement {
    padding: 13px;
    background: #f4f3ee;
}

.bill-tpl .measurement span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 10px;
}

.bill-tpl .measurement strong { font-size: 16px; }

.bill-tpl .instruction-box {
    padding: 15px;
    background: #f8f8f8;
    border-left: 4px solid #463f3a;
    line-height: 1.6;
}

.bill-tpl .delivery-box {
    margin-top: 25px;
    padding: 16px;
    background: #e0afa0;
    font-weight: bold;
}

.bill-tpl .tailor-summary {
    width: 45%;
    margin: 25px 0 0 auto;
}

.bill-tpl .tailor-summary td { padding: 7px; }

.bill-tpl .tailor-balance td {
    padding-top: 12px;
    border-top: 2px solid #463f3a;
    font-size: 17px;
    font-weight: bold;
}

.bill-tpl .tailor-footer {
    margin-top: 70px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Screen preview shell */
.bill-tpl-preview-host {
    background: #e9ecef;
    padding: 16px;
    overflow: auto;
}

.bill-tpl-preview-host .bill-tpl {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.bill-tpl-preview-host .bill-tpl.a4 {
    width: 100%;
    max-width: 210mm;
    min-height: auto;
    padding: 20px;
    transform-origin: top center;
}

.bill-tpl-preview-host .bill-tpl.thermal {
    width: 80mm;
    max-width: 100%;
}

@media screen and (max-width: 850px) {
    .bill-tpl.a4 {
        width: 100%;
        min-height: auto;
        padding: 20px;
    }

    .bill-tpl .flex { flex-direction: column; }
    .bill-tpl .text-right { text-align: left; }

    .bill-tpl .classic-total,
    .bill-tpl .modern-summary,
    .bill-tpl .minimal-summary,
    .bill-tpl .tailor-summary,
    .bill-tpl .gst-summary table {
        width: 100%;
    }

    .bill-tpl .measurement-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bill-tpl .gst-info {
        grid-template-columns: 1fr;
    }

    .bill-tpl .gst-info > div:first-child {
        border-right: 0;
    }
}

@media print {
    html, body {
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .bill-tpl {
        box-shadow: none !important;
        margin: 0 auto !important;
        overflow: visible !important;
        background: #fff !important;
        color: #000 !important;
        transform: none !important;
        filter: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .bill-tpl,
    .bill-tpl * {
        color: #000 !important;
        text-shadow: none !important;
        box-shadow: none !important;
        filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
        page-break-inside: auto;
        break-inside: auto;
    }

    .bill-tpl.a4 {
        width: 100% !important;
        max-width: 194mm !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
    }

    .bill-tpl.thermal,
    .bill-tpl.thermal * {
        page-break-after: auto !important;
        break-after: auto !important;
        page-break-before: auto !important;
        break-before: auto !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    .bill-tpl.thermal {
        width: 74mm !important;
        max-width: 74mm !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 2mm !important;
    }

    /* Flex layouts often rasterize blank on some inkjet drivers. */
    .bill-tpl .flex {
        display: block !important;
    }

    .bill-tpl .flex > div {
        width: 100% !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }

    .bill-tpl .text-right {
        text-align: left !important;
    }

    .bill-tpl th,
    .bill-tpl td {
        background: transparent !important;
        color: #000 !important;
        border-color: #000 !important;
    }

    .bill-tpl .classic-table thead th,
    .bill-tpl .classic-total .grand td,
    .bill-tpl [style*="background"] {
        background: transparent !important;
        color: #000 !important;
        border-top: 1px solid #000 !important;
        border-bottom: 1.5px solid #000 !important;
        font-weight: 700 !important;
    }

    .bill-tpl .classic-table tbody td {
        border-bottom: 1px solid #333 !important;
    }

    .bill-tpl .classic-total {
        width: 100% !important;
        max-width: 90mm !important;
        margin-left: 0 !important;
    }

    .bill-tpl .classic-footer,
    .bill-tpl .modern-footer,
    .bill-tpl .minimal-footer {
        margin-top: 24px !important;
    }

    .bill-tpl .muted,
    .bill-tpl .small {
        color: #000 !important;
    }

    .no-print { display: none !important; }
}

.receipt-print-overlay {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3vh 16px;
    background: rgba(8, 40, 24, 0.55);
    overflow: auto;
}

.receipt-print-dialog {
    max-width: min(920px, 96vw);
    width: 100%;
    margin: 0 auto;
    padding: 18px 20px 20px;
    max-height: 94vh;
    overflow: auto;
}

.receipt-print-dialog .bq-panel-head {
    margin-bottom: 12px;
}

.receipt-tpl-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.receipt-tpl-picker--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.receipt-tpl-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    justify-items: start;
    align-content: start;
    text-align: left;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--pos-border, #ddd);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.receipt-tpl-picker--two .receipt-tpl-option {
    min-height: 118px;
    padding: 16px 18px;
    gap: 6px;
}

.receipt-tpl-option i {
    color: var(--pos-maroon, #166534);
}

.receipt-tpl-picker--two .receipt-tpl-option i {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.receipt-tpl-option strong {
    display: block;
    width: 100%;
    font-size: 0.78rem;
}

.receipt-tpl-picker--two .receipt-tpl-option strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.receipt-tpl-option span {
    display: block;
    width: 100%;
    font-size: 0.68rem;
    color: var(--pos-muted, #666);
    white-space: normal;
    line-height: 1.4;
}

.receipt-tpl-picker--two .receipt-tpl-option span {
    font-size: 0.78rem;
}

.receipt-tpl-option.is-active {
    border-color: var(--pos-maroon, #166534);
    background: var(--pos-pink-soft, #ecfdf5);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--pos-maroon, #166534) 18%, transparent);
}

.receipt-print-preview {
    max-height: 52vh;
    overflow: auto;
    margin-bottom: 12px;
    border-radius: 12px;
}

.receipt-print-preview.is-thermal .bill-tpl.thermal {
    margin: 0 auto;
}

@media (max-width: 800px) {
    .receipt-tpl-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receipt-tpl-picker--two {
        grid-template-columns: 1fr;
    }
}

/* bilvo-theme.css */
/**
 * Bilvo portal themes
 * - Product Desk  → bilvo-product (blue catalog)
 * - Billing Desk  → bilvo-billing (forest green POS)
 * Applied via body[data-pos-theme] (AppShell syncs with portal).
 */

:root,
body[data-pos-theme='bilvo-blue'],
body[data-pos-theme='bilvo-product'] {
  --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-accent-2: #3b82f6;
  --pos-shadow: 0 8px 28px rgba(30, 64, 175, 0.12);
  --pos-topbar-bg: linear-gradient(90deg, #1e40af 0%, #2563eb 100%);
  --pos-sidebar-bg: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);
  --pos-logo-bg: linear-gradient(145deg, #7eb4f7, #1e40af);
  --pos-radius: 12px;
  --pos-overlay: rgba(15, 40, 90, 0.45);
  --pos-focus-ring: rgba(37, 99, 235, 0.18);
  --pos-chip-grad: linear-gradient(145deg, #1e40af 0%, #172554 100%);
  --pos-soft-grad: linear-gradient(145deg, #e8f0fc 0%, #d4e4f8 100%);
  --pos-panel-head-bg: linear-gradient(180deg, #fff 0%, #e8f0fc 100%);
  --pos-thumb-grad-1: linear-gradient(145deg, #dbeafe, #93c5fd);
  --pos-thumb-grad-2: linear-gradient(145deg, #bfdbfe, #60a5fa);
  --pos-thumb-grad-3: linear-gradient(145deg, #e0f2fe, #7dd3fc);
  --pos-icon-grad: linear-gradient(145deg, #bfdbfe, #60a5fa);

  --gc-maroon: #1e40af;
  --gc-maroon-dark: #172554;
  --gc-maroon-light: #2563eb;
  --gc-pink: #1e40af;
  --gc-pink-soft: #e8f0fc;
  --gc-bg: #e8f2fc;
}

/* Billing Desk — forest green (MarketHub-style POS energy) */
body[data-pos-theme='bilvo-billing'] {
  --pos-maroon: #166534;
  --pos-maroon-dark: #0f3d2e;
  --pos-maroon-light: #15803d;
  --pos-pink: #16a34a;
  --pos-pink-soft: #ecfdf5;
  --pos-pink-mid: #86efac;
  --pos-bg: #f0fdf6;
  --pos-card: #ffffff;
  --pos-border: #bbf7d0;
  --pos-text: #052e16;
  --pos-muted: #3f6b52;
  --pos-green: #059669;
  --pos-green-dark: #047857;
  --pos-accent-2: #22c55e;
  --pos-shadow: 0 8px 28px rgba(22, 101, 52, 0.12);
  --pos-topbar-bg: linear-gradient(90deg, #14532d 0%, #166534 55%, #15803d 100%);
  --pos-sidebar-bg: linear-gradient(180deg, #0f3d2e 0%, #14532d 55%, #166534 100%);
  --pos-logo-bg: linear-gradient(145deg, #4ade80, #166534);
  --pos-radius: 12px;
  --pos-overlay: rgba(8, 40, 24, 0.45);
  --pos-focus-ring: rgba(22, 163, 74, 0.2);
  --pos-chip-grad: linear-gradient(145deg, #166534 0%, #0f3d2e 100%);
  --pos-soft-grad: linear-gradient(145deg, #ecfdf5 0%, #dcfce7 100%);
  --pos-panel-head-bg: linear-gradient(180deg, #fff 0%, #ecfdf5 100%);
  --pos-thumb-grad-1: linear-gradient(145deg, #dcfce7, #86efac);
  --pos-thumb-grad-2: linear-gradient(145deg, #bbf7d0, #4ade80);
  --pos-thumb-grad-3: linear-gradient(145deg, #ecfdf5, #6ee7b7);
  --pos-icon-grad: linear-gradient(145deg, #bbf7d0, #4ade80);

  --gc-maroon: #166534;
  --gc-maroon-dark: #0f3d2e;
  --gc-maroon-light: #15803d;
  --gc-pink: #16a34a;
  --gc-pink-soft: #ecfdf5;
  --gc-bg: #f0fdf6;
}

html {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body,
.pos-body,
.gc-login {
  font-family: inherit;
  background: var(--pos-bg);
  color: var(--pos-text);
}

/* Sidebar & topbar use theme gradients */
.pos-sidebar {
  background: var(--pos-sidebar-bg) !important;
}

.pos-topbar,
.bq-topbar,
.bq-page-header.bq-topbar {
  background: var(--pos-topbar-bg) !important;
}

.pos-sidebar-brand--logo img,
.pos-topbar-logo {
  border-radius: 10px;
}

.pos-sidebar-brand--billing::before,
.pos-sidebar-brand--product::before {
  background: var(--pos-logo-bg) !important;
}

.bq-portal-product .pos-sidebar-brand--product .pos-sidebar-logo,
.pos-sidebar-brand--product .pos-sidebar-logo {
  background: var(--pos-logo-bg);
}

.bq-portal-billing .pos-sidebar-brand--billing .pos-sidebar-logo,
.pos-sidebar-brand--billing .pos-sidebar-logo {
  background: var(--pos-logo-bg);
}

.bq-portal-product .pos-sidebar,
.bq-portal-billing .pos-sidebar {
  background: var(--pos-sidebar-bg) !important;
}

/* Overlays */
.pos-overlay {
  background: var(--pos-overlay) !important;
}

.pos-scan-now-btn,
.pos-scan-now-btn:hover {
  background: var(--pos-chip-grad) !important;
  border-color: color-mix(in srgb, var(--pos-maroon) 25%, transparent) !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pos-maroon) 22%, transparent) !important;
}

.pos-grand-total,
.si-app .si-grand {
  background: var(--pos-chip-grad) !important;
}

.pos-category-chip.is-active,
.si-app .si-category-chip.is-active {
  background: var(--pos-chip-grad) !important;
  border-color: transparent !important;
}

.pos-chip-accent,
.pos-btn-save-print,
.pos-btn-pay {
  background: var(--pos-chip-grad) !important;
  border-color: var(--pos-maroon) !important;
}

.pos-modules-strip__link.is-active {
  background: var(--pos-soft-grad) !important;
  border-color: var(--pos-pink-mid) !important;
  color: var(--pos-maroon) !important;
}

.pos-pay-tab.is-active,
.si-app .si-pay-tab.is-active {
  background: var(--pos-maroon) !important;
  border-color: var(--pos-maroon) !important;
}

.bq-badge-paid {
  background: #ecfdf5 !important;
  color: #047857 !important;
}

.bq-badge-warning {
  background: #fff7ed !important;
  color: #c2410c !important;
}

.bq-badge-info {
  background: var(--pos-pink-soft) !important;
  color: var(--pos-maroon) !important;
}

/* Login */
.gc-login .gc-card-head,
.gc-login .gc-btn-primary {
  background: var(--pos-chip-grad) !important;
}

.gc-login .gc-link,
.gc-login a {
  color: var(--pos-maroon) !important;
}

/* Section headers */
.si-section-head,
.bq-panel-head {
  background: var(--pos-panel-head-bg) !important;
}

/* Focus rings */
.pos-input:focus,
.bq-form-control:focus,
.pos-search-field__input:focus,
.pos-search-bar:focus-within,
.pos-mini-input:focus,
.gc-input:focus {
  border-color: var(--pos-maroon-light) !important;
  box-shadow: 0 0 0 3px var(--pos-focus-ring) !important;
}

input:not([type='checkbox']):not([type='radio']):not([type='button']):not([type='submit']):not([type='reset']):not([disabled]):not([readonly]),
textarea:not([disabled]):not([readonly]),
select:not([disabled]) {
  pointer-events: auto !important;
  -webkit-user-select: auto;
  user-select: auto;
  cursor: auto;
}

select:not([disabled]):not(.pos-mini-select) {
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}

.pos-search-bar {
  box-shadow: 0 1px 3px color-mix(in srgb, var(--pos-maroon) 8%, transparent) !important;
}

.pos-search-bar:focus-within {
  box-shadow: 0 0 0 4px var(--pos-focus-ring) !important;
}

.pos-search-field__input {
  padding-left: 4px;
}

.pos-category-thumb,
.pos-product-card-thumb {
  color: var(--pos-maroon);
  font-weight: 700;
}

.pos-product-card em {
  color: var(--pos-maroon);
}

/* Workspace switcher — portal-aware active chip */
.bq-workspace-btn.is-active {
  background: var(--pos-maroon) !important;
  border-color: var(--pos-maroon) !important;
  color: #fff !important;
}

.bq-workspace-current {
  color: var(--pos-maroon);
}

body[data-pos-theme='bilvo-billing'] .bq-workspace-bar {
  border-bottom-color: var(--pos-border);
}

body[data-pos-theme='bilvo-billing'] .pos-nav-link.is-active,
body[data-pos-theme='bilvo-product'] .pos-nav-link.is-active {
  background: rgba(255, 255, 255, 0.16);
}

/* Accent KPI cards — solid theme + white text (fixes unreadable dark-on-dark) */
.bq-stat-card.is-accent,
.bp-desk-stat--accent,
.bq-reports-app .bq-stat-card.is-accent,
.bq-product-reports-app .bq-stat-card.is-accent,
body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent {
  background: var(--pos-chip-grad) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.bq-stat-card.is-accent .bq-stat-label,
.bq-stat-card.is-accent .bq-stat-value,
.bq-stat-card.is-accent .bq-stat-note,
.bq-reports-app .bq-stat-card.is-accent .bq-stat-label,
.bq-reports-app .bq-stat-card.is-accent .bq-stat-value,
.bq-reports-app .bq-stat-card.is-accent .bq-stat-note,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-label,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-value,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-note,
body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-label,
body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-value,
body[data-pos-theme] .bq-product-reports-app .bq-stat-card.is-accent .bq-stat-note {
  color: #fff !important;
}

.bq-stat-card.is-accent .bq-stat-label,
.bq-reports-app .bq-stat-card.is-accent .bq-stat-label,
.bq-product-reports-app .bq-stat-card.is-accent .bq-stat-label {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Module / product icon tiles follow portal */
.bq-module-icon,
.bq-product-thumb,
.bq-thumb-placeholder,
.pos-sidebar-card {
  background: var(--pos-icon-grad) !important;
  color: var(--pos-maroon-dark) !important;
}

.bq-module-card:hover {
  box-shadow: 0 12px 32px color-mix(in srgb, var(--pos-maroon) 14%, transparent) !important;
}

/* POS category active glow */
.pos-category-card.is-active {
  border-color: var(--pos-maroon) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pos-maroon) 22%, transparent) !important;
}

/* Sidebar submenu active — theme color, not boutique pink */
.pos-nav-sublink.is-active {
  background: #fff !important;
  color: var(--pos-maroon-dark) !important;
}

.pos-nav-sublink.is-active .pos-nav-sublink-icon {
  background: var(--pos-soft-grad) !important;
  color: var(--pos-maroon) !important;
}

/* Reports section chrome — drop pink leftovers */
.bq-reports-section-head {
  border-color: color-mix(in srgb, var(--pos-maroon) 12%, transparent) !important;
  border-left-color: var(--pos-maroon) !important;
  background: var(--pos-card) !important;
}

.bq-reports-section-head h2 {
  color: var(--pos-maroon) !important;
}

.bq-reports-section-head h2 i {
  background: var(--pos-soft-grad) !important;
  color: var(--pos-maroon) !important;
}

.bq-reports-app .bq-stat-icon,
.bq-reports-kpi.is-highlight {
  background: var(--pos-soft-grad) !important;
  border-color: color-mix(in srgb, var(--pos-maroon) 18%, transparent) !important;
}

.bq-reports-kpi.is-highlight strong,
.bq-reports-footnote a,
.bq-reports-pill i {
  color: var(--pos-maroon) !important;
}

.bq-report-table-toolbar {
  background: var(--pos-panel-head-bg) !important;
}

.bq-flash-info {
  background: var(--pos-pink-soft) !important;
  color: var(--pos-maroon) !important;
}

.bq-reports-app .bq-panel-head {
    padding: 10px 14px !important;
}

.bq-reports-app .bq-panel-head h2,
.bq-reports-app .bq-panel-head h3 {
    color: var(--pos-text) !important;
    margin: 0;
}

.bq-reports-app .bq-table th {
    padding: 8px 10px;
    color: var(--pos-muted);
}

.bq-reports-app .bq-table td {
    padding: 8px 10px;
    color: var(--pos-text);
}

.bq-reports-app .bq-stat-card:not(.is-accent) .bq-stat-value {
    color: var(--pos-maroon);
}

.gc-login .gc-btn-primary,
.gc-login button[type='submit'] {
  background: var(--pos-chip-grad) !important;
  border-color: transparent !important;
}

body[data-pos-theme='bilvo-billing'] .gc-login__subtitle,
body[data-pos-theme='bilvo-product'] .gc-login__subtitle {
  color: var(--pos-muted);
}

/* Primary Add/Save and Delete — always readable on both desks */
.pos-chip-btn.pos-chip-accent,
a.pos-chip-btn.pos-chip-accent,
.pos-chip-accent,
.pos-input-btn:not(.pos-input-btn-outline):not(.pos-input-btn--camera),
.pos-btn-save,
.pos-btn-pay,
.pos-btn-save-print {
  background: var(--pos-maroon-dark) !important;
  background-image: linear-gradient(145deg, var(--pos-maroon) 0%, var(--pos-maroon-dark) 100%) !important;
  border-color: var(--pos-maroon-dark) !important;
  color: #fff !important;
}

.pos-chip-btn.pos-chip-accent:hover,
a.pos-chip-btn.pos-chip-accent:hover,
.pos-input-btn:not(.pos-input-btn-outline):not(.pos-input-btn--camera):hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.pos-chip-btn.bq-btn-danger,
.pc-btn-danger,
.pos-chip-btn.pc-btn-danger {
  background: #b42318 !important;
  border-color: #912018 !important;
  color: #fff !important;
}

.pos-chip-btn.bq-btn-danger:hover,
.pc-btn-danger:hover,
.pos-chip-btn.pc-btn-danger:hover {
  background: #912018 !important;
  color: #fff !important;
}

/* bilvo-pos-overrides.css */
/* Bilvo MERN — POS layout overrides (Gayathri parity) */

/* Fullscreen POS: no sidebar offset, use full width */
.pos-body--fullscreen .pos-sidebar {
  display: none !important;
}

.pos-body--fullscreen .pos-main {
  margin-left: 0 !important;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.pos-body--fullscreen .pos-footer {
  display: none !important;
}

/* POS app inside main content area */
.pos-main > .pos-app--fullscreen,
.pos-body--fullscreen .pos-app--fullscreen,
.pos-app--fullscreen {
  flex: 1;
  max-width: none;
  width: 100%;
  padding: 16px 24px 24px !important;
  box-sizing: border-box;
}

.pos-app--fullscreen .pos-topbar {
  margin: 0 0 12px !important;
  padding: 12px 16px !important;
  gap: 12px 16px;
  border-radius: 14px;
  box-sizing: border-box;
}

.pos-app--fullscreen .pos-topbar-brand {
  padding-right: 0;
}

.pos-app--fullscreen .pos-topbar-meta {
  gap: 10px 14px;
  padding: 0;
  background: transparent !important;
}

.pos-app--fullscreen .pos-bill-badge {
  padding: 8px 12px;
}

.pos-app--fullscreen .pos-topbar-actions {
  gap: 8px;
}

.pos-app--fullscreen .pos-modules-strip {
  margin: 0 0 14px !important;
  padding: 0 !important;
  gap: 8px;
}

.pos-app--fullscreen .pos-search-row {
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.pos-app--fullscreen .pos-panel {
  padding: 16px 18px;
  margin: 0;
}

.pos-app--fullscreen .pos-scan-panel .pos-panel-title,
.pos-app--fullscreen .pos-search-panel .pos-panel-title {
  margin-bottom: 12px;
}

.pos-app--fullscreen .pos-categories-row {
  margin-bottom: 12px;
}

.pos-app--fullscreen .pos-product-picker {
  margin: 4px 0 16px;
  max-height: none;
  overflow: visible;
  padding: 10px 6px 10px 2px;
  scrollbar-width: thin;
}

.pos-app--fullscreen .pos-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  padding: 2px 0 4px;
}

.pos-app--fullscreen .pos-category-card {
  min-width: 88px;
}

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

.pos-app--fullscreen .pos-cart-table {
  min-width: 0;
}

.pos-app--fullscreen .pos-recent-table {
  min-width: 520px;
}

.pos-app--fullscreen .pos-workspace {
  gap: 14px;
  margin-bottom: 14px;
}

.pos-app--fullscreen .pos-bottom-grid {
  gap: 14px;
  align-items: stretch;
}

.pos-app--fullscreen .pos-bottom-grid > .pos-panel {
  min-height: 0;
}

/* Search inputs — match Gayathri bar height */
.pos-app--fullscreen .pos-search-panel .pos-search-bar {
  width: 100%;
}

.pos-app--fullscreen .pos-cart-head {
  margin-bottom: 12px;
}

.pos-app--fullscreen .pos-cart-panel .pos-panel-title {
  margin: 0;
}

.pos-app--fullscreen .pos-checkout-head {
  margin: 0 0 12px;
}

.pos-app--fullscreen .pos-checkout-sub {
  margin: 4px 0 0;
}

.pos-app--fullscreen .pos-customer-fields {
  gap: 12px;
}

.pos-app--fullscreen .pos-form-grid {
  gap: 12px;
}

.pos-app--fullscreen .pos-scan-field {
  gap: 10px;
}

/* Customer form spacing */
.pos-app--fullscreen .pos-customer-fields .pos-input {
  min-height: 42px;
  padding: 10px 12px;
}

.pos-app--fullscreen .pos-field > span {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Summary panel */
.pos-app--fullscreen .pos-summary-panel {
  position: sticky;
  top: 8px;
}

.pos-app--fullscreen .pos-grand-total {
  margin: 14px 0;
  padding: 16px 14px;
}

.pos-app--fullscreen .pos-coupon-row {
  margin-top: 12px;
}

.pos-app--fullscreen .pos-coupon-row .pos-input {
  flex: 1;
  min-width: 0;
}

/* Payment panel */
.pos-app--fullscreen .pos-payment-panel {
  padding: 16px 18px 18px;
}

.pos-app--fullscreen .pos-payment-panel .pos-checkout-stack {
  gap: 12px;
}

.pos-app--fullscreen .pos-pay-tabs {
  margin: 0;
}

.pos-app--fullscreen .pos-cash-block,
.pos-app--fullscreen .pos-split-pay {
  margin: 0;
  padding: 12px 14px;
}

.pos-app--fullscreen .pos-change-row {
  margin: 0;
}

.pos-app--fullscreen .pos-pay-actions {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-top: 12px;
}

.pos-app--fullscreen .pos-pay-actions .pos-btn {
  width: 100%;
  justify-content: center;
}

/* Recent bills table */
.pos-app--fullscreen .pos-recent-panel .bq-table,
.pos-app--fullscreen .pos-recent-table {
  font-size: 0.8rem;
}

.pos-app--fullscreen .pos-recent-panel .bq-table th,
.pos-app--fullscreen .pos-recent-panel .bq-table td {
  padding: 8px 10px;
}

/* Flash messages */
.pos-app--fullscreen .bq-flash {
  margin: 0 0 14px !important;
  padding: 10px 16px !important;
  border-radius: 10px;
}

/* Quick-add modal */
.pos-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30, 8, 18, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}

.pos-modal-backdrop .pos-modal {
  width: min(420px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.pos-modal-backdrop .pos-modal h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--pos-maroon);
}

.pos-modal-backdrop .pos-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

/* Receipt print hidden on screen */
.pos-receipt-print {
  display: none;
}

@media print {
  .pos-sidebar,
  .bq-workspace-bar,
  .pos-footer,
  .pos-topbar,
  .pos-modules-strip,
  .pos-search-row,
  .pos-categories-row,
  .pos-product-picker,
  .pos-workspace,
  .pos-bottom-grid {
    display: none !important;
  }

  .pos-receipt-print {
    display: block !important;
  }
}

.pos-mini-select,
.pos-mini-select:not([disabled]) {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

@media (max-width: 1400px) {
  .pos-app--fullscreen .pos-bottom-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      'customer'
      'payment'
      'recent';
  }

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

  .pos-app--fullscreen .pos-summary-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .pos-main > .pos-app--fullscreen,
  .pos-body--fullscreen .pos-app--fullscreen,
  .pos-app--fullscreen {
    padding: 12px 16px 16px !important;
  }

  .pos-app--fullscreen .pos-topbar {
    padding: 12px 14px !important;
    margin: 0 0 12px !important;
  }

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

  .pos-app--fullscreen .pos-product-picker {
    max-height: none;
  }
}

/* bilvo-billing-forms.css */
/* Bilvo — Sales Invoice & Returns/Exchange form responsive fixes */

.si-app .si-product-search {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.si-app .si-barcode-row {
  display: flex;
  gap: 0;
  min-width: 0;
}

.si-app .si-barcode-row .bq-form-control {
  flex: 1;
  min-width: 0;
  border-radius: 10px 0 0 10px;
}

.si-app .si-barcode-row .pos-input-btn--camera {
  border-radius: 0 10px 10px 0;
  flex-shrink: 0;
}

.si-app .si-category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.si-app .si-category-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--pos-border);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pos-maroon);
  cursor: pointer;
  white-space: nowrap;
}

.si-app .si-category-chip.is-active {
  background: linear-gradient(145deg, var(--pos-pink) 0%, var(--pos-maroon) 100%);
  color: #fff;
  border-color: transparent;
}

.si-app .si-search-dropdown,
.si-app .si-search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.si-app .si-search-dropdown button,
.si-app .si-search-results button {
  text-align: left;
}

.si-app .si-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.si-app .si-items-table .si-mini {
  min-width: 64px;
  padding: 6px 8px;
  font-size: 0.85rem;
}

.si-app .si-pay-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.si-app .si-pay-tab {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--pos-maroon);
  cursor: pointer;
}

.si-app .si-pay-tab.is-active {
  background: var(--pos-maroon);
  color: #fff;
  border-color: var(--pos-maroon);
}

.si-app .si-check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
}

.si-app .si-check-field input {
  width: 18px;
  height: 18px;
}

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

.si-app .si-return-note-box {
  padding: 14px 16px;
  border: 1px dashed var(--pos-border);
  border-radius: 10px;
  background: var(--pos-pink-soft);
  grid-column: 1 / -1;
}

.si-app .si-return-note-box p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--pos-maroon);
  line-height: 1.5;
}

.si-app .si-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 12px;
  align-self: start;
}

.si-app .si-summary h3,
.si-app .si-stock-note h3,
.si-app .si-actions h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--pos-maroon);
}

.si-app .si-summary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.si-app .si-summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.si-app .si-summary-list dt {
  color: var(--pos-muted);
  font-weight: 500;
}

.si-app .si-summary-list dd {
  margin: 0;
  font-weight: 700;
  color: var(--pos-text);
}

.si-app .si-grand,
.si-app .si-due {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.si-app .si-grand {
  background: linear-gradient(145deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
  color: #fff;
}

.si-app .si-grand strong {
  font-size: 1.25rem;
}

.si-app .si-due {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.si-app .si-due strong {
  font-size: 1.1rem;
}

.si-app .si-btn-block {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
}

.si-app .si-stock-note p,
.si-app .si-stock-preview {
  font-size: 0.82rem;
  color: var(--pos-muted);
  line-height: 1.45;
}

.si-app .rx-scan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.si-app .rx-scan-row .bq-form-control {
  min-width: 0;
}

.si-app .rx-scan-row .pos-input-btn--camera,
.si-app .rx-scan-row .pos-chip-btn {
  min-height: 42px;
  white-space: nowrap;
}

.si-app .rx-item-list {
  display: grid;
  gap: 10px;
}

.si-app .rx-item-card {
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.si-app .rx-item-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.si-app .rx-item-card__title {
  font-weight: 700;
  color: var(--pos-maroon);
  font-size: 0.9rem;
}

.si-app .rx-item-card__meta {
  font-size: 0.78rem;
  color: var(--pos-muted);
  margin-top: 2px;
}

.si-app .rx-item-card__fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.si-app .rx-item-card__fields label {
  display: grid;
  gap: 4px;
}

.si-app .rx-item-card__fields label span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pos-muted);
  text-transform: uppercase;
}

.si-app .rx-item-card__amount {
  font-weight: 700;
  color: var(--pos-maroon);
  padding-bottom: 8px;
  white-space: nowrap;
}

.bq-documents-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.bq-documents-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bq-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bq-cell-title {
  display: block;
  font-weight: 600;
  color: var(--pos-text);
}

.bq-cell-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--pos-muted);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .si-app .si-sidebar {
    position: static;
  }

  .si-app .si-product-search {
    grid-template-columns: 1fr 1fr;
  }

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

  .bq-documents-filter-bar {
    grid-template-columns: 1fr;
  }
}

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

  .si-app .rx-scan-row {
    grid-template-columns: 1fr;
  }

  .si-app .rx-item-card__fields {
    grid-template-columns: 1fr 1fr;
  }

  .si-app .rx-item-card__amount {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }

  .si-app .si-items-table thead {
    display: none;
  }

  .si-app .si-items-table tr {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pos-border);
  }

  .si-app .si-items-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border: none;
  }

  .si-app .si-items-table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pos-muted);
    text-transform: uppercase;
  }

  .si-app .si-items-table td:last-child {
    justify-content: flex-end;
  }

  .si-app .si-items-table td:last-child::before {
    display: none;
  }
}

/* —— Billing Product create/edit (G3 / Gayathri layout, Bilvo blue tokens) —— */

.bq-billing-products-app {
  padding: 8px clamp(16px, 2.2vw, 28px) 32px;
}

.bq-billing-products-app .bq-topbar,
.bq-billing-products-app .bq-page-header {
  margin-bottom: 18px;
}

.bq-billing-products-app .bq-panel {
  overflow: visible;
  margin-bottom: 18px;
}

.bq-billing-products-form .bq-panel:has(.bp-category-picker) {
  position: relative;
  z-index: 5;
}

.bq-billing-products-form .bq-panel-pad,
.bq-billing-products-form .bq-form-grid,
.bp-category-field {
  overflow: visible;
}

.bq-billing-products-app .bq-panel-head {
  padding: 16px 20px;
  align-items: center;
}

.bq-billing-products-app .bq-panel-head--stack {
  align-items: center;
  gap: 12px;
}

.bq-billing-products-app .bq-panel-pad {
  padding: 20px 22px 22px;
}

.bq-billing-products-form {
  display: grid;
  gap: 0;
}

.bq-billing-products-form .bp-form-error {
  margin: 0 0 16px;
}

.bq-billing-products-form .bp-form-actions {
  margin-top: 20px;
  margin-bottom: 8px;
  padding: 16px 4px 0;
}

.bq-billing-products-form .bq-form-grid {
  padding: 0;
  gap: 16px 18px;
}

.bq-billing-products-form .bq-form-field--full {
  grid-column: 1 / -1;
}

.bq-billing-products-form .pos-quick-field {
  gap: 8px;
}

.bq-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bp-category-picker {
  position: relative;
  z-index: 20;
}

.bp-category-picker.is-open {
  z-index: 50;
}

.bp-category-control {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.bp-category-control .pos-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.bp-category-toggle {
  width: 42px;
  flex-shrink: 0;
  border: 1px solid var(--pos-border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--pos-pink-soft);
  color: var(--pos-maroon);
  cursor: pointer;
}

.bp-category-picker.is-open .bp-category-toggle i {
  transform: rotate(180deg);
}

.bp-category-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 64, 175, 0.16);
}

.bp-category-options {
  display: grid;
  gap: 2px;
}

.bp-category-option,
.bp-category-add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pos-maroon);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.bp-category-option:hover,
.bp-category-option.is-selected,
.bp-category-add:hover {
  background: var(--pos-pink-soft);
}

.bp-category-add {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--pos-pink);
  font-weight: 700;
  background: var(--pos-pink-soft);
  border: 1px solid var(--pos-border);
  margin-bottom: 4px;
}

.bp-category-empty {
  margin: 0;
  padding: 10px;
  color: var(--pos-muted);
  font-size: 0.8rem;
}

.bp-size-rows {
  display: grid;
  gap: 12px;
  padding: 0;
}

.bp-size-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed var(--pos-border);
  border-radius: 10px;
  background: var(--pos-pink-soft);
  color: var(--pos-muted);
  font-size: 0.84rem;
}

.bp-size-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: #fff;
}

.bp-size-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bp-size-field label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.bp-size-field--action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  align-self: end;
}

.bp-size-field--action .pos-quick-remove-row {
  width: 42px;
  height: 42px;
  margin: 0;
  flex-shrink: 0;
}

.bp-size-field .pos-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

@media (max-width: 980px) {
  .bq-form-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .bq-form-grid--3 .pos-quick-field:last-child {
    grid-column: 1 / -1;
  }

  .bp-size-row {
    grid-template-columns: 1fr 1fr;
  }

  .bp-size-field--action {
    grid-column: 1 / -1;
    align-items: stretch;
  }

  .bp-size-field--action .pos-quick-remove-row {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .bq-billing-products-app {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 20px;
  }

  .bq-billing-products-app .bq-panel {
    margin-bottom: 14px;
  }

  .bq-billing-products-app .bq-panel-head {
    padding: 14px 16px;
  }

  .bq-billing-products-app .bq-panel-pad {
    padding: 16px;
  }

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

  .bq-form-grid--3 .pos-quick-field:last-child {
    grid-column: auto;
  }

  .bq-billing-products-app .bq-panel-head--stack {
    align-items: stretch;
  }

  .bq-billing-products-app .bq-panel-head--stack .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }

  .bp-size-row {
    grid-template-columns: 1fr;
  }

  .bq-billing-products-form .bp-form-actions {
    flex-direction: column-reverse;
  }

  .bq-billing-products-form .bp-form-actions .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }
}

/* —— Billing Products list desk —— */

.bq-billing-products-app {
  padding: 8px clamp(14px, 2vw, 24px) 28px;
  display: grid;
  gap: 16px;
}

.bq-billing-products-app > .bq-page-header,
.bq-billing-products-app > .bq-topbar {
  margin: 0;
}

.bp-desk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bp-desk-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--pos-border);
  border-radius: 14px;
  box-shadow: var(--pos-shadow);
  min-height: 88px;
}

.bp-desk-stat--accent {
  background: linear-gradient(135deg, var(--pos-maroon) 0%, var(--pos-maroon-light) 100%);
  border-color: transparent;
  color: #fff;
}

.bp-desk-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pos-pink-soft);
  color: var(--pos-maroon);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.bp-desk-stat--accent .bp-desk-stat__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.bp-desk-stat__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
  margin-bottom: 4px;
}

.bp-desk-stat--accent .bp-desk-stat__label {
  color: rgba(255, 255, 255, 0.82);
}

.bp-desk-stat__value {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--pos-maroon);
}

.bp-desk-stat--accent .bp-desk-stat__value {
  color: #fff;
}

.bp-desk-panel {
  margin: 0;
  overflow: hidden;
}

.bp-desk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pos-border);
  background: linear-gradient(180deg, #fff, var(--pos-pink-soft));
}

.bp-desk-toolbar h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--pos-maroon);
}

.bp-desk-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bp-desk-check-col {
  width: 42px;
  text-align: center;
}

.bp-desk-check-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--pos-maroon);
  cursor: pointer;
}

.bp-desk-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--pos-pink-soft) 70%, #fff);
}

.bp-desk-added {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pos-muted);
  white-space: nowrap;
}

.bp-desk-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 280px);
  padding: 0 12px;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: #fff;
}

.bp-desk-search .fa-search {
  color: var(--pos-muted);
  font-size: 0.85rem;
}

.bp-desk-search .pos-input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 40px;
  flex: 1;
  min-width: 0;
}

.bp-desk-table-wrap {
  padding: 0;
}

.bp-desk-table thead th {
  padding: 12px 16px !important;
  vertical-align: middle;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.bp-desk-table tbody td {
  padding: 12px 16px !important;
  vertical-align: middle;
}

.bp-desk-product {
  display: grid;
  gap: 6px;
}

.bp-desk-product__name {
  font-weight: 700;
  color: var(--pos-text);
  line-height: 1.3;
  text-transform: none;
}

.bp-desk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pos-pink-soft);
  color: var(--pos-maroon);
  font-size: 0.7rem;
  font-weight: 700;
}

.bp-desk-chip--muted {
  background: #f1f5f9;
  color: var(--pos-muted);
}

.bp-desk-sku {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.bp-desk-price {
  display: grid;
  gap: 2px;
}

.bp-desk-price strong {
  color: var(--pos-maroon);
  font-size: 0.95rem;
}

.bp-desk-price s {
  color: var(--pos-muted);
  font-size: 0.78rem;
}

.bp-desk-stock {
  display: inline-flex;
  min-width: 2.2rem;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bp-desk-stock.is-low {
  background: #fff7ed;
  color: #c2410c;
}

.bp-desk-stock.is-out {
  background: #fef2f2;
  color: #b91c1c;
}

.bp-desk-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

@media (max-width: 900px) {
  .bp-desk-stats {
    grid-template-columns: 1fr;
  }

  .bp-desk-toolbar {
    align-items: stretch;
  }

  .bp-desk-search {
    width: 100%;
    min-width: 0;
  }

  .bp-desk-toolbar__actions {
    width: 100%;
  }

  .bp-desk-toolbar__actions .pos-chip-btn {
    flex: 1;
    justify-content: center;
  }
}

/* reports.css */
/* Report modules — spacing + responsive (loads last to beat duplicate rules) */

.bq-reports-app,
.bq-product-reports-app {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px 18px 28px;
    max-width: 100%;
    box-sizing: border-box;
}

.bq-reports-app > .bq-topbar,
.bq-reports-app > .bq-page-header,
.bq-product-reports-app > .bq-topbar,
.bq-product-reports-app > .bq-page-header {
    margin: 0;
    padding: 16px 20px;
    gap: 12px 16px;
    box-sizing: border-box;
}

.bq-reports-app > .bq-topbar .bq-topbar-actions,
.bq-product-reports-app > .bq-topbar .bq-topbar-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Date filter */
.bq-reports-app .bq-reports-filter {
    padding: 16px 18px;
    margin: 0;
    box-sizing: border-box;
}

.bq-reports-app .bq-reports-filter-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}

.bq-reports-app .bq-reports-filter-field {
    flex: 1 1 160px;
    max-width: 220px;
    min-width: 148px;
    margin: 0;
    gap: 8px;
}

.bq-reports-app .bq-reports-filter-field .bq-form-control {
    width: 100%;
    min-height: 42px;
    margin: 0;
    box-sizing: border-box;
}

.bq-reports-app .bq-reports-filter-actions {
    flex: 0 0 auto;
    margin: 0;
}

.bq-reports-app .bq-reports-filter-note {
    margin: 14px 0 0;
    padding: 12px 0 0;
    line-height: 1.45;
}

/* Stack: section title → KPIs → table */
.bq-reports-app .bq-reports-layout,
.bq-reports-app .bq-reports-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.bq-reports-app .bq-reports-section-head {
    margin: 0;
    padding: 14px 18px;
    box-sizing: border-box;
}

.bq-reports-app .bq-reports-section-head h2 {
    margin: 0;
    gap: 10px;
}

/* KPI cards */
.bq-reports-app .bq-stat-grid,
.bq-reports-app .bq-reports-stat-grid,
.bq-product-reports-app .bq-stat-grid,
.bq-product-reports-app .bq-product-reports-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.bq-product-reports-app .bq-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bq-reports-app .bq-stat-card,
.bq-product-reports-app .bq-stat-card {
    margin: 0;
    padding: 18px 20px;
    box-sizing: border-box;
    min-width: 0;
}

.bq-reports-app .bq-stat-label,
.bq-product-reports-app .bq-stat-label {
    display: block;
    padding: 0;
    margin: 0;
}

.bq-reports-app .bq-stat-value,
.bq-product-reports-app .bq-stat-value {
    display: block;
    padding: 2px 0 0;
    margin: 0;
    word-break: break-word;
}

.bq-reports-app .bq-stat-note {
    display: block;
    margin: 0;
    padding: 2px 0 0;
}

/* Tables */
.bq-reports-app .bq-report-table-panel,
.bq-reports-app .bq-panel,
.bq-product-reports-app .bq-panel {
    margin: 0;
    overflow: hidden;
}

.bq-reports-app .bq-report-table-toolbar {
    padding: 14px 18px;
    gap: 12px 16px;
}

.bq-reports-app .bq-report-table-title {
    margin: 0;
}

.bq-reports-app .bq-report-table-meta {
    margin: 6px 0 0;
}

.bq-reports-app .bq-report-table-scroll,
.bq-reports-app .bq-table-wrap,
.bq-product-reports-app .bq-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
}

.bq-reports-app .bq-table th,
.bq-reports-app .bq-table td,
.bq-reports-app .bq-report-data-table thead th,
.bq-reports-app .bq-report-data-table tbody td,
.bq-product-reports-app .bq-table th,
.bq-product-reports-app .bq-table td {
    padding: 12px 16px;
}

.bq-reports-app .bq-table td:first-child,
.bq-reports-app .bq-table th:first-child {
    padding-left: 16px;
}

.bq-reports-app .bq-panel-head {
    padding: 14px 18px !important;
}

.bq-product-reports-app .bq-board-2 {
    gap: 16px;
    margin: 0;
}

.bq-reports-app .bq-flash,
.bq-reports-app .bq-muted {
    margin: 0;
}

@media (max-width: 1100px) {
    .bq-reports-app .bq-stat-grid,
    .bq-reports-app .bq-reports-stat-grid,
    .bq-product-reports-app .bq-stat-grid,
    .bq-product-reports-app .bq-product-reports-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .bq-reports-app .bq-report-data-table {
        min-width: 0;
    }

    .bq-reports-app table.bq-table-responsive tbody tr,
    .bq-product-reports-app table.bq-table-responsive tbody tr {
        padding: 14px 16px;
        margin-bottom: 12px;
    }

    .bq-reports-app table.bq-table-responsive tbody td,
    .bq-product-reports-app table.bq-table-responsive tbody td {
        padding: 8px 0;
    }
}

@media (max-width: 720px) {
    .bq-reports-app,
    .bq-product-reports-app {
        padding: 12px 12px 24px;
        gap: 14px;
    }

    .bq-reports-app > .bq-topbar,
    .bq-reports-app > .bq-page-header,
    .bq-product-reports-app > .bq-topbar,
    .bq-product-reports-app > .bq-page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .bq-reports-app > .bq-topbar .bq-topbar-actions,
    .bq-product-reports-app > .bq-topbar .bq-topbar-actions {
        margin-left: 0;
        width: 100%;
    }

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

    .bq-reports-app .bq-reports-filter {
        padding: 14px 16px;
    }

    .bq-reports-app .bq-reports-filter-field {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }

    .bq-reports-app .bq-reports-filter-actions {
        width: 100%;
    }

    .bq-reports-app .bq-reports-filter-actions .pos-chip-btn {
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    .bq-reports-app .bq-reports-section-head {
        padding: 12px 14px;
    }

    .bq-reports-app .bq-stat-card,
    .bq-product-reports-app .bq-stat-card {
        padding: 16px 16px;
    }

    .bq-reports-app .bq-report-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .bq-reports-app .bq-report-export-actions {
        width: 100%;
    }

    .bq-reports-app .bq-report-export-actions .pos-chip-btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 40px;
    }

    .bq-product-reports-app .bq-board-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .bq-reports-app .bq-stat-grid,
    .bq-reports-app .bq-reports-stat-grid,
    .bq-product-reports-app .bq-stat-grid,
    .bq-product-reports-app .bq-product-reports-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* dashboards.css */
/* Product + billing dashboards — spacing, charts, extra detail */

.bq-app.bq-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px 18px 28px;
    max-width: 1400px;
    box-sizing: border-box;
}

.bq-app.bq-dashboard > .bq-topbar {
    margin: 0;
    padding: 16px 20px;
    gap: 12px 16px;
    box-sizing: border-box;
}

.bq-app.bq-dashboard .bq-dashboard-kpi,
.bq-app.bq-dashboard .bq-dashboard-metrics,
.bq-app.bq-dashboard .bq-dashboard-insights,
.bq-app.bq-dashboard .bq-dashboard-charts,
.bq-app.bq-dashboard .bq-dashboard-modules,
.bq-app.bq-dashboard .bq-dashboard-recent {
    margin: 0;
}

.bq-app.bq-dashboard .bq-dashboard-kpi-card {
    padding: 16px 18px;
    gap: 8px;
}

.bq-app.bq-dashboard .bq-dashboard-metric {
    padding: 12px 14px;
}

.bq-app.bq-dashboard .bq-panel-head {
    padding: 14px 18px;
    margin: 0;
}

.bq-app.bq-dashboard .bq-panel-body {
    padding: 8px 18px 18px;
}

.bq-dashboard-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 14px;
}

.bq-dashboard-charts.is-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bq-chart-bars {
    padding: 8px 4px 4px;
    min-height: 180px;
}

.bq-donut-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 4px 0 8px;
}

.bq-donut {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.bq-donut-hole {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--pos-card, #fff);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6px;
    box-sizing: border-box;
}

.bq-donut-hole strong {
    font-size: 0.72rem;
    line-height: 1.25;
    color: var(--pos-maroon);
}

.bq-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.bq-donut-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--pos-maroon);
}

.bq-donut-legend i {
    width: 10px;
    height: 10px;
    border-radius: 99px;
}

.bq-hbar-list {
    display: grid;
    gap: 12px;
}

.bq-hbar-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--pos-maroon);
}

.bq-hbar-track {
    height: 8px;
    border-radius: 99px;
    background: #f3e6ea;
    overflow: hidden;
}

.bq-hbar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--pos-pink), var(--pos-maroon));
}

.bq-pipeline {
    display: grid;
    gap: 12px;
}

.bq-pipeline-row {
    display: grid;
    gap: 6px;
}

.bq-pipeline-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--pos-maroon);
}

.bq-pipeline-track {
    height: 8px;
    border-radius: 99px;
    background: #f3e6ea;
    overflow: hidden;
}

.bq-pipeline-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--pos-pink), var(--pos-maroon));
}

.bq-quick-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.bq-quick-actions a {
    text-align: center;
    text-decoration: none;
}

.bq-table-wrap {
    overflow-x: auto;
}

@media (max-width: 1100px) {
    .bq-dashboard-charts,
    .bq-dashboard-charts.is-triple {
        grid-template-columns: 1fr;
    }
}

.bq-preloader {
    display: grid;
    place-items: center;
    z-index: 80;
    pointer-events: all;
}

.bq-preloader--overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--pos-bg, #f4f7fb) 78%, transparent);
    backdrop-filter: blur(6px);
}

.bq-preloader--fill {
    position: relative;
    min-height: min(70vh, 640px);
    width: 100%;
    flex: 1;
}

#root > .bq-preloader--fill {
    min-height: 100vh;
    min-height: 100dvh;
}

.bq-preloader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 32px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(90, 18, 36, 0.12);
    border: 1px solid color-mix(in srgb, var(--pos-maroon, #7a1f33) 12%, #fff);
}

.bq-preloader-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.bq-preloader-card p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--pos-maroon, #7a1f33);
}

.bq-preloader-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #f3e6ea;
    border-top-color: var(--pos-pink, #d45a7a);
    border-right-color: var(--pos-maroon, #7a1f33);
    animation: bq-preloader-spin 0.75s linear infinite;
}

@keyframes bq-preloader-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .bq-app.bq-dashboard {
        padding: 12px 12px 24px;
        gap: 14px;
    }

    .bq-donut-wrap {
        justify-content: center;
    }
}

/* settings.css */
.bq-settings-app {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 20px 32px;
    max-width: 1180px;
    box-sizing: border-box;
}

.bq-settings-app > .bq-topbar {
    margin: 0;
    padding: 18px 22px;
}

.bq-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.bq-settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--pos-border);
    background: var(--pos-card);
    color: var(--pos-maroon);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
}

.bq-settings-tab small {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pos-muted);
}

.bq-settings-tab.is-active {
    background: var(--pos-maroon);
    border-color: transparent;
    color: #fff;
}

.bq-settings-tab.is-active small {
    color: rgba(255, 255, 255, 0.8);
}

.bq-settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}

.bq-settings-app .bq-panel {
    margin: 0;
}

.bq-settings-app .bq-panel-head {
    padding: 16px 22px;
}

.bq-settings-app .bq-panel-body {
    padding: 8px 22px 22px;
}

.bq-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.bq-settings-app .pos-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    min-width: 0;
}

.bq-settings-app .pos-field > span {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.bq-settings-app .pos-input,
.bq-settings-app select.pos-input {
    width: 100%;
    min-height: 44px;
    margin: 0;
    box-sizing: border-box;
}

.bq-settings-span-2 {
    grid-column: 1 / -1;
}

.bq-settings-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    background: #fdf8fa;
    margin: 0;
}

.bq-settings-check span {
    display: grid;
    gap: 4px;
}

.bq-settings-check em {
    font-style: normal;
    font-size: 0.75rem;
    color: var(--pos-muted);
}

.bq-settings-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bq-settings-color-input {
    width: 48px;
    height: 44px;
    padding: 4px;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.bq-settings-modules {
    display: grid;
    gap: 12px;
}

.bq-settings-limits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.bq-settings-limits li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fdf8fa;
    border-radius: 8px;
}

.bq-settings-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 4px;
}

.bq-settings-preview {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pos-maroon);
}

.bq-settings-receipt-stage {
    max-height: 68vh;
    overflow: auto;
    border-radius: 12px;
    margin-top: 4px;
}

.bq-settings-receipt-stage.is-thermal .bill-tpl.thermal {
    margin: 0 auto;
}

@media (max-width: 768px) {
    .bq-settings-app {
        padding: 14px 14px 28px;
        gap: 16px;
    }

    .bq-settings-grid {
        grid-template-columns: 1fr;
    }
}

.bq-alert-host {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(440px, calc(100vw - 24px));
    pointer-events: none;
}

.bq-alert-popup {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    border: 1px solid #e5e7eb;
    animation: bq-alert-in 0.22s ease;
}

.bq-alert-popup > .fa {
    font-size: 1.25rem;
    margin-top: 2px;
}

.bq-alert-popup--success {
    border-color: #86efac;
    background: #f0fdf4;
}

.bq-alert-popup--success > .fa { color: #15803d; }

.bq-alert-popup--error {
    border-color: #fecaca;
    background: #fef2f2;
}

.bq-alert-popup--error > .fa { color: #b91c1c; }

.bq-alert-popup--info {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.bq-alert-popup--info > .fa { color: #1d4ed8; }

.bq-alert-popup__body {
    flex: 1;
    min-width: 0;
}

.bq-alert-popup__body strong {
    display: block;
    font-size: 0.92rem;
    margin: 0 0 2px;
}

.bq-alert-popup__body p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #334155;
}

.bq-alert-popup__close {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.95rem;
}

@keyframes bq-alert-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* staff.css */
.bq-staff-app {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 18px 28px;
    box-sizing: border-box;
}

.bq-staff-app > .bq-topbar,
.bq-staff-app > .bq-page-header {
    margin: 0;
}

.bq-staff-app .bq-filter-bar {
    margin: 0 !important;
    padding: 12px 0;
    gap: 10px !important;
}

.bq-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bq-staff-app .bq-crud-form {
    margin: 0 0 16px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.bq-staff-app .bq-crud-form .form-actions,
.bq-staff-app .bq-crud-form-error {
    grid-column: 1 / -1;
}

.bq-staff-app .pos-field {
    gap: 8px;
    margin: 0;
}

.bq-field-hint {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    color: var(--pos-muted);
}

.bq-staff-name {
    display: grid;
    gap: 2px;
}

.bq-staff-name span {
    font-size: 0.78rem;
    color: var(--pos-muted);
}

.bq-role-badge,
.bq-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.bq-role-badge i {
    font-size: 0.7rem;
}

.bq-role-badge.is-super {
    background: #3b2a12;
    color: #f3d9a4;
}

.bq-role-badge.is-admin {
    background: #f3e6ea;
    color: var(--pos-maroon);
}

.bq-role-badge.is-manager {
    background: #e8f1f8;
    color: #1f4e79;
}

.bq-role-badge.is-sales {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-badge.is-cashier {
    background: #f4eee6;
    color: #7a4a12;
}

.bq-role-badge.is-staff {
    background: #eee;
    color: #444;
}

.bq-status-badge.is-active {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-status-badge.is-inactive {
    background: #f6e9e9;
    color: #8a2a2a;
}

.bq-staff-app.bq-app .bq-page-header.bq-topbar .pos-chip-btn.bq-header-cta,
.bq-staff-app.bq-app .bq-topbar .pos-chip-btn.bq-header-cta {
    background: #fff !important;
    background-image: none !important;
    color: var(--pos-maroon-dark, #0f3d2e) !important;
    border-color: #fff !important;
    font-weight: 700;
}

.bq-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.bq-role-card {
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 100%;
}

.bq-role-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bq-role-card-copy {
    min-width: 0;
}

.bq-role-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #f3e6ea;
    color: var(--pos-maroon);
    flex-shrink: 0;
}

.bq-role-card.is-super .bq-role-card-icon {
    background: #3b2a12;
    color: #f3d9a4;
}

.bq-role-card.is-admin .bq-role-card-icon {
    background: #f3e6ea;
    color: var(--pos-maroon);
}

.bq-role-card.is-manager .bq-role-card-icon {
    background: #e8f1f8;
    color: #1f4e79;
}

.bq-role-card.is-sales .bq-role-card-icon {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-card.is-cashier .bq-role-card-icon {
    background: #f4eee6;
    color: #7a4a12;
}

.bq-role-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--pos-maroon);
}

.bq-role-card p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--pos-muted);
    line-height: 1.4;
}

.bq-role-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bq-role-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #f3f6f4;
    color: var(--pos-maroon);
}

.bq-role-meta-chip.is-yes {
    background: #e9f6ee;
    color: #1f6b3a;
}

.bq-role-meta-chip.is-no {
    background: #f4f4f4;
    color: var(--pos-muted);
}

.bq-role-perms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.bq-role-perms li {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f7faf8;
    border: 1px solid var(--pos-border);
    font-size: 0.72rem;
    color: var(--pos-maroon);
    outline: none;
}

.bq-role-perms li:focus,
.bq-role-perms li:focus-visible {
    outline: none;
    box-shadow: none;
}

@media (max-width: 1100px) {
    .bq-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .bq-staff-app .bq-crud-form {
        grid-template-columns: 1fr;
    }

    .bq-role-grid {
        grid-template-columns: 1fr;
    }
}

/* responsive-global.css */
/* App-wide responsive containment — loaded last */

.pos-main,
.pos-main > *,
.bq-app,
.si-app,
.bq-reports-app,
.mern-page,
.pf-page,
.pf-form,
.pf-layout,
.pf-main,
.pf-sidebar,
.bq-panel,
.pc-catalog-page,
.cat-form,
.inv-page {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

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

.form-grid .form-actions,
.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 1024px) {
  table.bq-table-responsive,
  table.bq-table-responsive.pc-catalog-table,
  table.bq-table-responsive.inv-table,
  table.bq-table-responsive.cat-table,
  table.bq-table-responsive.si-items-table,
  .cat-page table.pc-catalog-table,
  .inv-table {
    min-width: 0 !important;
    width: 100% !important;
  }

  .pc-table-scroll:has(.bq-table-responsive),
  .bq-table-wrap:has(.bq-table-responsive),
  .bq-table-wrap--actions:has(.bq-table-responsive) {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .form-grid,
  .bq-form-grid,
  .mern-form-grid,
  .mern-row2,
  .mern-split,
  .bq-board-2,
  .bq-stat-grid {
    grid-template-columns: 1fr !important;
  }

  .bq-topbar,
  .bq-page-header.bq-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bq-topbar-actions {
    margin-left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

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

  .bq-filter-bar,
  .bq-documents-filter-bar,
  .pc-catalog-toolbar,
  .inv-move-filters,
  .mern-toolbar,
  .mern-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .bq-filter-bar .pos-chip-btn,
  .pc-catalog-toolbar .pos-chip-btn,
  .form-actions .pos-input-btn,
  .form-actions .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }

  .pc-search-field,
  .pc-search-field .bq-form-control,
  .mern-toolbar .pos-input,
  .inv-move-filters .bq-form-control {
    width: 100%;
    min-width: 0;
  }

  .bq-panel,
  .pf-card,
  .pc-catalog-panel {
    overflow-x: hidden;
  }

  .bq-row-actions,
  .cat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .bq-row-actions .pos-chip-btn,
  .cat-actions .pos-chip-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .bq-topbar-actions .pos-chip-btn,
  .bq-topbar-actions a.pos-chip-btn {
    flex-basis: 100%;
  }

  .bq-workspace-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .bq-module-nav,
  .bq-quote-module-nav,
  .pos-modules-strip {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

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

  .pos-category-thumb,
  .pos-product-card-thumb,
  .pc-col-image,
  .pc-thumb,
  .inv-thumb {
    display: none !important;
  }
}

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