/* ===== pos ===== */
:root {
    --pos-primary: #D7262B;
    --pos-primary-dark: #B01C21;
    --pos-primary-soft: #FDE8E8;
    --pos-accent-yellow: #F6B800;
    --pos-accent-orange: #F29111;
    --pos-text: #23264F;
    --pos-text-muted: #5F6577;
    --pos-border: #DADCE5;
    --pos-surface: #F6F6F8;
    --pos-card: #FFFFFF;
    --pos-success-bg: #E7F6EC;
    --pos-success-text: #15803D;
    --pos-pending-bg: #FFF1DC;
    --pos-pending-text: #9A4A00;
    --pos-danger-bg: #FDECEC;
    --pos-danger-text: #B91C1C;
    --pos-overlay: rgba(20,22,48,.55);
    --pos-radius-card: 20px;
    --pos-radius-input: 14px;
    --pos-radius-sheet: 28px;
    --pos-shadow: 0 6px 24px rgba(35,38,79,.06);
    --pos-nav-height: calc(80px + env(safe-area-inset-bottom, 0px));
    --pos-page-gutter: 16px;
    /* Compatibility with the existing QRIS presentation and sound controls. */
    --accent: var(--pos-success-text);
    --warning: var(--pos-pending-text);
    --danger: var(--pos-danger-text);
    --bg: var(--pos-surface);
    --fg-muted: var(--pos-text-muted);
    --border: var(--pos-border);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { margin: 0; background: var(--pos-surface); color: var(--pos-text); font: 400 14px/1.5 Mulish, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
button:disabled { opacity: .5; }
button, a, input, select, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--pos-accent-yellow); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--pos-primary); box-shadow: 0 0 0 3px var(--pos-primary-soft); }
h1, h2, h3, p { margin: 0; }
.app-shell h1 { font-size: 22px; line-height: 1.3; font-weight: 900; letter-spacing: -.5px; }
.app-shell h2, .app-shell h3 { font-weight: 800; }
small { font-size: 12px; }
.hidden { display: none !important; }
.flex { display: flex; }
.translate-y-full { transform: translateY(100%); }
.opacity-0 { opacity: 0; }
.pointer-events-none { pointer-events: none; }
.invisible { visibility: hidden; }
.pos-icon { width: 22px; height: 22px; flex-shrink: 0; }
.pos-icon-button { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--pos-surface); color: var(--pos-text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pos-icon-button--primary { color: var(--pos-primary); background: var(--pos-primary-soft); }
.pos-icon-button--danger { color: var(--pos-danger-text); background: var(--pos-danger-bg); }
.pos-button { min-height: 54px; border-radius: var(--pos-radius-input); padding: 12px 18px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; font-size: 15px; line-height: 1.25; text-align: center; transition: background .15s, transform .15s; }
.pos-button:active:not(:disabled) { transform: scale(.98); }
.pos-button--primary { background: var(--pos-primary); color: var(--pos-card); box-shadow: 0 6px 16px rgba(215,38,43,.16); }
.pos-button--primary:hover:not(:disabled) { background: var(--pos-primary-dark); }
.pos-button--outline { background: var(--pos-card); color: var(--pos-text); border-color: var(--pos-border); }
.pos-button--soft { background: var(--pos-primary-soft); color: var(--pos-primary-dark); }
.pos-button--text { background: transparent; color: var(--pos-primary); box-shadow: none; }
.pos-button--danger { background: var(--pos-danger-text); color: var(--pos-card); }
.pos-button--full { width: 100%; }
.pos-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; padding: 0 4px; background: transparent; color: var(--pos-primary); font-size: 12px; font-weight: 800; gap: 3px; }
.pos-link .pos-icon { width: 15px; height: 15px; }
.pos-card { background: var(--pos-card); border-radius: var(--pos-radius-card); padding: 18px; box-shadow: var(--pos-shadow); }
.pos-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pos-field > label, .pos-field-label { display: block; color: var(--pos-text); font-size: 12px; font-weight: 800; }
.pos-input, .pos-select, .pos-textarea { width: 100%; min-width: 0; min-height: 52px; border: 1px solid var(--pos-border); background: var(--pos-card); color: var(--pos-text); border-radius: var(--pos-radius-input); padding: 13px 14px; font-size: 16px; }
.pos-input::placeholder, .pos-textarea::placeholder { color: var(--pos-text-muted); opacity: .7; }
.pos-input:disabled, .pos-select:disabled, .pos-textarea:disabled { background: var(--pos-surface); color: var(--pos-text-muted); opacity: 1; }
.pos-input-wrap { position: relative; display: flex; align-items: center; }
.pos-input-wrap > .pos-icon { position: absolute; left: 15px; width: 20px; height: 20px; color: var(--pos-text-muted); pointer-events: none; }
.pos-input-wrap > .pos-icon + .pos-input { padding-left: 45px; }
.pos-input-wrap > .pos-icon-button { position: absolute; right: 4px; background: transparent; }
.pos-input-wrap:has(> .pos-icon-button) > .pos-input { padding-right: 52px; }
.pos-fields { display: flex; flex-direction: column; gap: 16px; }
.pos-field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.pos-help { font-size: 12px; color: var(--pos-text-muted); line-height: 1.6; }
.pos-error { color: var(--pos-danger-text); font-size: 13px; font-weight: 700; }
.pos-error:empty { display: none; }
.pos-status { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: fit-content; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 10px; line-height: 1.5; font-weight: 800; white-space: nowrap; }
.pos-status--success { color: var(--pos-success-text); background: var(--pos-success-bg); }
.pos-status--pending { color: var(--pos-pending-text); background: var(--pos-pending-bg); }
.pos-status--danger { color: var(--pos-danger-text); background: var(--pos-danger-bg); }
.pos-preview-badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; color: var(--pos-text-muted); background: var(--pos-surface); border: 1px solid var(--pos-border); padding: 2px 8px; font-size: 10px; font-weight: 700; }
.pos-preview-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--pos-text-muted); background: var(--pos-surface); border-radius: 12px; padding: 12px; }
.pos-preview-note .pos-preview-badge { flex-shrink: 0; }
.app-shell { position: relative; width: 100%; height: 100vh; height: 100dvh; margin: 0 auto; background: var(--pos-surface); overflow: clip; isolation: isolate; transform: translateZ(0); }
#appContainer { min-height: 0; height: 100%; flex-direction: column; padding: 0 0 var(--pos-nav-height); overflow: hidden; }
.view { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px var(--pos-page-gutter) 24px; scrollbar-width: thin; }
.pos-header { position: relative; overflow: clip; flex-shrink: 0; background: var(--pos-primary); color: var(--pos-card); padding: calc(12px + env(safe-area-inset-top, 0px)) var(--pos-page-gutter) 12px; display: flex; flex-direction: column; gap: 7px; transition: padding .2s; }
.pos-header::before { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--pos-accent-yellow); top: -106px; right: -44px; pointer-events: none; }
.pos-header__row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; column-gap: 9px; row-gap: 4px; }
.pos-avatar { width: 34px; height: 34px; background: var(--pos-pending-bg); color: var(--pos-pending-text); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; flex-shrink: 0; }
.pos-header__identity { flex: 1; min-width: 0; }
#appName { font-size: 15px; font-weight: 900; letter-spacing: .3px; }
#welcomeUser { font-size: 11px; font-weight: 600; overflow-wrap: anywhere; opacity: .9; }
.pos-header__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.pos-header__actions .pos-icon-button, .pos-logout { background: rgba(255,255,255,.16); color: var(--pos-card); }
.pos-logout { min-height: 44px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; padding: 0 9px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; }
.pos-logout .pos-icon { width: 16px; height: 16px; }
.pos-merchant-button { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 170px; min-height: 44px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; background: rgba(255,255,255,.12); color: var(--pos-card); font-size: 11px; font-weight: 700; text-align: left; }
.pos-merchant-button--device { min-height: 44px; }
.pos-merchant-button > .pos-icon { display: none; }
.pos-merchant-button__copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pos-merchant-button__copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.pos-merchant-button__copy > #activeMerchantDevice { font-size: 12px; font-weight: 800; }
.pos-merchant-button__copy > small { display: block; font-size: 9px; line-height: 1.3; font-weight: 500; opacity: .85; }
.pos-merchant-button__chevron { display: flex; align-items: center; flex-shrink: 0; }
.pos-merchant-button__chevron .pos-icon { width: 15px; height: 15px; transform: rotate(90deg); }
.pos-header__actions > .pos-icon-button { width: 44px; height: 44px; border-radius: 12px; background: transparent; }
.pos-header__actions > .pos-icon-button .pos-icon { width: 18px; height: 18px; }
.pos-merchant-intro { display: flex; align-items: center; gap: 12px; }
.pos-merchant-intro h3 { font-size: 16px; }
.pos-merchant-intro__icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 16px; color: var(--pos-primary); background: var(--pos-primary-soft); }
.pos-merchant-devices { display: flex; flex-direction: column; gap: 10px; }
.pos-merchant-device { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 14px; border: 1px solid var(--pos-border); border-radius: 18px; background: var(--pos-card); cursor: pointer; }
.pos-merchant-device:has(input:checked) { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.pos-merchant-device input { width: 22px; height: 22px; margin: 0; accent-color: var(--pos-primary); flex-shrink: 0; }
.pos-merchant-device strong, .pos-merchant-device small { display: block; overflow-wrap: anywhere; }
.pos-merchant-device small { margin-top: 3px; color: var(--pos-text-muted); }
.pos-merchant-secondary { display: flex; justify-content: space-between; gap: 12px; }
#merchantError:not(:empty) { margin-top: 14px; }
.pos-header__store { position: relative; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; }
.pos-header__store .pos-icon { width: 15px; height: 15px; }
.pos-header__store #merchantName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-header__store small { margin-left: auto; font-size: 10px; opacity: .8; }
.app-shell[data-page="home"] .pos-header { padding-bottom: 70px; }
#view-home { padding-top: 0; overflow: auto; }
.pos-summary { position: relative; margin-top: -56px; border-radius: 22px; padding: 18px 16px 16px; box-shadow: 0 10px 28px rgba(35,38,79,.1); }
/* Keep the overlap outside the scrolling region, including on mobile WebKit. */
.app-shell[data-page="home"] #view-home { overflow: visible; display: flex; flex-direction: column; }
.pos-home-content { flex: 1; overflow-y: auto; min-height: 0; margin: 0 calc(-1 * var(--pos-page-gutter)) -24px; padding: 0 var(--pos-page-gutter) 24px; }
.pos-summary__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-summary h2 { color: var(--pos-text-muted); font-size: 12px; font-weight: 800; }
#paidTotal { font-size: 27px; line-height: 1.4; font-weight: 900; letter-spacing: -.7px; margin-top: 3px; overflow-wrap: anywhere; }
.pos-summary__link { padding: 5px 10px; background: var(--pos-primary-soft); color: var(--pos-primary-dark); border-radius: 999px; min-height: 44px; }
.pos-summary__stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.pos-stat { background: var(--pos-surface); padding: 10px; border-radius: 14px; }
.pos-stat > p { font-size: 19px; font-weight: 900; }
.pos-stat > span { font-size: 10px; font-weight: 700; display: block; white-space: nowrap; }
.pos-stat--success { background: var(--pos-success-bg); color: var(--pos-success-text); }
.pos-stat--pending { background: var(--pos-pending-bg); color: var(--pos-pending-text); }
.pos-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 10px; min-height: 32px; }
.pos-section-heading h2, .pos-section-heading h3 { font-size: 16px; letter-spacing: -.3px; }
.pos-menu-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.pos-menu { min-height: 72px; border: 0; border-radius: 18px; padding: 8px 2px; background: var(--pos-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 10px; font-weight: 800; color: var(--pos-text); }
.pos-menu:active { background: var(--pos-primary-soft); }
.pos-menu__icon { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--pos-primary-soft); color: var(--pos-primary); }
.pos-menu__icon .pos-icon { width: 20px; height: 20px; }
.pos-menu:nth-child(2n) .pos-menu__icon { background: var(--pos-pending-bg); color: var(--pos-pending-text); }
.pos-menu:nth-child(3n) .pos-menu__icon { background: var(--pos-surface); color: var(--pos-text); }
.pos-bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; height: var(--pos-nav-height); padding: 0 6px env(safe-area-inset-bottom, 0px); background: var(--pos-card); border-top: 1px solid var(--pos-border); display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; z-index: 20; }
.pos-nav-item { width: 100%; min-width: 0; min-height: 58px; padding: 4px 0; background: transparent; border: 0; color: var(--pos-text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pos-nav-item small { font-size: 10px; font-weight: 700; }
.pos-nav-icon { width: 52px; height: 30px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.pos-nav-item[aria-current="page"] { color: var(--pos-primary); }
.pos-nav-item[aria-current="page"] .pos-nav-icon { background: var(--pos-primary-soft); }
.pos-nav-qr { justify-self: center; margin-top: -33px; width: 62px; height: 62px; border-radius: 20px; background: var(--pos-primary); color: var(--pos-card); border: 4px solid var(--pos-surface); box-shadow: 0 7px 18px rgba(215,38,43,.3); display: flex; align-items: center; justify-content: center; }
.pos-nav-qr .pos-icon { width: 28px; height: 28px; }
.pos-bottom-nav .pos-nav-qr { color: var(--pos-card); }
.pos-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pos-page-heading p { font-size: 12px; color: var(--pos-text-muted); margin-top: 3px; }
.pos-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pos-toolbar > .pos-input-wrap { flex: 1; min-width: 0; }
.pos-toolbar .pos-input { background: var(--pos-card); }
.pos-pill-row { display: flex; gap: 7px; overflow-x: auto; margin: 12px 0 16px; scrollbar-width: none; }
.pos-pill { min-height: 44px; padding: 8px 14px; border: 1px solid var(--pos-border); background: var(--pos-card); color: var(--pos-text-muted); border-radius: 999px; white-space: nowrap; font-size: 12px; font-weight: 800; }
.pos-pill--active { background: var(--pos-primary-soft); color: var(--pos-primary); border-color: transparent; }
.pos-product-list { display: flex; flex-direction: column; gap: 10px; }
.pos-product-row { background: var(--pos-card); padding: 12px 10px; border-radius: 18px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 8px rgba(35,38,79,.04); }
.pos-product-thumb { width: 56px; height: 56px; border-radius: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--pos-pending-bg); color: var(--pos-pending-text); }
.pos-product-thumb .pos-icon { width: 26px; height: 26px; }
.pos-product-copy { min-width: 0; flex: 1; }
.pos-product-name { font-size: 13px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.pos-product-stock { color: var(--pos-text-muted); font-size: 10px; margin-top: 2px; }
.pos-product-price { color: var(--pos-primary); font-size: 13px; font-weight: 900; margin-top: 2px; }
.pos-product-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pos-product-actions .pos-icon-button { width: 44px; height: 44px; }
.pos-product-qty { font-size: 12px; font-weight: 800; text-align: center; min-width: 12px; }
.pos-product-row--empty { opacity: .55; }
.pos-product-row--manage { flex-wrap: wrap; }
.pos-product-manage-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pos-catalog { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pos-catalog-header { flex-shrink: 0; background: var(--pos-card); padding: 14px var(--pos-page-gutter) 12px; border-bottom: 1px solid var(--pos-border); }
.pos-catalog-header .pos-page-heading { margin-bottom: 12px; }
.pos-catalog-header .pos-page-heading p { font-size: 13px; }
.pos-catalog-barcode { background: var(--pos-card); border: 1px solid var(--pos-border); color: var(--pos-text); }
.pos-catalog-header .pos-toolbar { margin-bottom: 0; }
.pos-catalog-header .pos-input { background: var(--pos-surface); border-color: transparent; font-size: 15px; }
.pos-catalog-header .pos-pill-row { margin: 12px 0 0; }
.pos-catalog-header .pos-pill { font-size: 12px; }
.pos-catalog-header .pos-pill--active { background: var(--pos-primary); color: var(--pos-card); }
.pos-catalog-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px var(--pos-page-gutter) 118px; }
.pos-catalog-card { position: relative; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; box-shadow: none; }
.pos-catalog-card:has(details[open]) { z-index: 6; }
.pos-catalog-thumb { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 60px; height: 60px; border-radius: 14px; font-size: 20px; font-weight: 900; background: var(--pos-primary-soft); color: var(--pos-primary-dark); }
.pos-catalog-thumb--1 { background: var(--pos-pending-bg); color: var(--pos-pending-text); }
.pos-catalog-thumb--2 { background: var(--pos-success-bg); color: var(--pos-success-text); }
.pos-catalog-thumb--3 { background: var(--pos-surface); color: var(--pos-text); }
.pos-catalog-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pos-catalog-name { font-size: 15px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.pos-catalog-sku { font-size: 12px; color: var(--pos-text-muted); }
.pos-catalog-stock { font-size: 11px; min-height: 20px; max-width: 100%; white-space: normal; padding: 1px 8px; margin-top: 2px; }
.pos-catalog-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; gap: 4px; max-width: 40%; }
.pos-catalog-price { font-size: 15px; font-weight: 900; color: var(--pos-primary); line-height: 1.4; text-align: right; overflow-wrap: anywhere; }
.pos-catalog-options { position: relative; }
.pos-catalog-options > summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; list-style: none; cursor: pointer; color: var(--pos-text-muted); }
.pos-catalog-options > summary::-webkit-details-marker { display: none; }
.pos-catalog-options > summary:focus-visible { outline: 3px solid var(--pos-accent-yellow); outline-offset: 2px; }
.pos-catalog-options[open] > summary { background: var(--pos-surface); color: var(--pos-primary); }
.pos-catalog-options__menu { position: absolute; top: 44px; right: 0; z-index: 5; width: 150px; padding: 5px; background: var(--pos-card); border: 1px solid var(--pos-border); border-radius: 14px; box-shadow: 0 8px 24px rgba(35,38,79,.14); }
.pos-catalog-options--up .pos-catalog-options__menu { top: auto; bottom: 44px; }
.pos-catalog-options__menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border: 0; border-radius: 10px; padding: 10px; text-align: left; background: var(--pos-card); color: var(--pos-text); font-size: 13px; font-weight: 700; }
.pos-catalog-options__menu button:hover { background: var(--pos-surface); }
.pos-catalog-options__menu button[title="Hapus"] { color: var(--pos-danger-text); }
.pos-catalog-options__menu .pos-icon { width: 18px; height: 18px; }
.pos-catalog-add { position: absolute; right: 16px; bottom: 20px; z-index: 5; min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px 0 16px; border: 0; border-radius: 18px; background: var(--pos-text); color: var(--pos-card); font-size: 15px; font-weight: 800; box-shadow: 0 10px 22px rgba(35,38,79,.25); }
.pos-catalog-add .pos-icon { color: var(--pos-accent-yellow); }
.pos-cashier-bar { position: absolute; bottom: var(--pos-nav-height); left: 0; right: 0; max-width: none; margin-inline: auto; z-index: 21; border-radius: 24px 24px 0 0; padding: 14px 16px 16px; background: var(--pos-card); box-shadow: 0 -6px 24px rgba(35,38,79,.09); }
.pos-cashier-bar__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.pos-cashier-bar small { font-size: 11px; color: var(--pos-text-muted); }
.pos-cashier-bar strong { font-size: 22px; font-weight: 900; display: block; }
.pos-cashier-bar .pos-button--outline { min-height: 44px; font-size: 12px; padding: 10px 13px; }
#view-kasir { padding-bottom: 186px; }
.pos-cart-floating { position: absolute; right: 16px; bottom: calc(var(--pos-nav-height) + 16px); display: flex; align-items: center; gap: 10px; min-height: 54px; border: 0; border-radius: 18px; padding: 12px 16px; color: var(--pos-card); background: var(--pos-primary); box-shadow: 0 8px 20px rgba(215,38,43,.2); z-index: 22; }
.pos-cart-floating strong { font-size: 14px; }
.app-shell:not([data-page="pos"]) .pos-cart-floating { display: none; }
.pos-cart-badge { background: var(--pos-card); color: var(--pos-primary); width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.pos-transactions { display: flex; flex-direction: column; gap: 10px; }
.pos-transaction { display: flex; gap: 10px; align-items: center; background: var(--pos-card); padding: 14px 12px; border-radius: 18px; box-shadow: 0 2px 8px rgba(35,38,79,.03); }
.pos-transaction-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--pos-primary-soft); color: var(--pos-primary-dark); font-size: 11px; font-weight: 900; }
.pos-transaction-main { flex: 1; min-width: 0; }
.pos-transaction-code { font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.pos-transaction-date { font-size: 10px; color: var(--pos-text-muted); margin-top: 3px; }
.pos-transaction-method { font-size: 10px; color: var(--pos-text-muted); margin-top: 2px; }
.pos-transaction-end { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pos-transaction-end strong { font-size: 12px; font-weight: 900; }
.pos-empty { background: var(--pos-card); border-radius: 18px; padding: 28px 18px; text-align: center; color: var(--pos-text-muted); font-size: 12px; }
.pos-empty .pos-icon { width: 30px; height: 30px; color: var(--pos-primary); margin: 0 auto 12px; }
.pos-empty h2 { font-size: 16px; color: var(--pos-text); margin-bottom: 6px; }
.pos-recents .pos-transaction { padding: 12px 10px; }
.pos-report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.pos-report-card { background: var(--pos-card); border-radius: 20px; padding: 16px; }
.pos-report-card:first-child { grid-column: 1 / -1; }
.pos-report-card small { display: block; color: var(--pos-text-muted); font-size: 11px; font-weight: 700; }
.pos-report-card strong { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.6px; margin-top: 5px; overflow-wrap: anywhere; }
.pos-report-card:first-child strong { font-size: 30px; }
.pos-report-card .pos-icon { color: var(--pos-primary); margin-bottom: 10px; }
.pos-report-period { display: flex; align-items: center; gap: 8px; color: var(--pos-text-muted); font-size: 12px; }
.pos-chart-preview { height: 112px; display: flex; align-items: end; gap: 12px; padding: 12px 0 0; border-bottom: 1px solid var(--pos-border); }
.pos-chart-preview i { display: block; flex: 1; height: 45%; background: var(--pos-primary-soft); border-radius: 7px 7px 0 0; }
.pos-chart-preview i:nth-child(2n) { height: 70%; }
.pos-chart-preview i:nth-child(3n) { height: 90%; }
.pos-stock-row { display: flex; align-items: center; gap: 12px; background: var(--pos-card); padding: 14px; border-radius: 18px; }
.pos-stock-row > span { flex: 1; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.pos-stock-row > div { text-align: right; }
.pos-stock-row strong { display: block; font-size: 17px; }
.pos-stock-row small { font-size: 10px; }
.pos-stock-row--low strong, .pos-stock-row--low small { color: var(--pos-danger-text); }
.pos-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--pos-border); font-size: 12px; }
.pos-setting-row > span:first-child { color: var(--pos-text-muted); }
.pos-setting-row strong { overflow-wrap: anywhere; text-align: right; }
.pos-setting-row:last-child { border: 0; }
.pos-sheet, .pos-sheet-overlay { position: absolute; inset: 0; background: var(--pos-overlay); z-index: 40; }
.pos-sheet { display: flex; align-items: flex-end; justify-content: center; }
.pos-sheet__panel { width: 100%; max-width: none; max-height: calc(100% - 28px - env(safe-area-inset-top, 0px)); background: var(--pos-card); border-radius: var(--pos-radius-sheet) var(--pos-radius-sheet) 0 0; box-shadow: 0 -12px 40px rgba(20,22,48,.15); display: flex; flex-direction: column; overflow: hidden; padding-bottom: env(safe-area-inset-bottom, 0px); animation: pos-sheet-enter .2s ease-out; }
.pos-sheet__handle { width: 44px; height: 5px; border-radius: 99px; background: var(--pos-border); margin: 12px auto 4px; flex-shrink: 0; }
.pos-sheet__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px 14px; flex-shrink: 0; }
.pos-sheet__heading h2 { font-size: 20px; line-height: 1.35; font-weight: 900; letter-spacing: -.4px; }
.pos-sheet__body { padding: 0 20px 22px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.pos-sheet__actions { padding: 14px 20px 20px; border-top: 1px solid var(--pos-border); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.pos-sheet__actions .pos-button { width: 100%; }
.pos-sheet-overlay { transition: opacity .2s; }
.pos-detached-sheet { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; margin-inline: auto; z-index: 50; max-height: calc(100% - 28px); border-radius: var(--pos-radius-sheet) var(--pos-radius-sheet) 0 0; background: var(--pos-card); box-shadow: 0 -12px 40px rgba(20,22,48,.15); overflow-y: auto; padding: 0 20px calc(22px + env(safe-area-inset-bottom, 0px)); transition: transform .25s ease-out; }
.pos-detached-sheet .pos-sheet__heading { padding-left: 0; padding-right: 0; }
.pos-detached-sheet[aria-hidden="false"] { visibility: visible; }
.pos-source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.pos-source-button { border: 1px solid var(--pos-border); border-radius: 18px; padding: 22px 12px; background: var(--pos-surface); color: var(--pos-text); display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 800; }
.pos-source-button .pos-icon { color: var(--pos-primary); width: 28px; height: 28px; }
.pos-photo-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; background: var(--pos-surface); border-radius: 14px; }
.pos-photo-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.pos-photo-preview p { font-size: 12px; }
.pos-product-name-input { display: flex; align-items: center; gap: 8px; }
.pos-product-name-input .pos-input { flex: 1; }
#productDrawer { display: flex; flex-direction: column; max-height: calc(100% - 64px); padding: 0; overflow: hidden; }
#productDrawer > .pos-sheet__heading { padding: 8px 20px 14px; margin: 0; border-bottom: 1px solid var(--pos-border); }
.pos-product-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pos-product-form__fields { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 20px; }
.pos-product-identity { display: flex; align-items: center; gap: 12px; }
.pos-product-identity > .pos-field { flex: 1; min-width: 0; }
.pos-product-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 84px; height: 84px; border: 2px dashed color-mix(in srgb, var(--pos-primary) 35%, var(--pos-card)); border-radius: 18px; background: color-mix(in srgb, var(--pos-primary-soft) 40%, var(--pos-card)); color: var(--pos-primary-dark); font-size: 11px; font-weight: 800; }
.pos-product-photo .pos-icon { width: 24px; height: 24px; }
.pos-product-form__fields .pos-photo-preview { margin-top: 0; }
.pos-cat__box { position: relative; }
.pos-cat__box > svg { position: absolute; left: 14px; top: 17px; width: 18px; height: 18px; color: var(--pos-text-muted); pointer-events: none; }
.pos-cat__box .pos-input { padding-left: 42px; padding-right: 50px; }
.pos-cat__clear { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: var(--pos-surface); color: var(--pos-text-muted); font-size: 20px; }
.pos-cat__clear[hidden] { display: none; }
.pos-cat__chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 112px; overflow-y: auto; }
.pos-cat__chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 13px; border-radius: 14px; border: 1px solid var(--pos-border); background: var(--pos-card); color: var(--pos-text); font-size: 13px; font-weight: 700; }
.pos-cat__chip svg { width: 13px; height: 13px; }
.pos-cat__chip.is-active { background: var(--pos-primary-soft); border-color: var(--pos-primary); color: var(--pos-primary-dark); }
.pos-cat__chip--new { border-style: dashed; color: var(--pos-text-muted); }
.pos-cat__hint { font-size: 12px; color: var(--pos-text-muted); }
.pos-money-input { position: relative; }
.pos-money-input > span { position: absolute; top: 14px; left: 13px; color: var(--pos-text-muted); font-size: 15px; font-weight: 800; pointer-events: none; }
.pos-money-input > .pos-input { padding-left: 40px; font-weight: 800; }
.pos-product-form__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; flex-shrink: 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--pos-border); }
.pos-product-form__actions > .pos-error { grid-column: 1 / -1; }
#photoSourceOverlay { z-index: 55; }
#photoSourceSheet { z-index: 56; }
.pos-camera { position: absolute; inset: 0; z-index: 60; background: var(--pos-text); display: flex; flex-direction: column; }
.pos-camera video { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.pos-camera__actions { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; background: var(--pos-text); }
.pos-camera__shutter { width: 72px; height: 72px; border: 5px solid var(--pos-border); border-radius: 50%; background: var(--pos-card); }
#productCameraError { position: absolute; top: 16px; left: 16px; right: 16px; padding: 12px; background: var(--pos-danger-text); color: var(--pos-card); border-radius: 14px; font-size: 12px; }
.pos-cart-items { display: flex; flex-direction: column; gap: 10px; }
.pos-cart-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; background: var(--pos-surface); border-radius: 16px; }
.pos-cart-item h3 { font-size: 13px; overflow-wrap: anywhere; }
.pos-cart-item p { font-size: 11px; color: var(--pos-text-muted); margin-top: 3px; }
.pos-cart-item__end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pos-cart-item__end strong { font-size: 12px; }
.pos-total-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 16px; background: var(--pos-surface); }
.pos-total-row > span { color: var(--pos-text-muted); font-size: 12px; font-weight: 700; }
.pos-total-row strong { font-size: 22px; font-weight: 900; }
.pos-cash-quick { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.pos-cash-quick button { min-height: 44px; border: 1px solid var(--pos-border); border-radius: 12px; background: var(--pos-card); color: var(--pos-text); font-size: 11px; font-weight: 800; }
.pos-change { background: var(--pos-success-bg); color: var(--pos-success-text); }
.pos-change > span { color: var(--pos-success-text); }
.pos-qris { text-align: center; }
.pos-qris__amount { font-size: 30px; font-weight: 900; letter-spacing: -.7px; margin: 6px 0 18px; }
.pos-qris__card { border: 1px solid var(--pos-border); border-radius: 20px; padding: 20px 18px; background: var(--pos-card); }
.pos-qris__brand { display: flex; justify-content: space-between; align-items: center; font-size: 19px; font-weight: 900; letter-spacing: 1px; margin-bottom: 14px; }
.pos-qris__brand .pos-icon { color: var(--pos-primary); }
#barcodeWrapper { position: relative; margin: 0 auto; width: min(224px,100%); aspect-ratio: 1; }
#barcodeImage { width: 100%; height: 100%; object-fit: contain; }
#qrAmount { color: var(--pos-primary); font-size: 23px; font-weight: 900; margin-top: 12px; }
#qrStatus { font-size: 12px; color: var(--pos-text-muted); margin-top: 6px; }
.pos-qris__status { margin: 16px auto 0; }
.pos-qris__hint { margin-top: 16px; color: var(--pos-text-muted); font-size: 12px; line-height: 1.7; }
.pos-qris__tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.pos-qris__tools .pos-button { min-height: 48px; padding: 10px; font-size: 12px; }
.pos-static-image { display: block; width: 100%; max-width: 290px; height: auto; margin: 16px auto; border-radius: 18px; }
#qris-static:not(.show) { display: none; }
.pos-success { z-index: 65; display: none; text-align: center; }
.pos-success.show { display: flex; }
.pos-success-symbol { margin: 6px auto 18px; width: 78px; height: 78px; border-radius: 50%; background: var(--pos-success-bg); color: var(--pos-success-text); display: flex; align-items: center; justify-content: center; }
.pos-success-symbol .pos-icon { width: 40px; height: 40px; }
#successAmount { font-size: 30px; font-weight: 900; color: var(--pos-text); margin: 10px 0 4px; }
#successTxId { color: var(--pos-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.pos-success-details { margin-top: 18px; text-align: left; }
.pos-success-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.pos-success-tools .pos-button { font-size: 12px; padding: 10px; }
#loginScreen { height: 100%; position: relative; background: var(--pos-primary); overflow-x: hidden; overflow-y: auto; }
.pos-login-content { position: relative; min-height: 100%; padding: 28px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.pos-login-form { width: 100%; max-width: 420px; padding: 24px 20px; border-radius: 22px; background: var(--pos-card); box-shadow: 0 12px 28px rgba(80,0,0,.14); }
.pos-login-decoration { position: absolute; pointer-events: none; }
.pos-login-decoration--circle { width: 220px; height: 220px; border-radius: 50%; background: var(--pos-accent-yellow); top: -70px; right: -60px; }
.pos-login-decoration--square { width: 90px; height: 90px; border-radius: 24px; background: var(--pos-accent-orange); transform: rotate(18deg); left: -40px; top: 26%; }
.pos-login-decoration--dot { width: 16px; height: 16px; border-radius: 50%; background: var(--pos-accent-yellow); top: 20%; left: 17%; }
.pos-login-brand { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pos-logo { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 26px; background: var(--pos-card); color: var(--pos-primary); box-shadow: 0 12px 28px rgba(80,0,0,.18); }
.pos-logo .pos-icon { width: 46px; height: 46px; stroke-width: 1.8; }
.pos-login-brand > strong { color: var(--pos-card); font-size: 40px; line-height: 1; font-weight: 900; letter-spacing: 5px; }
.pos-login-tagline { margin-top: -8px; color: var(--pos-card); font-size: 13px; font-weight: 600; letter-spacing: .3px; text-align: center; }
.pos-login-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pos-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; color: var(--pos-text-muted); }
.pos-checkbox input { width: 18px; height: 18px; accent-color: var(--pos-primary); }
.pos-dummy-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pos-dummy-fields legend { font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.pos-dummy-fields input[type="checkbox"], .pos-dummy-fields input[type="radio"] { width: 18px; height: 18px; accent-color: var(--pos-primary); }
.pos-dummy-choice { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.pos-footer-spacer { height: 70px; }
.loader { width: 30px; height: 30px; border: 3px solid var(--pos-primary-soft); border-top-color: var(--pos-primary); border-radius: 50%; animation: pos-spin .7s linear infinite; margin: 26px auto; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--pos-primary-soft); border-top-color: var(--pos-primary); border-radius: 50%; animation: pos-spin .7s linear infinite; }
.toast-container { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 100; pointer-events: none; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; background: var(--pos-text); color: var(--pos-card); border-radius: 14px; box-shadow: var(--pos-shadow); font-size: 12px; }
.toast.success { background: var(--pos-success-text); }
.toast.error { background: var(--pos-danger-text); }
.toast.warning { background: var(--pos-pending-text); }
.pos-diagnostics { display: none; }
.log-item { background: var(--pos-card); border-radius: 18px; padding: 14px; margin-top: 10px; }
.log-item .pos-log-status { background: var(--pos-danger-bg); }
.log-item.success .pos-log-status { background: var(--pos-success-bg); }
@keyframes pos-spin { to { transform: rotate(360deg); } }
@keyframes pos-sheet-enter { from { transform: translateY(24px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 600px) and (max-width: 1023px) {
    :root { --pos-page-gutter: 24px; }
    body { background: var(--pos-border); }
    .app-shell { width: 100%; max-width: none; }
    .pos-header__row { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .pos-header__actions { grid-column: auto; }
    .toast-container { max-width: 532px; margin-inline: auto; }
}
@media (min-width: 720px) and (max-width: 1023px) {
    .pos-menu-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .pos-report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pos-report-card:first-child { grid-column: auto; }
}
/* Laptop/desktop (>=1024px): tampil seperti HP, satu kolom di tengah. Layar lebih kecil memakai lebar penuh. */
@media (min-width: 1024px) {
    body { background: var(--pos-border); }
    .app-shell { width: 100%; max-width: 412px; margin-inline: auto; box-shadow: 0 0 0 1px rgba(35,38,79,.08), 0 24px 60px -12px rgba(35,38,79,.25); }
    .toast-container { max-width: 412px; margin-inline: auto; }
}
@media (max-width: 359px) {
    :root { --pos-page-gutter: 12px; }
    .pos-header__actions { gap: 5px; }
    .pos-header__actions .pos-icon-button { width: 44px; }
    .pos-merchant-button > .pos-icon { display: none; }
    .pos-stat { padding: 10px 6px; }
    .pos-stat > span { font-size: 9px; }
    .pos-product-row { gap: 7px; }
    .pos-product-actions { gap: 2px; }
    .pos-product-thumb { width: 48px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== product-grid ===== */
.pos-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 190px; }
.pos-product-grid .pos-empty { grid-column: 1 / -1; }

.pos-product-card { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 4px; padding: 12px; text-align: left; font: inherit; color: var(--pos-text);
    background: var(--pos-card); border: 1px solid transparent; border-radius: 20px; box-shadow: 0 2px 8px rgba(35,38,79,.05); cursor: pointer;
    -webkit-user-select: none; user-select: none; transition: transform .12s, border-color .15s, background .15s; }
.pos-product-card:active { transform: scale(.97); border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.pos-product-card:focus-visible { outline: 2px solid var(--pos-primary); outline-offset: 2px; }

.pos-card-name { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pos-card-price { font-size: 15px; font-weight: 800; color: var(--pos-primary); }
.pos-card-stock { font-size: 11px; color: var(--pos-text-muted); }
.pos-card-stock--out { color: var(--pos-danger-text); font-weight: 700; }
.pos-product-card--empty { opacity: .5; cursor: not-allowed; }

.pos-fly-chip { position: fixed; z-index: 9999; pointer-events: none; display: flex; align-items: center; justify-content: center; border-radius: 50%;
    font: 900 15px/1 Mulish, system-ui, sans-serif; color: #fff; background: var(--pos-primary); box-shadow: 0 8px 20px rgba(215,38,43,.45); will-change: transform, opacity; }

.pos-group-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; font-weight: 800; color: var(--pos-text); }
.pos-group-title:first-child { margin-top: 0; }
.pos-group-title span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--pos-primary-soft); color: var(--pos-primary-dark); }

/* ===== keyboard-fix ===== */
.pos-sheet { padding-bottom: var(--kb, 0px); }
.pos-detached-sheet { bottom: var(--kb, 0px); max-height: calc(100% - 28px - var(--kb, 0px)); }
.pos-sheet, .pos-detached-sheet { transition: padding-bottom .15s ease, bottom .15s ease; }

/* ===== pull-refresh ===== */
.pos-ptr { position: absolute; top: 0; left: 50%; z-index: 60; width: 40px; height: 40px; margin-left: -20px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--pos-card); color: var(--pos-primary); box-shadow: 0 6px 18px rgba(35,38,79,.22); pointer-events: none;
    transform: translateY(-56px); opacity: 0; transition: opacity .15s; }
.pos-ptr svg { width: 20px; height: 20px; transition: transform .1s linear; }
.pos-ptr.is-ready svg { color: var(--pos-primary-dark); }
.pos-ptr.is-releasing { transition: transform .22s ease, opacity .22s ease; }
.pos-ptr.is-loading svg { animation: pos-spin .8s linear infinite; }

/* ===== pos-features ===== */
/* Keranjang: ubah jumlah langsung */
.pos-cart-qty { display: inline-flex; align-items: center; gap: 6px; }
.pos-cart-qty .pos-icon-button { width: 34px; height: 34px; min-height: 34px; font-size: 18px; font-weight: 800; line-height: 1; }
.pos-cart-qty span { min-width: 18px; text-align: center; font-weight: 800; font-size: 13px; }

/* Filter & pencarian */
.pos-pill small { font-size: 10px; font-weight: 700; opacity: .7; margin-left: 2px; }
#historyList .pos-filter-miss, #productManageList .pos-search-miss { display: none !important; }
.pos-filter-on { position: relative; }
.pos-filter-on::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--pos-accent-yellow); box-shadow: 0 0 0 2px var(--pos-card); }

/* Laporan: grafik harian & QRIS vs Tunai */
.pos-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 12px; }
.pos-bars i { flex: 1; min-width: 2px; border-radius: 4px 4px 0 0; background: var(--pos-primary); }
.pos-bars i[data-empty="1"] { background: var(--pos-border); }
.pos-bars__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--pos-text-muted); margin-bottom: 6px; }
.pos-split { display: flex; flex-direction: column; gap: 14px; }
.pos-split__row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.pos-split__row span { color: var(--pos-text-muted); font-size: 12px; }
.pos-split__bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--pos-surface); overflow: hidden; }
.pos-split__bar span { display: block; height: 100%; border-radius: 99px; background: var(--pos-primary); }
.pos-split__row--cash .pos-split__bar span { background: var(--pos-accent-orange); }

/* Struk */
.pos-success-item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--pos-border); text-align: left; }
.pos-success-item strong { flex-shrink: 0; }

/* Tab kategori menempel di atas daftar produk saat menggulir */
.pos-cat-tabs { position: sticky; top: -18px; z-index: 6; margin: 0 calc(var(--pos-page-gutter) * -1) 12px; padding: 10px var(--pos-page-gutter); background: var(--pos-surface); }
.pos-cat-tabs .pos-pill { min-height: 38px; padding: 7px 14px; }
#qrisProductPreview { padding-bottom: 96px; }

/* Header rapi: baris 1 identitas + aksi, baris 2 bar merchant */
.pos-header.pos-header--clean { gap: 12px; }
.pos-header--clean .pos-header__row { display: flex; align-items: center; gap: 12px; }
.pos-header--clean .pos-avatar { width: 42px; height: 42px; flex: none; font-size: 14px; }
.pos-header--clean .pos-header__identity { flex: 1; min-width: 0; }
.pos-header--clean #welcomeUser { font-size: 17px; font-weight: 800; line-height: 1.25; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-header--clean .pos-header__sub { margin-top: 2px; font-size: 11px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-header--clean .pos-header__actions { display: flex; flex: none; align-items: center; gap: 8px; grid-column: auto; }
.pos-header--clean .pos-header__actions .pos-icon-button { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18); color: var(--pos-card); }
.pos-header--clean .pos-header__actions .pos-icon-button .pos-icon { width: 18px; height: 18px; }
.pos-language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; }
.pos-language-switch a { min-width: 30px; padding: 5px 6px; border-radius: 999px; color: var(--pos-card); font-size: 10px; font-weight: 800; text-align: center; text-decoration: none; }
.pos-language-switch a.is-active { background: var(--pos-card); color: var(--pos-primary); }

.pos-merchant-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 8px 10px 8px 12px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.12); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pos-merchant-bar:active { background: rgba(255,255,255,.2); }
.pos-merchant-bar__store { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.pos-merchant-bar__store .pos-icon { width: 18px; height: 18px; flex: none; }
.pos-merchant-bar__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-merchant-bar__name b { font-size: 13px; font-weight: 800; }
.pos-merchant-bar__end { display: flex; align-items: center; gap: 6px; flex: none; max-width: 55%; min-width: 0; }
.pos-merchant-bar__cta { padding: 7px 12px; border-radius: 999px; background: var(--pos-card); color: var(--pos-primary); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pos-merchant-bar__device { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; text-align: right; }
.pos-merchant-bar__device > span { max-width: 100%; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-merchant-bar__device > small { font-size: 10px; opacity: .85; white-space: nowrap; }
.pos-merchant-bar__chev { display: flex; }
.pos-merchant-bar__chev .pos-icon { width: 16px; height: 16px; }

/* Tab QRIS fokus ke produk: QR statis hanya tampil di layar bayar */
#view-pos #qris-static { display: none !important; }
.pos-pay-amount { display: block; margin-top: 4px; font-size: 22px; font-weight: 900; color: var(--pos-text); }

/* Add Custom Total / Fee / Service: tombol di tab QRIS + form di drawer */
.pos-custom-tile { width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1.5px dashed var(--pos-border); border-radius: 18px;
    background: var(--pos-card); color: var(--pos-text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.pos-custom-tile:active { border-color: var(--pos-primary); background: var(--pos-primary-soft); }
.pos-custom-tile__icon { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--pos-primary-soft); color: var(--pos-primary); font-size: 22px; font-weight: 800; line-height: 1; }
.pos-custom-tile strong { display: block; font-size: 14px; font-weight: 800; }
.pos-custom-tile small { display: block; margin-top: 2px; font-size: 11px; color: var(--pos-text-muted); }
.pos-custom-form { display: flex; flex-direction: column; gap: 10px; }
.pos-custom-row { display: flex; align-items: stretch; gap: 8px; }
.pos-custom-row .pos-input-wrap { flex: 1; min-width: 0; }
.pos-custom-row .pos-icon-button { flex: none; width: 52px; height: auto; min-height: 52px; border-radius: 14px; }
/* Judul "Produk" jadi elemen pertama yang terlihat di tab QRIS: cukup padding view, tanpa margin tambahan */
#view-pos > .pos-section-heading { margin-top: 0; }

/* Riwayat: bar filter menggantikan kolom cari */
.pos-filter-bar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin: 4px 0 14px; padding: 8px 12px; border: 1px solid var(--pos-border); border-radius: var(--pos-radius-input);
    background: var(--pos-card); color: var(--pos-text); font: inherit; text-align: left; cursor: pointer; }
.pos-filter-bar:active { background: var(--pos-surface); }
.pos-filter-bar__icon { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--pos-primary-soft); color: var(--pos-primary); }
.pos-filter-bar__icon .pos-icon { width: 18px; height: 18px; }
.pos-filter-bar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-filter-bar__text small { font-size: 10px; font-weight: 700; color: var(--pos-text-muted); text-transform: uppercase; letter-spacing: .4px; }
.pos-filter-bar__text span { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-filter-bar__chev { display: flex; color: var(--pos-text-muted); }
.pos-filter-bar__chev .pos-icon { width: 16px; height: 16px; }
.pos-filter-bar.pos-filter-on::after { top: 10px; right: 10px; }

/* Kode transaksi di layar QRIS */
.pos-txcode { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; font-size: 12px; color: var(--pos-text-muted); }
.pos-txcode code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--pos-text); background: var(--pos-surface); padding: 4px 8px; border-radius: 8px; word-break: break-all; user-select: all; }
.pos-txcode__copy { min-height: 30px; padding: 4px 12px; border: 1px solid var(--pos-border); border-radius: 999px; background: var(--pos-card); color: var(--pos-primary); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.pos-txcode__copy:active { background: var(--pos-primary-soft); }

/* Detail transaksi (klik dari riwayat) */
.pos-transaction[data-code] { cursor: pointer; }
.pos-transaction[data-code]:active { background: var(--pos-surface); }
.pos-tx-detail { display: flex; flex-direction: column; border: 1px solid var(--pos-border); border-radius: 16px; overflow: hidden; background: var(--pos-card); }
.pos-tx-detail__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--pos-border); }
.pos-tx-detail__row:last-child { border-bottom: 0; }
.pos-tx-detail__row > span { color: var(--pos-text-muted); flex: none; }
.pos-tx-detail__row > strong { min-width: 0; text-align: right; font-weight: 800; word-break: break-all; }
.pos-tx-detail__row code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.pos-tx-detail__row--total > strong { font-size: 18px; color: var(--pos-primary); }
