/* ═══════════════════════════════════════════════════════════════════════════
   Plataforma de Inscripciones Internacionales · FESBA
   Sistema de diseño institucional
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy-950: #070f24;
  --navy-900: #0c1a3a;
  --navy-800: #13285a;
  --navy-700: #1c3a85;
  --blue-500: #4f78d6;
  --blue-100: #e6edfb;
  --blue-50: #f3f6fd;
  --red-600: #c02b2b;
  --red-700: #9e1f1f;
  --red-50: #fdf3f3;
  --gold-400: #e2c741;
  --gold-100: #fbf5d6;
  --green-700: #15653a;
  --green-600: #1a8048;
  --green-50: #edf8f1;
  --amber-700: #9a4b06;
  --amber-50: #fff8eb;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e3e8f0;
  --line-2: #cfd7e3;
  --bg: #f4f6fa;
  --surface: #ffffff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 10px 28px -12px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-3: 0 28px 60px -20px rgba(7, 15, 36, 0.38);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy-700);
}

.container {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.2vw, 32px);
}

.ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico-xl {
  width: 40px;
  height: 40px;
  stroke-width: 1.4;
}

.mono,
.mono-tag {
  font-family: var(--font-mono);
}

/* ─── Cabecera ──────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(7, 15, 36, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.brand-mark img {
  max-width: 100%;
  max-height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.segmented {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.segmented-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.38s var(--ease), width 0.38s var(--ease);
}

.segmented-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: 600 13px/1 var(--font-body);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}

.segmented-btn:hover {
  color: #fff;
}

.segmented-btn.is-active {
  color: var(--navy-900);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: pulse-ring 2.2s var(--ease) infinite;
}

.pulse-dot.is-error,
.pulse-dot.is-error::after {
  background: #f87171;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(3); opacity: 0; }
}

/* ─── Botones ───────────────────────────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.005em;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:focus-visible,
.chip:focus-visible,
.segmented-btn:focus-visible,
.tmt-card:focus-visible,
.admin-item:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-xs {
  height: 31px;
  padding: 0 11px;
  font-size: 12px;
  gap: 6px;
  border-radius: 7px;
}

.btn-xs .ico {
  width: 14px;
  height: 14px;
}

.btn-lg {
  height: 50px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(19, 40, 90, 0.7);
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-900);
}

.btn-accent {
  background: linear-gradient(180deg, #cc3434 0%, var(--red-600) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(192, 43, 43, 0.85);
}

.btn-accent:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--red-600) 0%, var(--red-700) 100%);
}

.btn-accent .ico,
.btn-primary .ico:last-child {
  transition: transform 0.25s var(--ease);
}

.btn-accent:hover:not(:disabled) .ico:last-child,
.btn-primary:hover:not(:disabled) .ico:last-child {
  transform: translateX(3px);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink-2);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--navy-700);
  color: var(--navy-800);
  background: var(--blue-50);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-ghost-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.btn-link {
  border: 0;
  background: none;
  padding: 0;
  font: 600 12.5px var(--font-body);
  color: var(--navy-700);
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.btn-icon:hover {
  background: var(--red-50);
  color: var(--red-600);
}

.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading > * {
  visibility: hidden;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.9) rgba(255, 255, 255, 0.9) rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.25);
  animation: spin 0.7s linear infinite;
}

.btn-outline.is-loading::after,
.btn-ghost-light.is-loading::after {
  border-color: var(--navy-700) var(--navy-700) var(--line-2) var(--line-2);
}

.btn-ghost-light.is-loading::after {
  border-color: #fff #fff rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.3);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(79, 120, 214, 0.35), transparent 60%),
    radial-gradient(900px 400px at -10% 120%, rgba(192, 43, 43, 0.3), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-court {
  position: absolute;
  right: -6%;
  top: 50%;
  width: 72%;
  max-width: 980px;
  transform: translateY(-46%) perspective(1100px) rotateX(58deg) rotateZ(-8deg);
  transform-origin: center;
  fill: none;
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 3;
  animation: court-in 1.4s var(--ease) both;
}

.hero-court .net {
  stroke: rgba(226, 199, 65, 0.4);
  stroke-width: 5;
}

@keyframes court-in {
  from { opacity: 0; transform: translateY(-40%) perspective(1100px) rotateX(70deg) rotateZ(-8deg); }
  to { opacity: 1; transform: translateY(-46%) perspective(1100px) rotateX(58deg) rotateZ(-8deg); }
}

.hero-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.arc-line {
  fill: none;
  stroke: rgba(254, 213, 77, 0.38);
  stroke-width: 1.75;
  stroke-dasharray: 4 10;
  stroke-linecap: round;
  animation: arc-flow 4.4s linear infinite;
}

@keyframes arc-flow {
  0% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -112; }
  100% { stroke-dashoffset: 0; }
}

.hero-shuttle {
  will-change: transform;
}

.court-hit-point {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, opacity;
}

.court-hit-point.hit-right {
  animation: court-hit-pulse 4.4s ease-out infinite;
}

.court-hit-point.hit-left {
  animation: court-hit-pulse 4.4s ease-out -2.2s infinite;
}

@keyframes court-hit-pulse {
  0%, 18%, 100% { transform: scale(1); opacity: 0.7; }
  4% { transform: scale(1.85); opacity: 1; }
}

.hero-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(7, 15, 36, 0.6));
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding-top: 64px;
  padding-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  animation: rise 0.7s var(--ease) both;
}

.eyebrow-line {
  width: 28px;
  height: 2px;
  background: currentColor;
}

.hero-title {
  margin: 16px 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  animation: rise 0.8s 0.08s var(--ease) both;
}

.hero-title span {
  color: rgba(255, 255, 255, 0.55);
}

.hero-lead {
  max-width: 600px;
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  animation: rise 0.8s 0.16s var(--ease) both;
}

.hero-lead strong {
  color: #fff;
  font-weight: 600;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  animation: rise 0.8s 0.24s var(--ease) both;
}

.stat {
  padding: 18px 20px;
}

.stat + .stat {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.stat dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.stat dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Stepper ───────────────────────────────────────────────────────────── */

.stepper-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.stepper {
  position: relative;
  display: flex;
  list-style: none;
  margin: 0 auto;
  height: 58px;
  align-items: center;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.step:hover {
  background: var(--blue-50);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: #fff;
  transition: all 0.3s var(--ease);
}

.step.is-active {
  color: var(--navy-900);
}

.step.is-active .step-num {
  border-color: var(--navy-800);
  color: var(--navy-800);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.step.is-done .step-num {
  background: var(--green-600);
  border-color: var(--green-600);
  color: transparent;
  position: relative;
}

.step.is-done .step-num::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
  animation: pop 0.35s var(--ease-spring) both;
}

@keyframes pop {
  from { transform: translateY(-1px) rotate(45deg) scale(0.2); opacity: 0; }
  to { transform: translateY(-1px) rotate(45deg) scale(1); opacity: 1; }
}

.stepper-progress {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 2px;
  background: transparent;
  list-style: none;
  pointer-events: none;
}

.stepper-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--navy-700), var(--red-600));
  transition: width 0.6s var(--ease);
}

/* ─── Layout formulario ─────────────────────────────────────────────────── */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding-top: 32px;
  padding-bottom: 64px;
}

.form-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.form-aside {
  position: sticky;
  top: calc(var(--header-h) + 58px + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Paneles ───────────────────────────────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  scroll-margin-top: calc(var(--header-h) + 58px + 20px);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-index {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--navy-700);
  min-width: 40px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--navy-900);
  line-height: 1.1;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.panel-body {
  padding: 24px 28px 28px;
}

/* Revelado al hacer scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── Campos ────────────────────────────────────────────────────────────── */

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.optional {
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 16px 18px;
}

.field-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid .span-2 {
  grid-column: span 2;
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 400 14px var(--font-body);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.input::placeholder {
  color: #94a3b8;
}

.input:hover {
  border-color: #b5c0d0;
}

.input:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 4px rgba(28, 58, 133, 0.12);
}

textarea.input {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

textarea.input.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.input-sm {
  height: 36px;
  font-size: 13px;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon > .ico {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
  width: 17px;
  height: 17px;
  transition: color 0.18s var(--ease);
}

.input-icon > .input {
  padding-left: 38px;
}

.input-icon:focus-within > .ico {
  color: var(--navy-700);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.select-wrap .ico {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.form-error {
  margin: 0;
  font-size: 12.5px;
  color: var(--red-600);
  font-weight: 500;
}

/* ─── Toolbar, chips, leyenda ───────────────────────────────────────────── */

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar .grow {
  flex: 1;
}

.toolbar .month {
  width: 210px;
}

.toolbar-split {
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font: 500 12.5px var(--font-body);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--navy-700);
  color: var(--navy-800);
}

.chip.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.results-meta strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.legend {
  display: flex;
  gap: 14px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-success { background: var(--green-600); }
.dot-warning { background: #e0912a; }
.dot-danger { background: var(--red-600); }
.dot-neutral { background: #94a3b8; }

/* ─── Etiquetas ─────────────────────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tag .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.tag-success { background: var(--green-50); color: var(--green-700); border-color: #cdebd9; }
.tag-warning { background: var(--amber-50); color: var(--amber-700); border-color: #f6dfb8; }
.tag-danger { background: var(--red-50); color: var(--red-700); border-color: #f4cfcf; }
.tag-info { background: var(--blue-50); color: var(--navy-700); border-color: #d6e1f7; }
.tag-neutral { background: #f1f4f8; color: var(--ink-2); border-color: var(--line); }

.mono-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1f4f8;
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
  flex-shrink: 0;
}

.mono-tag-lg {
  font-size: 14px;
  padding: 6px 12px;
}

/* ─── Tarjetas de torneo ────────────────────────────────────────────────── */

.tmt-grid-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfd;
}

.tmt-grid-wrap::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 36px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(250, 251, 253, 0), #fafbfd);
  pointer-events: none;
}

.tmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px 12px 30px;
  scrollbar-width: thin;
}

.tmt-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  animation: card-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.tmt-card:hover {
  border-color: #b8c5dc;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.tmt-card.is-selected {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(28, 58, 133, 0.14), var(--shadow-2);
}

.tmt-card.is-selected::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red-600);
}

.tmt-card.is-closed {
  opacity: 0.62;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 10px;
  background: var(--blue-50);
  border: 1px solid #dbe4f6;
  color: var(--navy-800);
}

.tmt-card.is-selected .date-block {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.date-day {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.date-month {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.tmt-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tmt-card-cat {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmt-card-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tmt-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.tmt-card-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.skeleton-card {
  height: 82px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef1f6 0%, #f7f9fc 40%, #eef1f6 80%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ─── Detalle del torneo seleccionado ───────────────────────────────────── */

.tmt-detail {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  animation: detail-in 0.5s var(--ease) both;
}

@keyframes detail-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.tmt-detail-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 22px;
  color: #fff;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(79, 120, 214, 0.4), transparent 70%),
    linear-gradient(135deg, var(--navy-800), var(--navy-950));
}

.tmt-detail-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.tmt-detail-name {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.tmt-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.tmt-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tmt-detail-meta .ico {
  width: 15px;
  height: 15px;
}

.tmt-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  transition: background-color 0.18s var(--ease);
}

.tmt-detail-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tmt-detail-link .ico {
  width: 15px;
  height: 15px;
}

.tmt-detail-body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  background: #fff;
}

.countdown {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  background: var(--blue-50);
}

.countdown.is-warning { background: var(--amber-50); }
.countdown.is-closed { background: var(--red-50); }

.countdown-value {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 0.95;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}

.countdown.is-warning .countdown-value { color: var(--amber-700); }
.countdown.is-closed .countdown-value { color: var(--red-700); font-size: 30px; }

.countdown-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0;
  padding: 26px 22px 22px;
}

.timeline-track {
  position: absolute;
  top: 37px;
  left: calc(22px + (100% - 44px) / 6);
  right: calc(22px + (100% - 44px) / 6);
  list-style: none;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.timeline-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--navy-700), var(--red-600));
  transition: width 1.1s 0.2s var(--ease);
}

.milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.milestone-dot {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-2);
  margin-bottom: 8px;
  z-index: 1;
  transition: all 0.4s var(--ease);
}

.milestone.is-done .milestone-dot {
  background: var(--navy-700);
  border-color: var(--navy-700);
}

.milestone.is-next .milestone-dot {
  border-color: var(--red-600);
  background: #fff;
}

.milestone.is-next .milestone-dot::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--red-600);
}

.milestone.is-next .milestone-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--red-600);
  animation: pulse-ring 2s var(--ease) infinite;
}

.milestone-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.milestone-date {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.milestone-sub {
  font-size: 11.5px;
  color: var(--muted);
}

/* ─── Subpanel técnico ──────────────────────────────────────────────────── */

.subpanel {
  margin-top: 22px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fafbfd, #fff);
}

.subpanel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.subpanel-head-text {
  flex: 1;
  min-width: 0;
}

.coaches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coach-add-more-row {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.subpanel-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--navy-800);
  color: #fff;
  flex-shrink: 0;
}

.subpanel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.subpanel-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ─── Constructor de pruebas ────────────────────────────────────────────── */

.entries {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: visible;
  box-shadow: var(--shadow-1);
  animation: entry-in 0.45s var(--ease-spring) both;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.entry:focus-within {
  border-color: #b8c5dc;
  box-shadow: var(--shadow-2);
}

.entry.is-removing {
  animation: entry-out 0.3s var(--ease) forwards;
}

@keyframes entry-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes entry-out {
  to { opacity: 0; transform: translateX(24px) scale(0.98); }
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
  border-radius: var(--radius) var(--radius) 0 0;
}

.entry-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry-index b {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--navy-800);
  letter-spacing: 0;
  margin-left: 4px;
}

.mod-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #eef1f6;
  border: 1px solid var(--line);
}

.mod-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mod-opt span {
  display: inline-block;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 7px;
  text-align: center;
  font: 700 12px var(--font-body);
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.mod-opt span:hover {
  color: var(--navy-800);
}

.mod-opt input:checked + span {
  background: #fff;
  color: var(--navy-800);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.mod-opt input:focus-visible + span {
  outline: 2px solid var(--blue-500);
}

.entry-mod-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.entry-body {
  padding: 4px 18px;
}

.slot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px 0;
}

.slot + .slot {
  border-top: 1px dashed var(--line-2);
}

.slot-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.slot-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.slot-search {
  position: relative;
}

.foreign-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 10px;
}

/* Interruptor */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 0.2s var(--ease);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s var(--ease-spring);
}

.toggle input:checked + .toggle-track {
  background: var(--navy-700);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* Elevación de contexto de apilamiento al abrir desplegables de licencias */
.panel.has-open-ac,
.panel:focus-within {
  position: relative;
  z-index: 45;
}

.subpanel.has-open-ac,
.subpanel:focus-within,
.entry.has-open-ac,
.entry:focus-within {
  position: relative;
  z-index: 40;
}

.slot.has-open-ac,
.slot:focus-within,
.ac-field.has-open-ac,
.ac-field:focus-within {
  position: relative;
  z-index: 35;
}

.tmt-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Ficha de deportista seleccionado */
.player-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #cad9f6;
  border-radius: 10px;
  background: var(--blue-50);
  animation: chip-in 0.35s var(--ease-spring) both;
}

.player-chip.has-warning {
  border-color: #f6dfb8;
  background: var(--amber-50);
}

.player-chip.has-danger {
  border-color: #fca5a5;
  background: #fef2f2;
}

.player-chip.has-danger .avatar {
  background: var(--red-600);
}

.ac-item.is-age-ineligible {
  opacity: 0.62;
  background: #fff5f5;
  cursor: not-allowed;
}

.ac-item.is-age-ineligible:hover,
.ac-item.is-age-ineligible.is-highlighted {
  background: #fee2e2;
}

.age-rule-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  color: var(--navy-800);
  font-size: 13px;
}

.age-rule-banner.is-youth {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.age-rule-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.age-rule-main .ico {
  width: 18px;
  height: 18px;
  color: var(--blue-600);
  flex-shrink: 0;
}

.age-rule-events {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-subcat-select {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font: 700 12px var(--font-display);
  letter-spacing: 0.04em;
  color: var(--navy-800);
}

.player-chip.is-partner-wanted {
  border-style: dashed;
  border-color: #93b4ff;
  background: #f0f6ff;
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--navy-800);
  color: #fff;
  font: 600 13px var(--font-body);
  letter-spacing: 0.02em;
}

.player-chip.has-warning .avatar {
  background: var(--amber-700);
}

.avatar-pw {
  background: var(--blue-500);
}

.avatar-pw .ico {
  width: 18px;
  height: 18px;
}

.sum-entry-player.is-pw {
  color: var(--blue-700);
  font-style: italic;
  font-weight: 500;
}

.pc-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.pc-name {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.25;
}

.pc-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.btn-chip-change {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid #c5d4f0;
  background: #fff;
  color: var(--navy-800);
  font: 600 12px var(--font-body);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s var(--ease);
}

.btn-chip-change:hover {
  border-color: var(--navy-700);
  background: var(--navy-800);
  color: #fff;
}

/* Barra inferior para añadir más deportistas */
.entries-add-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: #fafbfd;
  flex-wrap: wrap;
}

.entries-add-hint {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ─── Autocompletar ─────────────────────────────────────────────────────── */

.ac-field {
  position: relative;
}

.ac-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: min(560px, calc(100vw - 48px));
  width: max-content;
  max-width: min(640px, calc(100vw - 48px));
  z-index: 120;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  box-shadow: 0 22px 48px -12px rgba(7, 15, 36, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 6px;
  animation: dropdown-in 0.18s var(--ease) both;
  transform-origin: top left;
}

.ac-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px 7px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ac-item {
  display: grid;
  grid-template-columns: 36px minmax(200px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.12s var(--ease);
}

.ac-item + .ac-item {
  border-top: 1px solid #f3f5f9;
}

.ac-item:hover,
.ac-item.is-highlighted {
  background: var(--blue-50);
}

.ac-item .avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.ac-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.ac-name {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ac-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ac-empty {
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ─── Estado vacío ──────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

.empty-state p {
  margin: 0;
}

.empty-state .ico-xl {
  color: #a8b4c6;
}

.empty-state-lg {
  padding: 72px 28px;
  background: #fff;
}

/* ─── Resumen lateral ───────────────────────────────────────────────────── */

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy-700), var(--red-600), var(--gold-400));
}

.summary-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sum-tmt {
  margin: 10px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sum-tmt-name {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--navy-900);
}

.sum-tmt.is-empty .sum-tmt-name {
  color: #a8b4c6;
}

.sum-tmt-meta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.sum-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.sum-metrics div {
  padding: 10px 8px;
  border-radius: 10px;
  background: #f5f7fb;
  text-align: center;
}

.sum-metrics dt {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.sum-metrics dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sum-metrics dd.is-bump {
  animation: bump 0.4s var(--ease-spring);
}

.sum-metrics dd.has-warnings {
  color: var(--amber-700);
}

@keyframes bump {
  40% { transform: scale(1.25); }
}

.sum-entries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafd;
  border: 1px solid var(--line);
}

.sum-entry-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
}

.sum-entry-row + .sum-entry-row {
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.sum-entry-players {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sum-entry-player {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-inline {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.sum-warnings {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.sum-warnings:empty {
  display: none;
}

.sum-warnings li {
  display: flex;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--amber-50);
  border: 1px solid #f6dfb8;
  font-size: 12px;
  line-height: 1.4;
  color: #6b3c06;
  animation: chip-in 0.3s var(--ease) both;
}

.sum-warnings li .ico {
  width: 15px;
  height: 15px;
  color: var(--amber-700);
  margin-top: 1px;
}

.sum-warnings li.is-danger {
  background: var(--red-50);
  border-color: #f4cfcf;
  color: var(--red-700);
}

.sum-warnings li.is-danger .ico {
  color: var(--red-600);
}

.sum-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.help-card {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--blue-50);
  border: 1px solid #d6e1f7;
  font-size: 12.5px;
  color: var(--ink-2);
}

.help-card .ico {
  color: var(--navy-700);
  margin-top: 1px;
}

.help-card strong {
  display: block;
  color: var(--navy-900);
  margin-bottom: 2px;
}

.help-card p {
  margin: 0;
}

/* ─── Pie ───────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ─── Área Deportiva ────────────────────────────────────────────────────── */

.admin-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(800px 300px at 90% -20%, rgba(192, 43, 43, 0.35), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
}

.admin-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}

.admin-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 36px;
  flex-wrap: wrap;
}

.admin-title {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  animation: rise 0.6s var(--ease) both;
}

.admin-lead {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.7);
}

.admin-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-container {
  padding-top: 28px;
  padding-bottom: 64px;
}

.login-card {
  max-width: 420px;
  margin: 24px auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  animation: rise 0.5s var(--ease) both;
}

.login-card .field {
  text-align: left;
}

.login-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  color: var(--navy-900);
}

.login-card p {
  margin: -8px 0 0;
  color: var(--muted);
}

.login-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(19, 40, 90, 0.8);
}

.login-icon .ico {
  width: 24px;
  height: 24px;
}

.login-card.is-shaking {
  animation: shake 0.42s var(--ease);
}

@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  animation: card-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kpi-label .ico {
  width: 16px;
  height: 16px;
}

.kpi-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi.is-warning .kpi-value { color: var(--amber-700); }
.kpi.is-success .kpi-value { color: var(--green-700); }

.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-list {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.admin-list-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-list-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-list-items {
  max-height: calc(100vh - var(--header-h) - 160px);
  overflow-y: auto;
  padding: 8px;
}

.admin-item {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  animation: card-in 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}

.admin-item:hover {
  background: #f5f7fb;
}

.admin-item.is-active {
  background: var(--blue-50);
  border-color: #d6e1f7;
}

.admin-item .date-block {
  height: 46px;
}

.admin-item .date-day {
  font-size: 20px;
}

.admin-item .ico {
  color: #a8b4c6;
  transition: transform 0.2s var(--ease);
}

.admin-item.is-active .ico {
  color: var(--navy-700);
  transform: translateX(2px);
}

.ai-name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ai-tags .tag {
  height: 19px;
  font-size: 10.5px;
  padding: 0 7px;
}

.admin-detail {
  min-width: 0;
}

#adminSelectedTournamentPanel {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  animation: detail-in 0.4s var(--ease) both;
}

.detail-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.detail-head h2 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--navy-900);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.detail-meta .ico {
  width: 15px;
  height: 15px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #fafbfd 0%, #f3f6fa 100%);
  border-bottom: 1px solid var(--line);
}

.action-bar .btn {
  height: 34px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: 7px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.disclosure {
  margin: 18px 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.disclosure summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.disclosure summary .chevron {
  margin-left: auto;
  transition: transform 0.25s var(--ease);
}

.disclosure[open] summary .chevron {
  transform: rotate(180deg);
}

.disclosure-body {
  padding: 0 16px 16px;
  animation: rise 0.3s var(--ease) both;
}

.disclosure-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.report {
  margin: 18px 24px 0;
  border-radius: var(--radius);
  border: 1px solid #cdebd9;
  background: var(--green-50);
  overflow: hidden;
  animation: detail-in 0.4s var(--ease) both;
}

.report.has-missing {
  border-color: #f6dfb8;
  background: var(--amber-50);
}

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex-wrap: wrap;
}

.report-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.report-title .ico {
  width: 20px;
  height: 20px;
  color: var(--green-600);
}

.report.has-missing .report-title .ico {
  color: var(--amber-700);
}

.report-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.report-metrics div {
  padding: 12px 16px;
}

.report-metrics div + div {
  border-left: 1px solid rgba(15, 23, 42, 0.06);
}

.report-metrics dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.report-metrics dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.report-list {
  margin: 0;
  padding: 12px 16px 14px 34px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12.5px;
  color: var(--red-700);
}

.report-list li + li {
  margin-top: 4px;
}

.reg-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 24px;
}

.reg-card {
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px -4px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  animation: card-in 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}

.reg-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
  border-bottom: 1px solid var(--line);
}

.reg-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reg-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.reg-title h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

.reg-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.reg-people span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.reg-people strong {
  font-weight: 600;
  color: var(--ink);
}

.reg-people .ico {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.reg-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.reg-toolbar-left,
.reg-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reg-toolbar-right {
  margin-left: auto;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 9px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #fff;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f3f7;
  vertical-align: middle;
}

.data-table th.col-mod,
.data-table td.col-mod {
  width: 88px;
  white-space: nowrap;
}

.data-table th.col-ctd,
.data-table td.col-ctd {
  width: 165px;
}

.data-table th.col-status,
.data-table td.col-status {
  width: 185px;
}

.data-table th.col-actions,
.data-table td.col-actions {
  width: 152px;
  text-align: right;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background-color 0.15s var(--ease);
}

.data-table tbody tr:hover {
  background: #f8fafd;
}

.mod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--navy-800);
  color: #fff;
  font: 700 11.5px/1 var(--font-body);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.cell-player-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 26px;
}

.cell-player-row + .cell-player-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #eef2f7;
}

.cp-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.cp-id {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  background: #f1f4f8;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.cell-ctd-row {
  display: flex;
  align-items: center;
  min-height: 26px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.cell-ctd-row + .cell-ctd-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed transparent;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.btn-icon-danger {
  width: 31px;
  height: 31px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.btn-icon-danger:hover {
  border-color: #fca5a5;
  background: #fff5f5;
  color: var(--red-600);
}

.btn-danger-outline {
  border: 1px solid #fca5a5;
  background: #fff5f5;
  color: var(--red-700);
}

.btn-danger-outline:hover {
  border-color: var(--red-600);
  background: #fee2e2;
  color: #7f1d1d;
}

.cell-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.reg-notes {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: var(--amber-50);
  font-size: 12px;
  color: #6b3c06;
}

.reg-notes .ico {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* ─── Modales ───────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 15, 36, 0);
  backdrop-filter: blur(0);
  transition: background-color 0.25s var(--ease), backdrop-filter 0.25s var(--ease);
}

.modal.is-open {
  background: rgba(7, 15, 36, 0.6);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.28s var(--ease), transform 0.32s var(--ease-spring);
}

.modal-dialog.has-open-ac {
  overflow: visible;
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: none;
}

.modal-sm { max-width: 460px; }
.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1180px; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--navy-900);
}

.modal-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.modal-head .btn-icon:hover {
  background: #f1f4f8;
  color: var(--ink);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.publish-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
}

.publish-config {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.publish-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.preview-frame {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f9fa;
}

.preview-frame-tall {
  height: 640px;
}

/* Diálogo de éxito */
.success-dialog {
  align-items: center;
  text-align: center;
  padding: 32px 28px 26px;
  gap: 10px;
}

.success-dialog h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy-900);
}

.success-mark {
  width: 76px;
  height: 76px;
}

.success-mark svg {
  width: 100%;
  height: 100%;
}

.sm-circle {
  fill: none;
  stroke: var(--green-600);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.sm-check {
  fill: none;
  stroke: var(--green-600);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
}

.modal.is-open .sm-circle {
  animation: draw 0.6s 0.15s var(--ease) forwards;
}

.modal.is-open .sm-check {
  animation: draw 0.35s 0.65s var(--ease) forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.success-text {
  margin: 4px 0 0;
  color: var(--ink-2);
}

.success-dialog .sum-warnings {
  width: 100%;
  text-align: left;
  margin: 6px 0 0;
}

.success-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* ─── Notificaciones ────────────────────────────────────────────────────── */

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 48px));
}

.toast {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px 40px 14px 16px;
  border-radius: var(--radius);
  background: var(--navy-950);
  color: #fff;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: toast-in 0.4s var(--ease-spring) both;
}

.toast.is-leaving {
  animation: toast-out 0.3s var(--ease) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(30px); }
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(52, 211, 153, 0.16); color: #34d399; }
.toast-error .toast-icon { background: rgba(248, 113, 113, 0.16); color: #f87171; }
.toast-warning .toast-icon { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.toast-info .toast-icon { background: rgba(147, 180, 255, 0.16); color: #93b4ff; }

.toast-title {
  font-weight: 600;
  font-size: 13.5px;
}

.toast-msg {
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.toast-msg a {
  color: #93b4ff;
}

.toast-msg code {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.toast-close .ico {
  width: 14px;
  height: 14px;
}

.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.35);
  transform-origin: left;
  animation: toast-bar linear forwards;
}

@keyframes toast-bar {
  to { transform: scaleX(0); }
}

/* ─── Vistas ────────────────────────────────────────────────────────────── */

.tab-view.is-entering {
  animation: view-in 0.45s var(--ease) both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ─── Responsive & Native Desktop Polish ────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}

@media (max-width: 1320px) {
  .admin-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
  .data-table th.col-ctd, .data-table td.col-ctd { width: 140px; }
  .data-table th.col-status, .data-table td.col-status { width: 165px; }
}

@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-list { position: static; }
  .admin-list-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    max-height: 280px;
  }
  .publish-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-aside { position: static; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .sync-status { display: none; }
}

@media (max-width: 820px) {
  .container { padding: 0 14px; }
  .header-inner { gap: 10px; }
  .brand-mark { flex-shrink: 0; width: 38px; height: 38px; }
  .brand-text { display: none; }
  .lg-only { display: none; }
  .segmented-btn { padding: 9px 14px; }
  .header-meta .btn { width: 36px; padding: 0; }
  .header-meta .btn span { display: none; }
  .hero-inner { padding-top: 32px; padding-bottom: 28px; }
  .stat { padding: 14px 12px; }
  .stat dt { font-size: 10px; letter-spacing: 0.03em; }
  .stat dd { font-size: 28px; }
  .results-meta { flex-wrap: wrap; }
  .stepper .step-label { display: none; }
  .stepper { justify-content: space-between; }
  .field-grid.cols-3,
  .field-grid.cols-2 { grid-template-columns: 1fr; }
  .field-grid .span-2 { grid-column: auto; }
  .slot, .foreign-fields { grid-template-columns: 1fr; gap: 10px; }
  .toolbar { flex-direction: column; }
  .toolbar .month { width: 100%; }
  .tmt-grid { grid-template-columns: 1fr; }
  .tmt-detail-body { grid-template-columns: 1fr; }
  .countdown { border-right: 0; border-bottom: 1px solid var(--line); }
  .entry-head { flex-wrap: wrap; }
  .entry-mod-label { order: 3; flex-basis: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-list { padding: 14px; }
  .reg-head { padding: 12px 14px; }
  .reg-toolbar-right { margin-left: 0; }
  .legend { display: none; }
  .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-shuttle {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ─── Conexión de Correo Oficial (Panel Admin) ──────────────────────────── */
.mail-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.mail-dot.is-ok {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.mail-dot.is-warn {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.mail-dot.is-err {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.admin-mail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.admin-mail-banner.is-ok {
  border-color: #bbf7d0;
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 65%);
}

.admin-mail-banner.is-warn {
  border-color: #fde68a;
  background: linear-gradient(90deg, #fffbeb 0%, #ffffff 65%);
}

.admin-mail-banner.is-err {
  border-color: #fecaca;
  background: linear-gradient(90deg, #fef2f2 0%, #ffffff 65%);
}

.admin-mail-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.admin-mail-info strong {
  color: var(--ink);
}

.mail-status-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.55;
}

.mail-status-card.is-ok {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d;
}

.mail-status-card.is-warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
}

.mail-status-card.is-err {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.mail-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12.5px;
}

.mail-pass-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Radar de vigilancia, detector de conflictos y consulta pública ────── */

.admin-watchlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.watch-card {
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.watch-card.is-urgent {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 70%);
}

.watch-card.is-warn {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 70%);
}

.watch-card.is-ready {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 70%);
}

.watch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 13px;
}

.watch-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.watch-item-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: 500 12px var(--font-body);
  cursor: pointer;
  text-align: left;
}

.watch-item-btn:hover {
  border-color: var(--navy-700);
  background: #fff;
}

.admin-conflicts-box {
  margin: 14px 24px 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-conflicts-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: #78350f;
}

.conflict-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(120, 53, 15, 0.16);
  font-size: 12.5px;
  color: var(--ink);
}

.conflict-row.is-danger {
  border-color: #fca5a5;
  background: #fff5f5;
  color: #7f1d1d;
}

.conflict-row.is-pw {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.lookup-result-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.row-is-withdrawn {
  opacity: 0.62;
  background: #fff5f5;
}


