/* ── Variables ── */
:root {
  --bg: #0a0a0c;
  --bg-elevated: #141418;
  --bg-card: #1a1a20;
  --bg-hover: #222228;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.35);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --cart-bar-height: 60px;
  --cart-bar-gap: 20px;
  --header-height: 64px;
  --app-powered-height: 68px;
  --toast-top: calc(env(safe-area-inset-top, 0px) + 8px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ── App shell ── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  height: var(--header-height);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header__brand-copy {
  min-width: 0;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-logo--header {
  height: 40px;
  max-width: 140px;
}

.header__logo {
  font-size: 1.5rem;
  line-height: 1;
}

.header__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header__subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header__table {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.header__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.header__session {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Main content ── */
.main {
  flex: 1;
  padding-bottom: calc(var(--nav-height) + var(--app-powered-height) + var(--safe-bottom) + 8px);
}

.panel {
  animation: fadeIn 0.25s ease;
}

.app-powered {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  height: var(--app-powered-height);
  padding: 0 16px;
  pointer-events: none;
  user-select: none;
}

.app-powered__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}

.app-powered__logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 133px;
  object-fit: contain;
}

.panel[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Categories ── */
.categories {
  display: flex;
  gap: 8px;
  padding: 16px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-chip--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Products ── */
.products {
  padding: 8px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.product-card:active {
  border-color: rgba(249, 115, 22, 0.3);
}

.product-card__image-wrap {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}

.product-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.product-card__add {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, 0.3);
  transition: all 0.2s ease;
}

.product-card__add:active {
  transform: scale(0.96);
  background: var(--accent);
  color: #fff;
}

.product-card__qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card__qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}

.product-card__qty-btn:active {
  background: var(--accent-soft);
}

.product-card__qty-num {
  font-size: 0.9375rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.product-card__notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.product-card__notes-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-card__notes-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8125rem;
}

.product-card__notes-input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.45);
}

.product-card__notes-input::placeholder {
  color: var(--text-dim);
}

#panel-carta {
  padding-bottom: calc(
    var(--nav-height) + var(--app-powered-height) + var(--cart-bar-height) + var(--cart-bar-gap) +
      var(--safe-bottom) + 16px
  );
}

.call-waiter-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 8px 16px 16px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.15s ease;
}

.call-waiter-fab:active {
  transform: scale(0.98);
}

.call-waiter-fab.waiter__btn--sent {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  pointer-events: none;
}

/* ── Home ── */
.home__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  gap: 28px;
}

.home__welcome {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-align: center;
}

.home__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

.home__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 20px 24px;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.home__btn--accent {
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: transparent;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.home__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.home__btn-icon {
  font-size: 1.25rem;
}

.home__status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--success);
  text-align: center;
}

/* ── Account tab ── */
.account {
  padding: 20px 16px;
}

.account__header {
  margin-bottom: 20px;
}

.account__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.account__code-hint {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.account__code-hint--visible {
  opacity: 1;
  transform: translateY(0);
}

.account__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.account__section {
  margin-bottom: 28px;
}

.account__section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.account__section-empty {
  font-size: 0.875rem;
  color: var(--text-dim);
  padding: 8px 0;
}

.account__invoice {
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.account__invoice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.account__invoice-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text);
}

.account__invoice-line span:first-child {
  flex: 1;
  min-width: 0;
}

.account__invoice-line span:last-child {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-muted);
}

.account__invoice .account__total {
  margin-top: 0;
}

.account__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.account__item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account__item-name {
  font-size: 0.9375rem;
  font-weight: 600;
}

.account__item-qty {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.account__item-notas {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

.account__item-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.account__item-status--pendiente {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.account__item-status--en_preparacion {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.account__item-status--listo {
  background: var(--success-soft);
  color: var(--success);
}

.account__item-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
}

.account__empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.account__empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.account__empty-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 8px;
  max-width: 260px;
  margin-inline: auto;
}

.account__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.account__total span {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.account__total strong {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent);
}

/* ── Resumen de pago (subtle) ── */
.account__extras {
  margin-top: 16px;
}

.account__payment-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.account__payment-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}

.account__payment-summary-row--service {
  font-size: 0.8125rem;
}

.account__payment-summary-service-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text-dim);
}

.account__optional-link {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: 0.85;
}

.account__optional-link:hover {
  color: var(--text-muted);
}

.account__service-confirm {
  margin: 2px 0 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.account__service-confirm-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.account__service-confirm-actions {
  display: flex;
  gap: 8px;
}

.account__service-confirm-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.account__service-confirm-btn:first-child {
  background: var(--accent);
  border-color: var(--accent);
}

.account__service-confirm-btn--ghost {
  color: var(--text-muted);
  background: transparent;
}

.account__payment-summary-row dt {
  color: var(--text-muted);
}

.account__payment-summary-row dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.account__payment-summary-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 2px;
}

.account__payment-summary-row--total {
  font-size: 0.9375rem;
}

.account__payment-summary-row--total dt {
  color: var(--text);
  font-weight: 600;
}

.account__payment-summary-row--total dd {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

.account__tip--subtle {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.account__tip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account__tip-btn {
  min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.account__tip-btn:hover {
  color: var(--text-muted);
  border-color: var(--border);
}

.account__tip-btn--active {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
}

.account__tip-custom {
  display: block;
  margin-top: 8px;
}

.account__tip-custom-input {
  width: 100%;
  max-width: 140px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.8125rem;
}

.account__tip-custom-input:focus {
  outline: none;
  border-color: var(--accent);
}

.account__switch {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.account__switch-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.45;
}

.account__switch-form {
  display: flex;
  gap: 10px;
}

.account__switch-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
}

.account__switch-input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.account__switch-btn {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  white-space: nowrap;
}

.account__switch-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Waiter tab ── */
.waiter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  min-height: calc(
    100dvh - var(--header-height) - var(--nav-height) - var(--app-powered-height) - var(--safe-bottom) - 8px
  );
}

.waiter__icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0deg); }
}

.waiter__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.waiter__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 280px;
  margin-bottom: 32px;
}

.waiter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  padding: 20px 32px;
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 8px 32px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.waiter__btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.waiter__btn--sent {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.35);
  pointer-events: none;
}

.waiter__btn-icon {
  font-size: 1.5rem;
}

.waiter__status {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--success);
  min-height: 1.25rem;
}

/* ── Cart bar ── */
.cart-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--cart-bar-gap));
  left: 50%;
  width: calc(100% - 32px);
  max-width: 448px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(249, 115, 22, 0.1);
  z-index: 40;
  transform: translateX(-50%) translateY(calc(100% + var(--nav-height)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.25s ease,
    visibility 0.35s ease;
}

.cart-bar--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-bar__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-bar__count {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.cart-bar__btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cart-bar__btn:active:not(:disabled) {
  transform: scale(0.96);
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 50;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}

.bottom-nav__item--active {
  color: var(--accent);
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.bottom-nav__badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 28px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Toast ── */
.toast {
  position: fixed;
  top: var(--toast-top);
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - 120px));
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 200;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  pointer-events: none;
  text-align: center;
  opacity: 0;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast--success {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(34, 197, 94, 0.08));
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, var(--bg-card), rgba(239, 68, 68, 0.08));
  color: #fca5a5;
}

.cart-bar__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Session gate ── */
.session-gate {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

.session-gate__shell {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 24px 20px calc(32px + var(--safe-bottom));
}

.session-gate__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0 12px;
}

.session-gate__logo {
  font-size: 2rem;
  line-height: 1;
}

.session-gate__mesa {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.session-gate__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.session-gate__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  line-height: 1.2;
}

.session-gate__subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -8px;
}

.session-gate__loading {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9375rem;
  padding: 24px 0;
}

.session-gate__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-gate__option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.session-gate__option:active {
  transform: scale(0.98);
}

.session-gate__option--active,
.session-gate__option:focus-visible {
  border-color: rgba(249, 115, 22, 0.45);
  background: var(--bg-hover);
}

.session-gate__option-icon {
  font-size: 1.375rem;
  flex-shrink: 0;
}

.session-gate__option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.session-gate__option-text strong {
  font-size: 1rem;
  font-weight: 700;
}

.session-gate__option-text small {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.session-gate__join {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.session-gate__join-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.session-gate__join-row {
  display: flex;
  gap: 10px;
}

.session-gate__join-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
}

.session-gate__join-input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.session-gate__join-btn {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 8px 24px var(--accent-glow);
  white-space: nowrap;
}

.session-gate__error {
  font-size: 0.875rem;
  color: #fca5a5;
  text-align: center;
  padding: 4px 8px;
}

/* ── Wompi payment ── */
.wompi-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: #00c853;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 200, 83, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.wompi-pay-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account__payment-waiting {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

/* ── Dividir cuenta (sesión grupal) ── */
.account__split {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.account__split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.account__split-label {
  font-size: 0.9375rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.account__split-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.account__split-stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s ease;
}

.account__split-stepper-btn:active:not(:disabled) {
  background: var(--accent-soft);
}

.account__split-stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.account__split-input {
  width: 44px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  -moz-appearance: textfield;
}

.account__split-input::-webkit-outer-spin-button,
.account__split-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.account__split-share {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.account__split-progress {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.account__split-pay-btn {
  margin-top: 16px;
}

.account__split-qr {
  margin-top: 16px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.account__split-qr-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  margin-bottom: 12px;
}

.account__split-qr-canvas img,
.account__split-qr-canvas canvas {
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.account__split-qr-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Página pagar ── */
.pagar-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
}

.pagar-page__logo {
  font-size: 2rem;
  margin-bottom: 12px;
}

.pagar-page__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pagar-page__amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.pagar-page__hint {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 20rem;
  margin-bottom: 24px;
}

.pagar-page__status {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.pagar-page__success {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-weight: 600;
  max-width: 22rem;
}

.pagar-page__error {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-weight: 600;
  max-width: 22rem;
}
