/* Panel de administración · Masters Tenis Playa
   Sistema visual plano: una superficie, bordes finos, color solo con significado.
   Escala tipográfica: 12 · 13 · 14 · 16 · 20 · 24 px. */

:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef2f4;
  --border: #e2e8eb;
  --border-strong: #cdd6da;
  --text: #13232c;
  --text-2: #43555e;
  --text-3: #5e7079;
  --accent: #0b7285;
  --accent-strong: #085a69;
  --accent-soft: #e5f3f5;
  --accent-text: #ffffff;
  --danger: #b93226;
  --danger-soft: #fdecea;
  --warning: #935400;
  --warning-soft: #fff4e0;
  --success: #1d7348;
  --success-soft: #e6f4ec;
  --info: #1e4f8f;
  --info-soft: #e8f0fb;
  --focus: 0 0 0 3px rgba(11, 114, 133, .28);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .16);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1417;
  --surface: #131c21;
  --surface-2: #172227;
  --surface-3: #1d2a30;
  --border: #25343b;
  --border-strong: #34464f;
  --text: #e5edf0;
  --text-2: #b0bfc6;
  --text-3: #8fa2ab;
  --accent: #46b9c8;
  --accent-strong: #6cccd8;
  --accent-soft: #123139;
  --accent-text: #052127;
  --danger: #ff8a7e;
  --danger-soft: #3a1c1a;
  --warning: #f0c06a;
  --warning-soft: #362a12;
  --success: #6fd1a0;
  --success-soft: #12301f;
  --info: #a3c4ff;
  --info-soft: #172a45;
  --focus: 0 0 0 3px rgba(70, 185, 200, .35);
  --shadow-sm: none;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .45);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); }
code, kbd { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-sprite { display: none; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: none; box-shadow: var(--focus); }
kbd { padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); color: var(--text-3); font-size: 12px; }

/* Botones */
.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.button:hover:not(:disabled) { border-color: var(--text-3); background: var(--surface-2); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.button-primary:hover:not(:disabled) { border-color: var(--accent-strong); background: var(--accent-strong); }
.button-danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }
.button-danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.button-danger-solid { border-color: var(--danger); background: var(--danger); color: #fff; }
[data-theme="dark"] .button-danger-solid { color: #2a0d0a; }
.button-danger-solid:hover:not(:disabled) { filter: brightness(.94); }
.button-icon { width: 36px; padding: 0; }
.button-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.button-ghost:hover:not(:disabled) { border-color: transparent; background: var(--surface-3); color: var(--text); }
.button-ghost-danger { color: var(--danger); }
.button-ghost-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.button-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.button-sm.button-icon { width: 30px; padding: 0; }
.button-sm .icon { width: 16px; height: 16px; }
.button-block { width: 100%; }

/* Formularios */
label > span, .field-label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); outline: 0; background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea { line-height: 1.5; resize: vertical; }
:where(input, select, textarea):focus { border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[readonly] { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.field-help { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; line-height: 1.4; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px 20px 20px; }
.settings-grid .wide, .block-fields .wide, .logo-fields .wide { grid-column: 1 / -1; }
.message { min-height: 20px; margin: 8px 0; color: var(--danger); font-size: 13px; }
.inline-warning { margin: 0 0 16px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); border-radius: var(--radius); background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 500; }

/* Login */
.login-view { display: grid; min-height: 100vh; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-brand img { width: 40px; height: 40px; object-fit: contain; }
.login-brand strong, .sidebar-brand strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
.login-brand span, .sidebar-brand span { display: block; color: var(--text-3); font-size: 12px; }
.login-card h1 { font-size: 24px; }
.login-card > p { margin: 6px 0 24px; color: var(--text-3); }
.password-field { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.password-field:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.password-field input:not([type=checkbox]) { border: 0; box-shadow: none !important; background: transparent; }
.password-field button { padding: 0 12px; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.back-link { display: block; margin-top: 20px; color: var(--text-3); font-size: 13px; text-align: center; text-decoration: none; }
.back-link:hover { color: var(--text); }

/* Estructura */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; gap: 8px; padding: 16px 12px; border-right: 0; background: var(--sidebar-bg); color: var(--sidebar-text); }
:root { --sidebar-bg: #1e1e2d; --sidebar-text: #9899ac; --sidebar-hover: rgba(255,255,255,.06); --sidebar-active-bg: rgba(54,153,255,.1); --sidebar-active-text: #3699ff; --sidebar-muted: #565674; --sidebar-border: rgba(255,255,255,.06); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid var(--sidebar-border); margin-bottom: 4px; }
.sidebar-brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.sidebar-brand strong { color: #fff; }
.sidebar-brand span { color: var(--sidebar-muted); }
.sidebar-section-label { padding: 12px 12px 4px; color: var(--sidebar-muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.admin-tabs { display: flex; flex-direction: column; gap: 2px; }
.admin-tabs button, .sidebar-link { display: flex; width: 100%; min-height: 36px; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none; color: var(--sidebar-text); font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.admin-tabs button:hover, .sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.admin-tabs button.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); }
.admin-tabs button.is-refreshing::after { width: 12px; height: 12px; margin-left: auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sidebar-footer { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sidebar-border); }
.app-main { min-width: 0; width: 100%; padding: 0 32px 96px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -32px 20px; padding: 12px 32px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.topbar h1 { font-size: 20px; }
.search-trigger { display: inline-flex; width: min(280px, 50%); min-height: 36px; align-items: center; gap: 8px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-3); font-size: 14px; cursor: pointer; }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger kbd { margin-left: auto; }
.tab-view { display: grid; gap: 16px; }
.view-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Tarjetas */
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-header h2 { font-size: 16px; }
.card-header p { margin-top: 2px; color: var(--text-3); font-size: 13px; }
.card-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-body { padding: 16px 20px 20px; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px 16px; overflow: hidden; border: 0; border-radius: var(--radius-lg); background: var(--surface-2); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--text-3); font-size: 13px; font-weight: 500; }
.kpi-icon { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-icon-blue { background: rgba(54,153,255,.12); color: #3699ff; }
.kpi-icon-teal { background: rgba(11,114,133,.12); color: var(--accent); }
.kpi-icon-green { background: rgba(80,205,137,.12); color: #50cd89; }
.kpi-icon-amber { background: rgba(255,168,0,.12); color: #ffa800; }
.kpi-icon-purple { background: rgba(113,102,240,.12); color: #7166f0; }
.kpi-value { color: var(--text); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.02em; }
.kpi-sub { color: var(--text-3); font-size: 12px; }
.kpi-trend { padding-bottom: 44px; }
.sparkline { position: absolute; right: 0; bottom: 0; left: 0; width: 100%; height: 36px; }
.sparkline-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sparkline-area { fill: var(--accent-soft); stroke: none; }

/* Barra de herramientas de la tabla */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar-filters { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.search-field { position: relative; display: block; flex: 1 1 240px; max-width: 420px; }
.search-field .icon { position: absolute; top: 9px; left: 10px; color: var(--text-3); pointer-events: none; }
.search-field input:not([type=checkbox]) { padding-left: 36px; }
.select-field select { width: auto; min-width: 150px; }
.select-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.select-inline span { margin: 0; color: var(--text-3); font-size: 13px; font-weight: 400; }
.select-inline select { min-width: 0; min-height: 30px; padding: 4px 8px; font-size: 13px; }
.menu-wrap { position: relative; }
.action-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; display: grid; min-width: 200px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.action-menu button { display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font-size: 14px; text-align: left; cursor: pointer; }
.action-menu button:hover:not(:disabled), .action-menu button:focus-visible { background: var(--surface-3); }
.action-menu .menu-danger { color: var(--danger); }
.action-menu .menu-danger:hover:not(:disabled) { background: var(--danger-soft); }
.action-menu button:disabled { opacity: .45; cursor: not-allowed; }

/* Tabla de inscripciones */
.table-wrap { overflow-x: auto; }
.responses-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.responses-table th { position: sticky; top: 0; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.responses-table td { padding: var(--row-pad, 10px) 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.responses-table tbody tr { transition: background .1s; }
.responses-table tbody tr:hover { background: var(--surface-2); }
.responses-table tbody tr:last-child td { border-bottom: 0; }
.responses-table th:first-child, .responses-table td:first-child { padding-left: 16px; }
.responses-table th:last-child, .responses-table td:last-child { padding-right: 12px; }
.cell-main { display: block; color: var(--text); font-weight: 500; }
.cell-sub { display: block; color: var(--text-3); font-size: 12px; }
.cell-partner { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-3); font-size: 13px; }
.cell-partner .icon { width: 14px; height: 14px; }
.cell-entry { white-space: nowrap; }
.response-id { display: block; color: var(--text-3); font-size: 12px; }
.cell-entry .badge { margin-top: 4px; }
.cell-license, .cell-age { white-space: nowrap; }
.cell-contact { max-width: 220px; color: var(--text-2); }
.cell-contact span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-player { min-width: 190px; }
.cell-tests { min-width: 160px; }
.row-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-actions .button { width: 32px; min-height: 32px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(54,153,255,.1); color: #3699ff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-team { background: rgba(80,205,137,.1); color: #50cd89; }
.badge { display: inline-flex; width: max-content; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-strong); }
.cell-partner-tags { margin-top: 4px; }
:root[data-density="compact"] { --row-pad: 8px; }
:root[data-density="compact"] .cell-sub, :root[data-density="compact"] .cell-entry .response-id { display: none; }
:root[data-density="comfortable"] { --row-pad: 14px; }
.result-count { margin: 0; color: var(--text-3); font-size: 13px; }
.card-footer .result-count { margin-right: auto; }
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination .button { min-height: 30px; font-size: 13px; }
.button-page { min-width: 32px; min-height: 30px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.button-page.is-current { border-color: var(--accent); background: var(--accent); color: var(--accent-text); pointer-events: none; }
.pagination-ellipsis { color: var(--text-3); font-size: 13px; padding: 0 2px; }
.state-box { display: grid; gap: 4px; padding: 48px 24px; color: var(--text-3); text-align: center; }
.state-box strong { color: var(--text); font-size: 16px; font-weight: 600; }
.skeleton-table { display: grid; gap: 1px; padding: 8px 16px 16px; }
.skeleton-table span { height: 36px; margin-top: 8px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.skeleton-table span:nth-child(2n) { width: 86%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Cuadros */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.filters.has-category { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.filters label > span { font-size: 12px; }
.toggle-field { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-field > span { display: inline; margin: 0; color: var(--text-2); font-size: 13px; }
.analytics-summary-table { overflow-x: auto; padding: 12px 20px 16px; }
.summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary-table th, .summary-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.summary-table thead th { color: var(--text-3); font-size: 12px; font-weight: 500; }
.summary-table tbody th { color: var(--text); font-weight: 500; text-align: left; }
.summary-table tbody tr:last-child > * { border-bottom: 0; }
.summary-count { min-width: 36px; padding: 2px 10px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.summary-count:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.summary-count.is-zero { background: none; color: var(--text-3); font-weight: 400; }
.summary-count.is-selected { background: var(--accent); color: var(--accent-text); }
.summary-none { color: var(--border-strong); }
.summary-total { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.analytics-roster-panel { display: grid; gap: 8px; }
.analytics-board { display: grid; gap: 16px; }
.analytics-board-empty { padding: 40px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-3); text-align: center; }
.category-roster { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.category-roster-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.category-roster-heading > div { display: flex; align-items: center; gap: 10px; }
.category-roster-heading h3 { font-size: 16px; }
.category-roster-icon { display: none; }
.category-roster-count { color: var(--text-3); font-size: 13px; }
.category-tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 12px 16px 16px; }
.category-test { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.category-test-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.category-test-heading h4 { font-size: 14px; font-weight: 500; }
.category-test-heading > span { min-width: 24px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: center; }
.category-test-registrations { display: grid; gap: 6px; padding: 8px; }
.category-test-empty { margin: 0; padding: 12px 4px; color: var(--text-3); font-size: 13px; text-align: center; }
.roster-registration { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.roster-registration.is-team { border-left: 3px solid var(--accent); }
.roster-players { display: grid; }
.roster-player { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; }
.roster-player + .roster-player { border-top: 1px solid var(--border); }
.roster-role, .player-number { display: inline-grid; min-width: 24px; height: 20px; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; }
.roster-player-copy { min-width: 0; }
.roster-player-copy strong { display: block; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.roster-player-copy span { display: block; color: var(--text-3); font-size: 12px; }
.roster-registration-meta { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; }
.roster-registration-meta code { font-size: 12px; }

/* Apariencia */
.appearance-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.appearance-editors { display: grid; gap: 16px; min-width: 0; }
.appearance-preview { position: sticky; top: 80px; display: grid; gap: 8px; }
.preview-frame { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.preview-browser { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid #e5eaec; background: #f3f5f6; }
.preview-browser span { width: 8px; height: 8px; border-radius: 50%; background: #cfd6da; }
.preview-browser p { overflow: hidden; margin-left: 8px; padding: 2px 8px; border-radius: 4px; background: #fff; color: #5e7079; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.preview-hero { display: grid; min-height: 168px; align-content: end; gap: 2px; padding: 16px; background: #0b5a73 center/cover no-repeat; color: #fff; }
.preview-hero span { font-size: 11px; opacity: .9; }
.preview-hero strong { font-size: 16px; font-weight: 700; line-height: 1.2; text-transform: uppercase; }
.logos-preview { display: flex; min-height: 56px; align-items: center; background: #fff; }
.logos-preview-item { display: flex; flex: 1 1 0; min-width: 0; justify-content: center; padding: 8px 6px; border-left: 1px solid #e6eef0; }
.logos-preview-item:first-child { border-left: 0; }
.logos-preview-item img { display: block; max-width: 100%; height: 30px; object-fit: contain; transform: scale(var(--logo-scale, 1)); }
.logos-preview-empty { margin: 0 auto; color: #5e7079; font-size: 12px; }
.preview-footer { padding: 8px 12px; border-top: 1px solid #e5eaec; color: #5e7079; font-size: 11px; text-align: center; }
.media-panel .card-header { padding-bottom: 0; }
.banner-editor { display: grid; grid-template-columns: minmax(200px, .9fr) 1.1fr; gap: 16px; padding: 16px 20px 20px; }
.banner-preview { min-height: 150px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-3) center/cover no-repeat; }
.media-fields { display: grid; align-content: start; gap: 12px; }
.upload-control { display: grid; align-content: start; gap: 6px; }
.file-button { width: max-content; cursor: pointer; }
.file-button:focus-within { box-shadow: var(--focus); }
progress { width: 100%; height: 6px; accent-color: var(--accent); }
.logo-editor { display: grid; gap: 12px; padding: 16px 20px 20px; }
.logo-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px 16px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.logo-card-top { display: flex; grid-column: 1 / -1; align-items: center; gap: 10px; }
.logo-card-position { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.logo-card-title { color: var(--text); font-size: 14px; font-weight: 500; }
.logo-card-top .block-actions { display: flex; gap: 2px; margin-left: auto; }
.logo-preview { display: grid; min-height: 96px; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.logo-preview img { max-width: 80%; max-height: 64px; object-fit: contain; transform: scale(var(--preview-scale, 1)); }
.logo-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.logo-fields label:has(input[type=range]) { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; }
.logo-fields label:has(input[type=range]) > span { grid-column: 1 / -1; }
.scale-value { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Formulario */
#setting-intro { min-height: 96px; }
.editor-blocks { display: grid; gap: 6px; padding: 12px 20px 20px; counter-reset: block; }
.editor-block { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); counter-increment: block; }
.editor-block.is-open { border-color: var(--border-strong); }
.block-top { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; }
.editor-block.is-open .block-top { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.block-toggle { display: flex; flex: 1; min-width: 0; min-height: 36px; align-items: center; gap: 10px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; cursor: pointer; }
.block-chevron { color: var(--text-3); transition: transform .15s; }
.editor-block.is-open .block-chevron { transform: rotate(90deg); }
.block-heading { display: flex; min-width: 0; align-items: center; gap: 10px; }
.block-kind { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.block-kind::before { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); content: ""; }
.section-block .block-kind::before { background: #d9a43a; }
.block-kind::after { color: var(--text-3); content: counter(block); font-variant-numeric: tabular-nums; }
.block-title { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.block-summary { max-width: 45%; margin-left: auto; overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.block-actions { display: flex; flex: 0 0 auto; gap: 2px; }
.block-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px; }
.required-toggle { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 36px; }
.required-toggle span { margin: 0; color: var(--text-2); font-size: 14px; font-weight: 400; }
.options-field, .selection-limits { grid-column: 1 / -1; }
.options-title { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.option-list { display: grid; gap: 6px; margin-bottom: 8px; }
.option-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.option-actions { display: flex; align-items: center; gap: 2px; }
.option-actions .badge { margin-right: 6px; }
.selection-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rich-editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.rich-editor:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.rich-toolbar-spacer { flex: 1; }
.rich-source-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.rich-editable { min-height: 120px; max-height: 420px; overflow: auto; padding: 10px 12px; outline: 0; color: var(--text); line-height: 1.6; }
.rich-editable:empty::before { color: var(--text-3); content: "Escribe el contenido de la sección…"; }
.rich-editable > :first-child { margin-top: 0; }
.rich-editable > :last-child { margin-bottom: 0; }
.rich-editable h2, .rich-editable h3, .rich-editable h4 { margin: 12px 0 6px; font-size: 16px; }
.rich-editable p { margin: 6px 0; }
.rich-editable ul, .rich-editable ol { margin: 6px 0; padding-left: 22px; }
.rich-editable table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 13px; }
.rich-editable th, .rich-editable td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; }
.rich-editable th { background: var(--surface-2); }
.rich-source { min-height: 200px; border: 0 !important; border-radius: 0 0 var(--radius) var(--radius) !important; box-shadow: none !important; font: 13px/1.55 var(--mono); }

/* Actividad */
.activity-list { margin: 0; padding: 0; list-style: none; }
.card > .result-count { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.activity-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-item p { color: var(--text); }
.activity-item time { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-kind { width: max-content; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 500; }
.activity-item.is-danger .activity-kind { background: var(--danger-soft); color: var(--danger); }
.activity-session { display: block; color: var(--text-3); font: 12px var(--mono); }

/* Diálogos */
dialog { padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(8, 20, 27, .5); }
.dialog { width: min(560px, calc(100% - 24px)); max-height: 90vh; }
.dialog-sm { width: min(440px, calc(100% - 24px)); }
.dialog-md { width: min(680px, calc(100% - 24px)); }
.dialog-lg { width: min(880px, calc(100% - 24px)); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-kicker { display: block; margin-bottom: 2px; color: var(--text-3); font-size: 12px; }
.dialog-header h2 { font-size: 20px; }
.dialog-subtitle { margin-top: 2px; color: var(--text-3); font-size: 13px; }
.dialog-header-actions { display: flex; align-items: center; gap: 8px; }
.dialog-body { padding: 20px; }
.dialog-body h2 { font-size: 20px; }
.dialog-body > p { margin: 6px 0 16px; color: var(--text-3); }
.dialog-body label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.dialog-footer p { color: var(--danger); font-size: 13px; }
.dialog-footer > div { display: flex; gap: 8px; margin-left: auto; }
.dialog-message { padding: 0 20px; color: var(--text-2); font-size: 13px; }
.dialog-message:not(:empty) { padding-top: 12px; }
.dialog-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; padding: 16px 20px 20px; }
.trash-item, .history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.trash-copy, .history-copy { display: grid; gap: 2px; min-width: 0; }
.trash-copy strong, .history-copy strong { color: var(--text); font-weight: 500; }
.trash-copy span, .trash-copy small, .history-copy span { overflow-wrap: anywhere; color: var(--text-3); font-size: 13px; }
.trash-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.history-current { padding: 1px 8px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 500; }

/* Detalle de inscripción */
.detail-content { display: grid; gap: 20px; max-height: calc(90vh - 74px); overflow: auto; padding: 20px; }
.detail-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.detail-hero > div > * { display: block; }
.detail-hero > div > span { color: var(--text-3); font-size: 12px; }
.detail-hero > div > strong { color: var(--text); font-size: 16px; font-weight: 600; }
.detail-hero a { font-size: 13px; }
.detail-hero-meta { text-align: right; }
.detail-section h3 { margin-bottom: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.detail-player-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-player-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.detail-player-heading { display: flex; align-items: center; gap: 10px; }
.detail-player-heading strong, .detail-player-heading span { display: block; }
.detail-player-heading strong { color: var(--text); font-weight: 600; }
.detail-player-heading span:not(.player-number) { color: var(--text-3); font-size: 12px; }
.detail-player-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.detail-player-facts span, .detail-player-facts strong { display: block; }
.detail-player-facts span { color: var(--text-3); font-size: 12px; }
.detail-player-facts strong { font-size: 13px; font-weight: 500; }
.detail-player-tests { display: flex; flex-wrap: wrap; gap: 4px; }
.detail-test-list { display: grid; gap: 6px; }
.detail-test-row { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.detail-test-row strong, .detail-test-row span { display: block; }
.detail-test-row strong { font-weight: 500; }
.detail-test-row span:not(.detail-test-icon) { color: var(--text-3); font-size: 13px; }
.detail-test-icon { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.detail-empty { color: var(--text-3); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.detail-item { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: var(--text-3); font-size: 12px; }
.detail-item strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }

/* Edición de inscripción */
.edit-response-dialog form { display: flex; max-height: 90vh; flex-direction: column; }
.edit-response-content { display: grid; flex: 1; gap: 20px; overflow: auto; padding: 20px; }
.edit-response-section h3 { margin-bottom: 10px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.edit-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.edit-category-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.edit-category-group { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.edit-category-group legend { padding: 0 4px; color: var(--text); font-size: 13px; font-weight: 600; }
.edit-choice { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.edit-choice span { margin: 0; color: var(--text); font-size: 14px; font-weight: 400; }
.edit-partners { display: grid; gap: 12px; }
.edit-partner-card { padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.edit-partner-card h4 { margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.edit-response-section .inline-warning { margin: 10px 0 0; }

/* Confirmación */
.confirm-body { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.confirm-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--danger-soft); color: var(--danger); }
.confirm-dialog[data-tone="warning"] .confirm-icon { background: var(--warning-soft); color: var(--warning); }
.confirm-eyebrow { display: block; margin-bottom: 2px; color: var(--text-3); font-size: 12px; }
.confirm-copy h2 { font-size: 16px; }
.confirm-copy p { margin-top: 6px; color: var(--text-2); }
.confirm-context { display: inline-flex; margin-top: 10px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.confirm-typed { display: block; margin-top: 12px; }
.confirm-typed input:not([type=checkbox]) { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.confirm-actions { padding: 12px 20px; border-top: 1px solid var(--border); }
.confirm-dialog[data-tone="warning"] #confirm-accept { border-color: var(--text); background: var(--text); color: var(--surface); }

/* Búsqueda rápida */
.palette-dialog { width: min(600px, calc(100% - 24px)); margin-top: 12vh; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.palette-search input:not([type=checkbox]) { min-height: 32px; padding: 0; border: 0; box-shadow: none !important; background: transparent; font-size: 16px; }
.palette-results { max-height: 50vh; margin: 0; overflow: auto; padding: 6px; list-style: none; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); cursor: pointer; }
.palette-item.is-active { background: var(--accent-soft); color: var(--accent-strong); }
.palette-copy { display: grid; flex: 1; min-width: 0; }
.palette-copy strong { color: var(--text); font-weight: 500; }
.palette-copy span { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.palette-kind { color: var(--text-3); font-size: 12px; }
.palette-empty { padding: 20px; color: var(--text-3); text-align: center; }

/* Avisos y barra de guardado */
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); font-size: 14px; pointer-events: auto; cursor: pointer; animation: toast-in .18s ease both; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: var(--success); }
.toast-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.toast-error .icon { color: var(--danger); }
.toast-info .icon { color: var(--info); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
body.has-save-bar .toasts { bottom: 88px; }
.save-bar { position: fixed; z-index: 50; bottom: 16px; left: calc(50% + 118px); display: flex; width: min(640px, calc(100% - 280px)); align-items: center; gap: 16px; padding: 10px 10px 10px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(-50%); }
.save-bar p { display: flex; flex: 1; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 500; }
.save-bar-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--warning); }
.save-bar > div { display: flex; gap: 8px; }
body.has-save-bar .app-main { padding-bottom: 120px; }

/* Responsive */
@media (max-width: 1280px) {
  .filters, .filters.has-category { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .appearance-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1080px) {
  .appearance-layout { grid-template-columns: 1fr; }
  .appearance-preview { position: static; order: -1; max-width: 420px; }
  .cell-license, .responses-table th:nth-child(4) { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; min-width: 0; height: auto; flex-flow: row wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--sidebar-border); }
  .sidebar-section-label { display: none; }
  .sidebar-brand { flex: 1; padding: 0; }
  .sidebar-footer { display: flex; order: 2; margin: 0; padding: 0; border: 0; }
  .sidebar-footer .sidebar-link { width: 36px; justify-content: center; padding: 0; }
  .sidebar-footer .sidebar-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-tabs { order: 3; width: 100%; min-width: 0; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs button { width: auto; flex: 0 0 auto; }
  .app-main { padding: 0 16px 96px; }
  .topbar { position: static; min-height: 0; margin: 0 -16px 16px; padding: 12px 16px; background: none; backdrop-filter: none; }
  .search-trigger { width: auto; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .save-bar { left: 50%; width: calc(100% - 24px); }
  .settings-grid, .block-fields, .logo-fields, .edit-fields-grid, .banner-editor { grid-template-columns: 1fr; }
  .filters, .filters.has-category { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .block-summary { display: none; }
  .detail-player-grid, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 20px; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions #excel-button { flex: 1; }
  .search-field { max-width: none; }
  .select-field { flex: 1; }
  .select-field select { width: 100%; }
  .responses-table, .responses-table tbody { display: block; }
  .responses-table thead { display: none; }
  .responses-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .responses-table td { display: block; padding: 0 !important; border: 0; }
  .responses-table .cell-player { grid-column: 1; grid-row: 1; }
  .responses-table .row-actions { grid-column: 2; grid-row: 1 / span 2; width: auto; }
  .responses-table .cell-entry { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text-3); }
  .responses-table .cell-entry .cell-main { color: var(--text-3); font-weight: 400; font-size: 13px; }
  .responses-table .cell-entry .response-id, :root[data-density="compact"] .responses-table .cell-entry .response-id { display: inline; }
  .responses-table .cell-entry .badge { margin: 0; }
  .responses-table .cell-age, .responses-table .cell-contact { grid-column: 1 / -1; display: inline; color: var(--text-3); font-size: 13px; }
  .responses-table .cell-age .cell-main { display: inline; color: var(--text-2); font-weight: 400; }
  .responses-table .cell-age .cell-sub { display: none; }
  .responses-table .cell-tests { grid-column: 1 / -1; min-width: 0; margin-top: 4px; }
  .responses-table .cell-license { display: none; }
  .card-footer { justify-content: space-between; }
  .card-footer .result-count { width: 100%; }
  .activity-item { grid-template-columns: 1fr auto; }
  .activity-kind { grid-column: 1 / -1; }
  .trash-item, .history-item { flex-direction: column; align-items: stretch; }
  .logo-card { grid-template-columns: 1fr; }
  .confirm-body { grid-template-columns: 1fr; }
  .dialog-footer > div, .dialog-actions { width: 100%; }
  .dialog-footer > div > *, .dialog-actions > * { flex: 1; }
  .save-bar { flex-direction: column; align-items: stretch; gap: 10px; bottom: 10px; }
  .save-bar > div > * { flex: 1; }
}

/* Impresión de los cuadros */
@media print {
  @page { size: A4 landscape; margin: 9mm; }
  body.printing-analytics { background: #fff !important; color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-analytics .sidebar, body.printing-analytics .topbar, body.printing-analytics .view-actions, body.printing-analytics .analytics-filters, body.printing-analytics .kpis, body.printing-analytics .analytics-summary, body.printing-analytics .result-count, body.printing-analytics .tab-view:not(#analytics-tab), body.printing-analytics .toasts, body.printing-analytics .save-bar { display: none !important; }
  body.printing-analytics .app { display: block; }
  body.printing-analytics .app-main { max-width: none; padding: 0; }
  body.printing-analytics .category-roster { margin: 0 0 5mm; box-shadow: none; break-inside: avoid-page; }
  body.printing-analytics .category-tests-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3mm; padding: 3mm; }
}
