/* ── HorecaMaxx design system ─────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

:root,
[data-hx-theme="default"] {
  --hx-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hx-primary: #0d9488;
  --hx-primary-dark: #0f766e;
  --hx-primary-light: #ccfbf1;
  --hx-primary-hover-mid: #14b8a6;
  --hx-accent: #f59e0b;
  --hx-accent-dark: #d97706;
  --hx-bg: #eef2f1;
  --hx-surface: #ffffff;
  --hx-surface-muted: #f8fafc;
  --hx-nav-bg: #0f172a;
  --hx-nav-border: rgba(255, 255, 255, 0.06);
  --hx-text: #1e293b;
  --hx-muted: #64748b;
  --hx-border: #e2e8f0;
  --hx-radius: 14px;
  --hx-radius-sm: 10px;
  --hx-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --hx-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --hx-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --hx-transition: 0.2s ease;
  --hx-nav-link-active-bg: rgba(13, 148, 136, 0.35);
  --hx-focus-ring: rgba(13, 148, 136, 0.15);
  --hx-primary-shadow: rgba(13, 148, 136, 0.35);
  --hx-primary-shadow-soft: rgba(13, 148, 136, 0.25);
  --hx-primary-border: rgba(13, 148, 136, 0.25);
  --hx-primary-selected: rgba(13, 148, 136, 0.35);
  --hx-primary-selected-strong: rgba(13, 148, 136, 0.45);
  --hx-primary-tint: rgba(13, 148, 136, 0.12);
  --hx-primary-tint-soft: rgba(13, 148, 136, 0.08);
  --hx-primary-tint-faint: rgba(13, 148, 136, 0.04);
  --hx-login-bg:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(13, 148, 136, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 90%, rgba(245, 158, 11, 0.25) 0%, transparent 50%),
    linear-gradient(155deg, #0f172a 0%, #134e4a 45%, #0f766e 100%);
  --hx-qr-header-end: #1e3a5f;
}

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

body {
  background-color: var(--hx-bg);
  color: var(--hx-text);
  font-family: var(--hx-font);
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */

#appNav.hx-navbar {
  background: var(--hx-nav-bg) !important;
  border-bottom: 1px solid var(--hx-nav-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  min-height: 60px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

#appNav .container-fluid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#appNav .navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#appNav .navbar-brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-accent) 100%);
  flex-shrink: 0;
}

#appNav .navbar-meta {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
  font-weight: 500;
}

#appNav .navbar-nav {
  gap: 0.15rem;
}

#appNav .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: color var(--hx-transition), background var(--hx-transition);
}

#appNav .navbar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#appNav .navbar-nav .nav-link.active {
  color: #fff;
  background: var(--hx-nav-link-active-bg);
}

#appNav .btn-logout {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 0.35rem 0.85rem;
  transition: background var(--hx-transition), border-color var(--hx-transition);
}

#appNav .btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

#mainContent {
  margin-top: 60px;
  padding-bottom: 2.5rem;
  max-width: 1400px;
}

.hx-page {
  padding: 1.75rem 0 1rem;
}

.hx-page-header {
  margin-bottom: 1.75rem;
}

.hx-page-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: var(--hx-text);
}

.hx-page-subtitle {
  color: var(--hx-muted);
  font-size: 0.95rem;
  margin: 0;
}

.hx-badge-venue {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--hx-primary-light);
  color: var(--hx-primary-dark);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.75rem;
}

.hx-badge-venue i {
  font-size: 0.85rem;
}

/* ── Cards (dashboard modules) ──────────────────────────────────────────── */

.hx-module-card {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  overflow: hidden;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), border-color var(--hx-transition);
}

.hx-module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hx-shadow);
  border-color: var(--hx-primary-border);
  color: inherit;
}

.hx-module-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.hx-module-card__icon--pos {
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  color: var(--hx-primary-dark);
}

.hx-module-card__icon--tables {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: var(--hx-accent-dark);
}

.hx-module-card__icon--sections {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #6d28d9;
}

.hx-module-card__icon--menu {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #4338ca;
}

.hx-module-card__icon--users {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #be185d;
}

.hx-module-card__icon--stations {
  background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
  color: #0e7490;
}

.hx-module-card__icon--settings {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
}

.hx-module-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.hx-module-card__desc {
  font-size: 0.85rem;
  color: var(--hx-muted);
  margin: 0;
}

.hx-module-card .card-body {
  padding: 2rem 1.5rem;
  text-align: center;
}

/* ── Login ────────────────────────────────────────────────────────────────── */

.login-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.75rem -0.75rem 0;
  padding: 2.5rem 1.5rem;
  position: relative;
  overflow: hidden;
  background: var(--hx-login-bg);
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--hx-surface);
  border-radius: calc(var(--hx-radius) + 4px);
  box-shadow: var(--hx-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.login-card__header {
  text-align: center;
  padding: 2rem 2rem 0;
}

.login-card__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-accent) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px var(--hx-primary-shadow);
}

.login-card__logo i {
  font-size: 1.6rem;
  color: #fff;
}

.login-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}

.login-card__tagline {
  color: var(--hx-muted);
  font-size: 0.9rem;
  margin: 0;
}

.login-card__body {
  padding: 1.75rem 2rem 2rem;
}

.login-card .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--hx-text);
}

.login-card .form-control {
  border-radius: var(--hx-radius-sm);
  border-color: var(--hx-border);
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color var(--hx-transition), box-shadow var(--hx-transition);
}

.login-card .form-control:focus {
  border-color: var(--hx-primary);
  box-shadow: 0 0 0 3px var(--hx-focus-ring);
}

.login-card .btn-primary {
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border: none;
  border-radius: var(--hx-radius-sm);
  font-weight: 600;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition);
}

.login-card .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--hx-primary-hover-mid) 0%, var(--hx-primary) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--hx-primary-shadow);
}

.login-card .form-text {
  font-size: 0.8rem;
}

/* ── POS ──────────────────────────────────────────────────────────────────── */

body.hx-pos-mode #mainContent {
  max-width: none;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 0.5rem;
}

body.hx-pos-mode .hx-page.pos-page {
  padding: 0.35rem 0 0;
}

.pos-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px);
  min-height: 480px;
}

.pos-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.65rem;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-sm);
}

.pos-header__spacer {
  flex: 1;
  min-width: 0.5rem;
}

.pos-header__tables {
  flex: 1 1 12rem;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.2rem;
  background: var(--hx-surface-muted, #f8fafc);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
}

.pos-header__floor-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex-shrink: 0;
  min-height: 2.75rem;
  min-width: 4.25rem;
  border: 1px solid var(--hx-border);
  background: #fff;
  border-radius: var(--hx-radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--hx-muted);
  text-align: center;
}

.pos-header__floor-btn:hover,
.pos-header__floor-btn.show {
  background: var(--hx-primary-light);
  border-color: var(--hx-primary);
  color: var(--hx-primary-dark);
}

.pos-header__floor-btn.dropdown-toggle::after {
  display: none;
}

.pos-header__floor-label {
  white-space: nowrap;
}

.pos-header__floor-btn .bi {
  font-size: 1.15rem;
  color: var(--hx-primary);
}

.pos-header__table {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  background: var(--hx-surface-muted);
  border-radius: var(--hx-radius-sm);
  padding: 0.4rem 0.85rem 0.4rem 0.55rem;
  font-weight: 700;
  color: var(--hx-text);
  max-width: min(280px, 45vw);
}

.pos-header__table:hover,
.pos-header__table.show {
  background: var(--hx-primary-light);
  color: var(--hx-primary-dark);
}

.pos-header__table-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.pos-header__table-dot--free {
  background: #22c55e;
}

.pos-header__table-dot--busy {
  background: #f97316;
}

.pos-header__table-dot--ready {
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25);
}

.pos-header__table-dot--bill {
  background: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.pos-header__table-dot--reserved {
  background: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.pos-open-tabs {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.4rem;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.1rem 0.15rem 0.1rem 0;
}

.pos-open-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-height: 2.75rem;
  min-width: 4.5rem;
  max-width: 10rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--hx-radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--hx-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-open-tabs__tab:hover {
  background: #fff;
  border-color: var(--hx-border);
}

.pos-open-tabs__tab.is-active {
  border-color: var(--hx-primary);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.pos-open-tabs__tab--more {
  min-width: 3rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  font-weight: 700;
  color: var(--hx-muted);
  border-color: var(--hx-border);
  background: #fff;
}

.pos-open-tabs__tab--more:hover,
.pos-open-tabs__tab--more.show {
  color: var(--hx-primary-dark);
  border-color: var(--hx-primary);
  background: var(--hx-primary-light);
}

.pos-open-tabs__tab--more.dropdown-toggle::after {
  display: none;
}

.pos-open-tabs__overflow {
  flex-shrink: 0;
}

.pos-open-tabs__overflow-menu {
  width: min(320px, calc(100vw - 1.5rem));
  max-height: min(420px, 70vh);
  padding: 0.5rem;
  border-color: var(--hx-border);
  box-shadow: var(--hx-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-open-tabs__overflow-head {
  flex-shrink: 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--hx-border);
  margin-bottom: 0.45rem;
}

.pos-open-tabs__search {
  border-color: var(--hx-border);
}

.pos-open-tabs__overflow-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.pos-open-tabs__overflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: #fff;
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.pos-open-tabs__overflow-row--busy {
  border-left: 3px solid #f97316;
}

.pos-open-tabs__overflow-row--ready {
  border-left: 3px solid #eab308;
  background: #fefce8;
}

.pos-open-tabs__overflow-row--bill {
  border-left: 3px solid #dc3545;
  background: #fef2f2;
}

.pos-open-tabs__overflow-row--reserved {
  border-left: 3px solid #0d6efd;
  background: #eff6ff;
}

.pos-open-tabs__overflow-row.is-active {
  box-shadow: inset 0 0 0 2px var(--hx-primary-selected);
  background: var(--hx-primary-light);
}

.pos-open-tabs__overflow-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.pos-open-tabs__overflow-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-open-tabs__overflow-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.pos-open-tabs__overflow-empty {
  padding: 0.35rem 0.15rem;
}

.pos-open-tabs__status {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #94a3b8;
}

.pos-open-tabs__status--free {
  background: #22c55e;
}

.pos-open-tabs__status--busy {
  background: #f97316;
}

.pos-open-tabs__status--ready {
  background: #eab308;
}

.pos-open-tabs__status--bill {
  background: #dc3545;
}

.pos-open-tabs__status--reserved {
  background: #0d6efd;
}

.pos-open-tabs__name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-open-tabs__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.pos-open-tabs__dot--ready {
  background: #eab308;
}

.pos-open-tabs__dot--bill {
  background: #dc3545;
}

.pos-open-tabs__dot--waiter {
  background: #f97316;
}

.pos-header__table-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}

.pos-header__table-name {
  font-size: 0.95rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pos-header__table-hint {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--hx-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pos-header__ready {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: #fef9c3;
  color: #a16207;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  animation: pos-ready-pulse 2s ease-in-out infinite;
}

@keyframes pos-ready-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(234, 179, 8, 0);
  }
}

.pos-header__pill {
  background: #f1f5f9;
  border-color: var(--hx-border);
  color: var(--hx-muted);
  font-weight: 600;
}

.pos-table-picker__menu {
  width: min(520px, calc(100vw - 1.5rem));
  padding: 0.75rem;
  border-color: var(--hx-border);
  box-shadow: var(--hx-shadow);
}

.pos-table-picker__head {
  margin-bottom: 0.5rem;
}

.pos-floor-sections {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.1rem 0 0.15rem;
}

.pos-floor-sections::-webkit-scrollbar {
  display: none;
}

.pos-floor-section__tab {
  flex: 0 0 auto;
  min-height: 2.75rem;
  min-width: 4.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hx-muted);
  white-space: nowrap;
  touch-action: manipulation;
}

.pos-floor-section__tab:hover {
  border-color: var(--hx-primary);
  color: var(--hx-primary-dark);
}

.pos-floor-section__tab.is-active {
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px var(--hx-primary-shadow-soft);
}

.pos-table-picker__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.5rem;
}

.pos-table-picker__legend-item {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem 0.12rem 1.05rem;
  border-radius: 999px;
  position: relative;
  color: var(--hx-muted);
}

.pos-table-picker__legend-item::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  transform: translateY(-50%);
}

.pos-table-picker__legend-item--free::before {
  background: #22c55e;
}

.pos-table-picker__legend-item--busy::before {
  background: #f97316;
}

.pos-table-picker__legend-item--ready::before {
  background: #eab308;
}

.pos-table-picker__legend-item--bill::before {
  background: #dc3545;
}

.pos-table-picker__legend-item--reserved::before {
  background: #0d6efd;
}

.pos-table-picker__canvas {
  position: relative;
  width: 100%;
  min-height: 160px;
  max-height: min(42vh, 280px);
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    #f8fafc;
  background-size: 16px 16px;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
}

.pos-table-picker__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}

.pos-table-picker__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: #fff;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.pos-table-picker__row--free {
  border-left: 3px solid #22c55e;
}

.pos-table-picker__row--busy {
  border-left: 3px solid #f97316;
}

.pos-table-picker__row--ready {
  border-left: 3px solid #eab308;
  background: #fefce8;
}

.pos-table-picker__row--bill {
  border-left: 3px solid #dc3545;
  background: #fef2f2;
}

.pos-table-picker__row--reserved {
  border-left: 3px solid #0d6efd;
  background: #eff6ff;
}

.pos-table-picker__row.is-active {
  box-shadow: inset 0 0 0 2px var(--hx-primary-selected);
  background: var(--hx-primary-light);
}

.pos-table-picker__row-badge {
  color: #ca8a04;
  font-size: 0.85rem;
}

.pos-table-picker__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pos-table-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--hx-border);
}

.pos-table-picker__chips::before {
  content: "Fără poziție pe plan:";
  width: 100%;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--hx-muted);
}

.pos-floor-table {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  min-width: 0;
  min-height: 0;
}

.pos-floor-table:hover {
  transform: scale(1.04);
  z-index: 2;
}

.pos-floor-table.is-active {
  box-shadow: 0 0 0 3px var(--hx-primary-selected-strong);
  z-index: 3;
}

.pos-floor-table--round {
  border-radius: 50%;
}

.pos-floor-table--rect {
  border-radius: 0.4rem;
}

.pos-floor-table--free {
  border-color: #22c55e;
  background: #f0fdf4;
}

.pos-floor-table--busy {
  border-color: #f97316;
  background: #fff7ed;
}

.pos-floor-table--ready {
  border-color: #eab308;
  background: #fefce8;
  animation: pos-floor-ready 2s ease-in-out infinite;
}

.pos-floor-table--bill {
  border-color: #dc3545;
  background: #fef2f2;
}

.pos-floor-table--call {
  border-color: #e11d48;
  background: #fff1f2;
  animation: pos-floor-call 1.8s ease-in-out infinite;
}

@keyframes pos-floor-call {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
  }
}

.pos-floor-table--reserved {
  border-color: #0d6efd;
  background: #eff6ff;
}

@keyframes pos-floor-ready {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.15);
  }
}

.pos-floor-table__name {
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  pointer-events: none;
}

.pos-floor-table__ready {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.55rem;
  color: #ca8a04;
  pointer-events: none;
}

.pos-floor-chip {
  border: 1px solid var(--hx-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-floor-chip--free {
  border-color: #86efac;
  background: #f0fdf4;
}

.pos-floor-chip--busy {
  border-color: #fdba74;
  background: #fff7ed;
}

.pos-floor-chip--ready {
  border-color: #fde047;
  background: #fefce8;
}

.pos-floor-chip--bill {
  border-color: #fca5a5;
  background: #fef2f2;
}

.pos-floor-chip--reserved {
  border-color: #93c5fd;
  background: #eff6ff;
}

.pos-floor-chip.is-active {
  box-shadow: 0 0 0 2px var(--hx-primary-selected-strong);
}

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

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 1.15fr);
  gap: 0.5rem;
  height: 100%;
}

.pos-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
}

.pos-categories {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.35rem;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.1rem;
}

.pos-category-item {
  flex: 0 0 auto;
}

.pos-categories .btn {
  width: auto;
  min-width: 5.5rem;
  min-height: 2.75rem;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--hx-radius-sm);
  border-width: 2px;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), background var(--hx-transition);
  white-space: nowrap;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
}

.pos-categories .btn:not(.active):hover {
  transform: translateY(-1px);
}

.pos-categories .btn.active {
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--hx-primary-shadow);
}

.pos-catalog {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pos-products-panel {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  padding: 0.75rem;
  box-shadow: var(--hx-shadow-sm);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.5rem;
  align-content: start;
}

.pos-product-item {
  min-width: 0;
}

.pos-product-btn {
  width: 100%;
  min-height: 80px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-border);
  background: var(--hx-surface-muted);
  white-space: pre-line;
  line-height: 1.3;
  padding: 0.65rem 0.5rem;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), border-color var(--hx-transition), background var(--hx-transition);
}

.pos-product-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--hx-shadow-sm);
  border-color: var(--hx-primary-border);
  background: var(--hx-primary-light);
}

.pos-covers-form__hint {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--hx-muted);
  margin-bottom: 0.85rem;
}

.pos-covers-panel {
  background: var(--hx-surface-muted);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  padding: 0.9rem;
}

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

.pos-covers-btn {
  width: 100%;
  aspect-ratio: 1;
  min-height: 3.25rem;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: inherit;
  border-radius: var(--hx-radius-sm);
  border: 2px solid var(--hx-border);
  background: var(--hx-surface);
  color: var(--hx-text);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), border-color var(--hx-transition), background var(--hx-transition), color var(--hx-transition);
}

.pos-covers-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--hx-shadow-sm);
  border-color: var(--hx-primary-selected);
  background: var(--hx-primary-light);
  color: var(--hx-primary-dark);
}

.pos-covers-btn:active {
  transform: translateY(0);
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--hx-primary-shadow);
}

.pos-covers-btn:focus-visible {
  outline: 2px solid var(--hx-primary);
  outline-offset: 2px;
}

.pos-ticket {
  background: var(--hx-surface);
  border-radius: var(--hx-radius);
  padding: 0.75rem;
  box-shadow: var(--hx-shadow-sm);
  border: 1px solid var(--hx-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  min-width: 0;
}

.pos-ticket__head {
  flex-shrink: 0;
  padding-bottom: 0.45rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--hx-border);
}

.pos-ticket__head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.pos-ticket__meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hx-muted);
}

.pos-order-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 0.55rem;
  padding: 0.1rem 0 0.15rem;
}

.pos-order-actions::-webkit-scrollbar {
  display: none;
}

.pos-order-action {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 4.75rem;
  min-height: 3.75rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface-muted);
  color: var(--hx-text);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), border-color var(--hx-transition), background var(--hx-transition), color var(--hx-transition);
}

.pos-order-action i {
  font-size: 1.3rem;
  line-height: 1;
}

.pos-order-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pos-order-action:not(:disabled):hover {
  border-color: var(--hx-primary-selected);
  background: var(--hx-primary-light);
  color: var(--hx-primary-dark);
}

.pos-order-action:not(:disabled):active {
  transform: scale(0.97);
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px var(--hx-primary-shadow-soft);
}

.pos-order-action--danger:not(:disabled) {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.28);
  background: #fef2f2;
}

.pos-order-action--danger:not(:disabled):hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: #fee2e2;
  color: #991b1b;
}

.pos-order-action--danger:not(:disabled):active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.pos-ticket__body {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-ticket__footer {
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--hx-border);
}

.pos-ticket__actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.pos-ticket__actions .btn {
  min-height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
}

.pos-ticket .list-group {
  margin-bottom: 0;
}

.pos-ticket .list-group-item {
  border-color: var(--hx-border);
  font-size: 0.88rem;
  padding: 0.55rem 0;
  background: transparent;
}

.pos-ticket__sections .list-group {
  margin-bottom: 0;
}

.pos-ticket__sections .list-group-item {
  padding: 0.55rem 0.65rem;
  border-color: rgba(15, 23, 42, 0.07);
}

.pos-ticket__sections .list-group-item:last-child {
  border-bottom: none;
}

.pos-ticket__sections {
  flex: 1 1 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  padding: 0.15rem;
  background: var(--hx-surface-muted);
  border-radius: var(--hx-radius-sm);
  border: 1px solid #e2e8f0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.pos-ticket__group {
  border-radius: 8px;
  border: 1px solid var(--hx-ticket-section-border, #cbd5e1);
  border-left: 3px solid var(--hx-ticket-section-accent, #64748b);
  background: var(--hx-ticket-section-bg, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pos-ticket__group + .pos-ticket__group {
  margin-top: 0.35rem;
}

.pos-ticket__group--ordered {
  --hx-ticket-section-accent: #475569;
  --hx-ticket-section-bg: #ffffff;
  --hx-ticket-section-border: #94a3b8;
  --hx-ticket-section-title-bg: #e2e8f0;
  --hx-ticket-section-title-color: #334155;
}

.pos-ticket__group--preparing {
  --hx-ticket-section-accent: #d97706;
  --hx-ticket-section-bg: #fffbeb;
  --hx-ticket-section-border: #fbbf24;
  --hx-ticket-section-title-bg: #fef3c7;
  --hx-ticket-section-title-color: #92400e;
}

.pos-ticket__group--served {
  --hx-ticket-section-accent: #16a34a;
  --hx-ticket-section-bg: #f0fdf4;
  --hx-ticket-section-border: #86efac;
  --hx-ticket-section-title-bg: #dcfce7;
  --hx-ticket-section-title-color: #166534;
}

.pos-ticket__group-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hx-ticket-section-title-color, #334155);
  background: var(--hx-ticket-section-title-bg, #e2e8f0);
  padding: 0.38rem 0.55rem;
  line-height: 1.2;
  border-bottom: 1px solid var(--hx-ticket-section-border, #cbd5e1);
}

.pos-ticket__group-title i {
  font-size: 0.82rem;
  opacity: 0.9;
}

.pos-ticket__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.35rem 0 0;
}

.pos-ticket__total span:last-child {
  color: var(--hx-primary-dark);
}

.pos-ticket .btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: var(--hx-radius-sm);
  font-weight: 600;
  padding: 0.75rem;
  margin-top: 1rem;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition);
}

.pos-ticket .btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.pos-ticket .btn-success:disabled {
  opacity: 0.45;
}

.pos-blocked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}

.pos-blocked__card {
  text-align: center;
  max-width: 400px;
  padding: 2.5rem;
  background: var(--hx-surface);
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-border);
  box-shadow: var(--hx-shadow);
}

.pos-blocked__card i {
  font-size: 3rem;
  color: var(--hx-muted);
  margin-bottom: 1rem;
}

.pos-shift-dropdown .dropdown-toggle::after {
  margin-left: 0.35rem;
}

.pos-ticket__subtotal,
.pos-ticket__discount {
  display: flex;
  justify-content: space-between;
  padding: 0.15rem 0;
}

.pos-covers-btn.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.pos-ticket-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.55rem 0.75rem;
  align-items: center;
  font-size: 0.92rem;
}

.pos-ticket-line__main {
  min-width: 0;
  grid-column: 1 / -1;
}

.pos-ticket-line__name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.25;
}

.pos-ticket-line__note {
  display: block;
  font-size: 0.75rem;
  color: var(--hx-primary-dark);
  font-style: italic;
  margin-top: 0.1rem;
  line-height: 1.25;
}

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

.pos-note-chip.is-selected {
  background: var(--hx-primary-tint);
  border-color: #0d9488;
  color: var(--hx-primary-dark);
}

.pos-ticket-line__badge {
  display: inline-block;
  margin-top: 0.12rem;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.pos-ticket__group--preparing .pos-ticket-line__badge {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.pos-ticket__group--served .pos-ticket-line__badge {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.pos-ticket-line__price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.pos-ticket-line__qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  justify-self: start;
}

.pos-ticket-line__qty .btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  border-width: 2px;
}

.pos-ticket-line__qty .mx-1 {
  min-width: 1.75rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

.pos-ticket-line__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  justify-self: end;
}

.pos-ticket-line__btns {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pos-ticket-line__btns .btn-link {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border-radius: var(--hx-radius-sm);
}

.pos-ticket-line__btns .btn-link:active {
  background: rgba(15, 23, 42, 0.06);
}

.pos-ticket-line__btns .btn-outline-success,
.pos-ticket-line__btns .pos-line-served {
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.pos-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pos-toast {
  background: var(--hx-nav-bg);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--hx-radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--hx-shadow);
}

.pos-toast--ready {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  border-left: 4px solid #86efac;
  max-width: 320px;
}

.pos-ticket-line--ready {
  background: rgba(34, 197, 94, 0.12) !important;
  border-left: 3px solid #22c55e;
}

.pos-ticket-line--ready .pos-ticket-line__badge {
  background: #dcfce7;
  color: #15803d;
}

.pos-split-avail-row,
.pos-split-assigned-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--hx-border);
}

.pos-split-avail-row:last-child,
.pos-split-assigned-row:last-child {
  border-bottom: none;
}

.pos-split-avail__name,
.pos-split-assigned__label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.pos-split-avail__controls,
.pos-split-assigned__controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pos-split-avail__targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.pos-split-qty.pos-ticket-line__qty {
  flex-shrink: 0;
  gap: 0.4rem;
}

.pos-split-qty-value {
  min-width: 2rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hx-text);
  background: var(--hx-surface-muted);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  padding: 0.35rem 0.5rem;
  line-height: 1;
}

.pos-split-qty-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  border-width: 2px;
  border-radius: var(--hx-radius-sm);
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), background var(--hx-transition), border-color var(--hx-transition), color var(--hx-transition);
}

.pos-split-qty-minus {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #b45309;
}

.pos-split-qty-minus:not(:disabled):hover {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.pos-split-qty-minus:not(:disabled):active {
  transform: scale(0.96);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.pos-split-qty-plus {
  border-color: var(--hx-primary);
  background: var(--hx-primary-light);
  color: var(--hx-primary-dark);
}

.pos-split-qty-plus:not(:disabled):hover {
  border-color: var(--hx-primary-dark);
  background: #99f6e4;
  color: #115e59;
}

.pos-split-qty-plus:not(:disabled):active {
  transform: scale(0.96);
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-primary-dark) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px var(--hx-primary-shadow);
}

.pos-split-qty-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pos-split-qty--fixed .pos-split-qty-minus,
.pos-split-qty--fixed .pos-split-qty-plus {
  opacity: 0.35;
}

.pos-split-target-btn {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  font-weight: 700;
  font-size: 0.84rem;
  border-width: 2px;
  border-radius: var(--hx-radius-sm);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), filter var(--hx-transition);
}

.pos-split-target-btn:not(:disabled):hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.pos-split-target-btn:not(:disabled):active {
  transform: scale(0.97);
  filter: brightness(0.96);
}

.pos-split-target-btn--0 {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.pos-split-target-btn--1 {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.pos-split-target-btn--2 {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.pos-split-target-btn--3 {
  background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
}

.pos-split-target-btn--4 {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.pos-split-target-btn--5 {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.pos-split-assigned__release {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border-width: 2px;
  border-radius: var(--hx-radius-sm);
  border-color: #fbbf24;
  background: #fffbeb;
  color: #b45309;
  transition: transform var(--hx-transition), background var(--hx-transition), border-color var(--hx-transition), color var(--hx-transition);
}

.pos-split-assigned__release:hover {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.pos-split-assigned__release:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: transparent;
  color: #fff;
}

.pos-pay-wizard__steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--hx-border);
}

.pos-pay-wizard__step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hx-muted);
  padding: 0.45rem 0.5rem;
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface-muted);
  border: 1px solid var(--hx-border);
}

.pos-pay-wizard__step.is-active {
  color: var(--hx-primary-dark);
  background: var(--hx-primary-light);
  border-color: var(--hx-primary-border);
}

.pos-pay-wizard__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.08);
}

.pos-pay-wizard__step.is-active .pos-pay-wizard__step-num {
  background: var(--hx-primary);
  color: #fff;
}

.pos-pay-pane__hint {
  font-size: 0.88rem;
  color: var(--hx-muted);
  margin-bottom: 0.85rem;
}

.pos-pay-split-summary {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface-muted);
  border: 1px solid var(--hx-border);
}

.pos-pay-split-summary__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pos-pay-split-summary__chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.pos-pay-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pos-pay-target-btn {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  font-weight: 700;
  font-size: 0.84rem;
  border-width: 2px;
  border-radius: var(--hx-radius-sm);
  color: #fff;
  border-color: transparent;
  opacity: 0.72;
  transition: transform var(--hx-transition), box-shadow var(--hx-transition), opacity var(--hx-transition);
}

.pos-pay-target-btn.is-active {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 4px 14px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.pos-pay-target-btn:not(.is-active):hover {
  opacity: 0.9;
}

.pos-pay-change-modal .modal-footer {
  border-top: none;
  padding-top: 0;
  justify-content: center;
}

.pos-pay-change-modal .modal-footer .btn {
  max-width: 20rem;
  font-weight: 700;
  min-height: 52px;
}

.pos-pay-change {
  text-align: center;
  padding: 0.5rem 0.25rem 0.25rem;
}

.pos-pay-change__icon {
  font-size: 2.75rem;
  color: #15803d;
  margin-bottom: 0.65rem;
  line-height: 1;
}

.pos-pay-change__label {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hx-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pos-pay-change__amount {
  font-size: clamp(2.75rem, 12vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #15803d;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.15rem;
}

.pos-pay-change__currency {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pos-pay-change__meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hx-muted);
  padding: 0.65rem 0.85rem;
  background: var(--hx-surface-muted);
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-border);
}

.hx-shift-active {
  border: 1px solid var(--hx-primary-border);
  border-radius: var(--hx-radius);
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
}

.hx-module-card__icon--shifts {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
}

.hx-module-card__icon--reports {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1d4ed8;
}

.hx-status-badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.hx-status-badge--info {
  background: #dbeafe;
  color: #1e40af;
}

.hx-status-badge--accent {
  background: #ffedd5;
  color: #c2410c;
}

.hx-report-filters {
  padding: 1rem 1.25rem;
}

.hx-report-kpi {
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  box-shadow: var(--hx-shadow-sm);
}

.hx-report-kpi__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hx-muted);
  margin-bottom: 0.35rem;
}

.hx-report-kpi__value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hx-report-row-link {
  cursor: pointer;
}

.hx-report-row-link:hover {
  background: var(--hx-surface-muted);
}

.hx-report-analytics .hx-report-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5.5rem;
}

.hx-report-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hx-border);
}

.hx-report-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hx-report-nav__link {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hx-muted);
  background: var(--hx-surface-muted);
  border: 1px solid var(--hx-border);
  border-radius: 999px;
  text-decoration: none;
}

.hx-report-nav__link:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.hx-report-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.hx-report-bar-label {
  width: 3.5rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hx-muted);
}

.hx-report-bar-track {
  flex: 1;
  height: 1.1rem;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.hx-report-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 4px;
  min-width: 2px;
}

.hx-report-bar-value {
  width: 7rem;
  flex-shrink: 0;
  font-size: 0.78rem;
  text-align: right;
  color: var(--hx-muted);
}

/* ── Admin ────────────────────────────────────────────────────────────────── */

.hx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.hx-toolbar--compact {
  margin-bottom: 1rem;
  align-items: center;
}

.hx-admin-tabs {
  border-bottom-color: var(--hx-border);
  margin-bottom: 0;
}

.hx-admin-tabs .nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--hx-muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.65rem 1rem;
}

.hx-admin-tabs .nav-link.active {
  color: var(--hx-primary-dark);
  background: transparent;
  border-bottom-color: var(--hx-primary);
}

.hx-admin-tab-content {
  padding-top: 1.25rem;
}

/* ── Plan sală (layout editor) ─────────────────────────────────────────────── */
.hx-layout-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}

.hx-layout-save-overlay__card {
  width: min(100%, 22rem);
  padding: 1.35rem 1.5rem;
  text-align: center;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow);
}

.hx-layout-save-overlay__spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.85rem;
}

.hx-layout-save-overlay__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--hx-text);
}

.hx-layout-save-overlay__progress {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--hx-primary-dark);
}

.hx-layout-save-overlay__bar {
  height: 0.45rem;
  margin-bottom: 0.85rem;
}

.hx-layout-save-overlay__hint {
  font-size: 0.78rem;
  color: var(--hx-muted);
  line-height: 1.35;
}

.hx-admin-tabs .nav-link.disabled {
  pointer-events: none;
  opacity: 0.55;
}

body.hx-layout-saving {
  overflow: hidden;
}

.hx-hall-layout__workspace {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.hx-hall-layout__canvas-wrap {
  flex: 1;
  min-width: 0;
}

.hx-hall-layout__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  max-height: min(70vh, 640px);
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    #f8fafc;
  background-size: 20px 20px;
  border: 2px dashed var(--hx-border);
  border-radius: var(--hx-radius);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.hx-hall-layout__table {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 2px solid #94a3b8;
  background: #fff;
  color: var(--hx-text);
  box-shadow: var(--hx-shadow-sm);
  cursor: grab;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  z-index: 1;
}

.hx-hall-layout__table:hover {
  border-color: var(--hx-primary);
  box-shadow: var(--hx-shadow);
}

.hx-hall-layout__table.is-selected {
  border-color: var(--hx-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  z-index: 2;
}

.hx-hall-layout__table.is-dragging {
  cursor: grabbing;
  opacity: 0.92;
  z-index: 3;
}

.hx-hall-layout__table--round {
  border-radius: 50%;
}

.hx-hall-layout__table--rect {
  border-radius: 0.5rem;
}

.hx-hall-layout__table-name {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hx-hall-layout__table-seats {
  font-size: 0.62rem;
  color: var(--hx-muted);
  line-height: 1;
}

.hx-hall-layout__sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  padding: 0.85rem;
  box-shadow: var(--hx-shadow-sm);
}

.hx-hall-layout__sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hx-muted);
  margin: 0 0 0.5rem;
}

.hx-hall-layout__unplaced {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
}

.hx-hall-layout__chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  border: 1px solid var(--hx-border);
  background: #fff;
  border-radius: 0.45rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.hx-hall-layout__chip:hover {
  border-color: var(--hx-primary);
  background: #eff6ff;
}

.hx-hall-layout__chip-meta {
  font-size: 0.7rem;
  color: var(--hx-muted);
}

.hx-hall-layout__props {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hx-border);
}

.hx-hall-layout__props .form-label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.hx-hall-layout__status {
  font-size: 0.8rem;
  color: var(--hx-muted);
}

.hx-hall-layout__status.is-dirty {
  color: #b45309;
  font-weight: 600;
}

.hx-hall-layout__status.is-ok {
  color: #166534;
}

@media (max-width: 900px) {
  .hx-hall-layout__workspace {
    flex-direction: column;
  }

  .hx-hall-layout__sidebar {
    width: 100%;
  }
}

.hx-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.hx-status-badge--ok {
  background: #dcfce7;
  color: #166534;
}

.hx-status-badge--off {
  background: #f1f5f9;
  color: var(--hx-muted);
}

.hx-row-actions .btn {
  padding: 0.25rem 0.45rem;
}

.hx-qr-token {
  max-width: 140px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.hx-color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--hx-border);
  vertical-align: middle;
  margin-right: 0.25rem;
}

.hx-data-card {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-sm);
  overflow: hidden;
}

.hx-data-card .table {
  margin: 0;
  font-size: 0.9rem;
}

.hx-data-card .table thead th {
  background: var(--hx-surface-muted);
  border-bottom: 2px solid var(--hx-border);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hx-muted);
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.hx-data-card .table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: var(--hx-border);
}

.hx-data-card .table tbody tr:hover {
  background: var(--hx-primary-tint-faint);
}

.hx-data-card .table code {
  background: #f1f5f9;
  color: var(--hx-primary-dark);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
}

.hx-table-paging-cell {
  border-top: 1px solid var(--hx-border);
  background: var(--hx-surface-muted, #f8fafc);
  padding: 0.65rem 0.85rem !important;
}

.hx-table-paging {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.hx-table-paging .pages .btn.active {
  background: var(--hx-primary);
  border-color: var(--hx-primary);
  color: #fff;
}

.hx-table-paging__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hx-table-paging .pagesize {
  width: auto;
  min-width: 4.25rem;
  display: inline-block;
}

/* ── 404 & misc ───────────────────────────────────────────────────────────── */

.hx-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}

.hx-empty-state__icon {
  font-size: 3rem;
  color: var(--hx-border);
  margin-bottom: 1rem;
}

.hx-empty-state h1 {
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.hx-empty-state a {
  color: var(--hx-primary);
  font-weight: 600;
  text-decoration: none;
}

.hx-empty-state a:hover {
  color: var(--hx-primary-dark);
  text-decoration: underline;
}

/* Bootstrap overrides */
.btn-primary {
  --bs-btn-bg: var(--hx-primary);
  --bs-btn-border-color: var(--hx-primary);
  --bs-btn-hover-bg: var(--hx-primary-dark);
  --bs-btn-hover-border-color: var(--hx-primary-dark);
}

.modal-content {
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-border);
  box-shadow: var(--hx-shadow-lg);
}

.modal-header {
  border-bottom-color: var(--hx-border);
  background: var(--hx-surface-muted);
}

.modal-title {
  font-weight: 700;
}

.modal-footer {
  border-top-color: var(--hx-border);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (min-width: 1200px) {
  .pos-layout {
    grid-template-columns: minmax(0, 1fr) minmax(440px, 1.2fr);
  }
}

@media (max-width: 991px) {
  .pos-shell {
    height: auto;
    min-height: calc(100vh - 68px);
  }

  .pos-header__tables {
    flex: 1 1 100%;
  }

  .pos-header__floor-btn {
    min-height: 3rem;
    min-width: 4.5rem;
  }

  .pos-open-tabs__tab {
    min-height: 3rem;
    padding: 0.5rem 0.95rem;
    font-size: 0.98rem;
    max-width: 11rem;
  }

  .pos-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
  }

  .pos-main {
    order: 1;
    min-height: 32vh;
  }

  .pos-categories {
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  .pos-ticket {
    height: auto;
    max-height: min(52vh, 560px);
    order: 2;
    min-height: 36vh;
  }

  .pos-ticket__sections {
    min-height: 10rem;
  }

  .pos-ticket-line__qty .btn,
  .pos-ticket-line__btns .btn-link {
    min-width: 48px;
    min-height: 48px;
  }

  .pos-order-action {
    min-width: 5.25rem;
    min-height: 4.25rem;
    font-size: 0.72rem;
  }

  .pos-order-action i {
    font-size: 1.45rem;
  }
}

@media (max-width: 767px) {
  .hx-page-title {
    font-size: 1.35rem;
  }

  #appNav .navbar-meta {
    display: none !important;
  }
}

/* ── KDS (Kitchen Display System) ─────────────────────────────────────────── */

body.hx-kds-mode #mainContent {
  padding: 0;
  max-width: none;
}

body.hx-kds-mode {
  background: #0f172a;
  overflow: hidden;
}

.kds-setup {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.kds-setup__card {
  width: 100%;
  max-width: 480px;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-lg);
  padding: 2rem;
  text-align: center;
}

.kds-setup__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hx-primary) 0%, var(--hx-accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.kds-setup__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.kds-setup__subtitle {
  color: var(--hx-muted);
  margin-bottom: 1.5rem;
}

.kds-setup__stations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.kds-setup__station-btn {
  min-height: 56px;
  font-weight: 600;
}

.kds-setup__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #f8fafc;
}

.kds-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.kds-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.kds-header__brand > i {
  font-size: 1.5rem;
  color: var(--hx-accent);
}

.kds-header__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.kds-header__subtitle {
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.55);
}

.kds-header__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.75);
}

.kds-header__clock {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.kds-header__sync {
  opacity: 0.6;
}

.kds-header__sync--spin i {
  animation: kds-spin 0.8s linear infinite;
}

@keyframes kds-spin {
  to {
    transform: rotate(360deg);
  }
}

.kds-header__actions {
  display: flex;
  gap: 0.35rem;
}

.kds-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.kds-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.kds-column:last-child {
  border-right: none;
}

.kds-column__title {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.7);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.kds-column--ready .kds-column__title {
  color: #86efac;
}

.kds-column__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
}

.kds-column--ready .kds-column__count {
  background: rgba(34, 197, 94, 0.25);
}

.kds-board {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-content: start;
}

.kds-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(248, 250, 252, 0.45);
}

.kds-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
  color: var(--hx-primary);
}

.kds-card {
  background: var(--hx-surface-muted);
  color: var(--hx-text);
  border-radius: var(--hx-radius);
  border: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: kds-card-in 0.25s ease;
}

@keyframes kds-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.kds-card--warn {
  border-color: var(--hx-accent);
  background: #fffbeb;
}

.kds-card--late {
  border-color: #ef4444;
  background: #fef2f2;
  animation: kds-pulse 2s ease-in-out infinite;
}

.kds-card--done {
  border-color: #22c55e;
  background: #f0fdf4;
}

.kds-card__foot--hint {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--hx-border);
  font-size: 0.78rem;
  font-weight: 600;
  color: #15803d;
  text-align: center;
}

@keyframes kds-pulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
  }
  50% {
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.45);
  }
}

.kds-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hx-border);
  background: rgba(15, 23, 42, 0.04);
}

.kds-card__table {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kds-card__order {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hx-muted);
  letter-spacing: 0;
}

.kds-card--late .kds-card__table {
  color: #dc2626;
}

.kds-card__timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hx-muted);
}

.kds-card--warn .kds-card__timer {
  color: var(--hx-accent-dark);
}

.kds-card--late .kds-card__timer {
  color: #dc2626;
}

.kds-card__lines {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex: 1;
}

.kds-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem 0.65rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--hx-border);
  cursor: pointer;
  transition: background var(--hx-transition);
}

.kds-line:last-child {
  border-bottom: none;
}

.kds-line:hover {
  background: var(--hx-primary-tint-soft);
}

.kds-line--preparing {
  background: rgba(245, 158, 11, 0.12);
}

.kds-line__qty {
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 2rem;
}

.kds-line__name {
  font-weight: 600;
  font-size: 1rem;
}

.kds-line__note {
  grid-column: 2 / -1;
  font-size: 0.8rem;
  color: var(--hx-muted);
  font-style: italic;
}

.kds-line__status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hx-muted);
  align-self: center;
}

.kds-line--sent .kds-line__status {
  color: var(--hx-primary-dark);
}

.kds-line--preparing .kds-line__status {
  color: var(--hx-accent-dark);
}

.kds-line--ready {
  background: rgba(34, 197, 94, 0.1);
}

.kds-line--ready .kds-line__status {
  color: #15803d;
}

.kds-line--readonly {
  cursor: default;
}

.kds-line--readonly:hover {
  background: rgba(34, 197, 94, 0.1);
}

.kds-card__foot {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--hx-border);
}

.kds-card__ready {
  width: 100%;
  font-weight: 600;
  min-height: 44px;
}

/* ── Meniu client (QR) ────────────────────────────────────────────────────── */

body.hx-qr-mode #appNav {
  display: none !important;
}

body.hx-qr-mode #mainContent {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 !important;
  min-height: 100vh;
}

.hx-qr {
  min-height: 100vh;
  background: var(--hx-bg);
  display: flex;
  flex-direction: column;
}

.hx-qr__header {
  background: linear-gradient(135deg, var(--hx-nav-bg) 0%, var(--hx-qr-header-end) 100%);
  color: #fff;
  padding: 1.25rem 1rem 1rem;
}

.hx-qr__header--sticky {
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--hx-shadow);
}

.hx-qr__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hx-qr__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hx-qr__brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.hx-qr__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.hx-qr__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.hx-qr__header-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.hx-qr__body {
  flex: 1;
  padding: 1rem;
  padding-bottom: 6rem;
}

.hx-qr__body--menu {
  padding-top: 0.75rem;
}

.hx-qr-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 0.85rem;
  margin: 0 -0.25rem;
  scrollbar-width: none;
}

.hx-qr-categories::-webkit-scrollbar {
  display: none;
}

.hx-qr-cat-btn {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--hx-transition);
}

.hx-qr-cat-btn.active,
.hx-qr-cat-btn:hover {
  background: var(--hx-primary);
  color: #fff;
}

.hx-qr-table-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hx-qr-table-group__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hx-muted);
  margin: 0 0 0.75rem;
}

.hx-qr-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hx-qr-table-card {
  border: none;
  background: var(--hx-surface);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-sm);
  padding: 1rem;
  text-align: left;
  transition: var(--hx-transition);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 110px;
}

.hx-qr-table-card:hover,
.hx-qr-table-card:focus {
  transform: translateY(-2px);
  box-shadow: var(--hx-shadow);
  outline: none;
}

.hx-qr-table-card__icon {
  color: var(--hx-primary);
  font-size: 1.25rem;
}

.hx-qr-table-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--hx-text);
}

.hx-qr-table-card__meta {
  font-size: 0.8rem;
  color: var(--hx-muted);
}

.hx-qr-products {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hx-qr-product-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  background: var(--hx-surface);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-sm);
  overflow: hidden;
}

.hx-qr-product-card__media {
  background: var(--hx-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hx-primary-dark);
  font-size: 1.5rem;
  min-height: 88px;
}

.hx-qr-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hx-qr-product-card__body {
  padding: 0.75rem 0.75rem 0.75rem 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hx-qr-product-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.hx-qr-product-card__desc {
  font-size: 0.8rem;
  color: var(--hx-muted);
  margin: 0.2rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hx-qr-product-card__allergens {
  font-size: 0.72rem;
  color: var(--hx-accent-dark);
  margin-top: 0.25rem;
}

.hx-qr-product-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hx-qr-product-card__price {
  font-weight: 700;
  color: var(--hx-primary-dark);
}

.hx-qr-product-card__add {
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hx-qr-cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent 0%, var(--hx-bg) 30%);
  z-index: 1030;
}

.hx-qr-cart-bar__btn {
  width: 100%;
  border: none;
  border-radius: var(--hx-radius);
  background: var(--hx-nav-bg);
  color: #fff;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  box-shadow: var(--hx-shadow-lg);
}

.hx-qr-cart-bar__count {
  background: var(--hx-primary);
  border-radius: 999px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.hx-qr-cart-bar__label {
  flex: 1;
  text-align: left;
}

.hx-qr-cart-bar__total {
  font-weight: 700;
}

.hx-qr-cart-panel {
  --bs-offcanvas-height: min(92vh, 720px);
  height: min(92vh, 720px) !important;
  max-height: min(92vh, 720px);
  border-radius: var(--hx-radius) var(--hx-radius) 0 0;
}

.hx-qr-cart-panel__body {
  overflow: hidden;
  min-height: 0;
  padding: 0.75rem 1rem 0;
}

.hx-qr-cart-panel__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.hx-qr-cart-panel__footer {
  flex-shrink: 0;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hx-border);
  background: var(--hx-bg);
}

.hx-qr-cart-panel__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  padding-top: 0;
  border-top: none;
}

.hx-qr-cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hx-qr-cart-line__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hx-qr-cart-line__note {
  display: block;
  font-size: 0.78rem;
  color: #0d9488;
  font-style: italic;
  margin-top: 0.1rem;
  line-height: 1.25;
}

.hx-qr-cart-line__info {
  flex: 1;
  min-width: 0;
}

.hx-qr-cart-line__name {
  display: block;
}

.hx-qr-cart-line__price {
  font-size: 0.85rem;
  color: var(--hx-muted);
}

.hx-qr-success-icon {
  font-size: 3rem;
  color: var(--hx-primary);
}

/* Modal preferințe — bottom sheet pe mobil (meniu QR) */
body.hx-qr-mode .modal.hx-qr-note-modal {
  z-index: 1060;
}

.modal.hx-qr-note-modal .modal-dialog {
  margin: 0.75rem auto;
  max-width: calc(100% - 1.5rem);
}

@media (max-width: 576px) {
  .modal.hx-qr-note-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    max-height: min(88vh, 560px);
  }

  .modal.hx-qr-note-modal .modal-content {
    border-radius: 1rem 1rem 0 0;
    max-height: min(88vh, 560px);
    display: flex;
    flex-direction: column;
  }

  .modal.hx-qr-note-modal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
  }

  .modal.hx-qr-note-modal .modal-footer {
    flex-shrink: 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}

.pos-ticket-line__badge--qr {
  background: rgba(245, 158, 11, 0.15);
  color: var(--hx-accent-dark);
}

@media (max-width: 575px) {
  .kds-setup__stations {
    grid-template-columns: 1fr;
  }

  .kds-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .kds-column {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .kds-board {
    grid-template-columns: 1fr;
  }

  .kds-header__meta .kds-header__count {
    display: none;
  }
}

/* ── Theme picker (Setări) ─────────────────────────────────────────────────── */

.hx-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.hx-theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 2px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  cursor: pointer;
  transition: border-color var(--hx-transition), box-shadow var(--hx-transition);
}

.hx-theme-option:hover {
  border-color: var(--hx-primary-border);
}

.hx-theme-option--active {
  border-color: var(--hx-primary);
  box-shadow: 0 0 0 3px var(--hx-focus-ring);
}

.hx-theme-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hx-theme-option__preview {
  display: flex;
  gap: 0.35rem;
}

.hx-theme-swatch {
  flex: 1;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hx-theme-option__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--hx-text);
}

.hx-theme-option__desc {
  font-size: 0.75rem;
  color: var(--hx-muted);
  line-height: 1.35;
}

/* ── Chelner (POS mobil) ───────────────────────────────────────────────────── */

body.hx-waiter-mode #appNav {
  display: none !important;
}

body.hx-waiter-mode #mainContent {
  max-width: none;
  padding: 0;
}

.waiter-login {
  min-height: calc(100dvh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.waiter-login__card {
  width: min(100%, 22rem);
  padding: 1.5rem;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow);
}

.waiter-login__brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.waiter-login__logo {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--hx-primary);
  color: #fff;
  font-size: 1.35rem;
}

.waiter-login__title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.waiter-login__venue {
  font-size: 0.85rem;
  color: var(--hx-muted);
  margin: 0.25rem 0 0;
}

.waiter-login__hint {
  font-size: 0.85rem;
  color: var(--hx-muted);
  text-align: center;
  margin-bottom: 0.75rem;
}

.waiter-login__staff {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.waiter-login__staff-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.5rem;
  border: 2px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  cursor: pointer;
  transition: border-color var(--hx-transition), background var(--hx-transition);
}

.waiter-login__staff-btn:hover {
  border-color: var(--hx-primary);
  background: var(--hx-surface-muted, #f8fafc);
}

.waiter-login__staff-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--hx-primary-muted, #ccfbf1);
  color: var(--hx-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.waiter-login__staff-name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
}

.waiter-login__staff-role {
  font-size: 0.72rem;
  color: var(--hx-muted);
}

.waiter-login__pin-dots {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.waiter-login__pin-dots span {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid var(--hx-border);
  background: transparent;
}

.waiter-login__pin-dots span.is-filled {
  background: var(--hx-primary);
  border-color: var(--hx-primary);
}

.waiter-login__keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.waiter-login__key {
  min-height: 3rem;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.waiter-login__key:active {
  background: var(--hx-surface-muted, #f1f5f9);
}

.waiter-login__key--enter:not(:disabled) {
  background: var(--hx-primary);
  border-color: var(--hx-primary);
  color: #fff;
}

.waiter-login__key:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.waiter-login__footer {
  text-align: center;
  margin-top: 1.25rem;
}

.waiter-app {
  min-height: 100dvh;
}

.waiter-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.waiter-blocked {
  min-height: 80dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.waiter-blocked__card {
  text-align: center;
  max-width: 22rem;
}

.waiter-blocked__card > i {
  font-size: 2.5rem;
  color: var(--hx-muted);
  margin-bottom: 0.75rem;
}

.waiter-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.4rem;
  background: var(--hx-surface);
  border-bottom: 1px solid var(--hx-border);
}

.waiter-header__brand {
  flex: 1;
  min-width: 0;
}

.waiter-header__title {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
}

.waiter-header__meta {
  display: block;
  font-size: 0.75rem;
  color: var(--hx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waiter-header__ready {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 0.85rem;
}

.waiter-floor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.waiter-floor-sections {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  padding: 0.35rem 0.4rem;
  overflow-x: auto;
}

.waiter-floor-section__tab {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--hx-border);
  border-radius: 999px;
  background: var(--hx-surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.waiter-floor-section__tab.is-active {
  background: var(--hx-primary);
  border-color: var(--hx-primary);
  color: #fff;
}

.waiter-floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0 0.4rem 0.35rem;
  font-size: 0.62rem;
  color: var(--hx-muted);
}

.waiter-floor-legend__item::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.waiter-floor-legend__item--free::before { background: #22c55e; }
.waiter-floor-legend__item--busy::before { background: #f97316; }
.waiter-floor-legend__item--ready::before { background: #eab308; }
.waiter-floor-legend__item--bill::before { background: #dc3545; }
.waiter-floor-legend__item--call::before { background: #e11d48; }

.waiter-floor-canvas {
  position: relative;
  flex: 1;
  margin: 0 0.4rem;
  min-height: 12rem;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    #f8fafc;
  background-size: 20px 20px;
  border: 2px dashed var(--hx-border);
  border-radius: var(--hx-radius);
  overflow: hidden;
}

.waiter-floor-list {
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.waiter-floor-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  font-weight: 600;
  text-align: left;
}

.waiter-floor-list__row--busy { border-color: #f97316; }
.waiter-floor-list__row--ready { border-color: #eab308; }
.waiter-floor-list__row--bill { border-color: #dc3545; }
.waiter-floor-list__row--call { border-color: #e11d48; }

.waiter-floor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem 0.4rem 0.45rem;
}

.waiter-order {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--hx-bg, #f1f5f9);
}

.waiter-order-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.4rem;
  background: var(--hx-surface);
  border-bottom: 1px solid var(--hx-border);
}

.waiter-order-header__back {
  font-size: 1.35rem;
  color: var(--hx-text);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
}

.waiter-order-header__info {
  flex: 1;
  min-width: 0;
}

.waiter-order-header__title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
}

.waiter-order-header__meta {
  font-size: 0.75rem;
  color: var(--hx-muted);
  margin: 0;
}

.waiter-order-header__status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.waiter-order-header__status--call {
  background: #ffe4e6;
  color: #be123c;
}

.waiter-order-header__status--bill {
  background: #fee2e2;
  color: #b91c1c;
}

.waiter-order-header__status--ready {
  background: #fef9c3;
  color: #a16207;
}

.waiter-order-ticket {
  flex-shrink: 0;
  max-height: min(44vh, 16.5rem);
  overflow-y: auto;
  margin: 0.3rem 0.4rem 0;
  background: var(--hx-surface-muted, #f1f5f9);
  border: 1px solid var(--hx-border);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.waiter-ticket__sections {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.3rem;
}

.waiter-ticket__group {
  border-radius: 6px;
  border: 1px solid var(--hx-waiter-section-border, #cbd5e1);
  border-left: 3px solid var(--hx-waiter-section-accent, #64748b);
  background: var(--hx-waiter-section-bg, #fff);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.waiter-ticket__group--ordered {
  --hx-waiter-section-accent: #475569;
  --hx-waiter-section-bg: #ffffff;
  --hx-waiter-section-border: #94a3b8;
  --hx-waiter-section-title-bg: #e2e8f0;
  --hx-waiter-section-title-color: #334155;
}

.waiter-ticket__group--preparing {
  --hx-waiter-section-accent: #d97706;
  --hx-waiter-section-bg: #fffbeb;
  --hx-waiter-section-border: #fbbf24;
  --hx-waiter-section-title-bg: #fef3c7;
  --hx-waiter-section-title-color: #92400e;
}

.waiter-ticket__group--served {
  --hx-waiter-section-accent: #16a34a;
  --hx-waiter-section-bg: #f0fdf4;
  --hx-waiter-section-border: #86efac;
  --hx-waiter-section-title-bg: #dcfce7;
  --hx-waiter-section-title-color: #166534;
}

.waiter-ticket__group-title {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hx-waiter-section-title-color, #334155);
  background: var(--hx-waiter-section-title-bg, #e2e8f0);
  padding: 0.3rem 0.45rem;
  line-height: 1.2;
  border-bottom: 1px solid var(--hx-waiter-section-border, #cbd5e1);
}

.waiter-ticket__group-title i {
  font-size: 0.75rem;
  opacity: 0.92;
}

.waiter-ticket__group-count {
  margin-left: auto;
  min-width: 1.15rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  background: rgba(15, 23, 42, 0.1);
  color: inherit;
}

.waiter-ticket__group .list-group {
  background: transparent;
}

.waiter-ticket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.15rem 0.3rem;
  align-items: center;
  padding: 0.32rem 0.4rem !important;
  font-size: 0.78rem;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.waiter-ticket__group .list-group-item:last-child {
  border-bottom: none !important;
}

.waiter-ticket-line--ready {
  background: rgba(234, 179, 8, 0.14) !important;
}

.waiter-ticket-line--muted {
  opacity: 0.72;
}

.waiter-ticket-line__main {
  min-width: 0;
}

.waiter-ticket-line__name {
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
  display: block;
}

.waiter-ticket-line__note {
  display: block;
  font-size: 0.66rem;
  color: var(--hx-muted);
  font-style: italic;
  line-height: 1.2;
  margin-top: 0.05rem;
}

.waiter-ticket-line__badge {
  display: inline-block;
  margin-top: 0.12rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.05rem 0.28rem;
  border-radius: 3px;
  background: rgba(71, 85, 105, 0.12);
  color: #475569;
}

.waiter-ticket__group--preparing .waiter-ticket-line__badge {
  background: rgba(217, 119, 6, 0.16);
  color: #92400e;
}

.waiter-ticket__group--served .waiter-ticket-line__badge {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.waiter-ticket-line__badge--qr {
  color: var(--hx-primary-dark);
  background: rgba(13, 148, 136, 0.14);
}

.waiter-ticket-line__qty {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.waiter-ticket-line__qty .btn {
  min-width: 1.45rem;
  padding: 0 0.25rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.waiter-ticket-line__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  white-space: nowrap;
}

.waiter-ticket-line__actions .btn-outline-success {
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  line-height: 1.2;
}

.waiter-ticket-line__price {
  font-weight: 700;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.waiter-ticket__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.45rem;
  font-weight: 800;
  font-size: 0.88rem;
  background: var(--hx-surface);
  border-top: 1px solid var(--hx-border);
  position: sticky;
  bottom: 0;
}

.waiter-ticket__total span:last-child {
  color: var(--hx-primary-dark);
  font-variant-numeric: tabular-nums;
}

.waiter-order-catalog {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0.3rem 0.4rem;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: 8px;
  overflow: hidden;
}

.waiter-order-catalog--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.waiter-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  padding: 0.35rem 0.4rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--hx-border);
  scrollbar-width: none;
}

.waiter-categories::-webkit-scrollbar {
  display: none;
}

.waiter-categories .btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
}

.waiter-categories .btn.active {
  background: var(--hx-primary);
  border-color: var(--hx-primary);
  color: #fff;
}

.waiter-products {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
  padding: 0.35rem 0.4rem;
  align-content: start;
  -webkit-overflow-scrolling: touch;
}

.waiter-product-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.35rem 0.4rem;
  text-align: left;
  border: 1px solid var(--hx-border);
  border-radius: 6px;
  background: var(--hx-surface);
}

.waiter-product-btn:active {
  background: var(--hx-surface-muted, #f1f5f9);
}

.waiter-product-btn__name {
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.waiter-product-btn__price {
  font-size: 0.64rem;
  color: var(--hx-muted);
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

.waiter-order-footer {
  display: flex;
  gap: 0.3rem;
  padding: 0.4rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  background: var(--hx-surface);
  border-top: 1px solid var(--hx-border);
}

.waiter-order-footer .btn {
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.waiter-order-footer .btn-success {
  flex: 1;
}

.waiter-order-footer #waiterBtnTransfer {
  flex: 0 0 auto;
  min-width: 2.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

@media (max-width: 359px) {
  .waiter-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.waiter-toast-container {
  position: fixed;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: min(92vw, 22rem);
  pointer-events: none;
}

.waiter-toast {
  padding: 0.65rem 0.85rem;
  margin-top: 0.35rem;
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  box-shadow: var(--hx-shadow);
  font-size: 0.85rem;
}

.waiter-toast--ready {
  border-color: #eab308;
  background: #fffbeb;
}
