/* =============================================================
   MULTITALENT — Rock Star Producciones
   Sistema de diseño "Backstage Pass": venue oscuro iluminado por
   luz cálida de escenario. Tipografía de afiche de concierto.
   ============================================================= */

/* ---------- TOKENS ---------- */
:root {
  /* Superficies — negro cálido de sala a oscuras */
  --bg:          #0c0a09;
  --bg-2:        #100c0a;
  --surface:     #17120e;
  --surface-2:   #1f1810;
  --surface-3:   #2a2117;
  --border:      #342a1f;
  --border-2:    #46382a;

  /* Texto */
  --text:        #f7f1e5;
  --text-dim:    #a99d89;
  --text-mute:   #6f6557;

  /* Acento — rojo de escenario (color de marca Rock Star) */
  --accent:      #e62329;
  --accent-2:    #ff5b54;
  --accent-deep: #9e1217;
  --glow:        rgba(230,35,41,.32);
  --gold:        #ffc759;

  /* Semánticos */
  --green:       #36d399;
  --green-dim:   #1c5340;
  --red:         #ff5468;
  --red-dim:     #5a2330;
  --blue:        #58c6ff;
  --violet:      #b58cff;

  /* Forma */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow:   0 18px 50px -12px rgba(0,0,0,.7);
  --shadow-sm: 0 6px 22px -8px rgba(0,0,0,.6);
  --ring:     0 0 0 3px var(--glow);

  --font-display: 'Anton', 'Hanken Grotesk', sans-serif;
  --font:         'Hanken Grotesk', system-ui, sans-serif;
  --mono:         'IBM Plex Mono', ui-monospace, monospace;

  --sidebar: 256px;
  --topbar:  72px;
}

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

html, body { height: 100%; }

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

/* Atmósfera: spotlight cálido desde arriba + grano sutil */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(230,35,41,.16), transparent 70%),
    radial-gradient(700px 460px at 8% 4%, rgba(181,140,255,.07), transparent 70%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
/* Tamaño base de TODOS los íconos. Las reglas específicas
   (.btn svg, .stat__ico svg, etc.) lo sobrescriben donde aplique. */
svg { width: 18px; height: 18px; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

#app { position: relative; z-index: 1; }

/* =============================================================
   PANTALLA DE ARRANQUE
   ============================================================= */
.boot {
  position: fixed; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--bg);
}
.boot__mark {
  width: 150px; height: 150px; object-fit: cover;
  border-radius: 26px; background: #000;
  border: 1px solid var(--border-2);
  box-shadow: 0 0 70px var(--glow);
}
.boot__bars { display: flex; gap: 6px; align-items: flex-end; height: 34px; }
.boot__bars span {
  width: 6px; background: var(--accent); border-radius: 3px;
  animation: eq 1s ease-in-out infinite;
}
.boot__bars span:nth-child(2){ animation-delay: .12s; }
.boot__bars span:nth-child(3){ animation-delay: .24s; }
.boot__bars span:nth-child(4){ animation-delay: .36s; }
.boot__bars span:nth-child(5){ animation-delay: .48s; }
@keyframes eq { 0%,100%{height:8px;opacity:.5} 50%{height:34px;opacity:1} }
.boot__txt { color: var(--text-mute); font-size: 14px; letter-spacing: .04em; }

/* =============================================================
   AUTENTICACIÓN
   ============================================================= */
.auth {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth__stage {
  position: relative; overflow: hidden;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(600px 380px at 70% 12%, rgba(230,35,41,.34), transparent 72%),
    linear-gradient(180deg, #1a120b, #0c0a09);
  border-right: 1px solid var(--border);
}
.auth__stage::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 50%;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: blur(2px); opacity: .5;
}
.auth__beam {
  position: absolute; top: -120px; right: 90px;
  width: 340px; height: 620px;
  background: linear-gradient(180deg, rgba(230,35,41,.34), transparent 75%);
  transform: rotate(22deg); filter: blur(34px); pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 13px; position: relative; }
.brand__mark {
  width: 72px; height: 72px; object-fit: cover; flex-shrink: 0;
  border-radius: 15px; background: #000;
  border: 1px solid var(--border-2);
  box-shadow: 0 0 30px var(--glow);
}
.brand__name { font-family: var(--font-display); font-size: 21px; letter-spacing: .04em; line-height: 1; }
.brand__sub { font-size: 10px; letter-spacing: .32em; color: var(--accent-2); text-transform: uppercase; }

.auth__pitch { position: relative; }
.auth__pitch h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 5.4vw, 78px); line-height: .94;
  letter-spacing: .01em; text-transform: uppercase;
}
.auth__pitch h1 em { font-style: normal; color: var(--accent); }
.auth__pitch p { margin-top: 18px; max-width: 30ch; color: var(--text-dim); font-size: 15px; }
.auth__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.auth__tag {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 12px; border: 1px solid var(--border-2); border-radius: 20px;
  color: var(--text-dim);
}
.auth__foot { font-size: 12px; color: var(--text-mute); position: relative; }

.auth__panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; background: var(--bg);
}
.auth__card { width: 100%; max-width: 380px; }
/* Logo en el login — solo visible en móvil (en desktop ya está en el panel izquierdo) */
.auth__cardlogo { display: none; text-align: center; margin-bottom: 26px; }
.auth__cardlogo img {
  width: 128px; height: 128px; margin: 0 auto;
  border-radius: 26px; background: #000;
  border: 1px solid var(--border-2);
  box-shadow: 0 0 56px var(--glow);
}
.auth__card h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .02em; }
.auth__card > p { color: var(--text-dim); font-size: 14px; margin: 6px 0 26px; }
.auth__switch { margin-top: 22px; text-align: center; font-size: 14px; color: var(--text-dim); }
.auth__switch button { color: var(--accent); font-weight: 700; }

/* =============================================================
   ESTRUCTURA DE LA APP
   ============================================================= */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: var(--topbar) 1fr;
  grid-template-areas: "side top" "side main";
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.side {
  grid-area: side;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side__brand {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.side__nav { padding: 16px 14px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; }
.side__label {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute); padding: 16px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: var(--r-sm);
  color: var(--text-dim); font-weight: 600; font-size: 14.5px;
  position: relative; transition: background .16s, color .16s;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.is-active { background: var(--surface-3); color: var(--text); }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 4px; border-radius: 0 4px 4px 0;
  background: var(--accent); box-shadow: 0 0 16px var(--accent);
}
.nav-item.is-active svg { color: var(--accent); }
.nav-item__badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--accent); color: #fff;
  padding: 1px 8px; border-radius: 20px;
}
.side__foot { padding: 14px; border-top: 1px solid var(--border); }
.userchip {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px;
  border-radius: var(--r-sm); background: var(--surface-2);
}
.userchip__av {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-content: center; font-family: var(--font-display);
  font-size: 16px; color: #1a0e04;
  background: linear-gradient(150deg, var(--gold), var(--accent));
}
.userchip__name { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.userchip__role { font-size: 11px; color: var(--text-mute); text-transform: capitalize; }
.userchip button { margin-left: auto; color: var(--text-mute); padding: 5px; border-radius: 7px; }
.userchip button:hover { color: var(--red); background: var(--red-dim); }

/* ---- TOPBAR ---- */
.top {
  grid-area: top;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(12,10,9,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.top__menu { display: none; }
.top__title { font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .03em; }
.top__spacer { flex: 1; }
.eventpick {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r); padding: 7px 10px 7px 14px;
}
.eventpick__label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
.eventpick select {
  background: none; border: none; color: var(--text); font-weight: 700;
  font-size: 13.5px; max-width: 230px; cursor: pointer; outline: none;
}
.eventpick select option { background: var(--surface-2); }

/* ---- MAIN ---- */
.main { grid-area: main; padding: 30px 36px 90px; max-width: 1340px; width: 100%; }
.page__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 26px; flex-wrap: wrap;
}
.page__title { font-family: var(--font-display); font-weight: 400; font-size: 38px; letter-spacing: .02em; line-height: 1; }
.page__sub { color: var(--text-dim); font-size: 14px; margin-top: 7px; }
.page__sub b { color: var(--accent-2); font-weight: 700; }

/* =============================================================
   BOTONES
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 14px; white-space: nowrap;
  border: 1px solid transparent; transition: transform .12s, filter .16s, background .16s;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary {
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 8px 22px -8px var(--glow);
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--danger { background: var(--red-dim); color: #ffc6cd; border-color: #6e2c39; }
.btn--danger:hover { background: #6e2c39; }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 13px; font-size: 13px; }
.btn:disabled { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-content: center; color: var(--text-dim);
  border: 1px solid transparent; transition: .15s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn--danger:hover { background: var(--red-dim); color: var(--red); }
.icon-btn--accent:hover { background: var(--surface-3); color: var(--accent); }

/* =============================================================
   TARJETAS / GRIDS
   ============================================================= */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--r);
}

.grid { display: grid; gap: 18px; }
.grid--stats { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); }
.grid--events { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

/* Animación de entrada escalonada */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .5s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---- STAT CARD ---- */
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px 18px 20px;
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
}
.stat__top { display: flex; align-items: center; justify-content: space-between; }
.stat__ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-content: center; color: var(--accent);
  background: var(--surface-3); border: 1px solid var(--border-2);
}
.stat__ico svg { width: 19px; height: 19px; }
.stat__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); }
.stat__value {
  font-family: var(--font-display); font-weight: 400;
  font-size: 40px; line-height: 1; margin-top: 12px; letter-spacing: .01em;
}
.stat__value small { font-size: 18px; color: var(--text-dim); }
.stat__foot { font-size: 12.5px; color: var(--text-dim); margin-top: 7px; }
.stat--accent .stat__value { color: var(--accent); }
.stat--green  .stat__value { color: var(--green); }
.stat--green  .stat__ico   { color: var(--green); }
.stat--red    .stat__value { color: var(--red); }
.stat--red    .stat__ico   { color: var(--red); }

/* ---- EVENT CARD ---- */
.ev {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); transition: transform .18s, border-color .18s;
  cursor: pointer;
}
.ev:hover { transform: translateY(-4px); border-color: var(--border-2); }
.ev__cover {
  height: 152px; position: relative;
  background: linear-gradient(135deg, var(--surface-3), #120d08);
  display: grid; place-content: center;
}
.ev__cover img { width: 100%; height: 100%; object-fit: cover; }
.ev__cover-fallback { font-family: var(--font-display); font-size: 46px; color: var(--border-2); }
.ev__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12,10,9,.92));
}
.ev__status {
  position: absolute; top: 12px; left: 12px; z-index: 2;
}
.ev__body { padding: 16px 17px 17px; }
.ev__name { font-weight: 800; font-size: 16.5px; line-height: 1.25; }
.ev__meta { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.ev__row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.ev__row svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.ev__row b { color: var(--text); font-weight: 700; }
.ev__stats {
  display: flex; gap: 18px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ev__stat { font-size: 12px; color: var(--text-mute); }
.ev__stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 21px; color: var(--text); }
.ev__actions { display: flex; gap: 8px; margin-top: 14px; }

/* =============================================================
   PILLS / BADGES
   ============================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 11px; border-radius: 20px; text-transform: uppercase;
  border: 1px solid transparent;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--green   { background: var(--green-dim); color: var(--green); }
.pill--amber   { background: #4a3410; color: var(--gold); }
.pill--red     { background: var(--red-dim);  color: var(--red); }
.pill--mute    { background: var(--surface-3); color: var(--text-dim); }
.pill--blue    { background: #14384d; color: var(--blue); }
.pill--violet  { background: #2e2148; color: var(--violet); }
.pill--no-dot::before { display: none; }

/* =============================================================
   TABLAS
   ============================================================= */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 700;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.table tbody tr { transition: background .13s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-family: var(--mono); font-size: 13px; }
.cell-strong { font-weight: 700; }
.cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.code-tag {
  font-family: var(--mono); font-weight: 600; font-size: 13px;
  color: var(--accent-2); letter-spacing: .02em;
}

/* Avatar / mini círculo */
.av {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-content: center; overflow: hidden; position: relative;
  background: var(--surface-3); color: var(--accent);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av svg { width: 17px; height: 17px; }
.with-av { display: flex; align-items: center; gap: 11px; }

/* Fila expandible (actos -> integrantes) */
.subrow td { background: var(--bg-2); padding: 0 !important; }
.subrow__inner { padding: 16px 20px 20px; }
.subrow__title {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700; margin-bottom: 12px;
}
.member-line {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 7px;
}
.member-line__n {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: grid; place-content: center; font-size: 12px; font-weight: 700;
  background: var(--surface-3); color: var(--accent);
}
.member-line__meta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.member-line__time { font-size: 12px; color: var(--text-mute); }

/* =============================================================
   SEGMENTOS / FILTROS
   ============================================================= */
.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.seg button {
  padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 13.5px;
  color: var(--text-dim); transition: .14s;
}
.seg button.is-active { background: var(--accent); color: #fff; }
.seg button:not(.is-active):hover { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  transition: .14s;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar__label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); }

/* =============================================================
   FORMULARIOS
   ============================================================= */
.search {
  position: relative; flex: 1; min-width: 220px;
}
.search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-mute);
}
.search input { padding-left: 40px; }

.field { margin-bottom: 16px; }
.field__label {
  display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 7px;
  letter-spacing: .03em; color: var(--text-dim);
}
.field__label .req { color: var(--accent); }
.field__hint { font-size: 12px; color: var(--text-mute); margin-top: 6px; }

.input, .select, .textarea {
  width: 100%; padding: 11px 13px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); color: var(--text); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.textarea { resize: vertical; min-height: 78px; }
select.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23a99d89' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.select option { background: var(--surface-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Selector de categoría tipo tarjeta */
.optgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px,1fr)); gap: 9px; }
.optcard {
  padding: 14px 8px; border-radius: var(--r-sm); text-align: center;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-dim); transition: .14s;
}
.optcard svg { width: 20px; height: 20px; margin: 0 auto 6px; }
.optcard span { font-size: 12.5px; font-weight: 700; }
.optcard:hover { color: var(--text); }
.optcard.is-active {
  border-color: var(--accent); color: var(--accent);
  background: var(--surface-3); box-shadow: var(--ring);
}

/* Caja resaltada (registro de pago, notas) */
.callout {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent); border-radius: var(--r-sm);
  padding: 14px; font-size: 13px; color: var(--text-dim);
}
.callout--accent { border-left-color: var(--gold); background: #2a1f0d; }
.callout b { color: var(--text); }

/* Subida de imagen */
.dropzone {
  border: 1.5px dashed var(--border-2); border-radius: var(--r);
  padding: 26px; text-align: center; color: var(--text-mute);
  transition: .15s; cursor: pointer;
}
.dropzone:hover { border-color: var(--accent); color: var(--text-dim); }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 9px; color: var(--accent); }
.dropzone b { color: var(--accent); }

/* =============================================================
   MODAL
   ============================================================= */
.modal-bg {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,5,4,.74); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 480px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  animation: pop .26s cubic-bezier(.2,.8,.3,1);
}
.modal--wide { max-width: 620px; }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal__title { font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .03em; }
.modal__body { padding: 22px; }
.modal__foot {
  display: flex; gap: 10px; padding: 16px 22px;
  border-top: 1px solid var(--border);
}
.modal__foot .btn { flex: 1; }

/* =============================================================
   TICKET STUB — entrada física
   ============================================================= */
.stub {
  --notch: var(--bg-2);
  border-radius: var(--r); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-2);
}
.stub__top {
  position: relative; padding: 20px;
  background:
    radial-gradient(420px 220px at 80% -20%, rgba(230,35,41,.4), transparent 70%),
    linear-gradient(150deg, #2a1c10, #160f08);
}
.stub__kicker { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-2); }
.stub__event { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.04; margin-top: 4px; }
.stub__name { font-size: 22px; font-weight: 800; margin-top: 14px; }
.stub__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; margin-top: 16px;
}
.stub__k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mute); }
.stub__v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.stub__tear {
  position: relative; height: 24px;
  background: var(--surface);
}
.stub__tear::before, .stub__tear::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--notch);
}
.stub__tear::before { left: -12px; }
.stub__tear::after  { right: -12px; }
.stub__perf {
  position: absolute; left: 18px; right: 18px; top: 50%;
  border-top: 2px dashed var(--border-2);
}
.stub__bottom { padding: 8px 20px 24px; text-align: center; background: var(--surface); }
.stub__qr {
  width: 168px; height: 168px; margin: 8px auto 14px;
  background: #fff; border-radius: 12px; padding: 10px;
  display: grid; place-content: center;
}
.stub__qr img { width: 100%; height: 100%; }
.stub__qr-fallback { font-family: var(--mono); font-size: 12px; color: #1a0e04; word-break: break-all; }
.stub__code {
  font-family: var(--mono); font-weight: 600; font-size: 26px;
  letter-spacing: .14em; color: var(--accent);
}
.stub__hint { font-size: 12px; color: var(--text-mute); margin-top: 4px; }

/* =============================================================
   CONTROL DE ACCESO
   ============================================================= */
.scanner { max-width: 540px; margin: 0 auto; }
.scan-stage {
  aspect-ratio: 1; max-width: 320px; margin: 0 auto;
  border-radius: var(--r-lg); overflow: hidden; position: relative;
  background: #000; border: 1px solid var(--border-2);
  display: grid; place-content: center;
}
.scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.scan-stage__idle { text-align: center; color: var(--text-mute); padding: 24px; }
.scan-stage__idle svg { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--border-2); }
.scan-frame {
  position: absolute; inset: 16%;
  border: 2px solid var(--accent); border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
}
.scan-frame::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: var(--accent); box-shadow: 0 0 14px var(--accent);
  animation: scanline 2.2s ease-in-out infinite;
}
@keyframes scanline { 0%,100% { top: 4%; } 50% { top: 94%; } }

.scan-result {
  border-radius: var(--r); padding: 20px; margin-top: 18px;
  border: 1px solid var(--border-2); background: var(--surface);
  display: flex; align-items: center; gap: 16px;
  animation: pop .3s cubic-bezier(.2,.8,.3,1);
}
.scan-result__ico {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-content: center;
}
.scan-result__ico svg { width: 28px; height: 28px; }
.scan-result--ok      { border-color: var(--green-dim); background: linear-gradient(120deg,#10261d,var(--surface)); }
.scan-result--ok      .scan-result__ico { background: var(--green-dim); color: var(--green); }
.scan-result--warn    { border-color: #4a3410; background: linear-gradient(120deg,#231806,var(--surface)); }
.scan-result--warn    .scan-result__ico { background: #4a3410; color: var(--gold); }
.scan-result--bad     { border-color: var(--red-dim); background: linear-gradient(120deg,#26121a,var(--surface)); }
.scan-result--bad     .scan-result__ico { background: var(--red-dim); color: var(--red); }
.scan-result__title { font-weight: 800; font-size: 16px; }
.scan-result__sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* =============================================================
   REPORTES
   ============================================================= */
.bar-row { margin-bottom: 14px; }
.bar-row__head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar-row__head b { font-family: var(--mono); }
.bar-track { height: 12px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.bar-fill--green { background: linear-gradient(90deg, #5be0ad, var(--green)); }
.bar-fill--violet { background: linear-gradient(90deg, #cbb0ff, var(--violet)); }

.ledger {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.ledger:last-child { border-bottom: none; }
.ledger__k { color: var(--text-dim); font-size: 14px; }
.ledger__v { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.ledger--total .ledger__k { color: var(--text); font-weight: 700; }
.ledger--total .ledger__v { color: var(--accent); font-size: 32px; }

/* =============================================================
   ESTADOS VACÍOS / VARIOS
   ============================================================= */
.empty {
  text-align: center; padding: 60px 24px; color: var(--text-mute);
}
.empty__ico {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--border-2);
}
.empty__ico svg { width: 32px; height: 32px; }
.empty h3 { font-size: 18px; color: var(--text); font-weight: 800; }
.empty p { font-size: 14px; margin: 6px 0 18px; }

.section-skel {
  height: 120px; border-radius: var(--r);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%; animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }

.divider { height: 1px; background: var(--border); margin: 22px 0; }
.muted { color: var(--text-mute); }
.center-pad { padding: 28px; }
.hstack { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mt-18 { margin-top: 18px; }
.mb-18 { margin-bottom: 18px; }

/* =============================================================
   TOASTS
   ============================================================= */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  animation: toastin .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes toastin { from { opacity: 0; transform: translateX(40px); } }
.toast.is-out { animation: toastout .25s ease forwards; }
@keyframes toastout { to { opacity: 0; transform: translateX(40px); } }
.toast__ico { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast--ok   { border-left: 3px solid var(--green); }
.toast--ok   .toast__ico { color: var(--green); }
.toast--err  { border-left: 3px solid var(--red); }
.toast--err  .toast__ico { color: var(--red); }
.toast--info { border-left: 3px solid var(--accent); }
.toast--info .toast__ico { color: var(--accent); }
.toast__msg { font-size: 13.5px; }

/* ---- BOTTOM NAV (móvil) ---- */
.botnav { display: none; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1080px) {
  .auth { grid-template-columns: 1fr; }
  .auth__stage { display: none; }
  .auth__cardlogo { display: block; }
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "main";
  }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 90;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .side.is-open { transform: none; box-shadow: var(--shadow); }
  .scrim {
    position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6);
    backdrop-filter: blur(2px);
  }
  .top__menu { display: grid; }
  .main { padding: 22px 16px 110px; }
  .page__title { font-size: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .eventpick__label { display: none; }
  .eventpick select { max-width: 150px; }

  .botnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(16,12,10,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .botnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; color: var(--text-mute); font-size: 10.5px; font-weight: 700;
  }
  .botnav button svg { width: 21px; height: 21px; }
  .botnav button.is-active { color: var(--accent); }
}

@media (max-width: 560px) {
  .page__head { align-items: stretch; }
  .page__head .btn { width: 100%; }
  .modal-bg { padding: 14px; }
  .grid--events { grid-template-columns: 1fr; }
  .stat__value { font-size: 34px; }
}

/* =============================================================
   PWA — INSTALACIÓN
   ============================================================= */

/* Botón llamada a la acción (login y barra lateral) */
.pwa-cta {
  width: 100%; display: flex; align-items: center; gap: 12px;
  text-align: left; padding: 13px 14px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  border: 1px solid var(--border-2); color: var(--text);
  transition: border-color .15s, transform .12s;
}
.pwa-cta:hover { border-color: var(--accent); }
.pwa-cta:active { transform: scale(.99); }
.pwa-cta__ic {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-content: center;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  color: #fff; box-shadow: 0 6px 18px -6px var(--glow);
}
.pwa-cta__ic svg { width: 20px; height: 20px; }
.pwa-cta__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pwa-cta__tx b { font-size: 14px; font-weight: 800; }
.pwa-cta__tx span { font-size: 12px; color: var(--text-dim); }
.pwa-cta > svg:last-child { color: var(--text-mute); }
.pwa-cta--auth { margin-top: 22px; }
.pwa-cta--side { margin-bottom: 10px; padding: 11px 12px; }
.pwa-cta--side .pwa-cta__ic { width: 34px; height: 34px; }

/* Modal del flujo de instalación */
.pwa-flow { max-width: 380px; text-align: center; }
.pwa-flow__logo {
  width: 96px; height: 96px; margin: 4px auto 18px;
  border-radius: 22px; background: #000;
  border: 1px solid var(--border-2);
  box-shadow: 0 0 50px var(--glow);
  transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.pwa-flow__logo.is-done { transform: scale(1.06); }
.pwa-flow__title { font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: .02em; }
.pwa-flow__txt { color: var(--text-dim); font-size: 14px; margin: 8px 0 20px; }
.pwa-flow__txt b { color: var(--text); }
.pwa-flow__list {
  text-align: left; margin: 4px 0 20px; display: flex;
  flex-direction: column; gap: 10px;
}
.pwa-flow__step {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 13.5px; color: var(--text-dim);
}
.pwa-flow__step b {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: grid; place-content: center; font-size: 12px;
  background: var(--surface-3); color: var(--accent);
}

/* Barra de progreso de instalación */
.pwa-bar {
  height: 12px; border-radius: 8px; overflow: hidden;
  background: var(--surface-3); margin: 6px 0 18px;
}
.pwa-bar__fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 8px;
  transition: width 2.8s cubic-bezier(.4,.1,.2,1);
}
.pwa-bar__fill.is-done {
  background: linear-gradient(90deg, #5be0ad, var(--green));
  transition: width .3s, background .3s;
}

/* =============================================================
   SUBIDA DE IMAGEN (uploader)
   ============================================================= */
.uploader { border-radius: var(--r); }
.uploader.is-drag .dropzone {
  border-color: var(--accent); background: var(--surface-2); color: var(--text);
}
.uploader__preview {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border-2);
}
.uploader__preview img {
  width: 100%; max-height: 230px; object-fit: cover; display: block;
}
.uploader__overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px; padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.uploader__overlay .btn { flex: 1; }
.uploader__busy {
  border: 1.5px dashed var(--border-2); border-radius: var(--r);
  padding: 38px 20px; text-align: center; color: var(--text-dim);
}
.uploader__busy .boot__bars { justify-content: center; margin: 0 auto 14px; height: 26px; }
.uploader__busy .boot__bars span { animation: eq 1s ease-in-out infinite; }

/* Sello de éxito */
.pwa-check {
  width: 76px; height: 76px; margin: 0 auto 16px;
  border-radius: 50%; display: grid; place-content: center;
  background: var(--green-dim); color: var(--green);
  animation: pop .4s cubic-bezier(.2,.8,.3,1);
}
.pwa-check svg { width: 38px; height: 38px; }

