/* ============================================================
   Sword Cricket POS — Mobile-first stylesheet
   Brand: Midnight Navy #0b1120 / Cyan #00e5ff / Volt #c6ff00
   ============================================================ */

:root {
    --pos-navy:    #ffffff;
    --pos-surface: #f8f9fa;
    --pos-border:  #e0e4e9;
    --pos-cyan:    #000000;
    --pos-volt:    #000000;
    --pos-text:    #000000;
    --pos-muted:   #666666;
    --pos-red:     #dc2626;
    --pos-green:   #16a34a;
    --pos-orange:  #ea580c;
    --pos-radius:  8px;
    --pos-font:    'Segoe UI', system-ui, -apple-system, sans-serif;
}

#sc-pos-app * { box-sizing: border-box; }

#sc-pos-app {
    background: var(--pos-navy);
    min-height: 100vh;
    font-family: var(--pos-font);
    color: var(--pos-text);
    padding-bottom: 40px;
}

/* ── Access gate ── */
#pos-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--pos-font);
}
.pos-gate-card {
    width: 100%;
    max-width: 300px;
    text-align: center;
    padding: 40px 32px;
}
.pos-gate-logo { height: 40px; width: auto; margin: 0 auto 20px; display: block; }
.pos-gate-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.pos-gate-sub {
    font-size: 13px;
    color: #999999;
    margin-bottom: 24px;
}
#pos-gate-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--pos-radius);
    color: #ffffff;
    font-family: 'Space Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.6em;
    text-align: center;
    padding: 14px 0 14px 0.6em;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
#pos-gate-input:focus {
    background: #1a1a1a;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
#pos-gate-input.pos-gate-shake {
    border-color: var(--pos-red);
    animation: pos-gate-shake .35s;
}
@keyframes pos-gate-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}
.pos-gate-error {
    display: none;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pos-red);
}

/* Hide theme footer and any footer-like elements */
footer,
.site-footer,
.footer,
.hfb-footer,
.ast-footer,
.ast-hfb-footer,
.elementor-element[class*="footer"],
.wp-custom-header,
.elementor-section.elementor-top-section:last-of-type {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Header ──────────────────────────────────────────────── */
.pos-header {
    background: #000000;
    border-bottom: 2px solid #333333;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.pos-logo {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pos-date {
    color: #aaaaaa !important;
}
.pos-btn-ghost {
    color: #cccccc !important;
    border-color: #444444 !important;
}
.pos-btn-ghost:hover {
    color: #ffffff !important;
    border-color: #666666 !important;
}
.pos-select {
    background: #222222 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}
#sc-pos-app .pos-logo-img {
    height: 30px;
    width: auto;
    display: block;
}
.pos-logo span { font-size: 15px; }
.pos-cash-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    margin-left: 4px;
}
.pos-cash-btn span { color: #ffffff; font-weight: 700; }
.pos-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pos-export-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pos-date {
    font-size: 12px;
    color: var(--pos-muted);
}

/* ── Body layout ─────────────────────────────────────────── */
.pos-body {
    display: grid;
    grid-template-columns: var(--pos-left-width, 25%) 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - 100px);
    overflow: hidden;
}

.pos-right {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
    min-width: 0;
    gap: 0;
}

.pos-left {
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--pos-border);
    padding-right: 0;
}

.pos-resize-handle {
    position: absolute;
    right: -12px;
    top: 0;
    width: 24px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    user-select: none;
    z-index: 50;
}

.pos-resize-handle::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    width: 3px;
    height: 100%;
    background: #d0d0d0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}

.pos-resize-handle:hover::after,
.pos-resize-handle:active::after {
    background: #0066cc;
    width: 4px;
    right: 9px;
}

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

/* ── Search / filter ─────────────────────────────────────── */
.pos-search-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.pos-search-input {
    flex: 1;
    min-width: 180px;
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    color: var(--pos-text);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    font-family: var(--pos-font);
}
.pos-search-input:focus { border-color: var(--pos-cyan); }
.pos-select {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    color: var(--pos-text);
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--pos-font);
}

/* ── Product list ────────────────────────────────────────── */
.pos-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 4px;
}

.pos-product-item {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    gap: 12px;
}
.pos-product-item:hover { border-color: var(--pos-cyan); background: rgba(0,229,255,0.04); }
.pos-product-item:active { transform: scale(0.99); }
.pos-out-of-stock { opacity: 0.45; pointer-events: none; }

.pos-product-info { flex: 1; min-width: 0; }
.pos-product-name { font-size: 14px; font-weight: 600; color: var(--pos-text); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-product-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-sku { font-size: 11px; font-family: monospace; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; color: var(--pos-muted); }
.pos-cat { font-size: 11px; color: var(--pos-muted); }
.pos-in-cart { font-size: 11px; color: var(--pos-volt); font-weight: 600; }

.pos-product-right { text-align: right; flex-shrink: 0; }
.pos-product-price { font-size: 15px; font-weight: 700; color: var(--pos-cyan); }
.pos-stock { font-size: 11px; margin-top: 3px; }
.pos-stock-ok   { color: var(--pos-green); }
.pos-stock-low  { color: var(--pos-orange); }
.pos-stock-zero { color: var(--pos-red); }

.pos-loading, .pos-empty { text-align: center; padding: 40px; color: var(--pos-muted); font-size: 14px; }

/* ── Cards ───────────────────────────────────────────────── */
.pos-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.pos-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pos-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.pos-card-title-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin: -4px -4px 10px -4px;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
}
.pos-card-title-toggle:hover { background: rgba(30,90,150,0.05); }
.pos-cart-count {
    font-size: 10px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    background: var(--pos-cyan);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
}
.pos-chevron {
    display: inline-block;
    font-size: 11px;
    color: var(--pos-muted);
    transition: transform 0.25s ease;
}
.pos-card-title-toggle.collapsed .pos-chevron { transform: rotate(-90deg); }

/* ── Collapsible section transition ─────────────────────── */
.pos-collapse {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.28s ease;
}
.pos-collapse.collapsed { grid-template-rows: 0fr; }
.pos-collapse-inner { overflow: hidden; min-height: 0; }

.pos-optional { font-weight: 400; text-transform: none; font-size: 11px; }

/* ── Cart items ──────────────────────────────────────────── */
.pos-empty-cart { text-align: center; padding: 24px 0; color: var(--pos-muted); font-size: 13px; }

.pos-cart-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 12px 34px 12px 14px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.pos-cart-item:hover { box-shadow: 0 2px 8px rgba(15,23,42,0.06); border-color: #c7d2e0; }
.pos-cart-item:last-child { margin-bottom: 0; }

.pos-cart-name { font-size: 14px; font-weight: 700; color: var(--pos-text); margin-bottom: 4px; padding-right: 4px; }
.pos-cart-attrs { font-size: 12px; color: var(--pos-cyan); font-weight: 600; margin-bottom: 8px; padding-right: 4px; }

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

.pos-cart-meta {
    font-size: 11px;
    color: var(--pos-muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fixed-width columns so qty / bat-edit-icon / price line up across every
   cart row, whether or not a given row is a bat with the icon showing. */
.pos-cart-right {
    display: grid;
    /* Price column is wide enough to fit the bat price-edit box too, so the
       whole block never changes width — qty/icon/price stay pixel-aligned
       across every row even while one row is mid-edit. */
    grid-template-columns: 50px 22px 155px;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pos-cart-col-qty  { display: flex; }
.pos-cart-col-icon { display: flex; align-items: center; justify-content: center; }
.pos-cart-col-price { display: flex; justify-content: flex-end; }

/* Compact quantity control: number field + tiny stacked up/down arrows */
.pos-qty-sleek {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    height: 26px;
}
.pos-qty-sleek .pos-qty-input {
    width: 36px;
    border: none;
    border-right: 1px solid var(--pos-border);
}
.pos-qty-sleek-arrows {
    display: flex;
    flex-direction: column;
    width: 15px;
}
.pos-qty-sleek-btn {
    flex: 1;
    border: none;
    background: var(--pos-surface);
    color: var(--pos-cyan);
    font-size: 7px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pos-qty-sleek-btn:first-child { border-bottom: 1px solid var(--pos-border); }
.pos-qty-sleek-btn:hover:not(:disabled) { background: rgba(0,0,0,0.08); }
.pos-qty-sleek-btn:active:not(:disabled) { transform: scale(0.9); }
.pos-qty-sleek-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Pencil icon — bats only, reveals the editable price field */
.pos-cart-price-edit-icon {
    background: none;
    border: none;
    color: var(--pos-muted);
    cursor: pointer;
    font-size: 13px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.pos-cart-price-edit-icon:hover { background: rgba(0,0,0,0.08); color: var(--pos-cyan); }

.pos-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pos-border);
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
}
.pos-qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: var(--pos-surface);
    color: var(--pos-cyan);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}
.pos-qty-btn:hover:not(:disabled) { background: rgba(30,90,150,0.1); }
.pos-qty-btn:active:not(:disabled) { transform: scale(0.92); }
.pos-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.pos-cart-price-breakdown { text-align: right; flex-shrink: 0; }
.pos-cart-unit { display: block; font-size: 11px; color: var(--pos-muted); }
.pos-cart-total { font-size: 16px; font-weight: 800; color: var(--pos-volt); }

.pos-original-price { text-decoration: line-through; color: var(--pos-muted); font-size: 11px; }

.pos-cart-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--pos-muted);
    cursor: pointer;
    font-size: 13px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.pos-cart-remove:hover { color: #fff; background: var(--pos-red); }

/* ── Totals ──────────────────────────────────────────────── */
.pos-totals-table { margin-top: 14px; border-top: 1px dashed var(--pos-border); padding-top: 12px; }
.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--pos-muted);
}
.pos-discount-row { align-items: center; gap: 8px; }
.pos-discount-label { display: flex; align-items: center; gap: 8px; }
.pos-discount-amt { color: #16a34a; font-weight: 700; }
.pos-discount-field {
    width: 110px;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 7px;
    color: var(--pos-text);
    padding: 7px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    outline: none;
    font-family: var(--pos-font);
    transition: border-color 0.15s;
}
.pos-discount-field:focus { border-color: var(--pos-cyan); }
.pos-grand-row {
    font-size: 19px !important;
    font-weight: 800;
    color: var(--pos-text) !important;
    border-top: 1px solid var(--pos-border);
    margin-top: 10px;
    padding: 12px 10px !important;
    background: rgba(0,102,204,0.06);
    border-radius: 8px;
}

/* ── Customer form ───────────────────────────────────────── */
.pos-customer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pos-input-full { grid-column: 1 / -1; }

/* ── Buttons ─────────────────────────────────────────────── */
.pos-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: var(--pos-font);
    transition: opacity 0.15s, transform 0.1s;
    letter-spacing: 0.3px;
}
.pos-btn:active { transform: scale(0.98); }
.pos-btn-primary  { background: var(--pos-cyan); color: var(--pos-navy); }
.pos-btn-ghost    { background: transparent; color: var(--pos-muted); border: 1px solid var(--pos-border); }
.pos-btn-complete { background: var(--pos-volt); color: var(--pos-navy); width: 100%; font-size: 16px; padding: 16px; border-radius: 10px; }
.pos-btn-print    { background: var(--pos-cyan); color: var(--pos-navy); flex: 1; }
.pos-btn:hover    { opacity: 0.88; }
.pos-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pos-actions { margin-bottom: 16px; }
.pos-print-actions { display: flex; gap: 12px; margin-top: 16px; }

/* ── Inputs ──────────────────────────────────────────────── */
.pos-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    color: var(--pos-text);
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    font-family: var(--pos-font);
    transition: border-color 0.15s;
}
.pos-input:focus { border-color: var(--pos-cyan); }
.pos-input[readonly] { background: rgba(0,0,0,0.04); color: var(--pos-muted); cursor: not-allowed; }
.pos-note { display: block; font-size: 11px; color: var(--pos-muted); margin-top: 4px; }

/* ── Quantity input in cart (sits between the stepper buttons) ── */
.pos-qty-input {
    width: 36px;
    height: 26px;
    padding: 0;
    border: none;
    border-left: 1px solid var(--pos-border);
    border-right: 1px solid var(--pos-border);
    font-size: 13px;
    color: var(--pos-text);
    background: #fff;
    text-align: center;
    font-weight: 700;
    -moz-appearance: textfield;
}
.pos-qty-input::-webkit-outer-spin-button,
.pos-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pos-qty-input:focus {
    background: rgba(0,102,204,0.06);
    outline: none;
}

/* ── Modal (hidden since not used anymore) ───────────────── */
.pos-modal {
    display: none !important;
}

.pos-modal-hidden {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Cash balance popup — same visual language as the modal above, but its own
   class so it isn't caught by the "display:none !important" rule on .pos-modal */
.pos-cash-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pos-modal-box {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.pos-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--pos-border);
    gap: 12px;
    flex-shrink: 0;
}
.pos-modal-title { font-size: 16px; font-weight: 700; color: var(--pos-text); }
.pos-modal-sku   { font-size: 12px; font-family: monospace; color: var(--pos-muted); margin-top: 3px; }
.pos-modal-close { background: none; border: none; color: var(--pos-muted); font-size: 18px; cursor: pointer; padding: 0; flex-shrink: 0; }
.pos-modal-body  { padding: 18px 20px; overflow-y: auto; min-height: 0; }
.pos-modal-stock { font-size: 12px; color: var(--pos-muted); margin-bottom: 14px; }
.pos-modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pos-field-group label { display: block; font-size: 12px; font-weight: 600; color: var(--pos-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.pos-modal-preview { margin-top: 14px; background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.15); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--pos-muted); text-align: center; }
.pos-modal-preview strong { color: var(--pos-volt); font-size: 18px; }
.pos-modal-footer { padding: 14px 20px; border-top: 1px solid var(--pos-border); display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0; }

/* ── Invoice ─────────────────────────────────────────────── */
.pos-invoice-card {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}
.inv-shop-header { text-align: center; margin-bottom: 16px; }
.inv-shop-name   { font-size: 16px; font-weight: 800; color: #0f172a; }
.inv-shop-brand  { font-size: 14px; font-weight: 600; color: #0369a1; margin: 3px 0; }
.inv-shop-addr   { font-size: 11px; color: #64748b; line-height: 1.6; }
.inv-divider     { border: none; border-top: 1px dashed #cbd5e1; margin: 14px 0; }
.inv-meta        { display: flex; justify-content: space-between; margin-bottom: 12px; }
.inv-label       { font-size: 10px; text-transform: uppercase; color: #94a3b8; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 3px; }
.inv-value       { font-size: 14px; font-weight: 700; color: #0f172a; }
.inv-customer    { margin-bottom: 12px; }
.inv-cust-sub    { font-size: 12px; font-weight: 400; color: #475569; }
.inv-items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-items-table th { font-size: 10px; text-transform: uppercase; color: #94a3b8; padding: 6px 4px; border-bottom: 1px solid #e2e8f0; font-weight: 600; letter-spacing: 0.5px; }
.inv-items-table td { padding: 8px 4px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.inv-items-table tr:last-child td { border-bottom: none; }
.inv-right       { text-align: right; }
.inv-totals      { margin-top: 4px; }
.inv-total-row   { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: #475569; }
.inv-grand-row   { font-size: 16px; font-weight: 800; color: #0f172a; border-top: 1px solid #e2e8f0; margin-top: 6px; padding-top: 8px; }
.inv-footer      { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 4px; font-style: italic; }

/* ── Toast ───────────────────────────────────────────────── */
.pos-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    white-space: nowrap;
    max-width: 90vw;
}
.pos-toast-success { background: rgba(0,229,255,0.15); border: 1px solid var(--pos-cyan); color: var(--pos-cyan); }
.pos-toast-error   { background: rgba(239,68,68,0.15);  border: 1px solid var(--pos-red);  color: var(--pos-red); }

/* ── Print styles ────────────────────────────────────────── */
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* Hide EVERYTHING on the page first */
    body > *,
    body > * > * { display: none !important; }

    /* Then show only the invoice */
    #pos-invoice-print,
    #pos-invoice-print * { display: revert !important; }

    /* Explicitly hide website chrome */
    header, footer, nav,
    #masthead, #colophon, #site-header, #site-footer,
    .site-header, .site-footer, .site-navigation,
    .woocommerce-breadcrumb, .announcement-bar,
    #wpadminbar, .admin-bar,
    [class*="header"], [class*="footer"], [class*="navbar"],
    [class*="nav-"], [id*="header"], [id*="footer"],
    .pos-header, .pos-left, .pos-right > *:not(#pos-invoice-wrap),
    .pos-body, #pos-invoice-wrap > .pos-print-actions,
    .pos-toast, .pos-modal, .no-print { display: none !important; }

    /* Invoice styling for print */
    #pos-invoice-print {
        display: block !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        background: #fff !important;
        color: #000 !important;
        padding: 20px !important;
        border: none !important;
        box-shadow: none !important;
        font-family: Arial, sans-serif !important;
        font-size: 12pt !important;
    }

    .inv-shop-name { font-size: 16pt !important; }
    .inv-grand-row { font-size: 14pt !important; }
    .inv-items-table { font-size: 11pt !important; }
}

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
    .pos-header { padding: 12px 14px; }
    .pos-body   { padding: 12px; gap: 12px; }
    .pos-customer-grid { grid-template-columns: 1fr; }
    .pos-input-full { grid-column: 1; }
    .pos-modal-fields { grid-template-columns: 1fr; }
    .pos-product-name { font-size: 13px; }
}

/* ── Payment modes ───────────────────────────────────────── */
.pos-payment-modes {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}
.pos-pay-mode {
    flex: 1;
    padding: 10px 8px;
    border: 2px solid var(--pos-border);
    border-radius: 8px;
    background: var(--pos-surface);
    color: var(--pos-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--pos-font);
    transition: all 0.15s;
    text-align: center;
}
.pos-pay-mode:hover { border-color: var(--pos-cyan); color: var(--pos-text); }
.pos-pay-mode.active {
    border-color: var(--pos-cyan);
    background: rgba(0,229,255,0.08);
    color: var(--pos-cyan);
}

/* ── Coupon ──────────────────────────────────────────────── */
.pos-coupon-input-wrap {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.pos-coupon-field {
    width: 110px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    color: var(--pos-text);
    padding: 5px 8px;
    font-size: 12px;
    font-family: monospace;
    outline: none;
    text-transform: uppercase;
}
.pos-coupon-field:focus { border-color: var(--pos-cyan); }
.pos-btn-inline {
    background: rgba(0,229,255,0.1);
    border: 1px solid rgba(0,229,255,0.3);
    color: var(--pos-cyan);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--pos-font);
}
.pos-btn-inline:hover { background: rgba(0,0,0,0.15); }

/* ── Invoice payment section ─────────────────────────────── */
.inv-payment { margin-bottom: 12px; }
.inv-payment-mode { font-size: 14px; font-weight: 700; color: #166534; margin-top: 4px; }

/* ── Fix 1: Print — hide EVERYTHING except the invoice ───── */
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    /* Hide the entire page */
    body > * { display: none !important; }

    /* Hide theme header, footer, nav, announcement bar */
    header, footer, nav, .site-header, .site-footer,
    #masthead, #colophon, #site-navigation,
    .woocommerce-breadcrumb, .announcement-bar,
    [class*="header"], [class*="footer"], [class*="navbar"],
    [class*="nav-"], [class*="menu"], .wp-block-template-part { display: none !important; }

    /* Show ONLY the page content wrapper */
    body, html { background: white !important; margin: 0 !important; padding: 0 !important; }

    /* Show only the invoice card */
    #pos-invoice-print {
        display: block !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100% !important;
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        padding: 20px !important;
        z-index: 99999 !important;
    }

    /* Hide everything else in the POS app */
    .pos-header, .pos-left, .pos-cart-card, .pos-customer-card,
    .pos-payment-card, .pos-actions, .pos-toast, .pos-modal,
    .pos-print-actions, .no-print, #pos-toast,
    #sc-pos-app > *:not(.pos-body),
    .pos-body > .pos-left,
    .pos-right > *:not(#pos-invoice-wrap),
    #pos-invoice-wrap > .pos-print-actions { display: none !important; }

    #pos-invoice-wrap { display: block !important; }
    .pos-card.pos-invoice-card { display: block !important; }
}

/* ── Coupon ──────────────────────────────────────────────── */
.pos-coupon-input-wrap { display: flex; gap: 6px; align-items: center; }
.pos-coupon-field {
    width: 110px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    color: var(--pos-text);
    padding: 5px 9px;
    font-size: 12px;
    outline: none;
    font-family: monospace;
    letter-spacing: 1px;
}
.pos-coupon-field:focus { border-color: var(--pos-cyan); }
.pos-btn-inline {
    background: var(--pos-cyan);
    color: var(--pos-navy);
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* ── Payment modes ───────────────────────────────────────── */
.pos-payment-modes { display: flex; gap: 8px; margin-bottom: 4px; }
.pos-pay-mode {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    color: var(--pos-muted);
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--pos-font);
    transition: all 0.15s;
    text-align: center;
}
.pos-pay-mode:hover { border-color: var(--pos-cyan); color: var(--pos-text); }
.pos-pay-mode.active {
    background: rgba(0,229,255,0.12);
    border-color: var(--pos-cyan);
    color: var(--pos-cyan);
}

/* ── Invoice payment line ────────────────────────────────── */
.inv-payment { margin-bottom: 4px; }
.inv-payment-mode { font-size: 13px; font-weight: 600; color: #0f172a; margin-top: 3px; }

/* ── Sale success panel ──────────────────────────────────── */
.pos-sale-success-card {
    text-align: center;
    padding: 40px 24px;
}
.pos-success-icon {
    width: 64px;
    height: 64px;
    background: rgba(198,255,0,0.15);
    border: 2px solid var(--pos-volt);
    border-radius: 50%;
    font-size: 28px;
    color: var(--pos-volt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.pos-success-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--pos-volt);
    margin-bottom: 8px;
}
.pos-success-inv {
    font-size: 13px;
    color: var(--pos-muted);
    margin-bottom: 6px;
    font-family: monospace;
}
.pos-success-total {
    font-size: 26px;
    font-weight: 800;
    color: var(--pos-text);
    margin-bottom: 28px;
}
.pos-success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
}
.pos-success-actions .pos-btn-complete {
    display: block;
    text-decoration: none;
    text-align: center;
}

/* ============================================================
   POS REBUILD — single-view flow: Search  ⇄  Checkout
   (Cart → Customer Details → Payment, e-commerce style)
   Rules below intentionally override earlier same-specificity
   rules (old two-pane grid layout) via source order.
   ============================================================ */

/* ── Desktop-first body: 80% width, centered, room for sidebars either side ──
   This is a shop-manager desktop tool (99.9% of use), so it is NOT designed
   mobile-first — a narrow-screen fallback exists further below but is not
   the primary target. ── */
.pos-body {
    display: block;
    padding: 24px 0;
    width: 80%;
    max-width: none;
    margin-left: auto !important;
    margin-right: auto !important;
    height: auto;
    overflow: visible;
}
.pos-view { width: 100%; }

/* Cart badge count — lives inside the vertical CHECK OUT tab now (see below),
   not a standalone header button. */
.pos-cart-badge-count {
    background: #ffffff;
    color: #000;
    font-size: 12px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    writing-mode: horizontal-tb;
}
.pos-checkout-tab .pos-cart-badge-count:empty,
.pos-checkout-tab .pos-cart-badge-count[style*="display: none"] { display: none; }

/* ── Search results: full-detail product cards ── */
.pos-product-list { width: 100%; }
.pos-search-wrap { width: 100%; }
.pos-product-item {
    display: block;
}
.pos-product-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.pos-product-content { flex: 1; min-width: 0; }
.pos-thumb {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 8px;
    border: 1px solid var(--pos-border);
    object-fit: cover;
    background: #fff;
}
.pos-thumb-empty {
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03), rgba(0,0,0,0.03) 6px, rgba(0,0,0,0.06) 6px, rgba(0,0,0,0.06) 12px);
}
.pos-thumb-sm {
    width: 34px;
    height: 34px;
    border-radius: 6px;
}
.pos-product-main-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}
.pos-product-fields-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.pos-field-pill {
    font-size: 11px;
    background: rgba(0,0,0,0.035);
    border: 1px solid var(--pos-border);
    border-radius: 5px;
    padding: 2px 7px;
    color: var(--pos-muted);
}
.pos-field-pill b { color: var(--pos-text); font-weight: 700; margin-right: 3px; }
.pos-field-pill-sku {
    font-family: monospace;
    background: rgba(0,102,204,0.06);
    border-color: rgba(0,102,204,0.25);
    color: var(--pos-cyan);
}
.pos-product-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Variant picker panel (expands under a product row) ───── */
.pos-product-expanded { border-color: var(--pos-cyan); background: rgba(0,0,0,0.02); }
.pos-variant-panel {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--pos-border);
    cursor: default;
}
.pos-variant-chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.pos-variant-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.pos-variant-chip:hover { border-color: var(--pos-cyan); }
.pos-variant-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pos-variant-content { flex: 1; min-width: 0; }
.pos-variant-attrs { font-size: 13px; font-weight: 600; color: var(--pos-text); margin-bottom: 4px; }
.pos-variant-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-variant-stock { font-size: 11px; color: var(--pos-muted); }
.pos-variant-price { font-size: 12px; font-weight: 700; color: var(--pos-cyan); }

/* ── Search view: main content + vertical CHECK OUT tab on the right edge ── */
#pos-view-search {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.pos-search-main { flex: 1; min-width: 0; }

/* ── Checkout view: vertical reopen-search tab + centered main column ── */
#pos-view-checkout {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.pos-reopen-search-tab {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: var(--pos-cyan);
    color: #fff;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 22px 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Pinned to the true viewport edge like a navigation rail — not to the
       edge of the 80%-wide content column, which sits inset from the screen. */
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 150;
    transition: opacity .15s;
}
.pos-reopen-search-tab:hover { opacity: .85; }
.pos-reopen-icon { font-size: 16px; writing-mode: horizontal-tb; }

/* The CHECK OUT tab is the same component, mirrored to sit on the right
   edge of the viewport (rounded corners flipped). */
.pos-checkout-tab {
    left: auto;
    right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--pos-volt);
    color: #fff;
}
.pos-checkout-tab .pos-reopen-text { color: #fff; }
.pos-checkout-main {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 0 40px 40px;
}

/* ── Stepper / progressor ── */
.pos-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 28px;
    padding-top: 6px;
}
.pos-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.5;
}
.pos-step.active, .pos-step.completed { opacity: 1; cursor: pointer; }
.pos-step.pos-step-skip { opacity: 0.35; cursor: not-allowed; }
.pos-step-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--pos-surface);
    border: 2px solid var(--pos-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    color: var(--pos-muted);
    transition: all .2s;
}
.pos-step.active .pos-step-circle {
    border-color: var(--pos-cyan);
    background: var(--pos-cyan);
    color: #fff;
}
.pos-step.completed .pos-step-circle {
    border-color: var(--pos-green);
    background: var(--pos-green);
    color: #fff;
}
.pos-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pos-muted);
    white-space: nowrap;
}
.pos-step.active .pos-step-label { color: var(--pos-cyan); }
.pos-step.completed .pos-step-label { color: var(--pos-green); }
.pos-step-line {
    width: 56px;
    height: 2px;
    background: var(--pos-border);
    margin: 15px 8px 0;
    flex-shrink: 0;
}

/* ── Step panels (Cart / Customer Details / Payment) as cards ── */
.pos-step-panel {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.pos-cart-items-list { margin-bottom: 4px; }

/* Editable per-line price in the cart step */
.pos-cart-price-edit {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 7px;
    padding: 4px 8px;
    flex-shrink: 0;
}
.pos-cart-price-label { font-size: 13px; color: var(--pos-muted); font-weight: 600; }
.pos-cart-price-input {
    width: 90px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--pos-text);
    text-align: right;
    outline: none;
    font-family: var(--pos-font);
    -moz-appearance: textfield;
}
.pos-cart-price-input::-webkit-outer-spin-button,
.pos-cart-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pos-cart-price-input:focus { color: var(--pos-cyan); }
.pos-cart-price-each { font-size: 10px; color: var(--pos-muted); }

/* Read-only price for every non-bat item — system price is fixed at the register. */
.pos-cart-price-static {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 8px;
    flex-shrink: 0;
}
.pos-cart-price-static-amt { font-size: 14px; font-weight: 700; color: var(--pos-text); }

.pos-discount-pct-sign { font-size: 12px; color: var(--pos-muted); }
.pos-discount-pct-sign small { font-size: 10px; }

.pos-step-continue-btn { width: 100%; margin-top: 18px; }
.pos-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}
.pos-step-nav .pos-btn-primary { flex: 1; margin-top: 0; }
.pos-step-nav-payment { justify-content: center; margin-top: 14px; }

/* ── Customer Details step ── */
.pos-textarea { resize: vertical; min-height: 44px; font-family: var(--pos-font); }

/* ── Payment step: e-commerce style ── */
.pos-order-summary {
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 24px;
}
.pos-order-summary-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--pos-muted); margin-bottom: 10px;
}
.pos-order-summary-row {
    display: flex; justify-content: space-between; font-size: 14px; color: var(--pos-text); padding: 4px 0;
}
.pos-order-summary-discount span:last-child { color: var(--pos-green); font-weight: 700; }
.pos-order-summary-discount-field { align-items: center; }
.pos-order-summary-discount-field .pos-discount-field { width: 60px; }
.pos-discount-locked { font-weight: 700; color: var(--pos-green); }
.pos-order-summary-grand {
    font-size: 20px; font-weight: 800; color: var(--pos-text);
    border-top: 1px solid var(--pos-border); margin-top: 8px; padding-top: 10px;
}

.pos-pay-section-title {
    font-size: 13px; font-weight: 700; color: var(--pos-muted);
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
}

.pos-payment-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.pos-pay-tile {
    position: relative;
    background: #fff;
    border: 2px solid var(--pos-border);
    border-radius: 12px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--pos-font);
    transition: all 0.15s;
}
.pos-pay-tile:hover { border-color: var(--pos-cyan); }
.pos-pay-tile.active {
    border-color: var(--pos-cyan);
    background: rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.pos-pay-tile-icon { font-size: 26px; }
.pos-pay-tile-label { font-size: 13px; font-weight: 700; color: var(--pos-text); }
.pos-pay-tile-check {
    position: absolute;
    top: 8px; right: 8px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--pos-cyan);
    color: #fff;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
}
.pos-pay-tile.active .pos-pay-tile-check { display: flex; }

.pos-complete-sale-btn { margin-top: 8px; }

/* ── Sale Type step ── */
.pos-saletype-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.pos-radio-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 2px solid var(--pos-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.pos-radio-row:hover { border-color: var(--pos-cyan); }
.pos-radio-row.active {
    border-color: var(--pos-cyan);
    background: rgba(0,0,0,0.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.pos-radio-row input[type="radio"] { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--pos-cyan); cursor: pointer; flex-shrink: 0; }
.pos-radio-row-text { display: flex; flex-direction: column; gap: 3px; }
.pos-radio-row-text strong { font-size: 14px; color: var(--pos-text); }
.pos-radio-row-text small { font-size: 12px; color: var(--pos-muted); }

/* Success card now lives directly inside the Payment step (no outer .pos-card) */
.pos-sale-success-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

@media (max-width: 480px) {
    /* 4 steps (Sale Type added) need to be tighter than the old 3-step fit. */
    .pos-step-line { width: 10px; margin: 12px 2px 0; }
    .pos-step-circle { width: 24px; height: 24px; font-size: 12px; }
    .pos-step-label { font-size: 7.5px; white-space: normal; max-width: 52px; text-align: center; line-height: 1.2; }
    .pos-checkout-main { padding: 0 10px 30px; }
    .pos-order-summary { padding: 12px 14px; }
    .pos-step-panel { padding: 16px; }
    .pos-reopen-search-tab { padding: 16px 6px; font-size: 11px; }

    /* Header: this is a desktop-first tool, but keep the header from breaking
       outright if it's ever opened on a narrow screen. */
    .pos-header { flex-wrap: wrap; row-gap: 8px; }
    .pos-header-right { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
    .pos-body { width: 96%; }
}

/* ============================================================
   Credit sales, Credits panel, Returns / Exchange
   ============================================================ */

.pos-input-error { border-color: var(--pos-red) !important; background: rgba(220,38,38,0.04); }

.pos-note-banner {
    background: rgba(0,102,204,0.06);
    border: 1px solid rgba(0,102,204,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--pos-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}
.pos-success-credit-note {
    background: rgba(198,255,0,0.1);
    border: 1px solid var(--pos-volt);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--pos-text);
    margin: -12px auto 20px;
    max-width: 340px;
    text-align: center;
}

.pos-btn-icon {
    background: none;
    border: none;
    color: var(--pos-muted);
    cursor: pointer;
    font-size: 13px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.pos-btn-icon:hover { color: #fff; background: var(--pos-red); }

/* ── Credits panel ── */
.pos-credit-row {
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}
.pos-credit-row:last-child { margin-bottom: 0; }
.pos-credit-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.pos-credit-phone { font-size: 12px; color: var(--pos-muted); margin-left: 6px; }
.pos-credit-number { font-size: 11px; font-family: monospace; color: var(--pos-muted); }
.pos-credit-row-amounts { display: flex; gap: 16px; font-size: 12px; color: var(--pos-muted); margin-bottom: 10px; flex-wrap: wrap; }
.pos-order-address { font-size: 13px; color: var(--pos-text); }
.pos-order-address span { white-space: normal; line-height: 1.4; }
.pos-credit-due { font-weight: 700; color: var(--pos-orange); }
.pos-credit-pay-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pos-credit-pay-row .pos-input { width: auto; flex: 0 0 110px; padding: 8px 10px; font-size: 13px; }
.pos-credit-pay-row select.pos-input { flex: 0 0 90px; }
.pos-credit-pay-row .pos-btn { padding: 8px 16px; font-size: 12px; }

/* ── Pending PO items (item-level detail within a PO group) ── */
.pos-po-item-row { padding: 8px 0; border-top: 1px solid var(--pos-border); font-size: 13px; }
.pos-po-item-row:first-child { border-top: none; }
.pos-po-item-name { color: var(--pos-text); font-weight: 600; }
.pos-po-item-sku { font-size: 11px; font-family: monospace; color: var(--pos-muted); margin-left: 6px; font-weight: 400; }
.pos-po-item-qty { font-size: 12px; color: var(--pos-muted); margin-top: 3px; }
.pos-po-item-pending { font-weight: 700; color: var(--pos-orange); }
.pos-po-item-receive { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pos-po-item-receive label { font-size: 11px; color: var(--pos-muted); }
.pos-po-item-receive .pos-po-receive-qty { width: 70px; padding: 6px 8px; font-size: 13px; }

/* ── Return / Exchange modal ── */
.pos-return-section-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
    color: var(--pos-muted); margin: 18px 0 8px;
}
.pos-return-search-wrap { position: relative; }
.pos-return-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid var(--pos-border); border-radius: 8px;
    max-height: 260px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.pos-return-dd-item {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--pos-surface);
}
.pos-return-dd-item:last-child { border-bottom: none; }
.pos-return-dd-item:hover { background: rgba(0,102,204,0.06); }
.pos-return-dd-sku { font-size: 11px; color: var(--pos-muted); font-family: monospace; white-space: nowrap; }
.pos-return-dd-empty { padding: 14px; text-align: center; color: var(--pos-muted); font-size: 13px; }
.pos-return-dd-disabled { opacity: .4; cursor: not-allowed; }

.pos-return-selected {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,102,204,0.06); border: 1px solid rgba(0,102,204,0.2);
    border-radius: 8px; padding: 10px 14px; margin-top: 8px; font-size: 14px;
}

.pos-btn-xs {
    padding: 5px 10px; font-size: 11px; border-radius: 6px; margin-top: 4px;
}
.pos-return-order-banner {
    background: rgba(0,102,204,0.06); border: 1px solid rgba(0,102,204,0.2);
    border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 6px;
}
.pos-return-discount-note { font-size: 11px; font-weight: 500; color: var(--pos-cyan); text-transform: none; letter-spacing: 0; }
.pos-return-order-item {
    border: 1px solid var(--pos-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.pos-return-order-item-active { border-color: var(--pos-cyan); background: rgba(0,102,204,0.04); }
.pos-return-order-item-done { opacity: .55; }
.pos-return-order-item-check { margin-bottom: 2px; }
.pos-return-order-item-controls {
    display: flex; align-items: center; gap: 16px; margin-top: 8px; padding-top: 8px;
    border-top: 1px dashed var(--pos-border); flex-wrap: wrap;
}
.pos-return-order-item-controls label { font-size: 12px; color: var(--pos-muted); display: flex; align-items: center; gap: 6px; }
.pos-return-order-item-controls .pos-input { width: 70px; padding: 6px 8px; font-size: 12px; }

.pos-return-fields-grid {
    display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 14px; margin-top: 14px; align-items: end;
}
.pos-return-damaged-group { display: flex; align-items: center; padding-bottom: 11px; }
.pos-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pos-text); cursor: pointer; font-weight: 500; text-transform: none; letter-spacing: 0; }
.pos-checkbox-label input { width: auto; cursor: pointer; }

.pos-membership-block { margin-top: 14px; }
.pos-membership-fields { margin-top: 10px; }
.pos-membership-fields .pos-input { max-width: 220px; }
.pos-membership-status { font-size: 12px; margin-top: 6px; min-height: 16px; }
.pos-mem-ok { color: var(--pos-green); font-weight: 600; }
.pos-mem-bad { color: var(--pos-red); font-weight: 600; }
.pos-mem-checking { color: var(--pos-muted); }

.pos-replacement-item {
    display: grid; grid-template-columns: 1fr 70px 90px 90px 26px; gap: 8px; align-items: center;
    padding: 8px 0; border-bottom: 1px dashed var(--pos-border);
}
.pos-replacement-item:last-child { border-bottom: none; }
.pos-replacement-name { font-size: 13px; font-weight: 600; }
.pos-replacement-item .pos-input { padding: 6px 8px; font-size: 12px; }
.pos-replacement-total { font-size: 13px; font-weight: 700; color: var(--pos-cyan); text-align: right; }

.pos-return-net-summary { margin-top: 18px; padding: 12px 16px; border-radius: 8px; font-size: 15px; font-weight: 700; text-align: center; }
.pos-return-net-refund  { color: var(--pos-green); }
.pos-return-net-collect { color: var(--pos-orange); }
.pos-return-net-even    { color: var(--pos-muted); font-weight: 500; }
.pos-return-net-summary:has(.pos-return-net-refund)  { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.2); }
.pos-return-net-summary:has(.pos-return-net-collect) { background: rgba(234,88,12,0.08); border: 1px solid rgba(234,88,12,0.2); }

.pos-return-success {
    margin-top: 16px; padding: 14px 16px; border-radius: 8px; text-align: center;
    background: rgba(198,255,0,0.1); border: 1px solid var(--pos-volt); color: var(--pos-text); font-size: 14px;
}

@media (max-width: 700px) {
    .pos-return-fields-grid { grid-template-columns: 1fr; }
    .pos-replacement-item { grid-template-columns: 1fr; text-align: left; }
}

/* ============================================================
   Header menu — consolidated toolbar (category-menu style)
   ============================================================ */
.pos-menu-wrap { position: relative; }
.pos-menu-btn {
    font-size: 18px;
    line-height: 1;
    padding: 7px 14px !important;
}
.pos-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    padding: 8px;
    z-index: 200;
}
.pos-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 11px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pos-text);
    cursor: pointer;
    font-family: var(--pos-font);
    transition: background .15s;
}
.pos-menu-item:hover { background: rgba(0,0,0,0.06); color: var(--pos-cyan); }
.pos-menu-item-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.pos-menu-item small { color: var(--pos-muted); font-weight: 400; margin-left: auto; }
.pos-menu-divider { height: 1px; background: var(--pos-border); margin: 6px 4px; }

@media (max-width: 480px) {
    .pos-menu-dropdown { right: -10px; min-width: 220px; }
}

/* ── Online Orders notification badges (hamburger + menu item) ─── */
.pos-menu-btn { position: relative; }
.pos-menu-btn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--pos-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px #000000;
    line-height: 1;
}
.pos-menu-item-badge {
    background: var(--pos-red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: auto;
}

/* ── Online Orders status pills ──────────────────────────── */
.pos-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.pos-status-pending    { background: rgba(234,88,12,0.12); color: var(--pos-orange); }
.pos-status-processing { background: rgba(37,99,235,0.12); color: #2563eb; }
.pos-status-on-hold    { background: rgba(234,88,12,0.12); color: var(--pos-orange); }
.pos-status-completed  { background: rgba(22,163,74,0.12); color: var(--pos-green); }
.pos-status-cancelled  { background: rgba(100,116,139,0.12); color: #64748b; }
.pos-status-refunded   { background: rgba(100,116,139,0.12); color: #64748b; }
.pos-status-failed     { background: rgba(220,38,38,0.12); color: var(--pos-red); }
