/* POS catalog + cart shell (dashboard) */

@import url('inter-font.css');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pos-page-bg: #e8e9eb;
  --pos-surface: #ffffff;
  --pos-text: #111111;
  --pos-muted: #6b7280;
  --pos-border: #d1d5db;
  --pos-tab-active: #374151;
  --pos-tab-inactive-bg: #f3f4f6;
  --pos-btn-dark: #374151;
  --pos-btn-danger: #dc2626;
  --pos-danger: #b91c1c;
  --pos-icon-btn-bg: #404040;
  --pos-icon-btn-fg: #ffffff;
  --pos-icon-btn-hover-bg: #4d4d4d;
  --pos-icon-btn-border: #404040;
  --pos-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --pos-radius: 12px;
  --pos-radius-sm: 10px;
  /* Cart column: fixed enough for totals/input; product grid takes the remaining space. */
  --pos-cart-track: clamp(320px, 30vw, 380px);
  /* Scrollbars — thin track/thumb to match light POS chrome (overrides classic OS arrows in Chromium). */
  --pos-scrollbar-size: 8px;
  --pos-scrollbar-thumb: #bcc4d1;
  --pos-scrollbar-thumb-hover: #9ca6b8;
  --pos-scrollbar-track: #eceef2;
  /* Data tables (staff / orders-style lists) */
  --pos-table-head-bg: var(--pos-icon-btn-bg);
  --pos-table-head-fg: var(--pos-icon-btn-fg);
  --pos-table-row-divider: #e8eaed;
  --pos-table-row-you-bg: #f5f9ff;
  --pos-table-row-you-hover-bg: #eef6ff;
  /* Row action icon buttons */
  --pos-row-action-edit-bg: var(--pos-tab-inactive-bg);
  --pos-row-action-edit-fg: var(--pos-text);
  --pos-row-action-edit-hover-bg: #e5e7eb;
  --pos-row-action-info-bg: #e8f0fe;
  --pos-row-action-info-fg: #2563eb;
  --pos-row-action-info-hover-bg: #dbeafe;
  --pos-row-action-danger-bg: #fce8e8;
  --pos-row-action-danger-fg: var(--pos-btn-danger);
  --pos-row-action-danger-hover-bg: #f9d4d4;
  /* Status chips in tables */
  --pos-chip-success-bg: #eaf7ef;
  --pos-chip-success-fg: #166534;
  --pos-chip-neutral-bg: var(--pos-tab-inactive-bg);
  --pos-chip-neutral-fg: var(--pos-muted);
  --pos-chip-warn-bg: #fdf6ea;
  --pos-chip-warn-fg: #92400e;
}

/* Hide secondary guide / subtitle copy site-wide (cleaner UI). */
.pos-staff-page-kicker,
.pos-staff-lead,
.pos-staff-lead-note,
.pos-analytics-lead,
.pos-analytics-filter-help,
.pos-analytics-card-hint,
.pos-analytics-kpi-sub,
.pos-analytics-period-line,
.pos-analytics-reports-only-lead,
.pos-analytics-foot,
.pos-product-editor-section-hint,
.pos-product-editor-field-hint,
.pos-product-check-list-hint,
.pos-product-modal-ready-hint,
.pos-product-mixmatch-hint,
.pos-catalog-list-hint,
.pos-staff-form-hint,
.pos-reports-filter-help,
.pos-reports-launch-card-kicker,
.pos-embedded-page-lead,
.pos-report-export-tile-sub,
.pos-staff-access-hint,
.pos-inv-supply-section-hint,
.pos-checkout-hint,
.pos-drafts-hint,
.pos-cart-dine-type-hint,
.pos-suggestions-modal-subtitle,
.pos-touch-check-list-hint,
.pos-touch-picker-hint,
.pos-order-editor-hint,
.pos-order-field-help,
#pos-order-lifecycle-lead,
.pos-log-sub,
.pos-log-subject-kicker,
.pos-log-lead,
.pos-log-lead-note,
.pos-log-technical-hint,
#pos-extra-ingredient-subtitle,
#pos-shift-end-print-hint,
#pos-analytics-ai-status,
.pos-shift-expected-final,
.pos-order-status-explainer,
#pos-customer-orders-caption,
.pos-cashier-shift-panel .pos-cashier-shift-hint,
.auth-step-hint,
.auth-field-hint {
  display: none !important;
}

.pos-analytics-status-msg {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--pos-danger);
}

.pos-analytics-status-msg:empty {
  display: none;
}

body.pos-page *,
body.pos-page *::before,
body.pos-page *::after {
  box-sizing: border-box;
}

body.pos-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--pos-page-bg);
  color: var(--pos-text);
  -webkit-tap-highlight-color: transparent;
}

/* Thin scrollbars + rounded thumb; hide legacy WebKit scrollbar arrows (Windows classic UI). */
body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
) {
  scrollbar-width: thin;
  scrollbar-color: var(--pos-scrollbar-thumb) var(--pos-scrollbar-track);
}

body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
)::-webkit-scrollbar {
  width: var(--pos-scrollbar-size);
  height: var(--pos-scrollbar-size);
}

body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
)::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
)::-webkit-scrollbar-track {
  background: var(--pos-scrollbar-track);
  border-radius: 999px;
}

body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
)::-webkit-scrollbar-thumb {
  background: var(--pos-scrollbar-thumb);
  border-radius: 999px;
}

body.pos-page :where(
  .pos-catalog,
  .pos-cart-items-scroll,
  .pos-more-modal-body,
  .pos-product-modal-body,
  .pos-staff-body,
  .pos-staff-editor-form,
  .pos-catalog-form-modal,
  .pos-payment-sub-list,
  .pos-inv-manage-scroll,
  #pos-report-modal-scroll,
  .pos-report-daily-inner,
  .pos-global-cashier-shift-inner,
  .pos-shift-start-modal-body
)::-webkit-scrollbar-thumb:hover {
  background: var(--pos-scrollbar-thumb-hover);
}

body.pos-page .pos-category-bar {
  scrollbar-width: thin;
  scrollbar-color: var(--pos-scrollbar-thumb) var(--pos-scrollbar-track);
}

body.pos-page .pos-category-bar::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

body.pos-page .pos-category-bar::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.pos-page .pos-category-bar::-webkit-scrollbar-track {
  background: var(--pos-scrollbar-track);
  border-radius: 999px;
}

body.pos-page .pos-category-bar::-webkit-scrollbar-thumb {
  background: var(--pos-scrollbar-thumb);
  border-radius: 999px;
}

body.pos-page .pos-category-bar::-webkit-scrollbar-thumb:hover {
  background: var(--pos-scrollbar-thumb-hover);
}

.pos-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.pos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: var(--pos-surface);
  border-bottom: 1px solid var(--pos-border);
  gap: 1rem;
  flex-shrink: 0;
}

.pos-topbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pos-brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-topbar-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pos-pos-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pos-muted);
  margin-right: 0.1rem;
}

.pos-pos-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.pos-pos-status--offline .pos-pos-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.pos-pos-status--online .pos-pos-status-text {
  color: #15803d;
}

.pos-pos-status--offline .pos-pos-status-text {
  color: var(--pos-danger, #b91c1c);
}

.pos-pos-status--checking .pos-pos-status-dot {
  background: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.25);
}

.pos-pos-status--checking .pos-pos-status-text {
  color: #a16207;
}

.pos-pos-status--local .pos-pos-status-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
}

.pos-pos-status--local .pos-pos-status-text {
  color: var(--pos-muted);
}

.pos-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--pos-icon-btn-border);
  border-radius: 8px;
  background: var(--pos-icon-btn-bg);
  color: var(--pos-icon-btn-fg);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.pos-icon-btn:hover:not(:disabled) {
  background: var(--pos-icon-btn-hover-bg);
}

.pos-icon-btn:focus-visible {
  outline: 2px solid var(--pos-icon-btn-bg);
  outline-offset: 2px;
}

.pos-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Heroicons outline 24×24 (stroke inherits currentColor = --pos-icon-btn-fg) */
.pos-icon-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.pos-notify-badge {
  position: relative;
}

.pos-notify-badge[data-count]:not([data-count="0"])::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
}

.pos-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 0;
  background: var(--pos-page-bg);
  flex-shrink: 0;
  min-width: 0;
}

.pos-cat-tab {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--pos-tab-inactive-bg);
  color: var(--pos-text);
}

.pos-cat-tab:hover {
  filter: brightness(0.97);
}

.pos-cat-tab.is-active {
  background: var(--pos-tab-active);
  color: #fff;
}

.pos-cart-dine-type-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0 0 0.65rem;
  margin: 0 0 0.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  min-width: 0;
}

.pos-cart-dine-type-bar .pos-cat-tab {
  flex: 0 0 auto;
}

body.pos-page .pos-cart-dine-type-bar {
  scrollbar-width: thin;
  scrollbar-color: var(--pos-scrollbar-thumb) var(--pos-scrollbar-track);
}

body.pos-page .pos-cart-dine-type-bar::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

body.pos-page .pos-cart-dine-type-bar::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.pos-page .pos-cart-dine-type-bar::-webkit-scrollbar-track {
  background: var(--pos-scrollbar-track);
  border-radius: 999px;
}

body.pos-page .pos-cart-dine-type-bar::-webkit-scrollbar-thumb {
  background: var(--pos-scrollbar-thumb);
  border-radius: 999px;
}

body.pos-page .pos-cart-dine-type-bar::-webkit-scrollbar-thumb:hover {
  background: var(--pos-scrollbar-thumb-hover);
}

.pos-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  min-height: 0;
  overflow: hidden;
}

.pos-body-catalogue {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pos-catalog {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.pos-category-bar.pos-register-shift-locked,
.pos-product-grid.pos-register-shift-locked,
.pos-cart-dine-type-bar.pos-register-shift-locked {
  pointer-events: none;
  opacity: 0.52;
  filter: grayscale(0.06);
}

.pos-category-bar.pos-register-shift-locked .pos-cat-tab,
.pos-cart-dine-type-bar.pos-register-shift-locked .pos-cat-tab {
  cursor: not-allowed;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Narrow phones: two columns stay tappable */
@media (orientation: portrait) and (max-width: 1024px) {
  .pos-app {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .pos-topbar {
    padding-top: max(0.65rem, env(safe-area-inset-top));
    padding-bottom: 0.65rem;
  }

  .pos-icon-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .pos-brand {
    font-size: 1rem;
  }

  .pos-body {
    flex-direction: column;
    gap: 0.85rem;
    overflow: hidden;
    align-items: stretch;
    padding-top: 1rem;
  }

  .pos-body-catalogue {
    flex: 3 1 0;
    min-height: 0;
    gap: 0.65rem;
  }

  .pos-category-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0.45rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .pos-cat-tab {
    flex: 0 0 auto;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
  }

  .pos-catalog {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .pos-cart {
    flex: 1 1 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .pos-cart-stack {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .pos-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .pos-cart-empty {
    min-height: 5rem;
    padding: 0.85rem 0.5rem;
  }

  .pos-more-modal:not(#pos-more-modal) {
    width: min(720px, calc(100vw - 1.25rem));
    max-height: min(92dvh, calc(100vh - 1.5rem));
  }

  #pos-more-modal {
    width: min(440px, calc(100vw - 1.25rem));
    max-height: min(85dvh, calc(100vh - 1.5rem));
  }
}

@media (orientation: portrait) and (max-width: 540px) {
  .pos-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-cart {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
}

/* ——— Tablet landscape: keep two columns, balance catalogue + cart ——— */
@media (orientation: landscape) and (min-width: 721px) and (max-width: 1366px) {
  :root {
    --pos-cart-track: clamp(320px, 30vw, 380px);
  }

  .pos-app {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .pos-topbar {
    padding: 0.55rem 0.85rem;
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .pos-icon-btn {
    width: 2.65rem;
    height: 2.65rem;
    min-width: 2.65rem;
    min-height: 2.65rem;
  }

  .pos-category-bar {
    padding: 0.55rem 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .pos-cart-dine-type-bar {
    padding: 0 0 0.55rem;
  }

  .pos-cat-tab {
    flex: 0 0 auto;
    padding: 0.45rem 0.95rem;
  }

  .pos-body {
    gap: 0.75rem;
    padding: 1rem max(0.85rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
    overflow: hidden;
    min-height: 0;
  }

  .pos-body-catalogue {
    gap: 0.55rem;
  }

  .pos-catalog {
    min-width: 0;
    min-height: 0;
  }

  .pos-cart {
    flex: 0 0 var(--pos-cart-track);
    width: var(--pos-cart-track);
    min-width: var(--pos-cart-track);
    min-height: 0;
    max-height: none;
    overflow: hidden;
    padding: 0;
  }

  .pos-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .pos-product-card-caption {
    font-size: 0.75rem;
    padding: 0.5rem 0.55rem;
  }

  .pos-more-modal:not(#pos-more-modal) {
    width: min(720px, calc(100vw - 1.5rem));
    max-height: min(94dvh, calc(100vh - 1rem));
  }

  #pos-more-modal {
    width: min(420px, calc(100vw - 1.5rem));
    max-height: min(90dvh, calc(100vh - 1rem));
  }
}

/* ——— Small phones / narrow landscape ——— */
@media (max-width: 720px) and (orientation: landscape) {
  :root {
    --pos-cart-track: clamp(252px, 38vw, 300px);
  }

  .pos-body {
    gap: 0.5rem;
  }

  .pos-body-catalogue {
    gap: 0.5rem;
  }

  .pos-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .pos-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pos-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--pos-surface);
  border-radius: var(--pos-radius);
  box-shadow: var(--pos-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.pos-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.pos-product-card.is-hidden {
  display: none;
}

.pos-product-card-img {
  aspect-ratio: 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pos-product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-product-ph {
  width: 40%;
  height: 40%;
  opacity: 0.25;
  color: var(--pos-muted);
}

.pos-product-card-caption {
  padding: 0.65rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.pos-cart {
  flex: 0 0 var(--pos-cart-track);
  width: var(--pos-cart-track);
  min-width: var(--pos-cart-track);
  max-width: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.pos-cart-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.pos-cart-card {
  background: var(--pos-surface);
  border-radius: var(--pos-radius);
  box-shadow: var(--pos-shadow);
  padding: 0.85rem;
  min-width: 0;
}

.pos-cart-card--items {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-cart-card--totals {
  flex: 0 0 auto;
  min-width: 0;
}

.pos-cart-card input[type='text'],
.pos-cart-card select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  font: inherit;
  margin-bottom: 0.75rem;
}

.pos-cart-dine-type-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--pos-muted, #666);
}

/* Author `.pos-cart-empty { display:flex }` overrides UA `[hidden]` — force hide when toggled in JS */
.pos-cart-empty[hidden] {
  display: none !important;
}

.pos-cart-items-scroll {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-cart-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--pos-muted);
  padding: 1.25rem 0.5rem;
  min-height: 8rem;
}

.pos-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.pos-cart-line-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.pos-cart-line-suggestions-btn {
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.2rem 0.45rem;
  border: none;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pos-cart-line-suggestions-btn:hover {
  background: rgba(37, 99, 235, 0.16);
}

.pos-cart-line-suggestions-btn:focus {
  outline: none;
}

.pos-cart-line-suggestions-btn:focus-visible {
  outline: 2px solid var(--pos-accent, #2563eb);
  outline-offset: 2px;
}

.pos-suggestions-modal {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(88dvh, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-suggestions-modal-head-text {
  min-width: 0;
  text-align: center;
}

.pos-suggestions-modal-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--pos-muted);
  font-weight: 400;
}

.pos-suggestions-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-top: 0.35rem;
}

.pos-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pos-suggestions-modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--pos-border);
}

.pos-suggestions-modal-footer .pos-staff-btn {
  width: 100%;
}

.pos-suggestion-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.pos-suggestion-pick:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pos-suggestion-pick:focus {
  outline: none;
}

.pos-suggestion-pick:focus-visible {
  outline: 2px solid var(--pos-accent, #2563eb);
  outline-offset: 2px;
}

.pos-suggestion-pick-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--pos-radius-sm);
  background: #f3f4f6;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pos-muted);
}

.pos-suggestion-pick-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-suggestion-pick-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.pos-suggestion-pick-name {
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-suggestion-pick-price {
  font-size: 0.78rem;
  color: var(--pos-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pos-suggestion-pick-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.pos-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: #f9fafb;
  transition: background 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.pos-cart-line:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.pos-cart-line:focus {
  outline: none;
}

.pos-cart-line:focus-visible {
  outline: 2px solid var(--pos-accent, #2563eb);
  outline-offset: 2px;
}

.pos-cart-line-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.pos-cart-line-main strong,
.pos-cart-line-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.pos-cart-line-meta {
  color: var(--pos-muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.pos-cart-line-components {
  margin: 0.3rem 0 0;
  padding: 0 0 0 1rem;
  list-style: disc;
  font-size: 0.72rem;
  color: var(--pos-muted);
  line-height: 1.35;
}

.pos-cart-line-components li {
  margin: 0.08rem 0;
}

.pos-cart-line b,
.pos-cart-line-price {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pos-cart-empty-visual {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  color: var(--pos-muted);
  opacity: 0.5;
}

.pos-cart-empty-grid {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.pos-cart-empty-plus {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
}

.pos-cart-totals {
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.pos-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.pos-cart-row:last-of-type {
  margin-bottom: 0;
}

.pos-cart-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.pos-cart-row > span:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pos-cart-row-discount {
  align-items: center;
}

.pos-cart-discount-label-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.pos-cart-discount-label-cell > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.pos-cart-discount-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  background: var(--pos-tab-inactive-bg);
  color: var(--pos-text);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.pos-cart-discount-details-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.pos-cart-discount-details-btn:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: var(--pos-accent, #2563eb);
}

.pos-cart-discount-details-btn:focus-visible {
  outline: 2px solid var(--pos-accent, #2563eb);
  outline-offset: 2px;
}

.pos-cart-discount-details-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-cart-discount-breakdown-modal .pos-more-modal-body {
  padding: 1rem 1.15rem 1.35rem;
}

.pos-cart-discount-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-cart-breakdown-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pos-cart-breakdown-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pos-cart-breakdown-head + .pos-cart-breakdown-dl {
  padding-top: 0.65rem;
  margin-top: 0;
  border-top: 1px solid #f1f5f9;
}

.pos-cart-breakdown-product {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pos-text);
  line-height: 1.35;
  word-break: break-word;
}

.pos-cart-breakdown-remove {
  flex-shrink: 0;
  align-self: flex-start;
  margin: 0;
  border: none;
  border-radius: 8px;
  padding: 0.38rem 0.62rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: #fee2e2;
  color: #b91c1c;
  transition: background 0.12s ease;
}

.pos-cart-breakdown-remove:hover {
  background: #fecaca;
}

.pos-cart-breakdown-dl {
  display: grid;
  grid-template-columns: minmax(4rem, auto) 1fr;
  gap: 0.42rem 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.pos-cart-breakdown-dl dt {
  margin: 0;
  padding: 0;
  color: var(--pos-muted);
  font-weight: 500;
}

.pos-cart-breakdown-dl dd {
  margin: 0;
  padding: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--pos-text);
}

.pos-cart-breakdown-dd-strong {
  font-weight: 700 !important;
}

.pos-cart-row-due {
  margin-top: 0.6rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--pos-border);
  font-size: 1rem;
  font-weight: 700;
}

.pos-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0;
}

.pos-cart-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  overflow: visible;
}

.pos-cart-actions-row .pos-btn-draft {
  padding: 0.62rem 0.5rem;
  font-size: 0.8125rem;
}

.pos-btn-draft-notify {
  position: relative;
  overflow: visible;
}

.pos-btn-draft-notify[data-count]:not([data-count="0"])::after {
  content: attr(data-count);
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  z-index: 1;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}

.pos-btn-draft-notify.has-online-order {
  animation: pos-draft-pulse 1.4s ease-in-out infinite;
}

@keyframes pos-draft-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.28);
  }
}

.pos-cart-actions button {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: var(--pos-radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pos-cart-actions .pos-btn-muted {
  background: #f3f4f6;
  color: var(--pos-text);
}

.pos-cart-actions .pos-btn-muted:hover {
  background: #e5e7eb;
}

.pos-cart-actions .pos-btn-primary {
  background: var(--pos-btn-dark);
  color: #fff;
}

.pos-cart-actions .pos-btn-primary:hover {
  filter: brightness(1.05);
}

.pos-cart-actions .pos-btn-danger {
  background: #e85d5d;
  color: #fff;
}

.pos-cart-actions .pos-btn-danger:hover {
  filter: brightness(1.06);
}

.pos-drafts-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--pos-muted);
}

.pos-drafts-modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pos-drafts-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(52vh, 24rem);
  overflow-y: auto;
}

.pos-draft-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.65rem;
  align-items: start;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--pos-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-draft-card--paid {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.04);
}

.pos-draft-card:hover,
.pos-draft-card:focus-visible {
  border-color: #9ca3af;
  box-shadow: var(--pos-shadow);
  outline: none;
}

.pos-draft-card-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.pos-draft-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.15rem 0 0;
}

.pos-draft-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}

.pos-draft-card-badge--paid {
  color: #15803d;
  background: rgba(22, 163, 74, 0.14);
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.pos-draft-card-badge--cloud {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.pos-draft-card-meta {
  margin: 0;
  grid-column: 1;
  font-size: 0.8125rem;
  color: var(--pos-muted);
  line-height: 1.4;
}

.pos-draft-card-amount {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

.pos-draft-card-post-sale {
  grid-column: 1 / -1;
  justify-self: stretch;
  margin-top: 0.35rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--pos-radius-sm);
  background: #15803d;
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.pos-draft-card-post-sale:hover {
  filter: brightness(1.06);
}

.pos-draft-card-delete {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.15rem;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: var(--pos-danger);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pos-draft-card-delete:hover {
  opacity: 0.85;
}

.pos-drafts-empty {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--pos-muted);
}

/* MORE OPTIONS modal (hamburger) */
.pos-modal-backdrop[hidden],
.pos-more-modal[hidden] {
  display: none !important;
}

.pos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 150;
}

.pos-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Nested dialog: list modal → add/edit form (products.php categories & profiles). */
.pos-modal-backdrop.pos-modal-stack-2 {
  z-index: 170;
  background: rgba(0, 0, 0, 0.45);
}

.pos-more-modal.pos-modal-stack-2 {
  z-index: 175;
}

.pos-modal-backdrop.pos-modal-stack-3 {
  z-index: 180;
  background: rgba(0, 0, 0, 0.5);
}

.pos-more-modal.pos-modal-stack-3 {
  z-index: 185;
}

body.pos-modal-open {
  overflow: hidden;
}

.pos-more-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 160;
  width: min(720px, calc(100vw - 2rem));
  max-height: min(92dvh, calc(100vh - 2rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--pos-surface);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* More options grid stays compact */
#pos-more-modal {
  width: min(440px, calc(100vw - 2rem));
  max-height: min(640px, calc(100vh - 2rem));
}

.pos-more-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.pos-more-modal-header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--pos-border);
  margin-bottom: 10px;
}

.pos-more-modal-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--pos-text);
}

.pos-more-modal-body {
  padding: 1rem;
  overflow-y: auto;
}

.pos-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.pos-more-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 0.5rem;
  border: none;
  border-radius: var(--pos-radius-sm);
  background: #f3f4f6;
  cursor: pointer;
  font: inherit;
  color: var(--pos-text);
  transition: background 0.12s ease, filter 0.12s ease;
}

.pos-more-tile:hover:not(:disabled) {
  background: #e5e7eb;
}

.pos-more-tile:focus-visible {
  outline: 2px solid var(--pos-icon-btn-bg);
  outline-offset: 2px;
}

.pos-more-tile:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pos-more-tile[hidden],
.pos-more-tile--no-access {
  display: none !important;
}

.pos-more-tile .pos-icon-btn {
  pointer-events: none;
}

.pos-more-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}

.pos-more-modal-footer {
  padding: 0.65rem 1rem 1rem;
  font-size: 0.78rem;
  text-align: center;
  color: var(--pos-muted);
  border-top: 1px solid var(--pos-border);
}

.pos-more-modal-footer a {
  color: var(--pos-text);
  font-weight: 600;
  text-decoration: none;
}

.pos-more-modal-footer a:hover {
  text-decoration: underline;
}

a.pos-more-tile--link {
  text-decoration: none;
  color: inherit;
}

.pos-product-modal {
  width: min(480px, calc(100vw - 1.5rem));
  max-height: min(92dvh, calc(100vh - 1.5rem));
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-product-modal-hero {
  position: relative;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--pos-border);
}

.pos-product-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--pos-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--pos-text, #111827);
}

.pos-product-modal-close:hover:not(:disabled) {
  background: #f3f4f6;
  color: var(--pos-text, #111827);
}

.pos-product-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}

.pos-product-modal-hero-media {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--pos-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.pos-product-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-product-modal-image-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #9ca3af;
  background: #f3f4f6;
}

.pos-product-modal-image-ph svg {
  width: 2rem;
  height: 2rem;
}

.pos-product-modal-hero-text {
  min-width: 0;
  padding-right: 2rem;
}

.pos-product-modal-title {
  margin: 0;
  color: var(--pos-text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pos-product-modal-code {
  margin: 0.3rem 0 0;
  color: var(--pos-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.pos-product-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.85rem 1rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-product-modal-ready {
  padding: 1rem 0.85rem;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  text-align: center;
}

.pos-product-modal-ready-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pos-text);
}

.pos-product-modal-ready-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pos-muted);
}

.pos-product-bundle-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.pos-product-bundle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 0.88rem;
  color: var(--pos-text);
}

.pos-product-bundle-item::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pos-btn-dark, #111827);
  flex-shrink: 0;
}

.pos-product-mixmatch-hint {
  margin: -0.15rem 0 0.55rem;
  font-size: 0.75rem;
  color: var(--pos-muted);
}

.pos-product-mixmatch-hint.is-complete {
  color: #047857;
  font-weight: 600;
}

.pos-product-option-grid--mixmatch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pos-product-option-section + .pos-product-option-section {
  margin-top: 0.65rem;
}

.pos-product-option-section {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: #fff;
}

.pos-product-option-section--wide {
  /* full width in column layout */
}

.pos-product-option-heading {
  margin: 0 0 0.55rem;
  color: var(--pos-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pos-product-option-grid {
  display: grid;
  gap: 0.5rem;
}

.pos-product-option-grid--extras {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pos-product-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  color: var(--pos-text);
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.pos-product-option:has(input:checked) {
  background: var(--pos-btn-dark, #111827);
  border-color: var(--pos-btn-dark, #111827);
  color: #fff;
}

.pos-product-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pos-product-option-label {
  min-width: 0;
  font-weight: 600;
}

.pos-product-option-price {
  color: var(--pos-muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pos-product-option:has(input:checked) .pos-product-option-price {
  color: rgba(255, 255, 255, 0.85);
}

.pos-product-modal-empty {
  margin: 1rem 0;
  color: var(--pos-muted);
  text-align: center;
}

.pos-product-modal-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--pos-border);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

.pos-product-modal-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pos-product-modal-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pos-product-modal-price-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-product-modal-price {
  color: var(--pos-text);
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.pos-product-modal-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--pos-border);
  border-radius: 999px;
  background: #f9fafb;
}

.pos-product-modal-footer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.pos-product-modal-footer-actions:has(.pos-product-modal-remove:not([hidden])) {
  grid-template-columns: minmax(6rem, auto) minmax(0, 1fr);
}

.pos-product-modal-remove {
  margin: 0;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid var(--pos-btn-danger);
  border-radius: 10px;
  background: #fff;
  color: var(--pos-btn-danger);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pos-product-modal-remove[hidden] {
  display: none !important;
}

.pos-product-modal-remove:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.06);
}

.pos-product-modal-remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pos-product-qty-btn,
.pos-product-add-btn,
.pos-product-modal-qty input {
  font: inherit;
  font-weight: 700;
}

.pos-product-qty-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--pos-btn-dark, #111827);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.pos-product-modal-qty input {
  width: 2.5rem;
  height: 2.75rem;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pos-product-add-btn {
  min-height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 10px;
  background: var(--pos-btn-dark, #111827);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.pos-product-add-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 420px) {
  .pos-product-option-grid--extras {
    grid-template-columns: 1fr;
  }

  .pos-product-modal-footer-actions:has(.pos-product-modal-remove:not([hidden])) {
    grid-template-columns: 1fr;
  }
}

.pos-discount-apply-modal {
  width: min(520px, calc(100vw - 2rem));
}

.pos-discount-choice-list {
  display: grid;
  gap: 0.75rem;
}

.pos-discount-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: #f9fafb;
  color: var(--pos-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.pos-discount-choice-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0;
  background: #e5e7eb;
  flex-shrink: 0;
  position: relative;
}

.pos-discount-media--empty {
  background: repeating-linear-gradient(
    -45deg,
    #e8eaed,
    #e8eaed 6px,
    #dfe3e8 6px,
    #dfe3e8 12px
  );
}

.pos-discount-media-placeholder-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pos-discount-choice-media--empty {
  min-height: 0;
}

.pos-discount-choice-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-discount-choice-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  padding: 0.75rem 0.9rem 0.85rem;
}

.pos-discount-choice-body-main {
  grid-column: 1;
  min-width: 0;
}

.pos-discount-choice-body-percent {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.pos-discount-table-image {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  background: #e5e7eb;
}

.pos-discount-choice:hover,
.pos-discount-choice.is-selected {
  background: #f3f4f6;
  border-color: #c9d0d8;
}

.pos-discount-choice-body-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
}

.pos-discount-choice-body-main small {
  display: block;
  margin-top: 0.2rem;
  color: var(--pos-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .pos-product-option-grid--extras {
    grid-template-columns: 1fr;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Staff page (POS users at this terminal) */
.pos-staff-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 20px;
  padding: 0 max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.pos-staff-page-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pos-muted);
}

.pos-staff-lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--pos-muted);
}

.pos-staff-table-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pos-staff-table-bar-spacer {
  flex: 0 0 auto;
  min-width: 0;
}

.pos-staff-search-wrap {
  position: relative;
  flex: 1 1 12rem;
  max-width: 20rem;
  margin-left: auto;
}

.pos-staff-search-input {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 2.35rem 0.55rem 0.9rem;
  border: 1px solid var(--pos-border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.875rem;
  background: var(--pos-surface);
  box-sizing: border-box;
}

.pos-staff-search-input::placeholder {
  color: var(--pos-muted);
}

.pos-staff-search-input:focus-visible {
  outline: 2px solid var(--pos-icon-btn-bg);
  outline-offset: 2px;
}

.pos-staff-search-icon {
  position: absolute;
  right: 0.72rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  color: var(--pos-muted);
  pointer-events: none;
}

.pos-staff-search-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pos-staff-table-shell {
  background: var(--pos-surface);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.pos-staff-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Orders-style flat table — shared class only used on staff.php */
.pos-data-table thead th {
  text-transform: capitalize;
}

.pos-data-table tbody td,
.pos-reports-table tbody td,
.pos-order-lines-table tbody td {
  font-weight: 400;
}

.pos-data-table tbody td strong,
.pos-data-table tbody td b,
.pos-reports-table tbody td strong,
.pos-reports-table tbody td b,
.pos-order-lines-table tbody td strong,
.pos-order-lines-table tbody td b {
  font-weight: inherit;
}

.pos-data-table.pos-staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
  font-weight: 400;
}

.pos-data-table.pos-staff-table thead tr {
  background: var(--pos-table-head-bg);
}

.pos-data-table.pos-staff-table thead th {
  background: transparent;
  color: var(--pos-table-head-fg);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 0.85rem 1.1rem;
  border: none;
  vertical-align: middle;
  white-space: nowrap;
}

.pos-data-table.pos-staff-table thead th:first-child {
  padding-left: 1.25rem;
}

.pos-data-table.pos-staff-table thead th:last-child {
  padding-right: 1.25rem;
}

.pos-staff-th-action {
  text-align: left !important;
}

.pos-data-table.pos-staff-table tbody tr {
  background: var(--pos-surface);
}

.pos-data-table.pos-staff-table tbody td {
  background: var(--pos-surface);
  color: var(--pos-text);
  text-align: left;
  vertical-align: middle;
  padding: 0.4rem 1.1rem;
  border: none;
  border-bottom: 1px solid var(--pos-table-row-divider);
}

.pos-data-table.pos-staff-table tbody td:first-child {
  padding-left: 1.25rem;
}

.pos-data-table.pos-staff-table tbody td:last-child {
  padding-right: 1.25rem;
}

.pos-data-table.pos-staff-table tbody tr:last-child td {
  border-bottom: none;
}

.pos-data-table.pos-staff-table tbody tr:hover td {
  background: var(--pos-surface);
}

.pos-staff-row--you td {
  background: var(--pos-table-row-you-bg) !important;
}

.pos-data-table.pos-staff-table tbody tr.pos-staff-row--you:hover td {
  background: var(--pos-table-row-you-hover-bg) !important;
}

.pos-staff-td-empty {
  text-align: center;
  color: var(--pos-muted);
  padding: 1rem 0.85rem !important;
}

.pos-staff-login-text {
  word-break: break-word;
}

.pos-staff-form-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--pos-muted);
}

.pos-staff-editor-form .pos-staff-form-hint {
  margin-top: -0.15rem;
}

/* Adjustment history modal: item names use global break-word; keep one line + ellipsis here. */
#pos-inv-adjust-history-modal td.pos-inv-adj-history-col-item {
  max-width: 12rem;
  vertical-align: middle;
}

#pos-inv-adjust-history-modal td.pos-inv-adj-history-col-item .pos-staff-login-text {
  word-break: normal;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pos-inv-adjust-history-modal th.pos-inv-adj-history-col-reason,
#pos-inv-adjust-history-modal td.pos-inv-adj-history-col-reason {
  white-space: nowrap;
  word-break: normal;
  max-width: none;
  min-width: 10rem;
}

.pos-staff-td-id,
.pos-staff-td-code {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 1%;
}

.pos-staff-td-code {
  color: var(--pos-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.pos-staff-td-access {
  max-width: 14rem;
  word-break: break-word;
}

.pos-staff-access-empty,
.pos-staff-td-dash {
  color: var(--pos-muted);
}

.pos-staff-td-actions {
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  width: 1%;
  min-width: 5rem;
}

.pos-staff-action-btns {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}

.pos-staff-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--pos-row-action-edit-bg);
  color: var(--pos-row-action-edit-fg);
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pos-staff-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.pos-staff-icon-btn:focus-visible {
  outline: 2px solid var(--pos-icon-btn-bg);
  outline-offset: 2px;
}

.pos-staff-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-staff-icon-btn--edit:hover:not(:disabled) {
  background: var(--pos-row-action-edit-hover-bg);
}

.pos-staff-icon-btn--face {
  background: var(--pos-row-action-info-bg);
  color: var(--pos-row-action-info-fg);
}

.pos-staff-icon-btn--face:hover:not(:disabled) {
  background: var(--pos-row-action-info-hover-bg);
}

.pos-staff-icon-btn--danger {
  background: var(--pos-row-action-danger-bg);
  border: none;
  color: var(--pos-row-action-danger-fg);
}

.pos-staff-icon-btn--danger:hover:not(:disabled) {
  background: var(--pos-row-action-danger-hover-bg);
}

.pos-staff-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.pos-staff-chip--you {
  background: var(--pos-icon-btn-bg);
  color: var(--pos-icon-btn-fg);
}

.pos-staff-chip--ok {
  background: var(--pos-chip-success-bg);
  color: var(--pos-chip-success-fg);
}

.pos-staff-chip--off {
  background: var(--pos-chip-neutral-bg);
  color: var(--pos-chip-neutral-fg);
}

.pos-staff-chip--warn {
  background: var(--pos-chip-warn-bg);
  color: var(--pos-chip-warn-fg);
}

.pos-staff-chip--table {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  line-height: 1.2;
  border: none;
  background: var(--pos-chip-neutral-bg);
  color: var(--pos-tab-active);
}

.pos-staff-chip--inline {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.pos-staff-lead-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--pos-muted);
}

.pos-staff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border: none;
  border-radius: var(--pos-radius-sm);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.pos-staff-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-staff-btn--primary {
  background: var(--pos-btn-dark);
  color: #fff;
}

.pos-staff-btn--primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.pos-staff-btn--muted {
  background: var(--pos-tab-inactive-bg);
  color: var(--pos-text);
}

.pos-staff-btn--muted:hover:not(:disabled) {
  background: var(--pos-row-action-edit-hover-bg);
}

.pos-module-sync-btn.is-syncing {
  opacity: 0.7;
}

.pos-module-sync-modal {
  width: min(920px, calc(100vw - 2rem));
  max-height: min(88vh, 760px);
}

.pos-module-sync-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}

.pos-module-sync-summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--pos-muted);
}

.pos-module-sync-toolbar {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.pos-module-sync-toolbar.is-visible {
  display: flex;
}

.pos-module-sync-table-shell {
  min-height: 0;
}

.pos-module-sync-table-shell .pos-staff-table-scroll {
  max-height: min(52vh, 520px);
}

.pos-module-sync-record-cell {
  min-width: 12rem;
}

.pos-module-sync-row-label {
  display: block;
  font-weight: 600;
}

.pos-module-sync-row-detail {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--pos-muted);
}

.pos-module-sync-row.is-applied td {
  opacity: 0.72;
}

.pos-module-sync-change-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.pos-module-sync-change-badge--new {
  background: rgba(34, 139, 34, 0.14);
  color: #1f7a1f;
}

.pos-module-sync-change-badge--updated {
  background: rgba(217, 119, 6, 0.16);
  color: #b45309;
}

.pos-staff-btn--danger {
  background: var(--pos-btn-danger);
  color: #fff;
}

.pos-staff-btn--danger:hover:not(:disabled) {
  filter: brightness(1.06);
}

.pos-staff-btn--warning {
  background: #d97706;
  color: #fff;
}

.pos-staff-btn--warning:hover:not(:disabled) {
  filter: brightness(1.06);
}

.pos-staff-btn--compact {
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
  min-height: 0;
  flex-shrink: 0;
}

.pos-scroll-top-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 900;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--pos-table-head-bg, #1f2937);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.pos-scroll-top-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.pos-scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pos-scroll-top-btn:hover {
  filter: brightness(1.08);
}

/* Staff table footer summary (infinite scroll) */
.pos-staff-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem 1rem;
  background: var(--pos-surface);
  border-top: 1px solid var(--pos-table-row-divider);
}

/* Author `display:flex` overrides UA `[hidden]` — force hide when empty / toggled in JS */
.pos-staff-pagination[hidden] {
  display: none;
}

.pos-staff-pagination-summary {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.8125rem;
  color: var(--pos-muted);
  text-align: left;
  font-weight: 500;
}

.pos-staff-pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.pos-staff-pg-square {
  box-sizing: border-box;
  min-width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-staff-pg-num {
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--pos-row-action-edit-bg);
  color: var(--pos-text);
  line-height: 1;
}

.pos-staff-pg-num:hover:not(:disabled):not(.is-active) {
  background: var(--pos-row-action-edit-hover-bg);
  color: var(--pos-text);
}

.pos-staff-pg-num.is-active {
  background: var(--pos-table-head-bg);
  color: var(--pos-table-head-fg);
}

.pos-staff-pg-num:focus-visible,
.pos-staff-pg-nav:focus-visible {
  outline: 2px solid var(--pos-icon-btn-bg);
  outline-offset: 2px;
}

/* « / »: dark when enabled (same as active page); medium gray block when disabled */
.pos-staff-pg-nav:not(:disabled) {
  background: var(--pos-table-head-bg);
  color: var(--pos-table-head-fg);
}

.pos-staff-pg-nav:not(:disabled):hover {
  background: var(--pos-icon-btn-hover-bg);
  color: var(--pos-table-head-fg);
}

.pos-staff-pg-nav:disabled {
  background: var(--pos-border);
  color: var(--pos-muted);
  cursor: not-allowed;
  opacity: 1;
}

.pos-staff-pg-glyph {
  font-size: 1rem;
  line-height: 1;
  translate: 0 -0.06em;
}

.pos-staff-page-nums {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.pos-staff-pg-ellipsis {
  padding: 0 0.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pos-muted);
  user-select: none;
}

@media (orientation: portrait) and (max-width: 540px) {
  .pos-staff-table-bar .pos-staff-search-wrap {
    max-width: none;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .pos-staff-pagination-summary {
    flex-basis: 100%;
    text-align: left;
  }

  .pos-staff-pagination-controls {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Staff editor modal (reuse pos-more-modal animation) */
.pos-staff-editor:not(.pos-catalog-form-modal):not(.pos-catalog-list-modal) {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(92dvh, calc(100vh - 2rem));
}

.pos-staff-editor-header-spacer {
  display: block;
  width: 2.5rem;
  min-height: 1px;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
  flex-shrink: 0;
}

.pos-staff-field--password .pos-staff-password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.pos-staff-field--password .pos-staff-password-row > input {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
}

.pos-staff-password-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.pos-staff-pw-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: #f3f4f6;
  color: #404040;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pos-staff-pw-toggle:hover:not(:disabled) {
  background: #e5e7eb;
}

.pos-staff-pw-toggle .pos-staff-pw-toggle-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.pos-staff-pw-toggle .pos-staff-pw-toggle-icon--hide {
  display: none;
}

.pos-staff-pw-toggle.is-revealed .pos-staff-pw-toggle-icon--show {
  display: none;
}

.pos-staff-pw-toggle.is-revealed .pos-staff-pw-toggle-icon--hide {
  display: block;
}

.pos-staff-field--access {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.pos-staff-field--access .pos-staff-label {
  padding: 0;
  margin-bottom: 0.15rem;
}

.pos-staff-access-hint {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--pos-muted);
  line-height: 1.35;
}

.pos-staff-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: var(--pos-surface);
}

/* Terminal access pairing: View… down column 1, Manage… down column 2. */
#pos-access-checklist.pos-staff-access-grid {
  grid-auto-flow: column;
  grid-template-rows: repeat(8, auto);
}

.pos-staff-access-grid--locked {
  opacity: 0.72;
}

.pos-staff-access-grid--locked .pos-staff-access-item {
  cursor: default;
}

.pos-staff-access-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--pos-text);
  cursor: pointer;
  line-height: 1.35;
}

.pos-staff-access-item input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--pos-btn-dark);
}

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

  #pos-access-checklist.pos-staff-access-grid {
    grid-auto-flow: row;
    grid-template-rows: none;
  }
}

.pos-staff-editor-form {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pos-staff-editor-error {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--pos-radius-sm);
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.8rem;
  display: none;
}

.pos-staff-editor-error:not(:empty) {
  display: block;
}

.pos-staff-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.pos-staff-field.pos-staff-field--inline-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
}

.pos-staff-field.pos-staff-field--inline-check .pos-staff-label {
  margin: 0;
  padding-top: 0.15rem;
  font-weight: 600;
}

.pos-staff-field.pos-staff-field--inline-check input[type='checkbox'] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.pos-staff-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pos-text);
}

.pos-product-editor .pos-staff-label {
  margin: 0;
  line-height: 1.3;
}

.pos-product-editor .pos-staff-field {
  gap: 0.4rem;
}

.pos-staff-field input[type='text'],
.pos-staff-field input[type='email'],
.pos-staff-field input[type='password'],
.pos-staff-field input[type='number'],
.pos-staff-field input[type='date'],
.pos-staff-field input[type='time'],
.pos-staff-field input[type='datetime-local'],
.pos-staff-field select,
.pos-staff-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  font: inherit;
  color: var(--pos-text);
  background: var(--pos-bg, #fff);
  color-scheme: light;
}

.pos-staff-field input[type='date']::-webkit-calendar-picker-indicator,
.pos-staff-field input[type='time']::-webkit-calendar-picker-indicator,
.pos-staff-field input[type='datetime-local']::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
  margin-left: 0.25rem;
}

.pos-staff-field input[type='date']::-webkit-datetime-edit,
.pos-staff-field input[type='date']::-webkit-datetime-edit-fields-wrapper,
.pos-staff-field input[type='date']::-webkit-datetime-edit-text,
.pos-staff-field input[type='date']::-webkit-datetime-edit-month-field,
.pos-staff-field input[type='date']::-webkit-datetime-edit-day-field,
.pos-staff-field input[type='date']::-webkit-datetime-edit-year-field {
  font: inherit;
  color: inherit;
  padding: 0;
}

.pos-staff-field textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.4;
}

.pos-product-editor {
  width: min(820px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, calc(100vh - 2rem));
  overflow: hidden;
}

.pos-product-editor-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pos-product-editor-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}

#pos-product-editor .pos-more-modal-header {
  margin-bottom: 0;
  padding: 0.75rem 1rem;
}

#pos-product-editor .pos-more-modal-header .pos-icon-btn {
  background: var(--pos-surface, #fff);
  border: 1px solid var(--pos-border);
  color: var(--pos-text, #111827);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#pos-product-editor .pos-more-modal-header .pos-icon-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: var(--pos-text, #111827);
}

#pos-product-editor .pos-more-modal-header .pos-icon-btn svg {
  stroke: currentColor;
}

.pos-product-editor-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--pos-border);
  background: var(--pos-surface);
}

.pos-product-editor-footer .pos-staff-editor-actions {
  margin-top: 0;
  padding-top: 0;
}

.pos-product-editor-section {
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: var(--pos-surface, #fff);
}

.pos-product-editor-section:last-child {
  margin-bottom: 0.25rem;
}

.pos-product-editor-section[hidden],
.pos-product-editor-subsection[hidden] {
  display: none !important;
}

.pos-product-editor-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.pos-product-editor-section-body {
  min-width: 0;
}

.pos-product-editor-section-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pos-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pos-product-editor-section-hint,
.pos-product-editor-field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pos-muted);
  font-weight: 400;
}

.pos-product-editor-field-hint {
  margin-top: 0.15rem;
}

.pos-product-editor-section-body--stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pos-product-editor-subsection {
  padding: 0.75rem;
  border: 1px dashed var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: rgba(0, 0, 0, 0.02);
}

.pos-product-editor-subsection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pos-product-editor-subsection-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--pos-text);
}

.pos-product-editor-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.5rem;
  gap: 1rem;
  align-items: stretch;
}

.pos-product-editor-details-main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.pos-product-editor-details-media {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: rgba(0, 0, 0, 0.02);
  min-width: 0;
}

.pos-product-form-grid--details {
  gap: 0.85rem;
}

.pos-product-form-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pos-product-form-meta:has(#pos-product-editor-status-wrap[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.pos-product-editor .pos-staff-field input[type='text'],
.pos-product-editor .pos-staff-field input[type='file'],
.pos-product-editor .pos-staff-field select,
.pos-product-editor .pos-staff-field textarea {
  min-height: 2.75rem;
  box-sizing: border-box;
}

.pos-product-editor .pos-staff-field--compact-textarea textarea {
  min-height: 4.5rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.pos-product-editor .pos-staff-field--file input[type='file'] {
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
}

.pos-product-editor-details-media .pos-product-picture-preview-block {
  margin: 0;
  display: flex;
  justify-content: center;
}

.pos-product-editor-details-media .pos-product-picture-preview {
  width: 100%;
  max-width: 9.5rem;
  height: auto;
  aspect-ratio: 1;
}

.pos-product-editor-details-media .pos-staff-check {
  margin-top: auto;
  padding-top: 0.15rem;
}

#pos-product-editor-status-wrap[hidden] {
  display: none !important;
}

.pos-product-editor-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pos-ordering-options-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-ordering-option-panel {
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: rgba(0, 0, 0, 0.015);
  padding: 1rem;
}

.pos-ordering-option-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.pos-touch-picker {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.pos-touch-picker-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pos-touch-picker-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pos-touch-picker-search {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  font-size: 0.88rem;
  background: var(--pos-surface, #fff);
  color: var(--pos-text);
}

.pos-touch-picker-search:focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 1px;
  border-color: rgba(59, 130, 246, 0.45);
}

.pos-touch-picker-search-clear {
  position: absolute;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pos-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pos-touch-picker-search-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--pos-text);
}

.pos-touch-picker-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pos-touch-picker-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pos-muted);
}

.pos-touch-picker-filters {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
}

.pos-touch-picker-filter {
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pos-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-touch-picker-filter.is-active {
  background: var(--pos-surface, #fff);
  color: var(--pos-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pos-touch-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 5.5rem;
  overflow-y: auto;
  padding: 0.15rem 0;
  -webkit-overflow-scrolling: touch;
}

.pos-touch-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  min-height: 2rem;
  padding: 0.15rem 0.45rem 0.15rem 0.65rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--pos-text);
  font-size: 0.75rem;
  cursor: pointer;
}

.pos-touch-picker-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.pos-touch-picker-chip-x {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
}

.pos-touch-picker-list {
  max-height: min(36vh, 280px);
}

.pos-touch-picker-list .pos-touch-check-item {
  min-height: 2.45rem;
  padding: 0.5rem 0.65rem;
}

.pos-touch-picker-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pos-touch-picker-group + .pos-touch-picker-group,
.pos-touch-picker-group + .pos-touch-check-item,
.pos-touch-check-item + .pos-touch-picker-group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.pos-touch-picker-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.2rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
  background: var(--pos-surface, #fff);
}

.pos-touch-picker-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pos-touch-check-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.pos-touch-check-meta {
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--pos-muted);
}

.pos-touch-check-item:has(input:checked) .pos-touch-check-meta {
  color: rgba(255, 255, 255, 0.78);
}

.pos-touch-picker-empty-filter {
  margin: 0;
  padding: 0.65rem 0.35rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--pos-muted);
}

.pos-touch-picker-hint {
  margin-top: 0;
}

.pos-product-editor-table-wrap {
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  overflow: auto;
  max-height: min(32vh, 240px);
}

.pos-product-editor-table {
  margin: 0;
}

.pos-product-editor-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--pos-table-head-bg, #1f2937);
}

.pos-product-editor-table td input,
.pos-product-editor-table td select {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  font: inherit;
  box-sizing: border-box;
}

.pos-product-table-empty td {
  padding: 1rem 0.75rem;
  text-align: center;
  color: var(--pos-muted);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.02);
}

.pos-product-table-product {
  min-width: 12rem;
}

.pos-product-table-product-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pos-product-table-pic {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  background: #e5e7eb;
  overflow: hidden;
}

.pos-product-table-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-product-table-pic-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--pos-muted);
}

.pos-product-table-pic-ph .pos-product-ph {
  width: 1.35rem;
  height: 1.35rem;
}

.pos-product-table-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pos-product-table-sku {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--pos-muted);
  font-variant-numeric: tabular-nums;
}

.pos-product-table-name {
  word-break: break-word;
}

.pos-touch-check-list,
.pos-product-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: min(28vh, 220px);
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: var(--pos-surface, #fff);
  -webkit-overflow-scrolling: touch;
}

.pos-touch-check-item,
.pos-product-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.6rem 0.7rem;
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: var(--pos-radius-sm, 0.5rem);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pos-touch-check-item:hover,
.pos-product-check-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.pos-touch-check-item:has(input:checked),
.pos-product-check-item:has(input:checked) {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.pos-touch-check-input,
.pos-product-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--pos-primary, #2563eb);
}

.pos-touch-check-label,
.pos-product-check-label {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--pos-text);
}

.pos-touch-check-empty,
.pos-product-check-empty {
  margin: 0;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--pos-muted);
}

.pos-touch-check-list-hint,
.pos-product-check-list-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--pos-muted);
}

.pos-product-mixmatch-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pos-product-mixmatch-empty {
  margin: 0;
  padding: 0.85rem 0.75rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--pos-muted);
  border: 1px dashed var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: rgba(0, 0, 0, 0.02);
}

.pos-product-mixmatch-slot {
  padding: 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm, 0.5rem);
  background: var(--pos-surface, #fff);
}

.pos-product-mixmatch-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--pos-border);
}

.pos-product-mixmatch-slot-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--pos-text);
}

.pos-product-mixmatch-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pos-product-mixmatch-options-field {
  grid-column: 1 / -1;
}

.pos-staff-btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  min-height: 2rem;
}

@media (max-width: 760px) {
  .pos-product-editor-details-grid,
  .pos-product-editor-split,
  .pos-ordering-options-stack,
  .pos-product-mixmatch-slot-grid {
    grid-template-columns: 1fr;
  }
}

.pos-product-section {
  margin-bottom: 1.25rem;
}

.pos-product-section:last-child {
  margin-bottom: 0;
}

.pos-product-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pos-product-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pos-text);
}

.pos-product-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

/* Single full-width row (e.g. inventory adjust-stock field) without an empty grid column. */
.pos-product-form-grid--inv-adjust {
  grid-template-columns: minmax(0, 1fr);
}

.pos-product-picture-preview-block {
  margin: 0.35rem 0 0.5rem;
}

.pos-product-picture-preview {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--pos-border, rgba(255, 255, 255, 0.12));
}

.pos-catalog-modifier-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* .pos-staff-field uses display:flex, which overrides the [hidden] attribute. */
.pos-catalog-modifier-grid .pos-staff-field[hidden],
.pos-product-form-grid .pos-staff-field[hidden],
.pos-staff-editor-form .pos-staff-field[hidden] {
  display: none !important;
}

.pos-product-modifier-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .pos-product-form-grid,
  .pos-catalog-modifier-grid,
  .pos-product-modifier-grid {
    grid-template-columns: 1fr;
  }
}

.pos-staff-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--pos-text);
  cursor: pointer;
  margin: 0;
}

.pos-staff-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.pos-staff-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.15rem;
}

.pos-staff-editor-actions .pos-staff-btn {
  flex: 1 1 auto;
  min-width: 6rem;
}

/* Scroll region shared by inventory reference modals and catalogue list modals. */
.pos-inv-manage-scroll {
  overflow: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

/* Inventory: reference-data modals (items / units) */
.pos-inv-manage-modal .pos-inv-manage-scroll {
  max-height: min(42vh, 280px);
}

.pos-inv-manage-modal .pos-inv-embed-form {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pos-border, rgba(255, 255, 255, 0.12));
}

/* Catalogue admin: wide list-only dialogs (inventory keeps nested form + table). */
.pos-catalog-list-modal {
  width: min(840px, calc(100vw - 2rem));
  max-height: min(90vh, 860px);
}

.pos-catalog-list-modal--ingredients {
  width: min(960px, calc(100vw - 2rem));
}

.pos-catalog-list-modal .pos-inv-manage-scroll {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: min(62vh, 560px);
  overflow-y: auto;
}

.pos-catalog-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.75rem 1rem 0;
  min-height: 0;
  flex: 1 1 auto;
}

.pos-catalog-list-modal-footer {
  flex-shrink: 0;
  padding: 0.65rem 1rem 1rem;
  margin: 0;
  border-top: 1px solid var(--pos-border);
}

/* Payments: e-wallet / bank pickers — scrollable list + footer Close (match log detail modals). */
.pos-pay-ref-list-modal.pos-catalog-form-modal--catalogue {
  overflow: hidden;
}

.pos-modal-ref-list-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0;
  overflow: hidden;
}

.pos-modal-ref-list-body > .pos-staff-table-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.pos-modal-ref-list-footer {
  flex-shrink: 0;
  padding: 0.65rem 1.25rem 1rem;
  margin: 0;
  border-top: 1px solid var(--pos-border);
}

.pos-catalog-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.pos-catalog-list-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--pos-muted);
}

/* Let hint fill remaining width next to toolbar buttons only (not in column layouts). */
.pos-catalog-list-toolbar .pos-catalog-list-hint {
  flex: 1 1 12rem;
}

.pos-catalog-form-modal {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(90vh, 820px);
  overflow-y: auto;
}

.pos-catalog-form-modal .pos-staff-editor-form,
.pos-catalog-form-modal .pos-staff-editor-actions {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.pos-catalog-form-modal .pos-staff-editor-actions {
  padding-bottom: 1rem;
}

#pos-product-editor .pos-product-editor-form {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

#pos-product-editor .pos-staff-editor-error:not(:empty) {
  margin-bottom: 0.85rem;
}

#pos-product-editor {
  overflow: hidden;
  max-height: min(92dvh, calc(100vh - 2rem));
}

#pos-product-editor .pos-product-editor-footer {
  padding-left: 1rem;
  padding-right: 1rem;
}

.pos-catalog-form-modal--wide {
  width: min(820px, calc(100vw - 2rem));
}

.pos-catalog-form-modal--catalogue {
  width: min(960px, calc(100vw - 2rem));
}

.pos-input-readonly-bg {
  cursor: default;
  background-color: #f9fafb;
  color: #374151;
}

.pos-catalog-form-section {
  margin-top: 0.5rem;
}

.pos-catalog-form-section[hidden] {
  display: none !important;
}

.pos-catalog-form-section > .pos-staff-label:first-of-type {
  margin-bottom: 0.5rem;
}

.pos-catalogue-ingredient-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.pos-catalogue-ingredient-grid {
  grid-template-columns: minmax(14rem, 1.5fr) minmax(7rem, 0.8fr) minmax(10rem, 1fr) minmax(6rem, 0.6fr);
}

.pos-catalogue-ingredient-actions {
  margin-top: 0;
}

@media (max-width: 900px) {
  .pos-catalogue-ingredient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pos-inv-toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Supply request: create form (card lines, no horizontal table scroll) */
.pos-inv-supply-create-modal {
  width: min(680px, calc(100vw - 2rem));
}

.pos-inv-supply-create-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 0.25rem;
}

.pos-inv-supply-create-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-inv-supply-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pos-inv-supply-section-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.pos-inv-supply-section-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6b7280;
}

.pos-inv-supply-line-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(42vh, 380px);
  overflow-y: auto;
  padding-right: 0.125rem;
}

.pos-inv-supply-line-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-inv-supply-line-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pos-inv-supply-line-card-num {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.pos-inv-supply-line-card .pos-staff-field {
  margin: 0;
}

.pos-inv-supply-line-card select,
.pos-inv-supply-line-card input[type="text"] {
  width: 100%;
}

.pos-inv-supply-line-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.pos-inv-supply-line-onhand-box {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  min-height: 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pos-inv-supply-line-onhand-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 0.125rem;
}

.pos-inv-supply-line-onhand-value {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.pos-inv-supply-create-actions {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid #f3f4f6;
}

.pos-inv-supply-detail-lines-table th:nth-child(1),
.pos-inv-supply-detail-lines-table td:nth-child(1) {
  min-width: 8rem;
}

.pos-inv-supply-detail-lines-table th:nth-child(2),
.pos-inv-supply-detail-lines-table td:nth-child(2),
.pos-inv-supply-detail-lines-table th:nth-child(3),
.pos-inv-supply-detail-lines-table td:nth-child(3) {
  white-space: nowrap;
}

.pos-inv-supply-receive-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 6.5rem;
}

.pos-inv-supply-fulfill-qty {
  width: 100%;
  max-width: 8rem;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  font: inherit;
}

.pos-inv-supply-receive-hint {
  font-size: 0.72rem;
  color: var(--pos-muted, #6b7280);
  line-height: 1.3;
}

@media (max-width: 520px) {
  .pos-inv-supply-line-meta {
    grid-template-columns: 1fr;
  }
}

.pos-access-code-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.pos-access-code-row input {
  flex: 1 1 auto;
  min-width: 0;
}

/* POS discount method header + statutory ID card (layout mock) */
.pos-checkout-discount-method-modal .pos-more-modal-title {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: #0a0a0a;
}

.pos-checkout-discount-method-modal .pos-more-modal-header {
  border-bottom: 1px solid #e5e7eb;
}

.pos-checkout-discount-method-modal .pos-checkout-modal-close {
  justify-self: end;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: none;
  background: #0a0a0a;
  color: #fff;
}

.pos-checkout-discount-method-modal .pos-checkout-modal-close:hover:not(:disabled) {
  background: #262626;
}

.pos-checkout-discount-method-body {
  padding: 1rem 1rem 1.1rem;
}

.pos-terminal-settings-modal {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(92vh, 820px);
}

.pos-terminal-settings-modal .pos-more-modal-body {
  overflow: auto;
}

.pos-terminal-settings-section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0a0a0a;
}

.pos-terminal-settings-section-title:first-child {
  margin-top: 0;
}

.pos-terminal-settings-fieldset {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.pos-terminal-settings-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .pos-terminal-settings-dim-grid {
    grid-template-columns: 1fr;
  }
}

.pos-staff-field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.pos-staff-field--checkbox .pos-staff-label {
  margin: 0;
}

.pos-statutory-id-modal {
  width: min(380px, calc(100vw - 2rem));
  max-height: min(90vh, 560px);
  border-radius: 16px;
}

.pos-statutory-id-form {
  padding: 2.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
  box-sizing: border-box;
}

.pos-statutory-id-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pos-statutory-id-icon-wrap svg {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}

.pos-statutory-id-icon-wrap--photo {
  background: #fff;
  padding: 3px;
}

.pos-statutory-id-icon-wrap--photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pos-statutory-id-heading {
  margin: 0;
  max-width: 18rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0a;
  text-align: center;
  line-height: 1.35;
}

.pos-statutory-id-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  text-align: left;
}

.pos-statutory-id-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.pos-statutory-id-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  text-align: center;
  color: #0a0a0a;
  background: #fff;
}

.pos-statutory-id-input::placeholder {
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.pos-statutory-id-input:focus {
  outline: 2px solid #0a0a0a;
  outline-offset: 1px;
}

.pos-statutory-id-error {
  margin: 0;
  width: 100%;
  min-height: 1.15em;
  font-size: 0.8rem;
  color: #b91c1c;
  text-align: center;
}

.pos-statutory-id-actions {
  display: flex;
  flex-direction: row;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.35rem;
}

.pos-statutory-id-btn {
  flex: 1;
  padding: 0.78rem 0.75rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #0a0a0a;
  min-width: 0;
}

.pos-statutory-id-btn--primary {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

.pos-statutory-id-btn--primary:hover {
  background: #262626;
}

.pos-statutory-id-btn--outline {
  background: #fff;
  color: #0a0a0a;
}

.pos-statutory-id-btn--outline:hover {
  background: #f9fafb;
}

/* POS checkout: discount method grid + payment keypad */
.pos-checkout-flow-modal.pos-checkout-modal--wide {
  width: min(520px, calc(100vw - 2rem));
  max-height: min(90vh, 720px);
}

.pos-checkout-flow-modal.pos-checkout-modal--narrow {
  width: min(400px, calc(100vw - 2rem));
}

.pos-checkout-flow-modal.pos-checkout-modal--digest {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(92vh, 680px);
}

/* Payment pick + tender: wider, taller, no scroll inside modal body */
.pos-checkout-payment-select-modal.pos-checkout-flow-modal,
.pos-checkout-payment-tender-modal.pos-checkout-flow-modal {
  width: min(600px, calc(100vw - 1.25rem));
  max-height: min(96vh, 880px);
}

.pos-checkout-payment-select-modal .pos-more-modal-body,
.pos-checkout-payment-tender-modal .pos-more-modal-body {
  overflow: visible;
}

.pos-checkout-payment-tender-modal .pos-keypad {
  gap: 0.55rem;
}

.pos-checkout-payment-tender-modal .pos-keypad button {
  min-height: 3rem;
  font-size: 1.15rem;
}

.pos-discount-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pos-discount-method-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.85rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0a0a0a;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.pos-discount-method-tile-label {
  display: block;
}

.pos-discount-method-tile:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #0a0a0a;
  transform: none;
}

.pos-discount-method-tile:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 2px;
}

.pos-discount-method-tile--disabled,
.pos-discount-method-tile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-checkout-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--pos-muted);
  line-height: 1.4;
}

.pos-checkout-id-form .pos-staff-editor-actions {
  margin-top: 0.5rem;
}

.pos-checkout-product-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.65rem;
}

.pos-checkout-pick-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.pos-checkout-pick-card-img {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background: #e8eaed;
  overflow: hidden;
}

.pos-checkout-pick-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-checkout-pick-card-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.pos-checkout-pick-card-ph {
  width: 42%;
  height: 42%;
}

.pos-checkout-pick-card-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem 0.65rem;
}

.pos-checkout-pick-card:hover {
  border-color: var(--pos-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pos-checkout-pick-card--disabled,
.pos-checkout-pick-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pos-checkout-pick-card-body strong {
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-checkout-pick-card-meta {
  font-size: 0.72rem;
  color: var(--pos-muted);
}

.pos-checkout-pick-card-price {
  font-size: 0.85rem;
  margin-top: auto;
}

/* Payment method: card-style picker (POS checkout) */
.pos-checkout-payment-select-modal .pos-more-modal-header {
  border-bottom: 1px solid #e5e7eb;
}

.pos-checkout-payment-select-modal .pos-checkout-modal-close {
  justify-self: end;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: none;
  background: #0a0a0a;
  color: #fff;
}

.pos-checkout-payment-select-modal .pos-checkout-modal-close:hover:not(:disabled) {
  background: #262626;
}

.pos-payment-method-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pos-payment-method-option.pos-payment-method-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1rem;
  min-height: 3.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-payment-method-option.pos-payment-method-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.pos-payment-method-option.pos-payment-method-card.is-selected {
  border-color: #0a0a0a;
  box-shadow: 0 0 0 2px #0a0a0a;
}

.pos-payment-method-card-icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pos-payment-method-card-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.pos-payment-method-card--cash .pos-payment-method-card-icon {
  background: #ecfdf5;
  color: #047857;
}

.pos-payment-method-card--ewallet .pos-payment-method-card-icon {
  background: #eff6ff;
  color: #1d4ed8;
}

.pos-payment-method-card--debit .pos-payment-method-card-icon {
  background: #f5f3ff;
  color: #5b21b6;
}

.pos-payment-method-card--default .pos-payment-method-card-icon {
  background: #f4f4f5;
  color: #52525b;
}

.pos-payment-method-card-text {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  min-width: 0;
}

.pos-payment-method-card-radio {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-payment-method-option.pos-payment-method-card.is-selected .pos-payment-method-card-radio {
  border-color: #0a0a0a;
  box-shadow: inset 0 0 0 4px #0a0a0a;
}

.pos-payment-sub-wrap {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--pos-border);
}

.pos-payment-sub-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: 14rem;
  overflow-y: auto;
}

.pos-payment-sub-option.pos-payment-sub-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding: 0.65rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: #fafafa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pos-payment-sub-option.pos-payment-sub-card:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.pos-payment-sub-option.pos-payment-sub-card.is-selected {
  border-color: #0a0a0a;
  background: #f4f4f5;
  box-shadow: 0 0 0 2px #0a0a0a;
}

.pos-payment-sub-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 380px) {
  .pos-payment-sub-list {
    grid-template-columns: 1fr;
  }
}

.pos-payment-tender-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-payment-tender-display {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  padding: 0.65rem;
  border-radius: 10px;
  background: #f5f5f5;
  letter-spacing: 0.02em;
}

.pos-payment-quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

/* Author `display: grid` overrides UA `[hidden]` — hide row for card / e-wallet */
.pos-payment-quick-amounts[hidden] {
  display: none !important;
}

.pos-payment-quick-amt {
  min-height: 2.35rem;
  padding: 0.35rem 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: var(--pos-surface);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--pos-text);
  line-height: 1.15;
}

.pos-payment-quick-amt:active {
  transform: scale(0.98);
}

.pos-payment-quick-amt--wide {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.pos-payment-reference-wrap .pos-staff-field {
  margin-bottom: 0;
}

.pos-payment-reference-wrap .pos-staff-editor-error {
  margin: 0;
  min-height: 1.25rem;
}

.pos-checkout-digest {
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border: 1px dashed var(--pos-border);
  border-radius: 10px;
  color: var(--pos-text);
}

.pos-checkout-digest-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.pos-checkout-digest-row + .pos-checkout-digest-row {
  margin-top: 0.25rem;
}

.pos-checkout-digest-row--strong {
  font-weight: 700;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--pos-border);
}

.pos-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.pos-keypad button {
  min-height: 2.6rem;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: var(--pos-surface);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--pos-text);
}

.pos-keypad button:active {
  transform: scale(0.98);
}

.pos-payment-tender-actions {
  margin-top: 0.25rem;
  justify-content: center;
}

.pos-payment-tender-actions .pos-staff-btn {
  flex: 0 1 auto;
  min-width: min(100%, 14rem);
}

.pos-cart-line--statutory {
  outline: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
}

.pos-checkout-success-lead {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pos-muted);
}

.pos-order-view-dl {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.pos-order-view-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--pos-muted);
}

.pos-order-view-dl dd {
  margin: 0;
  word-break: break-word;
}

.pos-order-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  line-height: 1.25;
}

.pos-order-status-badge--posted {
  background: rgba(22, 101, 52, 0.12);
  color: #166534;
}

.pos-order-status-badge--void {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.pos-order-status-badge--refund {
  background: rgba(180, 83, 9, 0.14);
  color: #b45309;
}

.pos-order-status-badge--cancelled {
  background: rgba(107, 114, 128, 0.16);
  color: #4b5563;
}

.pos-order-row--inactive td:not(.pos-staff-td-actions) {
  opacity: 0.78;
}

.pos-order-z-lock {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pos-muted);
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid var(--pos-border);
  white-space: nowrap;
}

.pos-order-editor-locked-note {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--pos-muted);
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid var(--pos-border);
  border-radius: 10px;
}

.pos-order-editor-form.is-z-locked .pos-staff-field input,
.pos-order-editor-form.is-z-locked .pos-staff-field textarea {
  pointer-events: none;
  opacity: 0.72;
  background: var(--pos-surface-muted, #f8fafc);
}

.pos-order-editor-form.is-z-locked .pos-staff-field input[type='checkbox'] {
  pointer-events: none;
}

.pos-order-editor-form.is-z-locked .pos-order-field-help {
  display: none;
}

.pos-order-editor-form.is-z-locked .pos-staff-editor-actions,
.pos-order-editor-form.is-z-locked .pos-order-editor-lifecycle {
  display: none !important;
}

.pos-order-editor-form.is-z-locked .pos-order-editor-locked-note {
  display: block;
}

.pos-order-editor-locked-note[hidden] {
  display: none;
}

.pos-order-editor-status-display {
  font-size: 0.95rem;
}

.pos-log-code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

.pos-log-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--pos-muted);
}

.pos-log-row--clickable {
  cursor: pointer;
}

.pos-log-row--clickable:hover td {
  background: rgba(148, 163, 184, 0.12);
}

.pos-log-detail-cell {
  max-width: 18rem;
  font-size: 0.82rem;
  color: var(--pos-muted);
  line-height: 1.35;
}

.pos-log-detail-pre {
  margin: 0;
  padding: 0.75rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--pos-text);
  background: rgba(148, 163, 184, 0.08);
  border-radius: 0.5rem;
}

.pos-log-json-title {
  margin: 1rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.pos-log-json-title:first-of-type {
  margin-top: 0;
}

.pos-log-json-block {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  max-height: 14rem;
  overflow: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 0.375rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pos-log-meta-dl {
  margin-bottom: 1.25rem;
}

.pos-log-subject-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
}

.pos-log-subject-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-log-subject-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pos-text);
}

.pos-log-lead {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--pos-text);
}

.pos-log-lead strong {
  font-weight: 700;
}

.pos-log-entity-id {
  font-weight: 700;
}

.pos-log-lead-note {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--pos-muted);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--pos-accent, #2563eb);
}

.pos-log-section {
  margin-top: 1.15rem;
}

.pos-log-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-log-change-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.pos-log-change-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--pos-border);
  font-size: 0.88rem;
}

.pos-log-change-item:last-child {
  border-bottom: none;
}

@media (min-width: 480px) {
  .pos-log-change-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
}

.pos-log-change-field {
  font-weight: 600;
  color: var(--pos-text);
}

.pos-log-change-values {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-variant-numeric: tabular-nums;
}

.pos-log-change-from {
  color: var(--pos-muted);
}

.pos-log-change-arrow {
  color: var(--pos-muted);
  font-weight: 600;
}

.pos-log-change-to {
  font-weight: 700;
  color: var(--pos-text);
}

.pos-log-kv {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  column-gap: 1rem;
  row-gap: 0;
  margin: 0;
  padding: 0.35rem 0.85rem 0.55rem;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  background: #fff;
  font-size: 0.88rem;
}

.pos-log-kv dt {
  margin: 0;
  padding: 0.45rem 0;
  color: var(--pos-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--pos-border);
  align-self: start;
}

.pos-log-kv dd {
  margin: 0;
  padding: 0.45rem 0;
  text-align: right;
  word-break: break-word;
  border-bottom: 1px solid var(--pos-border);
}

.pos-log-kv dt:last-of-type,
.pos-log-kv dd:last-of-type {
  border-bottom: none;
}

.pos-log-muted {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--pos-muted);
  line-height: 1.45;
}

.pos-log-technical {
  margin-top: 1.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed var(--pos-border);
  background: rgba(15, 23, 42, 0.02);
}

.pos-log-technical-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}

.pos-log-technical-summary:focus-visible {
  outline: 2px solid var(--pos-accent, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}

.pos-log-technical-hint {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--pos-muted);
}

.pos-log-technical .pos-log-json-title:first-of-type {
  margin-top: 0;
}

.pos-order-lines-title {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.pos-order-lines-table {
  width: 100%;
  font-size: 0.85rem;
}

.pos-order-lines-table .pos-num {
  text-align: right;
  white-space: nowrap;
}

/* Analytics dashboard */
.pos-analytics-hero {
  margin: -0.25rem -0.25rem 1.35rem;
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: var(--pos-radius);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.09) 0%, rgba(99, 102, 241, 0.08) 45%, rgba(15, 23, 42, 0.04) 100%);
  border: 1px solid rgba(8, 145, 178, 0.15);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.pos-analytics-intro {
  margin-bottom: 0;
  flex: 1 1 16rem;
  min-width: 0;
}

.pos-analytics-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pos-analytics-reports-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.62rem 1rem;
  border: 1px solid rgba(30, 58, 95, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--pos-text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.pos-analytics-reports-btn:hover {
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pos-analytics-reports-btn:focus-visible {
  outline: 2px solid rgba(8, 145, 178, 0.55);
  outline-offset: 2px;
}

.pos-analytics-reports-only-lead {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--pos-muted);
}

.pos-more-modal.pos-reports-launcher-modal {
  width: min(72rem, calc(100vw - 2rem));
  max-height: min(94dvh, calc(100vh - 1.5rem));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
}

.pos-reports-launcher-inner {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 0 1.15rem 1.25rem;
}

.pos-reports-launcher-inner .pos-reports-card-grid {
  margin: 0;
  max-width: none;
  padding: 0;
}

.pos-more-modal.pos-embedded-page-modal {
  width: min(72rem, calc(100vw - 2rem));
  max-height: min(94dvh, calc(100vh - 1.5rem));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  z-index: 165;
}

.pos-modal-backdrop.pos-embedded-page-backdrop {
  z-index: 160;
}

.pos-embedded-page-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 0 1.15rem 1.25rem;
}

.pos-embedded-page-section {
  margin: 0;
}

.pos-embedded-page-section .pos-staff-table-shell {
  margin-bottom: 0;
}

.pos-embedded-page-lead {
  margin: 0 0 1rem;
  color: var(--pos-muted);
  max-width: 44rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pos-app-settings-launch-btns {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pos-analytics-title {
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.pos-analytics-lead {
  margin: 0;
  max-width: 44rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--pos-muted);
}

.pos-analytics-period-line {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--pos-text);
}

.pos-analytics-period-label {
  color: var(--pos-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  margin-right: 0.35rem;
}

.pos-analytics-filter {
  margin-bottom: 1.25rem;
}

.pos-analytics-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  box-shadow: var(--pos-shadow);
}

.pos-analytics-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 11rem);
}

.pos-analytics-filter-field--range {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  min-width: min(100%, 22rem);
}

.pos-analytics-filter-field.is-hidden {
  display: none;
}

.pos-analytics-filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pos-muted);
}

.pos-analytics-filter-label--inline {
  margin-left: 0.35rem;
}

.pos-analytics-filter-control {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--pos-radius-sm);
  border: 1px solid var(--pos-border);
  background: var(--pos-bg, #fff);
  color: var(--pos-text);
  min-height: 2.25rem;
}

.pos-analytics-filter-control:focus-visible {
  outline: 2px solid rgba(8, 145, 178, 0.45);
  outline-offset: 1px;
}

.pos-analytics-filter-actions {

}

.pos-analytics-apply {
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--pos-radius-sm);
  border: none;
  cursor: pointer;
  background: var(--pos-btn-dark);
  color: #fff;
  box-shadow: var(--pos-shadow);
}

.pos-analytics-apply:hover {
  filter: brightness(1.08);
}

.pos-analytics-apply:focus-visible {
  outline: 2px solid var(--pos-btn-dark);
  outline-offset: 2px;
}

.pos-analytics-filter-help {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--pos-muted);
}

.pos-analytics-card--kpis {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.pos-analytics-kpi {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.1rem;
  border-top: 3px solid transparent;
  transition: background-color 0.2s ease;
}

.pos-analytics-card--kpis .pos-analytics-kpi:not(:last-child) {
  border-bottom: 1px solid var(--pos-border);
}

.pos-analytics-card--kpis .pos-analytics-kpi:hover {
  background: rgba(15, 23, 42, 0.02);
}

.pos-analytics-kpi:nth-child(6n + 1) {
  border-top-color: #0891b2;
}

.pos-analytics-kpi:nth-child(6n + 2) {
  border-top-color: #d97706;
}

.pos-analytics-kpi:nth-child(6n + 3) {
  border-top-color: #6366f1;
}

.pos-analytics-kpi:nth-child(6n + 4) {
  border-top-color: #64748b;
}

.pos-analytics-kpi:nth-child(6n + 5) {
  border-top-color: #e11d48;
}

.pos-analytics-kpi:nth-child(6n + 6) {
  border-top-color: #059669;
}

.pos-analytics-kpi-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pos-text);
}

.pos-analytics-kpi-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.pos-analytics-kpi-label {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pos-muted);
}

.pos-analytics-kpi-tx {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pos-muted);
  white-space: nowrap;
}

.pos-analytics-kpi-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--pos-muted);
}

.pos-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  align-items: stretch;
}

.pos-analytics-card {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--pos-shadow);
  min-width: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pos-analytics-card:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.pos-analytics-card--anim {
  opacity: 0;
  transform: translateY(12px);
}

.pos-analytics-card--anim.pos-analytics-card--in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.pos-analytics-card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .pos-analytics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pos-analytics-card--sales-tx {
    grid-column: span 2;
  }

  .pos-analytics-card--wide {
    grid-column: span 2;
  }
}

.pos-analytics-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pos-text);
}

.pos-analytics-card-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pos-analytics-filter-field--compact {
  flex: 0 0 8rem;
}

.pos-analytics-card-hint {
  margin: 0.15rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--pos-muted);
}

.pos-analytics-chart-wrap {
  position: relative;
  height: 220px;
}

.pos-analytics-chart-wrap--compact {
  height: 240px;
}

.pos-analytics-chart-wrap--tall {
  height: min(420px, 55vh);
}

.pos-analytics-chart-wrap--polar {
  height: 260px;
}

.pos-analytics-chart-wrap--short {
  height: 190px;
}

.pos-analytics-foot {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--pos-muted);
  min-height: 1.25rem;
}

.pos-analytics-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--pos-text);
  font-size: 0.86rem;
  line-height: 1.55;
}

.pos-analytics-list li + li {
  margin-top: 0.35rem;
}

.pos-analytics-ai-fab {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 145;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 1px solid var(--pos-icon-btn-border);
  border-radius: 999px;
  background: var(--pos-icon-btn-bg);
  color: var(--pos-icon-btn-fg);
  cursor: pointer;
  box-shadow: var(--pos-shadow);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  animation: pos-ai-fab-pulse 2.8s ease-in-out infinite;
}

.pos-analytics-ai-fab svg {
  width: 1.65rem;
  height: 1.65rem;
}

.pos-analytics-ai-fab:hover,
.pos-analytics-ai-fab.is-open:not(.is-waiting) {
  animation: none;
}

.pos-analytics-ai-fab:hover {
  transform: translateY(-2px);
  background: var(--pos-icon-btn-hover-bg);
}

.pos-analytics-ai-fab:focus-visible {
  outline: 2px solid var(--pos-btn-dark);
  outline-offset: 3px;
}

.pos-analytics-ai-fab.is-waiting {
  animation: pos-ai-fab-spin-pulse 1.1s ease-in-out infinite;
  pointer-events: none;
}

.pos-more-modal.pos-analytics-ai-modal {
  width: min(520px, calc(100vw - 2rem));
  max-height: min(88vh, 680px);
  display: flex;
  flex-direction: column;
  background: var(--pos-surface);
  color: var(--pos-text);
}

.pos-analytics-ai-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}

.pos-analytics-ai-modal-body .pos-analytics-foot {
  margin: 0;
  flex-shrink: 0;
}

.pos-analytics-ai-thread {
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  background: var(--pos-tab-inactive-bg);
}

.pos-analytics-ai-msg {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--pos-radius-sm);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

.pos-analytics-ai-msg--enter {
  animation: pos-ai-msg-enter 0.28s ease-out both;
}

.pos-analytics-ai-msg--assistant {
  align-self: flex-start;
  background: var(--pos-surface);
  color: var(--pos-text);
  border: 1px solid var(--pos-border);
  border-bottom-left-radius: 4px;
}

.pos-analytics-ai-msg--user {
  align-self: flex-end;
  background: var(--pos-btn-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.pos-analytics-ai-msg--typing {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: max-content;
  padding: 0.7rem 0.95rem;
  color: var(--pos-muted);
  font-style: normal;
  opacity: 1;
}

.pos-analytics-ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.pos-analytics-ai-typing-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--pos-btn-dark);
  opacity: 0.35;
  animation: pos-ai-typing-bounce 1.05s ease-in-out infinite;
}

.pos-analytics-ai-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.pos-analytics-ai-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.pos-analytics-ai-typing-label {
  font-size: 0.82rem;
  color: var(--pos-muted);
  letter-spacing: 0.01em;
}

.pos-analytics-ai-msg-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.pos-analytics-ai-download {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--pos-radius-sm);
  background: var(--pos-btn-dark);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  animation: pos-ai-msg-enter 0.3s ease-out both;
}

.pos-analytics-ai-download:hover {
  filter: brightness(1.08);
}

.pos-analytics-ai-composer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.pos-analytics-ai-modal.is-waiting .pos-analytics-ai-composer {
  opacity: 0.72;
}

.pos-analytics-ai-composer-actions {
  display: flex;
  justify-content: flex-end;
}

.pos-analytics-ai-chat {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pos-analytics-ai-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 3.25rem;
  max-height: 8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: var(--pos-surface);
  color: var(--pos-text);
  resize: vertical;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.pos-analytics-ai-input:focus {
  outline: none;
  border-color: var(--pos-btn-dark);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
}

.pos-analytics-ai-input.is-waiting {
  cursor: wait;
}

.pos-analytics-ai-input::placeholder {
  color: var(--pos-muted);
}

.pos-analytics-ai-composer .pos-analytics-apply {
  min-width: 5.5rem;
  position: relative;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.pos-analytics-ai-composer .pos-analytics-apply.is-waiting {
  color: transparent;
  pointer-events: none;
}

.pos-analytics-ai-composer .pos-analytics-apply.is-waiting::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: pos-ai-spin 0.7s linear infinite;
}

.pos-analytics-ai-chat .pos-analytics-apply {
  align-self: flex-end;
}

.pos-analytics-ai-msg .pos-analytics-ai-support-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: var(--pos-bg, rgba(0, 0, 0, 0.03));
}

.pos-analytics-ai-support-panel.is-submitted {
  opacity: 0.78;
}

.pos-analytics-ai-support-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pos-analytics-ai-support-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-analytics-ai-support-input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius-sm);
  background: var(--pos-surface);
  color: var(--pos-text);
  font: inherit;
}

.pos-analytics-ai-support-input:focus {
  outline: none;
  border-color: var(--pos-btn-dark);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
}

.pos-analytics-ai-support-textarea {
  min-height: 4.5rem;
  max-height: 9rem;
  resize: vertical;
}

.pos-analytics-ai-support-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pos-analytics-ai-support-status {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--pos-muted);
}

.pos-analytics-ai-support-actions .pos-analytics-apply {
  flex: 0 0 auto;
  min-width: 7.5rem;
}

.pos-analytics-ai-support-actions .pos-analytics-apply:disabled {
  opacity: 0.65;
  cursor: wait;
}

@keyframes pos-ai-typing-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  35% {
    transform: translateY(-0.28rem);
    opacity: 1;
  }
}

@keyframes pos-ai-msg-enter {
  from {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pos-ai-fab-pulse {
  0%,
  100% {
    box-shadow: var(--pos-shadow);
  }
  50% {
    box-shadow: 0 0 0 0.35rem rgba(64, 64, 64, 0.12), var(--pos-shadow);
  }
}

@keyframes pos-ai-fab-spin-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(64, 64, 64, 0.2);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 0.45rem rgba(64, 64, 64, 0.08);
  }
}

@keyframes pos-ai-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pos-analytics-ai-fab,
  .pos-analytics-ai-fab.is-waiting,
  .pos-analytics-ai-msg--enter,
  .pos-analytics-ai-typing-dot,
  .pos-analytics-ai-download,
  .pos-analytics-ai-composer .pos-analytics-apply.is-waiting::after {
    animation: none !important;
  }

  .pos-analytics-ai-composer .pos-analytics-apply.is-waiting {
    color: #fff;
  }

  .pos-analytics-ai-composer .pos-analytics-apply.is-waiting::after {
    content: none;
  }
}

/* ---- Reports (BIR RMO 24-2023) ---- */

.pos-staff-body.pos-reports-page {
  position: relative;
}

.pos-reports-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.95rem;
  margin: 0 auto 2rem;
  max-width: 56rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.pos-reports-launch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 5.5rem;
  padding: 1rem 2.5rem 1.1rem 1.15rem;
  border: 1px solid var(--pos-border);
  border-radius: 14px;
  background: var(--pos-surface);
  box-shadow: var(--pos-shadow);
  cursor: pointer;
  font: inherit;
  color: var(--pos-text);
  text-align: left;
  overflow: hidden;
  transition: border-color 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.pos-reports-launch-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
  border-radius: 14px 0 0 14px;
}

.pos-reports-launch-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  filter: brightness(1.02);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pos-reports-launch-card:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}

.pos-reports-launch-card-chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--pos-muted);
  pointer-events: none;
}

.pos-reports-launch-card--accent {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
}

.pos-reports-launch-card--accent::before {
  background: #1e3a5f;
}

.pos-reports-launch-card:active {
  transform: scale(0.99);
}

.pos-reports-launch-card-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-reports-launch-card-title {
  font-size: 1rem;
  font-weight: 800;
}

.pos-reports-launch-card-desc {
  font-size: 0.82rem;
  color: var(--pos-muted);
  line-height: 1.38;
}

.pos-reports-export-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  background: var(--pos-surface);
  box-shadow: var(--pos-shadow);
}

.pos-reports-export-card--wide {
  max-width: 56rem;
  margin: 0 auto 2rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.pos-reports-export-card-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-reports-export-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pos-text);
}

.pos-reports-card-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
}

.pos-reports-export-card-desc,
.pos-reports-export-card-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--pos-muted);
  line-height: 1.42;
}

.pos-reports-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.pos-reports-export-divider {
  border: none;
  border-top: 1px solid var(--pos-border);
  margin: 1rem 0 0.85rem;
}

.pos-reports-pocket {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pos-more-modal.pos-report-view-modal {
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
}

.pos-report-view-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  flex: 1;
  padding: 0 1.15rem 1.25rem;
}

.pos-report-modal-panel {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.pos-report-modal-panel-label {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-report-modal-panel-action {
  align-self: flex-end;
}

.pos-report-modal-status {
  min-height: 1.1rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--pos-muted);
}

.pos-report-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.pos-report-export-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  background: var(--pos-surface);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--pos-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.pos-report-export-tile:hover {
  border-color: rgba(30, 58, 95, 0.35);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.pos-report-export-tile:active {
  transform: scale(0.98);
}

.pos-report-export-tile:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}

.pos-report-export-tile.is-selected {
  background: linear-gradient(160deg, #1e3a5f 0%, #2d4a6f 100%);
  border-color: #1e3a5f;
  color: #fff;
}

.pos-report-export-tile.is-selected:hover {
  border-color: #152a45;
  box-shadow: 0 6px 16px rgba(30, 58, 95, 0.28);
}

.pos-report-export-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 12px;
  background: var(--pos-btn-dark);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.pos-report-export-submit:hover {
  filter: brightness(1.06);
}

.pos-report-export-submit:active {
  transform: scale(0.99);
}

.pos-report-export-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pos-report-export-tile-title {
  font-size: 0.92rem;
  font-weight: 800;
}

.pos-report-export-tile-sub {
  font-size: 0.72rem;
  opacity: 0.82;
}

.pos-report-view-inner .pos-reports-daily-close-status {
  min-height: 1.1rem;
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--pos-muted);
}

.pos-reports-filter--modal {
  margin: 0;
}

.pos-report-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pos-reports-modal-readings-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--pos-muted);
  line-height: 1.42;
}

#pos-report-modal-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 12rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: rgba(249, 250, 251, 0.6);
}

#pos-report-modal-scroll .pos-reports-panel {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

#pos-report-modal-scroll .pos-reports-table-wrap {
  max-height: none;
}

.pos-more-modal.pos-report-daily-modal,
.pos-more-modal.pos-global-cashier-shift-modal {
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(90vh, 760px);
  border-radius: 18px;
}

.pos-report-daily-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pos-report-daily-inner,
.pos-global-cashier-shift-inner {
  padding: 0 1rem 1rem;
  overflow-y: auto;
}

.pos-reports-intro {
  max-width: 44rem;
}

.pos-reports-filter {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  box-shadow: var(--pos-shadow);
}

.pos-reports-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.pos-reports-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 10rem;
}

.pos-reports-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pos-muted);
}

.pos-reports-filter-control {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.pos-reports-apply {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: none;
  background: var(--pos-btn-dark);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.pos-reports-apply:hover {
  filter: brightness(1.06);
}

.pos-reports-filter-help {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--pos-muted);
  max-width: 44rem;
}

.pos-reports-status {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--pos-muted);
  min-height: 1.25rem;
}

.pos-reports-shift-z-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
}

@media (min-width: 980px) {
  .pos-reports-shift-z-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.pos-reports-daily-close,
.pos-reports-cashier-shift-block {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  padding: 1rem 1.15rem 1.2rem;
  box-shadow: var(--pos-shadow);
}

.pos-reports-daily-close-title {
  margin: 0 0 0.5rem;
}

.pos-reports-daily-close-fields {
  margin: 0.75rem 0 0;
}

.pos-reports-z-override {
  display: block;
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--pos-muted);
  cursor: pointer;
  user-select: none;
}

.pos-reports-z-override input {
  margin-right: 0.5rem;
  vertical-align: middle;
}

.pos-reports-daily-close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.pos-reports-daily-close-status {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--pos-muted);
  min-height: 1.25rem;
}

.pos-z-report-pre {
  margin: 0.75rem 0 0;
  padding: 1rem 1.1rem;
  background: #fafafa;
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.pos-cashier-shift-panel {
  margin: 0;
}

/* Register POS: shift status lives in .pos-topbar (compact cluster). */
.pos-topbar .pos-cashier-shift-index-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-right: 0.15rem;
  padding: 0;
  border: none;
  background: transparent;
}

.pos-topbar .pos-cashier-shift-index-bar[hidden] {
  display: none !important;
}

.pos-topbar .pos-cashier-shift-topbar-end-btn {
  color: #ffffff;
  background: var(--pos-btn-danger);
  border-color: #b91c1c;
}

.pos-topbar .pos-cashier-shift-topbar-end-btn:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
}

.pos-topbar .pos-cashier-shift-topbar-end-btn:focus-visible {
  outline: 2px solid var(--pos-btn-danger);
  outline-offset: 2px;
}

.pos-modal-backdrop.pos-shift-start-backdrop {
  z-index: 152;
}

.pos-more-modal.pos-shift-start-modal {
  z-index: 162;
  width: min(28rem, calc(100vw - 2rem));
}

.pos-shift-start-modal-body {
  padding: 0 1.25rem 0.5rem !important;
  overflow-y: auto;
}

.pos-shift-start-lead {
  margin: 0 0 1rem !important;
  line-height: 1.45;
}

.pos-shift-start-modal .pos-cashier-shift-input,
.pos-shift-start-modal .pos-cashier-shift-textarea {
  max-width: none;
  width: 100%;
}

.pos-shift-start-modal .pos-shift-start-modal-notes {
  height: 20vh;
  min-height: 20vh;
  max-height: 40vh;
  resize: vertical;
}

.pos-shift-start-modal-footer {
  padding: 0rem 1.25rem 1.25rem !important;

  margin-top: 0;
}

.pos-shift-start-modal-footer .pos-shift-start-submit {
  width: 100%;
}

.pos-cashier-shift-card,
.pos-cashier-shift-card--active {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px dashed var(--pos-border);
  background: rgba(255, 255, 255, 0.4);
}

.pos-cashier-shift-card--active {
  border-style: solid;
  background: var(--pos-surface-2, rgba(248, 250, 252, 0.9));
}

.pos-cashier-shift-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pos-cashier-shift-hint {
  font-size: 0.85rem;
  color: var(--pos-muted);
}

.pos-cashier-shift-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pos-cashier-shift-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pos-muted);
}

.pos-cashier-shift-input {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  font: inherit;
  max-width: 16rem;
  text-align: center;
}

.pos-cashier-shift-textarea {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 150px;
}

.pos-cashier-shift-active-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.pos-cashier-shift-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(34, 197, 94, 0.15);
  color: rgb(21, 128, 61);
}

.pos-cashier-shift-meta {
  font-size: 0.85rem;
  color: var(--pos-muted);
}

.pos-cashier-shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pos-cashier-shift-error {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--pos-danger, #b91c1c);
}

.pos-shift-cash-expect {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--pos-border);
  background: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.85rem;
}

.pos-shift-expected-lines {
  white-space: pre-wrap;
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--pos-muted);
}

.pos-shift-cash-expect strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.pos-reports-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pos-reports-panel {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: var(--pos-radius);
  padding: 1rem 1.15rem 1.2rem;
  box-shadow: var(--pos-shadow);
}

.pos-reports-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pos-reports-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.pos-reports-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pos-reports-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 9px;
  border: 1px solid var(--pos-border);
  background: #f9fafb;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-reports-btn--primary {
  background: var(--pos-btn-dark);
  color: #fff;
  border-color: var(--pos-btn-dark);
}

.pos-reports-panel-print-head {
  display: none;
}

.pos-reports-panel-sub {
  margin: 0.2rem 0 0.75rem;
  font-size: 0.82rem;
  color: var(--pos-muted);
}

.pos-reports-panel-period {
  margin: 0.2rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--pos-muted);
}

.pos-reports-summary-grid {
  margin-bottom: 1rem;
}

.pos-reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem;
}

.pos-reports-kpi {
  padding: 0.55rem 0.65rem;
  background: #f9fafb;
  border-radius: 9px;
  border: 1px solid var(--pos-border);
  font-size: 0.82rem;
}

.pos-reports-kpi-label {
  display: block;
  color: var(--pos-muted);
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

.pos-reports-kpi-value {
  font-weight: 700;
  font-size: 0.95rem;
}

.pos-reports-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.pos-reports-limit-note {
  font-size: 0.8rem;
  color: #b45309;
  margin: 0 0 0.5rem;
}

.pos-reports-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(420px, 55vh);
  border: 1px solid var(--pos-border);
  border-radius: 8px;
}

.pos-reports-table {
  font-size: 0.82rem;
}

.pos-reports-table th,
.pos-reports-table td {
  white-space: nowrap;
}

.pos-reports-detail {
  white-space: normal;
  max-width: 22rem;
  word-break: break-word;
}

.pos-reports-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media print {
  body.pos-page {
    background: #fff;
  }

  .pos-topbar,
  .pos-app-version-footer,
  .pos-no-print,
  .pos-reports-filter,
  .pos-reports-status,
  #pos-more-backdrop,
  #pos-more-modal,
  #pos-report-view-backdrop,
  #pos-report-daily-backdrop,
  #pos-global-cashier-shift-backdrop,
  .pos-reports-card-grid {
    display: none !important;
  }

  #pos-reports-pocket {
    display: none !important;
  }

  body.pos-modal-open.pos-page {
    overflow: visible !important;
  }

  .pos-more-modal.pos-report-view-modal {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .pos-report-view-inner {
    padding: 0 !important;
    gap: 0 !important;
  }

  .pos-report-view-modal .pos-more-modal-header {
    display: none !important;
  }

  #pos-report-modal-scroll {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
  }

  @page {
    margin: 10mm;
  }

  body.pos-reports-print-as-receipt.pos-reports-print-one .pos-reports-print-target {
    max-width: 72mm;
    margin: 0 auto;
    font-size: 0.74rem;
  }

  body.pos-reports-print-as-pdf.pos-reports-print-one .pos-reports-print-target {
    max-width: none;
    font-size: inherit;
  }

  .pos-reports-print-banner {
    display: block !important;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ccc;
  }

  .pos-reports-print-banner-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
  }

  .pos-reports-print-banner-sub {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #444;
  }

  .pos-analytics-hero {
    margin-bottom: 1rem;
  }

  .pos-reports-panel-head {
    display: none !important;
  }

  .pos-reports-panel-print-head {
    display: block !important;
    margin-bottom: 0.75rem;
  }

  body.pos-reports-print-one .pos-analytics-hero,
  body.pos-reports-print-one .pos-reports-print-banner {
    display: none !important;
  }

  body.pos-reports-print-one .pos-reports-panel:not(.pos-reports-print-target) {
    display: none !important;
  }

  body.pos-reports-print-one .pos-reports-print-target .pos-reports-panel-print-head {
    display: block !important;
  }

  .pos-reports-table-wrap {
    max-height: none;
  }

  .pos-z-report-pre {
    background: #fff;
    border: none;
    padding: 0;
  }
}

/* Attendance — full-width name list + collapsible clock / camera */
.pos-attendance-logs-section {
  margin-top: 0;
}

/* App settings — view-only profile modals */
.pos-app-settings-profile-modal {
  width: min(720px, calc(100vw - 2rem));
  max-height: min(88dvh, calc(100vh - 2rem));
}

.pos-app-settings-profile-modal .pos-more-modal-header {
  padding: 1.1rem 1.35rem;
  margin-bottom: 0;
}

.pos-app-settings-profile-modal .pos-more-modal-title {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.pos-app-settings-profile-body {
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
}

.pos-app-settings-profile-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--pos-border, rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  overflow: hidden;
  background: var(--pos-bg, #fff);
}

.pos-app-settings-profile-row {
  display: grid;
  grid-template-columns: minmax(11rem, 38%) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--pos-border, rgba(0, 0, 0, 0.08));
}

.pos-app-settings-profile-row:last-child {
  border-bottom: 0;
}

.pos-app-settings-profile-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

.pos-app-settings-profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pos-muted, #6b7280);
}

.pos-app-settings-profile-value {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pos-text, #111);
  word-break: break-word;
}

.pos-app-settings-profile-empty {
  margin: 0;
  padding: 1.5rem 0.25rem;
  text-align: center;
  color: var(--pos-muted, #6b7280);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .pos-app-settings-profile-modal {
    width: min(100vw - 1.25rem, 720px);
  }

  .pos-app-settings-profile-body {
    padding: 1rem 1rem 1.25rem;
  }

  .pos-app-settings-profile-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
  }

  .pos-app-settings-profile-value {
    font-size: 0.95rem;
  }
}

.pos-customer-ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.85rem;
}

.pos-customer-ads-empty {
  margin: 0;
  grid-column: 1 / -1;
  color: var(--pos-muted, #6b7280);
  font-size: 0.95rem;
}

.pos-customer-ads-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.55rem;
  border: 1px solid var(--pos-border, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: grab;
}

.pos-customer-ads-card.is-dragging {
  opacity: 0.55;
}

.pos-customer-ads-card img,
.pos-customer-ads-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  display: block;
}

.pos-customer-ads-card-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.pos-customer-ads-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pos-customer-ads-card-actions .pos-staff-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.75rem;
}

.pos-attendance-name-table .pos-attendance-name-cell {
  font-weight: 600;
}

.pos-attendance-clock-modal {
  width: min(420px, calc(100vw - 2rem));
  max-height: min(92dvh, calc(100vh - 2rem));
}

.pos-attendance-clock-body {
  padding: 0 1rem 1.25rem;
  overflow-y: auto;
}

.pos-attendance-clock-body .pos-attendance-shell {
  width: 100%;
  margin: 0;
}

.pos-attendance-logs-bar {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.pos-attendance-logs-bar > .pos-staff-btn {
  align-self: flex-end;
}

.pos-attendance-logs-bar .pos-staff-search-wrap {
  flex: 1 1 12rem;
  min-width: 10rem;
  align-self: flex-end;
}

.pos-attendance-logs-bar .pos-staff-table-bar-spacer {
  display: none;
}

.pos-attendance-date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
}

.pos-attendance-date-filters .pos-staff-btn {
  align-self: flex-end;
}

.pos-attendance-date-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.pos-attendance-date-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pos-muted);
}

.pos-attendance-date-input {
  min-width: 10.5rem;
}

.pos-attendance-logs-status {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--pos-muted);
}

.pos-attendance-page {
  display: block;
}

.pos-attendance-shell {
  width: 100%;
  margin: 0;
}

.pos-attendance-clock-modal .pos-attendance-manual-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.pos-attendance-clock-modal .pos-attendance-manual-actions .pos-staff-btn {
  min-width: 7.5rem;
  width: auto;
}

.pos-attendance-head {
  margin-bottom: 1.25rem;
  text-align: center;
}

.pos-attendance-head .pos-staff-page-kicker {
  margin-bottom: 0.5rem;
}

.pos-attendance-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pos-text);
}

.pos-attendance-subtitle {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  color: var(--pos-muted, #6b7280);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.pos-attendance-manual-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--pos-border, #e5e7eb);
  border-radius: 0.75rem;
  background: var(--pos-surface, #fff);
}

.pos-attendance-manual-label {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pos-muted, #6b7280);
}

.pos-attendance-operator {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--pos-muted, #6b7280);
}

.pos-attendance-manual-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.pos-attendance-manual-actions .pos-staff-btn {
  min-width: 7.5rem;
}

.pos-attendance-manual-actions .pos-staff-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pos-attendance-manual-actions .pos-staff-btn.is-selected {
  box-shadow: 0 0 0 2px var(--pos-primary, #2563eb);
}

.pos-attendance-selected-action {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pos-text, #111827);
}

.pos-attendance-camera-panel .pos-attendance-manual-label {
  margin-bottom: 0.35rem;
}

.pos-attendance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.pos-attendance-offline-note {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--pos-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pos-attendance-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--pos-border, #e5e7eb);
  background: var(--pos-surface-2, #f9fafb);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
}

.pos-attendance-camera-panel {
  border: 1px solid var(--pos-border, #e5e7eb);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--pos-surface, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pos-attendance-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #000;
}

.pos-attendance-video,
.pos-attendance-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-attendance-overlay {
  pointer-events: none;
  z-index: 1;
}

.pos-attendance-prompt {
  margin: 1rem 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
}

.pos-attendance-hint {
  margin: 0;
  text-align: center;
  color: var(--pos-muted, #6b7280);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.pos-staff-face-modal .pos-staff-face-body {
  padding: 0 1rem 1rem;
}

.pos-staff-face-subject {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--pos-text, #111827);
}

.pos-staff-face-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.pos-staff-face-tab {
  min-width: 7rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--pos-border, #e5e7eb);
  border-radius: 999px;
  background: #fff;
  color: var(--pos-text, #111827);
  font: inherit;
  cursor: pointer;
}

.pos-staff-face-tab.is-active {
  background: var(--pos-icon-btn-bg, #1f2937);
  border-color: var(--pos-icon-btn-bg, #1f2937);
  color: #fff;
}

.pos-staff-face-panel[hidden] {
  display: none !important;
}

.pos-staff-face-upload-label {
  display: block;
  margin-bottom: 0.75rem;
}

.pos-staff-face-upload-preview-wrap {
  margin-bottom: 0.85rem;
  border: 1px solid var(--pos-border, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
}

.pos-staff-face-upload-preview {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}

.pos-staff-face-panel .pos-attendance-actions {
  margin-top: 0.85rem;
}

.pos-staff-face-panel .pos-staff-btn--primary {
  width: 100%;
}
