:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #e2e8f0;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --amber: #f59e0b;
  --amber-strong: #b45309;
  --emerald: #10b981;
  --emerald-bg: #d1fae5;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #0284c7;
  --info-bg: #e0f2fe;
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.mode-login {
  background:
    radial-gradient(circle at 12% 24%, rgba(16, 185, 129, 0.22), transparent 36%),
    radial-gradient(circle at 88% 24%, rgba(245, 158, 11, 0.24), transparent 36%),
    radial-gradient(circle at 50% 88%, rgba(2, 132, 199, 0.14), transparent 44%),
    linear-gradient(135deg, #fffbeb 0%, #f0fdf4 50%, #eff6ff 100%);
}

.hidden {
  display: none !important;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Barra superior compacta móvil-first */
.sim-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sim-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.logo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0f172a;
  font-weight: 800;
  padding: 5px 14px 5px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  line-height: 1;
  transform: translateY(-2px);
}

.logo-text {
  display: inline-block;
  line-height: 1;
  margin-left: -1px;
}

.live-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.live-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

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

.context-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface-3);
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}

select, input, textarea {
  font-family: inherit;
  font-size: 16px;
  min-height: 48px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  width: 100%;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.sim-select-wrap select {
  padding: 6px 10px;
  font-size: 16px;
  min-height: 42px;
}

/* Contenedor principal adaptable según dispositivo */
.main-container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.main-container.wide {
  max-width: 920px;
}

body.device-tablet .main-container.wide {
  max-width: 780px;
  padding: 16px;
}

.main-container.login-stage {
  max-width: 1180px;
  justify-content: center;
}

.login-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, 430px) minmax(220px, 1fr);
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.login-sport-panel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #0f172a;
}

.login-sport-panel.futbol {
  border-color: rgba(16, 185, 129, 0.45);
}

.login-sport-panel.motogp {
  border-color: rgba(245, 158, 11, 0.5);
}

.login-sport-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-sport-overlay {
  position: relative;
  z-index: 1;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.86) 68%, rgba(15, 23, 42, 0.95) 100%);
  color: #ffffff;
}

.login-sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-bottom: 6px;
}

.login-sport-caption {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  color: #f8fafc;
}

.login-center-col {
  display: flex;
  flex-direction: column;
}

.login-center-col .card-hero {
  height: 100%;
  background: linear-gradient(155deg, #ffffff 0%, #fffbeb 62%, #fef3c7 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.16), 0 4px 14px rgba(15, 23, 42, 0.06);
}

@media (max-width: 1023px) {
  .login-showcase {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
  .login-sport-panel {
    display: none;
  }
}

body.device-tablet .login-showcase,
body.device-mobile .login-showcase {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 0 auto;
}

body.device-tablet .login-sport-panel,
body.device-mobile .login-sport-panel {
  display: none;
}

.staff-user-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tarjetas */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.card-hero {
  background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
  border-color: #fcd34d;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0;
  line-height: 1.45;
}

/* Badges y Pills */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: #1e293b;
}

.badge-amber {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.badge-emerald {
  background: var(--emerald-bg);
  color: #065f46;
  border: 1px solid #10b981;
}

.badge-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #ef4444;
}

.badge-info {
  background: var(--info-bg);
  color: #075985;
  border: 1px solid #38bdf8;
}

.hero-title {
  font-size: 1.42rem;
  font-weight: 800;
  margin: 4px 0 6px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-title-gift {
  font-size: 0.85em;
  display: inline-block;
  vertical-align: 0.03em;
}

.prize-box {
  margin-top: 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prize-main {
  font-size: 1.03rem;
  font-weight: 800;
  color: #b45309;
}

.rule-line {
  font-size: 0.85rem;
  color: #1e293b;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0f172a;
  width: 100%;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.btn-emerald {
  background: #059669;
  color: #ffffff;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.btn-secondary {
  background: var(--surface-3);
  color: #0f172a;
  border: 1px solid var(--border);
}

.btn-full {
  width: 100%;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 38px;
  padding: 7px 11px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost.badge-amber {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}

.btn-xs {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-sm {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.86rem;
  border-radius: 10px;
}

/* Formularios */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #1e293b;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-row-street {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(92px, 1fr);
  gap: 10px;
}

.field-row-compact {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(0, 1.5fr);
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: #1e293b;
  line-height: 1.38;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  margin-top: 1px;
  accent-color: #d97706;
  flex-shrink: 0;
}

/* Selector de marcador Fútbol */
.score-stepper-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.team-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.team-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  min-height: 2.2em;
  display: flex;
  align-items: center;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-btn {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.step-val {
  font-size: 1.85rem;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
  color: #b45309;
}

.vs-sep {
  font-weight: 800;
  color: var(--muted);
  font-size: 1.2rem;
}

/* Opciones de Deporte (F1, MotoGP, Boxeo, Tenis) */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.option-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.option-chip.selected {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
  font-weight: 800;
}

/* Ticket y mis jugadas */
.ticket-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-item.winner {
  background: linear-gradient(135deg, #ecfdf5, #fffbeb);
  border: 2px solid #d97706;
}

.claim-code-box {
  background: #fffbeb;
  border: 2px dashed #d97706;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  margin-top: 6px;
}

.claim-code-val {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #92400e;
}

/* Ruleta Canvas */
.roulette-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.wheel-stage {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #b45309;
  z-index: 4;
  filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.35));
}

#rouletteCanvas {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #ffffff, 0 10px 24px rgba(15, 23, 42, 0.18);
}

.countdown-pill {
  font-size: 1.3rem;
  font-weight: 900;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  padding: 6px 16px;
  border-radius: 999px;
}

/* Staff / Admin cola de mesas */
.table-queue-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-queue-card.has-pending {
  border-color: #f59e0b;
  background: #fffbeb;
}

.table-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pred-row {
  background: #ffffff;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
}

.pred-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pred-actions .btn {
  min-width: 46px;
  min-height: 46px;
  padding: 8px 12px;
  font-size: 1.05rem;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Tabs Admin Dueño en cuadrícula de 5 columnas sin scroll horizontal */
.subtabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  overflow-x: visible;
  padding-bottom: 0;
}

.subtab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  min-height: 52px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.71rem;
  padding: 7px 2px;
  border-radius: 12px;
  cursor: pointer;
}

.subtab-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.subtab-label {
  display: block;
}

.subtab.active {
  background: #f59e0b;
  color: #0f172a;
  border-color: #d97706;
}

/* Sugeridor de eventos */
.sport-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.event-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-card.active-now {
  border-color: #10b981;
  background: #ecfdf5;
}

/* Grid de pegatinas QR */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.qr-sticker {
  background: #ffffff;
  color: #0f172a;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 2px dashed #94a3b8;
}

.qr-sticker img {
  width: 170px;
  height: 170px;
}

.qr-sticker h4 {
  margin: 0;
  font-size: 1.05rem;
}

.qr-sticker p {
  margin: 0;
  font-size: 0.74rem;
  color: #475569;
  word-break: break-all;
}

/* Tabla VIP RGPD */
.vip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #0f172a;
  color: #ffffff;
  border: 2px solid #f59e0b;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 92vw;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.toast.error {
  border-color: #ef4444;
  background: #991b1b;
}

/* Ergonomía en pantallas estrechas (móvil 360px - 520px) */
@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .table-queue-header {
    flex-direction: column;
    align-items: stretch;
  }

  .table-queue-header .btn,
  .event-card .btn {
    width: 100%;
  }

  .wheel-stage {
    width: 250px;
    height: 250px;
  }

  #rouletteCanvas {
    width: 244px;
    height: 244px;
  }

  .sim-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sim-controls #openQrTabBtn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .live-label {
    display: none;
  }

  .context-pill {
    max-width: 96px;
  }
}

/* Adaptación automática para Tablet (vertical y horizontal) y Escritorio (>= 700px) */
@media (min-width: 700px) {
  .events-catalog-grid,
  .tables-queue-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .event-card.is-configuring {
    grid-column: 1 / -1;
  }

  .bottom-nav {
    max-width: 580px;
    margin: 0 auto 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    border: 1px solid var(--border);
    border-radius: 16px;
  }
}

/* Ergonomía táctil reforzada en Tablet */
body.device-tablet .subtab {
  min-height: 56px;
  font-size: 0.78rem;
}

body.device-tablet .qr-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-tablet .admin-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.device-tablet .admin-three-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ==========================================
   PRUEBA GRATUITA Y PLANES DE SUSCRIPCIÓN
   ========================================== */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid #fcd34d;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: var(--text);
  margin-bottom: 14px;
}

.trial-banner.trial-banner-expired {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.trial-banner.trial-banner-paid {
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.paywall-card {
  border: 2px solid var(--amber);
  background: linear-gradient(180deg, #fffbeb 0%, var(--surface) 45%);
  margin-bottom: 16px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  position: relative;
}

.plan-card.recommended {
  border: 2px solid var(--emerald);
  background: linear-gradient(180deg, #ecfdf5 0%, var(--surface) 45%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.14);
}

.plan-save-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--emerald-bg);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.plan-price {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.plan-price small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.plan-features {
  margin: 0;
  padding-left: 16px;
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.promo-box {
  background: var(--surface-2);
  border: 1.5px dashed var(--amber);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 12px;
}

.promo-input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.promo-input-row input {
  flex: 1 1 160px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.promo-applied-banner {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.84rem;
  color: #065f46;
}

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  margin-right: 6px;
}

.commission-status-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.84rem;
}

.commission-status-box.earned {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.commission-status-box.pending {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.distributor-table-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.distributor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.distributor-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Panel SuperAdmin */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-kpi-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.admin-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  line-height: 1.15;
}

.admin-kpi-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 4px;
}

.admin-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-item-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
}

.admin-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-item-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.admin-history-list {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.admin-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  padding: 3px 0;
  color: var(--muted);
}

.admin-three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Buscador y filas compactas para cientos de bares */
.admin-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 260px;
  justify-content: flex-end;
}

.admin-search-input {
  min-height: 34px !important;
  padding: 5px 10px !important;
  font-size: 0.84rem !important;
  max-width: 280px;
}

.admin-bars-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.admin-bar-row {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.14s ease, background 0.14s ease;
}

.admin-bar-row.expanded {
  border-color: var(--amber);
  background: #ffffff;
}

.admin-bar-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.admin-bar-line1 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  line-height: 1.25;
}

.admin-bar-name {
  font-weight: 800;
  color: var(--text);
}

.admin-bar-slug {
  font-size: 0.74rem;
  color: #475569;
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
}

.admin-bar-owner {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-bar-line2 {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.25;
}

.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-compact {
  padding: 3px 8px;
  font-size: 0.72rem;
}

.btn-compact {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.76rem;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .admin-bar-row-main {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .admin-bar-right {
    justify-content: flex-start;
  }
  .admin-search-wrap {
    justify-content: flex-start;
  }
  .admin-search-input {
    max-width: 100%;
  }
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-three-cols {
    grid-template-columns: 1fr;
  }
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.help-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.help-icon-btn:hover {
  border-color: var(--amber);
  background: #fffbeb;
  color: #0f172a;
  transform: translateY(-1px);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.guide-step-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.guide-step-title {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--text);
  margin-bottom: 4px;
}

/* Modo Impresión para Pegatinas QR */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .no-print {
    display: none !important;
  }
  .main-container,
  .main-container.wide {
    max-width: 100%;
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }
  .qr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .qr-sticker {
    break-inside: avoid;
    border: 2px solid #0f172a;
  }
}

/* Barra inferior discreta de cookies técnicas (solo Portada/Acceso) */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 780px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.cookie-banner.hidden {
  display: none !important;
}

.cookie-banner a {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: underline;
}

.cookie-banner-btn {
  flex-shrink: 0;
  background: #f59e0b;
  color: #0f172a;
  border: none;
  border-radius: 9px;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-banner-btn:hover {
  background: #fbbf24;
}

@media (max-width: 560px) {
  .cookie-banner {
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 10px 12px;
    gap: 10px;
    font-size: 0.74rem;
  }
}

