/* ==========================================================================
   00-animations-transitions.css - Splash, App Reveal, Page & UI Transitions
   ========================================================================== */

/* Keyframes */
@keyframes logoBreathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(16, 108, 100, 0.35)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 22px rgba(16, 108, 100, 0.65)); }
}

@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes progressShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes appReveal {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pageSlideInRight {
  from { transform: translateX(120px); opacity: 0.1; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pageSlideInLeft {
  from { transform: translateX(-120px); opacity: 0.1; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pageSlideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-120px); opacity: 0.1; }
}

@keyframes pageSlideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120px); opacity: 0.1; }
}

html, body {
  max-width: 100%;
  overflow-x: clip;
}

html, body, #app, .pos-selling-shell, .pos-layout, .pos-content, .pos-selling, .content, .pos-products, #product-grid, .products-grid, .product-card, .table-grid, .table-card, .dashboard-grid, .shell {
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

@keyframes slideFromRight {
  0% { transform: translateX(90px) scale(0.96); opacity: 0.2; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes slideFromLeft {
  0% { transform: translateX(-90px) scale(0.96); opacity: 0.2; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toastSlideUp {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(0.95); }
  60% { opacity: 1; transform: translate(-50%, -4px) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Splash Screen */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0f2c38 0%, #071720 100%);
  color: #f7fbff;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.app-splash.is-exiting {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 380px;
  padding: 24px;
}

.splash-brand-mark {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.splash-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: logoBreathe 3s ease-in-out infinite;
  z-index: 2;
}

.splash-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 184, 178, 0.4) 0%, transparent 70%);
  z-index: 1;
}

.splash-pulse-ring {
  position: absolute;
  inset: -14px;
  border: 2px solid rgba(69, 184, 178, 0.35);
  border-radius: 50%;
  animation: ringPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: 0;
}

.splash-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 8px 0;
  color: #ffffff;
}

.splash-tagline {
  font-size: 14px;
  color: #94a3b8;
  margin: 0 0 28px 0;
  line-height: 1.5;
}

.splash-loader {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.splash-loader-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.splash-loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, #106c64, #45b8b2, #ffffff, #45b8b2, #106c64);
  background-size: 200% 100%;
  border-radius: 9999px;
  animation: progressShimmer 1.8s linear infinite;
}

.splash-status-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* App Reveal */
#app.app-ready,
.app-enter {
  animation: appReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Page Transitions */
.content,
.pos-content,
.pos-selling {
  animation: pageSlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.page-enter {
  animation: pageSlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.page-slide-forward,
.page-enter.page-slide-forward {
  animation: pageSlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.page-slide-backward,
.page-enter.page-slide-backward {
  animation: pageSlideInLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.26s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-old(root) {
  animation-name: fadeOut;
}

::view-transition-new(root) {
  animation-name: fadeIn;
}

html[data-page-direction="forward"]::view-transition-old(root) {
  animation: pageSlideOutLeft 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html[data-page-direction="forward"]::view-transition-new(root) {
  animation: pageSlideInRight 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html[data-page-direction="backward"]::view-transition-old(root) {
  animation: pageSlideOutRight 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html[data-page-direction="backward"]::view-transition-new(root) {
  animation: pageSlideInLeft 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Product Grid Directional Swipe Classes */
.products-slide-left {
  animation: slideFromRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.products-slide-right {
  animation: slideFromLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Modal / Dialog Transitions (with allow-discrete support) */
dialog {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              display 0.22s allow-discrete,
              overlay 0.22s allow-discrete;
  transform: scale(0.95) translateY(12px);
  opacity: 0;
}

dialog[open] {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@starting-style {
  dialog[open] {
    transform: scale(0.95) translateY(12px);
    opacity: 0;
  }
}

dialog::backdrop {
  background: rgba(16, 36, 44, 0.55);
  backdrop-filter: blur(0px);
  transition: opacity 0.22s ease,
              backdrop-filter 0.22s ease,
              display 0.22s allow-discrete,
              overlay 0.22s allow-discrete;
  opacity: 0;
}

dialog[open]::backdrop {
  opacity: 1;
  backdrop-filter: blur(4px);
}

@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
}

/* Toast Notification spring animation */
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: 90vw;
  background: #173b37;
  color: white;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(23, 59, 55, 0.4);
  display: none;
  font-size: 14px;
  pointer-events: none;
  animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#toast.update-toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: auto !important;
  animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Interactive Tactile Press */
.btn:active,
.chip:active,
.product-card:active {
  transform: scale(0.975);
  transition: transform 0.1s ease;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root{font-family:Segoe UI,Arial,sans-serif;color:#1b2c36;background:#f3f6f8;font-synthesis:none;--brand:#106c64;--brand-light:#e5f4ee;--nav:#132c35;--line:#e4eaed;--muted:#677c85;--orange:#e97b28}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}dialog:not([open]){display:none!important}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0}button:disabled{opacity:.55;cursor:wait}a{color:var(--brand)}button:focus-visible,a:focus-visible{outline:3px solid #65c6a7;outline-offset:3px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #ccd7dd;border-radius:8px;background:white;color:inherit;outline-color:var(--brand);min-height:44px}textarea{min-height:75px;resize:vertical}label{display:grid;gap:7px;font-size:14px;font-weight:600}h1,h2,h3,p{margin:0}h1{font-size:25px;letter-spacing:-.6px}h2{font-size:20px;letter-spacing:-.3px}h3{font-size:16px}small,.muted{color:var(--muted)}small{font-size:13px}.shell{display:grid;grid-template-columns:218px 1fr;min-height:100dvh}.sidebar{background:var(--nav);color:#d5e3e6;padding:28px 16px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:218px;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:white;font-size:22px;font-weight:750;margin:0 8px 28px}.brand img{width:38px;height:38px}.nav-title{font-size:11px;text-transform:uppercase;letter-spacing:1.6px;color:#89a3ae;margin:16px 14px 10px}.nav-link{display:flex;gap:13px;align-items:center;padding:12px 14px;text-decoration:none;color:#bdd0d6;border-radius:9px;margin-bottom:5px;font-size:14px;font-weight:600}.nav-link svg{width:19px;height:19px}.nav-link:hover{background:#203e48}.nav-link.active{background:#236154;color:white}.side-bottom{margin-top:auto;border-top:1px solid #36505a;padding:18px 8px 0;font-size:13px;line-height:1.7}.side-bottom strong{color:#fff;display:block}.main{grid-column:2;min-width:0}.topbar{height:76px;background:white;border-bottom:1px solid var(--line);padding:0 28px;display:flex;gap:18px;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.store-head{display:flex;align-items:center;gap:12px}.store-icon{padding:10px;background:var(--brand-light);color:var(--brand);border-radius:10px}.store-head strong{display:block;font-size:15px}.top-actions{display:flex;align-items:center;gap:12px}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:30px;padding:6px 10px;font-size:12px;font-weight:600;background:#e7f5ed;color:#18724a;white-space:nowrap}.badge.warn{background:#fff3dd;color:#975414}.badge.danger{background:#fee9e9;color:#a73939}.avatar{width:36px;height:36px;display:grid;place-items:center;background:#e9f0f4;border-radius:50%;font-weight:700}.content{padding:28px;max-width:1650px;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.page-head p{color:var(--muted);font-size:14px;margin-top:6px}.row{display:flex;align-items:center;gap:10px}.wrap{flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:white;border:1px solid #d5dfe3;color:#354b54;border-radius:8px;min-height:42px;padding:10px 16px;font-size:14px;font-weight:600;text-decoration:none}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.orange{background:var(--orange);border-color:var(--orange);color:white}.btn.danger{color:#b03939;border-color:#ebc8c8}.btn.ghost{border:0;background:transparent}.btn.small{padding:7px 10px;min-height:34px;font-size:13px}.btn.wide{width:100%}.btn svg{width:17px;height:17px}.card{border:1px solid var(--line);border-radius:13px;background:white;padding:22px;box-shadow:0 3px 14px #172b3503}.card-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:22px}.stat{padding:21px}.stat-label{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:var(--muted)}.stat-value{font-size:29px;font-weight:750;letter-spacing:-1px;margin:13px 0 9px}.stat-note{font-size:12px;color:var(--muted)}.stat-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--brand-light);color:var(--brand)}.dashboard-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}.bar-chart{height:190px;display:flex;align-items:end;gap:18px;padding:28px 10px 0;border-bottom:1px solid var(--line);margin-bottom:30px;background:repeating-linear-gradient(to top,transparent 0,transparent 46px,#edf2f5 47px,#edf2f5 48px)}.bar-item{flex:1;height:100%;display:flex;flex-direction:column;justify-content:end;align-items:center;position:relative}.bar{width:70%;max-width:56px;background:#53b59a;border-radius:6px 6px 0 0;min-height:3px}.bar-item small{position:absolute;bottom:-24px;font-size:12px}.bar-item b{font-size:11px;color:var(--muted);padding-bottom:6px}.list-row{padding:13px 0;display:flex;gap:12px;align-items:center;border-bottom:1px solid #edf1f3}.list-row:last-child{border:0}.list-row .grow{flex:1;min-width:0}.list-row strong{font-size:14px}.list-row small{display:block;margin-top:4px}.mini-icon{width:40px;height:40px;border-radius:9px;background:#f0f5f6;display:grid;place-items:center;color:var(--brand);font-weight:700}.empty{padding:45px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty strong{display:block;color:#35515b;font-size:18px;margin-bottom:6px}.empty .btn{margin-top:18px}.toolbar{display:flex;gap:12px;margin-bottom:18px;align-items:center;flex-wrap:wrap}.search{position:relative;flex:1;min-width:180px}.search input{padding-left:40px}.search svg{position:absolute;left:12px;top:13px;color:var(--muted);width:18px;height:18px}.tabs{display:flex;gap:8px;overflow:auto;padding-bottom:5px;margin-bottom:18px}.chip{border-radius:8px;padding:10px 15px;background:white;color:#526c76;border:1px solid var(--line);white-space:nowrap;font-size:14px}.chip.active{background:var(--brand-light);color:var(--brand);border-color:#b4d8ce}.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 365px;gap:20px;align-items:start}.products-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.product-card{text-align:left;background:#fff;border:1px solid var(--line);border-radius:12px;padding:0;overflow:hidden;transition:transform .15s,border-color .15s}.product-card:hover{transform:translateY(-2px);border-color:#8abeb0}.product-cover{height:94px;display:grid;place-items:center;background:linear-gradient(145deg,#f0f7f5,#e1eee9);position:relative}.product-cover b{font-size:30px;color:#6b9b89;letter-spacing:2px;font-weight:600}.stock-label{position:absolute;bottom:8px;right:8px;background:#ffffffdf;border-radius:5px;padding:3px 6px;font-size:11px;color:#60786f}.product-info{padding:14px}.product-info strong{font-size:14px;display:block;min-height:37px;line-height:1.35}.product-info .price{font-size:17px;font-weight:750;color:var(--brand);margin-top:8px;display:flex;justify-content:space-between;align-items:center}.add-dot{background:var(--brand-light);padding:2px 8px;border-radius:6px;font-size:19px}.cart{position:sticky;top:96px;padding:0;overflow:hidden}.cart-heading{padding:18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.cart-body{padding:16px}.cart-items{max-height:330px;overflow-y:auto}.cart-line{padding:13px 0;border-bottom:1px solid var(--line)}.cart-line strong{font-size:14px}.cart-line .row{justify-content:space-between;margin-top:8px}.qty{display:flex;align-items:center;border:1px solid #dce5e8;border-radius:6px;overflow:hidden}.qty button{padding:4px 11px;background:#f5f8f9;color:#48626b;min-height:31px}.qty span{min-width:32px;text-align:center;font-size:14px}.cart-line input{min-height:30px;padding:5px 8px;margin-top:9px;font-size:12px}.cart-totals{display:grid;gap:12px;font-size:14px;padding:18px 0}.cart-totals>div{display:flex;justify-content:space-between;align-items:center}.cart-totals input{width:112px;text-align:right;min-height:34px;padding:6px}.cart-total{border-top:1px dashed #ced9dd;padding-top:14px;font-size:17px;font-weight:700}.cart-total strong{color:var(--brand);font-size:25px}.pay-methods{display:flex;gap:7px;margin-bottom:13px}.pay-methods button{flex:1;padding:9px 5px;border:1px solid var(--line);background:#fff;border-radius:7px;font-size:12px}.pay-methods button.active{border-color:var(--brand);background:var(--brand-light);color:var(--brand)}.checkout{min-height:50px;font-size:16px!important}.table-wrap{overflow:auto}.data-table{border-collapse:collapse;width:100%;font-size:14px;white-space:nowrap}.data-table th{text-align:left;padding:13px 15px;background:#f6f9fa;color:#647b84;font-size:12px;text-transform:uppercase;letter-spacing:.45px;font-weight:600}.data-table td{padding:16px 15px;border-bottom:1px solid var(--line)}.data-table tr:last-child td{border:0}.data-table td small{display:block;margin-top:5px}.right{text-align:right!important}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.span2{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.stack{display:grid;gap:18px}.note{padding:13px 15px;background:#f0f6f8;border:1px solid #dae8ed;border-radius:8px;line-height:1.6;font-size:13px;color:#4a6873}.note.warning{background:#fff7e9;border-color:#f4dfb4;color:#886126}.check-label{display:flex;align-items:center;gap:9px;font-size:14px}.check-label input{width:18px;height:18px;min-height:18px;accent-color:var(--brand)}.split{display:grid;grid-template-columns:1fr 1fr;gap:20px}.table-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.table-seat{padding:25px 15px;text-align:center;border:1px solid var(--line);background:white;border-radius:12px}.table-seat.busy{background:#f1f9f3;border-color:#aad1b6}.table-seat svg{width:38px;height:38px;color:var(--brand);margin-bottom:14px}.table-seat strong{display:block;font-size:17px}.table-seat small{display:block;margin-top:9px}.pending-card{border-left:4px solid #e9a03b}.loading{display:grid;min-height:100dvh;place-items:center;color:var(--brand)}dialog{border:0;border-radius:17px;padding:28px;width:min(640px,calc(100vw - 28px));max-height:90dvh;box-shadow:0 30px 90px #102b3540;color:#1b2c36}dialog::backdrop{background:#10242c88;backdrop-filter:blur(3px)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.close{background:#f0f4f6;border-radius:50%;height:32px;width:32px;font-size:21px;color:#5e747e}.auth{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.auth-brand{background:var(--nav);padding:70px 65px;display:flex;flex-direction:column;justify-content:center;color:white}.auth-brand h1{font-size:44px;line-height:1.2;max-width:430px;letter-spacing:-1.5px}.auth-brand p{margin-top:24px;color:#abc5cd;line-height:1.8;max-width:390px}.auth-brand .brand{margin:0 0 65px}.auth-form{display:flex;align-items:center;justify-content:center;padding:40px}.auth-form form{max-width:410px;width:100%}.auth-form h2{font-size:29px;margin-bottom:9px}.auth-form .stack{margin-top:28px}.auth-form footer{margin-top:27px;color:var(--muted);font-size:13px;line-height:1.7}.feature-pill{padding:10px 15px;border:1px solid #3d5e65;border-radius:30px;font-size:13px;display:inline-flex;margin:8px 6px 0 0;color:#c0d8de}.error{padding:12px;background:#ffebeb;border-radius:8px;color:#a72c2c;font-size:14px;margin-top:14px}.mobile-menu{display:none}.print-preview{background:white;margin:auto;width:300px;max-width:100%;padding:14px;color:#000;font-family:Arial,sans-serif;font-size:12px}.receipt-header{text-align:center}.receipt-header h2{font-size:17px}.receipt-header p{margin:5px 0}.receipt-table{width:100%;border-collapse:collapse;margin:12px 0}.receipt-table td,.receipt-table th{padding:6px 2px;font-size:11px;text-align:left;border-bottom:1px dashed #aaa;white-space:normal}.receipt-table td:last-child{text-align:right}.receipt-summary{border-top:1px dashed #888;padding-top:9px}.receipt-summary p{display:flex;justify-content:space-between;padding:4px 0}.receipt-qr{width:155px;height:155px;display:block;margin:10px auto}.receipt-footer{text-align:center;font-size:10px;line-height:1.6;margin-top:10px}.label-print{box-sizing:border-box;border:1px dashed #999;padding:3mm;overflow:hidden;break-after:page;font-size:10px}.label-print h3{font-size:13px;margin:3px 0}.display-screen{background:var(--nav);color:white;min-height:100dvh;padding:50px}.display-screen .card{color:#19323a}.display-total{font-size:65px;letter-spacing:-2px;font-weight:800;color:#71d6b9}.display-screen .split{grid-template-columns:1fr 1fr;margin-top:35px}.kds-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:100;max-width:90vw;background:#173b37;color:white;border-radius:10px;padding:14px 22px;box-shadow:0 5px 20px #0002;display:none;font-size:14px;pointer-events:none}#toast.update-toast{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;pointer-events:auto!important}#toast.update-toast .btn{min-height:34px;padding:7px 12px}#print-area{display:none}.auth-note{margin-top:60px;font-size:13px;color:#87acb5}
@media(min-width:1500px){.products-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pos-layout{grid-template-columns:minmax(0,1fr) 390px}}
@media(max-width:1100px){.shell{grid-template-columns:78px 1fr}.sidebar{width:78px;padding:22px 10px}.sidebar .brand{margin:0 10px 24px}.sidebar .brand span,.nav-link span,.nav-title,.side-bottom{display:none}.nav-link{justify-content:center;padding:15px}.content{padding:20px}.topbar{padding:0 20px}.pos-layout{grid-template-columns:minmax(0,1fr) 325px}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{gap:12px}.stat{padding:17px}.stat-value{font-size:24px}.dashboard-grid{grid-template-columns:1fr}.table-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.shell{display:block}.sidebar{width:240px;transform:translateX(-100%);transition:transform .2s}.shell.menu-open .sidebar{transform:translateX(0);box-shadow:20px 0 100px #0007}.sidebar .brand span,.nav-link span,.nav-title,.side-bottom{display:initial}.sidebar .brand{margin-bottom:28px}.nav-link{justify-content:flex-start}.topbar{height:64px;padding:0 14px;gap:8px}.mobile-menu{display:block}.store-head{gap:8px}.store-icon{display:none}.store-head strong{font-size:13px;max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{gap:5px}.top-actions .user-name,.top-actions .avatar{display:none}.badge{font-size:11px;padding:5px 7px}.content{padding:20px 14px}.page-head{align-items:flex-start;margin-bottom:19px}.page-head h1{font-size:23px}.page-head p{font-size:13px}.page-head>.row{flex-wrap:wrap;justify-content:end}.stats{grid-template-columns:1fr 1fr}.stat-label{font-size:12px}.stat-icon{width:27px;height:27px}.stat-value{font-size:22px}.stat-note{font-size:11px}.card{padding:17px}.pos-layout{display:flex;flex-direction:column;gap:20px}.pos-layout>section{width:100%}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-cover{height:78px}.cart{position:static;width:100%;padding:0}.cart-items{max-height:none}.form-grid,.split{grid-template-columns:1fr}.table-grid{grid-template-columns:repeat(2,1fr);gap:12px}.auth{display:block;background:#f3f6f8}.auth-brand{padding:25px}.auth-brand .brand{margin:0}.auth-brand h1,.auth-brand p,.auth-brand .feature-pill,.auth-note{display:none}.auth-form{padding:35px 24px}.form-grid .span2{grid-column:1}.bar-chart{gap:10px}.display-screen{padding:25px}.display-screen .split{grid-template-columns:1fr}.display-total{font-size:44px}.kds-grid{grid-template-columns:1fr}.data-table td{padding:12px 10px}input,select,textarea{font-size:16px}.top-actions .btn{padding:7px}.settings-columns{display:block}.settings-columns>.card{margin-bottom:18px}}
@media(max-width:700px){.store-head{min-width:0;flex:1}.store-head strong{max-width:128px}.top-actions{flex-shrink:0}.top-actions .btn span{display:none}.top-actions .btn{min-width:32px}.store-head .mobile-menu{padding:7px}.topbar{gap:4px}.page-head>.row .btn{font-size:12px;padding:8px 10px}.cart{scroll-margin-top:76px}}
.label-print svg{max-width:100%;height:auto;max-height:12mm}
.product-cover{overflow:hidden;height:145px;padding:8px;background:linear-gradient(145deg,#f5f8f7,#e7f0ed)}.product-photo{display:block;width:100%;height:100%;object-fit:contain;object-position:center}.stock-label{z-index:1;top:8px;bottom:auto;right:8px;background:#ffffffdf;border-radius:6px;padding:3px 7px;color:#48645b;backdrop-filter:blur(4px)}.product-placeholder{font-size:30px;color:#6b9b89;letter-spacing:2px;font-weight:600}.product-card{min-height:240px;display:flex;flex-direction:column}.product-info{padding:12px 14px 13px;display:flex;flex:1;min-height:95px;flex-direction:column}.product-info strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:38px}.product-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-info .price{margin-top:auto}.add-dot{min-width:34px;min-height:34px;display:grid;place-items:center;padding:2px 9px}.note-toggle{margin-top:8px;padding:0;background:transparent;color:var(--brand);font-size:12px;text-align:left}.cart-note[hidden]{display:none}.discount-input{display:flex;align-items:center;gap:7px}.discount-input b{color:var(--muted)}
@media print{body>*{display:none!important}#print-area{display:block!important;color:#000;background:white}#print-area .print-preview{width:100%!important;max-width:none;padding:0}.label-print{border:0!important}.receipt-table tr{break-inside:avoid}html,body{background:white;margin:0;padding:0}#print-area img{max-width:100%}}
.insight-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:1.3fr .85fr;gap:28px;align-items:center;min-height:184px;margin:-4px 0 22px;padding:30px 34px;border-radius:18px;color:#fff;background:linear-gradient(112deg,#123c42,#146c64 54%,#2f9c88);box-shadow:0 18px 35px #11665a2e}.insight-copy{position:relative;z-index:1}.eyebrow{display:inline-flex;padding:6px 10px;border:1px solid #ffffff3b;border-radius:20px;background:#ffffff14;font-size:12px;font-weight:700}.insight-hero h2{font-size:26px;line-height:1.22;max-width:640px;margin:13px 0 9px;letter-spacing:-.6px}.insight-hero p{max-width:610px;color:#e2f5ef;line-height:1.55;font-size:14px}.insight-number{position:relative;z-index:1;justify-self:end;width:100%;padding:20px 22px;border:1px solid #ffffff30;border-radius:14px;background:#ffffff14;backdrop-filter:blur(10px)}.insight-number small,.insight-number span{display:block;color:#ddf4ed}.insight-number strong{display:block;margin:7px 0;font-size:29px;letter-spacing:-1px}.insight-glow{position:absolute;width:260px;height:260px;right:-80px;top:-80px;border-radius:50%;background:#a5f3d680;filter:blur(10px)}.chart-card{background:linear-gradient(180deg,#fff,#f5fbf9)}.chart-foot{display:flex;justify-content:space-between;align-items:center;padding-top:2px;color:var(--muted);font-size:13px}.trend{padding:6px 10px;border-radius:20px;font-weight:700}.trend.up{color:#16754c;background:#e5f7eb}.trend.down{color:#b84d4d;background:#ffeded}.rank{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:var(--brand-light);color:var(--brand);font-size:13px;font-weight:800}.appearance-box{padding:18px;border:1px solid var(--line);border-radius:13px;background:linear-gradient(145deg,#f7fbfb,#f0f7f6)}.appearance-box h3{margin-bottom:5px}.appearance-box p{margin:0;color:var(--muted);font-size:13px}.style-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:15px}.style-choice{position:relative;display:grid;gap:5px;padding:11px;border:1px solid #d7e3e5;border-radius:11px;background:#fff;cursor:pointer}.style-choice:has(input:checked){border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-light)}.style-choice input{position:absolute;opacity:0;pointer-events:none}.style-choice small{font-size:11px;line-height:1.35}.style-swatch{height:30px;border-radius:7px;background:linear-gradient(120deg,#123c42,#2e9b87)}.style-swatch.soft{background:linear-gradient(120deg,#a23d76,#f6a4be)}.style-swatch.midnight{background:linear-gradient(120deg,#071821,#2c5d77)}.image-field{display:flex;gap:16px;align-items:center;padding:16px;margin-top:18px;border:1px dashed #b7cdd0;border-radius:12px;background:#f8fbfb}.image-preview{width:94px;height:94px;flex:0 0 94px;display:grid;place-items:center;overflow:hidden;border-radius:10px;background:#e6f2ef;color:#52736d;text-align:center;font-size:12px}.image-preview img{width:100%;height:100%;object-fit:cover}.image-upload{flex:1;color:var(--brand)}.image-upload input{padding:8px 0;border:0;background:transparent;min-height:36px}.image-upload small{font-weight:400}html[data-ui-style="soft"]{--brand:#a33e76;--brand-light:#fceaf2;--nav:#3a1f34}html[data-ui-style="soft"] body{background:#fff7fa}html[data-ui-style="soft"] .card,html[data-ui-style="soft"] .topbar,html[data-ui-style="soft"] .product-card{border-color:#f0dbe5}html[data-ui-style="soft"] .insight-hero{background:linear-gradient(112deg,#572142,#a33e76 54%,#e47ca2)}html[data-ui-style="midnight"]{--brand:#45b8b2;--brand-light:#173b42;--nav:#071820;--line:#203844;--muted:#aabec7}html[data-ui-style="midnight"] body,html[data-ui-style="midnight"] .content{background:#0b1e27;color:#e7f1f3}html[data-ui-style="midnight"] .topbar,html[data-ui-style="midnight"] .card,html[data-ui-style="midnight"] .product-card,html[data-ui-style="midnight"] input,html[data-ui-style="midnight"] select,html[data-ui-style="midnight"] textarea,html[data-ui-style="midnight"] .chip{background:#112b36;color:#e7f1f3;border-color:#294652}html[data-ui-style="midnight"] .stat-label,html[data-ui-style="midnight"] .note,html[data-ui-style="midnight"] .data-table th{color:#aabec7;background:#122f3a}html[data-ui-style="midnight"] .list-row{border-color:#23404b}html[data-ui-style="midnight"] .product-cover{background:#173943}html[data-ui-style="midnight"] .insight-hero{background:linear-gradient(112deg,#071820,#123c4a 54%,#1e7280)}
@media(max-width:700px){.insight-hero{grid-template-columns:1fr;gap:16px;padding:24px 20px}.insight-hero h2{font-size:22px}.insight-number{justify-self:stretch}.style-picker{grid-template-columns:1fr}.image-field{align-items:flex-start}.chart-foot{gap:10px;align-items:flex-start;flex-direction:column}}
@media print{html,body{background:#fff!important;color:#000!important}}
.management-menu-close,.management-menu-backdrop{display:none}
@media(max-width:700px){.shell .sidebar{overflow-y:auto;overscroll-behavior:contain}.shell .management-menu-close{display:block;align-self:flex-end;width:44px;height:44px;flex-shrink:0;border-radius:8px;background:transparent;color:inherit;font-size:28px;margin:-12px -4px 8px 0}.shell .management-menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:19;background:#10242c88;touch-action:none}.shell.menu-open .sidebar{box-shadow:none}}

/* Quầy POS: vùng hàng và giỏ cuộn độc lập, thao tác cảm ứng. */
.pos-shell{min-height:100dvh;background:#eef3f5;color:#18333b}
.pos-topbar{height:68px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid #dce5e8}
.pos-brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}.pos-brand img{width:38px;height:38px}.pos-brand strong{display:block;font-size:14px;letter-spacing:.8px}.pos-brand small{display:block;margin-top:4px;color:#58717a;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pos-user{display:flex;align-items:center;gap:12px}.pos-nav{height:64px;display:flex;align-items:stretch;gap:8px;padding:7px 22px;background:#fff;border-bottom:1px solid #dce5e8;overflow:auto}.pos-nav a{display:flex;align-items:center;justify-content:center;gap:10px;padding:0 24px;min-width:120px;border-radius:10px;color:#546a73;text-decoration:none;font-weight:650;white-space:nowrap}.pos-nav a.active{background:#106c64;color:#fff}.pos-nav a:hover{box-shadow:inset 0 0 0 2px #7bbbad}
.pos-content{padding:18px 22px}.pos-content .page-head{margin-bottom:14px}.pos-content .page-head h1{font-size:22px}.pos-content .page-head p{display:none}
.pos-shell .btn,.pos-shell input,.pos-shell select,.pos-shell summary{min-height:48px}.pos-shell button,.pos-shell a,.pos-mode dialog button{touch-action:manipulation}.pos-shell input[type=checkbox]{width:24px;min-height:24px;height:24px}.pos-shell label:has(input[type=checkbox]){display:flex;align-items:center;gap:10px}
.pos-selling{height:calc(100dvh - 132px);display:flex;flex-direction:column;min-height:0}.pos-selling>.page-head{flex-shrink:0}.pos-shell .pos-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,35%);gap:20px;min-height:0;flex:1;align-items:stretch}.pos-layout>section{min-width:0}
.pos-shell .pos-layout>section{display:flex;flex-direction:column;min-height:0}.pos-shell .toolbar{flex-shrink:0;margin-bottom:12px}.pos-shell .search input{min-height:54px;font-size:17px;padding-left:42px}.pos-shell .search svg{top:18px}.pos-shell .tabs{flex-shrink:0;margin-bottom:12px}.pos-shell .chip{min-height:50px;padding:10px 22px;font-size:16px}.pos-shell .products-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px;overflow-y:auto;align-content:start;padding:2px 4px 12px 0;min-height:0}.pos-shell .product-card{min-height:172px;transition:none;box-shadow:0 2px 4px #163c3210}.pos-shell .product-card:active{background:#e6f5ef;box-shadow:inset 0 0 0 3px #106c64}.pos-shell .product-card:hover{transform:none}.pos-shell .product-cover{height:88px}.pos-shell .product-info{padding:10px 12px}.pos-shell .product-info strong{font-size:16px;min-height:42px}.pos-shell .product-info small{display:none}.pos-shell .product-info .price{font-size:19px;margin-top:6px}.pos-shell .stock-label{font-size:12px}
.pos-shell .cart{position:static;display:flex;flex-direction:column;min-height:0;border-radius:14px;box-shadow:0 4px 16px #183b3510}.pos-shell .cart-heading{padding:10px 16px;flex-shrink:0}.pos-shell .cart-heading h3{font-size:17px}.pos-shell .cart-body{padding:12px 16px;display:flex;flex-direction:column;flex:1;min-height:0;gap:10px}.pos-shell .cart-items{flex:1;min-height:70px;max-height:none;overflow:auto;overscroll-behavior:contain}.pos-shell .cart-line{padding:12px 0}.pos-shell .cart-line strong{font-size:16px}.pos-shell .cart-line b{font-size:16px}.pos-shell .qty button{min-width:48px;min-height:48px;font-size:24px;padding:4px 10px}.pos-shell .qty span{font-size:18px;min-width:36px}.pos-shell .cart-line .note-toggle{min-height:36px;font-size:13px}.pos-shell .cart-totals{padding:4px 0;gap:8px;flex-shrink:0}.pos-shell .cart-totals input{min-height:44px}.pos-shell .cart-total{padding-top:10px}.pos-shell .cart-total strong{font-size:28px}.pos-shell .pay-methods{margin:0;gap:8px;flex-shrink:0}.pos-shell .pay-methods button{min-height:48px;font-size:14px;font-weight:650}.pos-shell .checkout{min-height:62px;flex-shrink:0;font-size:20px!important}.pos-shell .empty{padding:24px 12px}.pos-shell .table-seat{min-height:150px;border-width:2px}.pos-shell .table-seat strong{font-size:22px}.pos-shell .table-seat.busy{background:#e7f5ed;border-color:#6eb28e}
.pos-mode dialog .btn,.pos-mode dialog input,.pos-mode dialog select{min-height:52px;font-size:17px}.pos-mode dialog .close{height:48px;width:48px}.quick-cash{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quick-cash .btn{padding:10px 8px}.pos-mode dialog .cart-total strong{font-size:32px}
.bida-support{margin:20px 0}.bida-support>summary{cursor:pointer;font-weight:650;padding:12px;background:white;border:1px solid var(--line);border-radius:10px;margin-bottom:16px}.bida-detail-card .row{flex-wrap:wrap}.bida-item-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;max-height:320px;overflow:auto}
@media(min-width:701px) and (max-height:720px){.pos-topbar{height:56px}.pos-nav{height:58px}.pos-selling{height:calc(100dvh - 114px);padding:10px 16px}.pos-selling>.page-head{display:none}.pos-shell .cart-body{gap:6px}.pos-shell .cart-total strong{font-size:24px}.pos-shell .cart-heading{padding:4px 12px}.pos-shell .checkout{min-height:54px}.pos-shell .cart-totals>div:first-child{display:none}}
@media(max-width:1100px){.pos-topbar{padding:0 16px}.pos-user>span:not(.badge){display:none}.pos-nav{padding-left:16px;padding-right:16px;gap:5px}.pos-nav a{min-width:100px;padding:0 14px}.pos-content{padding-left:16px;padding-right:16px}.pos-shell .pos-layout{grid-template-columns:minmax(0,1fr) 360px;gap:14px}}
@media(max-width:700px){.pos-topbar{height:auto;min-height:64px;padding:10px 12px;align-items:flex-start}.pos-brand strong{font-size:12px}.pos-brand small{max-width:125px}.pos-brand img{display:none}.pos-user{gap:5px;flex-wrap:wrap;justify-content:flex-end}.pos-user .btn{padding:8px;font-size:12px;min-height:44px}.pos-user [data-action=fullscreen],.pos-user [data-action=logout]{display:none}.pos-nav{height:58px;padding:4px 10px;gap:4px}.pos-nav a{min-width:105px;padding:0 10px;font-size:14px}.pos-content{padding:14px 12px}.pos-selling{height:auto;display:block}.pos-shell .pos-layout{display:flex;flex-direction:column}.pos-shell .products-grid{max-height:45dvh;grid-template-columns:repeat(2,minmax(0,1fr))}.pos-shell .cart{min-height:470px;max-height:80dvh}.pos-shell .cart-items{min-height:110px}.pos-content .page-head .btn{font-size:12px;padding:8px}.pos-shell .table-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-cash{grid-template-columns:repeat(2,1fr)}}
@media(min-width:701px){.pos-selling>.page-head{display:none}.pos-shell .cart-items{min-height:130px}}
@media(max-width:700px){.pos-user [data-action=display]{display:none}}
.pos-mode #toast{top:12px;bottom:auto;pointer-events:none}

/* Retail POS parity: compact 4 x 3 product grid, semantic category/action icons, and a clearer checkout bar. */
.pos-selling-shell .pos-brand small{display:block;color:#1f63e9;font-weight:800;letter-spacing:.2px}
.pos-selling-shell .products-grid{grid-auto-rows:minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));gap:10px;overflow:hidden}
.pos-selling-shell .product-card{min-height:0;height:100%}
.pos-selling-shell .product-cover{height:88px;flex:0 0 88px}
.pos-selling-shell .product-photo{padding:8px 50px 8px 8px}
.pos-selling-shell .stock-label{display:inline-flex;width:auto!important;height:auto!important;max-height:22px;min-height:0;align-items:center;line-height:1.2;white-space:nowrap;top:7px;right:7px;bottom:auto;padding:4px 6px;font-size:10px;box-shadow:0 1px 4px #29486618}
.pos-selling-shell .product-info{min-height:0;padding:8px 11px 9px}
.pos-selling-shell .product-info strong{min-height:30px;font-size:13px}
.pos-selling-shell .product-info small{margin-top:1px;font-size:10px}
.pos-selling-shell .product-info .price{margin-top:auto;font-size:16px}
.pos-selling-shell .add-dot{min-width:29px;min-height:29px;font-size:16px}
.pos-selling-shell .pos-category svg{display:none}
.pos-selling-shell .pos-category::before{display:grid;place-items:center;width:21px;height:21px;flex:0 0 21px;font-size:18px;line-height:1;color:#7895b5}
.pos-selling-shell .pos-category:nth-child(1)::before{content:'⊞'}
.pos-selling-shell .pos-category:nth-child(2)::before{content:'🍴'}
.pos-selling-shell .pos-category:nth-child(3)::before{content:'▣'}
.pos-selling-shell .pos-category:nth-child(4)::before{content:'☕'}
.pos-selling-shell .pos-category:nth-child(5)::before{content:'⌂'}
.pos-selling-shell .pos-category:nth-child(6)::before{content:'•••';font-size:13px;letter-spacing:-2px}
.pos-selling-shell .pos-category.active::before{color:#fff}
.pos-selling-shell .pos-actions .command-action{display:inline-flex;align-items:center;gap:8px;font-weight:750}
.pos-selling-shell .pos-actions .command-action::before{font-size:19px;line-height:1}
.pos-selling-shell .pos-actions .command-action:nth-child(1)::before{content:'◇'}
.pos-selling-shell .pos-actions .command-action:nth-child(2)::before{content:'Ⅱ'}
.pos-selling-shell .pos-actions .command-action:nth-child(3)::before{content:'♲';transform:rotate(180deg)}
.pos-selling-shell .pos-actions .command-action.danger{background:#fff5f5;border-color:#f1d5d5}
.pos-selling-shell .pos-action-checkout{gap:12px}
.pos-selling-shell .pos-action-checkout::before{content:'▣';font-size:22px;color:#fff}
.pos-selling-shell .pos-action-checkout::after{content:'›';font-size:28px;line-height:.8;color:#fff}
@media(min-width:701px) and (max-height:820px){.pos-selling-shell .product-cover{height:78px;flex-basis:78px}.pos-selling-shell .product-info{padding-top:6px;padding-bottom:7px}.pos-selling-shell .product-info strong{min-height:26px}.pos-selling-shell .product-info .price{font-size:15px}}

/* POS bán hàng: rail danh mục, vùng hàng, giỏ cố định và thanh thao tác cuối màn hình. */
.pos-selling .pos-layout{grid-template-columns:150px minmax(0,1fr) minmax(360px,410px);gap:18px}
.pos-category-rail{min-width:0;overflow:auto;padding:2px 0 12px}
.pos-section-label{padding:0 10px 10px;color:#6a8088;font-size:11px;font-weight:800;letter-spacing:1px}
.pos-category-list{display:flex;flex-direction:column;gap:8px}
.pos-category{display:flex;align-items:center;gap:10px;min-height:56px;width:100%;padding:10px 12px;border:1px solid #d9e5e5;border-radius:12px;background:#fff;color:#3d5961;text-align:left;font-weight:700}
.pos-category svg{width:22px;height:22px;flex:0 0 22px;color:#6e8c8b}
.pos-category.active{border-color:#106c64;background:#106c64;color:#fff;box-shadow:0 4px 12px #106c6430}
.pos-category.active svg{color:#fff}
.pos-products{min-width:0}
.pos-searchbar{margin-bottom:14px!important}
.pos-searchbar .btn{min-width:54px;padding:10px}
.pos-selling .products-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding-right:2px}
.pos-selling .product-card{min-height:225px;border:1px solid #d8e5e3;border-radius:14px;background:#fff;box-shadow:0 3px 10px #183b3512}
.pos-selling .product-card:hover{border-color:#74b8a6;box-shadow:0 8px 18px #183b3520}
.pos-selling .product-cover{height:124px}
.pos-selling .product-info{padding:13px 14px 14px}
.pos-selling .product-info strong{font-size:17px}
.pos-selling .product-info small{display:block;color:#779097;font-size:12px;margin-top:5px}
.pos-selling .product-info .price{font-size:20px}
.pos-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-shrink:0;margin-top:14px;padding:12px 0 0;border-top:1px solid #d8e4e5}
.pos-actions>div{margin-right:auto;display:flex;align-items:baseline;gap:12px}
.pos-actions span{color:#627981;font-size:13px;font-weight:650}
.pos-actions strong{color:#106c64;font-size:27px}
.pos-action-checkout{min-width:260px;min-height:64px!important;font-size:21px!important}
.pos-selling .cart .checkout{display:none}
@media(min-width:1250px){.pos-selling .products-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){
  .pos-selling{height:auto;display:block}
  .pos-selling .pos-layout{display:flex;flex-direction:column;gap:14px}
  .pos-category-rail{order:0;padding-bottom:0}
  .pos-section-label{padding-left:2px}
  .pos-category-list{flex-direction:row;overflow-x:auto;padding:2px 2px 5px}
  .pos-category{width:auto;min-width:max-content;min-height:50px}
  .pos-products{order:1}
  .pos-selling .products-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}
  .pos-selling .cart{order:2;min-height:470px}
  .pos-actions{display:none}
  .pos-selling .cart .checkout{display:flex}
}

@media(min-width:701px){
  .pos-selling-shell .products-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:10px;overflow:hidden}
  .pos-selling-shell .product-card{min-height:0;height:100%}
  .pos-selling-shell .product-cover{height:88px;flex-basis:88px}
  .pos-selling-shell .product-info{min-height:0;padding:8px 11px 9px}
  .pos-selling-shell .product-info strong{min-height:30px;font-size:13px}
  .pos-selling-shell .product-info .price{font-size:16px}
}

.pos-selling-shell .pos-category[data-value="Tất cả"]::before{content:'⊞'}
.pos-selling-shell .pos-category[data-value="Đồ uống"]::before{content:'☕'}
.pos-selling-shell .pos-category[data-value="Đồ ăn"]::before{content:'🍴'}
.pos-selling-shell .pos-category[data-value="Bánh kẹo"]::before{content:'🍬'}
.pos-selling-shell .pos-category[data-value="Hàng đóng gói"]::before{content:'🍬'}
.pos-selling-shell .pos-category[data-value="Gia dụng"]::before{content:'⌂'}
.pos-selling-shell .pos-category[data-value="Phụ kiện"]::before{content:'⌂'}
.pos-selling-shell .pos-category[data-value="Khác"]::before,.pos-selling-shell .pos-category[data-value="Dịch vụ"]::before{content:'•••';font-size:13px;letter-spacing:-2px}
@media(max-width:700px){
  .pos-selling .products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .pos-selling .product-card{min-height:205px}
  .pos-selling .product-cover{height:100px}
  .pos-selling .product-info{padding:10px 11px}
  .pos-selling .product-info strong{font-size:15px}
  .pos-selling .product-info .price{font-size:17px}
}

/* Retail POS visual parity: one compact selling header and a dedicated 16:9 workspace. */
.pos-selling-shell{--brand:#1f63e9;--brand-light:#eaf1ff;background:#eef3f9;color:#203247;overflow:hidden}
.pos-selling-shell .pos-topbar{height:88px;padding:0 22px;display:grid;grid-template-columns:230px minmax(420px,1fr) auto;gap:20px;background:#fff;border-bottom:1px solid #dce5f0;position:relative}
.pos-selling-shell .pos-brand{gap:11px;min-width:0;color:#18324d}
.pos-selling-shell .pos-brand img{width:36px;height:36px}
.pos-selling-shell .pos-brand strong{font-size:16px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pos-selling-shell .pos-brand small{margin-top:3px;color:#6d8093;font-size:12px}
.pos-header-tools{display:flex;align-items:center;gap:10px;min-width:0}
.pos-header-search{display:flex;align-items:center;flex:1;min-width:0;height:52px;padding-left:42px;border:1px solid #cdd9e8;border-radius:11px;background:#f8fbff;box-shadow:inset 0 1px 2px #1d4d7a08}
.pos-header-search svg{top:16px;left:13px;color:#7890a8;width:19px;height:19px}
.pos-header-search input{height:50px;min-height:50px;padding:10px 12px 10px 0;border:0;background:transparent;font-size:16px;box-shadow:none}
.pos-header-search input:focus{outline:0}
.pos-header-search .quick-action{height:40px;min-height:40px;margin-right:5px;padding:7px 12px;border:0;border-left:1px solid #d8e3ef;border-radius:7px;background:#fff;color:#1f63e9;white-space:nowrap}
.pos-quick-actions{display:flex;gap:8px;flex-shrink:0}
.pos-selling-shell .quick-action{min-height:44px;padding:9px 13px;border-color:#d5e0ec;color:#31516e;background:#fff;font-size:13px}
.pos-selling-shell .quick-action:hover{border-color:#8eb2ed;background:#f5f8ff;color:#1f63e9}
.pos-selling-shell .scan-action{color:#1f63e9}
.pos-selling-shell .pos-user{gap:8px;min-width:max-content}
.pos-selling-shell .pos-user-name{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4d647c;font-size:13px}
.pos-selling-shell .pos-user .badge{padding:5px 8px;font-size:11px}
.pos-selling-shell .header-icon{min-height:38px;width:38px;padding:8px;border:0;background:transparent;color:#536d87}
.pos-selling-shell .header-icon:hover{background:#f0f5fb;color:#1f63e9}
.pos-selling-shell .header-manage{min-height:38px;padding:8px 10px;border:0;background:#f3f7fd;color:#45627e;font-size:12px}
.pos-selling-shell .pos-content{height:calc(100dvh - 88px);max-width:none;padding:14px 18px 90px;overflow:hidden}
.pos-selling-shell .pos-selling{height:100%;display:flex;flex-direction:column;min-height:0}
.pos-selling-shell .pos-layout{grid-template-columns:180px minmax(0,1fr) 410px;gap:14px;flex:1;min-height:0;align-items:stretch}
.pos-selling-shell .pos-layout>section,.pos-selling-shell .pos-category-rail{min-height:0}
.pos-selling-shell .pos-category-rail{padding:2px 0 8px;overflow-y:auto}
.pos-selling-shell .pos-section-label{padding:0 9px 9px;color:#7890a8;font-size:10px;letter-spacing:1.2px}
.pos-selling-shell .pos-category-list{gap:6px}
.pos-selling-shell .pos-category{min-height:45px;padding:8px 11px;border-color:#d9e4ef;border-radius:10px;color:#48627b;background:#fff;font-size:13px}
.pos-selling-shell .pos-category svg{width:19px;height:19px;color:#86a0b9}
.pos-selling-shell .pos-category.active{border-color:#1f63e9;background:#1f63e9;color:#fff;box-shadow:0 4px 10px #1f63e933}
.pos-selling-shell .pos-category.active svg{color:#fff}
.pos-selling-shell .pos-products{display:flex;flex-direction:column;min-width:0;min-height:0}
.pos-selling-shell .products-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;flex:1;align-content:start;overflow-y:auto;padding:0 3px 12px 1px}
.pos-selling-shell .product-card{min-height:220px;border:1px solid #d9e4ef;border-radius:12px;background:#fff;box-shadow:0 2px 8px #27496c0b}
.pos-selling-shell .product-card:hover{transform:translateY(-1px);border-color:#8eb2ed;box-shadow:0 7px 15px #27496c18}
.pos-selling-shell .product-card:active{background:#f1f6ff;box-shadow:inset 0 0 0 2px #1f63e9}
.pos-selling-shell .product-cover{height:112px;background:linear-gradient(145deg,#f4f8ff,#e8f0fa)}
.pos-selling-shell .product-cover b{color:#7095c1;font-size:27px}
.pos-selling-shell .product-photo{object-fit:contain;padding:5px}
.pos-selling-shell .stock-label{bottom:7px;right:7px;padding:3px 6px;border:1px solid #dce7f3;color:#67809a;font-size:10px}
.pos-selling-shell .product-info{padding:10px 12px 11px;min-height:106px}
.pos-selling-shell .product-info strong{font-size:14px;line-height:1.3;min-height:36px;color:#28425d}
.pos-selling-shell .product-info small{margin-top:3px;color:#8497aa;font-size:11px}
.pos-selling-shell .product-info .price{margin-top:8px;color:#1f63e9;font-size:17px}
.pos-selling-shell .add-dot{padding:1px 7px;border-radius:6px;background:#eaf1ff;color:#1f63e9;font-size:18px}
.pos-selling-shell:not(.pos-window-layout-active) .cart{top:0;height:100%;position:relative}
.pos-selling-shell .cart{border:1px solid #d8e3ee;border-radius:12px;box-shadow:0 3px 12px #27496c12;overflow:hidden}
.pos-selling-shell .cart-heading{min-height:58px;padding:8px 12px;border-bottom:1px solid #e2e9f1;flex-shrink:0}
.pos-selling-shell .cart-kicker{display:block;margin-bottom:2px;color:#8297ab;font-size:10px;font-weight:800;letter-spacing:1px}
.pos-selling-shell .cart-heading h3{font-size:16px;color:#253f59}
.pos-selling-shell .cart-heading small{font-size:11px;color:#8093a6}
.pos-selling-shell .cart-body{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;gap:6px;padding:8px 11px;overflow:hidden}
.pos-selling-shell .cart-body>select{min-height:36px;padding:6px 9px;border-color:#d3dfeb;border-radius:8px;font-size:12px;flex-shrink:0}
.pos-selling-shell .cart-items{min-height:0;flex:1 1 auto;overflow-y:auto}
.pos-selling-shell .cart-line{position:relative;padding:5px 0;border-bottom:1px solid #e8eef4}
.cart-line-main{display:flex;gap:9px;min-width:0}
.cart-thumb{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;overflow:hidden;border-radius:7px;background:#edf4fc;color:#6b92be;font-size:11px;font-weight:800}
.cart-thumb img{width:100%;height:100%;object-fit:cover}
.cart-item-content{min-width:0;flex:1}
.pos-selling-shell .cart-line strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#2d465f;font-size:13px}
.pos-selling-shell .cart-line small{display:block;margin-top:2px;color:#8194a6;font-size:11px}
.cart-line-controls{display:flex;align-items:center;gap:6px;margin-top:4px}
.cart-line-controls .qty{height:32px;border-color:#d7e3ee;border-radius:7px}
.cart-line-controls .qty button{min-width:32px;min-height:32px;padding:2px 7px;background:#f4f7fb;color:#58718b;font-size:16px}
.cart-line-controls .qty span{min-width:24px;color:#39536d;font-size:12px}
.cart-line-controls>b{margin-left:auto;color:#1f63e9;font-size:13px;white-space:nowrap}
.cart-remove{width:25px;height:27px;min-height:27px;padding:0;border-radius:6px;background:transparent;color:#a4b2bf;font-size:20px;line-height:1}
.cart-remove:hover{background:#fff0f0;color:#ca4e4e}
.pos-selling-shell .cart-item-content{padding-right:24px}
.pos-selling-shell .note-toggle{position:absolute;top:5px;right:0;width:22px;min-height:22px;margin:0;padding:0;overflow:hidden;color:#7891aa;font-size:0}
.pos-selling-shell .note-toggle::before{content:'✎';font-size:13px;line-height:1}
.pos-selling-shell .cart-note{min-height:28px;margin-top:3px;padding:4px 7px;font-size:10px}
.pos-selling-shell .cart-totals{display:grid;flex-shrink:0;gap:3px;padding:5px 0;font-size:11px}
.pos-selling-shell .cart-totals>div{min-height:22px}
.pos-selling-shell .cart-totals input{width:92px;min-height:28px;padding:4px 6px}
.pos-selling-shell .cart-total{padding-top:8px;border-top:1px dashed #cad8e6;font-size:14px}
.pos-selling-shell .cart-total strong{color:#1f63e9;font-size:21px}
.pos-selling-shell .pay-methods{display:flex;flex-shrink:0;gap:5px;margin:0}
.pos-selling-shell .pay-methods button{min-height:32px;padding:5px 4px;border-color:#dce6f0;border-radius:7px;color:#5d748b;font-size:10px}
.pos-selling-shell .pay-methods button.active{border-color:#1f63e9;background:#eaf1ff;color:#1f63e9}
.pos-selling-shell .cart-status{display:none;margin:0;text-align:center;font-size:10px}
.pos-selling-shell .empty{min-height:0;padding:28px 8px;color:#8093a6;line-height:1.55;font-size:12px}
.pos-selling-shell .empty strong{margin-bottom:4px;color:#526b84;font-size:14px}
.pos-selling-shell .pos-actions{position:fixed;z-index:30;right:0;bottom:0;left:0;display:flex;align-items:center;gap:10px;min-height:76px;margin:0;padding:9px 22px;background:#fff;border-top:1px solid #d7e2ee;box-shadow:0 -5px 18px #27496c12}
.pos-selling-shell .pos-actions .command-action{min-width:118px;min-height:52px;border-color:#d6e1ed;background:#fff;color:#49647e}
.pos-selling-shell .pos-actions .command-action:hover{border-color:#8eb2ed;background:#f5f8ff;color:#1f63e9}
.pos-selling-shell .pos-actions .command-action.danger{color:#ad6060}
.pos-selling-shell .pos-action-checkout{display:flex;flex:0 0 min(360px,31vw);align-items:center;justify-content:space-between;min-height:58px!important;margin-left:auto;padding:8px 20px;border-color:#14a44d!important;border-radius:10px;background:#14a44d!important;box-shadow:0 5px 12px #14a44d2e;font-size:17px!important}
.pos-selling-shell .pos-action-checkout:hover{background:#118c41!important}
.pos-selling-shell .pos-action-checkout:disabled{opacity:.82;cursor:not-allowed;background:#69bd87!important;border-color:#69bd87!important;color:#fff!important}
.pos-selling-shell .pos-action-checkout span{font-weight:750;color:#fff!important}
.pos-selling-shell .pos-action-checkout strong{font-size:20px;color:#fff!important}

@media(max-width:1200px){
  .pos-selling-shell .pos-topbar{grid-template-columns:195px minmax(300px,1fr) auto;gap:12px;padding:0 14px}
  .pos-selling-shell .pos-layout{grid-template-columns:170px minmax(0,1fr) 360px}
  .pos-selling-shell .pos-selling .products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pos-selling-shell .pos-user-name,.pos-selling-shell .header-manage span{display:none}
  .pos-selling-shell .header-manage{width:38px;padding:8px}
  .pos-selling-shell .cart-line-controls .qty{height:48px}
  .pos-selling-shell .cart-line-controls .qty button{min-width:48px;min-height:48px;padding:4px 10px;font-size:18px}
  .pos-selling-shell .cart-line-controls .qty span{min-width:30px;font-size:13px}
}
@media(max-width:900px){
  .pos-selling-shell{overflow:auto}
  .pos-selling-shell .pos-topbar{height:auto;min-height:76px;grid-template-columns:1fr auto;grid-template-areas:"brand meta" "tools tools";padding:10px 14px;align-items:center}
  .pos-selling-shell .pos-brand{grid-area:brand}
  .pos-selling-shell .pos-header-tools{grid-area:tools}
  .pos-selling-shell .pos-user{grid-area:meta}
  .pos-selling-shell .pos-content{height:auto;min-height:calc(100dvh - 76px);padding:12px 14px 90px;overflow:visible}
  .pos-selling-shell .pos-selling{height:auto;display:block}
  .pos-selling-shell .pos-layout{display:flex;flex-direction:column;gap:12px}
  .pos-selling-shell .pos-category-rail{order:0;padding-bottom:0;overflow:visible}
  .pos-selling-shell .pos-section-label{padding-left:2px}
  .pos-selling-shell .pos-category-list{flex-direction:row;overflow-x:auto;padding:2px 2px 4px}
  .pos-selling-shell .pos-category{width:auto;min-width:max-content}
  .pos-selling-shell .pos-products{order:1}
  .pos-selling-shell .pos-selling .products-grid{grid-template-columns:repeat(3,minmax(0,1fr));flex:none;overflow:visible}
  .pos-selling-shell .cart{order:2;height:auto;min-height:410px}
  .pos-selling-shell .cart-items{min-height:100px;max-height:310px}
  .pos-selling-shell .pos-actions{padding:9px 14px}
}
@media(max-width:600px){
  .pos-selling-shell .pos-brand strong{font-size:14px}
  .pos-selling-shell .pos-header-tools{gap:6px}
  .pos-selling-shell .pos-header-search{height:46px;padding-left:36px}
  .pos-selling-shell .pos-header-search input{height:44px;min-height:44px;font-size:14px}
  .pos-selling-shell .pos-header-search .quick-action{height:36px;min-height:36px;padding:6px 8px;font-size:0}
  .pos-selling-shell .pos-header-search .quick-action svg{position:static;width:17px;height:17px}
  .pos-selling-shell .pos-quick-actions .quick-action{min-height:40px;padding:7px 9px;font-size:11px}
  .pos-selling-shell .pos-selling .products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .pos-selling-shell .product-card{min-height:198px}
  .pos-selling-shell .product-cover{height:96px}
  .pos-selling-shell .product-info{padding:9px 10px}
  .pos-selling-shell .product-info strong{font-size:13px}
  .pos-selling-shell .product-info .price{font-size:15px}
  .pos-selling-shell .pos-actions{gap:5px;padding:7px 8px}
  .pos-selling-shell .pos-actions .command-action{min-width:0;flex:1;min-height:48px;padding:7px 5px;font-size:11px}
  .pos-selling-shell .pos-action-checkout{flex:1.7;min-height:52px!important;padding:7px 10px;font-size:14px!important}
  .pos-selling-shell .pos-action-checkout strong{font-size:15px}
}

@media(min-width:701px){
  .pos-selling-shell .products-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:10px;overflow:hidden}
  .pos-selling-shell .product-card{min-height:0;height:100%}
  .pos-selling-shell .product-cover{height:88px;flex-basis:88px}
  .pos-selling-shell .product-info{min-height:0;padding:8px 11px 9px}
  .pos-selling-shell .product-info strong{min-height:30px;font-size:13px}
  .pos-selling-shell .product-info .price{font-size:16px}
}

/* Final retail POS parity overrides: mockup-aligned header, visible 4x3 grid, unobscured images and icon-led actions. */
.pos-selling-shell .pos-brand-cluster{display:flex;align-items:center;gap:16px;min-width:0}
.pos-selling-shell .pos-brand-cluster .pos-brand{display:flex;align-items:center;gap:11px;min-width:0;flex:0 1 auto;max-width:200px;overflow:hidden}
.pos-selling-shell .pos-brand-cluster .pos-brand span{min-width:0;overflow:hidden}
.pos-selling-shell .pos-brand-cluster .pos-brand strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pos-selling-shell .pos-brand-cluster .pos-brand small{color:#73879b;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pos-selling-shell .pos-brand-cluster h1{margin:0;color:#1f3550;font-size:24px;line-height:1;font-weight:800;letter-spacing:-.4px;white-space:nowrap;flex-shrink:0}
.pos-selling-shell .pos-category::before{display:none!important;content:none!important}
.pos-selling-shell .pos-category svg{display:block!important;width:22px;height:22px;flex:0 0 22px;color:#7d9abd}
.pos-selling-shell .pos-category.active svg{color:#fff}
.pos-selling-shell .stock-label{display:inline-flex!important;position:absolute!important;top:7px!important;right:7px!important;bottom:auto!important;left:auto!important;z-index:3!important;padding:2px 7px!important;border-radius:6px!important;background:rgba(255,255,255,.9)!important;color:#18324d!important;font-size:10.5px!important;font-weight:700!important;line-height:1.2!important;white-space:nowrap!important;backdrop-filter:blur(4px)!important;-webkit-backdrop-filter:blur(4px)!important;box-shadow:0 1px 4px #00000033!important;pointer-events:none!important}
.pos-selling-shell .product-photo{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;padding:0!important;object-fit:cover!important;object-position:center!important;transition:transform .2s ease}
.pos-selling-shell .product-placeholder{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:grid!important;place-items:center!important;background:linear-gradient(145deg,#1e364d,#142434)!important;color:#9bc1ee!important;font-size:32px!important;font-weight:700!important}
.pos-selling-shell .product-info small{display:block!important;color:#cbdbe8!important;font-size:10px!important;line-height:1.15!important;margin:0 0 2px!important;text-shadow:0 1px 2px #000000e6!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;opacity:.92!important}
.pos-selling-shell .product-info{min-height:0!important}
.pos-selling-shell .product-info strong{font-size:14px!important;line-height:1.2!important}
.pos-selling-shell .product-info .price{margin-top:auto!important;font-size:18px!important}
.pos-selling-shell .pos-actions{gap:10px;padding:9px 18px}
.pos-selling-shell .pos-actions .command-action{display:flex;flex:1 1 0;min-width:0;min-height:58px;align-items:center;justify-content:center;gap:10px;border-color:#d3dfed;background:#f8fbff;color:#405c78;font-size:15px;font-weight:750;box-shadow:0 2px 7px #284b7010}
.pos-selling-shell .pos-actions .command-action:hover{background:#eef5ff;border-color:#8aafe4;color:#1f63e9}
.pos-selling-shell .pos-actions .command-action.danger{background:#fff3f4;border-color:#f2d1d5;color:#c53f4d}
.pos-selling-shell .pos-actions .command-action.danger:hover{background:#ffe9eb;border-color:#e8adb5;color:#b92e3d}
.pos-selling-shell .pos-actions .command-action::before,.pos-selling-shell .pos-action-checkout::before,.pos-selling-shell .pos-action-checkout::after{display:none!important;content:none!important}
.pos-selling-shell .pos-actions .command-action svg{width:23px;height:23px;flex:0 0 23px;stroke-width:1.9}
.pos-selling-shell .pos-action-checkout{display:flex;flex:2 1 0!important;min-width:0!important;max-width:none!important;margin-left:0!important;min-height:62px!important;padding:8px 18px!important;align-items:center;justify-content:space-between;gap:14px;border-radius:11px!important;background:#14a94f!important;border-color:#14a94f!important;box-shadow:0 6px 16px #14a94f38!important}
.pos-selling-shell .pos-action-checkout .pos-checkout-label{display:inline-flex;align-items:center;gap:11px;color:#fff!important;font-size:17px;font-weight:800}
.pos-selling-shell .pos-action-checkout svg{width:24px;height:24px;flex:0 0 24px;color:#fff;stroke-width:2}
.pos-selling-shell .pos-action-checkout>svg:last-child{width:22px;height:22px}
.pos-selling-shell .pos-action-checkout strong{margin-left:auto;color:#fff!important;font-size:21px!important;white-space:nowrap}
@media(min-width:901px){
  .pos-selling-shell .pos-topbar{grid-template-columns:400px minmax(500px,1fr) auto;gap:18px}
  .pos-selling-shell .pos-content.pos-selling{height:calc(100dvh - 88px)!important;padding:14px 18px 95px!important;overflow:hidden!important}
  .pos-selling-shell .products-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:calc((100% - 20px)/3);gap:10px!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:start!important;padding:0 4px 4px 1px!important}
  .pos-selling-shell .product-card{height:100%!important;min-height:0!important}
  .pos-selling-shell .product-cover{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;flex:none!important;background:#182836!important}
}
@media(min-width:901px) and (max-width:1380px){
  .pos-selling-shell .pos-topbar{grid-template-columns:auto minmax(360px,1fr) auto;gap:12px}
  .pos-selling-shell .pos-brand-cluster{gap:12px}
  .pos-selling-shell .pos-brand-cluster h1{font-size:20px}
  .pos-selling-shell .pos-brand-cluster .pos-brand{max-width:160px;flex-basis:auto}
  .pos-selling-shell .pos-header-search{flex:1 1 200px;min-width:170px}
}
@media(max-width:900px){
  .pos-selling-shell .pos-brand-cluster h1{display:none}
  .pos-selling-shell .pos-brand-cluster .pos-brand{flex-basis:auto}
  .pos-selling-shell .stock-label{display:inline-flex!important}
}

/* POS quick sizing: live device-local controls + price-safe card geometry. */
.pos-selling-shell .pos-layout{grid-template-columns:var(--pos-category-width,180px) minmax(0,1fr) var(--pos-receipt-width,410px)!important;gap:var(--pos-gap,10px)!important}
.pos-selling-shell .pos-category-list{gap:var(--pos-gap,10px)!important}
.pos-selling-shell .pos-category{height:var(--pos-category-height,45px)!important;min-height:var(--pos-category-height,45px)!important;font-size:clamp(12px,var(--pos-product-name-size,14px),16px)!important}
.pos-selling-shell .products-grid{gap:var(--pos-gap,10px)!important}
.pos-selling-shell .product-card{position:relative!important;display:block!important;min-height:0!important;height:100%!important;overflow:hidden!important;padding:0!important;background:#182836!important;border:1px solid #c9d8e8!important;border-radius:12px!important;cursor:pointer!important;text-align:left!important}
.pos-selling-shell .product-card:hover{transform:translateY(-2px)!important;border-color:#1f63e9!important;box-shadow:0 6px 16px #1f63e92e!important}
.pos-selling-shell .product-card:hover .product-photo{transform:scale(1.04)}
.pos-selling-shell .product-card:active{transform:scale(.98)!important;box-shadow:inset 0 0 0 2px #1f63e9!important}
.pos-selling-shell .product-cover{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;flex:none!important;padding:0!important;margin:0!important;background:#182836!important}
.pos-selling-shell .product-info{position:absolute!important;inset:auto 0 0 0!important;z-index:2!important;width:100%!important;box-sizing:border-box!important;min-height:0!important;padding:26px 10px 8px!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;background:linear-gradient(to bottom,rgba(10,20,32,0) 0%,rgba(10,20,32,calc(var(--pos-product-overlay-opacity,var(--pos-card-overlay,0.78))*.48)) 25%,rgba(10,20,32,calc(var(--pos-product-overlay-opacity,var(--pos-card-overlay,0.78))*.88)) 64%,rgba(10,20,32,var(--pos-product-overlay-opacity,var(--pos-card-overlay,0.78))) 100%)!important;backdrop-filter:blur(calc(var(--pos-product-overlay-opacity,var(--pos-card-overlay,0.78))*3px))!important;-webkit-backdrop-filter:blur(calc(var(--pos-product-overlay-opacity,var(--pos-card-overlay,0.78))*3px))!important;pointer-events:none!important;overflow:visible!important}
.pos-selling-shell .product-info strong{min-height:0!important;margin:0 0 2px!important;font-size:var(--pos-product-name-size,14px)!important;line-height:1.2!important;color:#fff!important;font-weight:700!important;text-shadow:0 1px 3px #000000f2,0 0 6px #000000b3!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;text-overflow:ellipsis!important}
.pos-selling-shell .product-info .price{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:24px!important;margin-top:2px!important;overflow:visible!important;line-height:1.1!important;font-size:var(--pos-product-price-size,18px)!important;font-weight:800!important;color:#38bdf8!important;text-shadow:0 1px 3px #000000f2!important;white-space:nowrap!important}
.pos-selling-shell .add-dot{display:inline-grid!important;place-items:center!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;padding:0!important;border-radius:6px!important;background:#1f63e9!important;color:#fff!important;font-size:16px!important;font-weight:700!important;line-height:1!important;box-shadow:0 1px 4px #00000066!important;flex:0 0 auto!important}
.pos-selling-shell .pos-actions{gap:var(--pos-gap,10px)!important;min-height:calc(var(--pos-action-height,58px) + 18px)!important}
.pos-selling-shell .pos-actions .command-action{min-height:var(--pos-action-height,58px)!important;font-size:var(--pos-action-font-size,15px)!important}
.pos-selling-shell .pos-actions .command-action svg{width:var(--pos-action-icon-size,23px)!important;height:var(--pos-action-icon-size,23px)!important;flex-basis:var(--pos-action-icon-size,23px)!important}
.pos-selling-shell .pos-action-checkout{min-height:calc(var(--pos-action-height,58px) + 4px)!important;font-size:var(--pos-action-font-size,15px)!important}
.pos-selling-shell .pos-action-checkout .pos-checkout-label{font-size:calc(var(--pos-action-font-size,15px) + 2px)!important}
.pos-selling-shell .pos-action-checkout svg{width:calc(var(--pos-action-icon-size,23px) + 1px)!important;height:calc(var(--pos-action-icon-size,23px) + 1px)!important}
.pos-selling-shell .quick-settings-trigger{color:#1f63e9;background:#eef4ff;border:1px solid #d8e6fb}
.pos-selling-shell .quick-settings-trigger:hover{background:#e2edff;border-color:#a9c5ee}
.pos-selling-shell .quick-settings-trigger.active{background:#1f63e9!important;color:#fff!important;border-color:#1f63e9!important}
@media(min-width:901px){
  .pos-selling-shell .pos-content.pos-selling{padding-bottom:var(--pos-action-safe,94px)!important}
  .pos-selling-shell .products-grid{grid-auto-rows:var(--pos-card-row-size,calc((100% - var(--pos-gap,10px) - var(--pos-gap,10px))/3))!important;gap:var(--pos-gap,10px)!important}
}
@media(max-width:1200px) and (min-width:901px){
  .pos-selling-shell .pos-layout{grid-template-columns:min(var(--pos-category-width,180px),170px) minmax(0,1fr) min(var(--pos-receipt-width,410px),360px)!important}
}

#modal[open].pos-quick-settings-dialog::backdrop,#modal[open].pos-quick-dialog::backdrop,#modal[open]:has(.pos-quick-settings)::backdrop{background:rgba(10,24,38,.2)!important;backdrop-filter:blur(1px)!important;-webkit-backdrop-filter:blur(1px)!important}
#modal[open].pos-quick-settings-dialog,#modal[open].pos-quick-dialog,#modal[open]:has(.pos-quick-settings){width:min(540px,calc(100vw - 20px))!important;max-height:calc(100dvh - 30px)!important;padding:14px 16px 12px!important;border-radius:14px!important;background:rgba(255,255,255,var(--pos-settings-opacity,var(--pos-panel-opacity,.92)))!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;border:1px solid #d8e5f1d9!important;box-shadow:0 16px 36px #10283c38!important}
html[data-ui-style="midnight"] #modal[open].pos-quick-settings-dialog,html[data-ui-style="midnight"] #modal[open].pos-quick-dialog,html[data-ui-style="midnight"] #modal[open]:has(.pos-quick-settings){background:rgba(17,43,54,var(--pos-settings-opacity,var(--pos-panel-opacity,.92)))!important;border-color:#294652d9!important}
#modal[open].pos-quick-settings-dialog .modal-head,#modal[open].pos-quick-dialog .modal-head,#modal[open]:has(.pos-quick-settings) .modal-head{margin-bottom:8px!important}
#modal[open].pos-quick-settings-dialog .modal-head h2,#modal[open].pos-quick-dialog .modal-head h2,#modal[open]:has(.pos-quick-settings) .modal-head h2{font-size:16px!important}
#modal[open].pos-quick-settings-dialog .close,#modal[open].pos-quick-dialog .close,#modal[open]:has(.pos-quick-settings) .close{width:26px!important;height:26px!important;min-height:26px!important;font-size:17px!important}
.pos-quick-settings{display:grid;gap:8px}
.pos-quick-settings p.muted{font-size:11.5px;margin:0 0 2px}
.pos-ui-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.pos-ui-control{display:grid;gap:4px;padding:7px 9px;border:1px solid #dae4eed9;border-radius:9px;background:#f8fbffc0;font-weight:600}
html[data-ui-style="midnight"] .pos-ui-control{background:#173946c0;border-color:#294652d9}
.pos-ui-control>span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;line-height:1.2}
.pos-ui-control output{min-width:46px;padding:2px 5px;border-radius:5px;background:#eaf1ffe6;color:#1f63e9;font-size:11.5px;font-weight:800;text-align:right;font-variant-numeric:tabular-nums}
html[data-ui-style="midnight"] .pos-ui-control output{background:#0f2630e6;color:#60a5fa}
.pos-ui-control input[type=range]{width:100%;height:18px;min-height:18px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;accent-color:#1f63e9;cursor:pointer}
.pos-ui-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:6px;border-top:1px solid #e4eaf0cc;color:#617487;font-size:11.5px}
.pos-ui-summary .btn{flex:0 0 auto;padding:5px 12px;min-height:32px;font-size:12px;border-radius:7px}
@media(max-width:520px){.pos-ui-grid{grid-template-columns:1fr}.pos-ui-summary{align-items:stretch;flex-direction:column}.pos-ui-summary .btn{width:100%}}

/* Direct layout edit mode & in-place DnD / Resizing */
.pos-edit-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;height:42px;padding:0 18px;background:#1e293b;color:#f8fafc;font-size:13px;z-index:90;box-shadow:0 2px 8px rgba(0,0,0,0.15);border-bottom:1px solid #334155;animation:slideDown 0.15s ease-out}
@keyframes slideDown{from{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}
.pos-edit-bar-info{display:flex;align-items:center;gap:12px;min-width:0}
.pos-edit-badge{display:inline-flex;align-items:center;gap:6px;background:#2563eb;color:#fff;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:700;white-space:nowrap}
.pos-edit-badge svg{width:14px;height:14px}
.pos-edit-hint{color:#94a3b8;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos-edit-bar-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.pos-edit-bar-actions .btn{min-height:28px!important;padding:3px 10px!important;font-size:12px!important}

/* Floating edit bar does not displace pos-content */

.pos-edit-active .pos-category,
.pos-edit-active .product-card,
.pos-edit-active .pos-actions .command-action,
.pos-edit-active .pos-actions .pos-action-checkout{cursor:grab!important;user-select:none}
.pos-edit-active [draggable="true"] *{pointer-events:none}
.pos-edit-active [draggable="true"]:hover{outline:2px dashed #3b82f6!important;outline-offset:-2px}
.is-dragging{opacity:0.35!important;cursor:grabbing!important;outline:2px dashed #2563eb!important}
.drop-target-before{box-shadow:inset 0 4px 0 0 #2563eb!important}
.pos-actions .drop-target-before{box-shadow:inset 4px 0 0 0 #2563eb!important}
.drop-target-after{box-shadow:inset 0 -4px 0 0 #2563eb!important}
.pos-actions .drop-target-after{box-shadow:inset -4px 0 0 0 #2563eb!important}

.pos-card-drag-cue{position:absolute;top:6px;right:6px;z-index:10;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;background:rgba(15,23,42,0.75);color:#94a3b8;font-size:11px;font-weight:900;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}

.pos-card-resizer{position:absolute;bottom:0;right:0;width:18px;height:18px;z-index:15;cursor:nwse-resize!important;pointer-events:auto!important;background:linear-gradient(135deg,transparent 50%,#3b82f6 50%);border-bottom-right-radius:10px}
.pos-edit-active [draggable="true"] .pos-card-resizer{pointer-events:auto!important;touch-action:none}

.pos-category-rail{position:relative}
.pos-rail-resizer{position:absolute;top:0;right:-5px;bottom:0;width:10px;cursor:col-resize!important;z-index:30;pointer-events:auto!important;background:transparent;transition:background 0.2s}
.pos-rail-resizer,.pos-actions-resizer,.pos-cart-resizer{touch-action:none}
.pos-rail-resizer:hover,body.pos-resizing .pos-rail-resizer{background:#3b82f688}

.pos-actions{position:relative}
.pos-actions-resizer{position:absolute;top:-6px;left:0;right:0;height:10px;cursor:row-resize!important;z-index:30;pointer-events:auto!important;background:transparent;transition:background 0.2s}
.pos-actions-resizer:hover,body.pos-resizing .pos-actions-resizer{background:#3b82f688}

.card.cart{position:relative}
.pos-cart-resizer{position:absolute;top:0;left:-5px;bottom:0;width:10px;cursor:col-resize!important;z-index:30;pointer-events:auto!important;background:transparent;transition:background 0.2s}
.pos-cart-resizer:hover,body.pos-resizing .pos-cart-resizer{background:#3b82f688}

body.pos-resizing{user-select:none!important}
@media(max-width:600px){.pos-edit-bar{height:auto;min-height:42px;padding:5px 10px;gap:6px}.pos-edit-bar-info{gap:6px}.pos-edit-hint{display:none}.pos-edit-bar-actions{gap:4px}.pos-edit-bar-actions .btn{padding:3px 8px!important;font-size:11px!important}}


/* POS free-window editor: every major region behaves like an independent desktop window. */
.pos-selling-shell .pos-edit-launch{display:inline-flex;width:auto;min-width:64px;min-height:38px;padding:8px 10px;gap:6px;flex:0 0 auto;margin:0;background:#eef4ff;border:1px solid #d8e6fb;color:#1f63e9;font-weight:700}.pos-selling-shell .pos-edit-launch span{display:inline!important;font-size:12px;line-height:1}
body.pos-edit-mode{overflow:hidden!important}
.pos-edit-bar{position:fixed!important;top:10px!important;left:50%!important;right:auto!important;width:min(620px,calc(100vw - 28px))!important;height:auto!important;min-height:42px!important;transform:translateX(-50%)!important;border-radius:11px!important;z-index:10050!important;animation:none!important}
.pos-edit-active [data-pos-window]{outline:2px solid #3b82f6!important;outline-offset:-2px!important;box-shadow:0 0 0 1px #fff8,0 10px 30px #0f172a24!important}
.pos-edit-active [data-pos-window]:hover{outline-color:#2563eb!important}
.pos-window-editor{position:absolute!important;inset:0!important;z-index:1000!important;pointer-events:none!important;border:1px dashed #60a5fa!important;border-radius:inherit!important;box-sizing:border-box!important}
.pos-window-title{position:absolute;top:4px;left:4px;z-index:3;display:inline-flex;align-items:center;gap:6px;max-width:calc(100% - 12px);min-height:27px;padding:4px 9px;border:1px solid #93c5fd;border-radius:7px;background:#172554e8;color:#fff;font-size:11px;font-weight:800;line-height:1;white-space:nowrap;cursor:move;pointer-events:auto!important;touch-action:none;box-shadow:0 2px 8px #0f172a3d}
.pos-window-title span{font-size:14px;color:#bfdbfe}
.pos-window-resize{position:absolute;z-index:4;display:block;pointer-events:auto!important;touch-action:none}
.pos-window-resize-n,.pos-window-resize-s{left:10px;right:10px;height:10px;cursor:ns-resize}
.pos-window-resize-n{top:0}.pos-window-resize-s{bottom:0}
.pos-window-resize-e,.pos-window-resize-w{top:10px;bottom:10px;width:10px;cursor:ew-resize}
.pos-window-resize-e{right:0}.pos-window-resize-w{left:0}
.pos-window-resize-ne,.pos-window-resize-nw,.pos-window-resize-se,.pos-window-resize-sw{width:16px;height:16px}
.pos-window-resize-ne{top:0;right:0;cursor:nesw-resize}.pos-window-resize-nw{top:0;left:0;cursor:nwse-resize}.pos-window-resize-se{right:0;bottom:0;cursor:nwse-resize}.pos-window-resize-sw{left:0;bottom:0;cursor:nesw-resize}
.pos-window-resize-ne::after,.pos-window-resize-nw::after,.pos-window-resize-se::after,.pos-window-resize-sw::after{content:'';position:absolute;inset:3px;border-radius:3px;background:#3b82f6;box-shadow:0 0 0 1px #fff}
.pos-edit-active [data-pos-window] input,.pos-edit-active [data-pos-window] select,.pos-edit-active [data-pos-window] textarea,.pos-edit-active [data-pos-window] a{pointer-events:none!important}
body.pos-window-resizing,body.pos-window-resizing *{user-select:none!important}
@media(min-width:901px){
  .pos-selling-shell.pos-window-layout-active{position:relative!important;width:100%!important;height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;background:#eef3f9!important}
  .pos-window-layout-active .pos-content.pos-selling,.pos-window-layout-active .pos-layout{position:static!important;display:block!important;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important}
  .pos-window-layout-active [data-pos-window]{position:absolute!important;box-sizing:border-box!important;margin:0!important;max-width:none!important;max-height:none!important}
  .pos-window-layout-active .pos-selling-header{display:grid!important;right:auto!important;bottom:auto!important}
  .pos-window-layout-active .pos-category-rail{padding:8px!important;overflow:auto!important;background:#eef3f9!important;border-radius:10px}
  .pos-window-layout-active .pos-products{display:flex!important;flex-direction:column!important;min-width:0!important;min-height:0!important;overflow:hidden!important;padding:0!important}
  .pos-window-layout-active .pos-products .products-grid{flex:1 1 auto!important;width:100%!important;height:100%!important;min-height:0!important;overflow:auto!important}
  .pos-window-layout-active .cart{display:flex!important;flex-direction:column!important;right:auto!important;bottom:auto!important;overflow:hidden!important}
  .pos-window-layout-active .cart .cart-body{min-height:0!important;flex:1 1 auto!important;overflow:hidden!important}
  .pos-window-layout-active .cart .cart-items{min-height:0!important;flex:1 1 auto!important;overflow:auto!important}
  .pos-window-layout-active .cart .cart-totals,.pos-window-layout-active .cart .pay-methods{flex-shrink:0!important}
  .pos-window-layout-active .pos-actions{position:absolute!important;left:auto;right:auto!important;bottom:auto!important;top:auto;display:flex!important;min-width:0!important;min-height:0!important;padding:8px 12px!important;border:1px solid #d7e2ee!important;border-radius:11px!important;box-shadow:0 6px 18px #27496c18!important;overflow:visible!important}
}
@media(max-width:900px){.pos-window-editor{display:none!important}.pos-edit-bar{top:6px!important;width:calc(100vw - 12px)!important}}

/* POS edit controls, inline customer picker, and desktop header collision fix. */
.pos-selling-shell .pos-edit-anchor{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.pos-selling-shell .pos-edit-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:10060;display:grid;min-width:142px;padding:5px;border:1px solid #cddbea;border-radius:10px;background:#fff;box-shadow:0 12px 28px #10283c2e}
.pos-selling-shell .pos-edit-menu-row{width:100%;min-height:34px;justify-content:flex-start;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:#405c78;font-size:12px;text-align:left}
.pos-selling-shell .pos-edit-menu-row:hover,.pos-selling-shell .pos-edit-menu-row:focus-visible{background:#eef5ff;color:#1f63e9}
.pos-selling-shell .pos-edit-menu-row.primary{background:#1f63e9;color:#fff}
.pos-selling-shell .pos-section-label{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pos-selling-shell .pos-catalog-add{min-height:30px;padding:5px 8px;font-size:11px;white-space:nowrap}
.pos-selling-shell .pos-products-edit-tools{display:flex;justify-content:flex-end;min-height:34px;margin:0 2px 6px}
.pos-selling-shell .pos-edit-affordance{display:inline-flex;align-items:center;justify-content:center;color:#60a5fa;font-weight:800;pointer-events:none}
.pos-selling-shell .pos-category .pos-edit-affordance{margin-left:auto;width:20px;height:20px;border-radius:5px;background:#e8f1ff;font-size:13px}
.pos-selling-shell .pos-product-edit-affordance{position:absolute;top:6px;right:33px;z-index:10;width:22px;height:22px;border-radius:4px;background:#172554d9;color:#bfdbfe;font-size:13px}
.pos-selling-shell .pos-actions>.pos-action-item{position:relative;display:flex;align-items:stretch;flex:var(--pos-action-item-width,1) 1 0;min-width:72px;margin:0}
.pos-selling-shell .pos-actions>.pos-action-item .command-action{width:100%;height:var(--pos-action-item-height,var(--pos-action-height,58px))!important;min-height:var(--pos-action-item-height,var(--pos-action-height,58px))!important;flex:1 1 auto!important}
.pos-action-resizer{display:none}
.pos-edit-active .pos-action-resizer{position:absolute;right:2px;bottom:2px;z-index:20;display:block;width:18px;height:18px;border-radius:5px;background:linear-gradient(135deg,transparent 45%,#3b82f6 46%,#3b82f6 62%,transparent 63%,transparent 70%,#3b82f6 71%);cursor:nwse-resize;touch-action:none}
.pos-edit-active .pos-action-resizer:hover{background:#2563eb}
.pos-selling-shell .pos-header-search input{width:auto;min-width:0;flex:1 1 auto}
.pos-selling-shell .pos-header-search>svg{pointer-events:none;z-index:1}
.pos-selling-shell .pos-header-search>.quick-action{width:40px;min-width:40px;flex:0 0 40px;padding:7px 8px;font-size:0}
.pos-selling-shell .pos-header-search>.quick-action svg{position:static;width:18px;height:18px}
.pos-selling-shell .pos-quick-actions .quick-action[aria-label="Thêm hàng hóa"]{width:44px;min-width:44px;padding:9px 10px;font-size:0}
.pos-selling-shell .pos-quick-actions .quick-action[aria-label="Thêm hàng hóa"] svg{width:18px;height:18px}
html[data-ui-style="midnight"] .pos-selling-shell.pos-window-layout-active{background:#0b1e27!important;color:#e7f1f3}
html[data-ui-style="midnight"] .pos-selling-shell .pos-category-rail{background:#102b36!important}
html[data-ui-style="midnight"] .pos-selling-shell .pos-category{background:#112b36;color:#e7f1f3;border-color:#294652}
html[data-ui-style="midnight"] .pos-selling-shell .pos-category.active{background:#1f7775;color:#fff;border-color:#45b8b2}
html[data-ui-style="midnight"] .pos-selling-shell .pos-actions{background:#112b36!important;border-color:#294652!important}
html[data-ui-style="midnight"] .pos-selling-shell .pos-actions .command-action{background:#173946;color:#e7f1f3;border-color:#294652}
html[data-ui-style="midnight"] .pos-selling-shell .pos-actions .command-action.danger{background:#452c35;color:#ffd7dc;border-color:#71414d}
html[data-ui-style="midnight"] .pos-selling-shell .pos-edit-menu{background:#112b36;border-color:#294652}
html[data-ui-style="midnight"] .pos-selling-shell .pos-edit-menu-row{color:#e7f1f3}
.pos-selling-shell.pos-window-layout-active [data-pos-window="header"]{z-index:20000!important;overflow:visible!important}
html[data-ui-style="midnight"] .pos-selling-shell .pos-edit-menu-row:hover{background:#173946;color:#60a5fa}
html[data-ui-style="midnight"] .pos-selling-shell .pos-edit-menu-row.primary{background:#1f7775;color:#fff}

/* POS remediation: held orders, discount editor, and bounded mobile controls. */
.pos-selling-shell .held-orders-trigger{white-space:nowrap}
.pos-selling-shell .held-orders-trigger .held-count{display:inline-grid;min-width:22px;min-height:22px;place-items:center;padding:0 5px;border-radius:999px;background:#eaf1ff;color:#1f63e9;font-size:11px;font-weight:800;line-height:1}
.pos-mobile-cart-summary{display:none}
.pos-selling-shell .discount-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:36px;padding:5px 8px;border:1px dashed #c9d8e7;border-radius:7px;background:#f8fbff;color:#587089;text-align:left;font-size:11px}
.pos-selling-shell .discount-trigger strong{color:#1f63e9;font-size:11px;white-space:nowrap}
.discount-mode-toggle{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.discount-mode-toggle .btn{min-height:48px}
.discount-mode-toggle .btn.active{border-color:#1f63e9;background:#eaf1ff;color:#1f63e9}
.discount-editor-input{display:flex;align-items:center;gap:8px}
.discount-editor-input input{min-width:0}
.discount-editor-input b{min-width:26px;color:var(--muted);font-size:16px}
.discount-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.discount-presets .btn{min-height:46px;padding:8px 5px}
.discount-editor-error[hidden]{display:none}
.discount-editor-total{padding:10px 12px;border-radius:8px;background:#eef8f2;color:#2c6550;font-size:14px}
.discount-editor-total b{color:#118c41;font-size:18px}
.held-orders{display:grid;gap:10px;max-height:62dvh;overflow:auto;padding:2px}
.held-order{padding:12px;border:1px solid #d8e4ef;border-radius:10px;background:#f8fbff}
.held-order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.held-order-head>div{display:grid;gap:3px;min-width:0}
.held-order-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.held-order-head small{font-size:11px}
.held-order>p{margin:8px 0;color:#60768b;font-size:12px;line-height:1.4}
.held-order .form-actions{gap:7px;margin-top:0}
.held-order .form-actions .btn{min-height:44px;padding:8px 10px}
html[data-ui-style="midnight"] .pos-selling-shell .held-orders-trigger .held-count{background:#173946;color:#60a5fa}
html[data-ui-style="midnight"] .pos-selling-shell .discount-trigger{background:#173946;color:#c4d5df;border-color:#294652}
html[data-ui-style="midnight"] .discount-mode-toggle .btn.active{background:#173946;color:#60a5fa;border-color:#45b8b2}
html[data-ui-style="midnight"] .discount-editor-total{background:#173d3e;color:#b9e4d0}
html[data-ui-style="midnight"] .held-order{background:#112b36;border-color:#294652}

@media(max-width:900px){
  .pos-selling-shell .pos-mobile-cart-summary{display:flex;position:sticky;top:6px;z-index:24;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;margin:0 0 10px;padding:8px 11px;border:1px solid #cbdced;border-radius:10px;background:#fff;color:#49647e;box-shadow:0 4px 12px #27496c18;text-align:left}
  .pos-selling-shell .pos-mobile-cart-summary>span:first-child{display:grid;gap:1px;min-width:0}
  .pos-selling-shell .pos-mobile-cart-summary b{color:#253f59;font-size:13px}
  .pos-selling-shell .pos-mobile-cart-summary small{font-size:10px}
  .pos-selling-shell .pos-mobile-cart-summary>strong{margin-left:auto;color:#1f63e9;font-size:14px;white-space:nowrap}
  .pos-selling-shell .pos-mobile-cart-summary>span:last-child{padding:6px 8px;border-radius:6px;background:#eaf1ff;color:#1f63e9;font-size:11px;font-weight:800;white-space:nowrap}
  .pos-selling-shell .products-grid{grid-auto-rows:198px!important;align-content:start!important}
  .pos-selling-shell .product-card{height:198px!important;min-height:198px!important}
  .pos-selling-shell .pos-category{min-height:48px!important}
  .pos-selling-shell .pos-content{padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}
  .pos-selling-shell .cart{scroll-margin-top:72px}
}

@media(max-width:600px){
  .pos-selling-shell .pos-quick-actions{gap:6px;overflow-x:auto;padding-bottom:1px}
  .pos-selling-shell .pos-quick-actions .held-orders-trigger{font-size:11px;min-height:40px;padding:7px 9px}
  .pos-selling-shell .pos-actions{gap:5px;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;min-height:calc(76px + env(safe-area-inset-bottom))!important}
  .pos-selling-shell .pos-actions>.pos-action-item{min-width:0!important}
  .pos-selling-shell .pos-actions .command-action{flex-direction:column;gap:2px;min-width:0!important;min-height:58px!important;padding:5px 2px!important;font-size:10px!important;line-height:1.05;white-space:nowrap}
  .pos-selling-shell .pos-actions .command-action svg{width:20px!important;height:20px!important;flex-basis:20px!important}
  .pos-selling-shell .pos-action-checkout{min-height:62px!important;padding:6px 8px!important;gap:4px}
  .pos-selling-shell .pos-action-checkout .pos-checkout-label{gap:4px;font-size:12px!important}
  .pos-selling-shell .pos-action-checkout strong{font-size:14px!important}
  .discount-presets{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Retail POS remediation: durable held-order affordances, touch targets, and receipt dialog. */
.pos-selling-shell .held-count,
.pos-selling-shell .pos-hold-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#eaf1ff;color:#1f63e9;font-size:12px;font-weight:800;line-height:1}
.pos-selling-shell .pos-action-checkout .held-count{background:#fff;color:#1f63e9}
.pos-selling-shell .discount-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:8px 10px;border:1px solid #d6e1ed;border-radius:8px;background:#f8fbff;color:#405c78;text-align:left}
.pos-selling-shell .discount-trigger strong{color:#1f63e9;font-size:12px;white-space:nowrap}
.held-orders{display:grid;gap:10px}
.held-order{display:grid;gap:8px;padding:12px;border:1px solid #dce6f0;border-radius:10px;background:#f8fbff}
.held-order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.held-order-head>div{min-width:0}
.held-order-head strong{display:block;color:#253f5b}
.held-order-head small{display:block;margin-top:4px;font-size:11px}
.held-order>p{margin:0;color:#5b7085;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.held-order .form-actions{justify-content:flex-start;margin-top:0}
.held-order .form-actions .btn{min-height:40px}
.discount-editor{gap:12px}
.discount-mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.discount-mode-toggle .btn{min-height:46px}
.discount-mode-toggle .btn.active{border-color:#1f63e9;background:#eaf1ff;color:#1f63e9}
.discount-editor-input{display:flex;align-items:center;gap:8px}
.discount-editor-input input{flex:1;text-align:right}
.discount-editor-input b{min-width:24px;color:var(--muted)}
.discount-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.discount-presets .btn{min-height:42px;padding:7px 4px;font-size:12px}
.discount-editor-error{margin:0!important;padding:9px 10px!important;font-size:12px!important}
.discount-editor-total{padding:12px;border:1px solid #cfe0f5;border-radius:9px;background:#f1f6ff;color:#405c78;font-size:14px}
.discount-editor-total b{color:#1f63e9;font-size:18px}
.pos-mobile-cart-summary{display:none}
dialog[open]:has(.receipt-dialog){width:min(700px,calc(100vw - 24px));padding:18px 20px 20px}
.receipt-dialog{display:grid;gap:14px}
.receipt-dialog .print-preview{width:min(520px,100%);padding:20px;font-size:14px;box-shadow:0 3px 14px #10283c12;border:1px solid #e4eaed;border-radius:10px}
.receipt-dialog .receipt-header h2{font-size:22px}
.receipt-dialog .receipt-header h3{font-size:16px!important}
.receipt-dialog .receipt-header p,.receipt-dialog> .print-preview>p{margin:7px 0}
.receipt-dialog .receipt-table{margin:16px 0}
.receipt-dialog .receipt-table td,.receipt-dialog .receipt-table th{padding:8px 4px;font-size:13px}
.receipt-dialog .receipt-summary{padding-top:12px}
.receipt-dialog .receipt-summary p{padding:6px 0}
.receipt-dialog .receipt-summary p[style]{font-size:18px!important}
.receipt-actions{justify-content:center;margin:0 auto;max-width:520px;width:100%}
.receipt-actions .btn{min-height:48px;padding:11px 16px}

@media(max-width:900px){
  .pos-selling-shell{width:100%;max-width:100%;overflow-x:hidden!important}
  .pos-selling-shell .pos-content.pos-selling{width:100%;max-width:100%;padding:10px 10px 104px!important;overflow:visible!important}
  .pos-selling-shell .pos-mobile-cart-summary{display:flex;position:sticky;top:0;z-index:25;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:56px;margin:0 0 10px;padding:8px 12px;border:1px solid #cfe0f5;border-radius:11px;background:#fff;box-shadow:0 5px 15px #27496c18;color:#405c78;text-align:left}
  .pos-selling-shell .pos-mobile-cart-summary span:first-child{display:grid;gap:2px;min-width:0}
  .pos-selling-shell .pos-mobile-cart-summary span:first-child b{font-size:13px;color:#253f5b}
  .pos-selling-shell .pos-mobile-cart-summary span:first-child small{font-size:10px}
  .pos-selling-shell .pos-mobile-cart-summary>strong{margin-left:auto;color:#1f63e9;font-size:16px;white-space:nowrap}
  .pos-selling-shell .pos-mobile-cart-summary>span:last-child{padding:7px 9px;border-radius:7px;background:#eaf1ff;color:#1f63e9;font-size:12px;font-weight:800;white-space:nowrap}
  .pos-selling-shell .pos-category-rail{width:100%;min-width:0;order:0!important}
  .pos-selling-shell .pos-category-list{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;width:100%;min-width:0;overflow-x:auto!important;overflow-y:hidden;padding:2px 2px 6px!important;scrollbar-width:thin}
  .pos-selling-shell .pos-category{flex:0 0 auto;width:auto!important;min-width:112px;min-height:44px!important;height:44px!important;padding:8px 12px!important;font-size:13px!important}
  .pos-selling-shell .pos-products{width:100%;min-width:0;order:1!important}
  .pos-selling-shell .pos-selling .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%;min-width:0;overflow:visible!important}
  .pos-selling-shell .product-card{width:100%;min-width:0!important;height:174px!important;min-height:174px!important}
  .pos-selling-shell .product-info{padding:34px 9px 8px!important}
  .pos-selling-shell .product-info strong{font-size:14px!important;line-height:1.25!important}
  .pos-selling-shell .product-info .price{font-size:16px!important}
  .pos-selling-shell .add-dot{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;font-size:17px!important}
  .pos-selling-shell .stock-label{top:7px!important;right:7px!important;font-size:10.5px!important}
  .pos-selling-shell .cart{order:2!important;width:100%;min-width:0;min-height:0;height:auto!important;margin-top:2px;scroll-margin-top:72px}
  .pos-selling-shell .cart-body{min-width:0}
  .pos-selling-shell .pos-actions{display:flex!important;gap:5px!important;min-height:74px!important;padding:8px!important;overflow:hidden!important}
  .pos-selling-shell .pos-actions>.pos-action-item{min-width:0!important;flex:var(--pos-action-item-width,1) 1 0!important}
  .pos-selling-shell .pos-actions>.pos-action-item[data-pos-action-item-key="checkout"]{flex-grow:2!important}
  .pos-selling-shell .pos-actions .command-action{min-width:0!important;min-height:54px!important;padding:7px 4px!important;gap:4px!important;font-size:11px!important;white-space:normal}
  .pos-selling-shell .pos-actions .command-action>span:not(.held-count):not(.pos-hold-count){min-width:0;overflow:hidden;text-overflow:ellipsis}
  .pos-selling-shell .pos-actions .command-action svg{width:20px!important;height:20px!important;flex-basis:20px!important}
  .pos-selling-shell .pos-action-checkout{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:2px!important;min-width:0!important;min-height:54px!important;padding:4px 6px!important;box-sizing:border-box!important}
  .pos-selling-shell .pos-action-checkout>svg:last-child{display:none!important}
  .pos-selling-shell .pos-action-checkout .pos-checkout-label{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;font-size:11.5px!important;line-height:1.1!important;width:100%!important}
  .pos-selling-shell .pos-action-checkout .pos-checkout-label svg{width:16px!important;height:16px!important;flex:0 0 16px!important}
  .pos-selling-shell .pos-action-checkout .pos-checkout-label>span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .pos-selling-shell .pos-action-checkout strong{margin:0!important;font-size:13px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:center!important;width:100%!important}
  .pos-selling-shell .discount-trigger{min-height:46px}
}
@media(max-width:600px){
  .pos-selling-shell .pos-header-tools{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;width:100%;gap:6px}
  .pos-selling-shell .pos-header-search{flex:none;min-width:0;width:100%}
  .pos-selling-shell .pos-header-search input{min-width:0;font-size:14px}
  .pos-selling-shell .pos-quick-actions{display:flex;flex:0 0 auto;justify-content:flex-end;gap:4px;min-width:0;width:100%;overflow-x:auto}
  .pos-selling-shell .pos-quick-actions .quick-action:first-child{width:40px;min-width:40px;padding:8px;font-size:0}
  .pos-selling-shell .pos-quick-actions .quick-action:first-child svg{width:18px;height:18px}
  .pos-selling-shell .pos-quick-actions .quick-action[aria-label="Thêm hàng hóa"]{width:40px;min-width:40px;padding:8px}
  .pos-selling-shell .pos-content.pos-selling{padding-left:8px!important;padding-right:8px!important}
  .discount-presets{grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog[open]:has(.receipt-dialog){padding:12px}
  .receipt-dialog .print-preview{padding:14px}
}

/* Restaurant table-first POS landing and service context. */
.business-mode-box{display:grid;gap:12px;padding:18px;border:1px solid var(--line);border-radius:13px;background:linear-gradient(145deg,#f7fbfb,#f0f7f6)}
.business-mode-box h3{margin-bottom:5px}
.business-mode-box p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.restaurant-landing{display:flex;flex-direction:column;gap:18px;min-height:0;overflow:auto;padding-bottom:20px}
.restaurant-landing-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:8px 2px 2px}
.restaurant-landing-head h1{margin:5px 0 7px;font-size:28px;color:#18333b}
.restaurant-landing-head p,.restaurant-takeaway-card p,.restaurant-section-heading p{color:var(--muted);font-size:14px;line-height:1.5}
.restaurant-kicker{display:block;color:#16806e;font-size:11px;font-weight:800;letter-spacing:1.5px}
.restaurant-landing-stats{display:grid;justify-items:end;gap:2px;padding:12px 16px;border:1px solid #cfe4df;border-radius:12px;background:#f1faf6;color:#2b6d61;white-space:nowrap}
.restaurant-landing-stats strong{font-size:25px;color:#146b60}
.restaurant-landing-stats span{font-size:12px}
.restaurant-takeaway-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border-color:#b7dcd0;background:linear-gradient(110deg,#e9f8f1,#f6fbff)}
.restaurant-takeaway-card h2{margin:4px 0 6px;color:#18333b}
.restaurant-takeaway-card .btn{min-height:54px;padding-inline:22px;background:#106c64;border-color:#106c64;white-space:nowrap}
.restaurant-tables-section{display:flex;flex-direction:column;gap:12px}
.restaurant-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.restaurant-section-heading h2{margin-bottom:4px}
.restaurant-table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.restaurant-table-card{display:flex;min-height:166px;flex-direction:column;align-items:flex-start;gap:6px;padding:18px;text-align:left;border:1px solid #d6e2e5;border-radius:14px;background:#fff;color:#18333b;box-shadow:0 3px 12px #183b3510;transition:transform .15s,border-color .15s,box-shadow .15s}
.restaurant-table-card:hover{transform:translateY(-2px);border-color:#88c6b6;box-shadow:0 7px 18px #183b351c}
.restaurant-table-card:active{transform:scale(.985)}
.restaurant-table-card.empty{background:linear-gradient(145deg,#fff,#f8fbfc)}
.restaurant-table-card.occupied{border-color:#9ed0ad;background:linear-gradient(145deg,#f3fbf4,#fff)}
.restaurant-table-card.reserved{border-color:#e7c27f;background:linear-gradient(145deg,#fff9ed,#fff)}
.restaurant-table-card.reserved .restaurant-table-icon{background:#fff0cf;color:#b17a1f}
.restaurant-table-card.reserved .restaurant-table-status{color:#a56c15}
.restaurant-table-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:#eaf6f1;color:#167a69}
.restaurant-table-card.occupied .restaurant-table-icon{background:#dff2df;color:#2f8b4a}
.restaurant-table-icon svg{width:25px;height:25px}
.restaurant-table-name{margin-top:2px;font-size:18px;font-weight:800}
.restaurant-table-status{font-size:12px;font-weight:750;color:#71848b}
.restaurant-table-card.occupied .restaurant-table-status{color:#2d8a4d}
.restaurant-table-card strong{font-size:14px;color:#254854}
.restaurant-table-card small{display:block;overflow:hidden;width:100%;color:#6c8087;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.restaurant-pos-context{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 10px;padding:10px 14px;border:1px solid #cfe0ef;border-radius:10px;background:#f7fbff;color:#294965}
.restaurant-pos-context>div:first-child{display:grid;gap:2px;min-width:0}
.restaurant-pos-context>div:first-child strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.restaurant-pos-context .restaurant-kicker{color:#1f63e9;font-size:10px;letter-spacing:1.1px}
.restaurant-pos-context-actions{display:flex;flex:0 0 auto;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.restaurant-pos-context-actions .btn{min-height:38px;padding:7px 11px;font-size:12px}
.restaurant-pos-context-actions .btn.primary{background:#106c64;border-color:#106c64}
.restaurant-pos-context-actions .btn.danger{background:#fff3f4;border-color:#f2d1d5;color:#c53f4d}
.restaurant-pos-context-actions .btn.danger:hover{background:#ffe9eb;border-color:#e8adb5;color:#b92e3d}
.restaurant-pos-context>div:first-child small{color:#55707b;font-size:11px}
.restaurant-operations{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px}
.restaurant-operations h2{margin:0 0 5px;font-size:18px}
.restaurant-operations p{color:var(--muted);font-size:13px}
.table-move-line,.reservation-row{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}
.table-move-line:last-child,.reservation-row:last-child{border-bottom:0}
.table-move-line input{width:100px;min-width:80px}
.reservation-row small{display:block;margin-top:4px}
@media(max-width:700px){
  .restaurant-landing{padding-bottom:10px}
  .restaurant-landing-head{align-items:flex-start;flex-direction:column;gap:12px}
  .restaurant-landing-head h1{font-size:24px}
  .restaurant-landing-stats{justify-items:start;width:100%}
  .restaurant-takeaway-card{align-items:stretch;flex-direction:column;padding:18px}
  .restaurant-takeaway-card .btn{width:100%}
  .restaurant-table-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .restaurant-table-card{min-height:154px;padding:14px}
  .restaurant-table-name{font-size:16px}
  .restaurant-pos-context{align-items:stretch;flex-direction:column;gap:10px;margin-bottom:8px;padding:10px}
  .restaurant-pos-context-actions{justify-content:stretch}
  .restaurant-pos-context-actions .btn{flex:1 1 0}
  .restaurant-operations{align-items:stretch;flex-direction:column;gap:12px;padding:16px}
  .restaurant-operations .form-actions{justify-content:stretch}
  .restaurant-operations .form-actions .btn{flex:1 1 45%}
  .table-move-line{align-items:flex-start}
  .table-move-line input{margin-left:auto}
}

/* Loyalty & Membership checkout */
.loyalty-checkout{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid #c7e5df;border-radius:10px;background:linear-gradient(135deg,#f2fbf7,#e8f6f2);box-sizing:border-box;max-width:100%;width:100%}
.loyalty-checkout-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.loyalty-checkout-head strong{display:block;font-size:14px;color:#106c64}
.loyalty-checkout-head small{color:var(--muted);font-size:12px}
.loyalty-checkout label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.loyalty-checkout input[name="loyaltyRedeemPoints"]{width:100%;box-sizing:border-box;font-size:16px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}
.loyalty-checkout .note{margin:0;font-size:12px;color:var(--muted)}

/* Screenshot workflow: one accessible POS tools menu, live cart counts, and checkout-only payment detail. */
.pos-selling-shell .pos-tools-anchor{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.pos-selling-shell .pos-tools-trigger{display:inline-flex;align-items:center;gap:6px;width:auto;min-width:44px;padding:8px 10px;border-radius:8px}
.pos-selling-shell .pos-tools-trigger.active,.pos-selling-shell .pos-tools-trigger[aria-expanded="true"]{background:#eaf1ff;color:#1f63e9;box-shadow:inset 0 0 0 1px #9fc0f5}
.pos-selling-shell .pos-tools-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:10060;display:grid;min-width:220px;padding:6px;border:1px solid #cddbea;border-radius:11px;background:#fff;box-shadow:0 12px 28px #10283c2e}
.pos-selling-shell .pos-tools-menu-row{display:flex;align-items:center;justify-content:flex-start;gap:9px;width:100%;min-height:46px;padding:9px 11px;border:0;border-radius:8px;background:transparent;color:#405c78;font-size:13px;text-align:left;text-decoration:none}
.pos-selling-shell .pos-tools-menu-row svg{flex:0 0 18px;width:18px;height:18px}
.pos-selling-shell .pos-tools-menu-row:hover,.pos-selling-shell .pos-tools-menu-row:focus-visible,.pos-selling-shell .pos-tools-menu-row.active{background:#eef5ff;color:#1f63e9}
.pos-selling-shell .pos-tools-menu .pos-edit-menu{position:static;display:grid;min-width:0;margin:5px 0 0;padding:5px 0 0;border:0;border-top:1px solid #dbe6f1;border-radius:0;background:transparent;box-shadow:none}
.pos-selling-shell .pos-tools-menu .pos-edit-menu-row{min-height:40px;padding:8px 11px}
.pos-selling-shell .pos-category-count{display:inline-grid;min-width:24px;height:22px;align-items:center;justify-content:center;margin-left:auto;padding:0 6px;border:1px solid #d7e4f1;border-radius:999px;background:#f3f7fc;color:#5f7892;font-size:11px;font-weight:800;line-height:1}
.pos-selling-shell .pos-category.active .pos-category-count{border-color:#fff8;background:#fff;color:#1f63e9}
.pos-selling-shell .product-card.is-out-of-stock{cursor:not-allowed;opacity:.68}
.pos-selling-shell .product-card.is-out-of-stock .add-dot{background:#edf1f5;color:#8495a4}
.checkout-summary{display:grid;gap:9px;padding:13px 14px;border:1px solid #d8e4ef;border-radius:10px;background:#f8fbff}
.checkout-summary>div:first-child,.checkout-summary>.cart-total{display:flex;align-items:center;justify-content:space-between;gap:12px}
.checkout-summary>.cart-total{padding-top:10px}
.checkout-summary>.cart-total strong{font-size:27px}
.checkout-discount label{display:grid;grid-template-columns:minmax(0,1fr) minmax(132px,42%);align-items:end;gap:8px;font-size:13px}
.checkout-discount label>select{min-height:44px}
.checkout-discount .discount-editor-input{min-width:0}
.checkout-discount .discount-editor-input input{text-align:right}
.checkout-discount-error{margin:0!important;padding:8px 10px!important;font-size:12px!important}
.checkout-methods{display:grid;gap:8px;margin:0;padding:0;border:0}
.checkout-methods legend{padding:0;color:#405c78;font-size:13px;font-weight:700}
.payment-options{display:flex;gap:8px;width:100%}
.payment-option{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;min-height:48px;padding:9px 8px;border:1px solid #d6e1ed;border-radius:8px;background:#fff;color:#49647e;font-size:13px;font-weight:700;text-align:center;cursor:pointer}
.payment-option:has(input:checked),.payment-option.active{border-color:#1f63e9;background:#eaf1ff;color:#1f63e9;box-shadow:inset 0 0 0 1px #9fc0f5}
.payment-option input{position:absolute;width:1px;height:1px;min-height:1px;opacity:0;pointer-events:none}
.checkout-payment-note{margin:0}
.checkout-secondary-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:4px;border-top:1px solid #e4ebf3}
.checkout-secondary-actions small{color:#6c8194;font-size:12px}
.return-order-picker{display:grid;gap:8px;max-height:62dvh;overflow:auto}
.return-order-option{display:flex;align-items:center;gap:12px;padding:11px 12px;border:1px solid #d8e4ef;border-radius:9px;background:#f8fbff}
.return-order-option .grow{min-width:0}
.return-order-option strong,.return-order-option small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.return-order-option small{margin-top:4px;color:#6c8194;font-size:11px}
.return-order-items{display:grid;max-height:260px;overflow:auto;padding:0 4px}
html[data-ui-style="midnight"] .pos-selling-shell .pos-tools-menu{background:#112b36;border-color:#294652}
html[data-ui-style="midnight"] .pos-selling-shell .pos-tools-menu-row{color:#e7f1f3}
html[data-ui-style="midnight"] .pos-selling-shell .pos-tools-menu-row:hover,html[data-ui-style="midnight"] .pos-selling-shell .pos-tools-menu-row:focus-visible,html[data-ui-style="midnight"] .pos-selling-shell .pos-tools-menu-row.active{background:#173946;color:#60a5fa}
html[data-ui-style="midnight"] .pos-selling-shell .pos-category-count{border-color:#294652;background:#173946;color:#b5cbd5}
html[data-ui-style="midnight"] .checkout-summary,html[data-ui-style="midnight"] .payment-option,html[data-ui-style="midnight"] .return-order-option{background:#112b36;border-color:#294652;color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-methods legend,html[data-ui-style="midnight"] .checkout-secondary-actions small{color:#b5cbd5}
@media(max-width:600px){
  .pos-selling-shell .pos-tools-menu{right:-4px;min-width:min(230px,calc(100vw - 18px))}
  .pos-selling-shell .pos-tools-trigger span{display:none}
  .payment-options{grid-template-columns:1fr}
  .checkout-discount label{grid-template-columns:1fr}
}
.pos-shell .pos-tools-anchor{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}
.pos-shell .pos-tools-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:10060;display:grid;min-width:220px;padding:6px;border:1px solid #cddbea;border-radius:11px;background:#fff;box-shadow:0 12px 28px #10283c2e}
.pos-shell .pos-tools-menu-row{display:flex;align-items:center;justify-content:flex-start;gap:9px;width:100%;min-height:46px;padding:9px 11px;border:0;border-radius:8px;background:transparent;color:#405c78;font-size:13px;text-align:left;text-decoration:none}
.pos-shell .pos-tools-menu-row svg{flex:0 0 18px;width:18px;height:18px}
.pos-shell .pos-tools-menu-row:hover,.pos-shell .pos-tools-menu-row:focus-visible,.pos-shell .pos-tools-menu-row.active{background:#eef5ff;color:#1f63e9}
.pos-shell .pos-tools-menu .pos-edit-menu{position:static;display:grid;min-width:0;margin:5px 0 0;padding:5px 0 0;border:0;border-top:1px solid #dbe6f1;border-radius:0;background:transparent;box-shadow:none}
html[data-ui-style="midnight"] .pos-shell .pos-tools-menu{background:#112b36;border-color:#294652}
html[data-ui-style="midnight"] .pos-shell .pos-tools-menu-row{color:#e7f1f3}
html[data-ui-style="midnight"] .pos-shell .pos-tools-menu-row:hover,html[data-ui-style="midnight"] .pos-shell .pos-tools-menu-row:focus-visible,html[data-ui-style="midnight"] .pos-shell .pos-tools-menu-row.active{background:#173946;color:#60a5fa}
.pos-shell .pos-user>span.pos-tools-anchor{display:inline-flex}
.pos-edit-active .pos-tools-anchor{z-index:20010!important}
dialog[open]:has(#checkout-form),dialog[open]:has(.checkout-dialog){width:min(560px,calc(100vw - 24px));max-height:min(90vh,90dvh);padding:16px 20px 14px;border:1px solid #cddbea;border-radius:14px;box-shadow:0 20px 48px rgba(16,40,60,.22);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
dialog[open]:has(#checkout-form) .modal-head,dialog[open]:has(.checkout-dialog) .modal-head{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
dialog[open]:has(#checkout-form) .modal-head h2,dialog[open]:has(.checkout-dialog) .modal-head h2{font-size:20px;font-weight:750;color:#1b2c36}
dialog[open]:has(#checkout-form) .close,dialog[open]:has(.checkout-dialog) .close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;background:#f0f4f6;border:1px solid #ccd7dd;color:#354b54;font-size:22px;font-weight:700;cursor:pointer;touch-action:manipulation;transition:all .15s ease}
dialog[open]:has(#checkout-form) .close:hover,dialog[open]:has(#checkout-form) .close:focus-visible,dialog[open]:has(.checkout-dialog) .close:hover,dialog[open]:has(.checkout-dialog) .close:focus-visible{background:#dfe8ec;color:#112b36;border-color:#9eb5c0}
#checkout-form{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;gap:0}
#checkout-form .checkout-fixed-top{flex-shrink:0;display:grid;gap:10px;padding-bottom:10px}
#checkout-form .checkout-scroll-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:grid;gap:12px;padding:4px 2px 8px}
#checkout-form .checkout-footer{flex-shrink:0;padding-top:10px;border-top:1px solid #d8e4ef;background:#fff}
#checkout-form .checkout-footer .form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:0}
#checkout-form .checkout-footer button[type="submit"]:disabled{opacity:.5;cursor:not-allowed}
html[data-ui-style="midnight"] dialog[open]:has(#checkout-form),html[data-ui-style="midnight"] dialog[open]:has(.checkout-dialog){background:#112b36;border-color:#294652;color:#e7f1f3}
html[data-ui-style="midnight"] dialog[open]:has(#checkout-form) .modal-head h2,html[data-ui-style="midnight"] dialog[open]:has(.checkout-dialog) .modal-head h2{color:#e7f1f3}
html[data-ui-style="midnight"] dialog[open]:has(#checkout-form) .close,html[data-ui-style="midnight"] dialog[open]:has(.checkout-dialog) .close{background:#173946;border-color:#294652;color:#e7f1f3}
html[data-ui-style="midnight"] #checkout-form .checkout-footer{background:#112b36;border-top-color:#294652}

/* POS Payment Handoff Styles */
.checkout-items-section{display:flex;flex-direction:column;gap:8px}
.checkout-items-head{display:flex;justify-content:space-between;align-items:center}
.checkout-items-title{font-size:15px;font-weight:700;color:#1e293b}
.checkout-return-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 9px;font-size:12px;font-weight:600;color:#475569;background:#f8fafc;border:1px solid #cbd5e1;border-radius:6px;cursor:pointer;transition:all .15s ease}
.checkout-return-btn:hover{background:#f1f5f9;border-color:#94a3b8}
.checkout-return-btn.active{background:#eff6ff;color:#1d4ed8;border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.2)}
.checkout-return-icon{font-size:14px}
.checkout-items-scroll{max-height:180px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #e2e8f0;border-radius:8px;background:#fff}
.checkout-items-table{width:100%;border-collapse:collapse;font-size:13px}
.checkout-items-table th{position:sticky;top:0;background:#f8fafc;color:#64748b;font-weight:600;padding:6px 8px;text-align:left;border-bottom:1px solid #e2e8f0;z-index:1}
.checkout-items-table td{padding:6px 8px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.checkout-items-table tr:last-child td{border-bottom:none}
.checkout-items-table .col-num{width:28px;text-align:center;color:#94a3b8;font-size:12px}
.checkout-items-table .col-qty{width:90px;text-align:center}
.checkout-items-table .col-price{width:100px;text-align:right;font-weight:600;white-space:nowrap}
.checkout-item-meta{display:flex;align-items:center;gap:8px}
.checkout-thumb{width:32px;height:32px;border-radius:6px;object-fit:cover;background:#f1f5f9;flex-shrink:0}
.checkout-thumb-placeholder{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;background:#e2e8f0;color:#475569;font-size:11px;font-weight:700;flex-shrink:0;text-transform:uppercase}
.checkout-item-name{font-weight:500;color:#1e293b;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.checkout-qty-stepper{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;border-radius:6px;padding:2px}
.checkout-stepper-btn{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid #cbd5e1;border-radius:4px;font-size:14px;font-weight:700;color:#334155;cursor:pointer;padding:0}
.checkout-stepper-btn:hover{background:#e2e8f0}
.checkout-qty-val{min-width:22px;text-align:center;font-weight:700;font-size:13px}
.checkout-qty-display{font-weight:600;color:#334155}

.checkout-summary{display:flex;flex-direction:column;gap:8px;padding:12px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.checkout-summary-main{display:flex;justify-content:space-between;align-items:center;gap:12px}
.checkout-summary-head{display:flex;align-items:center;gap:10px}
.checkout-summary-title{font-size:18px;font-weight:700;color:#1e293b}
.checkout-discount-chip{position:relative;display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-size:13px;font-weight:600;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;cursor:pointer;user-select:none;transition:all .15s ease}
.checkout-discount-chip:hover{background:#dbeafe;border-color:#93c5fd}
.checkout-discount-chip.active,.checkout-discount-chip:has(input:checked){background:#2563eb;color:#ffffff;border-color:#1d4ed8;box-shadow:0 1px 3px rgba(37,99,235,.25)}
.checkout-discount-chip .checkout-discount-icon{display:inline-flex;align-items:center;justify-content:center}
.checkout-discount-chip .checkout-discount-icon svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
.checkout-discount-check{position:absolute;width:14px;height:14px;opacity:0.01;pointer-events:auto;margin:0}
.checkout-summary-amounts{display:flex;align-items:baseline;gap:8px;text-align:right}
.checkout-subtotal-strike{font-size:13px;color:#64748b;text-decoration:line-through;font-weight:500}
.checkout-subtotal-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.checkout-due-amount{font-size:24px;font-weight:800;color:#106c64}
.checkout-discount-fields{display:flex;flex-direction:column;gap:6px;padding-top:8px;border-top:1px dashed #cbd5e1}
.checkout-discount-inputs{display:flex;align-items:center;gap:8px}
.checkout-discount-inputs select{min-width:100px;padding:6px 10px;border-radius:8px;border:1px solid #cbd5e1}

.checkout-field-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.checkout-field-row label,.checkout-field-row span{font-weight:600;font-size:14px;color:#334155}
.checkout-input-currency{position:relative;display:inline-flex;align-items:center}
.checkout-input-currency input{padding-right:28px;text-align:right;font-size:16px;font-weight:700;max-width:160px}
.checkout-input-currency span{position:absolute;right:10px;font-weight:700;color:#64748b;pointer-events:none}
.checkout-change-pill{display:inline-flex;align-items:center;padding:5px 14px;border-radius:20px;background:#e6f4ea;color:#137333;font-size:15px;font-weight:700}
.checkout-change-pill.warning{background:#fce8e6;color:#c5221f}

.checkout-transfer-qr-box{display:flex;justify-content:center;align-items:center;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;margin:4px 0}
.checkout-transfer-qr-img{width:220px;height:220px;max-width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.08)}
.checkout-transfer-empty-box{padding:16px;text-align:center;border:1px dashed #cbd5e1;border-radius:8px;background:#f8fafc}

.checkout-order-note{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#475569}
.checkout-note-wrap input{width:100%;padding:8px 12px;border-radius:8px;border:1px solid #cbd5e1;font-size:13px}

.settings-qr-box{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.settings-qr-card{display:flex;align-items:center;gap:16px;padding:14px;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc}
.settings-qr-thumb img{width:110px;height:110px;aspect-ratio:1/1;object-fit:contain;border:1px solid #cbd5e1;border-radius:8px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.settings-qr-btn-group{display:flex;flex-direction:column;gap:8px}
.settings-qr-empty{display:flex;flex-direction:column;align-items:flex-start;gap:10px}

.cropper-container{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%}
.cropper-stage{position:relative;width:320px;height:320px;border-radius:10px;overflow:hidden;border:2px solid #0f766e;box-shadow:0 6px 18px rgba(0,0,0,.12);background:#fff;touch-action:none;cursor:grab}
.cropper-stage:active{cursor:grabbing}
#cropper-canvas{width:320px;height:320px;display:block}
.cropper-frame-overlay{position:absolute;inset:0;pointer-events:none;border:20px solid rgba(0,0,0,.45);border-radius:8px}
.cropper-frame{width:100%;height:100%;border:2px dashed rgba(255,255,255,.85);box-sizing:border-box}
.cropper-controls{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:320px;gap:12px}
.cropper-zoom-row{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;flex:1}
.cropper-zoom-row input[type="range"]{flex:1;accent-color:#0f766e}
.cropper-preview-box{display:flex;flex-direction:column;align-items:center;gap:2px}
#cropper-preview-canvas{width:48px;height:48px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}
.cropper-preview-box small{font-size:11px;color:#64748b}

.image-library-dialog{display:flex;flex-direction:column;gap:12px;max-width:520px}
.image-library-toolbar{display:flex;justify-content:flex-start}
.image-upload-btn{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.image-library-heading{font-size:14px;font-weight:600;color:#334155}
.image-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:10px;max-height:280px;overflow-y:auto;padding:4px}
.image-library-card{width:80px;height:80px;border-radius:8px;border:2px solid #e2e8f0;padding:0;background:#fff;overflow:hidden;cursor:pointer;transition:all .15s ease}
.image-library-card:hover,.image-library-card:focus-visible{border-color:#0f766e;box-shadow:0 0 0 2px rgba(15,118,110,.25)}
.image-library-card img{width:100%;height:100%;object-fit:cover;display:block}

html[data-ui-style="midnight"] .checkout-items-title{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-items-scroll{background:#0b1d24;border-color:#294652}
html[data-ui-style="midnight"] .checkout-items-table th{background:#173946;color:#b5cbd5;border-color:#294652}
html[data-ui-style="midnight"] .checkout-items-table td{border-color:#173946;color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-return-btn{background:#173946;color:#e7f1f3;border-color:#294652}
html[data-ui-style="midnight"] .checkout-return-btn:hover{background:#1e4554}
html[data-ui-style="midnight"] .checkout-return-btn.active{background:#173946;color:#60a5fa;border-color:#60a5fa}
html[data-ui-style="midnight"] .checkout-item-name{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-qty-stepper{background:#173946}
html[data-ui-style="midnight"] .checkout-stepper-btn{background:#112b36;border-color:#294652;color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-qty-display{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-subtotal-row strong{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-discount-toggle{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-field-row label,html[data-ui-style="midnight"] .checkout-field-row span{color:#e7f1f3}
html[data-ui-style="midnight"] .checkout-transfer-qr-box{background:#173946;border-color:#294652}
html[data-ui-style="midnight"] .settings-qr-card{background:#0b1d24;border-color:#294652}
html[data-ui-style="midnight"] .image-library-card{background:#112b36;border-color:#294652}

.checkout-transfer-confirm-wrap{display:flex;align-items:center;padding:8px 0 10px;border-bottom:1px solid #e2e8f0;margin-bottom:8px}
.checkout-transfer-confirm-label{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:#1e293b;cursor:pointer;user-select:none}
.checkout-transfer-confirm-label input[type="checkbox"]{width:18px;height:18px;accent-color:#106c64;cursor:pointer}
html[data-ui-style="midnight"] .checkout-transfer-confirm-wrap{border-bottom-color:#294652}
html[data-ui-style="midnight"] .checkout-transfer-confirm-label{color:#e7f1f3}
.cropper-modal-view{display:flex;flex-direction:column;width:100%}

/* Keep ordinary management and POS dialogs on the same surface as dark form fields. */
html[data-ui-style="midnight"] #modal {
  background: #112b36;
  border: 1px solid #294652;
  color: #e7f1f3;
  color-scheme: dark;
}
html[data-ui-style="midnight"] #modal .close {
  background: #173946;
  color: #e7f1f3;
}
html[data-ui-style="midnight"] #modal .btn:not(.primary):not(.orange) {
  background: #173946;
  border-color: #3b6472;
  color: #e7f1f3;
}
html[data-ui-style="midnight"] #modal .btn.danger {
  color: #ffd7dc;
  border-color: #71414d;
}
html[data-ui-style="midnight"] #modal .image-field,
html[data-ui-style="midnight"] #modal .image-preview,
html[data-ui-style="midnight"] #modal .note {
  background: #173946;
  border-color: #294652;
  color: #c4d5df;
}
html[data-ui-style="midnight"] #modal input::placeholder,
html[data-ui-style="midnight"] #modal textarea::placeholder {
  color: #aabec7;
}

/* Management surfaces and controls must follow the selected dark appearance. */
html[data-ui-style="midnight"] {
  background: #0b1e27;
  color: #e7f1f3;
  color-scheme: dark;
}
html[data-ui-style="midnight"] .shell .business-mode-box,
html[data-ui-style="midnight"] .shell .appearance-box,
html[data-ui-style="midnight"] .shell .chart-card {
  background: #173946;
  border-color: #294652;
  color: #e7f1f3;
}
html[data-ui-style="midnight"] .shell .style-choice {
  background: #112b36;
  border-color: #3b6472;
  color: #e7f1f3;
}
html[data-ui-style="midnight"] .shell .style-choice small {
  color: #b5cbd5;
}
html[data-ui-style="midnight"] .shell .style-choice:has(input:checked) {
  border-color: #77d8c7;
  box-shadow: 0 0 0 2px #45b8b255;
}
html[data-ui-style="midnight"] .shell .style-choice:focus-within {
  outline: 3px solid #77d8c7;
  outline-offset: 2px;
}
html[data-ui-style="midnight"] .shell .btn:not(.primary):not(.orange):not(.danger) {
  background: #173946;
  border-color: #3b6472;
  color: #e7f1f3;
}
html[data-ui-style="midnight"] .shell .btn.ghost {
  background: transparent;
  border-color: transparent;
}
html[data-ui-style="midnight"] .shell .btn.danger {
  background: #2d2430;
  border-color: #71414d;
  color: #ffd7dc;
}
html[data-ui-style="midnight"] .shell .btn:not(.primary):not(.orange):hover,
html[data-ui-style="midnight"] .shell .btn:not(.primary):not(.orange):focus-visible {
  background: #1e4554;
  border-color: #77d8c7;
}
html[data-ui-style="midnight"] .shell .badge,
html[data-ui-style="midnight"] .shell .trend.up {
  background: #173b39;
  color: #b9e8db;
}
html[data-ui-style="midnight"] .shell .badge.warn {
  background: #46391f;
  color: #ffe1a1;
}
html[data-ui-style="midnight"] .shell .badge.danger,
html[data-ui-style="midnight"] .shell .trend.down {
  background: #452c35;
  color: #ffd7dc;
}
html[data-ui-style="midnight"] .shell .avatar,
html[data-ui-style="midnight"] .shell .mini-icon,
html[data-ui-style="midnight"] .shell .image-field,
html[data-ui-style="midnight"] .shell .image-preview {
  background: #173946;
  border-color: #294652;
  color: #c4d5df;
}
html[data-ui-style="midnight"] .shell .empty strong {
  color: #e7f1f3;
}
html[data-ui-style="midnight"] .shell a:not(.btn):not(.nav-link),
html[data-ui-style="midnight"] .shell .image-upload {
  color: #77d8c7;
}
html[data-ui-style="midnight"] .shell .store-icon,
html[data-ui-style="midnight"] .shell .stat-icon,
html[data-ui-style="midnight"] .shell .rank {
  background: #173b42;
  color: #77d8c7;
}

/* Product cutout previews use the same surface as product cards. */
.image-edit-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.cutout-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.cutout-compare>div{display:grid;gap:5px;min-width:0;font-size:12px}
.cutout-compare img{width:100%;height:116px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#e9f1ee}
html[data-ui-style="midnight"] .cutout-compare img{background:#173946}
html[data-ui-style="midnight"] .pos-selling-shell .product-cover{background:#173946!important}

/* ==========================================================================
   POS UX/UI PERFECTION (Mobile Tables, Order Lists, Product Cards, Touch & Auth)
   ========================================================================== */

/* 1. Thanh lọc trạng thái bàn trên Mobile (.pos-tables-filter-bar & .pos-desktop-table-toolbar) */
.pos-tables-filter-bar,
.pos-desktop-table-toolbar {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
.pos-tables-filter-bar::-webkit-scrollbar,
.pos-desktop-table-toolbar::-webkit-scrollbar {
  display: none !important;
}
.pos-tables-filter-pill {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  min-height: 38px !important;
  padding: 6px 14px !important;
}

/* 2. Bảng Hóa đơn trên Mobile (.table-wrap) */
.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  max-width: 100% !important;
}
@media (max-width: 640px) {
  .table-wrap .data-table {
    min-width: 560px !important;
  }
  .data-table th,
  .data-table td {
    padding: 10px 8px !important;
    font-size: 13.5px !important;
  }
}

/* 3. Tên sản phẩm trên thẻ card trong quầy POS và modal gọi món */
.product-card .product-info strong,
.pos-selling-shell .product-info strong,
.product-info strong {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
  font-size: 13.5px !important;
  word-break: break-word !important;
}

/* 4. Trải nghiệm chạm và phản hồi xúc giác trên thiết bị di động (Touch Targets & Feedback) */
.pos-tables-filter-pill,
.product-card,
.table-card,
.btn {
  -webkit-tap-highlight-color: transparent !important;
}
.pos-tables-filter-pill:active,
.product-card:active,
.table-card:active,
.btn:active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease !important;
}

/* 5. Form Đăng nhập & Input focus */
.auth-card input,
.login-form input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.auth-card input:focus,
.login-form input:focus {
  border-color: #106c64 !important;
  box-shadow: 0 0 0 3px rgba(16, 108, 100, 0.16) !important;
  outline: none !important;
}

