:root {
  color-scheme: dark;

  /* PAWBAR x DUM Lounge Dark-first tokens */
  --bg-dark: #040201;
  --surface-dark: #110a07;
  --surface-2-dark: #1c110c;
  --text-dark: #e0ddd3;
  --muted-dark: #9e938d;
  --border-dark: rgba(198, 150, 91, 0.2);
  --accent-dark: #e84a0b;
  --accent-ember: #d0360b;
  --accent-gold: #c6965b;
  --accent-terracotta: #5c1604;
  --accent-text-dark: #fff9f4;

  --full-dark: #4ade80;
  --half-dark: #c6965b;
  --low-dark: #e84a0b;
  --empty-dark: #f87171;
  --info-dark: #93c5fd;

  --bg: var(--bg-dark);
  --surface: var(--surface-dark);
  --surface-2: var(--surface-2-dark);
  --text: var(--text-dark);
  --muted: var(--muted-dark);
  --border: var(--border-dark);
  --accent: var(--accent-dark);
  --accent-text: var(--accent-text-dark);
  --full: var(--full-dark);
  --half: var(--half-dark);
  --low: var(--low-dark);
  --empty: var(--empty-dark);
  --info: var(--info-dark);

  --scrollbar-track: #151a26;
  --scrollbar-thumb: #4b556b;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --nav-height: 66px;
  --target-size: 40px;

  @media (pointer: coarse) {
    --target-size: 44px;
  }

  accent-color: var(--accent);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 1rem);
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.svg-icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

.icon-status-full {
  --icon-accent: var(--full);
  color: var(--full);
}

.icon-status-half {
  --icon-accent: var(--half);
  color: var(--half);
}

.icon-status-low {
  --icon-accent: var(--low);
  color: var(--low);
}

.icon-status-empty {
  --icon-accent: var(--empty);
  color: var(--empty);
}

.icon-heading,
.sync-title-row,
.toast-content {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-lg {
  width: 48px;
  height: 48px;
}

.brand-logo.pin-logo {
  width: 68px;
  height: 68px;
}

.brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-logo-mini {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-logo-btn {
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.08s ease;
}

.brand-logo-btn:active {
  transform: scale(0.92);
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 1rem);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(0.65rem + env(safe-area-inset-top)) 1rem 0.65rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.app-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--half);
  flex-shrink: 0;
}

.sync-dot.is-online {
  background: var(--full);
}

.sync-dot.is-offline {
  background: var(--low);
}

/* Main */
.app-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0.85rem 1rem 1rem;
  flex: 1;
}

.view-section[hidden] {
  display: none;
}

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

.section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-wrap: balance;
}

.section-desc {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  min-block-size: var(--target-size);
  padding: 0.4rem 0.8rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

/* Status Overview strip */
.status-overview {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
  scrollbar-width: none;
}

.status-overview::-webkit-scrollbar {
  display: none;
}

.stat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.stat-chip.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

/* Controls & Inputs */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.search-field input,
.select-wrap select,
.field-label input,
.field-label select,
.field-label textarea {
  width: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: max(44px, var(--target-size));
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: max(1rem, 1em);
  line-height: 1.35;
}

.field-label textarea {
  min-block-size: 74px;
  resize: vertical;
}

.select-row,
.mix-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.select-row .select-wrap,
.mix-filters-row .select-wrap {
  flex: 1 1 140px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

/* Brand chips */
.brand-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
}

.brand-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.brand-chip.is-active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* Cards & Lists */
.inventory-list,
.mixes-list,
.shopping-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.card,
.tobacco-card,
.mix-card,
.shopping-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  min-inline-size: 0;
}

.card {
  container: card / inline-size;
}

.tobacco-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tobacco-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.tobacco-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.brand-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.75rem;
  font-weight: 700;
}

.strength-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.strength-light {
  color: var(--full);
}
.strength-medium {
  color: var(--half);
}
.strength-strong {
  color: var(--empty);
}

.tobacco-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.tobacco-notes {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.tag-pill {
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon-action-btn,
.icon-delete-btn {
  min-inline-size: var(--target-size);
  min-block-size: var(--target-size);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* One-tap status switcher */
.status-segment {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.status-btn {
  min-height: 44px;
  padding: 0.25rem 0.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.status-btn[aria-pressed="true"][data-status="full"] {
  border-color: var(--full);
  background: color-mix(in srgb, var(--full) 18%, var(--surface));
  color: var(--text);
}

.status-btn[aria-pressed="true"][data-status="half"] {
  border-color: var(--half);
  background: color-mix(in srgb, var(--half) 18%, var(--surface));
  color: var(--text);
}

.status-btn[aria-pressed="true"][data-status="low"] {
  border-color: var(--low);
  background: color-mix(in srgb, var(--low) 20%, var(--surface));
  color: var(--text);
}

.status-btn[aria-pressed="true"][data-status="empty"] {
  border-color: var(--empty);
  background: color-mix(in srgb, var(--empty) 20%, var(--surface));
  color: var(--text);
}

/* Segmented Tabs for Mixes */
.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.seg-tab {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.seg-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Mix card */
.mix-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mix-card.is-unavailable {
  opacity: 0.86;
}

.mix-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.mix-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--surface-2);
}

.badge-unusual {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
}

.badge-classic {
  background: color-mix(in srgb, var(--info) 16%, var(--surface));
  color: var(--info);
}

.badge-ok {
  color: var(--full);
}
.badge-warn {
  color: var(--low);
}
.badge-miss {
  color: var(--empty);
}

.fav-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

.fav-btn.is-fav {
  color: #f59e0b;
  border-color: #f59e0b;
}

.mix-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.mix-notes {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
}

.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ingredient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.ingredient-info {
  min-width: 0;
  flex: 1;
}

.ingredient-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
}

.ingredient-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--low);
  margin-top: 0.1rem;
}

.ingredient-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.pct-pill {
  font-weight: 700;
  font-size: 0.84rem;
  min-width: 38px;
  text-align: right;
}

.quick-status-cycle {
  min-height: 36px;
  min-width: 78px;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}

.mix-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.2rem;
}

/* Shopping List */
.shopping-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.shopping-group-head h3 {
  margin: 0;
  font-size: 1rem;
}

.shopping-items {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shopping-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* Builder / Generator */
.generator-card,
.builder-card {
  margin-bottom: 1rem;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
}

.card-head h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  text-wrap: balance;
}

.card-head .badge,
.card-head .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.muted-text,
.helper-text {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.generator-controls,
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

@container card (inline-size >= 440px) {
  .generator-controls,
  .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-inline-size: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-inline-size: 0;
}

.builder-ingredients {
  container: builder / inline-size;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "select select"
    "pct remove";
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.builder-row select {
  grid-area: select;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: max(44px, var(--target-size));
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: max(1rem, 1em);
  line-height: 1.35;
}

.builder-pct-field {
  grid-area: pct;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: start;
  min-inline-size: 0;
}

.builder-pct-field input {
  inline-size: 76px;
  min-inline-size: 0;
  min-block-size: max(44px, var(--target-size));
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: max(1rem, 1em);
  text-align: center;
}

.builder-pct-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.builder-remove-btn {
  grid-area: remove;
  justify-self: end;
  background-color: var(--surface);
}

@container builder (inline-size >= 460px) {
  .builder-row {
    grid-template-columns: minmax(0, 1fr) auto var(--target-size);
    grid-template-areas: "select pct remove";
    padding: 0;
    background: transparent;
    border: 0;
  }

  .builder-row select,
  .builder-pct-field input,
  .builder-remove-btn {
    background-color: var(--surface-2);
  }
}

.builder-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.percent-total {
  font-weight: 700;
  font-size: 0.95rem;
}

.percent-total.is-valid {
  color: var(--full);
}

.percent-total.is-invalid {
  color: var(--empty);
}

.generated-output {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Order Picker & Brand-Consistent Range Sliders */
.order-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.slider-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.slider-header-right {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.slider-value-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
}

.slider-scale-ice {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.slider-scale-ice span:nth-child(1) {
  text-align: left;
}

.slider-scale-ice span:nth-child(2),
.slider-scale-ice span:nth-child(3) {
  text-align: center;
}

.slider-scale-ice span:nth-child(4) {
  text-align: right;
}

.muted-inline {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Native Range Slider per modern-web-guidance slider guide */
input[type="range"] {
  --slider-track-size: 0.5rem;
  --slider-thumb-size: 1.45rem;
  --slider-track-radius: 999px;
  --slider-thumb-radius: 50%;
  --slider-track-color: var(--surface-2);
  --slider-fill-color: var(--accent);
  --slider-thumb-color: var(--accent);
  --slider-direction: to right;

  &:dir(rtl) {
    --slider-direction: to left;
  }

  --attr-min: attr(min type(<number>), 0);
  --attr-max: attr(max type(<number>), 100);
  --control-value: attr(value type(<number>), 50);
  --slider-progress: calc(
    progress(var(--control-value), var(--attr-min), var(--attr-max)) * 100%
  );

  appearance: none;
  inline-size: 100%;
  block-size: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  touch-action: none;
  cursor: pointer;
}

@supports not (opacity: progress(1, 0, 100)) {
  input[type="range"] {
    --slider-progress: calc(
      (var(--control-value) - var(--attr-min)) /
      (var(--attr-max) - var(--attr-min)) * 100%
    );
  }
}

input[type="range"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* WebKit/Blink */
input[type="range"]::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size);
  border: 1px solid var(--border);
  border-radius: var(--slider-track-radius);
  background: linear-gradient(
    var(--slider-direction),
    var(--slider-fill-color) var(--slider-progress),
    var(--slider-track-color) var(--slider-progress)
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  margin-block-start: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2 - 1px);
  border: 2px solid var(--surface);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  @media (prefers-reduced-motion: no-preference) {
    transition: scale 140ms ease-out, box-shadow 140ms ease-out;
  }
}

input[type="range"]:active:not(:disabled)::-webkit-slider-thumb {
  scale: 1.16;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--slider-thumb-color) 24%, transparent);
}

/* Firefox */
input[type="range"]::-moz-range-track {
  block-size: var(--slider-track-size);
  border: 1px solid var(--border);
  border-radius: var(--slider-track-radius);
  background: var(--slider-track-color);
}

input[type="range"]::-moz-range-progress {
  block-size: var(--slider-track-size);
  border-radius: var(--slider-track-radius);
  background: var(--slider-fill-color);
}

input[type="range"]::-moz-range-thumb {
  inline-size: var(--slider-thumb-size);
  block-size: var(--slider-thumb-size);
  border: 2px solid var(--surface);
  border-radius: var(--slider-thumb-radius);
  background: var(--slider-thumb-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  @media (prefers-reduced-motion: no-preference) {
    transition: scale 140ms ease-out, box-shadow 140ms ease-out;
  }
}

input[type="range"]:active:not(:disabled)::-moz-range-thumb {
  scale: 1.16;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--slider-thumb-color) 24%, transparent);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--slider-fill-color);
  outline-offset: 4px;
}

.style-picker-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.style-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.style-tile[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent);
}

.order-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.subsection-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.15rem;
}

.nav-item[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  border-top: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--low);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* Native <dialog> styling per modern-web-guidance */
dialog {
  width: min(94vw, 520px);
  max-height: 88dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

/* MANDATORY (both rules): stops scroll gestures chaining to the page behind */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.icon-close-btn {
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
}

.dialog-body {
  container: card / inline-size;
  padding: 1rem;
  overflow-y: auto;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.tags-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin: 0;
}

.tags-fieldset legend {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.35rem;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.8rem;
  cursor: pointer;
}

.custom-tag-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.custom-tag-row input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.sync-status-card {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.network-urls-box {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.network-urls-box h3,
.backup-actions h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}

.urls-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
}

.urls-list li {
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.backup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-btn {
  cursor: pointer;
}

/* Popover Toast Notifications */
.toast-region {
  position: fixed;
  inset-inline: 0.75rem;
  top: calc(0.75rem + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  z-index: 60;
}

.toast-popover {
  position: relative;
  inset: auto;
  margin: 0;
  width: min(92vw, 420px);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  opacity: 0;
  translate: 0 -10px;
  transition: opacity 0.2s ease, translate 0.2s ease, display 0.2s ease, overlay 0.2s ease;
  transition-behavior: allow-discrete;
}

.toast-popover:is(:popover-open, .\:popover-open) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  opacity: 1;
  translate: 0 0;
}

@starting-style {
  .toast-popover:is(:popover-open, .\:popover-open) {
    opacity: 0;
    translate: 0 -10px;
  }
}

.toast-close-btn {
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .toast-popover,
  .btn {
    transition: none;
  }
}

@media (forced-colors: active) {
  .nav-item[aria-current="page"] {
    outline: 2px solid Highlight;
  }
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
}

@media (max-width: 420px) {
  .segmented-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== PAWBAR Promo, Header & Guest / Staff Extensions ==================== */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.18), rgba(255, 94, 126, 0.14));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
}

.promo-banner svg {
  color: var(--accent);
  flex-shrink: 0;
}

.promo-banner[hidden] {
  display: none;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header-actions[hidden] {
  display: none;
}

.staff-entry-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  padding-inline: 0.55rem;
}

.table-pill-btn {
  border-radius: 999px;
  font-weight: 700;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--half);
  display: inline-block;
}

.sync-dot.is-online {
  background: var(--full);
}

.sync-dot.is-offline {
  background: var(--empty);
}

.guest-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guest-main.has-cart {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 5.2rem);
}

/* Guest Hookah Tier Radio Cards (non-layout-shifting selection per card guide) */
.tier-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 0.85rem;
}

.tier-fieldset legend {
  margin-bottom: 0.5rem;
}

.tier-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (max-width: 440px) {
  .tier-choice-grid {
    grid-template-columns: 1fr;
  }
}

.tier-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  border: 2px solid var(--border);
  margin: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.tier-choice-card > input[type="radio"] {
  margin-top: 0.2rem;
  inline-size: 1.15rem;
  block-size: 1.15rem;
  flex-shrink: 0;
}

.tier-choice-card:has(> input[type="radio"]:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.tier-choice-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.tier-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tier-choice-top strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.tier-choice-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--info);
}

.tier-choice-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

.tier-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* Native <details> Accordions per accordion guide */
.extras-accordion,
.menu-accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.extras-accordion {
  background: var(--surface-2);
}

.menu-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.extras-accordion > summary,
.menu-accordion details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.extras-accordion > summary::before,
.menu-accordion details > summary::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 0.15rem;
}

.extras-accordion[open] > summary::before,
.menu-accordion details[open] > summary::before {
  transform: rotate(45deg);
}

.extras-accordion > summary::-webkit-details-marker,
.menu-accordion details > summary::-webkit-details-marker {
  display: none;
}

.extras-accordion::details-content,
.menu-accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.extras-accordion:not([open])::details-content,
.menu-accordion details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .extras-accordion::details-content,
  .menu-accordion details::details-content {
    transition: block-size 0.24s ease, content-visibility 0.24s ease;
    transition-behavior: allow-discrete;
  }
}

.extras-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.8rem 0.8rem;
}

.extra-check-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.extra-check-left {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.extra-check-left input[type="checkbox"] {
  margin-top: 0.18rem;
  inline-size: 1.05rem;
  block-size: 1.05rem;
  flex-shrink: 0;
}

/* Menu Cards, Scrollable Filter Strip & Add-to-Cart Stepper */
.chip-scroll-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

.chip-scroll-row::-webkit-scrollbar {
  display: none;
}

.chip-scroll-row > button {
  flex: none;
}

.menu-grid,
.accordion-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.accordion-items-list {
  padding: 0 0.85rem 0.85rem;
}

.menu-sub-heading {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.menu-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.menu-item-card.is-stopped {
  opacity: 0.55;
}

.menu-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.menu-item-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.menu-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.18rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.menu-item-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.menu-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.25rem;
}

.qty-btn {
  min-width: 30px;
  min-height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qty-count {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
}

/* Segmented Tabs Variations */
.segmented-tabs-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.segmented-tabs-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.segmented-tabs-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

@media (max-width: 540px) {
  .segmented-tabs-5 {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)) !important;
  }
}

/* Sticky Floating Guest Cart Bar */
.guest-cart-bar {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 0.55rem);
  z-index: 28;
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.guest-cart-bar[hidden] {
  display: none;
}

.guest-cart-bar-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.guest-cart-bar-info strong {
  font-size: 0.92rem;
}

/* Cart Dialog & Table Chips */
.table-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 36dvh;
  overflow-y: auto;
}

.cart-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.cart-item-info {
  min-width: 0;
  flex: 1;
}

.cart-item-info strong {
  display: block;
  font-size: 0.88rem;
}

.cart-item-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.96rem;
}

.cart-total-row strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.variant-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Guest Venue Info */
.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.info-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-brand-row h3 {
  margin: 0;
}

.promo-callout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  font-size: 0.84rem;
}

.info-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.info-links-grid a {
  text-decoration: none;
}

/* Staff PIN Gate */
button,
.brand-logo-btn,
.pin-gate,
.pin-card,
.pin-card *,
.pin-pad,
.pin-key {
  touch-action: manipulation;
}

.pin-gate {
  max-width: 420px;
  margin: 1.5rem auto;
  padding: 0 0.9rem;
}

.pin-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.pin-logo {
  margin-inline: auto;
}

.pin-card h2 {
  margin: 0;
}

.pin-card input[type="password"] {
  text-align: center;
  font-size: max(16px, 1.35rem);
  letter-spacing: 0.35em;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  -webkit-user-select: none;
  user-select: none;
}

.pin-key {
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pin-key:active {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
}

.pin-error {
  margin: 0;
  color: var(--empty);
  font-size: 0.84rem;
  font-weight: 700;
}

/* Staff Ticket Cards & Stop-List Controls */
.ticket-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-station {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}

.ticket-station.station-bar {
  border-left-color: var(--info);
}

.ticket-station-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ticket-item-line {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.86rem;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.staff-ticket-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  font-size: 0.84rem;
}

.stop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.stop-row-info {
  min-width: 0;
  flex: 1;
}

.stop-row-info strong {
  display: block;
  font-size: 0.88rem;
}

.stop-toggle-btn {
  min-width: 92px;
  justify-content: center;
}

.stop-toggle-btn.is-stopped {
  background: color-mix(in srgb, var(--empty) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--empty) 45%, var(--border));
  color: var(--empty);
}

/* ==================== v16 Role Separation & Owner Dashboard ==================== */
.role-badge-pill {
  display: inline-block;
  vertical-align: middle;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  border: 1.5px solid rgba(198, 150, 91, 0.55);
  background: rgba(198, 150, 91, 0.16);
  color: #f0d7b8;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.role-badge-pill[hidden],
.owner-pins-section[hidden],
.owner-hookah-subtabs[hidden],
.bottom-nav .nav-item[hidden] {
  display: none !important;
}

.role-badge-pill.role-hookah,
.role-badge-pill.role-bar,
.role-badge-pill.role-both,
.role-badge-pill.role-owner {
  border-color: rgba(198, 150, 91, 0.55);
  background: rgba(198, 150, 91, 0.16);
  color: #f0d7b8;
}

.role-badge-pill.is-on-shift {
  border-color: #34d399 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 78, 59, 0.52)) !important;
  color: #d1fae5 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.24), 0 4px 14px rgba(16, 185, 129, 0.3);
}

#staff-bottom-nav[data-nav-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#staff-bottom-nav[data-nav-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#staff-bottom-nav[data-nav-count="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 440px) {
  #staff-header-actions .btn {
    padding-inline: 0.5rem;
    font-size: 0.76rem;
  }
  .role-badge-pill {
    font-size: 0.7rem;
    padding: 0.18rem 0.45rem;
  }
}

.owner-hookah-subtabs[hidden] {
  display: none;
}

.owner-overview-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (min-width: 560px) {
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.kpi-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.kpi-sub {
  font-size: 0.74rem;
  color: var(--muted);
}

.owner-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .owner-split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.station-panel-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 3px solid var(--border);
}

.station-panel-card.station-card-bar {
  border-top-color: var(--info);
}

.station-panel-card.station-card-hookah {
  border-top-color: var(--accent);
}

.station-metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.station-metric-box {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.station-metric-box span {
  font-size: 0.72rem;
  color: var(--muted);
}

.station-metric-box strong {
  font-size: 0.96rem;
}

.ticket-station-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ticket-station.is-done {
  opacity: 0.82;
}

.ticket-station.is-cancelled {
  border-left-color: var(--empty);
  background: color-mix(in srgb, var(--empty) 10%, var(--surface-2));
}

.cancel-reason-note {
  margin: 0.25rem 0 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--empty) 14%, var(--surface-2));
  border-left: 3px solid var(--empty);
  font-size: 0.8rem;
  color: var(--text);
}

.cancel-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cancel-reason-chips .filter-chip {
  min-height: 36px;
}

.owner-shortage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.84rem;
}

.owner-pins-section {
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ==================== v17 Bar Inventory, Worker Management & Period Analytics ==================== */
.owner-inv-subtabs[hidden] {
  display: none !important;
}

.owner-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.worker-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.worker-stat-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
}

.worker-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.worker-stat-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.worker-stat-metrics strong {
  color: var(--text);
}

.worker-mgmt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.worker-mgmt-row.is-inactive {
  opacity: 0.6;
}

@media (max-width: 410px) {
  .status-btn {
    font-size: 0.71rem;
    gap: 0.14rem;
    padding: 0.25rem 0.12rem;
  }
}

/* ==================== v18 Both Role & Mobile Alignment Polish ==================== */

.app-shell {
  overflow-x: clip;
}

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

.header-top {
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
}

.brand-block {
  flex: 1 1 auto;
  min-width: 0;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.role-badge-pill {
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head,
.card-head,
.ticket-header,
.tobacco-top,
.worker-stat-top,
.worker-mgmt-row,
.stop-row,
.shopping-row {
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.section-title {
  min-width: 0;
}

.seg-tab {
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.nav-item {
  min-width: 0;
  padding: 0.22rem 0.1rem;
}

.nav-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.65rem;
}

.nav-badge {
  top: 3px;
  right: max(3px, calc(50% - 20px));
}

dialog {
  width: min(94vw, 500px);
  overflow-x: hidden;
}

.dialog-body {
  overflow-x: hidden;
}

.dialog-footer {
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .app-header {
    padding-inline: 0.75rem;
  }

  .app-main {
    padding: 0.75rem 0.75rem 1rem;
  }

  .seg-tab {
    font-size: 0.74rem;
    padding: 0.28rem 0.22rem;
    min-height: 38px;
  }

  .segmented-tabs-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .dialog-footer .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ingredient-row {
    flex-wrap: wrap;
  }
}

/* ==================== GUEST QUICK GUIDE & COCKTAIL PHOTOS ==================== */
.guest-quick-guide {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-lg, 16px);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.guide-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted, #9aa4b8);
}

.guide-step-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #f4f6fb);
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 30px;
}

.guide-step-btn.is-needs-action {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.guide-step-btn.is-done {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.13);
  color: #a7f3d0;
}

.guide-step-hint {
  font-weight: 500;
}

.guide-arrow {
  opacity: 0.45;
}

.guide-nav-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.guide-pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #aab4c8);
  border-radius: 10px;
  padding: 0.42rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
}

.guide-pill.is-active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
}

.cocktail-card-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.cocktail-card-media {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cocktail-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cocktail-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

@media (max-width: 480px) {
  .guide-nav-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cocktail-card-media {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
  }
}

.owner-date-input {
  width: 100%;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(198, 150, 91, 0.24);
  background: rgba(28, 17, 12, 0.85);
  color: var(--text, #e0ddd3);
  font: inherit;
  color-scheme: dark;
}

/* ==================== DUM-INSPIRED LOUNGE AESTHETIC ==================== */
body {
  position: relative;
  isolation: isolate;
  background-color: #040201;
  background-image: none;
}

body[data-hookah-mood="hard"] {
  --accent: #e84a0b;
}

body[data-hookah-mood="premium"] {
  --accent: #d97706;
}

.hookah-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  --ambient-mint-opacity: 0;
  --ambient-ice-opacity: 0;
  transition: opacity 0.4s ease;
}

body.is-staff-mode .hookah-ambient-bg {
  opacity: 0.45;
}

.ambient-layer {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

.ambient-tier-premium {
  opacity: 1;
  background:
    radial-gradient(ellipse 92% 46% at 50% -6%, rgba(212, 152, 64, 0.24), rgba(198, 150, 91, 0.08) 46%, transparent 72%),
    radial-gradient(ellipse 58% 32% at 86% 14%, rgba(232, 118, 22, 0.1), transparent 70%);
}

.ambient-tier-hard {
  opacity: 0;
  background:
    radial-gradient(ellipse 95% 48% at 50% -6%, rgba(226, 54, 24, 0.29), rgba(168, 28, 12, 0.13) 48%, transparent 74%),
    radial-gradient(ellipse 60% 34% at 15% 18%, rgba(160, 42, 6, 0.18), transparent 70%);
}

body[data-hookah-mood="hard"] .ambient-tier-premium {
  opacity: 0;
}

body[data-hookah-mood="hard"] .ambient-tier-hard {
  opacity: 1;
}

/* М'ята — приємний свіжо-зелений градієнт зліва */
.ambient-layer-mint {
  opacity: var(--ambient-mint-opacity, 0);
  background:
    radial-gradient(ellipse 76% 52% at 6% 44%, rgba(52, 211, 132, 0.3), rgba(16, 160, 98, 0.13) 44%, transparent 74%);
  transition: opacity 0.22s ease;
}

/* Холодок / Лід — чистий біло-блакитний морозний градієнт справа */
.ambient-layer-ice {
  opacity: var(--ambient-ice-opacity, 0);
  background:
    radial-gradient(ellipse 76% 52% at 94% 40%, rgba(228, 246, 255, 0.3), rgba(96, 198, 255, 0.17) 38%, rgba(56, 152, 240, 0.06) 58%, transparent 76%);
  transition: opacity 0.22s ease;
}

/* Смаки — ніжне нижнє сяйво під обраний смаковий стиль */
.ambient-layer-flavor {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Акцентне підсвічування повзунків та бейджів м'яти, холодку і смаків */
#guest-mint {
  accent-color: #34d384;
  --slider-fill-color: #34d384;
  --slider-thumb-color: #34d384;
}

#guest-mint::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(52, 211, 132, 0.28), 0 4px 12px rgba(0, 0, 0, 0.55);
}

#guest-ice {
  accent-color: #7dd3fc;
  --slider-fill-color: #7dd3fc;
  --slider-thumb-color: #e0f2fe;
}

#guest-ice::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(186, 230, 253, 0.34), 0 4px 12px rgba(0, 0, 0, 0.55);
}

#guest-mint-badge.is-mint-active {
  border-color: rgba(52, 211, 132, 0.48);
  background: rgba(52, 211, 132, 0.14);
  color: #86efbc;
}

#guest-ice-badge.is-ice-active {
  border-color: rgba(186, 230, 253, 0.55);
  background: rgba(125, 211, 252, 0.15);
  color: #e0f2fe;
}

.style-tile[aria-pressed="true"] {
  border-color: var(--style-color, var(--accent));
  background: color-mix(in srgb, var(--style-color, var(--accent)) 18%, var(--surface));
  color: var(--style-color, var(--accent));
}

.promo-banner {
  background: linear-gradient(90deg, rgba(92, 22, 4, 0.88), rgba(28, 14, 9, 0.94), rgba(92, 22, 4, 0.88));
  border-bottom: 1px solid rgba(198, 150, 91, 0.28);
  color: #e0ddd3;
}

.promo-banner strong {
  color: #c6965b;
}

.app-header {
  background: rgba(10, 5, 3, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(198, 150, 91, 0.16);
}

.brand-logo {
  background: transparent;
  border: 1px solid rgba(212, 165, 76, 0.45);
  color: #c6965b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.card,
.menu-item-card,
.tier-choice-card,
.kpi-card,
.station-panel-card {
  background: linear-gradient(165deg, rgba(28, 15, 10, 0.86), rgba(11, 6, 4, 0.94));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(198, 150, 91, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 194, 0.07),
    0 14px 34px rgba(0, 0, 0, 0.52);
}

.tier-choice-card:has(input:checked),
.brand-chip.is-active,
.seg-tab.is-active,
.guide-pill.is-active {
  border-color: rgba(232, 74, 11, 0.8);
  background: linear-gradient(155deg, rgba(232, 74, 11, 0.26), rgba(92, 22, 4, 0.38));
  color: #fff6ed;
  box-shadow:
    inset 0 1px 0 rgba(255, 198, 156, 0.16),
    0 6px 20px rgba(232, 74, 11, 0.22);
}

.price-pill {
  background: linear-gradient(145deg, rgba(198, 150, 91, 0.2), rgba(132, 92, 44, 0.14));
  border: 1px solid rgba(198, 150, 91, 0.45);
  color: #f3d7ac;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #ff5d1f, #e84a0b 52%, #b82f06);
  border-color: rgba(255, 156, 102, 0.45);
  color: #fff9f4;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 214, 0.25),
    0 10px 26px rgba(232, 74, 11, 0.36);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff6c33, #f25414 52%, #c9370a);
}

input[type="range"] {
  accent-color: #e84a0b;
}

input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(232, 74, 11, 0.28), 0 4px 12px rgba(0, 0, 0, 0.55);
}

.cocktail-card-media {
  flex: none;
  width: 100%;
  height: 185px;
  border-radius: 14px;
  border: 1px solid rgba(198, 150, 91, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.54);
  overflow: hidden;
  display: block;
}

.cocktail-card-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
}

.cocktail-card-body {
  width: 100%;
}

.cocktail-card .menu-item-top {
  align-items: baseline;
}

.cocktail-card .menu-item-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f4eee4;
}

.cocktail-card .menu-item-footer {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cocktail-card .btn-primary,
.cocktail-card .btn-secondary {
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
}

.app-title {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: 0.08em;
  color: #dfc19e;
  font-weight: 600;
}

@media (max-width: 480px) {
  .cocktail-card-media {
    flex: none;
    width: 100%;
    height: 172px;
  }
}

.bottom-nav,
.guest-cart-bar {
  background: rgba(10, 7, 6, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.55);
}

.guest-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
}

.bottom-nav .nav-item {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #847a73;
  gap: 0.28rem;
  min-height: 48px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.bottom-nav .nav-item[aria-current="page"] {
  border-top: 0;
  background: transparent;
  color: #f4eee4;
  font-weight: 600;
}

.bottom-nav .nav-item[aria-current="page"] .nav-icon {
  color: #e84a0b;
}

.section-title {
  letter-spacing: -0.015em;
  color: #f2ece1;
}

/* ==================== IMAGE LIGHTBOX ==================== */
.cocktail-card-media {
  padding: 0;
  cursor: zoom-in;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.cocktail-card-media:hover {
  transform: scale(1.03);
  border-color: rgba(232, 74, 11, 0.55);
}

.lightbox-dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(94vw, 520px);
  width: 100%;
  margin: auto;
  overflow: visible;
}

.lightbox-dialog::backdrop {
  background: rgba(4, 2, 1, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #180e0a, #0b0604);
  border: 1px solid rgba(198, 150, 91, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
}

.lightbox-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  background: rgba(10, 5, 3, 0.78);
  border: 1px solid rgba(198, 150, 91, 0.35);
  color: #f4eee4;
}

.lightbox-img {
  display: block;
  width: 100%;
  max-height: 62dvh;
  object-fit: cover;
  background: #040201;
}

.lightbox-caption {
  padding: 0.9rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.lightbox-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f2ece1;
}

.lightbox-meta {
  margin: 0;
  font-size: 0.82rem;
  color: #c6965b;
}

.lightbox-desc {
  margin: 0;
  font-size: 0.86rem;
  color: #b7aba3;
  line-height: 1.4;
}

/* ==================== FIGMA 1:1 GUEST SHELL & MENU CARDS ==================== */
#guest-promo-bar,
#guest-quick-guide {
  display: none !important;
}

body:not(.is-staff-mode) .app-header {
  padding: calc(0.55rem + env(safe-area-inset-top)) 1rem 0.55rem;
  background: rgba(6, 4, 3, 0.9);
  border-bottom: 1px solid rgba(198, 150, 91, 0.12);
}

body:not(.is-staff-mode) .header-top {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.36rem;
  min-height: 40px;
}

body:not(.is-staff-mode) .brand-block {
  display: contents;
}

body:not(.is-staff-mode) #guest-header-actions:not([hidden]) {
  display: contents;
}

body:not(.is-staff-mode) #paw-secret-trigger {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(212, 165, 76, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  padding: 0;
}

body:not(.is-staff-mode) #guest-messages-btn {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  width: 36px;
  height: 36px;
  min-inline-size: 36px;
  min-block-size: 36px;
  padding: 0;
  border-radius: 50%;
}

body:not(.is-staff-mode) .brand-block > div {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

body:not(.is-staff-mode) .app-title {
  margin: 0;
  text-align: center;
  font-size: 1.36rem;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: #dfc19e;
  line-height: 1;
  white-space: nowrap;
}

body:not(.is-staff-mode) #header-summary {
  display: none;
}

body:not(.is-staff-mode) #guest-table-btn {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  min-height: 36px;
  height: 36px;
  min-width: 76px;
  max-width: 104px;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(198, 150, 91, 0.28);
  color: #dfc19e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Cart dialog mobile flex/scroll fix */
.dialog-header {
  flex-shrink: 0;
}

.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dialog-body > * {
  flex-shrink: 0;
}

#cart-table-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

#cart-table-chips .brand-chip {
  min-height: 36px;
  padding: 0.34rem 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 10px;
  text-align: center;
  justify-content: center;
  white-space: nowrap;
}

#cart-dialog .cart-items-list {
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
}

#cart-dialog .dialog-footer {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0.5rem;
}

body:not(.is-staff-mode) #guest-view-cocktails .section-head,
body:not(.is-staff-mode) #guest-view-bar .section-head {
  margin-bottom: 0.45rem;
}

#guest-cocktail-cats {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.45rem;
  padding: 0.15rem 0 0.45rem;
  scrollbar-width: none;
}

#guest-cocktail-cats::-webkit-scrollbar {
  display: none;
}

#guest-cocktail-cats .brand-chip {
  flex: 1 0 auto;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cfc6bc;
  text-align: center;
}

#guest-cocktail-cats .brand-chip.is-active {
  background: linear-gradient(135deg, #ff5d1f, #e84a0b);
  border-color: rgba(255, 156, 102, 0.5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(232, 74, 11, 0.42);
}

.menu-item-card.cocktail-card {
  padding: 12px;
  border-radius: 20px;
  gap: 10px;
}

.menu-item-card.cocktail-card .cocktail-card-media {
  height: 158px;
  border-radius: 14px;
  border: 1px solid rgba(198, 150, 91, 0.16);
}

.figma-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.figma-card-info {
  min-width: 0;
  flex: 1;
}

.figma-card-info .menu-item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f4eee4;
  line-height: 1.25;
}

.figma-card-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: #c6965b;
  margin-top: 2px;
}

.figma-card-desc {
  margin: 3px 0 0;
  font-size: 0.74rem;
  color: #8e837c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-order-pill {
  border-radius: 999px !important;
  padding: 0.48rem 1.15rem !important;
  min-height: 36px;
  font-size: 0.84rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff5d1f, #e84a0b);
  border: 1px solid rgba(255, 156, 102, 0.45);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(232, 74, 11, 0.35);
  flex-shrink: 0;
}

/* ==================== GUEST ACCOUNT CARD & DATE INPUT FIX ==================== */
.guest-account-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.guest-account-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.guest-account-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(198, 150, 91, 0.14);
  border: 1px solid rgba(198, 150, 91, 0.32);
  color: #dfc19e;
}

.guest-account-meta {
  min-width: 0;
  flex: 1;
}

.guest-account-meta h3 {
  margin: 0;
  font-size: 1rem;
  color: #f4eee4;
}

.guest-account-meta .muted-text {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

.guest-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.guest-account-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

/* Fix iOS Safari <input type="date"> stretching past card/form edges */
.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-col > *,
.stack-form > *,
.field-label {
  min-width: 0;
  max-width: 100%;
}

input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  color-scheme: dark;
}

@media (max-width: 540px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==================== REMOTE THERMAL PRINTER (PT80UE 80MM LAN) ==================== */
.ticket-print-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.55rem;
  margin-top: 0.2rem;
  border-top: 1px dashed var(--border);
}

.ticket-print-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.ticket-print-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.payment-badge {
  font-weight: 700;
}

.print-dialog-top-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.payment-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 58px;
  padding: 0.5rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.payment-method-btn.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
}

.discount-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.discount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.receipt-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 65%, #000);
  border: 1px solid var(--border);
  max-height: 420px;
  overflow-y: auto;
}

.receipt-preview-paper {
  width: 100%;
  max-width: 310px;
  background: #ffffff;
  border-radius: 6px;
  padding: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.receipt-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.printer-config-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.printer-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.printer-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.printer-setup-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  background: var(--surface-2);
}

.printer-setup-details > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.printer-cmd-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.printer-cmd-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text);
  word-break: break-all;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
}

.print-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

@media (max-width: 540px) {
  .printer-fields-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ticket-print-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .ticket-print-btns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ticket-print-btns .btn {
    justify-content: center;
  }
}

/* ==================== DATE GROUP DIVIDERS FOR RECEIPTS ==================== */
.date-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.55rem;
  margin-bottom: 0.1rem;
  padding: 0.48rem 0.78rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(198, 150, 91, 0.14), rgba(28, 15, 10, 0.55));
  border: 1px solid rgba(198, 150, 91, 0.28);
  border-left: 3px solid var(--accent);
}

.date-group-header:first-child {
  margin-top: 0;
}

.date-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f0d7b8;
}

.date-group-title .svg-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.date-group-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* ==================== COMPACT OWNER PRINTER ENTRY & ACTIONS FIX ==================== */
.printer-compact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.9rem;
}

.printer-compact-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 190px;
}

.printer-compact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border: 1px solid rgba(198, 150, 91, 0.25);
  color: var(--accent);
  flex-shrink: 0;
}

.printer-compact-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.printer-compact-btn {
  flex-shrink: 0;
}

.printer-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.printer-action-grid .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.ticket-header-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ticket-delete-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
}

.booking-callback-check {
  justify-content: flex-start;
  width: 100%;
  padding: 0.6rem 0.8rem;
}

.reservation-call-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.ticket-actions a.btn {
  text-decoration: none;
}

@media (max-width: 420px) {
  .printer-compact-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== v43: MESSAGES, SOUND ALERTS, FREE PWA & WEB PUSH ==================== */
[hidden] {
  display: none !important;
}

.header-bell-btn {
  position: relative;
}

.header-bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5d1f, #e84a0b);
  color: #fff9f4;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(232, 74, 11, 0.55);
  pointer-events: none;
}

.push-status-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(10, 5, 3, 0.9);
  pointer-events: none;
}

.push-status-dot.is-active {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(10, 5, 3, 0.9), 0 0 8px rgba(52, 211, 153, 0.7);
}

.staff-sound-btn.is-sound-on {
  border-color: rgba(198, 150, 91, 0.52);
  background: rgba(198, 150, 91, 0.14);
  color: #f3d7ac;
}

.staff-sound-btn:not(.is-sound-on) {
  opacity: 0.72;
}

.app-promo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
}

.app-promo-strip-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 200px;
}

.app-promo-strip-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.msg-push-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.68rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 150, 91, 0.3);
  background: linear-gradient(155deg, rgba(198, 150, 91, 0.12), rgba(24, 13, 9, 0.72));
}

.msg-push-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 190px;
}

.msg-push-banner-text strong {
  font-size: 0.9rem;
  color: #f4eee4;
}

.msg-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d6ad78;
  margin-top: 0.25rem;
}

.msg-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.78rem 0.88rem;
}

.msg-item-card.is-unread {
  border-color: rgba(232, 74, 11, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 194, 0.1),
    0 8px 24px rgba(232, 74, 11, 0.14);
}

.msg-promo-title {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  color: #f7efe2;
}

.msg-promo-body {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.app-setup-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.78rem 0.88rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 150, 91, 0.24);
  background: rgba(24, 13, 9, 0.62);
}

.app-setup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.install-guide-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.72rem;
  border-radius: 10px;
  border: 1px dashed rgba(198, 150, 91, 0.32);
  background: rgba(10, 5, 3, 0.45);
  font-size: 0.83rem;
}

.install-steps-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  line-height: 1.4;
  color: var(--muted);
}

.install-steps-list strong {
  color: var(--text);
}

.inline-icon {
  vertical-align: -2px;
  color: var(--accent);
}

.owner-broadcast-card {
  margin-bottom: 0.85rem;
}

.owner-announcements-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

.owner-ann-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.owner-ann-content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.owner-ann-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
}

.owner-ann-body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.38;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

@media (max-width: 440px) {
  #staff-header-actions {
    gap: 0.3rem;
  }
  #staff-header-actions .icon-action-btn {
    min-inline-size: 38px;
    min-block-size: 38px;
  }
}

/* ==================== v47: PRECHECK DISCOUNT & CUSTOM HOOKAH ==================== */
.discount-custom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0 0.45rem;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.discount-custom-wrap:focus-within,
.discount-custom-wrap.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent);
}

.discount-custom-wrap input {
  width: 3.1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  padding: 0.15rem 0;
  outline: none;
  box-shadow: none;
}

.print-custom-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 150, 91, 0.28);
  background: rgba(24, 13, 9, 0.56);
}

.print-custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.print-hookah-lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.print-hookah-empty {
  margin: 0;
  font-size: 0.8rem;
}

.print-hookah-line {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.52rem 0.62rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.print-hookah-line.is-custom {
  border-color: rgba(198, 150, 91, 0.48);
  background: linear-gradient(155deg, rgba(198, 150, 91, 0.12), rgba(22, 12, 8, 0.75));
}

.print-hookah-line-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.print-hookah-line-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.print-hookah-line-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.print-hookah-line-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.print-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 5, 3, 0.55);
  overflow: hidden;
}

.print-qty-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.print-qty-btn:hover:not(:disabled) {
  background: rgba(198, 150, 91, 0.18);
  color: var(--accent);
}

.print-qty-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.print-qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.print-inline-price {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.print-price-input {
  width: 5.4rem;
  padding: 0.3rem 0.48rem !important;
  min-height: 32px;
  font-size: 1rem !important;
  font-weight: 700;
  text-align: right;
}

.print-line-sum {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f0d7b8;
}

.print-line-del-btn {
  width: 30px;
  height: 30px;
  min-inline-size: 30px;
  min-block-size: 30px;
  padding: 0;
}

.btn-xs {
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

.print-custom-add-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.45rem;
  padding-top: 0.48rem;
  border-top: 1px dashed rgba(198, 150, 91, 0.26);
}

.print-mini-field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}

.print-mini-field input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.print-custom-add-btn {
  min-height: 36px;
  white-space: nowrap;
}

@media (max-width: 440px) {
  .print-custom-add-row {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }
  .print-custom-add-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
  .discount-custom-wrap input {
    font-size: 1rem;
  }
}

/* ==================== v49: MONOBANK PAYMENT CARD & GUEST RECEIPT PAY ==================== */
.guest-pay-card {
  gap: 0.65rem;
  border-color: rgba(198, 150, 91, 0.36);
  background: linear-gradient(155deg, rgba(198, 150, 91, 0.11), rgba(20, 11, 7, 0.85));
}

.guest-pay-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.guest-pay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.guest-pay-actions.is-compact {
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(198, 150, 91, 0.25);
}

.guest-pay-link-btn {
  text-decoration: none;
  justify-content: center;
}

.guest-card-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.42rem 0.62rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 5, 3, 0.5);
}

.guest-card-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f3e4cf;
}

.guest-pay-note {
  margin: 0;
  font-size: 0.76rem;
}

.cart-discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.printer-action-grid a.btn {
  text-decoration: none;
}

/* ==================== v50: SYMMETRICAL STAFF HEADER, SHIFT BAR, BILL REQUESTS, PS TIMER & ORDER EDITOR ==================== */
body.is-staff-mode .header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 0.65rem;
}

body.is-staff-mode .brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

body.is-staff-mode .brand-block > div {
  min-width: 0;
  flex: 1 1 auto;
}

body.is-staff-mode #staff-role-badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  margin: 0;
}

body.is-staff-mode #staff-header-actions.staff-header-bar {
  grid-column: 1 / -1;
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.45rem;
}

body.is-staff-mode #staff-header-actions.staff-header-bar > *:not([hidden]) {
  flex: 1 1 0;
  min-width: 0;
  min-inline-size: 0;
  min-block-size: 40px;
  height: 40px;
  padding: 0 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  white-space: nowrap;
}

.staff-shift-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  padding: 0.62rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 150, 91, 0.32);
  background: rgba(24, 13, 9, 0.74);
}

.staff-shift-bar.is-on-shift {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.14), rgba(16, 12, 9, 0.82));
}

.staff-shift-info {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
  flex: 1 1 200px;
}

.shift-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.shift-status-dot.is-active {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.24), 0 0 10px rgba(52, 211, 153, 0.6);
}

.staff-shift-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.staff-shift-text strong {
  font-size: 0.88rem;
  color: #f6efe4;
}

.bill-requests-banner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bill-req-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
  padding: 0.68rem 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.16), rgba(26, 14, 9, 0.86));
}

.bill-req-alert.is-card-paid {
  border-color: rgba(52, 211, 153, 0.58);
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.18), rgba(18, 15, 10, 0.88));
}

.bill-req-info {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
  flex: 1 1 190px;
}

.bill-req-info strong {
  font-size: 0.9rem;
  color: #fff6ea;
}

.bill-req-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ticket-bottom-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ticket-bill-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.62rem;
  border-radius: 9px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  font-size: 0.81rem;
  font-weight: 600;
}

.ticket-bill-pill.is-card-paid {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

.ticket-ps-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(168, 85, 247, 0.42);
  background: linear-gradient(155deg, rgba(139, 92, 246, 0.14), rgba(20, 12, 16, 0.78));
}

.ticket-ps-info {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e9d5ff;
}

.ps-timer-modal-box {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: rgba(24, 14, 28, 0.6);
}

.ps-timer-active-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.ps-timer-override-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.staff-add-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.staff-add-catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.staff-add-catalog-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.staff-add-catalog-info strong {
  font-size: 0.84rem;
  color: var(--text);
}

.staff-quick-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.42rem;
}

.three-col-compact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 4.4rem minmax(0, 1fr);
  gap: 0.45rem;
}

.three-col-compact select {
  min-height: 36px;
  padding: 0.32rem 0.45rem;
  font-size: 0.92rem;
}

.staff-edit-current-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(198, 150, 91, 0.3);
}

.guest-bill-status-pill {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.44rem 0.65rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
}

.guest-bill-status-pill.is-requested {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.guest-bill-status-pill.is-verified,
.guest-bill-status-pill.is-paid-sent {
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.13);
  color: #a7f3d0;
}

.guest-bill-btn-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.guest-bill-btn-pair .btn {
  justify-content: center;
  white-space: normal;
  text-align: center;
}

.guest-direct-pay-details {
  border: 1px dashed rgba(198, 150, 91, 0.34);
  border-radius: 10px;
  padding: 0.52rem 0.68rem;
  background: rgba(12, 7, 5, 0.45);
}

.guest-direct-pay-details > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e9c99b;
}

@media (max-width: 540px) {
  .ticket-print-btns > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  body.is-staff-mode #staff-header-actions.staff-header-bar {
    gap: 0.35rem;
  }
  .staff-shift-bar .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== v52: DISTINCT GUEST PAYMENT BUTTON COLORS ==================== */
.guest-pay-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.guest-pay-choice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.guest-pay-choice-btn:active {
  transform: scale(0.985);
}

.guest-pay-choice-btn.is-cash {
  border: 1.5px solid rgba(52, 211, 153, 0.48);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

.guest-pay-choice-btn.is-cash.is-active {
  border-color: #34d399;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ecfdf5;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.34);
}

.guest-pay-choice-btn.is-card {
  border: 1.5px solid rgba(167, 139, 250, 0.5);
  background: rgba(99, 102, 241, 0.14);
  color: #c4b5fd;
}

.guest-pay-choice-btn.is-card.is-active {
  border-color: #a78bfa;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #f5f3ff;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.36);
}

.btn.guest-pay-btn-cash {
  border: 1px solid #34d399;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ecfdf5;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.btn.guest-pay-btn-cash:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857, #059669);
}

.btn.guest-pay-btn-card {
  border: 1px solid #a78bfa;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #f5f3ff;
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.32);
}

.btn.guest-pay-btn-card:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
}




