/* ============================================================
   RabbitX SUPER POS V1.0 — Designer Override v1
   ------------------------------------------------------------
   Layered on top of pos.css / landing.css / table-order.css.
   Adjusts visual layer only — never touches IDs, data-*,
   form structures, modals, or JS-bound state classes.

   Author: Design pass (Claude, 2026-05-17)
   ============================================================ */

/* ---------- Web fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap");

/* ============================================================
   1. ROOT — Token rebase
   ============================================================ */
:root {
  /* Ink and surface */
  --ink: #0f1729;
  --ink-2: #1f2a44;
  --muted: #5f6b85;
  --muted-2: #94a3b8;
  --panel: #ffffff;
  --soft: #f4f6fb;
  --soft-2: #eef1f8;
  --paper: #fbfaf7;        /* warm paper for catalog */
  --line: #e3e8f1;
  --line-strong: #cdd5e3;
  --plate: #0b1224;        /* dark plate */
  --plate-2: #131b30;

  /* Brand */
  --brand-ci: #ff5b1a;
  --brand-ci-deep: #e94a0c;
  --brand-ai: #7a4df4;
  --brand-grad: linear-gradient(135deg, #ff7a3d 0%, #ff5b1a 45%, #ff3d8a 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(255, 122, 61, .14), rgba(255, 61, 138, .12));

  /* Status */
  --ok: #10b981;
  --ok-soft: #d1fae5;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --bad: #e11d48;
  --bad-soft: #ffe4e6;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --mint: #14b8a6;
  --violet: #7a4df4;

  /* Shadows + radii */
  --shadow-xs: 0 1px 2px rgba(13, 20, 36, .06);
  --shadow-sm: 0 4px 12px rgba(13, 20, 36, .08);
  --shadow-md: 0 12px 28px rgba(13, 20, 36, .10);
  --shadow-lg: 0 24px 48px rgba(13, 20, 36, .14);
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Type */
  --font-sans: "Plus Jakarta Sans", "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", "IBM Plex Sans Thai", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Cart balance correction: preserve the top/bottom shape and give the bill list more room. */
body.pos-viewing .cart-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  overflow: auto !important;
}

body.pos-viewing .offline-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-height: auto !important;
  margin-top: 0 !important;
}

body.pos-viewing .offline-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.pos-viewing .offline-actions button {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 9px !important;
}

body.pos-viewing .barcode-panel {
  margin: 0 !important;
}

body.pos-viewing .cart-lines {
  flex: 1 1 auto !important;
  min-height: clamp(168px, 28dvh, 260px) !important;
  max-height: clamp(210px, 34dvh, 360px) !important;
  margin: 4px 0 6px !important;
  overflow: auto !important;
}

body.pos-viewing .checkout-options-panel {
  margin: 4px 0 !important;
}

body.pos-viewing #checkoutPromotionImpact {
  display: none !important;
}

body.pos-viewing .payment-row,
body.pos-viewing .pos-action-grid,
body.pos-viewing .bill-flow-actions {
  margin-top: 3px !important;
  margin-bottom: 3px !important;
}

body.pos-viewing .cash-audit-strip,
body.pos-viewing .seller-session-bar {
  margin-top: 0 !important;
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  body.pos-viewing .cart-lines {
    min-height: clamp(210px, 33dvh, 320px) !important;
    max-height: clamp(250px, 40dvh, 430px) !important;
  }
}

/* POS light-density lock: reduce visual weight while preserving the current flow */
body.pos-viewing.pos-density-lite {
  font-size: 11px !important;
}

body.pos-viewing.pos-density-lite .topbar {
  min-height: 52px !important;
  padding: 7px 10px !important;
}

body.pos-viewing.pos-density-lite .workspace,
body.pos-viewing.pos-density-lite .pos-grid {
  padding: 6px !important;
}

body.pos-viewing.pos-density-lite .pos-grid {
  grid-template-columns: minmax(150px, 188px) minmax(372px, 1fr) minmax(308px, .82fr) !important;
  gap: 6px !important;
  min-height: calc(100vh - 66px) !important;
}

body.pos-viewing.pos-density-lite .pos-focus-toolbar {
  min-height: 40px !important;
  padding: 5px 7px !important;
  gap: 5px !important;
  border-radius: 12px !important;
}

body.pos-viewing.pos-density-lite .pos-brand-mark .brand-logo {
  width: 30px !important;
  height: 30px !important;
}

body.pos-viewing.pos-density-lite .pos-brand-mark strong,
body.pos-viewing.pos-density-lite .pos-status-bar strong {
  font-size: 10.5px !important;
}

body.pos-viewing.pos-density-lite .pos-brand-mark small,
body.pos-viewing.pos-density-lite .pos-status-bar span,
body.pos-viewing.pos-density-lite .eyebrow,
body.pos-viewing.pos-density-lite .pill,
body.pos-viewing.pos-density-lite small {
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .focus-control,
body.pos-viewing.pos-density-lite .category-strip button,
body.pos-viewing.pos-density-lite .catalog-categories button,
body.pos-viewing.pos-density-lite .view-mode,
body.pos-viewing.pos-density-lite #reloadProductImagesButton {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 7px !important;
  border-radius: 8px !important;
  font-size: 9.5px !important;
}

body.pos-viewing.pos-density-lite .left-panel,
body.pos-viewing.pos-density-lite .catalog-panel,
body.pos-viewing.pos-density-lite .cart-panel {
  max-height: calc(100vh - 116px) !important;
  padding: 7px !important;
  border-radius: 12px !important;
}

body.pos-viewing.pos-density-lite .panel-head,
body.pos-viewing.pos-density-lite .catalog-toolbar {
  gap: 5px !important;
  margin-bottom: 5px !important;
}

body.pos-viewing.pos-density-lite .panel-head h2,
body.pos-viewing.pos-density-lite .catalog-toolbar h2,
body.pos-viewing.pos-density-lite .cart-panel .panel-head h2 {
  font-size: 12px !important;
}

body.pos-viewing.pos-density-lite .service-option {
  min-height: 34px !important;
  padding: 6px 7px !important;
  border-radius: 9px !important;
}

body.pos-viewing.pos-density-lite .service-option span,
body.pos-viewing.pos-density-lite .table-button span {
  font-size: 10px !important;
}

body.pos-viewing.pos-density-lite .table-button {
  min-height: 42px !important;
  border-radius: 8px !important;
}

body.pos-viewing.pos-density-lite .table-button strong {
  font-size: 12px !important;
}

body.pos-viewing.pos-density-lite .category-strip,
body.pos-viewing.pos-density-lite .catalog-categories,
body.pos-viewing.pos-density-lite .product-view-switch,
body.pos-viewing.pos-density-lite .catalog-toolbar-actions,
body.pos-viewing.pos-density-lite .payment-row,
body.pos-viewing.pos-density-lite .pos-action-grid {
  gap: 4px !important;
}

body.pos-viewing.pos-density-lite .product-grid:not(.list-view) {
  grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
  gap: 4px !important;
  padding: 4px !important;
}

body.pos-viewing.pos-density-lite .product-button {
  border-radius: 10px !important;
}

body.pos-viewing.pos-density-lite .product-overlay {
  inset: auto 4px 4px !important;
  min-height: 32px !important;
  padding: 4px 5px !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, .24) !important;
}

body.pos-viewing.pos-density-lite .product-name {
  font-size: 9.5px !important;
  line-height: 1.1 !important;
  max-height: 21px !important;
}

body.pos-viewing.pos-density-lite .product-code,
body.pos-viewing.pos-density-lite .product-list-code,
body.pos-viewing.pos-density-lite .product-list-detail {
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .product-price,
body.pos-viewing.pos-density-lite .product-list-name,
body.pos-viewing.pos-density-lite .product-list-price {
  font-size: 10px !important;
}

body.pos-viewing.pos-density-lite .product-grid.list-view {
  gap: 3px !important;
}

body.pos-viewing.pos-density-lite .product-list-row {
  min-height: 28px !important;
  padding: 0 6px !important;
  border-radius: 7px !important;
  column-gap: 5px !important;
}

body.pos-viewing.pos-density-lite .offline-card {
  padding: 5px 7px !important;
  gap: 3px !important;
  border-radius: 10px !important;
}

body.pos-viewing.pos-density-lite .offline-card strong {
  font-size: 11px !important;
}

body.pos-viewing.pos-density-lite .offline-actions {
  gap: 3px !important;
}

body.pos-viewing.pos-density-lite .offline-actions button {
  height: 26px !important;
  border-radius: 7px !important;
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .barcode-panel {
  grid-template-columns: minmax(0, 1fr) 32px 72px !important;
  gap: 5px !important;
  padding: 6px !important;
  border-radius: 10px !important;
}

body.pos-viewing.pos-density-lite .barcode-input input,
body.pos-viewing.pos-density-lite .barcode-search-button,
body.pos-viewing.pos-density-lite .scan-button {
  height: 32px !important;
}

body.pos-viewing.pos-density-lite .barcode-input input {
  padding: 0 9px !important;
  font-size: 12px !important;
}

body.pos-viewing.pos-density-lite .scan-button {
  padding: 0 7px !important;
  font-size: 9.5px !important;
}

body.pos-viewing.pos-density-lite .cart-lines {
  min-height: 76px !important;
  max-height: 16dvh !important;
  gap: 4px !important;
  margin: 4px 0 !important;
}

body.pos-viewing.pos-density-lite .cart-line {
  padding: 5px 6px !important;
  border-radius: 8px !important;
}

body.pos-viewing.pos-density-lite .cart-line b {
  font-size: 10.5px !important;
}

body.pos-viewing.pos-density-lite .cart-line small {
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .qty-tools button {
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
}

body.pos-viewing.pos-density-lite .totals {
  padding: 6px 8px !important;
  gap: 1px !important;
  border-radius: 10px !important;
}

body.pos-viewing.pos-density-lite .totals > div {
  font-size: 10px !important;
}

body.pos-viewing.pos-density-lite .totals .net strong {
  font-size: 17px !important;
}

body.pos-viewing.pos-density-lite .checkout-options-panel {
  padding: 6px !important;
  gap: 4px !important;
  border-radius: 10px !important;
}

body.pos-viewing.pos-density-lite .checkout-discount-row strong {
  font-size: 10.5px !important;
}

body.pos-viewing.pos-density-lite .checkout-discount-row span {
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .checkout-promotion-picker select,
body.pos-viewing.pos-density-lite .member-button {
  height: 26px !important;
  border-radius: 8px !important;
  font-size: 9.5px !important;
}

body.pos-viewing.pos-density-lite .pay-option {
  height: 30px !important;
  border-radius: 8px !important;
  font-size: 9.8px !important;
}

body.pos-viewing.pos-density-lite .pos-action-grid button {
  height: 27px !important;
  padding: 0 5px !important;
  border-radius: 8px !important;
  font-size: 9px !important;
}

body.pos-viewing.pos-density-lite .cash-audit-strip,
body.pos-viewing.pos-density-lite .seller-session-bar {
  padding: 5px 7px !important;
  border-radius: 9px !important;
  font-size: 9px !important;
}

body.pos-viewing.pos-density-lite .bill-flow-actions {
  gap: 3px !important;
}

body.pos-viewing.pos-density-lite .checkout-button,
body.pos-viewing.pos-density-lite .bill-print-button {
  height: 38px !important;
  border-radius: 9px !important;
}

body.pos-viewing.pos-density-lite .checkout-button {
  font-size: 10.5px !important;
}

body.pos-viewing.pos-density-lite .bill-print-button {
  font-size: 8.5px !important;
}

body.pos-viewing.pos-density-lite .seller-code-field input,
body.pos-viewing.pos-density-lite .manager-pin input,
body.pos-viewing.pos-density-lite .seller-session-bar button {
  height: 26px !important;
  font-size: 9px !important;
  border-radius: 7px !important;
}

body.pos-viewing.pos-density-lite .status-line {
  min-height: 14px !important;
  margin-top: 3px !important;
  font-size: 9px !important;
}

/* POS light-density pass: keep the same flow, reduce visual weight for tablets */
body.pos-viewing.pos-density-lite {
  font-size: 11px;
}

body.pos-viewing.pos-density-lite .topbar {
  min-height: 52px;
  padding: 7px 10px;
}

body.pos-viewing.pos-density-lite .workspace {
  padding: 6px;
}

body.pos-viewing.pos-density-lite .pos-grid {
  grid-template-columns: minmax(150px, 188px) minmax(372px, 1fr) minmax(308px, .82fr);
  gap: 6px;
  padding: 6px;
  min-height: calc(100vh - 66px);
}

body.pos-viewing.pos-density-lite .pos-focus-toolbar {
  min-height: 40px;
  padding: 5px 7px;
  gap: 5px;
  border-radius: 12px;
}

body.pos-viewing.pos-density-lite .pos-brand-mark .brand-logo {
  width: 30px;
  height: 30px;
}

body.pos-viewing.pos-density-lite .pos-brand-mark strong,
body.pos-viewing.pos-density-lite .pos-status-bar strong {
  font-size: 10.5px;
}

body.pos-viewing.pos-density-lite .pos-brand-mark small,
body.pos-viewing.pos-density-lite .pos-status-bar span {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .focus-control {
  height: 26px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 9.5px;
}

body.pos-viewing.pos-density-lite .left-panel,
body.pos-viewing.pos-density-lite .catalog-panel,
body.pos-viewing.pos-density-lite .cart-panel {
  max-height: calc(100vh - 116px);
  padding: 7px;
  border-radius: 12px;
}

body.pos-viewing.pos-density-lite .panel-head,
body.pos-viewing.pos-density-lite .catalog-toolbar {
  gap: 5px;
  margin-bottom: 5px;
}

body.pos-viewing.pos-density-lite .panel-head h2,
body.pos-viewing.pos-density-lite .catalog-toolbar h2,
body.pos-viewing.pos-density-lite .cart-panel .panel-head h2 {
  font-size: 12px;
}

body.pos-viewing.pos-density-lite .eyebrow,
body.pos-viewing.pos-density-lite .pill,
body.pos-viewing.pos-density-lite small {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .service-option {
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 9px;
}

body.pos-viewing.pos-density-lite .service-option span,
body.pos-viewing.pos-density-lite .table-button span {
  font-size: 10px;
}

body.pos-viewing.pos-density-lite .table-button {
  min-height: 42px;
  border-radius: 8px;
}

body.pos-viewing.pos-density-lite .table-button strong {
  font-size: 12px;
}

body.pos-viewing.pos-density-lite .category-strip,
body.pos-viewing.pos-density-lite .catalog-categories,
body.pos-viewing.pos-density-lite .product-view-switch,
body.pos-viewing.pos-density-lite .catalog-toolbar-actions {
  gap: 4px;
}

body.pos-viewing.pos-density-lite .category-strip button,
body.pos-viewing.pos-density-lite .catalog-categories button,
body.pos-viewing.pos-density-lite .view-mode,
body.pos-viewing.pos-density-lite #reloadProductImagesButton {
  min-height: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 9.5px;
}

body.pos-viewing.pos-density-lite .product-grid:not(.list-view) {
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 4px;
  padding: 4px;
}

body.pos-viewing.pos-density-lite .product-button {
  border-radius: 10px;
}

body.pos-viewing.pos-density-lite .product-overlay {
  inset: auto 4px 4px;
  min-height: 32px;
  padding: 4px 5px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .24);
}

body.pos-viewing.pos-density-lite .product-name {
  font-size: 9.5px;
  line-height: 1.1;
  max-height: 21px;
}

body.pos-viewing.pos-density-lite .product-code {
  font-size: 8px;
}

body.pos-viewing.pos-density-lite .product-price {
  font-size: 10px;
}

body.pos-viewing.pos-density-lite .product-grid.list-view {
  gap: 3px;
}

body.pos-viewing.pos-density-lite .product-list-row {
  min-height: 28px;
  padding: 0 6px;
  border-radius: 7px;
  column-gap: 5px;
}

body.pos-viewing.pos-density-lite .product-list-name {
  font-size: 10px;
}

body.pos-viewing.pos-density-lite .product-list-code,
body.pos-viewing.pos-density-lite .product-list-detail {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .product-list-price {
  font-size: 10px;
}

body.pos-viewing.pos-density-lite .offline-card {
  padding: 5px 7px;
  gap: 3px;
  border-radius: 10px;
}

body.pos-viewing.pos-density-lite .offline-card strong {
  font-size: 11px;
}

body.pos-viewing.pos-density-lite .offline-actions {
  gap: 3px;
}

body.pos-viewing.pos-density-lite .offline-actions button {
  height: 26px;
  border-radius: 7px;
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .barcode-panel {
  grid-template-columns: minmax(0, 1fr) 32px 72px;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
}

body.pos-viewing.pos-density-lite .barcode-input input,
body.pos-viewing.pos-density-lite .barcode-search-button,
body.pos-viewing.pos-density-lite .scan-button {
  height: 32px;
}

body.pos-viewing.pos-density-lite .barcode-input input {
  padding: 0 9px;
  font-size: 12px;
}

body.pos-viewing.pos-density-lite .scan-button {
  padding: 0 7px;
  font-size: 9.5px;
}

body.pos-viewing.pos-density-lite .cart-lines {
  min-height: 76px;
  max-height: 16dvh;
  gap: 4px;
  margin: 4px 0;
}

body.pos-viewing.pos-density-lite .cart-line {
  padding: 5px 6px;
  border-radius: 8px;
}

body.pos-viewing.pos-density-lite .cart-line b {
  font-size: 10.5px;
}

body.pos-viewing.pos-density-lite .cart-line small {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .qty-tools button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

body.pos-viewing.pos-density-lite .totals {
  padding: 6px 8px;
  gap: 1px;
  border-radius: 10px;
}

body.pos-viewing.pos-density-lite .totals > div {
  font-size: 10px;
}

body.pos-viewing.pos-density-lite .totals .net strong {
  font-size: 17px;
}

body.pos-viewing.pos-density-lite .checkout-options-panel {
  padding: 6px;
  gap: 4px;
  border-radius: 10px;
}

body.pos-viewing.pos-density-lite .checkout-discount-row strong {
  font-size: 10.5px;
}

body.pos-viewing.pos-density-lite .checkout-discount-row span {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .checkout-promotion-picker select,
body.pos-viewing.pos-density-lite .member-button {
  height: 26px;
  border-radius: 8px;
  font-size: 9.5px;
}

body.pos-viewing.pos-density-lite .payment-row {
  gap: 4px;
}

body.pos-viewing.pos-density-lite .pay-option {
  height: 30px;
  border-radius: 8px;
  font-size: 9.8px;
}

body.pos-viewing.pos-density-lite .pos-action-grid {
  gap: 4px;
}

body.pos-viewing.pos-density-lite .pos-action-grid button {
  height: 27px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: 9px;
}

body.pos-viewing.pos-density-lite .cash-audit-strip,
body.pos-viewing.pos-density-lite .seller-session-bar {
  padding: 5px 7px;
  border-radius: 9px;
  font-size: 9px;
}

body.pos-viewing.pos-density-lite .bill-flow-actions {
  gap: 3px;
}

body.pos-viewing.pos-density-lite .checkout-button,
body.pos-viewing.pos-density-lite .bill-print-button {
  height: 38px;
  border-radius: 9px;
}

body.pos-viewing.pos-density-lite .checkout-button {
  font-size: 10.5px;
}

body.pos-viewing.pos-density-lite .bill-print-button {
  font-size: 8.5px;
}

body.pos-viewing.pos-density-lite .seller-code-field input,
body.pos-viewing.pos-density-lite .manager-pin input,
body.pos-viewing.pos-density-lite .seller-session-bar button {
  height: 26px;
  font-size: 9px;
  border-radius: 7px;
}

body.pos-viewing.pos-density-lite .status-line {
  min-height: 14px;
  margin-top: 3px;
  font-size: 9px;
}

html, body {
  font-family: var(--font-sans);
  background: #eaf0fb;
  background:
    radial-gradient(900px 600px at 90% -10%, rgba(122, 77, 244, .08), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(255, 91, 26, .07), transparent 60%),
    #eef2fa;
  color: var(--ink);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

.eyebrow {
  color: var(--brand-ci) !important;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

strong, .totals strong, .metric strong, .dash-card strong {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   2. TOPBAR — premium dark plate
   ============================================================ */
.app-shell { background: transparent; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  padding: 12px 22px;
  background:
    radial-gradient(800px 200px at 12% 0%, rgba(255, 91, 26, .18), transparent 70%),
    linear-gradient(180deg, #131b30 0%, #0b1224 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 18px 40px rgba(11, 18, 36, .28);
  color: #fff;
}

.topbar h1 {
  font-size: 19px;
  color: #fff;
  font-weight: 700;
}
.topbar .eyebrow { color: rgba(255, 200, 170, .85) !important; }

.brand-logo-tile {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 8px 20px rgba(0, 0, 0, .32);
}
.brand-logo-tile img { padding: 4px; }

/* Nav tabs — pill rail */
.app-nav {
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }
.nav-tab {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .65);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color .15s, background .15s, transform .15s;
}
.nav-tab:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-tab.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 91, 26, .40), inset 0 0 0 1px rgba(255, 255, 255, .18);
  transform: translateY(-1px);
}

/* Top actions — make selectors and refresh fit dark plate */
.top-actions .field { color: rgba(255, 255, 255, .55); }
.top-actions .field span {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, .42);
}
.top-actions .field select {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
}
.top-actions .field select option { color: var(--ink); background: #fff; }
.ghost-button#refreshButton {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 10px;
  height: 38px;
  width: 38px;
  box-shadow: none;
}
.ghost-button#refreshButton:hover { background: rgba(255, 255, 255, .14); }

/* ============================================================
   3. WORKSPACE — frame
   ============================================================ */
.workspace { padding: 18px; gap: 18px; }

/* ============================================================
   4. DASHBOARD BAND — 5-metric strip
   ============================================================ */
.dashboard-band {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  gap: 12px;
}
.metric, .branch-watch {
  position: relative;
  min-height: 78px;
  padding: 14px 16px 14px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.metric::before, .branch-watch::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 4px;
  background: var(--brand-ci);
  opacity: .9;
}
.metric:nth-child(2)::before { background: var(--violet); }
.metric:nth-child(3)::before { background: var(--info); }
.metric.warning { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fed7aa; }
.metric.warning::before { background: var(--warn); }
.branch-watch {
  background: linear-gradient(135deg, var(--plate), var(--plate-2));
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
}
.branch-watch::before { background: linear-gradient(180deg, #ff7a3d, #ff3d8a); }
.branch-watch span { color: rgba(255, 200, 170, .85); }
.branch-watch strong { color: #fff; font-family: var(--font-display); }

.metric span, .branch-watch span {
  display: block;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.metric strong, .branch-watch strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.metric.warning strong { color: #b45309; }

/* ============================================================
   5. POS VIEW — the star
   ============================================================ */
.pos-grid {
  grid-template-columns: minmax(260px, 290px) minmax(0, 1fr) minmax(360px, 400px);
  gap: 14px;
}

/* Focus toolbar */
.pos-focus-toolbar {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  gap: 12px;
  align-items: center;
}
.pos-brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pos-brand-mark > div { min-width: 0; }
.pos-brand-mark strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}
.pos-brand-mark small {
  display: block;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11.5px;
}
.pos-brand-mark .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hamburger-button {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  font-size: 18px;
}

/* Status strip — chips for branch/date/time/seller/network */
.pos-status-bar {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 0;
  padding: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.pos-status-bar > div {
  position: relative;
  flex: 1 1 0;
  padding: 4px 12px;
  text-align: left;
}
.pos-status-bar > div + div::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px 0;
  width: 1px;
  background: var(--line);
}
.pos-status-bar span {
  display: block;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
.pos-status-bar strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
}
/* Online/Offline pill on status */
#posStatusNetwork {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: #047857;
  font-size: 11.5px;
  margin-top: 2px;
}
#posStatusNetwork::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot { 50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, .08); } }

/* Focus controls */
.focus-control {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
}
.focus-control:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.focus-control.primary {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(255, 91, 26, .30);
}
.focus-control.primary:hover { box-shadow: 0 12px 22px rgba(255, 91, 26, .42); }
.focus-control.density-toggle {
  min-width: 58px;
  border-color: rgba(122, 77, 244, .22);
  background: #f5f3ff;
  color: #5b21b6;
}
.focus-control.density-toggle.active {
  border-color: transparent;
  background: linear-gradient(135deg, #7a4df4, #ff5b1a);
  color: #fff;
}

/* Top offline pill */
.top-offline-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.top-offline-card span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}
.top-offline-card.offline span { color: var(--warn); }
.top-offline-card strong { font-family: var(--font-display); font-size: 12px; }
#topOfflineToggleButton {
  padding: 4px 10px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
}

/* ============================================================
   6. LEFT PANEL — Service selector + Tables
   ============================================================ */
.left-panel {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.left-panel .panel-head h2 {
  font-size: 16px;
  font-weight: 700;
}
.service-style {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
}
.service-option {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  color: var(--ink);
  transition: border-color .15s, background .15s, transform .12s;
}
.service-option span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.service-option small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.service-option:hover { border-color: var(--brand-ci); background: #fff7f1; }
.service-option.active {
  border-color: var(--brand-ci);
  background: linear-gradient(135deg, #fff5ed, #ffe8d8);
  box-shadow: 0 6px 14px rgba(255, 91, 26, .15);
}
.service-option.active::after {
  content: "";
  position: absolute;
  top: 14px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--brand-ci);
  box-shadow: 0 0 0 3px rgba(255, 91, 26, .18);
}

/* Table-service sub panel */
.table-service-panel {
  margin-top: 8px;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
}
.table-service-panel .eyebrow { color: var(--violet) !important; }
.table-session-card {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}
.table-session-card span {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.table-session-actions { display: flex; gap: 6px; }
.table-session-actions button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  color: var(--ink);
}
#openTableButton {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(16, 185, 129, .35);
}
#closeTableButton { color: #b91c1c; border-color: #fecaca; background: #fff5f5; }

/* Table grid */
.table-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.table-button {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
  gap: 2px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.table-button strong { font-size: 18px; font-weight: 700; }
.table-button span { font-size: 10px; color: var(--muted); font-weight: 600; }
.table-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.table-button.open {
  background: linear-gradient(160deg, #fff7ed, #ffedd5);
  border-color: var(--brand-ci);
  color: #9a3412;
}
.table-button.open span { color: #c2410c; }
.table-button.has-order {
  background: linear-gradient(160deg, #ecfdf5, #d1fae5);
  border-color: var(--ok);
  color: #065f46;
}
.table-button.has-order span { color: #047857; }
.table-button.active {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 1px;
  border-color: var(--info);
}
.table-button em {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(225, 29, 72, .35);
}

/* QR mode + qr card */
.qr-mode-row { display: flex; gap: 6px; }
.qr-mode {
  flex: 1;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}
.qr-mode.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.table-qr-card {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--plate), var(--plate-2));
  color: #fff;
  display: grid;
  gap: 2px;
}
.table-qr-card span { color: rgba(255, 200, 170, .85); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.table-qr-card strong { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: 0.05em; }
.table-qr-card small { color: rgba(255, 255, 255, .65); font-size: 11px; }

.ghost-action.small {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
}

/* ============================================================
   7. CATALOG PANEL
   ============================================================ */
.catalog-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  gap: 12px;
}
.catalog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.catalog-toolbar h2 { font-size: 18px; font-weight: 700; }
.product-view-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.view-mode {
  width: 34px; height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}
.view-mode.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.image-reload-button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.image-reload-button:disabled {
  opacity: .62;
  cursor: wait;
}

/* Filter bar */
.catalog-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 12px;
  align-items: center;
}
.catalog-search { display: grid; gap: 4px; }
.catalog-search span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.catalog-search input {
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 12px center / 16px 16px;
}
.catalog-search input:focus {
  outline: none;
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 4px rgba(255, 91, 26, .12);
}

/* Category tabs */
.catalog-categories { 
  display: flex; 
  gap: 6px; 
  flex-wrap: nowrap; 
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -2px;
}
.catalog-categories::-webkit-scrollbar { display: none; }
.catalog-categories button,
#categoryTabs button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}
.catalog-categories button.active,
#categoryTabs button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.product-button {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.product-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-ci);
}
.product-visual {
  position: relative;
  display: block;
  aspect-ratio: 1.1;
  background: linear-gradient(135deg, #f3eee5, #e9e2d3);
  overflow: hidden;
}
.product-visual img,
.product-visual svg {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(11, 18, 36, .82));
  color: #fff;
  display: grid;
  gap: 4px;
}
.product-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-overlay-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.product-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, .82);
}
.product-price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.product-meta {
  padding: 8px 12px 10px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-unit { font-family: var(--font-display); }
.barcode-chip {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(11, 18, 36, .72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

/* List view */
.product-grid.list-view {
  grid-template-columns: 1fr;
  gap: 6px;
  background: #fff;
  padding: 8px;
}
.product-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color .12s, background .12s, transform .12s;
}
.product-list-row:hover { border-color: var(--brand-ci); background: #fffaf5; transform: translateY(-1px); }
.product-list-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.product-list-code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  background: var(--soft);
  border-radius: 6px;
  color: var(--muted);
}
.product-list-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-list-detail { color: var(--muted); font-size: 12px; }
.product-list-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-ci);
}

/* ============================================================
   8. CART PANEL — right column
   ============================================================ */
.cart-panel {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  gap: 10px;
}

.cart-panel .panel-head h2 { font-size: 16px; font-weight: 700; }
.cart-panel .pill {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 11.5px;
  border-radius: 999px;
  padding: 3px 10px;
}

.offline-card {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--ok-soft);
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  display: grid;
  gap: 6px;
}
.offline-card.offline {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: #fde68a;
}
.offline-card span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #047857;
}
.offline-card.offline span { color: #92400e; }
.offline-card span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
}
.offline-card.offline span::before { background: var(--warn); }
.offline-card strong { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.offline-card small { color: var(--muted); font-size: 11px; }
.offline-actions { display: flex; gap: 6px; }
.offline-actions button {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 11.5px;
}

/* Barcode panel — premium scanner feel */
.barcode-panel {
  display: grid;
  grid-template-columns: 1fr 36px auto;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--plate), var(--plate-2));
  color: #fff;
  position: relative;
  overflow: hidden;
}
.barcode-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 100px at 80% -20%, rgba(255, 91, 26, .20), transparent 60%);
  pointer-events: none;
}
.barcode-panel > div {
  grid-column: 1 / -1;
  position: relative;
}
.barcode-panel .eyebrow {
  color: #ffb38a !important;
  font-size: 10px;
}
.barcode-panel h2 {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  margin-top: 2px;
}
.barcode-input { display: grid; gap: 4px; position: relative; }
.barcode-input span {
  color: rgba(255, 255, 255, .55);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.barcode-input input {
  height: 42px;
  padding: 0 14px 0 38px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb38a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='2' height='14'/><rect x='7' y='5' width='1' height='14'/><rect x='10' y='5' width='3' height='14'/><rect x='15' y='5' width='1' height='14'/><rect x='18' y='5' width='3' height='14'/></svg>") no-repeat 12px center / 18px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: 10px;
}
.barcode-input input::placeholder { color: rgba(255, 255, 255, .35); }
.barcode-input input:focus {
  outline: none;
  border-color: var(--brand-ci);
  background-color: rgba(255, 91, 26, .12);
  box-shadow: 0 0 0 3px rgba(255, 91, 26, .25);
}
.barcode-search-button {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") center / 16px no-repeat;
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 0;
}
.scan-button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(255, 91, 26, .35);
}

/* Cart lines */
.cart-lines {
  display: grid;
  gap: 6px;
  max-height: 38vh;
  overflow-y: auto;
  padding-right: 2px;
}
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.cart-line b {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}
.cart-line small {
  color: var(--muted);
  font-size: 11px;
}
.empty-cart {
  padding: 28px 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12.5px;
}
.qty-tools {
  display: inline-flex;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.qty-tools button {
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.qty-tools button:hover { background: #fff; }
.qty-tools strong {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
}

/* Totals */
.totals {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.totals > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.totals > div strong { color: var(--ink); font-family: var(--font-display); font-weight: 700; }
.totals .net {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: 14px;
}
.totals .net span { color: var(--ink); font-weight: 700; }
.totals .net strong {
  font-size: 22px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Checkout options panel */
.checkout-options-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--soft));
}
.checkout-discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.checkout-discount-row strong { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.checkout-discount-row span { color: var(--muted); font-size: 11px; }
#openCheckoutPromotionButton {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--violet);
  background: rgba(122, 77, 244, .08);
  color: var(--violet);
  font-weight: 700;
  font-size: 12px;
}
.checkout-quick-actions { display: flex; gap: 8px; align-items: end; }
.checkout-promotion-picker { flex: 1; }
.checkout-promotion-picker span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.checkout-promotion-picker select {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font-weight: 600;
}
.member-button {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}

/* Payment row */
.payment-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pay-option {
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  transition: transform .12s, border-color .12s, box-shadow .15s;
}
.pay-option:hover { transform: translateY(-1px); border-color: var(--ink); box-shadow: var(--shadow-xs); }
.pay-option.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 8px 16px rgba(15, 23, 41, .25);
}

/* POS action grid */
.pos-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pos-action-grid button {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}
.pos-action-grid button:hover { background: var(--soft); }
.pos-action-grid.secondary button { border-style: dashed; }

.cash-audit-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 12px;
}
.cash-audit-strip span { color: var(--muted); font-weight: 600; }
.cash-audit-strip strong { font-family: var(--font-display); font-weight: 700; }

/* Checkout button — hero CTA */
.bill-flow-actions {
  display: grid;
  grid-template-columns: minmax(92px, 1.28fr) repeat(3, minmax(48px, .72fr));
  gap: 6px;
  align-items: stretch;
}
.checkout-button {
  height: 52px;
  border: 1.5px solid #d93d0b;
  border-radius: 14px;
  background: #ff4f18;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(255, 79, 24, .42), inset 0 -2px 0 rgba(0, 0, 0, .16);
  transition: transform .12s, box-shadow .15s;
}
.checkout-button:hover {
  transform: translateY(-2px);
  background: #f04412;
  box-shadow: 0 20px 36px rgba(255, 79, 24, .5), inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.checkout-button:disabled {
  border-color: #fecaca;
  background: #ffe4e6;
  color: #9f1239;
  box-shadow: inset 0 -2px 0 rgba(159, 18, 57, .08);
  cursor: not-allowed;
}

.bill-print-button {
  min-width: 0;
  height: 52px;
  padding: 0 6px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 41, .12);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 11px;
  line-height: 1.05;
  white-space: normal;
}

.bill-history-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.bill-history-search label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bill-history-search span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bill-history-search input {
  height: 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.bill-history-search input:focus {
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 3px rgba(255, 91, 26, .14);
  outline: none;
}

.bill-history-search button {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

/* Seller session bar */
.seller-session-bar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.seller-session-current span { font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; }
.seller-session-current strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.seller-code-field input {
  width: 80px; height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
}
.seller-session-bar button {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 11.5px;
}

.status-line {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  margin: 4px 0 0;
}

/* ============================================================
   9. DASHBOARD VIEW polish
   ============================================================ */
.view-section.active.command-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 14px;
}
.dashboard-main, .dashboard-side {
  display: grid;
  gap: 14px;
}
.ros-hero {
  padding: 24px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(700px 250px at 90% 0%, rgba(255, 91, 26, .26), transparent 60%),
    radial-gradient(700px 300px at 10% 100%, rgba(122, 77, 244, .26), transparent 60%),
    linear-gradient(135deg, var(--plate), #0a0e1a);
  color: #fff;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, .06);
}
.ros-hero h2 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.ros-hero p { color: rgba(255, 255, 255, .68); font-size: 13.5px; line-height: 1.55; }
.ros-hero .eyebrow { color: #ffb38a !important; }
.ros-module-rail { display: flex; gap: 8px; flex-wrap: wrap; }
.ros-module-rail span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .8);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.business-model-panel, .market-coverage-panel,
.dashboard-widget {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.panel-head h2 { font-size: 18px; }
.panel-head .pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.business-model-grid, .market-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.business-model-card, .market-coverage-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  display: grid;
  gap: 4px;
  transition: transform .15s, border-color .15s;
}
.business-model-card:hover, .market-coverage-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-ci);
}
.business-model-card span, .market-coverage-card span {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-ci);
  font-weight: 700;
}
.business-model-card strong, .market-coverage-card strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
}
.business-model-card small, .market-coverage-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.business-model-card.active, .market-coverage-card.active {
  background: linear-gradient(135deg, #fff5ed, #ffe8d8);
  border-color: var(--brand-ci);
  box-shadow: 0 8px 22px rgba(255, 91, 26, .15);
}

/* Suite grid */
.suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.suite-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 4px;
  position: relative;
}
.suite-card span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
}
.suite-card strong { font-family: var(--font-display); font-weight: 700; }
.suite-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.suite-card.active {
  border-color: var(--brand-ci);
  background: linear-gradient(160deg, #fff7f1, #fff);
  box-shadow: 0 8px 18px rgba(255, 91, 26, .12);
}

/* Hero report (today snapshot) */
.hero-report {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #fff, var(--soft));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.hero-report h2 { font-size: 22px; letter-spacing: -0.02em; }
.hero-report p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.hero-score {
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--brand-grad);
  color: #fff;
  text-align: right;
  box-shadow: 0 14px 28px rgba(255, 91, 26, .35);
}
.hero-score span {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .8;
}
.hero-score strong { font-family: var(--font-display); font-size: 28px; font-weight: 700; }

/* KPI grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.dash-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 4px;
  box-shadow: var(--shadow-xs);
}
.dash-card span {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.dash-card strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.dash-card small { color: var(--muted); font-size: 11.5px; }
.dash-card.danger { background: linear-gradient(135deg, #fff1f2, #ffe4e6); border-color: #fecdd3; }
.dash-card.danger strong { color: var(--bad); }

/* ============================================================
   10. MODALS — base polish
   ============================================================ */
.modal-backdrop {
  background: rgba(11, 18, 36, .54);
  backdrop-filter: blur(6px);
}
.modal-backdrop > * {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.cash-payment-card, .qr-payment-card, .discount-modal-card,
.crm-member-modal-card, .table-action-card, .pos-list-modal-card,
.product-lookup-card, .menu-quick-edit-card, .channel-price-card,
.menu-import-card, .stock-operation-card, .purchase-order-card,
.document-preview-card, .supplier-card, .auth-pin-card,
.prep-monitor-modal-card {
  background: #fff;
  border-radius: var(--r-xl) !important;
}

/* ============================================================
   11. BACKOFFICE / SETTINGS — module cards palette
   ============================================================ */
.settings-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.settings-module-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.settings-module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--brand-ci);
  opacity: .9;
}
.settings-module-card.brand::before { background: var(--violet); }
.settings-module-card.branch::before { background: var(--info); }
.settings-module-card.menu::before { background: var(--mint); }
.settings-module-card.stock::before { background: var(--warn); }
.settings-module-card.report::before { background: var(--bad); }
.settings-module-card.delivery::before { background: linear-gradient(90deg, var(--brand-ci), var(--violet)); }
.settings-module-card.more::before { background: var(--ink); }
.settings-module-card span {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-ci);
  font-weight: 700;
}
.settings-module-card.brand span { color: var(--violet); }
.settings-module-card.branch span { color: var(--info); }
.settings-module-card.menu span { color: var(--mint); }
.settings-module-card.stock span { color: #b45309; }
.settings-module-card.report span { color: var(--bad); }
.settings-module-card.delivery span { color: var(--violet); }
.settings-module-card.more span { color: var(--ink); }
.settings-module-card strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}
.settings-module-card ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.settings-module-card li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.settings-module-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: currentColor;
  opacity: .35;
}

.backoffice-board {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.mini-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mini-board-head span {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-ci);
  font-weight: 700;
}
.mini-board-head strong { display: block; font-family: var(--font-display); font-weight: 700; }
.mini-board-head b {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   12. TABLE LAYOUT VARIANTS
   ============================================================ */
.settings-panel, .promotion-panel, .backoffice-panel, .report-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* Prep panel */
.view-section.active.prep-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 14px;
}
.prep-board-panel, .prep-side-panel {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.prep-monitor-strip {
  display: flex;
  gap: 6px;
}
.prep-monitor-strip button {
  flex: 1;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  text-align: left;
}
.prep-monitor-strip button[data-prep-monitor="waiting"] { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fed7aa; }
.prep-monitor-strip button[data-prep-monitor="cooking"] { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #bfdbfe; }
.prep-monitor-strip button[data-prep-monitor="served"] { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #bbf7d0; }
.prep-monitor-strip span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.prep-monitor-strip strong { font-family: var(--font-display); font-size: 22px; }

/* ============================================================
   13. LANDING PAGE
   ============================================================ */
body:has(.landing-topbar),
.landing-topbar ~ * {
  font-family: var(--font-sans);
}
.landing-topbar {
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.landing-brand small { font-size: 11.5px; color: var(--muted); }
.landing-brand strong { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.landing-topbar nav a {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.landing-topbar nav a:hover { color: var(--ink); background: var(--soft); }
.landing-topbar nav a:last-child {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.landing-hero {
  position: relative;
  background:
    radial-gradient(700px 400px at 88% 12%, rgba(122, 77, 244, .14), transparent 60%),
    radial-gradient(900px 600px at 8% 88%, rgba(255, 91, 26, .12), transparent 60%);
}
.landing-hero .eyebrow { color: var(--brand-ci) !important; }
.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 6px 0 18px;
}
.landing-hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 14px;
  background: var(--brand-grad);
  border-radius: 999px;
}
.landing-hero p { font-size: 15.5px; color: var(--muted); line-height: 1.65; max-width: 56ch; }
.hero-actions { gap: 12px; margin-top: 26px; }
.primary-action {
  padding: 13px 22px;
  border-radius: 14px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(255, 91, 26, .35);
  transition: transform .12s, box-shadow .15s;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(255, 91, 26, .45); }
.secondary-action {
  padding: 13px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.product-frame {
  position: relative;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--plate), #060a14);
  color: #fff;
  box-shadow: 0 36px 80px rgba(11, 18, 36, .38);
  border: 1px solid rgba(255, 255, 255, .08);
}
.product-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 91, 26, .35), rgba(122, 77, 244, .35));
  z-index: -1;
  filter: blur(18px);
  opacity: .8;
}
.device-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  margin-bottom: 14px;
}
.device-bar strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11.5px;
  color: var(--ok);
}
.device-bar strong::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.preview-panel {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  gap: 4px;
}
.preview-panel span {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55) !important;
}
.preview-panel strong {
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  font-weight: 700;
}
.preview-panel small { color: rgba(255, 255, 255, .55) !important; font-size: 11.5px; }
.preview-panel.dark { background: linear-gradient(135deg, rgba(255, 91, 26, .25), rgba(255, 61, 138, .18)); border-color: rgba(255, 91, 26, .35); }
.preview-panel.accent { background: linear-gradient(135deg, rgba(122, 77, 244, .25), rgba(37, 99, 235, .18)); border-color: rgba(122, 77, 244, .35); }

.feature-band, .model-band, .login-band {
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 72px);
}
.feature-band { background: #fff; border-top: 1px solid var(--line); }
.feature-band h2, .login-band h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.018em;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.feature-grid article {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 8px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.feature-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-ci);
}
.feature-grid span {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5ed, #ffd9c2);
  color: var(--brand-ci);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.feature-grid strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}
.feature-grid p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

.model-band {
  background: linear-gradient(135deg, var(--plate), #060a14);
  color: #fff;
}
.model-band h2 { color: #fff; }
.model-band > div:first-child p { color: rgba(255, 255, 255, .65); }
.model-band .eyebrow { color: #ffb38a !important; }
.model-list { flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.model-list span {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.login-band {
  background: var(--soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.login-copy p { color: var(--muted); margin-top: 8px; font-size: 14px; line-height: 1.6; }
.login-panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.login-panel label { display: grid; gap: 6px; }
.login-panel span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-panel input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
}
.login-panel input:focus {
  outline: none;
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 4px rgba(255, 91, 26, .14);
}
.login-panel button {
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(255, 91, 26, .35);
}
.login-panel p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }

/* ============================================================
   14. TABLE-ORDER (customer mobile)
   ============================================================ */
.order-shell {
  font-family: var(--font-sans);
  background:
    radial-gradient(600px 300px at 10% -10%, rgba(255, 91, 26, .14), transparent 60%),
    radial-gradient(700px 400px at 100% 10%, rgba(122, 77, 244, .14), transparent 60%),
    var(--soft);
}
.order-hero {
  position: relative;
  min-height: 128px;
  padding: 18px;
  border-radius: 22px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(11, 18, 36, .68), rgba(122, 77, 244, .52) 60%, rgba(255, 91, 26, .48)),
    url("https://images.unsplash.com/photo-1559329007-40df8a9345d8?auto=format&fit=crop&w=1200&q=80") center/cover;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 24px 50px rgba(11, 18, 36, .26);
}
.order-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(300px 120px at 80% 110%, rgba(255, 122, 61, .35), transparent 60%);
  pointer-events: none;
}
.brand-row p {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 200, 170, .92) !important;
}
.brand-row strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.logo-tile {
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}
.table-badge {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.table-badge span { font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.10em; }
.table-badge strong { font-family: var(--font-display); font-size: 30px; font-weight: 700; }

.menu-control {
  margin: 12px -12px 12px;
  padding: 12px 12px 10px;
  background: rgba(247, 248, 251, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.search-box input {
  height: 44px;
  padding: 0 14px 0 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 14px center / 16px 16px;
}
.search-box input:focus {
  outline: none;
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 4px rgba(255, 91, 26, .14);
}

.category-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-rail::-webkit-scrollbar { display: none; }
.category-rail button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.category-rail button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 6px 14px rgba(15, 23, 41, .25);
}

/* Menu grid (table-order) */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.menu-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .12s, box-shadow .15s;
}
.menu-card:active { transform: scale(.98); }
.menu-photo {
  position: relative;
  aspect-ratio: 1;
  background-color: #f3eee5;
  background-size: cover;
  background-position: center;
}
.menu-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .4));
}
.menu-photo span {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(11, 18, 36, .65);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}
.menu-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.menu-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.menu-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-meta b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.menu-meta button {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 0;
  background: var(--brand-grad);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(255, 91, 26, .35);
}

/* Cart dock */
.cart-dock {
  position: fixed;
  inset: auto 12px 12px 12px;
  z-index: 20;
}
.cart-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  box-shadow: 0 18px 36px rgba(11, 18, 36, .28);
}
.cart-summary span { font-size: 13px; font-weight: 700; }
.cart-summary strong {
  font-size: 18px;
  font-weight: 700;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cart-panel#cartPanel {
  margin-top: 8px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: none;
}
.cart-panel#cartPanel.open { display: grid; gap: 10px; }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-head strong { font-family: var(--font-display); font-weight: 700; }
.cart-head button {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 11.5px;
}
.note-box { display: grid; gap: 4px; }
.note-box span { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.note-box textarea {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  resize: vertical;
}
.send-button {
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 14px 28px rgba(255, 91, 26, .35);
}
.send-button:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }

/* ============================================================
   15. RESPONSIVE GUARDS
   ============================================================ */

/* iPad portrait / smaller tablets — keep 3-col but tighten */
@media (max-width: 1180px) {
  .pos-grid {
    grid-template-columns: minmax(240px, 268px) minmax(0, 1fr) minmax(340px, 380px);
    gap: 12px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
  }
  .nav-tab { padding: 0 10px; font-size: 12.5px; }
  .topbar { padding: 10px 16px; }
}

@media (max-width: 1024px) {
  .workspace { padding: 14px; gap: 14px; }
  .pos-grid {
    grid-template-columns: minmax(220px, 248px) minmax(0, 1fr) minmax(320px, 360px);
  }
  .pos-status-bar > div { padding: 4px 8px; }
  .product-grid { padding: 10px; gap: 8px; }
  .nav-tab { padding: 0 9px; font-size: 12px; }
}

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

/* Table-order specifically lives on mobile */
@media (max-width: 480px) {
  .order-shell { padding: 12px 12px 200px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   16. V1.0 PRODUCTION POLISH — compact, touch-safe, go-live
   ============================================================ */

/* Global density guards */
body {
  font-size: 13px;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

.topbar {
  min-height: 66px;
  padding: 9px 16px;
}

.topbar h1 {
  font-size: 17px;
  line-height: 1.05;
}

.brand-logo-tile {
  width: 40px;
  height: 40px;
}

.app-nav {
  min-width: 0;
}

.nav-tab {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.top-actions .field select,
.ghost-button#refreshButton {
  height: 34px;
}

.workspace {
  padding: 12px;
  gap: 12px;
}

/* POS should feel like a working tablet surface, not a presentation page */
body.pos-viewing .dashboard-band {
  display: none;
}

body.pos-viewing .pos-grid {
  grid-template-columns: minmax(168px, 208px) minmax(390px, 1fr) minmax(330px, .86fr);
  gap: 8px;
  padding: 8px;
  min-height: calc(100vh - 78px);
}

body.pos-viewing .pos-focus-toolbar {
  padding: 7px 8px;
  gap: 7px;
  min-height: 48px;
}

body.pos-viewing .pos-brand-mark .brand-logo {
  width: 34px;
  height: 34px;
}

body.pos-viewing .pos-brand-mark strong,
body.pos-viewing .pos-status-bar strong {
  font-size: 12px;
}

body.pos-viewing .pos-brand-mark small,
body.pos-viewing .pos-status-bar span {
  font-size: 9px;
}

body.pos-viewing .focus-control {
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 10.5px;
}

body.pos-viewing .left-panel,
body.pos-viewing .catalog-panel,
body.pos-viewing .cart-panel {
  max-height: calc(100vh - 142px);
  min-height: 0;
  overflow: auto;
}

body.pos-viewing .left-panel,
body.pos-viewing .catalog-panel,
body.pos-viewing .cart-panel {
  padding: 9px;
  border-radius: 14px;
}

body.pos-viewing .panel-head h2,
body.pos-viewing .catalog-toolbar h2,
body.pos-viewing .cart-panel .panel-head h2 {
  font-size: 14px;
}

body.pos-viewing .service-option {
  padding: 8px 9px;
  min-height: 42px;
}

body.pos-viewing .service-option span {
  font-size: 12px;
}

body.pos-viewing .service-option small {
  display: none;
}

body.pos-viewing .table-grid {
  gap: 6px;
}

body.pos-viewing .table-button {
  border-radius: 10px;
}

body.pos-viewing .table-button strong {
  font-size: 15px;
}

body.pos-viewing .catalog-toolbar,
body.pos-viewing .product-view-switch,
body.pos-viewing .category-strip {
  gap: 6px;
}

body.pos-viewing .product-grid {
  grid-template-columns: repeat(3, minmax(102px, 1fr));
  gap: 7px;
  padding: 8px;
  max-height: calc(100vh - 260px);
}

body.pos-viewing .product-button {
  min-height: 112px;
  border-radius: 12px;
}

body.pos-viewing .product-overlay {
  padding: 7px;
}

body.pos-viewing .product-name {
  font-size: 11px;
  line-height: 1.25;
}

body.pos-viewing .product-price {
  font-size: 13px;
}

body.pos-viewing .product-grid.list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  max-height: calc(100vh - 260px);
}

body.pos-viewing .product-list-row {
  min-height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  grid-template-columns: 70px minmax(160px, 1fr) minmax(94px, auto) 70px;
}

body.pos-viewing .product-list-name,
body.pos-viewing .product-list-detail,
body.pos-viewing .product-list-price {
  white-space: nowrap;
}

body.pos-viewing .cart-panel {
  gap: 7px;
}

body.pos-viewing .offline-card {
  padding: 7px 9px;
  gap: 4px;
}

body.pos-viewing .offline-card small,
body.pos-viewing .offline-card .offline-actions.legacy-hidden {
  display: none;
}

body.pos-viewing .offline-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

body.pos-viewing .offline-actions button {
  height: 30px;
  min-width: 0;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 9.5px;
  line-height: 1.1;
  white-space: normal;
}

body.pos-viewing #startNewSaleButton {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

body.pos-viewing #quickHoldBillButton {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

body.pos-viewing #quickHoldBillButton:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body.pos-viewing #recallHeldBillButton {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

body.pos-viewing #recallHeldBillButton:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body.pos-viewing .barcode-panel {
  grid-template-columns: minmax(0, 1fr) 36px 86px;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
}

body.pos-viewing .barcode-panel > div {
  display: none;
}

body.pos-viewing .barcode-input span {
  display: none;
}

body.pos-viewing .barcode-input input,
body.pos-viewing .barcode-search-button,
body.pos-viewing .scan-button {
  height: 36px;
}

body.pos-viewing .barcode-input input {
  font-size: 13px;
  letter-spacing: 0.03em;
}

body.pos-viewing .scan-button {
  padding: 0 10px;
  font-size: 11px;
}

body.pos-viewing .cart-lines {
  max-height: calc(100vh - 500px);
  min-height: 92px;
  gap: 5px;
}

body.pos-viewing .cart-line {
  padding: 7px 8px;
  border-radius: 10px;
}

body.pos-viewing .cart-line b {
  font-size: 12px;
}

body.pos-viewing .cart-line small {
  font-size: 10px;
}

body.pos-viewing .qty-tools button {
  width: 28px;
  height: 28px;
}

body.pos-viewing .totals {
  padding: 8px 10px;
  gap: 2px;
}

body.pos-viewing .totals > div {
  font-size: 11.5px;
}

body.pos-viewing .totals .net {
  margin-top: 3px;
  padding-top: 6px;
}

body.pos-viewing .totals .net strong {
  font-size: 20px;
}

body.pos-viewing .checkout-options-panel {
  padding: 8px;
  gap: 6px;
}

body.pos-viewing #checkoutPromotionImpact {
  display: none;
}

body.pos-viewing .checkout-discount-row strong {
  font-size: 12px;
}

body.pos-viewing .checkout-discount-row span {
  font-size: 10px;
}

body.pos-viewing .checkout-promotion-picker select,
body.pos-viewing .member-button {
  height: 30px;
  font-size: 11px;
}

body.pos-viewing .payment-row {
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

body.pos-viewing .pay-option {
  height: 36px;
  border-radius: 10px;
  font-size: 11.5px;
}

body.pos-viewing .pay-option[data-payment="cash"] {
  border-color: rgba(16, 185, 129, .42);
  background: linear-gradient(135deg, #ecfdf5, #fff);
}

body.pos-viewing .pay-option[data-payment="qr"] {
  border-color: rgba(37, 99, 235, .35);
  background: linear-gradient(135deg, #eff6ff, #fff);
}

body.pos-viewing .pay-option[data-payment="coupon"] {
  border-color: rgba(122, 77, 244, .35);
  background: linear-gradient(135deg, #f5f3ff, #fff);
}

body.pos-viewing .pay-option[data-payment="card"] {
  border-color: rgba(245, 158, 11, .35);
  background: linear-gradient(135deg, #fffbeb, #fff);
}

body.pos-viewing .pay-option.active {
  background: var(--ink);
  border-color: var(--ink);
}

body.pos-viewing .pos-action-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

body.pos-viewing .pos-action-grid button {
  height: 31px;
  padding: 0 6px;
  font-size: 10.5px;
  border-radius: 9px;
}

body.pos-viewing .pos-action-grid button:nth-child(1),
body.pos-viewing .pos-action-grid button:nth-child(2) {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

body.pos-viewing .pos-action-grid button:nth-child(3),
body.pos-viewing .pos-action-grid button:nth-child(4) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

body.pos-viewing .cash-audit-strip,
body.pos-viewing .seller-session-bar {
  padding: 6px 8px;
  font-size: 10.5px;
}

body.pos-viewing .checkout-button {
  height: 46px;
  border-radius: 12px;
  padding: 0 8px;
  background: #ff4f18;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
}

body.pos-viewing .bill-flow-actions {
  grid-template-columns: minmax(84px, 1.32fr) repeat(3, minmax(42px, .72fr));
  gap: 4px;
}

body.pos-viewing .bill-print-button {
  height: 46px;
  padding: 0 4px;
  border-radius: 10px;
  font-size: 9.5px;
}

body.pos-viewing .bill-print-button:nth-of-type(2) {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

body.pos-viewing .bill-print-button:nth-of-type(3) {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

body.pos-viewing .bill-print-button:nth-of-type(4) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

/* Payment / approval modals: focus the working field and keep within tablet */
.modal-backdrop {
  padding: 18px;
}

.cash-payment-card,
.qr-payment-card,
.auth-pin-card,
.crm-member-modal-card,
.product-lookup-card,
.table-action-card {
  max-width: min(94vw, 520px);
  max-height: min(88vh, 720px);
  overflow: auto;
}

.cash-payment-card,
.qr-payment-card {
  padding: 16px !important;
}

.cash-payment-total,
.qr-payment-total {
  padding: 12px;
  border-radius: 14px;
  background: var(--soft);
}

.cash-payment-total strong,
.qr-payment-total strong {
  font-size: 30px;
}

.cash-bank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.cash-bank-grid button,
.qr-payment-mode button,
.card-capture-mode button {
  min-height: 42px;
}

.cash-change-panel {
  border-radius: 14px;
}

.qr-payment-image-frame {
  max-width: 250px;
  margin-inline: auto;
}

/* Backoffice: same concept, less visual bulk */
.settings-layout,
.backoffice-layout {
  padding: 10px;
}

.settings-panel,
.promotion-panel,
.backoffice-panel,
.report-panel,
.prep-board-panel,
.prep-side-panel {
  padding: 14px;
  border-radius: 14px;
}

.settings-module-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
}

.settings-module-card {
  padding: 13px;
  border-radius: 12px;
  gap: 5px;
}

.settings-module-card strong {
  font-size: 14px;
}

.settings-module-card li {
  font-size: 11.5px;
}

.backoffice-kpi-grid,
.report-kpi-grid {
  gap: 8px;
}

.backoffice-board {
  padding: 12px;
  border-radius: 12px;
}

/* Table-order: prettier, faster customer ordering */
.order-shell {
  max-width: 460px;
  padding-bottom: 178px;
}

.order-hero {
  min-height: 112px;
  padding: 14px;
  border-radius: 18px;
}

.brand-row strong {
  font-size: 17px;
}

.table-badge {
  padding: 9px 10px;
  border-radius: 13px;
}

.table-badge strong {
  font-size: 24px;
}

.menu-control {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 10px -12px 10px;
  padding: 10px 12px;
}

.search-box input {
  height: 40px;
  border-radius: 12px;
}

.category-rail button {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.menu-grid {
  gap: 8px;
}

.menu-card {
  border-radius: 14px;
}

.menu-body {
  padding: 10px;
  gap: 6px;
}

.menu-body strong {
  min-height: auto;
  font-size: 13px;
}

.menu-meta b {
  font-size: 14px;
}

.menu-meta button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 19px;
}

.cart-dock {
  inset: auto 10px 10px;
}

.cart-summary {
  padding: 12px 14px;
  border-radius: 15px;
}

.send-button {
  height: 46px;
  border-radius: 12px;
}

@media (min-width: 900px) and (max-width: 1180px) and (orientation: landscape) {
  body.pos-viewing .topbar {
    min-height: 58px;
    padding: 7px 10px;
  }

  body.pos-viewing .workspace {
    padding: 7px;
  }

  body.pos-viewing .pos-grid {
    grid-template-columns: 150px minmax(326px, 1fr) minmax(306px, .9fr);
    min-height: calc(100vh - 60px);
    gap: 6px;
  }

  body.pos-viewing .left-panel,
  body.pos-viewing .catalog-panel,
  body.pos-viewing .cart-panel {
    max-height: calc(100vh - 108px);
    padding: 8px;
  }

  body.pos-viewing .product-grid,
  body.pos-viewing .product-grid.list-view {
    max-height: calc(100vh - 238px);
  }

  body.pos-viewing .cart-lines {
    max-height: calc(100vh - 468px);
  }

  body.pos-viewing .pos-action-grid button {
    height: 29px;
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: auto;
  }

  .nav-tab {
    height: 32px;
  }

  .modal-backdrop {
    padding: 10px;
  }
}

/* POS review pass 01 — column 2 catalog fixes */
body.pos-viewing .catalog-panel {
  overflow: hidden;
}

body.pos-viewing .catalog-filter-bar {
  margin-bottom: 6px;
}

body.pos-viewing .catalog-search {
  position: relative;
  margin: 0;
}

body.pos-viewing .catalog-search span {
  display: none;
}

body.pos-viewing .catalog-search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23607085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") center / contain no-repeat;
  pointer-events: none;
}

body.pos-viewing .catalog-search input {
  height: 34px;
  padding: 0 12px 0 36px;
  background: #fff;
  font-size: 12px;
}

body.pos-viewing .catalog-search input::placeholder {
  color: #7a8496;
}

body.pos-viewing .category-toggle-button {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, var(--soft));
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

body.pos-viewing .category-toggle-button[aria-expanded="true"] {
  border-color: rgba(255, 91, 26, .38);
  background: #fff7ed;
  color: #9a3412;
}

body.pos-viewing .catalog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 76px;
  overflow: auto;
  transition: max-height .16s ease, opacity .14s ease, margin .14s ease;
}

body.pos-viewing .catalog-categories.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

body.pos-viewing .catalog-categories button,
body.pos-viewing #categoryTabs button {
  flex: 0 0 auto;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 999px;
}

body.pos-viewing .product-grid {
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 6px;
  padding: 7px;
  max-height: calc(100vh - 250px);
  overflow: auto;
}

body.pos-viewing .product-button {
  min-height: 104px;
  aspect-ratio: 1;
}

body.pos-viewing .product-visual {
  aspect-ratio: 1;
  height: 100%;
}

body.pos-viewing .product-visual img,
body.pos-viewing .product-visual svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pos-viewing .product-art.has-image,
body.pos-viewing .table-action-product-art.has-image,
body.pos-viewing .online-menu-art.has-image,
body.pos-viewing .backoffice-product-art.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.pos-viewing .product-art.has-image img,
body.pos-viewing .table-action-product-art.has-image img,
body.pos-viewing .online-menu-art.has-image img,
body.pos-viewing .backoffice-product-art.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.pos-viewing .product-overlay {
  inset: auto 6px 6px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .2);
  backdrop-filter: blur(4px);
}

body.pos-viewing .product-overlay-meta {
  gap: 6px;
}

body.pos-viewing .product-code {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, .78);
}

body.pos-viewing .product-meta,
body.pos-viewing .barcode-chip {
  display: none;
}

body.pos-viewing .product-grid.list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 6px;
  background: #fff;
  max-height: calc(100vh - 250px);
}

body.pos-viewing .product-list-row {
  display: grid;
  grid-template-columns: minmax(96px, .82fr) minmax(160px, 1.35fr) minmax(54px, .45fr) minmax(66px, .55fr);
  align-items: center;
  column-gap: 8px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 8px;
}

body.pos-viewing .product-list-line {
  display: contents;
}

body.pos-viewing .product-list-name {
  font-size: 11.5px;
  max-width: none;
}

body.pos-viewing .product-list-code {
  justify-self: start;
  max-width: 100%;
  padding: 0;
  background: transparent;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pos-viewing .product-list-detail {
  justify-self: start;
  font-size: 10.5px;
  color: var(--muted);
}

body.pos-viewing .product-list-price {
  justify-self: end;
  min-width: 0;
  font-size: 12px;
}

@media (min-width: 900px) and (max-width: 1180px) and (orientation: landscape) {
  body.pos-viewing .product-grid,
  body.pos-viewing .product-grid.list-view {
    max-height: calc(100vh - 226px);
  }

  body.pos-viewing .product-list-row {
    grid-template-columns: minmax(82px, .82fr) minmax(132px, 1.35fr) minmax(44px, .45fr) minmax(58px, .55fr);
    column-gap: 6px;
  }
}

/* POS review pass 02 — channel 3 barcode should be framed, not solid */
body.pos-viewing .barcode-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 45px;
  align-items: stretch;
  min-height: 61px;
  padding: 8px;
  border: 1.5px solid rgba(255, 91, 26, .38);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #fffaf7);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72), 0 6px 14px rgba(13, 20, 36, .05);
}

body.pos-viewing .barcode-panel::before {
  display: none;
}

body.pos-viewing .barcode-panel > div {
  display: none;
}

body.pos-viewing .barcode-panel .eyebrow {
  display: none;
}

body.pos-viewing .barcode-panel h2 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
}

body.pos-viewing .barcode-input span {
  display: none;
}

body.pos-viewing .barcode-input {
  min-width: 0;
}

body.pos-viewing .barcode-input input,
body.pos-viewing .barcode-search-button {
  height: 45px;
  min-height: 45px;
}

body.pos-viewing .barcode-input input {
  width: 100%;
  box-sizing: border-box;
  padding: 0 12px 0 58px;
  border: 1.5px solid var(--line-strong);
  background-color: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: .03em;
  box-shadow: none;
}

body.pos-viewing .barcode-input input::placeholder {
  color: #4b5568;
  opacity: 1;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0;
}

body.pos-viewing .barcode-input input:focus {
  background-color: #fff;
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 3px rgba(255, 91, 26, .16);
}

body.pos-viewing .barcode-search-button {
  display: grid;
  place-items: center;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1729' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

body.pos-viewing .scan-button {
  display: none;
}

/* POS lock mask — 20% translucent black overlay before selling */
.pos-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .2);
  backdrop-filter: blur(2px);
}

.pos-lock-overlay.hidden {
  display: none;
}

.pos-lock-card {
  width: min(380px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 91, 26, .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 54px rgba(15, 23, 41, .22);
}

.pos-lock-brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pos-lock-brand h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.pos-lock-card p,
.pos-lock-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.pos-lock-card label {
  display: grid;
  gap: 6px;
}

.pos-lock-card label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pos-lock-card input {
  height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
}

.pos-lock-card input:focus {
  border-color: var(--brand-ci);
  box-shadow: 0 0 0 3px rgba(255, 91, 26, .16);
  outline: none;
}

.pos-lock-card button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 900;
}

.pos-lock-card button:disabled {
  background: #e5e7eb;
  color: #64748b;
  cursor: wait;
}

#posImageCacheStatus {
  padding: 7px 9px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
}

body.pos-locked {
  overflow: hidden;
}

/* Product card text must stay readable after tablet image reload/decode. */
body.pos-viewing .product-visual {
  isolation: isolate;
}

body.pos-viewing .product-art.has-image {
  position: relative;
  z-index: 1;
}

body.pos-viewing .product-overlay {
  z-index: 4;
  display: grid;
  min-height: 42px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
  color: #fff;
  pointer-events: none;
}

body.pos-viewing .product-name,
body.pos-viewing .product-code,
body.pos-viewing .product-price {
  display: block;
  color: #fff;
  opacity: 1;
  visibility: visible;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

body.pos-viewing .product-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
}

body.pos-viewing .product-price {
  white-space: nowrap;
}

/* Tablet hardening: keep POS inside iPad/tablet landscape and reduce image pressure. */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  html,
  body.pos-viewing {
    width: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  body.pos-viewing .topbar {
    min-height: 52px;
    padding: 6px 8px;
  }

  body.pos-viewing .workspace {
    height: calc(100dvh - 52px);
    padding: 5px;
    overflow: hidden;
  }

  body.pos-viewing .pos-grid {
    height: 100%;
    min-height: 0;
    grid-template-columns: 138px minmax(300px, 1fr) minmax(288px, .92fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
    overflow: hidden;
  }

  body.pos-viewing .pos-focus-toolbar {
    min-height: 42px;
    padding: 5px 6px;
    gap: 5px;
  }

  body.pos-viewing .pos-status-bar {
    gap: 4px;
  }

  body.pos-viewing .focus-control,
  body.pos-viewing .top-offline-card button {
    min-height: 28px;
    height: 28px;
    padding: 0 6px;
    font-size: 9.5px;
  }

  body.pos-viewing .left-panel,
  body.pos-viewing .catalog-panel,
  body.pos-viewing .cart-panel {
    height: 100%;
    max-height: none;
    min-height: 0;
    padding: 7px;
    overflow: hidden;
  }

  body.pos-viewing .left-panel,
  body.pos-viewing .cart-panel {
    overflow: auto;
  }

  body.pos-viewing .catalog-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body.pos-viewing .catalog-toolbar {
    gap: 6px;
    margin-bottom: 6px;
  }

  body.pos-viewing .catalog-toolbar h2 {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.pos-viewing .catalog-toolbar-actions {
    flex-wrap: nowrap;
    gap: 5px;
  }

  body.pos-viewing .product-view-switch {
    padding: 3px;
  }

  body.pos-viewing .view-mode {
    width: 30px;
    height: 28px;
    font-size: 13px;
  }

  body.pos-viewing .image-reload-button {
    height: 34px;
    padding: 0 9px;
    font-size: 10px;
  }

  body.pos-viewing .catalog-filter-bar {
    grid-template-columns: minmax(160px, 1fr) minmax(118px, .45fr);
    gap: 6px;
    margin-bottom: 5px;
  }

  body.pos-viewing .catalog-search input,
  body.pos-viewing .category-toggle-button {
    height: 30px;
    font-size: 10.5px;
  }

  body.pos-viewing .catalog-categories {
    grid-column: 1 / -1;
    max-height: 56px;
  }

  body.pos-viewing .product-grid {
    max-height: none;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.pos-viewing .product-grid:not(.list-view) {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 5px;
    padding: 5px;
  }

  body.pos-viewing .product-button {
    min-height: 0;
    aspect-ratio: 1;
    contain: content;
  }

  body.pos-viewing .product-overlay {
    inset: auto 5px 5px;
    padding: 5px 6px;
    border-radius: 8px;
    min-height: 40px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.68));
    backdrop-filter: none;
  }

  body.pos-viewing .product-name {
    font-size: 10.5px;
    line-height: 1.15;
    max-height: 24px;
  }

  body.pos-viewing .product-price {
    font-size: 11px;
  }

  body.pos-viewing .product-grid.list-view {
    max-height: none;
  }

  body.pos-viewing .product-list-row {
    min-height: 32px;
    grid-template-columns: minmax(64px, .65fr) minmax(120px, 1.35fr) minmax(36px, .35fr) minmax(54px, .48fr);
    column-gap: 5px;
    padding: 0 7px;
  }

  body.pos-viewing .product-list-name {
    font-size: 10.5px;
  }

  body.pos-viewing .product-list-code,
  body.pos-viewing .product-list-detail {
    font-size: 9.5px;
  }

  body.pos-viewing .cart-lines {
    max-height: 18dvh;
  }

  body.pos-viewing .checkout-options-panel,
  body.pos-viewing .totals,
  body.pos-viewing .payment-row,
  body.pos-viewing .pos-action-grid,
  body.pos-viewing .bill-flow-actions {
    margin-top: 4px;
    margin-bottom: 4px;
  }
}

/* Final cart balance override: keep controls tidy while reserving real bill-list space. */
body.pos-viewing .cart-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  overflow: auto !important;
}

body.pos-viewing .offline-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  margin-top: 0 !important;
}

body.pos-viewing .offline-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

body.pos-viewing .offline-actions button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 4px !important;
  font-size: 9px !important;
}

body.pos-viewing .barcode-panel {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.pos-viewing .cart-lines {
  flex: 1 1 auto !important;
  min-height: 190px !important;
  max-height: 38dvh !important;
  margin: 4px 0 6px !important;
  overflow: auto !important;
}

body.pos-viewing .checkout-options-panel {
  margin: 4px 0 !important;
}

body.pos-viewing #checkoutPromotionImpact {
  display: none !important;
}

body.pos-viewing .payment-row,
body.pos-viewing .pos-action-grid,
body.pos-viewing .bill-flow-actions {
  margin-top: 3px !important;
  margin-bottom: 3px !important;
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  body.pos-viewing .cart-lines {
    min-height: 240px !important;
    max-height: 42dvh !important;
  }
}
