:root {
  --ink: #082c52;
  --muted: #657a91;
  --line: #dce5ef;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --green: #0a4d88;
  --green-dark: #073a6a;
  --green-soft: #e7f1fb;
  --orange: #397fb1;
  --orange-soft: #e8f4fb;
  --red: #b7423c;
  --shadow: 0 12px 32px rgba(22, 51, 42, .08);
}


* { box-sizing: border-box; }

body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); font-size: 14px; }

button, input { font: inherit; }

button { cursor: pointer; }

button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none !important; transform: none !important; }


.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }

.sidebar { background: linear-gradient(160deg, #06294d, #063a6a 58%, #082c52); color: #d8eaf8; padding: 20px 16px 18px; display: flex; flex-direction: column; min-height: 100vh; }

.brand { display: block; padding: 0 3px 25px; text-decoration: none; }
.brand-logo { display: block; width: 100%; height: 88px; object-fit: cover; object-position: center; border-radius: 10px; }

.nav-list { display: grid; gap: 6px; }
.nav-link { color: #c2d8ea; text-decoration: none; padding: 11px 12px; border-radius: 9px; display: flex; gap: 12px; align-items: center; font-weight: 600; }
.nav-link span { width: 17px; text-align: center; font-size: 18px; font-weight: 400; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-link.active { box-shadow: inset 3px 0 #81c6ec; }

.sidebar-footer { margin-top: auto; padding: 24px 3px 0; }
.store-chip { display: inline-flex; align-items: center; gap: 7px; color: #c1d9ec; font-size: 12px; margin: 0 7px 18px; }
.status-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: #73c5ec; }
.profile-button { border: 0; border-top: 1px solid rgba(255,255,255,.12); background: transparent; color: #fff; display: flex; align-items: center; width: 100%; padding: 17px 7px 0; gap: 10px; text-align: left; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #063a6a; font-weight: 700; background: #b8e1f5; }
.profile-button strong, .profile-button small { display: block; }
.profile-button strong { font-size: 13px; }
.profile-button small { color: #bdd7ea; font-size: 11px; padding-top: 2px; }
.profile-button b { margin-left: auto; color: #c2daec; }


.main-area { min-width: 0; }
.topbar { height: 92px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 36px; justify-content: space-between; }
.page-heading h1 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.5px; }
.eyebrow { text-transform: uppercase; color: var(--muted); font-size: 10px; letter-spacing: .8px; font-weight: 750; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.icon-button, .help-button, .mobile-menu { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; height: 38px; padding: 0 13px; }
.icon-button { width: 38px; padding: 0; position: relative; font-size: 17px; }
.notification-dot { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; border: 1px solid #fff; }
.help-button { font-weight: 650; }
.mobile-menu { display: none; }


.view { display: none; padding: 30px 36px 42px; }
.view.active { display: block; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; max-width: 1350px; margin: auto; }
.catalog-panel { min-width: 0; }
.catalog-header, .section-intro, .cart-title-row, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.catalog-header h2, .section-intro h2 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.catalog-header p, .section-intro p, .card-heading p { margin: 6px 0 0; color: var(--muted); }
.outline-button, .primary-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; white-space: nowrap; }
.primary-button { border-color: var(--green); color: #fff; background: var(--green); }
.search-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 11px; height: 45px; margin: 24px 0 16px; color: var(--muted); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box kbd, .checkout-button kbd { color: var(--muted); border: 1px solid var(--line); background: #fafcff; padding: 2px 5px; border-radius: 4px; font-size: 10px; font-family: inherit; }
.category-row { display: flex; gap: 8px; overflow: auto; padding: 1px 0 5px; }
.category { border: 0; border-radius: 20px; color: #47667f; background: #e8f1f8; padding: 7px 12px; font-size: 12px; font-weight: 700; }
.category.active { color: #fff; background: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 17px; }
.product-card { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px; text-align: left; box-shadow: 0 2px 6px rgba(8,44,82,.02); transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-photo { height: 112px; border-radius: 8px; display: grid; place-items: center; font-size: 44px; margin-bottom: 11px; }
.product-card small, .product-card strong { display: block; }
.product-card small { color: var(--muted); font-size: 11px; }
.product-card strong { margin-top: 5px; font-size: 14px; }
.product-card .price { color: var(--green); font-size: 13px; }
.photo-kopi { background: #e9f0f8; }
.photo-makanan { background: #edf4fa; }
.photo-minuman { background: #e2f3fa; }
.no-products { grid-column: 1 / -1; text-align: center; padding: 36px 0; color: var(--muted); }


.cart-panel { background: var(--surface); min-height: calc(100vh - 152px); border: 1px solid var(--line); border-radius: 13px; padding: 21px; display: flex; flex-direction: column; box-shadow: 0 4px 18px rgba(8,44,82,.04); }
.cart-title-row h2 { margin: 4px 0 0; font-size: 17px; }
.text-button { color: var(--green); border: 0; background: transparent; padding: 3px; font-weight: 700; }
.customer-select { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 11px; margin: 19px 0 13px; text-align: left; color: var(--ink); }
.customer-icon { background: var(--green-soft); color: var(--green); width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; }
.customer-select small, .customer-select strong { display: block; }
.customer-select small { color: var(--muted); font-size: 10px; }
.customer-select strong { font-size: 12px; padding-top: 2px; }
.customer-select b { color: var(--muted); margin-left: auto; font-size: 20px; font-weight: 400; }
.cart-items { display: grid; gap: 13px; }
.cart-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.cart-item .thumb { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 20px; }
.cart-item strong, .cart-item small { display: block; }
.cart-item strong { font-size: 12px; }
.cart-item small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.item-actions { text-align: right; }
.item-actions strong { color: var(--green); margin-bottom: 5px; }
.quantity-control { display: flex; justify-content: end; gap: 6px; align-items: center; }
.quantity-control button { border: 1px solid var(--line); background: #fff; color: var(--ink); width: 21px; height: 21px; border-radius: 5px; line-height: 1; }
.quantity-control span { font-variant-numeric: tabular-nums; min-width: 14px; text-align: center; font-size: 12px; }
.empty-cart { margin: auto 0; text-align: center; color: var(--muted); }
.empty-cart span { display: block; color: #9bbbd5; font-size: 32px; }
.empty-cart p { font-weight: 700; color: #4f6d86; margin: 8px 0 3px; }
.empty-cart small { font-size: 12px; }
.cart-bottom { margin-top: auto; }
.note-field { display: flex; align-items: center; border-top: 1px solid var(--line); padding: 15px 0; gap: 11px; color: var(--muted); font-size: 12px; }
.note-field input { min-width: 0; flex: 1; border: 0; outline: 0; text-align: right; color: var(--ink); }
.totals { margin: 0; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 650; }
.discount-button { background: transparent; border: 0; color: var(--green); padding: 0; font-size: 12px; font-weight: 700; }
.totals .grand-total { margin-top: 9px; padding-top: 13px; border-top: 1px dashed #c8d9e9; align-items: center; }
.grand-total dt { color: var(--ink); font-size: 15px; font-weight: 750; }
.grand-total dd { font-size: 22px; color: var(--green); letter-spacing: -.5px; }
.checkout-button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 9px; background: var(--green); color: #fff; padding: 13px 14px; font-weight: 750; margin-top: 16px; }
.checkout-button span { margin-left: auto; margin-right: 13px; }
.checkout-button kbd { background: rgba(255,255,255,.12); color: #e4f1fa; border-color: rgba(255,255,255,.22); }
.checkout-button:disabled { background: #b8cadc; cursor: not-allowed; }


.section-intro { max-width: 1250px; margin: 0 auto 23px; }
.section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-intro .section-actions .primary-button { width: auto; }
.metric-grid { max-width: 1250px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.metric-card, .report-card, .data-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.metric-card { padding: 18px; }
.metric-card p { color: var(--muted); margin: 0; font-size: 12px; }
.metric-card strong { display: block; margin: 9px 0 7px; font-size: 20px; letter-spacing: -.5px; }
.metric-card small { color: var(--muted); }
.metric-card .up { color: var(--green); }
.metric-card .warning { color: var(--orange); }
.dashboard-grid { max-width: 1250px; margin: 17px auto; display: grid; grid-template-columns: 1.35fr .9fr; gap: 17px; }
.report-card { padding: 20px; }
.card-heading h3 { margin: 0; font-size: 15px; }
.card-heading p { font-size: 12px; }
.mini-chart { height: 185px; display: flex; align-items: end; gap: 13px; padding: 20px 8px 6px; border-bottom: 1px solid var(--line); }
.mini-chart span { flex: 1; background: #c4e2d7; border-radius: 4px 4px 0 0; }
.mini-chart span:nth-child(6) { background: var(--green); }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding: 9px 4px 0; }
.rank-list { padding: 5px 0 0; margin: 11px 0 0; list-style: none; counter-reset: rank; }
.rank-list li { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border: 0; }
.rank-list b { color: var(--muted); font-size: 12px; }
.rank-list span { font-weight: 650; }
.rank-list strong { color: var(--green); font-size: 12px; }


.table-toolbar { max-width: 1250px; margin: 0 auto 16px; display: flex; align-items: center; gap: 10px; }
.search-box.compact { height: 38px; flex: 1; max-width: 360px; margin: 0; }
.data-card { max-width: 1250px; margin: 0 auto; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 650px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; font-weight: 750; background: #fbfcfc; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.stock-good { color: var(--green); }
.stock-low { color: var(--orange); }
.badge { font-size: 11px; padding: 4px 8px; border-radius: 12px; font-weight: 700; }
.badge.success { background: var(--green-soft); color: var(--green); }
.empty-state { margin-top: 10px; padding: 62px 24px; text-align: center; }
.empty-state > span { color: var(--green); font-size: 35px; }
.empty-state h3 { margin: 12px 0 6px; }
.empty-state p { max-width: 360px; margin: auto; color: var(--muted); }
.report-links { max-width: 860px; margin: 0 auto; display: grid; gap: 11px; }
.report-links button { border: 1px solid var(--line); background: #fff; border-radius: 10px; text-align: left; padding: 16px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; color: var(--ink); }
.report-links button > span { color: var(--green); font-size: 22px; }
.report-links strong, .report-links small { display: block; }
.report-links small { color: var(--muted); padding-top: 3px; }
.report-links b { color: var(--muted); font-size: 22px; font-weight: 400; }


.master-stock-card { max-width: 1250px; margin: 0 auto 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.master-stock-head { display: flex; justify-content: space-between; gap: 20px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.master-stock-head h3 { margin: 5px 0; font-size: 16px; }
.master-stock-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.stock-total { text-align: right; }
.stock-total small, .stock-total span { display: block; color: var(--muted); font-size: 11px; }
.stock-total strong { display: block; color: var(--green); font-size: 20px; margin: 4px 0; }
.unit-levels { display: grid; grid-template-columns: repeat(4, 1fr); }
.unit-level { padding: 16px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; min-width: 0; border-right: 1px solid var(--line); }
.unit-level:last-child { border-right: 0; }
.unit-level.primary { background: #f7fbf9; }
.unit-number { align-self: start; color: var(--green); background: var(--green-soft); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 11px; font-weight: 750; }
.unit-level strong, .unit-level small { display: block; }
.unit-level strong { font-size: 13px; }
.unit-level small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 3px; }
.unit-value { grid-column: 2; color: var(--green); font-size: 13px; font-weight: 750; }
.unit-value small { font-weight: 500; }

.purchase-grid, .production-grid, .promo-layout { max-width: 1250px; margin: 0 auto 17px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 17px; }
.purchase-form, .batch-card, .recipe-card, .promo-form { padding: 20px; }
.purchase-form .card-heading, .batch-card .card-heading, .recipe-card .card-heading, .promo-form .card-heading { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid label, .full-field, .report-filter label { color: var(--muted); font-size: 11px; font-weight: 700; }
.form-grid input, .form-grid select, .full-field input, .report-filter select { display: block; width: 100%; min-height: 38px; margin-top: 6px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; outline-color: var(--green); }
.purchase-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; }
.hpp-card { padding: 21px; background: #123f35; color: #fff; border-radius: 12px; }
.hpp-card h3 { margin: 6px 0 19px; }
.hpp-card .eyebrow { color: #a9d3c5; }
.hpp-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: #d2e4de; border-bottom: 1px solid rgba(255,255,255,.13); }
.hpp-row strong { color: #fff; }
.hpp-row.input { color: #f3bd82; }
.hpp-result { padding: 17px 0 10px; }
.hpp-result span, .hpp-result strong, .hpp-result small { display: block; }
.hpp-result span { color: #b7d3ca; font-size: 12px; }
.hpp-result strong { font-size: 24px; margin: 3px 0; color: #fff; }
.hpp-result small, .helper-text { color: #a7c9be; font-size: 11px; }
.helper-text { line-height: 1.5; margin: 9px 0 0; }
.purchase-lines { margin-top: 0; }

.batch-flow { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr; align-items: center; gap: 8px; padding: 19px 0; }
.batch-flow > span { color: var(--green); font-size: 19px; text-align: center; }
.batch-flow div { min-height: 83px; padding: 13px; background: #f7faf8; border-radius: 9px; }
.batch-flow small, .batch-flow strong { display: block; }
.batch-flow small { color: var(--muted); font-size: 11px; }
.batch-flow strong { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.production-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.recipe-list { display: grid; gap: 0; }
.recipe-list div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.recipe-list span { font-weight: 650; }
.recipe-list small { color: var(--muted); grid-column: 1; font-size: 11px; }
.recipe-list strong { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--green); }
.recipe-total { display: flex; justify-content: space-between; padding-top: 15px; font-weight: 750; }
.recipe-total strong { color: var(--green); font-size: 18px; }

.promo-layout { grid-template-columns: minmax(0, 1fr) 320px; }
.full-field { display: block; margin-bottom: 14px; }
.promo-type-row { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.promo-type { border: 1px solid var(--line); border-radius: 20px; padding: 7px 10px; color: #53645e; background: #fff; font-weight: 700; font-size: 12px; }
.promo-type.active { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.check-line { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-top: 16px; font-size: 12px; }
.promo-preview { border-radius: 12px; padding: 25px; color: #fff; background: linear-gradient(155deg, #176b55, #123f35); }
.promo-preview .eyebrow { color: #b3d6cb; }
.promo-icon { display: grid; place-items: center; color: #143f34; background: #f3b166; width: 42px; height: 42px; border-radius: 12px; margin-top: 24px; font-size: 22px; }
.promo-preview h3 { font-size: 26px; margin: 15px 0 7px; }
.promo-preview > p:not(.eyebrow) { margin: 0; color: #c5ded6; line-height: 1.5; }
.promo-preview > div { margin-top: 44px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; display: flex; justify-content: space-between; font-size: 12px; color: #c5ded6; }
.promo-preview > div strong { color: #fff; }

.report-filter { max-width: 1250px; margin: 0 auto 16px; padding: 15px; display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)) auto; align-items: end; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.report-filter select { min-height: 36px; }
.report-filter .text-button { align-self: center; margin-top: 14px; white-space: nowrap; }
.report-metrics { max-width: 1250px; margin: 0 auto 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.report-metrics article { background: var(--surface); border: 1px solid var(--line); padding: 16px; border-radius: 10px; }
.report-metrics small, .report-metrics span { display: block; color: var(--muted); font-size: 11px; }
.report-metrics strong { display: block; color: var(--green); font-size: 19px; margin: 7px 0 5px; }
.report-table { margin-bottom: 17px; }
.compact-links { max-width: 1250px; grid-template-columns: repeat(3, 1fr); }
.compact-links button { min-width: 0; }


.payment-dialog { width: min(420px, calc(100% - 30px)); border: 0; border-radius: 14px; padding: 25px; color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.payment-dialog::backdrop { background: rgba(20, 48, 40, .38); }
.payment-dialog h2 { margin: 5px 0 23px; font-size: 30px; color: var(--green); }
.dialog-close { float: right; border: 0; background: transparent; font-size: 24px; color: var(--muted); }
.payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.payment-method { border: 1px solid var(--line); border-radius: 8px; padding: 11px 7px; background: #fff; color: var(--muted); }
.payment-method span { display: block; font-size: 11px; padding-top: 5px; }
.payment-method.active { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 700; }
.amount-field { display: block; margin: 18px 0; }
.amount-field span { display: block; font-size: 12px; color: var(--muted); padding-bottom: 6px; }
.amount-field input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px; outline-color: var(--green); }
.change-row { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.change-row span { color: var(--muted); }
.change-row strong { color: var(--green); }
.toast { visibility: hidden; opacity: 0; position: fixed; bottom: 20px; right: 20px; background: #173e35; color: #fff; border-radius: 9px; padding: 12px 15px; box-shadow: var(--shadow); transition: opacity .2s, visibility .2s; }
.toast.show { visibility: visible; opacity: 1; }


/* ON Coffee & Tea theme and product-image sprites */
.mini-chart span { background: #bfdef1; }
.unit-level.primary, .batch-flow div { background: #f3f8fd; }
.promo-type { color: #47667f; }
.hpp-card { background: linear-gradient(155deg, #073a6a, #06294d); }
.hpp-card .eyebrow, .hpp-result small, .helper-text { color: #bcd9ee; }
.hpp-row { color: #d5e8f5; }
.hpp-row.input { color: #8fd0ed; }
.hpp-result span { color: #c2def0; }
.promo-preview { background: linear-gradient(155deg, #0a4d88, #06294d); }
.promo-preview .eyebrow, .promo-preview > p:not(.eyebrow), .promo-preview > div { color: #c9e3f2; }
.promo-icon { color: #063a6a; background: #8ecfea; }
.payment-dialog::backdrop { background: rgba(8,44,82,.38); }
.toast { background: #073a6a; }

.sprite { display: block; background-color: #f1f2f2; background-repeat: no-repeat; }
.product-photo.sprite { height: 128px; background-color: #f1f2f2; }
.cart-item .thumb.sprite { background-color: #f1f2f2; }

.legacy-0, .legacy-1, .legacy-2, .legacy-3, .legacy-4, .legacy-5, .legacy-6, .legacy-7, .legacy-8, .legacy-9, .legacy-10, .legacy-11, .legacy-12, .legacy-13 { background-image: url("assets/legacy-cups-sprite.png"); background-size: 400% 400%; }

.legacy-0 { background-position: 0% 0%; }
.legacy-1 { background-position: 33.333% 0%; }
.legacy-2 { background-position: 66.667% 0%; }
.legacy-3 { background-position: 100% 0%; }

.legacy-4 { background-position: 0% 33.333%; }
.legacy-5 { background-position: 33.333% 33.333%; }
.legacy-6 { background-position: 66.667% 33.333%; }
.legacy-7 { background-position: 100% 33.333%; }

.legacy-8 { background-position: 0% 66.667%; }
.legacy-9 { background-position: 33.333% 66.667%; }
.legacy-10 { background-position: 66.667% 66.667%; }
.legacy-11 { background-position: 100% 66.667%; }

.legacy-12 { background-position: 0% 100%; }
.legacy-13 { background-position: 33.333% 100%; }

.house-0, .house-1, .house-2, .house-3 { background-image: url("assets/house-blend-cups-sprite.png"); background-size: 200% 200%; }
.house-0 { background-position: 0% 0%; }
.house-1 { background-position: 100% 0%; }
.house-2 { background-position: 0% 100%; }
.house-3 { background-position: 100% 100%; }


@media (max-width: 1120px) { .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.pos-layout { grid-template-columns: minmax(0, 1fr) 350px; }
.view { padding: 25px; }
.topbar { padding: 0 25px; }
.metric-grid { grid-template-columns: repeat(2, 1fr); }
.unit-levels { grid-template-columns: repeat(2, 1fr); }
.unit-level:nth-child(2) { border-right: 0; }
.unit-level:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.report-filter { grid-template-columns: repeat(3, 1fr); }
.purchase-grid, .production-grid, .promo-layout { grid-template-columns: 1fr; }
.hpp-card { min-height: 260px; }
 }

@media (max-width: 850px) { .app-shell { grid-template-columns: 1fr; }
.sidebar { display: none; }
.topbar { height: 76px; padding: 0 18px; }
.mobile-menu { display: inline-block; margin-right: 10px; }
.topbar .page-heading { margin-right: auto; }
.topbar-actions .help-button { display: none; }
.view { padding: 20px 18px; }
.pos-layout { grid-template-columns: 1fr; }
.cart-panel { min-height: 450px; }
.product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.dashboard-grid { grid-template-columns: 1fr; }
.section-intro { margin-bottom: 18px; }
 }

@media (max-width: 560px) { .page-heading h1 { font-size: 18px; }
.eyebrow { font-size: 9px; }
.catalog-header, .section-intro { flex-direction: column; }
.catalog-header .outline-button, .section-intro .primary-button { width: 100%; }
.section-intro .section-actions { width: 100%; }
.section-intro .section-actions button { flex: 1; width: auto; }
.product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-photo { height: 88px; }
.product-card { padding: 8px; }
.product-card strong { font-size: 12px; }
.metric-grid { grid-template-columns: 1fr; }
.cart-panel { padding: 17px; }
.view { padding: 17px 13px; }
.topbar { padding: 0 13px; }
.catalog-header p, .section-intro p { font-size: 12px; }
.table-toolbar { flex-wrap: wrap; }
.search-box.compact { min-width: 100%; }
.report-card { padding: 16px; }
.master-stock-head { flex-direction: column; }
.stock-total { text-align: left; }
.unit-levels { grid-template-columns: 1fr; }
.unit-level, .unit-level:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
.unit-level:last-child { border-bottom: 0; }
.form-grid { grid-template-columns: 1fr; }
.purchase-actions { justify-content: stretch; }
.purchase-actions button { flex: 1; }
.batch-flow { grid-template-columns: 1fr; gap: 8px; }
.batch-flow > span { transform: rotate(90deg); }
.production-footer { align-items: flex-start; flex-direction: column; }
.report-filter { grid-template-columns: 1fr 1fr; }
.report-filter .text-button { margin-top: 0; align-self: end; }
.report-metrics, .compact-links { grid-template-columns: 1fr; }
 }


/* Promo, membership, and fixed POS work areas */
.span-all { grid-column: 1 / -1; }
.promo-profit-card { max-width: 1250px; margin: 0 auto 17px; padding: 20px; }
.promo-profit-card .card-heading { margin-bottom: 13px; }
.promo-profit-card .right { white-space: nowrap; }
.membership-grid { max-width: 1250px; margin: 0 auto 17px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 17px; }
.member-card { padding: 24px; min-height: 260px; background: linear-gradient(155deg, #0a4d88, #06294d); color: #fff; border-radius: 12px; }
.member-card .eyebrow { color: #bcd9ee; }
.member-card h3 { margin: 8px 0 10px; font-size: 18px; }
.member-tier { display: inline-block; border: 1px solid rgba(255,255,255,.25); color: #dceefa; border-radius: 12px; padding: 4px 8px; font-size: 11px; font-weight: 700; }
.member-card > strong { display: block; margin: 33px 0 6px; color: #fff; font-size: 31px; letter-spacing: -.8px; }
.member-card > strong small { font-size: 13px; color: #c5e1f1; letter-spacing: 0; }
.member-card > p:not(.eyebrow) { color: #c5e1f1; margin: 0; font-size: 12px; line-height: 1.5; }
.membership-form, .point-simulator, .member-ledger { padding: 20px; }
.membership-form .card-heading, .point-simulator .card-heading, .member-ledger .card-heading { margin-bottom: 18px; }
.preview-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.point-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.point-result div { padding: 12px; background: #f3f8fd; border-radius: 8px; }
.point-result span, .point-result strong { display: block; }
.point-result span { color: var(--muted); font-size: 11px; }
.point-result strong { color: var(--green); margin-top: 5px; }
.member-ledger ul { list-style: none; padding: 0; margin: 0; }
.member-ledger li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-ledger li:last-child { border-bottom: 0; }
.member-ledger li span { color: var(--muted); font-size: 12px; }
.member-ledger li strong { color: var(--green); }
.member-ledger li strong.spent { color: var(--red); }

@media (min-width: 851px) { #kasir.view.active { height: calc(100vh - 92px); padding: 0; overflow: hidden; }
 #kasir .pos-layout { height: 100%; max-width: none; margin: 0; gap: 0; grid-template-columns: minmax(0, 1fr) 390px; }
 #kasir .catalog-panel { min-height: 0; padding: 30px 36px 28px; display: flex; flex-direction: column; overflow: hidden; }
 #kasir .product-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; padding: 1px 6px 12px 1px; margin-bottom: 0; }
 #kasir .cart-panel { height: 100%; min-height: 0; overflow: hidden; border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; box-shadow: none; }
 #kasir .cart-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; padding-right: 4px; }
 #kasir .cart-items:empty { flex: 0 1 auto; }
 #kasir .empty-cart { margin: auto 0; }
 }

@media (max-width: 850px) { .membership-grid, .preview-grid { grid-template-columns: 1fr; }
.point-result { grid-template-columns: 1fr; }
.promo-profit-card { padding: 16px; }
 }


/* Per-item drink modifiers */
.modify-item { display: block; margin-top: 4px; padding: 0; color: var(--green); background: transparent; border: 0; font-size: 11px; font-weight: 750; }
.modifier-dialog { width: min(520px, calc(100% - 30px)); border: 0; border-radius: 14px; padding: 24px; color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.modifier-dialog::backdrop { background: rgba(8,44,82,.38); }
.modifier-dialog h2 { margin: 5px 0 2px; font-size: 22px; }
.modifier-product-name { margin: 0 0 19px; color: var(--muted); font-size: 12px; }
.modifier-group { border: 0; border-top: 1px solid var(--line); padding: 15px 0 0; margin: 15px 0 0; }
.modifier-group legend { padding: 0 6px 0 0; color: var(--ink); font-size: 13px; font-weight: 750; }
.modifier-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.modifier-options label, .addon-options label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px; color: var(--ink); font-size: 12px; }
.modifier-options label { justify-content: center; }
.modifier-options input, .addon-options input { accent-color: var(--green); }
.addon-options { display: grid; gap: 8px; margin-top: 9px; }
.addon-options label span { flex: 1; }
.addon-options label strong { color: var(--green); font-size: 12px; }
.modifier-summary { display: flex; justify-content: space-between; margin-top: 16px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.modifier-summary span { color: var(--muted); }
.modifier-summary strong { color: var(--green); font-size: 17px; }

@media (max-width: 560px) { .modifier-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modifier-dialog { padding: 19px; }
 }


/* Login, outlet switching, and per-role access settings */
.outlet-control { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 9px 0 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 750; }
.outlet-control select { min-width: 102px; color: var(--ink); background: transparent; border: 0; outline: 0; font: inherit; font-weight: 750; }
.outlet-control[hidden] { display: none; }

.login-dialog { width: min(590px, calc(100% - 30px)); padding: 25px; color: var(--ink); border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.login-dialog::backdrop { background: rgba(8,44,82,.42); }
.login-dialog h2 { margin: 5px 0 21px; font-size: 26px; }
.login-name { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.login-name input { display: block; width: 100%; min-height: 40px; margin-top: 6px; padding: 8px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; outline-color: var(--green); }
.role-picker { padding: 16px 0 0; margin: 17px 0 0; border: 0; border-top: 1px solid var(--line); }
.role-picker legend { padding: 0 8px 0 0; font-size: 13px; font-weight: 750; }
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.role-option { min-height: 43px; padding: 6px; color: #47667f; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 750; }
.role-option.active { color: #fff; background: var(--green); border-color: var(--green); box-shadow: 0 5px 12px rgba(8,44,82,.16); }
.role-description { min-height: 38px; margin: 17px 0 0; color: var(--muted); line-height: 1.5; }
.outlet-login-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0; padding: 11px 12px; color: #265b87; background: var(--green-soft); border-radius: 8px; font-size: 12px; }
.outlet-login-note span { font-weight: 750; }
.outlet-login-note strong { text-align: right; font-size: 11px; }
.outlet-login-note[hidden] { display: none; }

.access-grid { max-width: 1250px; margin: 0 auto 17px; display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 17px; }
.access-form { padding: 20px; }
.access-form .card-heading { margin-bottom: 17px; }
.permission-set { margin: 17px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
.permission-set legend { padding: 0 7px; font-size: 12px; font-weight: 750; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-grid label { display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 8px 9px; color: #3f5f77; background: #f7fafc; border-radius: 7px; font-size: 12px; font-weight: 650; }
.permission-grid input { accent-color: var(--green); }
.access-summary { padding: 24px; color: #fff; background: linear-gradient(155deg, #0a4d88, #06294d); border-radius: 12px; }
.access-summary .eyebrow { color: #bcd9ee; }
.access-summary h3 { margin: 8px 0 8px; font-size: 23px; }
.access-summary > p:not(.eyebrow) { min-height: 57px; margin: 0 0 25px; color: #c9e3f2; line-height: 1.55; font-size: 12px; }
.access-summary > div { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.16); color: #c9e3f2; font-size: 12px; }
.access-summary strong { color: #fff; text-align: right; }
.permission-yes { color: var(--green); font-size: 16px; font-weight: 800; }
.permission-no { color: #a6b5c1; font-size: 14px; }

@media (max-width: 850px) { .access-grid { grid-template-columns: 1fr; }
.outlet-control span { display: none; }
.outlet-control select { min-width: 84px; }
.role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 }

@media (max-width: 560px) { .topbar-actions { gap: 6px; }
.outlet-control { padding: 0 6px; }
.outlet-control select { min-width: 72px; font-size: 10px; }
.login-dialog { padding: 19px; }
.permission-grid { grid-template-columns: 1fr; }
.access-form { padding: 16px; }
.outlet-login-note { align-items: flex-start; flex-direction: column; }
.outlet-login-note strong { text-align: left; }
 }


/* Foldable phones and tablets: keep order summary on-screen while each list scrolls on its own. */
@media (max-width: 850px) {
  .topbar { overflow: hidden; }

  .topbar .page-heading { min-width: 0; }

  .topbar .page-heading h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .topbar-actions { flex: 0 0 auto; }

  #kasir.view.active { height: calc(100vh - 76px); height: calc(100dvh - 76px); min-height: 0; padding: 0; overflow: hidden; }

  #kasir .pos-layout { height: 100%; min-height: 0; margin: 0; gap: 0; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) clamp(252px, 38dvh, 320px); }

  #kasir .catalog-panel { display: flex; flex-direction: column; min-height: 0; padding: 16px 16px 12px; overflow: hidden; }

  #kasir .catalog-header { flex: 0 0 auto; align-items: center; }

  #kasir .catalog-header p { display: none; }

  #kasir .catalog-header h2 { font-size: 18px; }

  #kasir .catalog-header .outline-button { min-height: 34px; padding: 0 10px; font-size: 12px; }

  #kasir .search-box { flex: 0 0 auto; height: 40px; margin: 10px 0; }

  #kasir .category-row { flex: 0 0 auto; min-height: 37px; overflow-x: auto; overflow-y: hidden; padding: 1px 0 6px; scrollbar-width: thin; }

  #kasir .category { flex: 0 0 auto; white-space: nowrap; }

  #kasir .product-grid { flex: 1 1 auto; min-height: 0; margin: 6px 0 0; padding: 1px 4px 10px 1px; overflow-y: auto; overscroll-behavior: contain; align-content: start; }

  #kasir .cart-panel { height: 100%; min-height: 0; padding: 15px 16px; overflow: hidden; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: 0 -6px 18px rgba(8,44,82,.05); }

  #kasir .customer-select { flex: 0 0 auto; margin: 10px 0; padding: 8px 10px; }

  #kasir .cart-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; padding-right: 3px; }

  #kasir .cart-bottom { flex: 0 0 auto; }

  #kasir .note-field { padding: 9px 0; }

  #kasir .grand-total { margin-top: 5px; padding-top: 8px; }

  #kasir .checkout-button { margin-top: 10px; padding: 11px 13px; }

}

@media (max-width: 850px) and (max-height: 640px) {
  .topbar { height: 64px; }

  #kasir.view.active { height: calc(100vh - 64px); height: calc(100dvh - 64px); }

  #kasir .pos-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 40vw); grid-template-rows: minmax(0, 1fr); }

  #kasir .catalog-panel { padding: 12px 14px; }

  #kasir .catalog-header .outline-button, #kasir .catalog-header p { display: none; }

  #kasir .cart-panel { border-top: 0; border-left: 1px solid var(--line); padding: 12px 14px; }

  #kasir .customer-select { margin: 7px 0; }

  #kasir .note-field { display: none; }

  #kasir .checkout-button { margin-top: 7px; }

}

@media (max-width: 560px) {
  .topbar .eyebrow, .topbar-actions .icon-button { display: none; }

  .topbar .page-heading h1 { font-size: 17px; }

  #kasir .catalog-panel { padding: 13px 13px 10px; }

  #kasir .catalog-header .outline-button { display: none; }

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

  #kasir .product-photo.sprite { height: 98px; }

  #kasir .cart-panel { padding: 13px; }

  #kasir .note-field { display: none; }

  #kasir .cart-item { grid-template-columns: 34px 1fr auto; gap: 8px; }

  #kasir .cart-item .thumb { width: 34px; height: 34px; }

  #kasir .grand-total dd { font-size: 20px; }

}


/* Mobile navigation drawer and compact help control. */
@media (max-width: 850px) {
  .app-shell > .sidebar { display: flex; position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(294px, 84vw); min-height: 100vh; min-height: 100dvh; padding: 20px 16px 18px; overflow-y: auto; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 16px 0 42px rgba(2,25,48,.28); }

  .app-shell > .sidebar.is-open { transform: translateX(0); }

  .mobile-nav-backdrop { position: fixed; z-index: 59; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(2,24,46,.46); cursor: default; }

  .mobile-nav-backdrop[hidden] { display: none; }

  body.mobile-nav-open { overflow: hidden; }

  .topbar-actions .help-button { display: inline-grid; place-items: center; }

}

@media (max-width: 470px) {
  .topbar-actions .help-button { width: 38px; padding: 0; font-size: 0; }

  .topbar-actions .help-button::before { content: "?"; font-size: 16px; font-weight: 800; }

}


/* Product sprite cells are square; keeping their viewport square prevents the cups and flavour markers from stretching. */
.product-card .product-photo.sprite { width: min(100%, 128px); height: auto; aspect-ratio: 1 / 1; margin: 0 auto 11px; background-size: 400% 400%; }

.product-card .product-photo.house-0, .product-card .product-photo.house-1, .product-card .product-photo.house-2, .product-card .product-photo.house-3 { background-size: 200% 200%; }

@media (max-width: 560px) { .product-card .product-photo.sprite { width: min(100%, 102px); margin-bottom: 9px; }
 }


/* Portrait POS: the current order behaves as a bottom sheet, not a second page below the menu. */
.cart-sheet-toggle { display: none; }

@media (max-width: 850px) and (min-height: 641px) {
  #kasir .pos-layout { position: relative; display: block; }

  #kasir .catalog-panel { height: 100%; padding-bottom: 78px; }

  #kasir .cart-panel { position: absolute; z-index: 20; right: 0; bottom: 0; left: 0; height: min(70dvh, 530px); min-height: 0; padding: 0 16px 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(8,44,82,.16); transform: translateY(calc(100% - 68px)); transition: transform .26s cubic-bezier(.2,.8,.2,1); will-change: transform; }

  #kasir .cart-panel.sheet-open { transform: translateY(0); }

  .cart-sheet-toggle { display: grid; grid-template-columns: 1fr auto 18px; align-items: end; column-gap: 10px; position: relative; flex: 0 0 68px; width: calc(100% + 32px); height: 68px; margin: 0 -16px; padding: 24px 16px 10px; color: var(--ink); background: transparent; border: 0; text-align: left; }

  .sheet-grip { position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; border-radius: 99px; background: #bed0e0; transform: translateX(-50%); }

  .sheet-order small, .sheet-order strong { display: block; }
.sheet-order small { color: var(--muted); font-size: 10px; font-weight: 700; }
.sheet-order strong { margin-top: 2px; font-size: 13px; }
.sheet-total { color: var(--green); font-size: 16px; }
.sheet-chevron { align-self: center; color: var(--muted); font-size: 18px; line-height: 1; transform: rotate(0); transition: transform .2s ease; }

  #kasir .cart-panel.sheet-open .sheet-chevron { transform: rotate(180deg); }

  #kasir .cart-panel .cart-title-row { flex: 0 0 auto; }

  #kasir .cart-panel .cart-items { padding-top: 3px; }

  #kasir .cart-panel .empty-cart { flex: 1 1 auto; }

}

@media (max-width: 560px) and (min-height: 641px) {
  #kasir .cart-panel { height: min(74dvh, 520px); padding-right: 13px; padding-left: 13px; transform: translateY(calc(100% - 66px)); }

  .cart-sheet-toggle { width: calc(100% + 26px); height: 66px; flex-basis: 66px; margin: 0 -13px; padding-right: 13px; padding-left: 13px; }

}


/* Live membership balance shown wherever a cashier chooses a member. */
.customer-select > span:nth-child(2) { min-width: 0; }
.customer-points-summary { display:block; margin-top:3px; overflow:hidden; color:#638298; font-size:10px; font-style:normal; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.checkout-points-summary { display:grid; grid-template-columns:auto 1fr; gap:3px 10px; margin:14px 0; padding:11px 12px; color:#526f84; border:1px solid #cce3ef; border-radius:9px; background:#f1f9fc; font-size:11px; }
.checkout-points-summary span { grid-row:span 2; color:#08705b; font-weight:800; }
.checkout-points-summary strong { color:#173e5b; font-size:13px; }
.checkout-points-summary b { color:#08705b; font-size:11px; }


/* Cashier point redemption stays above the independently scrolling order lines. */
.cashier-point-panel { flex: 0 0 auto; margin: -2px 0 11px; border: 1px solid #cce3ef; border-radius: 9px; background: #f6fbfe; overflow: hidden; }
.cashier-point-panel details { min-width: 0; }
.cashier-point-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; color: var(--ink); cursor: pointer; list-style: none; }
.cashier-point-panel summary::-webkit-details-marker { display: none; }
.cashier-point-panel summary::after { content: "⌄"; color: #638298; font-size: 14px; }
.cashier-point-panel details[open] summary::after { content: "⌃"; }
.cashier-point-panel summary span, .cashier-point-panel summary small, .cashier-point-panel summary strong { display: block; }
.cashier-point-panel summary small { color: #638298; font-size: 10px; font-weight: 750; }
.cashier-point-panel summary strong { margin-top: 2px; font-size: 12px; }
.cashier-point-panel summary > b { margin-left: auto; color: var(--green); font-size: 12px; }
.cashier-point-body { padding: 0 11px 12px; border-top: 1px solid #d9e9f4; }
.cashier-point-enable { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: #173e5b; font-size: 12px; font-weight: 750; }
.cashier-point-enable input { accent-color: var(--green); }
.cashier-point-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.cashier-point-input-row label, .cashier-point-code-row label { display: grid; gap: 5px; color: #526f84; font-size: 11px; font-weight: 750; }
.cashier-point-input-row input, .cashier-point-code-row input { width: 100%; min-height: 34px; padding: 7px 8px; color: var(--ink); background: #fff; border: 1px solid #c9dce9; border-radius: 7px; outline-color: var(--green); }
.cashier-point-input-row > strong { padding-bottom: 8px; color: var(--green); font-size: 12px; white-space: nowrap; }
.cashier-point-limit, .cashier-point-note { margin: 8px 0 0; color: #587187; font-size: 10px; line-height: 1.45; }
.cashier-point-auth { display: flex; gap: 10px; margin: 10px 0 0; padding: 8px 0 0; border: 0; border-top: 1px dashed #c9dce9; }
.cashier-point-auth legend { padding: 0; color: #526f84; font-size: 10px; font-weight: 750; }
.cashier-point-auth label { display: inline-flex; align-items: center; gap: 5px; color: #173e5b; font-size: 11px; font-weight: 700; }
.cashier-point-auth input { accent-color: var(--green); }
.cashier-point-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 8px; }
.cashier-point-code-row > div { display: flex; gap: 6px; }
.cashier-point-code-row .outline-button, .cashier-point-code-row .primary-button { min-height: 34px; padding: 0 9px; font-size: 11px; }
.cashier-point-note { padding: 8px 9px; background: #e8f4fb; border-radius: 7px; }
.cashier-point-note b { color: #073a6a; }
.point-discount-row dt, .point-discount-row dd { color: #08705b; font-weight: 800; }

/* Cashier line entry for products sold by a weighed unit (kg, gram, etc.). */
.weight-quantity { display: grid; grid-template-columns: auto 70px; align-items: center; justify-content: end; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
.weight-quantity input { width: 70px; min-height: 25px; padding: 3px 5px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background: #fff; font: inherit; font-size: 11px; text-align: right; outline-color: var(--green); }
@media (max-width: 560px) { .weight-quantity { grid-template-columns: 1fr 64px; }
.weight-quantity input { width: 64px; }
}

@media (max-width: 560px) { .cashier-point-panel { margin-bottom: 8px; }
.cashier-point-body { padding-right: 9px; padding-left: 9px; }
.cashier-point-code-row { grid-template-columns: 1fr; }
.cashier-point-code-row > div { justify-content: stretch; }
.cashier-point-code-row button { flex: 1; }
.cashier-point-auth { flex-wrap: wrap; }
 }


/* Stock movement, batch traceability, and shelf-life controls. */
.mutation-grid { max-width: 1250px; margin: 0 auto 17px; display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 17px; }
.mutation-form { padding: 20px; }
.mutation-form .card-heading { margin-bottom: 18px; }
.mutation-route-card { padding: 22px; color: #fff; background: linear-gradient(155deg, #0a4d88, #06294d); border-radius: 12px; }
.mutation-route-card .eyebrow { color: #bcd9ee; }
.mutation-route { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 7px; align-items: center; margin: 22px 0 18px; }
.mutation-route > div { min-width: 0; padding: 12px 10px; color: #08335f; background: #fff; border-radius: 9px; }
.mutation-route span, .mutation-route small { display: block; }
.mutation-route span { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.mutation-route small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.mutation-route > b { color: #8fd0ed; font-size: 20px; text-align: center; }
.batch-status { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); }
.batch-status span, .batch-status strong, .batch-status small { display: block; }
.batch-status span, .expiry-status span { color: #bcd9ee; font-size: 11px; }
.batch-status strong { margin: 5px 0 3px; font-size: 16px; }
.batch-status small { color: #dceefa; font-size: 12px; line-height: 1.45; }
.expiry-status { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); }
.expiry-status strong { color: #fff; font-size: 13px; }
.mutation-route-card .helper-text { color: #c9e3f2; margin-top: 9px; }
.mutation-history { margin-bottom: 17px; }
.batch-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 0 16px; }
.batch-dates div { padding: 10px 12px; background: #f3f8fd; border-radius: 8px; }
.batch-dates span, .batch-dates strong { display: block; }
.batch-dates span { color: var(--muted); font-size: 11px; }
.batch-dates strong { margin-top: 4px; color: var(--ink); font-size: 12px; }

@media (max-width: 1120px) { .mutation-grid { grid-template-columns: 1fr; }
.mutation-route-card { min-height: 230px; }
 }

@media (max-width: 560px) { .mutation-form { padding: 16px; }
.mutation-route { grid-template-columns: 1fr 18px 1fr; }
.mutation-route > div { padding: 10px 8px; }
.mutation-route span { font-size: 11px; }
.batch-dates { grid-template-columns: 1fr; }
.mutation-route-card { padding: 18px; }
 }


/* Purchase-order SOP: request, approval, supplier PO, receiving, and finance matching. */
.procurement-flow { max-width: 1250px; margin: 0 auto 17px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.procurement-flow li { position: relative; min-height: 92px; padding: 16px 13px 14px 48px; border-right: 1px solid var(--line); }
.procurement-flow li:last-child { border-right: 0; }
.procurement-flow b { position: absolute; top: 16px; left: 14px; display: grid; width: 24px; height: 24px; place-items: center; color: #7890a2; background: #eef3f7; border-radius: 50%; font-size: 11px; }
.procurement-flow span, .procurement-flow small { display: block; }
.procurement-flow span { color: var(--ink); font-size: 12px; font-weight: 800; line-height: 1.25; }
.procurement-flow small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.procurement-flow li.complete b { color: #fff; background: var(--green); }
.procurement-flow li.current { background: #f3f8fd; }
.procurement-flow li.current b { color: #063a6a; background: #8fd0ed; }
.requisition-card { max-width: 1250px; margin: 0 auto 17px; padding: 20px; }
.requisition-card .card-heading { margin-bottom: 16px; }
.po-layout { max-width: 1250px; margin: 0 auto 17px; display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 17px; }
.po-form { padding: 20px; }
.po-form .card-heading { margin-bottom: 18px; }
.po-summary { padding: 23px; color: #fff; background: linear-gradient(155deg, #073a6a, #06294d); border-radius: 12px; }
.po-summary .eyebrow { color: #bcd9ee; }
.po-summary h3 { margin: 8px 0 20px; font-size: 19px; }
.po-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: #c9e3f2; border-top: 1px solid rgba(255,255,255,.15); font-size: 12px; }
.po-summary-row strong { color: #fff; text-align: right; }
.po-summary-total { margin-top: 10px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.15); }
.po-summary-total span, .po-summary-total strong { display: block; }
.po-summary-total span { color: #bcd9ee; font-size: 11px; }
.po-summary-total strong { margin-top: 4px; color: #fff; font-size: 25px; }
.po-summary > p:not(.eyebrow) { margin: 14px 0 0; color: #c9e3f2; font-size: 11px; line-height: 1.55; }
.po-history { margin-bottom: 17px; }

@media (max-width: 1120px) { .procurement-flow { grid-template-columns: repeat(3, 1fr); }
.procurement-flow li:nth-child(3) { border-right: 0; }
.procurement-flow li:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.po-layout { grid-template-columns: 1fr; }
.po-summary { min-height: 260px; }
 }

@media (max-width: 560px) { .procurement-flow { grid-template-columns: 1fr; }
.procurement-flow li, .procurement-flow li:nth-child(3) { min-height: 66px; border-right: 0; border-bottom: 1px solid var(--line); }
.procurement-flow li:last-child { border-bottom: 0; }
.requisition-card { padding: 16px; }
.po-form { padding: 16px; }
.po-summary { padding: 19px; }
 }


/* Customer selection, membership purchases, and approval actions. */
.nav-link.nav-sub-link { margin-left: 16px; padding-top: 8px; padding-bottom: 8px; color: #a9cae1; font-size: 12px; }
.nav-link.nav-sub-link span { font-size: 14px; }
.catalog-actions { display: flex; align-items: center; gap: 8px; }
.point-purchase-button { min-height: 38px; padding: 0 12px; color: var(--green-dark); background: var(--green-soft); border: 1px solid #bed9ec; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }

.voucher-point-button { color: #7c4b00; background: #fff4d4; border-color: #f0d38a; }

.customer-dialog, .order-action-dialog { width: min(600px, calc(100% - 30px)); border: 0; border-radius: 14px; padding: 24px; color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.customer-dialog::backdrop, .order-action-dialog::backdrop { background: rgba(8,44,82,.42); }
.customer-dialog h2, .order-action-dialog h2 { margin: 5px 0 18px; font-size: 23px; }
.customer-search-field { display: flex; align-items: center; gap: 9px; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.customer-search-field input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); }
.customer-results { display: grid; gap: 7px; max-height: 232px; margin-top: 12px; overflow-y: auto; }
.customer-result { display: grid; grid-template-columns: 33px 1fr 16px; align-items: center; gap: 10px; width: 100%; padding: 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.customer-result:hover, .customer-result.selected { border-color: #8ecfea; background: #f3f8fd; }
.customer-result-icon { display: grid; width: 33px; height: 33px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 8px; }
.customer-result strong, .customer-result small { display: block; }
.customer-result strong { font-size: 13px; }
.customer-result small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.customer-result b { color: var(--muted); font-size: 18px; font-weight: 400; }
.customer-no-results { margin: 3px 0; padding: 15px; color: var(--muted); background: #f7fafc; border-radius: 8px; font-size: 12px; }
.customer-dialog-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.customer-dialog-divider::before, .customer-dialog-divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.customer-new-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.customer-new-grid label, .order-action-dialog label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.customer-new-grid input, .order-action-dialog input, .order-action-dialog select, .order-action-dialog textarea { width: 100%; min-height: 38px; padding: 8px 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; outline-color: var(--green); }
.customer-dialog .checkout-button { margin-top: 15px; }
.order-action-dialog textarea { min-height: 82px; resize: vertical; }
.order-action-dialog .checkout-button { margin-top: 16px; }
.transaction-actions { display: flex; justify-content: flex-end; gap: 7px; }
.transaction-actions button, .approval-actions button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }
.approval-actions { display: flex; gap: 7px; }
.approval-actions .approve { color: #fff; background: var(--green); border-color: var(--green); }
.approval-actions .reject { color: var(--red); }
.approval-card { max-width: 1250px; margin: 17px auto 0; padding: 18px; }
.approval-card .card-heading { margin-bottom: 12px; }
.approval-card td { vertical-align: top; }
.pending-status { color: #9a5d00; background: #fff4d4; }

@media (max-width: 560px) { #kasir .catalog-header .point-purchase-button { display: inline-flex; align-items: center; }
.customer-dialog, .order-action-dialog { padding: 18px; }
.customer-new-grid { grid-template-columns: 1fr; }
.transaction-actions { justify-content: flex-start; }
 }

.point-voucher-options { display: grid; gap: 8px; margin: 12px 0; }
.point-voucher-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; }
.point-voucher-option span, .point-voucher-option strong, .point-voucher-option small { display: block; }
.point-voucher-option strong { font-size: 13px; }
.point-voucher-option small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.point-voucher-option > b { color: var(--green); font-size: 12px; white-space: nowrap; }
.point-voucher-option.selected { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.point-otp-note { margin: 12px 0; padding: 10px; border-radius: 8px; background: #f3f7f5; color: #53645e; font-size: 11px; line-height: 1.5; }
