/* ═══════════════════════════════════════════════════════════════
   Eventos · EV4 (Admin) — referidos, socios, llaves, webhooks, entregas, accesos y documentación.
   Only theme tokens (light and dark); builds on events.css (ev-*).
   ═══════════════════════════════════════════════════════════════ */

.ev-chip--on { background: var(--green-100); color: var(--green-600); }
.ev-chip--off { background: var(--gray-100); color: var(--gray-500); }

/* A number of the report next to its label. */
.ev-matstats--five { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* Filters of a report: fields in a row that wrap, the buttons at the end. */
.ev-filtersrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.ev-filtersrow .ev-field { min-width: max(150px, min-content); flex: 1 1 150px; white-space: nowrap; }
/* A label never takes two lines («Código o distribuidor» did, and pushed its neighbours' labels out of line): the field is as wide as its label. */
.ev-filtersrow .ev-field > input, .ev-filtersrow .ev-field > select { min-width: 0; width: 100%; }
.ev-filtersrow .ev-actions { flex: none; }

/* A row of the table that can be opened (the code of the ranking). */
.ev-rowbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--blue-600); cursor: pointer; text-align: left; }
.ev-rowbtn:hover, .ev-rowbtn:focus-visible { text-decoration: underline; }
.ev-rowbtn:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }

.ev-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--gray-900); word-break: break-all; }
.ev-table td.ev-wrap { word-break: break-word; max-width: 320px; }
/* Block B: nothing is cut in the middle of a word. A long address or path stays in ONE line, cut with «…» (the whole text is in its
   title); a sentence (an error) wraps between words and only breaks a word that does not fit alone. */
.ev-oneline { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.ev-oneline--wide { max-width: 360px; }
.ev-table td.ev-wrap--words { word-break: normal; overflow-wrap: break-word; min-width: 160px; }
.ev-table--deliveries th, .ev-table--deliveries td { white-space: nowrap; }
.ev-table--deliveries td.ev-wrap--words { white-space: normal; }
.ev-formbox { border: 1.5px solid var(--gray-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 12px; background: var(--white); }
.ev-formbox > b { color: var(--gray-900); font-size: 14px; }
.ev-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; padding: 0; margin: 0; }
.ev-checks legend { font-size: 13px; font-weight: 600; color: var(--gray-700); padding: 0; margin-bottom: 6px; }
.ev-errlines { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: var(--red-600); }

/* The key or the signing secret, shown once. */
.ev-secret { border: 2px solid var(--gold-600); background: var(--gold-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.ev-secret__title { margin: 0; font-size: 15px; color: var(--gray-900); }
.ev-secret__warn { margin: 0; font-size: 13px; font-weight: 700; color: var(--gold-600); }
.ev-secret__value { display: block; padding: 10px 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--gray-100); color: var(--gray-900);
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; user-select: all; }

/* Documentation for partners. */
.ev-docs { display: grid; gap: 6px; font-size: 14px; line-height: 1.55; color: var(--gray-700); }
.ev-docs h3 { margin: 16px 0 2px; font-size: 14px; color: var(--blue-800); }
.ev-docs p { margin: 0; }
.ev-docs ul { margin: 0; padding-left: 20px; }
.ev-docs code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--gray-50); border: 1px solid var(--gray-100);
    border-radius: 6px; padding: 1px 5px; color: var(--gray-900); }
.ev-code { margin: 4px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--gray-900);
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.ev-code code { background: none; border: 0; padding: 0; font-size: inherit; }

.ev-head__back { font-size: 13px; }

/* An event name or a ticket code in a narrow column stays in one line (only the long cells — URLs, errors — wrap), and on a wide
   screen the row's buttons sit side by side instead of piling up. */
.ev-table td:not(.ev-wrap) > .ev-mono { word-break: normal; white-space: nowrap; }
@media (min-width: 1280px) {
    .ev-table td.ev-rowactions-cell .ev-actions { flex-wrap: nowrap; }
}
