/* ============================================================
   ADMIN PANEL — STBMadrid
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:    #d4a017;
  --dark:    #0a0a0a;
  --dark-2:  #111;
  --dark-3:  #1a1a1a;
  --dark-4:  #222;
  --white:   #f5f5f5;
  --grey:    #888;
  --grey-l:  #bbb;
  --red:     #e53935;
  --green:   #4caf50;
  --blue:    #2196f3;
  --orange:  #ff9800;
  --sidebar: 220px;
  --radius:  12px;
  --font:    'Lato', system-ui, sans-serif;
  --font-t:  'Montserrat', system-ui, sans-serif;
}

body {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  min-height: 100vh;
}

/* ── LOGIN ───────────────────────────────── */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.login-box {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-logo {
  border-radius: 50%;
  background: #000;
  object-fit: contain;
  border: 2px solid rgba(212, 160, 23, 0.55);
  margin-bottom: 1.2rem;
}
.admin-brand img {
  border-radius: 50%;
  background: #000;
  object-fit: contain;
}
.login-box h1 { font-family: var(--font-t); font-size: 1.6rem; margin-bottom: 0.3rem; }
.login-subtitle { color: var(--grey); font-size: 0.88rem; margin-bottom: 2rem; }
.login-box input {
  width: 100%;
  background: var(--dark);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--white);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.login-box input:focus { outline: none; border-color: var(--gold); }
.login-error { color: var(--red); font-size: 0.85rem; margin-top: 0.5rem; }

/* ── PANEL ───────────────────────────────── */
.admin-panel {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────── */
.admin-sidebar {
  width: var(--sidebar);
  background: var(--dark-2);
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
  overflow-y: auto;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-t);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}
.admin-nav {
  flex: 1;
  padding: 1rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.admin-nav-btn {
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--grey-l);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font);
  padding: 0.75rem 1rem;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}
.admin-nav-btn:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.admin-nav-btn.active { background: rgba(212,160,23,0.15); color: var(--gold); font-weight: 700; }
.admin-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-link-web {
  color: var(--grey);
  font-size: 0.82rem;
  text-decoration: none;
  text-align: center;
}
.admin-link-web:hover { color: var(--gold); }

/* ── MAIN ────────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar);
  flex: 1;
  padding: 2rem;
  max-width: 1100px;
}
.admin-section { display: none; }
.admin-section.active { display: block; }
.section-title {
  font-family: var(--font-t);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: var(--white);
}
.section-desc { color: var(--grey); font-size: 0.88rem; margin-bottom: 1.5rem; }

/* ── CARDS ───────────────────────────────── */
.admin-card {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
}
.admin-card h3 {
  font-family: var(--font-t);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--grey-l);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── STATS GRID ──────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
}
.stat-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.stat-value { font-family: var(--font-t); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--grey-l); margin: 0.3rem 0 0.1rem; }
.stat-sub   { font-size: 0.75rem; color: var(--grey); }

/* ── BAR CHARTS ──────────────────────────── */
.adm-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}
.adm-bar-label { color: var(--grey-l); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-bar-val   { color: var(--gold); font-weight: 700; text-align: right; }
.adm-bar-rank  { color: var(--grey); font-size: 0.78rem; width: 24px; }
.adm-bar-wrap  { background: var(--dark-4); border-radius: 50px; height: 8px; overflow: hidden; }
.adm-bar-fill  { height: 100%; border-radius: 50px; transition: width 0.5s ease; }

/* ── GENDER BAR ──────────────────────────── */
.gender-bar { display: flex; height: 32px; border-radius: 50px; overflow: hidden; margin-bottom: 0.7rem; }
.gender-male   { background: #1976d2; display:flex; align-items:center; justify-content:center; font-size:0.78rem; font-weight:700; color:#fff; transition: width 0.4s; }
.gender-female { background: #e91e63; display:flex; align-items:center; justify-content:center; font-size:0.78rem; font-weight:700; color:#fff; transition: width 0.4s; }
.gender-labels { display:flex; justify-content:space-between; font-size:0.82rem; color:var(--grey-l); }

/* ── DASHBOARD ROW ───────────────────────── */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── TICKET ADMIN CARDS ──────────────────── */
#tickets-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.ticket-admin-card {}
.tac-header { display:flex; align-items:center; gap:0.5rem; margin-bottom:1rem; }
.tac-emoji  { font-size:1.4rem; }
.tac-header h3 { flex:1; font-family:var(--font-t); font-size:1rem; font-weight:700; }
.tac-price  { color:var(--gold); font-weight:700; }
.tac-field  { margin-bottom:0.8rem; }
.tac-field label { display:block; font-size:0.78rem; color:var(--grey); margin-bottom:0.3rem; text-transform:uppercase; letter-spacing:0.05em; }
.tac-counter { display:flex; align-items:center; gap:0.5rem; }
.tac-btn {
  background: var(--dark-4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.3rem 0.7rem;
  transition: background 0.15s;
}
.tac-btn:hover { background: rgba(212,160,23,0.2); }
.tac-num {
  background: var(--dark);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  text-align: center;
  width: 70px;
}
.tac-num:focus { outline:none; border-color:var(--gold); }
.tac-avail { font-size:0.78rem; color:var(--grey); display:block; margin-top:0.3rem; }
.tac-limit-row { background:rgba(212,160,23,0.06); border:1px solid rgba(212,160,23,0.2); border-radius:8px; padding:0.6rem 0.75rem; margin-bottom:0.5rem; }
.tac-limit-row label { color:var(--gold); font-weight:700; font-size:0.82rem; }
.tac-gender { display:grid; grid-template-columns:1fr 1fr; gap:0.5rem; }
.tac-bizum-breakdown { margin-top:0.8rem; padding-top:0.8rem; border-top:1px solid rgba(255,255,255,0.08); }
.tac-bizum-breakdown label { color:var(--gold); font-weight:700; font-size:0.78rem; display:block; margin-bottom:0.4rem; }
.tac-bizum-row { display:flex; justify-content:space-between; font-size:0.8rem; color:var(--grey-l); padding:0.2rem 0; }
.tac-bizum-inactive { opacity:0.5; }
.tac-bizum-empty { font-size:0.78rem; color:var(--text-secondary); margin:0; }
.tac-bizum-warn { font-size:0.78rem; color:#ff9800; margin:0.4rem 0 0; }

/* ── GLOBAL SUMMARY ──────────────────────── */
.global-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}
.gsm-item { text-align:center; }
.gsm-icon { font-size:1.3rem; display:block; }
.gsm-item strong { display:block; font-size:1.3rem; font-weight:800; color:var(--gold); font-family:var(--font-t); }
.gsm-item span:last-child { font-size:0.78rem; color:var(--grey); }
.gsm-bar-wrap { background:var(--dark-4); border-radius:50px; height:10px; overflow:hidden; }

/* ── EVENTS ──────────────────────────────── */
.event-history-card.past   { border-left: 3px solid var(--green); }
.event-history-card.upcoming { border-left: 3px solid var(--gold); }
.ehc-header { display:flex; align-items:center; gap:0.8rem; flex-wrap:wrap; margin-bottom:0.5rem; }
.ehc-status { font-size:0.82rem; }
.ehc-name   { font-weight:700; }
.ehc-date   { color:var(--gold); font-size:0.88rem; margin-left:auto; }
.ehc-body   { font-size:0.85rem; color:var(--grey-l); display:flex; gap:1.5rem; flex-wrap:wrap; }

/* ── POLL ROWS ───────────────────────────── */
.poll-row { grid-template-columns:24px 120px 1fr 90px; }

/* ── SUGGESTIONS ─────────────────────────── */
.sugg-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; color:var(--grey); font-size:0.88rem; }
.sugg-item { background:var(--dark-3); border:1px solid rgba(255,255,255,0.07); border-radius:10px; padding:1rem; margin-bottom:0.7rem; }
.sugg-text { margin-bottom:0.5rem; line-height:1.5; }
.sugg-meta { display:flex; justify-content:space-between; align-items:center; }
.sugg-meta time { font-size:0.78rem; color:var(--grey); }
.btn-del-sugg { background:transparent; border:1px solid rgba(229,57,53,0.3); border-radius:6px; color:#e57373; cursor:pointer; font-size:0.78rem; padding:0.2rem 0.6rem; }
.btn-del-sugg:hover { background:rgba(229,57,53,0.1); }

/* ── CORTESÍAS QR ────────────────────────── */
.cortesia-layout { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.crt-ticket-grid { display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:0.5rem; }
.crt-ticket-opt {
  display:flex; align-items:center; gap:0.4rem;
  background:var(--dark-4); border:2px solid rgba(255,255,255,0.1);
  border-radius:8px; cursor:pointer; font-size:0.88rem; padding:0.5rem 0.9rem;
  transition:all 0.15s;
}
.crt-ticket-opt input { display:none; }
.crt-ticket-opt.selected { border-color:var(--gold); background:rgba(212,160,23,0.12); color:var(--gold); }
.crt-ticket-opt:hover { border-color:rgba(212,160,23,0.4); }

/* Ticket preview */
.crt-ticket-preview {
  display:flex; gap:1.2rem; align-items:flex-start;
  background:var(--dark); border:2px solid var(--gold);
  border-radius:16px; padding:1.2rem; margin-bottom:1.2rem;
}
.crt-qr-wrap { flex-shrink:0; }
.crt-qr-wrap canvas { border-radius:8px; display:block; }
.crt-ticket-info { flex:1; }
.crt-brand { color:var(--gold); font-family:var(--font-t); font-weight:800; font-size:0.85rem; letter-spacing:0.1em; text-transform:uppercase; margin-bottom:0.4rem; }
.crt-ticket-name { font-family:var(--font-t); font-size:1.2rem; font-weight:800; margin-bottom:0.2rem; }
.crt-ticket-type { color:var(--gold); font-weight:700; margin-bottom:0.2rem; font-size:0.9rem; }
.crt-ticket-event { color:var(--grey-l); font-size:0.82rem; margin-bottom:0.6rem; }
.crt-cortesia-badge {
  display:inline-block; background:rgba(212,160,23,0.15); border:1px solid var(--gold);
  border-radius:20px; color:var(--gold); font-size:0.72rem; font-weight:800;
  letter-spacing:0.08em; padding:0.2rem 0.7rem; margin-bottom:0.5rem;
}
.crt-ticket-id { font-family:monospace; font-size:0.72rem; color:var(--grey); }
.crt-actions { display:flex; flex-wrap:wrap; gap:0.6rem; }

/* Historial */
.crt-history-item {
  background:var(--dark-4); border-radius:10px; padding:0.9rem 1rem;
  margin-bottom:0.6rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap;
}
.crt-hist-main { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }
.crt-hist-name { font-weight:700; }
.crt-hist-badge { background:rgba(212,160,23,0.15); border-radius:20px; color:var(--gold); font-size:0.75rem; font-weight:700; padding:0.15rem 0.6rem; }
.crt-hist-note { color:var(--grey); font-size:0.8rem; font-style:italic; }
.crt-hist-meta { display:flex; align-items:center; gap:0.7rem; flex-wrap:wrap; }
.crt-hist-meta time { color:var(--grey); font-size:0.75rem; }
.crt-hist-meta code { color:var(--gold); font-size:0.72rem; }

@media (max-width:768px) { .cortesia-layout { grid-template-columns:1fr; } }

/* ── CONFIG ──────────────────────────────── */
.config-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.config-label { display:block; font-size:0.78rem; color:var(--grey); text-transform:uppercase; letter-spacing:0.05em; margin:0.8rem 0 0.3rem; }
.config-label:first-of-type { margin-top:0; }
.admin-input {
  width: 100%;
  background: var(--dark);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.92rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s;
}
.admin-input:focus { outline:none; border-color:var(--gold); }
.config-actions { display:flex; gap:1rem; flex-wrap:wrap; }
.config-save-msg { font-size:0.85rem; margin-top:0.8rem; }
.config-save-msg.ok { color:var(--green); }

/* Contexto del Programa del día: de QUÉ evento es el programa que se está editando y
   de dónde salen los datos que se ven (propio del evento / general / por defecto). */
.schedule-context {
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(212, 160, 23, 0.08);
}

/* ── BUTTONS ─────────────────────────────── */
.btn-admin-primary {
  background: var(--gold);
  border: none;
  border-radius: 50px;
  color: var(--dark);
  cursor: pointer;
  font-family: var(--font-t);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.8rem;
  transition: opacity 0.2s;
  width: 100%;
}
.btn-admin-primary:hover { opacity: 0.85; }
.btn-admin-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  color: var(--grey-l);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0.6rem 1.4rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-admin-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-logout {
  background: transparent;
  border: 1px solid rgba(229,57,53,0.3);
  border-radius: 8px;
  color: #e57373;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.5rem;
  transition: background 0.15s;
  width: 100%;
}
.btn-logout:hover { background: rgba(229,57,53,0.1); }

/* ── MISC ────────────────────────────────── */
.empty-msg { color:var(--grey); font-size:0.88rem; text-align:center; padding:2rem 0; }
code { background:var(--dark-4); border-radius:4px; font-size:0.85em; padding:0.1em 0.4em; color:var(--gold); }

/* ── BIZUM ORDERS ────────────────────────── */
.bizum-order-card {
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.2s;
}
.bizum-order-card:hover { border-color: var(--gold); }
.bizum-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bizum-order-header strong { color: var(--text-primary); font-size: 1rem; }
.bizum-order-date { font-size: 0.78rem; color: var(--text-secondary); }
.bizum-order-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.bizum-order-code { font-family: monospace; color: var(--gold); font-size: 0.78rem; }
.bizum-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-left: 0.5rem;
}
.bizum-status-badge.pending { background: rgba(251,191,36,0.15); color: #fbbf24; }
.bizum-status-badge.sent    { background: rgba(74,222,128,0.15); color: #4ade80; }

/* ── CUENTAS BIZUM ───────────────────────── */
.bizum-accounts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
#bizum-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.ba-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  transition: border-color 0.2s;
}
.ba-card.active { border-color: var(--gold); }
.ba-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.ba-card-num {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  min-width: 24px;
}
.ba-label-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  color: var(--text);
  font-size: 0.82rem;
  min-width: 80px;
}
.ba-number-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  font-family: monospace;
  letter-spacing: 0.05em;
}
/* Toggle switch */
.ba-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.ba-toggle input { opacity: 0; width: 0; height: 0; }
.ba-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.ba-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.ba-toggle input:checked + .ba-toggle-slider { background: var(--gold); }
.ba-toggle input:checked + .ba-toggle-slider::before { transform: translateX(16px); }

/* Card header sub-layout */
.ba-card-header { flex-direction: column; gap: 0.5rem; }
.ba-card-left  { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.ba-card-right { width: 100%; }
.ba-number-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.4rem;
}
.ba-number-icon { font-size: 0.9rem; flex-shrink: 0; }
.ba-number-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  font-family: monospace;
  letter-spacing: 0.05em;
  outline: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.ba-order-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.ba-badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 20px;
}
.ba-badge.pending { background: rgba(251,191,36,0.15); color: #fbbf24; }
.ba-badge.sent    { background: rgba(74,222,128,0.15);  color: #4ade80; }

/* Quota rows */
.ba-quotas { display: flex; flex-direction: column; gap: 0.3rem; }
.ba-quota-row {
  display: grid;
  grid-template-columns: 1fr 56px auto;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.ba-quota-label { color: var(--text-secondary); }
.ba-quota-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
}
.ba-quota-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.7rem;
  white-space: nowrap;
  min-width: 68px;
}
.ba-sold      { color: var(--text-secondary); }
.ba-remaining { color: #4ade80; }
.ba-remaining.ba-full { color: #f87171; }
.ba-quota-bar {
  grid-column: 1/-1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.1rem;
}
.ba-quota-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.3s; }

/* Summary chips */
#bizum-accounts-summary { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.bizum-accounts-summary-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ba-summary-chip {
  display: flex; flex-direction: column; align-items: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.3rem 0.7rem; font-size: 0.75rem; min-width: 80px;
}
.ba-chip-name { color: var(--text-secondary); font-size: 0.72rem; margin-bottom: 0.1rem; }
.ba-chip-num  { font-weight: 700; color: var(--gold); font-size: 0.95rem; }
.ba-chip-bar  { width: 100%; height: 3px; background: var(--border); border-radius: 2px; margin-top: 0.2rem; overflow: hidden; }
.ba-chip-fill { height: 100%; background: var(--gold); border-radius: 2px; }
.ba-chip-label { color: var(--text-secondary); margin-bottom: 0.2rem; }
.ba-chip-val   { font-weight: 700; color: var(--gold); font-size: 1rem; }
.ba-chip-sub   { color: var(--text-secondary); font-size: 0.7rem; }

/* ── CONTENIDO WEB ───────────────────────── */
#sections-visibility-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.vis-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.vis-label  { flex: 1; font-size: 0.88rem; }
.vis-status { font-size: 0.78rem; min-width: 52px; text-align: right; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar: 0px; }
  /* .admin-panel seguía en flex-direction:row (valor por defecto, nunca
     sobreescrito aquí) — la sidebar (position:static) y el contenido
     principal competían por el mismo espacio horizontal en vez de apilarse,
     dejando la sidebar encima del contenido de forma ilegible. */
  .admin-panel { flex-direction: column; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 0; }
  .admin-brand { padding: 0.6rem 1rem; }
  /* Barra de navegación con scroll horizontal (una sola fila) en vez de
     envolver 13 botones en varias filas — eso se comía media pantalla de
     scroll antes de llegar a ver ningún contenido. */
  .admin-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.6rem;
    gap: 0.3rem;
    scrollbar-width: thin;
  }
  /* .admin-nav-btn tiene width:100% en la regla de escritorio (pensada para
     ocupar toda la sidebar vertical) — sin anularlo aquí, cada botón
     reclamaba el 100% del ancho también en la fila horizontal, tapando el
     resto y rompiendo el scroll. */
  .admin-nav-btn { flex: 0 0 auto; width: auto; white-space: nowrap; padding: 0.55rem 0.9rem; font-size: 0.82rem; }
  .admin-sidebar-footer { flex-direction: row; justify-content: space-between; align-items: center; padding: 0.6rem 1rem; }
  .admin-main { margin-left: 0; padding: 1rem; max-width: 100%; }
  .dashboard-row { grid-template-columns: 1fr; }
  .poll-row { grid-template-columns: 20px 90px 1fr 70px; }
  .schedule-editor-row { flex-wrap: wrap; }
  .sch-time { width: 70px !important; }
  .sch-icon { width: 55px !important; }
  /* Formularios con 2 columnas fijas escritas inline en el HTML (ej. "Nuevo
     tipo de pase") — no responden a media queries por defecto; se apilan
     a 1 columna igualmente con este selector de atributo. */
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* ── EDITOR PROGRAMA DEL DÍA ─────────────── */
.schedule-editor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  transition: border-color 0.2s;
}
.schedule-editor-row:hover { border-color: var(--gold); }
.schedule-editor-row.dragging { opacity: 0.4; border-style: dashed; }
.sch-drag-handle {
  cursor: grab;
  color: var(--text-secondary);
  font-size: 1.1rem;
  user-select: none;
  padding: 0 2px;
  flex-shrink: 0;
}
.sch-drag-handle:active { cursor: grabbing; }
.sch-time  { width: 80px;  flex-shrink: 0; text-align: center; }
.sch-icon  { width: 60px;  flex-shrink: 0; text-align: center; }
.sch-title { flex: 1 1 140px; }
.sch-desc  { flex: 2 1 200px; }
.schedule-editor-row .admin-input {
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
}


/* ── SHOP ADMIN ── */
.shop-product-card { background:var(--bg-card); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:1rem; display:flex; gap:1rem; align-items:flex-start; margin-bottom:0.75rem; }
.shop-product-card img { width:64px; height:64px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.shop-product-card .sp-no-img { width:64px; height:64px; background:rgba(255,255,255,0.06); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:1.8rem; flex-shrink:0; }
.sp-info { flex:1; }
.sp-info h4 { margin:0 0 0.25rem; font-size:0.95rem; }
.sp-info p { margin:0; font-size:0.82rem; color:var(--text-secondary); }
.sp-meta { display:flex; gap:0.75rem; flex-wrap:wrap; margin-top:0.4rem; font-size:0.8rem; }
.sp-price { color:var(--gold); font-weight:700; }
.sp-stock { color:#4ade80; }
.sp-stock.low { color:#ff9800; }
.sp-stock.zero { color:#e53935; }
.sp-inactive { opacity:0.5; }
.sp-actions { display:flex; gap:0.5rem; flex-shrink:0; flex-direction:column; }
.shop-order-card { background:var(--bg-card); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:1rem; margin-bottom:0.75rem; cursor:pointer; transition:border-color 0.2s; }
.shop-order-card:hover, .shop-order-card.active { border-color:var(--gold); }
.shop-order-header { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:0.5rem; }
.shop-order-body { margin-top:0.5rem; display:flex; flex-wrap:wrap; gap:0.5rem 1.5rem; font-size:0.85rem; color:var(--text-secondary); }
.shop-status-badge { font-size:0.75rem; padding:0.2rem 0.6rem; border-radius:20px; font-weight:600; }
.shop-status-badge.pending   { background:rgba(255,152,0,0.15); color:#ff9800; }
.shop-status-badge.delivered { background:rgba(74,222,128,0.15); color:#4ade80; }
.btn-admin-success { background:#27ae60; color:#fff; border:none; border-radius:10px; padding:0.6rem 1.2rem; font-weight:700; cursor:pointer; font-size:0.88rem; }
.btn-admin-success:hover { background:#219a52; }
.btn-admin-filter { background:rgba(255,255,255,0.06); color:var(--text-secondary); border:1px solid rgba(255,255,255,0.12); border-radius:8px; padding:0.4rem 0.9rem; font-size:0.82rem; cursor:pointer; transition:all 0.15s; }
.btn-admin-filter.active, .btn-admin-filter:hover { background:rgba(212,175,55,0.15); color:var(--gold); border-color:var(--gold); }

/* ── EVENTOS ─────────────────────────────── */
.event-card { background: var(--dark-3); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; transition: border-color 0.2s; }
.event-card:hover { border-color: rgba(212,160,23,0.3); }
.event-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.event-card-flyer-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); flex-shrink: 0; }
.event-card-info { flex: 1; min-width: 180px; }
.event-card-name { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 0.2rem; }
.event-card-meta { font-size: 0.82rem; color: var(--grey); }
.event-card-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; flex-shrink: 0; align-items: center; }
.event-card-stats { display: flex; gap: 1.5rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.event-stat { display: flex; flex-direction: column; }
.event-stat-val { font-size: 1.1rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.event-stat-lbl { font-size: 0.74rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.03em; }
.event-ticket-mini { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.event-ticket-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 0.2rem 0.65rem; font-size: 0.78rem; color: var(--grey-l); }
.event-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.event-status-badge { display: inline-block; padding: 0.22rem 0.7rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.event-status-draft     { background: rgba(150,150,150,0.15); color: #aaa; border: 1px solid rgba(150,150,150,0.3); }
.event-status-published { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid rgba(76,175,80,0.4); }
.event-status-paused    { background: rgba(255,152,0,0.15); color: #ff9800; border: 1px solid rgba(255,152,0,0.4); }
.event-status-archived  { background: rgba(229,57,53,0.12); color: #e57373; border: 1px solid rgba(229,57,53,0.3); }
.event-status-live      { background: rgba(76,175,80,0.25); color: #66bb6a; border: 1px solid rgba(76,175,80,0.5); animation: evt-pulse 2s infinite; }
@keyframes evt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.event-tickets-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 700px; }
.event-tickets-table th { background: rgba(255,255,255,0.04); color: var(--grey); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; padding: 0.55rem 0.7rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.event-tickets-table td { padding: 0.4rem 0.5rem; vertical-align: middle; border-bottom: 1px solid rgba(255,255,255,0.05); }
.event-tickets-table tr:last-child td { border-bottom: none; }
.admin-input-sm { font-size: 0.83rem; padding: 0.35rem 0.6rem; border-radius: 7px; width: 100%; }
.poll-suggestion { display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0.9rem; background: rgba(255,255,255,0.03); border-radius: 9px; margin-bottom: 0.5rem; gap: 1rem; }
.poll-suggestion-info { display: flex; align-items: center; gap: 1rem; }
.poll-suggestion-date { font-weight: 600; color: var(--white); font-size: 0.9rem; }
.poll-suggestion-votes { background: rgba(33,150,243,0.15); color: #64b5f6; border-radius: 20px; padding: 0.15rem 0.6rem; font-size: 0.78rem; font-weight: 700; }
.btn-admin-danger { background: rgba(229,57,53,0.15); color: #e57373; border: 1px solid rgba(229,57,53,0.3); border-radius: 8px; padding: 0.4rem 0.75rem; font-size: 0.82rem; cursor: pointer; transition: background 0.15s; }
.btn-admin-danger:hover { background: rgba(229,57,53,0.28); }
