:root {
    --bg: #0f172a;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f766e;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #ca8a04;
    --shadow: 0 18px 50px rgba(15, 23, 42, .12);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body.admin-body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .17), transparent 34rem), #eef2f7;
    color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 24px;
    padding: 14px 28px;
    background: linear-gradient(90deg, rgba(10, 18, 35, .98), rgba(22, 35, 61, .96));
    color: #fff;
    border-bottom: 1px solid rgba(148, 197, 255, .16);
    backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.02em; }
.brand a { color: #fff; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; color: #ef4444; filter: drop-shadow(0 0 8px rgba(239,68,68,.8)); }
.topnav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topnav a { color: rgba(255,255,255,.82); font-weight: 700; font-size: 14px; }
.topnav a:hover { color: #fff; text-decoration: none; }
.user-pill { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 800; color: #fff; text-decoration: none !important; border: 1px solid rgba(255,255,255,.06); }
.user-pill:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.user-pill span { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.62); }
.container { width: min(1480px, calc(100% - 42px)); margin: 28px auto 48px; }
.footer { width: min(1480px, calc(100% - 42px)); margin: 24px auto; color: var(--muted); display: flex; justify-content: space-between; font-size: 13px; }
.hero-panel, .page-heading {
    border-radius: 28px;
    padding: 30px;
    background: linear-gradient(135deg, #111827, #1d4ed8 55%, #0f766e);
    color: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.hero-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading { background: linear-gradient(135deg, #111827, #1e293b); }
.page-heading.with-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading h1, .hero-panel h1 { margin: 0; font-size: clamp(30px, 4vw, 54px); line-height: .95; letter-spacing: -.05em; }
.page-heading p, .hero-panel p { margin: 10px 0 0; color: rgba(255,255,255,.78); max-width: 760px; }
.eyebrow, .kicker { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 900; color: #60a5fa; }
.card {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(226,232,240,.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
}
.auth-card { min-height: 68vh; display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: center; }
.auth-card h1 { margin: 0; font-size: clamp(38px, 6vw, 76px); line-height: .9; letter-spacing: -.06em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.btn, button.btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.28); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { background: #e0f2fe; color: #075985; }
.btn.ghost { background: #f1f5f9; color: #0f172a; }
.btn.tiny { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.hero-actions, .form-actions, .export-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-form { max-width: 520px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 900; color: #334155; }
input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.divider-title { padding-top: 10px; border-top: 1px solid var(--border); margin: 6px 0 0; }
.switches { display: grid; gap: 8px; align-content: end; }
.switches label { display: flex; align-items: center; gap: 8px; }
.switches input { width: auto; }
.inline-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.alert { padding: 13px 15px; border-radius: 14px; margin-bottom: 16px; font-weight: 800; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card span { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .09em; font-size: 12px; }
.stat-card strong { display: block; font-size: 44px; line-height: 1; margin: 10px 0 6px; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title-row h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: #475569; background: #f8fafc; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; font-weight: 900; }
.actions.stacked { flex-direction: column; gap: 6px; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.status.draft { background: #f1f5f9; color: #475569; }
.status.active { background: #dcfce7; color: #166534; }
.status.finished { background: #dbeafe; color: #1d4ed8; }
.status.archived, .status.withdrawn { background: #fee2e2; color: #991b1b; }
.search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-row input { flex: 1; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { border: 0; border-radius: 999px; padding: 9px 13px; background: #f1f5f9; color: #334155; font-weight: 900; cursor: pointer; }
.pill.active { background: var(--primary); color: #fff; }
.copy-input { font-size: 12px; min-width: 280px; background: #f8fafc; color: #475569; }
.copy-input.large { min-width: 100%; font-weight: 800; }
.kiosk-link-box { display: grid; gap: 10px; grid-template-columns: auto 1fr auto; align-items: center; padding: 14px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--border); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-two.unequal { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.live-card { background: linear-gradient(135deg, #eff6ff, #ecfeff); }
.badge { padding: 8px 11px; background: #eff6ff; color: #1d4ed8; border-radius: 999px; font-weight: 900; font-size: 13px; }
.series-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.series-grid small { color: var(--muted); font-weight: 700; }
.shot-input { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 800; }

.score-count-editor { margin-top: 10px; }
.compact-score-table th, .compact-score-table td { text-align: center; padding: 8px 6px; }
.compact-score-table th:first-child, .compact-score-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.count-input { width: 56px; text-align: center; font-weight: 900; font-size: 15px; padding: 8px 6px; border-radius: 10px; }
.count-input:focus { box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.shots-count, .series-total { font-size: 16px; font-weight: 1000; }
.score-row-warning { background: #fff7ed !important; outline: 2px solid #fb923c; }

.hint { color: var(--muted); background: #f8fafc; border: 1px dashed #cbd5e1; padding: 12px; border-radius: 12px; }
.score-table th, .score-table td { white-space: nowrap; }
.score-big { font-size: 22px; font-weight: 1000; color: #0f172a; }
.series-mini { display: flex; gap: 5px; flex-wrap: wrap; }
.series-mini span { min-width: 34px; text-align: center; border-radius: 8px; background: #f1f5f9; padding: 4px 6px; font-weight: 900; }
.selected-row { outline: 3px solid rgba(37,99,235,.18); background: #eff6ff !important; }
.mini-form { display: grid; grid-template-columns: repeat(3, 82px); gap: 6px; min-width: 280px; }
.mini-form input, .mini-form select { padding: 7px 8px; font-size: 12px; border-radius: 8px; }
.link-danger { border: 0; background: transparent; color: var(--danger); padding: 0; font: inherit; font-weight: 900; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }
@media (max-width: 980px) {
    .topbar { flex-wrap: wrap; }
    .topnav { order: 3; width: 100%; overflow: auto; margin-left: 0; }
    .auth-card, .grid-two.unequal, .grid-two, .form-grid.two-cols, .stat-grid { grid-template-columns: 1fr; }
    .hero-panel, .page-heading.with-actions { flex-direction: column; align-items: flex-start; }
    .series-grid { grid-template-columns: 1fr; }
    .inline-fields { grid-template-columns: 1fr; }
    .kiosk-link-box { grid-template-columns: 1fr; }
    .container { width: min(100% - 24px, 1480px); }
}

/* Entrada de puntuaciones tipo Excel */
.excel-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 8px;
    font-size: 12px;
    color: #475569;
    font-weight: 800;
}
.excel-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #dcfce7;
    color: #166534;
    font-weight: 1000;
}
.excel-score-grid {
    border: 1px solid #94a3b8;
    border-radius: 10px;
    overflow: auto;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(148,163,184,.2);
}
.excel-score-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
}
.excel-score-table th,
.excel-score-table td {
    border: 1px solid #cbd5e1;
    padding: 0;
    height: 34px;
    vertical-align: middle;
    background: #fff;
}
.excel-score-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 32px;
    background: #e2e8f0;
    color: #0f172a;
    text-align: center;
    font-size: 11px;
    letter-spacing: .04em;
}
.excel-score-table th:first-child,
.excel-score-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 92px;
    min-width: 92px;
    padding: 0 8px;
    background: #f8fafc;
    text-align: left;
    font-size: 12px;
}
.excel-score-table thead th:first-child {
    z-index: 5;
    background: #cbd5e1;
}
.excel-score-table th:nth-last-child(2),
.excel-score-table th:last-child,
.excel-score-table td:nth-last-child(2),
.excel-score-table td:last-child {
    width: 72px;
    min-width: 72px;
    text-align: center;
    font-weight: 1000;
    background: #f8fafc;
}
.excel-score-table td[data-col],
.excel-score-table th[data-col] {
    width: 64px;
    min-width: 64px;
    text-align: center;
}
.excel-cell.count-input {
    width: 100%;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: transparent;
    color: #0f172a;
    outline: none;
    box-shadow: none;
}
.excel-cell.count-input:focus,
.excel-cell.excel-active-cell {
    background: #eff6ff;
    box-shadow: inset 0 0 0 3px #2563eb;
}
.excel-score-table .excel-active-row td {
    background: #f8fbff;
}
.excel-score-table .excel-active-row td:first-child {
    background: #dbeafe;
    color: #1d4ed8;
}
.excel-score-table .excel-active-col {
    background: #eef2ff !important;
}
.excel-score-table .excel-active-row .excel-active-col {
    background: #eff6ff !important;
}
.excel-score-table .score-row-complete td:first-child {
    border-left: 5px solid #22c55e;
}
.excel-score-table .score-row-warning td:first-child {
    border-left: 5px solid #f97316;
}
.excel-score-table .shots-count,
.excel-score-table .series-total {
    font-size: 14px;
}
@media (max-width: 980px) {
    .excel-toolbar { gap: 6px; }
    .excel-toolbar span:not(.excel-pill) { display: none; }
}

/* v9: gestion de tipos y nombres de series */
.series-label-box {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}
.compact-title-row { margin-bottom: 10px; }
.compact-title-row h2 { font-size: 18px; }
.series-label-table th,
.series-label-table td { padding: 8px 10px; vertical-align: middle; }
.series-label-table th:first-child,
.series-label-table td:first-child { width: 70px; text-align: center; }
.series-label-table input { padding: 8px 10px; border-radius: 9px; }
.excel-score-table td:first-child small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
}

/* v11: puntuacion integrada en la lista de participantes */
.admin-score-table th,
.admin-score-table td {
    vertical-align: middle;
}
.admin-score-table .admin-order-cell {
    font-size: 17px;
    color: var(--primary);
}
.inline-score-editor-row > td {
    background: #f8fbff !important;
    padding: 14px 18px 18px !important;
    border-top: 2px solid #2563eb;
    border-bottom: 2px solid #2563eb;
}
.inline-score-editor {
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}
.inline-score-editor h3 {
    margin: 0;
    font-size: 20px;
}
.inline-score-editor .hint {
    margin-top: 10px;
    margin-bottom: 10px;
}
.inline-score-editor .form-actions {
    margin-top: 10px;
}
.admin-score-table .score-big {
    white-space: nowrap;
}
.admin-score-table .series-mini {
    min-width: 160px;
}
.admin-score-table .actions.stacked .btn {
    width: 100%;
    justify-content: center;
}

.user-admin-note { margin-top: -8px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }

/* v14 - Edición de tirada por serie, estilo hoja de arbitraje */
.series-selector-form {
    min-width: 260px;
}
.series-selector-form label {
    display: block;
    font-weight: 800;
    color: #1e293b;
}
.series-selector-form select {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-weight: 800;
}
.bulk-score-form {
    margin-top: 14px;
}
.bulk-score-grid {
    max-height: 68vh;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #c7d6e8;
    border-radius: 10px;
    background: #fff;
}
.bulk-series-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 12px;
}
.bulk-series-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #eef4fb;
    box-shadow: inset 0 -1px 0 #bfd0e4;
}
.bulk-series-table th,
.bulk-series-table td {
    padding: 3px 4px;
    border: 1px solid #d3deeb;
    vertical-align: middle;
    line-height: 1.12;
}
.bulk-series-table th:nth-child(1),
.bulk-series-table td:nth-child(1) { width: 48px; }
.bulk-series-table th:nth-child(2),
.bulk-series-table td:nth-child(2) { width: 48px; }
.bulk-series-table th:nth-child(3),
.bulk-series-table td:nth-child(3) { width: 220px; }
.bulk-series-table th:nth-last-child(4),
.bulk-series-table td:nth-last-child(4) { width: 58px; }
.bulk-series-table th:nth-last-child(3),
.bulk-series-table td:nth-last-child(3) { width: 66px; }
.bulk-series-table th:nth-last-child(2),
.bulk-series-table td:nth-last-child(2) { width: 74px; }
.bulk-series-table th:nth-last-child(1),
.bulk-series-table td:nth-last-child(1) { width: 54px; }
.bulk-series-table .sticky-left {
    position: static;
    left: auto;
    z-index: auto;
    background: #eef4fb;
}
.bulk-series-table tbody .sticky-left {
    background: #f8fbff;
}
.bulk-series-table .shooter-col {
    min-width: 0;
    text-align: left;
    overflow: hidden;
}
.bulk-series-table .shooter-col strong {
    display: block;
    font-size: 12px;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bulk-series-table .shooter-col small {
    display: block;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bulk-series-table .count-input {
    width: 100%;
    max-width: 38px;
    height: 24px;
    padding: 1px 2px;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-weight: 900;
    font-size: 12px;
    color: #0f172a;
    outline: none !important;
    box-shadow: none !important;
}
.bulk-series-table .count-input:focus {
    outline: none !important;
    box-shadow: none !important;
}
.bulk-series-table td.active-cell {
    outline: none;
    box-shadow: inset 0 0 0 2px #2563eb;
    background: #dbeafe !important;
}
.bulk-series-table tr.active-row td {
    background: #f5f9ff;
}
.bulk-series-table .active-col {
    background: #f0f6ff;
}
.bulk-series-table tr.series-complete td:first-child {
    border-left: 5px solid #22c55e;
}
.bulk-series-table tr.series-overflow td:first-child {
    border-left: 5px solid #f97316;
}
.bulk-series-table tr.series-overflow td {
    background: #fff7ed;
}
.small-score {
    font-size: 18px;
}
.sticky-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    border-top: 1px solid #dbe5f0;
    padding: 14px 0 0;
    margin-top: 14px;
}

/* v18: seguridad en entrada de puntuaciones por serie */
.score-error-banner {
    margin: 10px 0 12px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #991b1b;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 900;
}
.bulk-series-table tr.series-overflow td,
.bulk-series-table tr.series-overflow td.sticky-left,
.bulk-series-table tr.series-overflow .shooter-col,
.bulk-series-table tr.series-overflow td[data-col],
.bulk-series-table tr.series-overflow .active-col {
    background: #ffe4e6 !important;
}
.bulk-series-table tr.series-overflow td:first-child {
    border-left: 6px solid #dc2626;
}
.bulk-series-table tr.series-overflow .shots-count,
.bulk-series-table tr.series-overflow [data-shots-count] {
    color: #b91c1c;
    font-weight: 1000;
}
.bulk-series-table tr.series-overflow .count-input {
    color: #7f1d1d;
}
.bulk-score-form.has-score-errors .sticky-save-bar {
    border-top-color: #fecaca;
    background: rgba(255,241,242,.96);
}
.btn.disabled,
button[disabled].btn {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.25);
}
.bulk-series-table .count-input {
    -webkit-user-drag: none;
    user-select: text;
}


/* v19: editor de tirada compacto, sin scroll horizontal ni doble recuadro */
.bulk-score-grid { overflow-x: hidden !important; }
.bulk-series-table { width: 100% !important; min-width: 0 !important; table-layout: fixed !important; }
.bulk-series-table th, .bulk-series-table td { box-sizing: border-box; }
.bulk-series-table td[data-col], .bulk-series-table th[data-col] { width: 4.4%; min-width: 0; }
.bulk-series-table .admin-order-cell strong,
.bulk-series-table td:nth-child(2) strong,
.bulk-series-table .shots-count,
.bulk-series-table .series-total,
.bulk-series-table .small-score { font-size: 12px; }
.bulk-series-table .small-score { font-size: 13px; }
.bulk-series-table td.active-cell { outline: none !important; box-shadow: inset 0 0 0 2px #2563eb !important; }
.bulk-series-table .count-input, .bulk-series-table .count-input:focus { outline: none !important; box-shadow: none !important; }
.bulk-series-table tr.series-overflow td { background: #ffe4e6 !important; }
.bulk-series-table tr.series-overflow td.active-cell { background: #fecdd3 !important; }
@media (max-width: 1350px) {
    .bulk-series-table { font-size: 11px; }
    .bulk-series-table th, .bulk-series-table td { padding: 2px 3px; }
    .bulk-series-table th:nth-child(1), .bulk-series-table td:nth-child(1) { width: 42px; }
    .bulk-series-table th:nth-child(2), .bulk-series-table td:nth-child(2) { width: 42px; }
    .bulk-series-table th:nth-child(3), .bulk-series-table td:nth-child(3) { width: 190px; }
    .bulk-series-table .count-input { max-width: 32px; height: 22px; font-size: 11px; }
    .bulk-series-table .shooter-col strong { font-size: 11px; }
    .bulk-series-table .shooter-col small { font-size: 9px; }
}

/* v20 - Participantes: sin scroll horizontal y ficha compacta */
#participants-list .table-wrap {
    overflow-x: hidden !important;
    overflow-y: visible;
}
#participants-list .participants-admin-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 12px;
}
#participants-list .participants-admin-table th,
#participants-list .participants-admin-table td {
    padding: 8px 6px;
    white-space: normal !important;
    overflow: hidden;
    vertical-align: middle;
}
#participants-list .participants-admin-table th:nth-child(1),
#participants-list .participants-admin-table td:nth-child(1) { width: 5%; }
#participants-list .participants-admin-table th:nth-child(2),
#participants-list .participants-admin-table td:nth-child(2) { width: 5%; }
#participants-list .participants-admin-table th:nth-child(3),
#participants-list .participants-admin-table td:nth-child(3) { width: 18%; }
#participants-list .participants-admin-table th:nth-child(4),
#participants-list .participants-admin-table td:nth-child(4) { width: 5%; }
#participants-list .participants-admin-table th:nth-child(5),
#participants-list .participants-admin-table td:nth-child(5) { width: 6%; }
#participants-list .participants-admin-table th:nth-child(6),
#participants-list .participants-admin-table td:nth-child(6) { width: 8%; }
#participants-list .participants-admin-table th:nth-child(7),
#participants-list .participants-admin-table td:nth-child(7) { width: 8%; }
#participants-list .participants-admin-table th:nth-child(8),
#participants-list .participants-admin-table td:nth-child(8) { width: 5%; text-align: center; }
#participants-list .participants-admin-table th:nth-child(9),
#participants-list .participants-admin-table td:nth-child(9) { width: 5%; text-align: center; }
#participants-list .participants-admin-table th:nth-child(10),
#participants-list .participants-admin-table td:nth-child(10) { width: 10%; }
#participants-list .participants-admin-table th:nth-child(11),
#participants-list .participants-admin-table td:nth-child(11) { width: 20%; }
#participants-list .participants-admin-table th:nth-child(12),
#participants-list .participants-admin-table td:nth-child(12) { width: 5%; }

#participants-list .participants-admin-table td:nth-child(3) strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
#participants-list .participants-admin-table td:nth-child(3) small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}
#participants-list .participants-admin-table .status {
    padding: 4px 7px;
    font-size: 10px;
}
#participants-list .participants-admin-table .admin-order-cell {
    font-size: 13px;
}
#participants-list .participants-admin-table .score-big {
    font-size: 15px;
}
#participants-list .participants-admin-table .series-mini {
    min-width: 0 !important;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
}
#participants-list .participants-admin-table .series-mini span {
    min-width: 0;
    padding: 3px 4px;
    font-size: 11px;
}
#participants-list .participant-mini-form,
#participants-list .mini-form.participant-mini-form {
    min-width: 0 !important;
    width: 100% !important;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}
#participants-list .participant-mini-form input,
#participants-list .participant-mini-form select {
    min-width: 0;
    width: 100%;
    padding: 5px 6px;
    font-size: 11px;
    border-radius: 7px;
}
#participants-list .participant-mini-form .btn {
    padding: 5px 7px;
    font-size: 11px;
    border-radius: 7px;
}
#participants-list .participants-admin-table .actions.stacked {
    gap: 3px;
}
#participants-list .participants-admin-table .link-danger {
    font-size: 12px;
    word-break: break-word;
}

@media (max-width: 1200px) {
    #participants-list .participants-admin-table { font-size: 11px; }
    #participants-list .participants-admin-table th,
    #participants-list .participants-admin-table td { padding: 6px 4px; }
    #participants-list .participants-admin-table th:nth-child(5),
    #participants-list .participants-admin-table td:nth-child(5) { display: none; }
    #participants-list .participants-admin-table th:nth-child(6),
    #participants-list .participants-admin-table td:nth-child(6) { width: 8%; }
    #participants-list .participants-admin-table th:nth-child(10),
    #participants-list .participants-admin-table td:nth-child(10) { width: 9%; }
    #participants-list .participants-admin-table th:nth-child(11),
    #participants-list .participants-admin-table td:nth-child(11) { width: 24%; }
}

/* v21 - Participantes: columna acciones legible, sin texto vertical */
#participants-list .participants-admin-table th:nth-child(1),
#participants-list .participants-admin-table td:nth-child(1) { width: 4% !important; }
#participants-list .participants-admin-table th:nth-child(2),
#participants-list .participants-admin-table td:nth-child(2) { width: 4% !important; }
#participants-list .participants-admin-table th:nth-child(3),
#participants-list .participants-admin-table td:nth-child(3) { width: 18% !important; }
#participants-list .participants-admin-table th:nth-child(4),
#participants-list .participants-admin-table td:nth-child(4) { width: 5% !important; }
#participants-list .participants-admin-table th:nth-child(5),
#participants-list .participants-admin-table td:nth-child(5) { width: 5% !important; }
#participants-list .participants-admin-table th:nth-child(6),
#participants-list .participants-admin-table td:nth-child(6) { width: 7% !important; }
#participants-list .participants-admin-table th:nth-child(7),
#participants-list .participants-admin-table td:nth-child(7) { width: 7% !important; }
#participants-list .participants-admin-table th:nth-child(8),
#participants-list .participants-admin-table td:nth-child(8) { width: 5% !important; text-align: center; }
#participants-list .participants-admin-table th:nth-child(9),
#participants-list .participants-admin-table td:nth-child(9) { width: 5% !important; text-align: center; }
#participants-list .participants-admin-table th:nth-child(10),
#participants-list .participants-admin-table td:nth-child(10) { width: 8% !important; }
#participants-list .participants-admin-table th:nth-child(11),
#participants-list .participants-admin-table td:nth-child(11) { width: 24% !important; }
#participants-list .participants-admin-table th:nth-child(12),
#participants-list .participants-admin-table td:nth-child(12) {
    width: 8% !important;
    min-width: 82px !important;
    text-align: left;
    white-space: nowrap !important;
    overflow: visible !important;
}
#participants-list .participants-admin-table .actions.stacked {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    min-width: 76px !important;
    overflow: visible !important;
}
#participants-list .participants-admin-table .link-danger,
#participants-list .participants-admin-table .actions.stacked a,
#participants-list .participants-admin-table .actions.stacked button {
    display: inline-block !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    line-height: 1.1 !important;
    font-size: 11px !important;
    max-width: none !important;
}
#participants-list .participants-admin-table .link-danger {
    color: #dc2626 !important;
    font-weight: 900 !important;
}

@media (max-width: 1200px) {
    #participants-list .participants-admin-table th:nth-child(5),
    #participants-list .participants-admin-table td:nth-child(5) { display: none; }
    #participants-list .participants-admin-table th:nth-child(3),
    #participants-list .participants-admin-table td:nth-child(3) { width: 20% !important; }
    #participants-list .participants-admin-table th:nth-child(10),
    #participants-list .participants-admin-table td:nth-child(10) { width: 7% !important; }
    #participants-list .participants-admin-table th:nth-child(11),
    #participants-list .participants-admin-table td:nth-child(11) { width: 24% !important; }
    #participants-list .participants-admin-table th:nth-child(12),
    #participants-list .participants-admin-table td:nth-child(12) { width: 9% !important; min-width: 82px !important; }
}

/* v22 - Perfil de club: subida de logo */
.logo-upload-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px dashed rgba(59, 130, 246, .28);
    border-radius: 18px;
    background: rgba(239, 246, 255, .55);
}
.field-title {
    display: block;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
}
.field-help {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}
.inline-check {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: 700;
    color: #334155;
}
.inline-check input {
    width: auto !important;
}
.logo-preview-card {
    min-height: 110px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .35);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}
.logo-preview-card img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    display: block;
}
.logo-preview-card span {
    color: #94a3b8;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
}
@media (max-width: 760px) {
    .logo-upload-block { grid-template-columns: 1fr; }
}

/* =========================================================
   VIVEO.TV - Login y cabecera profesional
   ========================================================= */
body.guest-body {
    background:
        radial-gradient(circle at 16% 12%, rgba(45, 104, 255, .20), transparent 28rem),
        radial-gradient(circle at 84% 8%, rgba(20, 184, 166, .14), transparent 30rem),
        linear-gradient(135deg, #eef4ff 0%, #f8fbff 48%, #eaf0ff 100%);
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    height: 42px;
    min-width: 168px;
    text-decoration: none !important;
}
.brand-logo img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 205px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35));
}
.topnav a.active {
    color: #fff;
    position: relative;
}
.topnav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #22d3ee);
}
.viveo-login-shell {
    min-height: calc(100vh - 130px);
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(390px, .78fr);
    gap: 28px;
    align-items: start;
    margin: 26px auto 34px;
}
.viveo-login-hero,
.viveo-login-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .14);
}
.viveo-login-hero {
    min-height: 690px;
    border-radius: 34px;
    padding: clamp(28px, 4vw, 54px);
    color: #07111f;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,245,255,.88)),
        radial-gradient(circle at top right, rgba(37, 99, 235, .24), transparent 35rem);
}
.viveo-login-hero::before {
    content: "";
    position: absolute;
    inset: -1px;
    background:
        linear-gradient(120deg, transparent 0 18%, rgba(37,99,235,.08) 18% 19%, transparent 19% 38%, rgba(20,184,166,.10) 38% 39%, transparent 39%),
        repeating-linear-gradient(90deg, rgba(15,23,42,.035) 0 1px, transparent 1px 72px);
    pointer-events: none;
}
.viveo-login-logo-wrap,
.viveo-login-copy,
.viveo-login-showcase,
.viveo-login-metrics {
    position: relative;
    z-index: 1;
}
.viveo-login-logo-wrap {
    width: min(420px, 72%);
    margin-bottom: 34px;
}
.viveo-login-logo {
    width: 100%;
    height: auto;
    display: block;
}
.viveo-login-kicker {
    margin: 0 0 12px;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 950;
}
.viveo-login-copy h1 {
    max-width: 850px;
    margin: 0;
    color: #07111f;
    font-size: clamp(42px, 5vw, 78px);
    line-height: .9;
    letter-spacing: -.07em;
    font-weight: 950;
}
.viveo-login-lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: #475569;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.55;
    font-weight: 650;
}
.viveo-login-showcase {
    margin-top: 42px;
    min-height: 250px;
}
.viveo-screen-card {
    width: min(650px, 92%);
    border-radius: 30px;
    padding: 24px;
    background: linear-gradient(145deg, #08111f, #111827 58%, #0e7490);
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 30px 70px rgba(15, 23, 42, .25);
}
.viveo-screen-card .screen-topline,
.viveo-screen-card .screen-row,
.viveo-screen-card .screen-grid span {
    display: block;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
}
.viveo-screen-card .screen-topline {
    width: 42%;
    height: 14px;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    margin-bottom: 22px;
}
.viveo-screen-card .screen-row {
    height: 18px;
    width: 86%;
    margin: 12px 0;
}
.viveo-screen-card .screen-row.strong {
    height: 36px;
    width: 62%;
    background: rgba(255,255,255,.90);
}
.viveo-screen-card .screen-row.short { width: 54%; }
.viveo-screen-card .screen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 26px;
}
.viveo-screen-card .screen-grid span {
    height: 72px;
    border-radius: 18px;
    background: rgba(34, 211, 238, .14);
    border: 1px solid rgba(34, 211, 238, .20);
}
.viveo-floating-card {
    position: absolute;
    right: clamp(8px, 3vw, 48px);
    min-width: 145px;
    padding: 14px 16px;
    border-radius: 20px;
    color: #fff;
    background: rgba(15, 23, 42, .88);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
    backdrop-filter: blur(12px);
}
.viveo-floating-card.one { top: 18px; }
.viveo-floating-card.two { bottom: 20px; }
.viveo-floating-card span {
    display: block;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .16em;
}
.viveo-floating-card strong {
    display: block;
    margin-top: 4px;
    font-size: 26px;
    letter-spacing: -.03em;
}
.viveo-login-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
}
.viveo-login-metrics div {
    padding: 18px 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(148,163,184,.28);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .06);
}
.viveo-login-metrics strong {
    display: block;
    color: #0f172a;
    font-size: 28px;
    letter-spacing: -.05em;
    line-height: 1;
}
.viveo-login-metrics span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-weight: 850;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.viveo-login-panel {
    border-radius: 34px;
    padding: clamp(30px, 3.2vw, 44px);
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96)),
        radial-gradient(circle at top, rgba(37, 99, 235, .16), transparent 24rem);
    align-self: start;
    margin-top: clamp(0px, 1.5vw, 18px);
}
.viveo-login-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, #111827, #2563eb, #22d3ee);
}
.viveo-login-panel-head h2 {
    margin: 0;
    font-size: clamp(32px, 3.4vw, 48px);
    letter-spacing: -.055em;
    line-height: .96;
    color: #0f172a;
}
.viveo-login-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}
.viveo-login-form input {
    min-height: 54px;
    font-weight: 750;
    border-radius: 16px;
    background: #f8fafc;
}
.viveo-login-form input:focus {
    background: #fff;
}
.viveo-login-submit {
    min-height: 56px;
    border-radius: 16px;
    font-size: 16px;
    margin-top: 4px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8 55%, #0e7490) !important;
    box-shadow: 0 18px 40px rgba(37, 99, 235, .28) !important;
}
.viveo-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 26px 0 18px;
}
.viveo-login-divider::before,
.viveo-login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}
.viveo-register-link {
    display: grid;
    gap: 4px;
    padding: 17px 18px;
    border-radius: 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    text-decoration: none !important;
}
.viveo-register-link:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}
.viveo-register-link strong {
    font-size: 16px;
    font-weight: 950;
}
.viveo-register-link span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 1120px) {
    .viveo-login-shell {
        grid-template-columns: 1fr;
    }
    .viveo-login-hero {
        min-height: auto;
    }
    .viveo-login-panel {
        align-self: stretch;
    }
}
@media (max-width: 720px) {
    .topbar {
        padding: 12px 16px;
        gap: 12px;
    }
    .brand-logo {
        min-width: 132px;
        height: 34px;
    }
    .brand-logo img {
        height: 30px;
        max-width: 158px;
    }
    .container {
        width: min(100% - 24px, 1480px);
        margin-top: 16px;
    }
    .viveo-login-shell {
        gap: 16px;
        margin-top: 12px;
    }
    .viveo-login-hero,
    .viveo-login-panel {
        border-radius: 24px;
        padding: 22px;
    }
    .viveo-login-logo-wrap {
        width: 260px;
        margin-bottom: 22px;
    }
    .viveo-login-copy h1 {
        font-size: 42px;
    }
    .viveo-login-showcase {
        min-height: 210px;
        margin-top: 28px;
    }
    .viveo-screen-card {
        width: 100%;
        padding: 18px;
    }
    .viveo-floating-card {
        position: static;
        display: inline-grid;
        margin: 12px 8px 0 0;
        min-width: 120px;
    }
    .viveo-login-metrics {
        grid-template-columns: 1fr;
    }
}
