/* ────────────────────────────────────────────
   TOKENS
──────────────────────────────────────────── */
:root {
  --bg:          #0F1923;
  --bg2:         #162030;
  --bg3:         #1D2C3E;
  --surface:     #1E2D40;
  --surface2:    #253548;
  --border:      #2A3F58;
  --border2:     #3A5270;

  --orange:      #FF6B2B;
  --orange-dim:  #CC4D15;
  --orange-glow: rgba(255,107,43,0.18);

  --green:       #2ECC71;
  --green-dim:   rgba(46,204,113,0.15);
  --red:         #E74C3C;
  --red-dim:     rgba(231,76,60,0.15);
  --blue:        #3498DB;

  --text:        #EDF2F7;
  --text2:       #94A3B8;
  --text3:       #64748B;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.25);

  --sidebar-w:   240px;
  --font:        'Inter', system-ui, sans-serif;
  --font-display:'Syne', 'Inter', sans-serif;
}

/* ────────────────────────────────────────────
   RESET & BASE
──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ────────────────────────────────────────────
   SIDEBAR
──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-flame { font-size: 28px; }

.logo-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.logo-sub {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.nav-links { list-style: none; padding: 0 12px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 4px;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }

.nav-item.active {
  background: var(--orange-glow);
  color: var(--orange);
  font-weight: 600;
}

.nav-icon { font-size: 18px; }

.sidebar-event-name {
  padding: 16px 20px;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  word-break: break-word;
  line-height: 1.4;
}

/* ────────────────────────────────────────────
   MOBILE HEADER
──────────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 99;
}

.hamburger {
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.mobile-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
}

/* ────────────────────────────────────────────
   MAIN CONTENT
──────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 36px 32px;
  max-width: 1200px;
}

.section { display: none; }
.section.active { display: block; }

/* ────────────────────────────────────────────
   SECTION HEADER
──────────────────────────────────────────── */
.section-header {
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.section-sub {
  color: var(--text2);
  margin-top: 6px;
  font-size: 15px;
}

/* ────────────────────────────────────────────
   CARDS
──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-icon { font-size: 22px; }

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.card-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 4px 12px;
  border-radius: 20px;
}

.card-badge.ok { background: var(--green-dim); border-color: var(--green); color: var(--green); }

.card-desc {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-danger {
  border-color: rgba(231,76,60,0.4);
  background: rgba(231,76,60,0.05);
}

/* ────────────────────────────────────────────
   EVENT NAME INPUT
──────────────────────────────────────────── */
.event-name-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ────────────────────────────────────────────
   FORM ELEMENTS
──────────────────────────────────────────── */
.input-field {
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.input-field:focus {
  border-color: var(--orange);
  background: var(--bg3);
}
.input-field::placeholder { color: var(--text3); }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ────────────────────────────────────────────
   BUTTONS
──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--orange);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--orange-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,43,0.3);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg3);
  border-color: var(--text3);
}

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  background: #C0392B;
}

.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ────────────────────────────────────────────
   ROW CONFIGURATOR
──────────────────────────────────────────── */
.row-config {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.row-config-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
}

.row-type-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-grande {
  background: rgba(52,152,219,0.2);
  color: var(--blue);
  border: 1px solid rgba(52,152,219,0.4);
}

.badge-pequeña {
  background: rgba(46,204,113,0.15);
  color: var(--green);
  border: 1px solid rgba(46,204,113,0.3);
}

.row-config .input-field {
  width: 80px;
  text-align: center;
  padding: 8px;
}

.row-config-info {
  font-size: 13px;
  color: var(--text3);
  flex: 1;
}

.row-adder {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.layout-actions { margin-top: 8px; }

/* ────────────────────────────────────────────
   SEAT MAP
──────────────────────────────────────────── */
.legend {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}

.seat-demo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
}

.seat-demo.libre { background: var(--bg3); border: 1.5px solid var(--border2); }
.seat-demo.reservada { background: var(--red); }
.seat-demo.selected { background: var(--orange); }

.seat-map {
  overflow-x: auto;
  padding-bottom: 16px;
}

/* El mapa completo: columnas side by side */
.seat-map-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  min-width: max-content;
}

/* Cada "fila" configurada = una columna vertical */
.seat-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  writing-mode: horizontal-tb;
  text-align: center;
  padding: 6px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
}

/* Las mesas dentro de una columna se apilan verticalmente */
/* ── Mesa layout: each table is a self-contained row ── */

/* Stack of mesa-rows inside a column */
.mesa-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* One table = one row: [left seats] [surface] [right seats] */
.mesa-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;   /* all three cols same height */
  gap: 4px;
}

/* Side column: seats stacked */
.mesa-col-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}

/* Centre surface */
.mesa-col-surface {
  width: 34px;
  min-width: 34px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mesa-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  user-select: none;
}

/* Thin dashed divider between tables */
.mesa-divider {
  height: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mesa-divider::before,
.mesa-divider::after {
  content: '';
  flex: 1;
  border-top: 1px dashed var(--border2);
}
.mesa-divider::before { margin-left: 0; }
.mesa-divider::after  { margin-right: 0; }

/* Legacy kept for plano.html compat */
.tables-column  { display:flex; flex-direction:column; gap:0; }
.table-block    { background:transparent; border:none; padding:0; }
.table-label    { display:none; }
.col-layout     { display:flex; flex-direction:row; align-items:flex-start; gap:4px; }
.col-side       { display:flex; flex-direction:column; gap:3px; }
.col-divider    { height:8px; background:transparent; border-top:1px dashed var(--border2); margin:2px; }
.col-surface    { display:flex; flex-direction:column; min-width:34px; width:34px; }
.mesa-surface   { background:var(--bg3); border:1px solid var(--border2); display:flex; align-items:center; justify-content:center; width:100%; box-sizing:border-box; border-radius:5px; }
.mesa-surface + .col-divider + .mesa-surface { border-radius:0; }
.table-surface-label { font-size:8px; font-weight:700; color:var(--text3); text-transform:uppercase; writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap; }
.table-visual   { display:flex; flex-direction:row; align-items:stretch; gap:4px; }
.seats-side     { display:flex; flex-direction:column; gap:4px; }
.table-surface  { background:var(--bg3); border:1px solid var(--border2); border-radius:6px; min-width:28px; display:flex; align-items:center; justify-content:center; flex:1; }
.seats-grid     { display:grid; gap:5px; }
.seats-grid.grid-10 { grid-template-columns:repeat(5,1fr); }
.seats-grid.grid-4  { grid-template-columns:repeat(2,1fr); }

.seat {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  user-select: none;
}

.seat.libre {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text2);
}

.seat.libre:hover {
  background: var(--orange-glow);
  border-color: var(--orange);
  color: var(--orange);
  transform: scale(1.1);
}

.seat.reservada {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
  cursor: default;
}

.seat.reservada:hover { transform: none; }

.seat.selected {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255,107,43,0.4);
}

.seat.selecting-mode.libre { cursor: pointer; }

/* ────────────────────────────────────────────
   STATS GRID
──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-icon { font-size: 24px; margin-bottom: 10px; }

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label { font-size: 12px; color: var(--text2); font-weight: 500; }

.stat-occupied .stat-value { color: var(--red); }
.stat-free .stat-value { color: var(--green); }

/* ────────────────────────────────────────────
   RESERVATIONS LIST
──────────────────────────────────────────── */
.reservations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.reservations-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.reservations-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.reservations-table tr:last-child td { border-bottom: none; }

.reservations-table tr:hover td { background: var(--surface2); }

.res-name { font-weight: 600; }
.res-email { color: var(--text2); font-size: 13px; }

.seats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.seat-chip {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

.action-btns { display: flex; gap: 6px; }

.btn-icon {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.btn-icon:hover { background: var(--surface2); color: var(--text); }
.btn-icon.del:hover { border-color: var(--red); color: var(--red); background: var(--red-dim); }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ────────────────────────────────────────────
   MODALS
──────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: modalIn 0.2s ease;
}

.modal-sm { max-width: 420px; }

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

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

.modal-header h2 { font-size: 18px; font-weight: 700; }

.modal-header-danger { background: var(--red-dim); }

.modal-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 24px; }
.modal-body p { color: var(--text2); line-height: 1.6; margin-bottom: 12px; }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

/* ────────────────────────────────────────────
   STEP INDICATOR (modal paso 1)
──────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
}

.step span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.step.active { color: var(--orange); }
.step.active span { background: var(--orange); border-color: var(--orange); color: white; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
}

.step2-hint {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 4px;
}

/* ────────────────────────────────────────────
   FLOATING BAR (paso 2 selección sillas)
──────────────────────────────────────────── */
.floating-bar {
  position: fixed;
  bottom: -140px;
  left: var(--sidebar-w);
  right: 0;
  background: var(--surface);
  border-top: 2px solid var(--orange);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 150;
  transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-wrap: wrap;
}

.floating-bar.visible { bottom: 0; }

.fb-info { min-width: 140px; }

.fb-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  font-weight: 600;
  margin-bottom: 2px;
}

.fb-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.fb-progress-wrap { flex: 1; min-width: 180px; }

.fb-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.fb-track {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.fb-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fb-hint {
  font-size: 12px;
  color: var(--text3);
}

.fb-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 768px) {
  .floating-bar {
    left: 0;
    padding: 12px 16px;
    gap: 12px;
  }
  .fb-name { max-width: 120px; }
}

/* ────────────────────────────────────────────
   TOAST
──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 340px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }

/* ────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding: 80px 16px 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .event-name-row { flex-direction: column; }
  .row-adder { flex-direction: column; }

  .reservations-table { font-size: 13px; }
  .reservations-table th, .reservations-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────
   SIDEBAR BOTTOM
──────────────────────────────────────────── */
.sidebar-bottom {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.btn-readonly-link {
  display: block;
  text-align: center;
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.btn-readonly-link:hover { background: var(--surface2); color: var(--text); }

/* ────────────────────────────────────────────
   SEAT STATUS: CHECKED-IN & BLOQUEADA
──────────────────────────────────────────── */
.seat-demo.checked   { background: #2ECC71; }
.seat-demo.bloqueada { background: #555; border-color: #777; }

.seat.checked {
  background: rgba(46,204,113,0.25);
  border-color: var(--green);
  color: var(--green);
  cursor: default;
}
.seat.bloqueada {
  background: rgba(100,100,100,0.2);
  border-color: #555;
  color: #666;
  cursor: not-allowed;
}
.seat.block-mode.libre {
  cursor: crosshair;
  border-color: var(--red);
}

/* ────────────────────────────────────────────
   STATS GRID — extendida a 8 tarjetas
──────────────────────────────────────────── */
.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ────────────────────────────────────────────
   CHECK-IN SECTION
──────────────────────────────────────────── */
.checkin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ci-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.ci-stat.ci-done    { border-color: var(--green); background: var(--green-dim); }
.ci-stat.ci-pending { border-color: rgba(255,107,43,0.4); background: var(--orange-glow); }

.ci-val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.ci-stat.ci-done .ci-val    { color: var(--green); }
.ci-stat.ci-pending .ci-val { color: var(--orange); }
.ci-label { font-size: 12px; color: var(--text2); font-weight: 500; }

.checkin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.checkin-card.ci-checked {
  border-color: var(--green);
  background: var(--green-dim);
  opacity: 0.75;
}
.ci-card-info { flex: 1; }
.ci-card-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ci-card-detail { font-size: 13px; color: var(--text2); }
.ci-card-notes  { font-size: 12px; color: var(--text3); margin-top: 4px; }
.ci-card-time   { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 600; }

.btn-checkin {
  background: var(--green);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-checkin:hover { background: #27ae60; transform: translateY(-1px); }

.badge-ci {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}
.badge-ci.ok {
  background: var(--green-dim);
  color: var(--green);
  border-color: var(--green);
}

@media (max-width: 600px) {
  .checkin-stats-row { grid-template-columns: repeat(2,1fr); }
  .checkin-card { flex-direction: column; align-items: flex-start; }
  .ci-card-action { width: 100%; }
  .ci-card-action .btn, .ci-card-action .btn-checkin { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────
   HISTORIAL
──────────────────────────────────────────── */
.archive-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.arch-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arch-stat strong { font-size: 22px; font-weight: 800; color: var(--text); font-family: var(--font-display); }
.arch-stat span   { font-size: 12px; color: var(--text3); }

/* ────────────────────────────────────────────
   RESERVATIONS TABLE — check-in column
──────────────────────────────────────────── */
.reservations-table .seats-chips { max-width: 180px; }

@media (max-width: 768px) {
  .checkin-stats-row { grid-template-columns: repeat(2,1fr); }
}

/* ────────────────────────────────────────────
   PRINT STYLES
──────────────────────────────────────────── */
@media print {
  .sidebar, .mobile-header, .floating-bar, .btn, button, .toast { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  body { background: white !important; color: black !important; }
  .seat { border: 1px solid #ccc !important; color: black !important; background: white !important; }
  .seat.reservada { background: #ffcccc !important; }
  .seat.checked   { background: #ccffcc !important; }
  .seat.bloqueada { background: #eeeeee !important; }
}
