/* Eventos (pantallas/eventos.js): lo vendido en cada evento de la plataforma cashless, en gráficos.
   Estética Arc y sus piezas de gráfico (pestañas con raya, línea con relleno, donut). Para los datos,
   el verde del resumen de Arc (oklch 52% .16 150, el de «Facturado por meses»), usado con suavidad: rellenos
   claros que se desvanecen, y el verde entero solo en el trazo y en lo elegido (Vidal, 25-11-2026:
   «ese verde es muy fuerte»). La escala sale de mezclar ese verde con
   la superficie, así que el tema oscuro sale solo. */

.ev-raiz {
  --ev-r: 22px; --ev-gap: 16px;
  --ev-g: oklch(52% .16 150);
  --ev-v0: color-mix(in oklab, var(--ev-g) 8%, var(--fc-card));
  --ev-v1: color-mix(in oklab, var(--ev-g) 16%, var(--fc-card));
  --ev-v2: color-mix(in oklab, var(--ev-g) 32%, var(--fc-card));
  --ev-v3: color-mix(in oklab, var(--ev-g) 55%, var(--fc-card));
  --ev-v4: color-mix(in oklab, var(--ev-g) 78%, var(--fc-card));
  --ev-v5: var(--ev-g);
  --ev-sobre-fuerte: #ffffff; --ev-sobre-suave: oklch(32% .08 150); --ev-tinta-verde: oklch(45% .13 150);
  display: grid; gap: var(--ev-gap); min-width: 0;
}
html[data-theme="dark"] .ev-raiz { --ev-g: oklch(78% .17 150); --ev-sobre-fuerte: oklch(22% .05 150); --ev-sobre-suave: oklch(92% .05 150); --ev-tinta-verde: oklch(80% .15 150); }
.ev-raiz * { box-sizing: border-box; }
.ev-raiz .ev-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Cabecera ---------- */
.ev-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ev-cab h1 { margin: 0; font-family: var(--arc-display, inherit); font-weight: 500; letter-spacing: -.035em; }
.ev-cab p { margin: 4px 0 0; color: var(--fc-muted); font-size: 14px; }
.ev-volver { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 6px 12px 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 13.5px; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease, color var(--arc-fast, 160ms) ease; }
.ev-volver:hover { background: var(--fc-selected); color: var(--fc-ink); }
.ev-acciones { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-sync { font-size: 12.5px; color: var(--fc-muted); }
.ev-sync.ok::before, .ev-sync.va::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--fc-success, #3d8a5a); vertical-align: 1px; }
.ev-sync.va::before { background: var(--fc-warning, #b7791f); animation: ev-latido 1.2s ease-in-out infinite; }
.ev-sync.mal { color: var(--fc-error, #c0392b); }
@keyframes ev-latido { 50% { opacity: .35; } }
.ev-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--fc-border); background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease, transform 80ms ease; }
.ev-btn:hover { background: var(--fc-row-hover); }
.ev-btn:active { transform: scale(.98); }
.ev-btn.primario { background: var(--fc-primary); color: var(--fc-on-primary); border-color: transparent; }
.ev-btn.primario:hover { filter: brightness(1.15); }
.ev-btn[disabled] { opacity: .55; cursor: default; }
.ev-btn svg { flex: none; }
.ev-btn.girando svg { animation: ev-gira 900ms linear infinite; }
@keyframes ev-gira { to { transform: rotate(360deg); } }

/* ---------- Bloques ---------- */
.ev-bloque { min-width: 0; border: 1px solid var(--fc-border); border-radius: var(--ev-r); background: var(--fc-card); overflow: hidden; animation: arc-entrada var(--arc-considered, 480ms) var(--arc-ease-enter, ease) both; }
.ev-bloque-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 22px 4px; }
.ev-bloque-cab h2 { margin: 0; font-family: var(--arc-display, inherit); font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.ev-bloque-cab p { margin: 2px 0 0; font-size: 12.5px; color: var(--fc-muted); }
.ev-cuerpo { padding: 12px 22px 22px; }
.ev-rejilla { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--ev-gap); }
.ev-rejilla.mitad { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* ---------- Filtros: una sola fila encima de los gráficos ---------- */
.ev-filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--fc-border); border-radius: 18px; background: var(--fc-card); }
.ev-filtro { position: relative; }
.ev-filtro > button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; max-width: 260px; padding: 0 12px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 13.5px; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease, border-color var(--arc-fast, 160ms) ease; }
.ev-filtro > button:hover { background: var(--fc-row-hover); }
.ev-filtro > button small { color: var(--fc-muted); font-size: 12.5px; }
.ev-filtro > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-filtro.activo > button { background: var(--ev-v5); color: var(--ev-sobre-fuerte); border-color: transparent; }
.ev-filtro.activo > button small { color: inherit; opacity: .7; }
.ev-filtro > button .ev-flecha { display: inline-flex; flex: none; opacity: .6; transition: transform var(--arc-fast, 160ms) ease; }
.ev-filtro.abierto > button .ev-flecha { transform: rotate(180deg); }
.ev-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 280px; max-width: calc(100vw - 32px); max-height: 360px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--fc-border); border-radius: 16px; background: var(--fc-card); box-shadow: 0 18px 40px -12px oklch(0% 0 0 / .22), 0 2px 6px oklch(0% 0 0 / .06); animation: ev-menu-entra 160ms var(--arc-ease, ease) both; }
@keyframes ev-menu-entra { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ev-menu input { width: 100%; min-height: 38px; margin: 0 0 6px; padding: 0 12px; border: 1px solid var(--fc-border); border-radius: 10px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; }
.ev-menu ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.ev-menu li button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.ev-menu li button:hover, .ev-menu li button.foco { background: var(--fc-selected); }
.ev-menu li button.elegido { font-weight: 600; }
.ev-menu li button small { color: var(--fc-muted); font-size: 12px; }
.ev-menu .ev-menu-vacio { padding: 10px; color: var(--fc-muted); font-size: 13px; }
.ev-menu .ev-menu-grupo { padding: 8px 10px 4px; color: var(--fc-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ev-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--fc-selected); }
.ev-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: color var(--arc-fast, 160ms) ease, background-color var(--arc-fast, 160ms) ease, box-shadow var(--arc-fast, 160ms) ease; }
.ev-seg button:hover { color: var(--fc-ink); }
.ev-seg button.activo { background: var(--fc-card); color: var(--fc-ink); box-shadow: 0 1px 2px oklch(0% 0 0 / .08), 0 0 0 .5px oklch(0% 0 0 / .05); }
.ev-filtros .ev-seg { margin-left: auto; }
.ev-quitar { min-height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ev-quitar:hover { color: var(--fc-ink); }

/* ---------- Cifras clave ---------- */
.ev-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--fc-border); }
.ev-kpi { display: grid; gap: 4px; padding: 18px 22px 20px; border-right: 1px solid var(--fc-border); min-width: 0; }
.ev-kpi:last-child { border-right: 0; }
.ev-kpi-nombre { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fc-muted); }
.ev-kpi-nombre svg { flex: none; box-sizing: content-box; padding: 6px; border-radius: 9px; background: var(--ev-v0); color: var(--ev-tinta-verde); }
.ev-kpi-cifra { font-family: var(--arc-display, inherit); font-size: clamp(22px, 1.6vw + 8px, 30px); font-weight: 400; letter-spacing: -.045em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-kpi small { font-size: 12.5px; color: var(--fc-muted); font-variant-numeric: tabular-nums; }

/* ---------- Barras por jornada ---------- */
.ev-jornadas { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); height: 230px; padding: 26px 22px 34px 10px; }
.ev-ejes { position: relative; }
.ev-ejes span { position: absolute; right: 10px; transform: translateY(50%); font-size: 11px; color: var(--fc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-barras { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: clamp(3px, .5vw, 7px); height: 100%; }
.ev-barras::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to top, var(--fc-border) 0 1px, transparent 1px 25%); pointer-events: none; }
.ev-dia { position: relative; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.ev-dia .barra { position: absolute; left: 3%; right: 3%; bottom: 0; height: var(--h); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--ev-v2), var(--ev-v0)); box-shadow: inset 0 2px 0 var(--ev-g); transform-origin: bottom; animation: arc-barra-sube 800ms var(--arc-spring, cubic-bezier(.34,1.3,.64,1)) both; animation-delay: calc(var(--i) * 45ms + 120ms); transition: background-color var(--arc-fast, 160ms) ease, opacity var(--arc-fast, 160ms) ease; }
.ev-dia:hover .barra, .ev-dia:focus-visible .barra { background: linear-gradient(180deg, var(--ev-v3), var(--ev-v1)); }
.ev-barras.con-eleccion .ev-dia:not(.elegido) .barra { background: var(--ev-v0); box-shadow: inset 0 2px 0 var(--ev-v2); }
.ev-barras.con-eleccion .ev-dia:not(.elegido):hover .barra { background: linear-gradient(180deg, var(--ev-v2), var(--ev-v0)); }
.ev-dia.elegido .barra { background: linear-gradient(180deg, var(--ev-v4), var(--ev-v2)); }
.ev-dia .etq { position: absolute; left: -6px; right: -6px; bottom: -26px; display: grid; justify-items: center; line-height: 1.1; font-size: 11px; color: var(--fc-muted); text-transform: capitalize; }
.ev-dia .etq b { font-weight: 500; color: var(--fc-ink); font-size: 12px; }
.ev-dia.elegido .etq, .ev-dia.elegido .etq b { color: var(--fc-ink); font-weight: 600; }
.ev-dia .globo { position: absolute; z-index: 3; left: 50%; bottom: calc(var(--h) + 10px); transform: translate(-50%, 4px); display: grid; gap: 1px; padding: 7px 11px; border-radius: 12px; background: var(--fc-primary); color: var(--fc-on-primary); font-size: 12px; white-space: nowrap; text-align: left; pointer-events: none; opacity: 0; transition: opacity var(--arc-fast, 160ms) ease, transform var(--arc-fast, 160ms) ease; }
.ev-dia .globo b { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-dia .globo small { opacity: .72; font-size: 11.5px; }
.ev-dia:hover .globo, .ev-dia:focus-visible .globo { opacity: 1; transform: translate(-50%, 0); }
.ev-dia:first-child .globo, .ev-dia:nth-child(2) .globo { left: 0; transform: translate(0, 4px); }
.ev-dia:last-child .globo, .ev-dia:nth-last-child(2) .globo { left: auto; right: 0; transform: translate(0, 4px); }
.ev-dia:is(:first-child, :nth-child(2), :last-child, :nth-last-child(2)):hover .globo { transform: translate(0, 0); }
.ev-dia:focus { outline: none; }
.ev-dia:focus-visible { outline: 2px solid oklch(0% 0 0 / .22); outline-offset: 2px; border-radius: 8px; }

/* ---------- Ranking (hamburgueserías y productos) ---------- */
.ev-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ev-fila { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; padding: 10px 14px 10px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--fc-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease, opacity var(--arc-fast, 160ms) ease; }
.ev-fila:hover { background: var(--ev-v0); }
.ev-fila.elegido { background: var(--ev-v0); }
.ev-ranking.con-eleccion .ev-fila:not(.elegido) { opacity: .5; }
.ev-ranking.con-eleccion .ev-fila:not(.elegido):hover { opacity: 1; }
/* La barra va debajo del nombre, fina, y nunca pasa por debajo de las cifras */
.ev-barrita { display: block; height: 6px; margin-top: 7px; border-radius: 3px; background: var(--fc-selected); overflow: hidden; }
.ev-barrita i { display: block; height: 100%; width: calc(var(--ancho) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--ev-v2), var(--ev-v4)); transform-origin: left; animation: arc-barra-crece 900ms var(--arc-ease-enter, ease) both; animation-delay: calc(var(--i) * 55ms + 150ms); }
.ev-fila.elegido .ev-barrita i, .ev-fila:hover .ev-barrita i { background: linear-gradient(90deg, var(--ev-v3), var(--ev-g)); }
.ev-pos { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fc-selected); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fc-muted); }
.ev-ranking li:nth-child(1) .ev-pos { background: var(--ev-v4); color: var(--ev-sobre-fuerte); }
.ev-ranking li:nth-child(2) .ev-pos { background: var(--ev-v2); color: var(--ev-sobre-suave); }
.ev-ranking li:nth-child(3) .ev-pos { background: var(--ev-v1); color: var(--ev-sobre-suave); }
.ev-fila-nombre { display: grid; min-width: 0; }
.ev-fila-nombre b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-fila-nombre small { font-size: 12px; color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-fila-cifra { display: grid; justify-items: end; gap: 2px; padding-left: 8px; }
.ev-fila-cifra b { font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-fila-cifra small { font-size: 12px; color: var(--fc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-etiqueta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--fc-selected); color: var(--fc-muted); font-size: 11px; font-weight: 500; vertical-align: 1px; }
.ev-mas { display: block; width: 100%; margin-top: 8px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 13px; cursor: pointer; }
.ev-mas:hover { background: var(--fc-selected); color: var(--fc-ink); }

/* ---------- Podio de las tres primeras ---------- */
.ev-podio { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 6px 0 16px; }
.ev-podio button { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--fc-ink); font: inherit; cursor: pointer; min-width: 0; }
.ev-podio .nombre { max-width: 100%; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-podio .cifra { font-size: 12.5px; color: var(--fc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-podio .peana { display: grid; place-items: center; width: 100%; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, var(--tono), var(--ev-v0)); box-shadow: inset 0 2px 0 var(--ev-g); color: var(--ev-sobre-suave); font-family: var(--arc-display, inherit); font-size: 26px; font-weight: 500; transform-origin: bottom; animation: arc-barra-sube 900ms var(--arc-spring, ease) both; animation-delay: var(--d); transition: filter var(--arc-fast, 160ms) ease; }
.ev-podio button:hover .peana { filter: saturate(1.25); }
.ev-podio .p1 .peana { height: 96px; --tono: var(--ev-v3); --d: 260ms; }
.ev-podio .p2 .peana { height: 72px; --tono: var(--ev-v2); --d: 140ms; }
.ev-podio .p3 .peana { height: 54px; --tono: var(--ev-v1); --d: 380ms; }
.ev-podio .elegido .nombre { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Donut de formas de pago ---------- */
.ev-donut { display: grid; justify-items: center; gap: 14px; }
.ev-donut-anillo { position: relative; width: 196px; height: 196px; }
.ev-donut-anillo svg { display: block; overflow: visible; }
.ev-seg-donut { fill: none; stroke-width: 26; cursor: pointer; transition: opacity var(--arc-fast, 160ms) ease, stroke-width var(--arc-fast, 160ms) ease; animation: ev-donut 900ms var(--arc-ease-enter, ease) both; }
@keyframes ev-donut { from { stroke-dasharray: 0 999; } }
.ev-donut.con-eleccion .ev-seg-donut:not(.elegido), .ev-donut.sobre .ev-seg-donut:not(.sobre) { opacity: .28; }
.ev-seg-donut.sobre, .ev-seg-donut.elegido { stroke-width: 32; }
.ev-donut-centro { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; padding: 0 40px; }
.ev-donut-centro b { font-family: var(--arc-display, inherit); font-size: 24px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ev-donut-centro span { font-size: 12px; color: var(--fc-muted); }
.ev-leyenda { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2px; }
.ev-leyenda button { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.ev-leyenda button:hover, .ev-leyenda button.elegido { background: var(--fc-selected); }
.ev-leyenda i { width: 12px; height: 12px; border-radius: 4px; }
.ev-leyenda span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-leyenda b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-leyenda small { min-width: 44px; text-align: right; color: var(--fc-muted); font-variant-numeric: tabular-nums; }

/* ---------- Mapa de calor: jornadas × horas ---------- */
.ev-calor { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; }
.ev-calor .h { font-size: 10.5px; color: var(--fc-muted); text-align: center; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.ev-calor .d { display: flex; align-items: center; font-size: 11.5px; color: var(--fc-muted); white-space: nowrap; overflow: hidden; }
.ev-calor .d.elegido { color: var(--fc-ink); font-weight: 600; }
.ev-celda { aspect-ratio: 1.35; min-height: 18px; border-radius: 5px; background: color-mix(in oklab, var(--ev-g) var(--v), var(--fc-card)); box-shadow: inset 0 0 0 1px oklch(0% 0 0 / .03); cursor: pointer; animation: ev-celda 500ms var(--arc-ease-enter, ease) both; animation-delay: calc(var(--i) * 4ms + 150ms); transition: transform 120ms ease, box-shadow 120ms ease; }
.ev-celda.cero { background: var(--fc-selected); opacity: .55; }
.ev-celda:hover { transform: scale(1.18); box-shadow: 0 0 0 2px var(--fc-card), 0 0 0 3px var(--ev-v5); position: relative; z-index: 2; }
@keyframes ev-celda { from { opacity: 0; transform: scale(.6); } }
.ev-escala { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; font-size: 11.5px; color: var(--fc-muted); }
.ev-escala i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ev-v1), var(--ev-g)); }
.ev-pico { margin: 0 0 12px; font-size: 13px; color: var(--fc-muted); }
.ev-pico b { color: var(--ev-tinta-verde); font-weight: 600; }

/* ---------- Globo flotante (mapa de calor y donut) ---------- */
.ev-globo { position: fixed; z-index: 80; display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--fc-primary); color: var(--fc-on-primary); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity 120ms ease; }
.ev-globo.visible { opacity: 1; }
.ev-globo b { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-globo small { opacity: .72; font-size: 11.5px; }

/* ---------- Tickets ---------- */
.ev-tickets-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-buscar { position: relative; flex: 1 1 220px; max-width: 320px; }
.ev-buscar input { width: 100%; min-height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; }
.ev-buscar svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fc-muted); pointer-events: none; }
.ev-tabla-caja { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.ev-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ev-tabla th { position: sticky; top: 0; padding: 10px 12px; border-bottom: 1px solid var(--fc-border); background: var(--fc-card); color: var(--fc-muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.ev-tabla td { padding: 11px 12px; border-bottom: 1px solid var(--fc-border); vertical-align: top; }
.ev-tabla tr:last-child td { border-bottom: 0; }
.ev-tabla tbody tr { transition: background-color var(--arc-fast, 160ms) ease; }
.ev-tabla tbody tr:hover { background: var(--fc-row-hover); }
.ev-tabla .der { text-align: right; }
.ev-tabla .art { color: var(--fc-muted); max-width: 420px; }
.ev-pago { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ev-pago i { width: 8px; height: 8px; border-radius: 3px; }
.ev-paginas { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--fc-muted); }
.ev-paginas div { display: flex; gap: 6px; }

/* ---------- Lista de eventos ---------- */
.ev-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--ev-gap); }
.ev-tarjeta { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--fc-border); border-radius: var(--ev-r); background: var(--fc-card); color: var(--fc-ink); font: inherit; text-align: left; cursor: pointer; animation: arc-entrada var(--arc-considered, 480ms) var(--arc-ease-enter, ease) both; transition: box-shadow var(--arc-fast, 160ms) ease, transform var(--arc-fast, 160ms) ease, border-color var(--arc-fast, 160ms) ease; }
.ev-tarjeta:hover { border-color: var(--ev-v2); box-shadow: 0 14px 34px -18px oklch(0% 0 0 / .28); transform: translateY(-2px); }
.ev-tarjeta-cab { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ev-tarjeta h3 { margin: 0; font-family: var(--arc-display, inherit); font-size: 18px; font-weight: 500; letter-spacing: -.025em; }
.ev-tarjeta-cab small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--fc-muted); }
.ev-tarjeta .ev-kpi-cifra { font-size: 32px; }
.ev-tarjeta-datos { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--fc-muted); }
.ev-tarjeta-datos b { color: var(--fc-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ev-mini { width: 100%; height: 54px; color: var(--fc-ink); }
.ev-mini rect { fill: var(--ev-v2); transform-origin: bottom; transform-box: fill-box; animation: arc-barra-sube 700ms var(--arc-spring, ease) both; animation-delay: calc(var(--i) * 40ms + 200ms); }
.ev-flecha-ir { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ev-v0); color: var(--ev-tinta-verde); flex: none; transition: transform var(--arc-fast, 160ms) ease; }
.ev-tarjeta:hover .ev-flecha-ir { transform: translateX(3px); }

/* ---------- Estados vacíos y avisos ---------- */
.ev-vacio { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; border: 1px dashed var(--fc-border); border-radius: var(--ev-r); background: var(--fc-card); }
.ev-vacio h2 { margin: 6px 0 0; font-family: var(--arc-display, inherit); font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.ev-vacio p { margin: 0; max-width: 460px; color: var(--fc-muted); font-size: 14px; }
.ev-vacio .ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ev-v0); color: var(--ev-tinta-verde); }
.ev-cargando { height: 180px; border-radius: var(--ev-r); background: linear-gradient(90deg, var(--fc-selected), color-mix(in oklab, var(--fc-selected) 40%, var(--fc-card)), var(--fc-selected)); background-size: 200% 100%; animation: ev-brillo 1.3s ease-in-out infinite; }
@keyframes ev-brillo { to { background-position: -200% 0; } }

/* ---------- Pantallas estrechas ---------- */
@media (max-width: 1100px) {
  .ev-rejilla, .ev-rejilla.mitad { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .ev-kpis { grid-template-columns: 1fr 1fr; }
  .ev-kpi:nth-child(2) { border-right: 0; }
  .ev-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--fc-border); }
  .ev-kpi { padding: 14px 16px 16px; }
  .ev-kpi-cifra { font-size: 24px; }
  .ev-filtros { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ev-filtros .ev-seg { margin-left: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ev-filtros .ev-quitar { grid-column: 1 / -1; justify-self: start; min-height: 32px; }
  .ev-filtro > button { width: 100%; max-width: 100%; flex-direction: column; align-items: flex-start; gap: 0; min-height: 48px; padding: 6px 12px; position: relative; }
  .ev-filtro > button span { max-width: calc(100% - 16px); }
  .ev-filtro > button .ev-flecha { position: absolute; right: 10px; top: 50%; margin-top: -7px; }
  .ev-filtro .ev-menu { width: min(300px, calc(100vw - 40px)); }
  .ev-filtro:nth-child(2n) .ev-menu { left: auto; right: 0; }
  .ev-calor .d .mes { display: none; }
  .ev-bloque-cab { padding: 16px 16px 4px; }
  .ev-cuerpo { padding: 10px 16px 18px; }
  .ev-tabla-caja { margin: 0 -16px; padding: 0 16px; }
  .ev-jornadas { grid-template-columns: 50px minmax(0, 1fr); padding: 24px 12px 34px 0; height: 200px; }
  .ev-ejes span { right: 6px; font-size: 10px; }
  .ev-dia .etq span { display: none; }
  .ev-calor { grid-template-columns: 44px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; }
  .ev-calor .h:nth-child(even) { visibility: hidden; }
  .ev-celda { min-height: 14px; border-radius: 4px; }
  .ev-lista { grid-template-columns: minmax(0, 1fr); }
  .ev-tabla thead { display: none; }
  .ev-tabla, .ev-tabla tbody { display: block; }
  .ev-tabla tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "puesto importe" "detalle detalle" "fecha pago"; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--fc-border); }
  .ev-tabla tbody tr:last-child { border-bottom: 0; }
  .ev-tabla td { padding: 0; border: 0; font-size: 13px; }
  .ev-tabla td:nth-child(1) { grid-area: fecha; color: var(--fc-muted); font-size: 12px; }
  .ev-tabla td:nth-child(2) { grid-area: puesto; font-weight: 500; font-size: 14px; }
  .ev-tabla td:nth-child(3) { grid-area: detalle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ev-tabla td:nth-child(4) { grid-area: pago; justify-self: end; color: var(--fc-muted); font-size: 12px; }
  .ev-tabla td.der { grid-area: importe; font-weight: 600; font-size: 14px; }
  .ev-tabla .art { max-width: none; }
  .ev-tickets-cab, .ev-buscar { width: 100%; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-raiz *, .ev-raiz *::before { animation: none !important; transition: none !important; }
}

/* ---------- Piezas de Arc dentro de Eventos ---------- */
html[data-ui] .ev-raiz .ev-resumen { margin: 0; }
html[data-ui] .ev-raiz .ev-res-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html[data-ui] .ev-raiz .ev-res-kpis .arc-res-kpi { min-width: 0; }
html[data-ui] .ev-raiz .ev-cifra { display: block; font-family: var(--arc-display, inherit); font-weight: 400; letter-spacing: -.045em; line-height: 1.15; font-variant-numeric: tabular-nums; }
html[data-ui] .ev-raiz .ev-res-kpis .ev-cifra { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(22px, 1.4vw + 8px, 28px); }
html[data-ui] .ev-raiz .arc-res-raya { background: var(--ev-g); width: 0; }
html[data-ui] .ev-raiz .arc-res-kpi.activa .arc-res-kpi-nombre { color: var(--fc-ink); }
.ev-kpi-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 8px; background: var(--ev-v0); color: var(--ev-tinta-verde); vertical-align: middle; }
.ev-kpi-ico svg { width: 15px; height: 15px; }
html[data-ui] .ev-raiz .arc-res-kpi-nombre { display: inline-flex; align-items: center; }
html[data-ui] .ev-raiz .arc-res-leyenda i { border-top-color: var(--ev-g); }
.ev-ayuda { font-size: 12.5px; color: var(--fc-muted); border: 0 !important; background: none !important; padding: 0 !important; }
html[data-ui] .ev-raiz .ev-linea { color: var(--ev-g); padding: 4px 0 4px; }
html[data-ui] .ev-raiz .ev-linea .trazo { stroke-width: 2; }
html[data-ui] .ev-raiz .ev-puntos circle { fill: var(--fc-card); stroke: currentColor; stroke-width: 1.5; animation: arc-area 600ms var(--arc-ease, ease) 500ms both; }
html[data-ui] .ev-raiz .ev-linea.leyendo .cursor, .ev-raiz .ev-linea.leyendo .punto, .ev-raiz .ev-linea.leyendo .arc-res-etiqueta { opacity: 1; }
.ev-linea-caja { padding-top: 6px; }
/* Los donuts de Arc, en la escala de verdes */
html[data-ui] .ev-raiz .arc-donut .arc-res-lista-cab b { font-size: 17px; }
html[data-ui] .ev-raiz .ev-donut-caja .arc-res-lista { padding: 18px 22px 6px; }
html[data-ui] .ev-raiz .arc-donut-seg { fill: color-mix(in oklab, var(--ev-g) calc(var(--tono) * .58), var(--fc-card)); stroke: color-mix(in oklab, var(--ev-g) calc(var(--tono) * .58), var(--fc-card)); cursor: pointer; }
html[data-ui] .ev-raiz .arc-donut-fila i { background: color-mix(in oklab, var(--ev-g) calc(var(--tono) * .58), var(--fc-card)); }
html[data-ui] .ev-raiz .arc-donut-fila { cursor: pointer; }
html[data-ui] .ev-raiz .arc-donut-fila.fijado { background: var(--ev-v0); }
.ev-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 4px 22px 18px; font-size: 12.5px; color: var(--fc-muted); }
.ev-pie .ev-mas { width: auto; margin: 0; padding: 6px 10px; }
@media (max-width: 800px) {
  html[data-ui] .ev-raiz .ev-res-kpis { grid-template-columns: 1fr 1fr; }
  html[data-ui] .ev-raiz .ev-donut-caja .arc-res-lista, .ev-pie { padding-left: 16px; padding-right: 16px; }
  .ev-ayuda { display: none; }
}
/* El donut de Arc pone el anillo y sus filas lado a lado: en una columna estrecha los nombres no
   caben, así que ahí va el anillo arriba y las filas debajo, a todo el ancho. */
html[data-ui] .ev-raiz .ev-donut-caja { container-type: inline-size; }
@container (max-width: 520px) {
  html[data-ui] .ev-raiz .ev-donut-caja .arc-donut-cuerpo { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }
  html[data-ui] .ev-raiz .ev-donut-caja .arc-donut-filas { width: 100%; }
}

/* Tickets recogidos: los 5 últimos y un botón a lo ancho para abrir la lista entera */
.ev-ver-tickets { display: flex; justify-content: center; align-items: center; gap: 6px; width: 100%; margin-top: 12px; min-height: 42px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease; }
.ev-ver-tickets:hover { background: var(--ev-v0); }
.ev-ver-tickets svg { color: var(--ev-tinta-verde); }

/* Columna derecha: «Cómo se paga» y «Lo más vendido» uno debajo del otro, junto al ranking */
.ev-columna { display: grid; gap: var(--ev-gap); align-content: start; min-width: 0; }

/* Lista de eventos: buscador, año y total de lo que se ve */
.ev-lista-filtros { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.ev-lista-filtros .ev-buscar { flex: 0 1 300px; }
.ev-lista-total { margin-left: auto; font-size: 13px; color: var(--fc-muted); }
.ev-lista-total b { color: var(--fc-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .ev-lista-filtros .ev-buscar { flex: 1 1 100%; }
  .ev-lista-filtros .ev-seg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .ev-lista-total { margin-left: 0; }
}

/* Panel: el ranking lleva dos selectores (Ciudades | Marcas y Por ventas | Por hamburguesas), que
   bajan de línea cuando no caben */
.ev-segs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 800px) {
  .ev-segs { width: 100%; justify-content: stretch; }
  .ev-segs .ev-seg { flex: 1 1 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* Regalos: la cifra de lo que valen y sus productos, que no se pinchan */
.ev-regalos-cifra { display: grid; gap: 2px; margin: 2px 0 12px; }
.ev-regalos-cifra small { font-size: 12.5px; color: var(--fc-muted); }
.ev-fila.fija { cursor: default; }
.ev-fila.fija:hover { background: transparent; }
