/* ==========================================================================
   TATAMI · Karate Manager
   Hoja de estilos principal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens y reset
   -------------------------------------------------------------------------- */

:root {
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --bg: #f3f0e9;
  --bg-deep: #eae5da;
  --surface: #fffdf9;
  --surface-2: #f8f5ee;
  --surface-3: #f1ede4;

  --ink: #191b20;
  --ink-2: #565962;
  --ink-3: #8a8d95;

  --line: #e5e0d5;
  --line-strong: #d4cec0;

  --red: #c8352c;
  --red-dark: #a62720;
  --red-soft: #fcecea;
  --red-tint: #f6d9d5;

  --gold: #c1912f;
  --silver: #98a1ab;
  --bronze: #aa7347;

  --green: #2f7a54;
  --green-soft: #e9f3ed;
  --blue: #34648f;
  --blue-soft: #eaf1f8;
  --amber: #b27a24;
  --amber-soft: #fbf2df;
  --violet: #685a8f;

  --sidebar-bg: #14161a;
  --sidebar-ink: #e9e5db;
  --sidebar-muted: #8f918f;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(25, 27, 32, 0.05);
  --shadow-sm: 0 2px 6px rgba(25, 27, 32, 0.04), 0 1px 2px rgba(25, 27, 32, 0.05);
  --shadow-md: 0 14px 34px -22px rgba(25, 27, 32, 0.32);
  --shadow-lg: 0 30px 70px -38px rgba(20, 22, 26, 0.45);

  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

::selection {
  background: var(--red);
  color: #fff;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   2. Utilidades
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--red);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.85;
}

.eyebrow--light {
  color: #e07a6f;
}

.muted {
  color: var(--ink-3);
  font-size: 12px;
}

.center {
  text-align: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.16s var(--ease), gap 0.16s var(--ease);
}

.text-link svg {
  color: var(--red);
}

.text-link:hover {
  color: var(--red);
  gap: 7px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin-top: 5px;
  font-size: 26px;
}

.toolbar-note {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   3. Botones y enlaces de acción
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 9px 20px -12px rgba(200, 53, 44, 0.85);
}

.btn--primary:hover {
  background: var(--red-dark);
  box-shadow: 0 12px 24px -12px rgba(166, 39, 32, 0.9);
}

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

.btn--ghost:hover {
  border-color: var(--ink-3);
  background: #fff;
}

.btn--light {
  background: #f7f2e8;
  color: #1b1d22;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.65);
}

.btn--light:hover {
  background: #fff;
}

.btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.055);
  color: #f3eee4;
}

.btn--ghost-light:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

.btn--danger {
  background: #b42e28;
  color: #fff;
}

.btn--danger:hover {
  background: #98231e;
}

.btn--danger-text {
  color: var(--red);
}

.btn--danger-text:hover {
  border-color: var(--red-tint);
  background: var(--red-soft);
}

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

.btn--xs {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px;
}

.btn--wide {
  width: 100%;
  height: 46px;
  justify-content: center;
  font-size: 13.5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease), transform 0.16s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
  transform: translateY(-1px);
}

.icon-btn--danger:hover {
  border-color: var(--red-tint);
  background: var(--red-soft);
  color: var(--red);
}

.icon-btn--success:hover {
  border-color: #c7e2d2;
  background: var(--green-soft);
  color: var(--green);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   4. Badges, chips, cintas y avatares
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge--neutral {
  background: #f0ede6;
  color: #71747c;
}

.badge--info {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge--live {
  background: var(--red-soft);
  color: var(--red);
}

.badge--live .badge-dot {
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.badge--success {
  background: var(--green-soft);
  color: var(--green);
}

.badge--warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge--danger {
  background: var(--red-soft);
  color: var(--red-dark);
}

.discipline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.discipline--kata {
  background: #eef2f8;
  color: #3b5f88;
}

.discipline--kumite {
  background: var(--red-soft);
  color: #a2382f;
}

.belt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.belt i {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(25, 27, 32, 0.16);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.cell-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c8503f, #8c2f27);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.avatar--0 { background: linear-gradient(135deg, #cf5a48, #8f3129); }
.avatar--1 { background: linear-gradient(135deg, #4a7ba3, #2a4c6a); }
.avatar--2 { background: linear-gradient(135deg, #58906b, #315a43); }
.avatar--3 { background: linear-gradient(135deg, #c08a3e, #85571e); }
.avatar--4 { background: linear-gradient(135deg, #77679c, #493e67); }

.avatar--xs {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
}

.avatar--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.avatar--lg {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  font-size: 21px;
}

.medal-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(25, 27, 32, 0.15);
}

.medal-mark--gold {
  background: linear-gradient(145deg, #e8c568, #b38227);
}

.medal-mark--silver {
  background: linear-gradient(145deg, #d7dee5, #929ca8);
}

.medal-mark--bronze {
  background: linear-gradient(145deg, #d29a68, #94603a);
}

.medal-mark--sm {
  width: 22px;
  height: 22px;
}

.medal-mark--lg {
  width: 38px;
  height: 38px;
}

.mini-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.mini-medal--gold { background: linear-gradient(145deg, #e3bd5a, #a97a22); }
.mini-medal--silver { background: linear-gradient(145deg, #cfd7df, #8d97a3); }
.mini-medal--bronze { background: linear-gradient(145deg, #c98f5e, #8c5a35); }

/* --------------------------------------------------------------------------
   5. Progreso y decoración
   -------------------------------------------------------------------------- */

.progress {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #e06457);
  transition: width 0.5s var(--ease);
}

.progress--muted > i {
  background: #b6b1a5;
}

.progress--light {
  background: rgba(255, 255, 255, 0.14);
}

.progress--light > i {
  background: linear-gradient(90deg, #e06054, #f0ae7d);
}

/* --------------------------------------------------------------------------
   6. Scrollbars
   -------------------------------------------------------------------------- */

* {
  scrollbar-width: thin;
  scrollbar-color: #c9c2b4 transparent;
}

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

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

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #c9c2b4;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #aea695;
  background-clip: padding-box;
}

/* --------------------------------------------------------------------------
   7. Formularios
   -------------------------------------------------------------------------- */

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

.field__label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.field__label em {
  color: var(--red);
  font-style: normal;
}

.field__input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fdfbf6;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
    box-shadow 0.16s var(--ease);
}

.field__input::placeholder {
  color: #a5a29a;
}

.field__input:hover {
  border-color: #bfb8a9;
}

.field__input:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.11);
}

.field__input:disabled {
  background: var(--surface-3);
  color: var(--ink-3);
  cursor: not-allowed;
}

.field__select {
  padding-right: 34px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23565962' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.field__textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

.field__hint {
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.field--full {
  grid-column: 1 / -1;
}

.field--required .field__label::after {
  content: "*";
  color: var(--red);
  font-size: 11px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 15px;
}

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

.form-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--red-tint);
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 500;
}

.input-with-icon {
  position: relative;
  display: block;
}

.input-with-icon > .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon .field__input {
  height: 46px;
  padding-left: 39px;
  background: #fbf8f2;
}

.input-with-icon .field__input:focus + .input-reveal,
.input-with-icon:focus-within > .icon {
  color: var(--red);
}

.input-reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  transform: translateY(-50%);
}

.input-reveal:hover,
.input-reveal.is-active {
  background: var(--surface-3);
  color: var(--ink);
}

.checkbox-field {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 0;
  cursor: pointer;
}

.checkbox-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox-box {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease);
}

.checkbox-field input:checked + .checkbox-box {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.checkbox-field input:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.18);
}

.checkbox-field strong {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.checkbox-field small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.4;
}

.hint-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.hint-line .icon {
  margin-top: 1px;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   8. Carga, vacíos y errores
   -------------------------------------------------------------------------- */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--ink-2);
  animation: spin 0.7s linear infinite;
}

.spinner--light {
  color: #fff;
}

.spinner--dark {
  color: var(--ink);
}

.route-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45vh;
  color: var(--ink-3);
  font-size: 12.5px;
}

.skeleton {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, #e9e4da 25%, #f2eee6 37%, #e9e4da 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton--eyebrow {
  width: 96px;
  height: 10px;
  margin-bottom: 14px;
}

.skeleton--heading {
  width: min(340px, 62vw);
  height: 40px;
}

.skeleton-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton--title {
  width: 160px;
  height: 20px;
  margin-bottom: 8px;
}

.skeleton--row {
  width: 100%;
  height: 38px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skeleton--card {
  height: 122px;
  border-radius: var(--radius-lg);
}

.skeleton-bracket {
  display: flex;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton--match {
  width: 230px;
  height: 132px;
  margin: auto 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.65);
  text-align: center;
}

.empty-state--filter {
  border-style: solid;
  background: transparent;
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--red);
  box-shadow: var(--shadow-sm);
}

.empty-state h3 {
  font-size: 23px;
}

.empty-state p {
  max-width: 420px;
  margin-top: 7px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.empty-state__action {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 6px;
  color: var(--ink-3);
}

.empty-inline > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-3);
}

.empty-inline p {
  max-width: 340px;
  font-size: 12px;
  line-height: 1.5;
}

.empty-inline.compact {
  justify-content: center;
  padding: 11px 6px;
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48vh;
  padding: 40px 24px;
  text-align: center;
}

.error-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
}

.error-state h2 {
  font-size: 28px;
}

.error-state p {
  max-width: 440px;
  margin: 8px 0 20px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.error-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--red-tint);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 12.5px;
}

.not-found,
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 66vh;
  padding: 40px 20px;
  text-align: center;
}

.not-found__kanji {
  margin-bottom: 10px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 700;
  line-height: 0.9;
  -webkit-text-stroke: 1px var(--line-strong);
}

.not-found h1,
.access-denied h1 {
  margin-top: 6px;
  font-size: 42px;
}

.not-found p,
.access-denied p {
  max-width: 430px;
  margin: 10px 0 22px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.access-denied__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--red);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   9. Toasts
   -------------------------------------------------------------------------- */

#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: #1c1f24;
  color: #f4f1e9;
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 0.24s var(--ease);
}

.toast--out {
  animation: toast-out 0.18s var(--ease) forwards;
}

.toast__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(70, 160, 112, 0.2);
  color: #7ad3a3;
}

.toast--error .toast__icon {
  background: rgba(220, 90, 80, 0.18);
  color: #f08d84;
}

.toast--info .toast__icon {
  background: rgba(100, 150, 210, 0.18);
  color: #92beed;
}

.toast__text {
  flex: 1;
}

.toast__close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* --------------------------------------------------------------------------
   10. Modales
   -------------------------------------------------------------------------- */

#modal-root {
  position: relative;
  z-index: 150;
}

dialog.modal {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

dialog.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.24s var(--ease);
}

dialog.modal::backdrop {
  background: rgba(16, 18, 22, 0.56);
  backdrop-filter: blur(3px);
}

.modal--sm { width: min(460px, calc(100vw - 32px)); }
.modal--md { width: min(600px, calc(100vw - 32px)); }
.modal--lg { width: min(780px, calc(100vw - 32px)); }
.modal--xl { width: min(940px, calc(100vw - 32px)); }

.modal__head {
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px 17px;
  border-bottom: 1px solid var(--line);
}

.modal__eyebrow {
  margin-bottom: 4px;
  color: var(--red);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal__head h2 {
  font-size: 30px;
  line-height: 1.02;
}

.modal__close {
  flex-shrink: 0;
  margin-top: 1px;
  border-color: transparent;
  background: transparent;
}

.modal__body {
  flex: 1;
  min-height: 0;
  padding: 22px 26px;
  overflow-y: auto;
}

.modal__foot {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.modal__spacer {
  flex: 1;
}

.confirm-text {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
}

.confirm-detail {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   11. Animaciones
   -------------------------------------------------------------------------- */

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

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

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

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

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

@keyframes boot-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* --------------------------------------------------------------------------
   12. Pantalla de arranque
   -------------------------------------------------------------------------- */

.boot-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(200, 53, 44, 0.16), transparent 65%),
    var(--sidebar-bg);
  color: #f2eee5;
}

.boot-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
}

.boot-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.boot-screen .spinner {
  width: 18px;
  height: 18px;
  margin-top: 6px;
  color: #d9564b;
}

/* --------------------------------------------------------------------------
   13. Marca
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand__mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand__text small {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand__red {
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 1px;
  background: var(--red);
}

.brand--light {
  color: #f2eee5;
}

.brand--light .brand__mark {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #f2eee5;
}

.brand--light .brand__text small {
  color: rgba(242, 238, 229, 0.45);
}

/* --------------------------------------------------------------------------
   14. Login
   -------------------------------------------------------------------------- */

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(520px, 0.92fr);
  min-height: 100vh;
  background: var(--surface);
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 38px 48px 34px;
  background:
    radial-gradient(85% 65% at 88% -5%, rgba(200, 53, 44, 0.3), transparent 58%),
    radial-gradient(60% 50% at 0% 100%, rgba(83, 102, 125, 0.16), transparent 65%),
    linear-gradient(150deg, #1d2026 0%, #121418 62%, #101216 100%);
  color: #f3efe5;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 13px);
  pointer-events: none;
}

.login-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 96, 84, 0.55));
}

.login-hero__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.login-hero__season {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(243, 239, 229, 0.55);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-hero__content {
  position: relative;
  z-index: 2;
  max-width: 570px;
  margin: auto 0;
  padding: 70px 0 90px;
}

.login-hero__content h1 {
  margin-top: 16px;
  font-size: clamp(54px, 5.7vw, 84px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.login-hero__content h1 span {
  color: #e26659;
}

.login-hero__lead {
  max-width: 470px;
  margin-top: 22px;
  color: rgba(243, 239, 229, 0.59);
  font-size: 13.5px;
  line-height: 1.65;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 30px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(243, 239, 229, 0.72);
  font-size: 12px;
}

.login-features li span {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e26659;
}

.login-hero__art {
  position: relative;
  z-index: 1;
  min-height: 74px;
}

.login-sun {
  position: absolute;
  right: 8%;
  bottom: -190px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(226, 102, 89, 0.32);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(200, 53, 44, 0.25), rgba(200, 53, 44, 0.02) 68%);
  pointer-events: none;
}

.login-kanji {
  position: absolute;
  right: 13%;
  bottom: -22px;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(110px, 12vw, 168px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(243, 239, 229, 0.14);
  pointer-events: none;
}

.login-hero__line {
  display: block;
  width: 54px;
  height: 1.5px;
  margin-bottom: 10px;
  background: #c9463b;
}

.login-hero__motto {
  color: rgba(243, 239, 229, 0.42);
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.04em;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px clamp(30px, 4vw, 56px) 24px;
  background:
    radial-gradient(90% 40% at 100% 0%, rgba(200, 53, 44, 0.035), transparent 70%),
    var(--surface);
}

.login-panel__inner {
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 18px 0;
}

.login-mobile-brand {
  display: none;
}

.login-panel__head h2 {
  margin-top: 8px;
  font-size: 44px;
  letter-spacing: -0.005em;
}

.login-panel__head > p:last-child {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.login-form .btn--wide {
  margin-top: 4px;
}

.demo-access {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.demo-access__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 11px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.demo-access__hint {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.demo-account {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
    transform 0.16s var(--ease);
}

.demo-account:hover {
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-1px);
}

.demo-account.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
}

.demo-account--wide {
  grid-column: 1 / -1;
}

.demo-account__role {
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.demo-account__label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.demo-account__email {
  color: var(--ink-3);
  font-size: 9.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.demo-access__note {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.5;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 18px;
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   15. Estructura general (shell)
   -------------------------------------------------------------------------- */

.shell {
  display: flex;
  min-height: 100vh;
}

.main-shell {
  flex: 1;
  min-width: 0;
  margin-left: 264px;
}

.main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px 34px 64px;
}

/* --------------------------------------------------------------------------
   16. Barra lateral
   -------------------------------------------------------------------------- */

.sidebar {
  position: fixed;
  z-index: 60;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 264px;
  padding: 22px 16px 16px;
  background:
    radial-gradient(100% 40% at 50% 0%, rgba(200, 53, 44, 0.1), transparent 70%),
    var(--sidebar-bg);
  color: var(--sidebar-ink);
  transition: transform 0.26s var(--ease);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar .brand {
  margin: 0 8px 30px;
  color: var(--sidebar-ink);
}

.sidebar .brand__mark {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #f0ece2;
}

.sidebar .brand__text small {
  color: rgba(233, 229, 219, 0.4);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  padding: 2px 4px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group__label {
  padding: 0 10px 7px;
  color: rgba(233, 229, 219, 0.32);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 41px;
  padding: 0 11px;
  border-radius: 9px;
  color: rgba(233, 229, 219, 0.68);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: var(--red);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.16s var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.92);
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
}

.nav-link.is-active::before {
  opacity: 1;
}

.nav-link__icon {
  display: inline-flex;
  color: rgba(233, 229, 219, 0.44);
  transition: color 0.16s var(--ease);
}

.nav-link:hover .nav-link__icon,
.nav-link.is-active .nav-link__icon {
  color: #e16a5f;
}

.nav-link__mark {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: #dd5b50;
  opacity: 0;
}

.nav-link.is-active .nav-link__mark {
  opacity: 1;
}

.sidebar__foot {
  margin-top: auto;
  padding-top: 22px;
}

.sidebar__quote {
  position: relative;
  margin: 0 6px 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar__quote > span {
  display: block;
  margin-bottom: 5px;
  color: #d95b50;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.16em;
}

.sidebar__quote p {
  color: rgba(233, 229, 219, 0.44);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 8px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user .avatar {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 11px;
}

.sidebar-user__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.sidebar-user__info strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__info span {
  overflow: hidden;
  margin-top: 2px;
  color: rgba(233, 229, 219, 0.38);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__logout {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-color: transparent;
  background: transparent;
  color: rgba(233, 229, 219, 0.42);
}

.sidebar-user__logout:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-overlay {
  display: none;
}

/* --------------------------------------------------------------------------
   17. Barra superior
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(212, 206, 192, 0.7);
  background: rgba(243, 240, 233, 0.88);
  backdrop-filter: blur(12px);
}

.topbar__menu {
  display: none;
  width: 36px;
  height: 36px;
  background: var(--surface);
}

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.topbar__brand {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.topbar__slash {
  color: var(--line-strong);
}

#page-crumb {
  overflow: hidden;
  max-width: 42vw;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.topbar__date {
  color: var(--ink-3);
  font-size: 10.5px;
  text-transform: capitalize;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c9a6b;
  box-shadow: 0 0 0 3px rgba(76, 154, 107, 0.13);
}

.topbar__health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.topbar__health:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.topbar__health-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 122, 84, 0.13);
}

.topbar__health.is-local .topbar__health-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(178, 122, 36, 0.14);
}

.topbar__health.is-error .topbar__health-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.14);
}

.topbar__health.is-error {
  border-color: var(--red-tint);
  background: var(--red-soft);
  color: var(--red-dark);
}

.health-modal__lead {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.health-modal__list {
  display: grid;
  gap: 0;
  margin: 0;
}

.health-modal__list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.health-modal__list dt {
  color: var(--ink-3);
  font-size: 11px;
}

.health-modal__list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.health-modal__note {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.55;
}

.health-modal__note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   18. Cabeceras de página
   -------------------------------------------------------------------------- */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-heading__text {
  min-width: 0;
}

.page-heading h1 {
  margin-top: 5px;
  font-size: 44px;
  letter-spacing: -0.008em;
}

.page-heading h1 span {
  color: var(--red);
}

.page-heading__sub {
  max-width: 660px;
  margin-top: 7px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.page-heading__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 3px;
}

.page-heading--dashboard {
  margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
   19. Barras de herramientas, filtros y búsqueda
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.toolbar--stack {
  align-items: stretch;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.pill > span {
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 600;
}

.pill:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.pill.is-active {
  background: var(--red);
  color: #fff;
}

.pill.is-active > span {
  color: rgba(255, 255, 255, 0.7);
}

.pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}

.pill__dot--neutral { background: #9c9fa6; }
.pill__dot--info { background: var(--blue); }
.pill__dot--live { background: var(--red); }
.pill__dot--success { background: var(--green); }
.pill__dot--warning { background: var(--amber); }
.pill__dot--danger { background: var(--red-dark); }

.search-box {
  display: flex;
  flex: 0 1 280px;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-3);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background 0.16s var(--ease);
}

.search-box:focus-within {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.1);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  outline: none;
}

.search-box input::placeholder {
  color: #a4a199;
}

.search-box--grow {
  flex: 1 1 260px;
}

.search-box--sm {
  height: 34px;
  flex: 0 1 220px;
}

.search-box--sm input {
  font-size: 11.5px;
}

.filter-select {
  height: 40px;
  padding: 0 33px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23565962' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  color: var(--ink-2);
  font-size: 12px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.filter-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.1);
}

.tab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-toolbar__filters,
.tab-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tab-toolbar__filters {
  flex: 1 1 340px;
  min-width: 0;
}

.tab-toolbar .search-box {
  flex-basis: 250px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #ecd9b9;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #775a25;
}

.notice__icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--amber);
}

.notice p {
  font-size: 11.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   20. Tarjetas
   -------------------------------------------------------------------------- */

.card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.card--mini {
  padding-bottom: 16px;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card__head h2 {
  margin-top: 5px;
  font-size: 26px;
}

.card__foot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 14px -4px -4px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--red);
  font-size: 11.5px;
  font-weight: 600;
}

.card__foot-link:hover {
  color: var(--red-dark);
}

/* --------------------------------------------------------------------------
   21. Tablas de datos
   -------------------------------------------------------------------------- */

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.table-wrap {
  overflow-x: auto;
}

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

.data-table thead th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}

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

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

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

.data-table tbody tr[hidden] {
  display: none;
}

.data-table td strong,
.data-table td .cell-strong {
  color: var(--ink);
  font-weight: 600;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-cell > div {
  min-width: 0;
}

.person-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-cell small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.club-tag .icon {
  color: var(--ink-3);
}

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.cell-strong {
  font-size: 13px;
}

.cell-strong small {
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 500;
}

.cell-muted {
  color: var(--ink-3);
  font-size: 10.5px;
}

.data-table th.cell-actions,
.data-table td.cell-actions {
  text-align: right;
  white-space: nowrap;
}

.cell-actions .icon-btn {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  border-radius: 8px;
  vertical-align: middle;
}

.you-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.category-cell strong {
  display: block;
  font-size: 12.5px;
}

.reg-count strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.reg-count strong span {
  color: var(--ink-3);
  font-size: 12px;
}

.reg-count small {
  display: block;
  color: var(--ink-3);
  font-size: 9.5px;
}

.bracket-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.bracket-state small {
  color: var(--ink-3);
  font-size: 9.5px;
}

.category-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.category-inline strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locked-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   22. Dashboard
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.stat-card__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.stat-card--red .stat-card__icon { background: var(--red-soft); color: var(--red); }
.stat-card--blue .stat-card__icon { background: var(--blue-soft); color: var(--blue); }
.stat-card--amber .stat-card__icon { background: var(--amber-soft); color: var(--amber); }
.stat-card--green .stat-card__icon { background: var(--green-soft); color: var(--green); }

.stat-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card__label {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.stat-card__body strong {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.stat-card__body small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card__ghost {
  position: absolute;
  right: -6px;
  bottom: -13px;
  color: rgba(25, 27, 32, 0.038);
  pointer-events: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-grid__main,
.dashboard-grid__side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Campeonato destacado */

.active-champ {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(95% 100% at 100% 0%, rgba(200, 53, 44, 0.2), transparent 58%),
    linear-gradient(145deg, #21242b 0%, #15171b 58%, #111317 100%);
  color: #f5f1e7;
  box-shadow: var(--shadow-md);
}

.active-champ::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.active-champ__kanji {
  position: absolute;
  top: -32px;
  right: 6px;
  color: rgba(255, 255, 255, 0.045);
  font-family: var(--font-display);
  font-size: 190px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.active-champ__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.active-champ__head h2 {
  max-width: 540px;
  margin-top: 7px;
  color: #fff;
  font-size: 34px;
  line-height: 1.02;
}

.active-champ__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-top: 10px;
}

.active-champ__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(245, 241, 231, 0.54);
  font-size: 10.5px;
}

.active-champ__meta .icon {
  color: rgba(245, 241, 231, 0.34);
}

.active-champ__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.active-champ__stats div {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.active-champ__stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.active-champ__stats strong {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
}

.active-champ__stats span {
  margin-top: 3px;
  color: rgba(245, 241, 231, 0.42);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.active-champ__progress {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.active-champ__progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: rgba(245, 241, 231, 0.55);
  font-size: 10px;
}

.active-champ__progress-head strong {
  color: #f0c19c;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.active-champ__progress small {
  display: block;
  margin-top: 6px;
  color: rgba(245, 241, 231, 0.35);
  font-size: 9px;
}

.active-champ__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.active-champ--empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 258px;
  padding: 36px 32px;
}

.active-champ--empty h2 {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin-top: 8px;
  font-size: 34px;
}

.active-champ--empty > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 9px 0 18px;
  color: rgba(245, 241, 231, 0.52);
  font-size: 11.5px;
  line-height: 1.55;
}

.active-champ--empty .btn {
  align-self: flex-start;
}

.active-champ__note {
  position: relative;
  z-index: 1;
  color: rgba(245, 241, 231, 0.5);
  font-size: 11px;
}

/* Lista de resultados */

.result-list {
  display: flex;
  flex-direction: column;
}

.result-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(120px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin: 0 -10px;
  border-top: 1px solid var(--line);
  border-radius: 9px;
  transition: background 0.15s var(--ease);
}

.result-row:hover {
  background: var(--surface-2);
}

.result-row__disc {
  display: inline-flex;
}

.result-row__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.result-row__main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row__main small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-row__score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.result-row__score em {
  color: var(--ink-3);
  font-size: 14px;
  font-style: normal;
}

.result-row__meta {
  display: flex;
  flex-direction: column;
  max-width: 180px;
  text-align: right;
}

.result-row__meta strong {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-row__meta small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ranking */

.ranking {
  display: flex;
  flex-direction: column;
}

.ranking__row {
  display: grid;
  grid-template-columns: 22px 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.ranking__row:first-child {
  border-top: 0;
}

.ranking__pos {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ranking__row.is-first .ranking__pos {
  color: var(--gold);
}

.ranking__club {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ranking__club strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking__club small {
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 9px;
}

.ranking__medals {
  display: flex;
  gap: 3px;
}

.ranking__medals .mini-medal {
  width: 19px;
  height: 19px;
  font-size: 8px;
}

/* Próximos combates */

.upcoming-list {
  display: flex;
  flex-direction: column;
}

.upcoming-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 0 -10px;
  border-top: 1px solid var(--line);
  border-radius: 9px;
  transition: background 0.15s var(--ease);
}

.upcoming-row:hover {
  background: var(--surface-2);
}

.upcoming-row__time {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
}

.upcoming-row__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.upcoming-row__cat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: 9px;
}

.upcoming-row__main strong {
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-row__main strong em {
  margin: 0 2px;
  color: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.upcoming-row__main small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-row__round {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.upcoming-row__arrow {
  color: var(--ink-3);
}

/* Mini campeonatos */

.mini-champs {
  display: flex;
  flex-direction: column;
}

.mini-champ {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.mini-champ:first-child {
  border-top: 0;
}

.mini-champ__date {
  flex-shrink: 0;
  width: 62px;
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.3;
}

.mini-champ__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-champ__main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-champ__main small {
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 9px;
}

.mini-champ .badge {
  margin-left: auto;
  font-size: 8px;
}

/* --------------------------------------------------------------------------
   23. Listado de campeonatos
   -------------------------------------------------------------------------- */

.champ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.champ-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.champ-card__watermark {
  position: absolute;
  z-index: 0;
  inset: 3px 0 0;
  width: 100%;
  height: calc(100% - 3px);
  padding: 22px;
  object-fit: contain;
  opacity: 0.1;
  pointer-events: none;
}

.champ-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 3px;
  background: var(--line-strong);
}

.champ-card__top,
.champ-card__body,
.champ-card__foot {
  position: relative;
  z-index: 1;
}

.champ-card--draft::before { background: #aeb0b5; }
.champ-card--registration::before { background: var(--blue); }
.champ-card--in_progress::before { background: var(--red); }
.champ-card--finished::before { background: var(--green); }

.champ-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.champ-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 0;
}

.champ-card__index {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.champ-card__body {
  flex: 1;
  padding: 11px 18px 16px;
}

.champ-card__body h2 {
  font-size: 26px;
  line-height: 1.03;
}

.champ-card__body h2 a {
  transition: color 0.15s var(--ease);
}

.champ-card__body h2 a:hover {
  color: var(--red);
}

.champ-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
}

.champ-card__meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 10px;
}

.champ-card__meta .icon {
  color: var(--ink-3);
}

.champ-card__desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 9px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.champ-card__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.champ-card__stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid var(--line);
}

.champ-card__stats span:first-child {
  border-left: 0;
}

.champ-card__stats strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.champ-card__stats small {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.champ-card__progress {
  margin-top: 11px;
}

.champ-card__progress > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--ink-3);
  font-size: 9.5px;
}

.champ-card__progress strong {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.champ-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.champ-card__actions {
  display: flex;
  gap: 5px;
}

.champ-card__actions .icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   24. Ficha del campeonato
   -------------------------------------------------------------------------- */

.championship-page {
  min-width: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  transition: color 0.15s var(--ease), gap 0.15s var(--ease);
}

.back-link:hover {
  gap: 7px;
  color: var(--red);
}

.championship-head {
  position: relative;
  overflow: hidden;
  padding: 23px 26px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 120% at 96% -10%, rgba(200, 53, 44, 0.055), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-xs);
}

.championship-head__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.championship-head__title {
  min-width: 0;
}

.championship-head__title h1 {
  margin-top: 5px;
  font-size: 40px;
  line-height: 0.98;
}

.championship-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 15px;
  margin-top: 10px;
}

.championship-head__meta > span:not(.badge) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-size: 10.5px;
}

.championship-head__meta .icon {
  color: var(--ink-3);
}

.championship-head__actions {
  display: flex;
  flex-shrink: 0;
  gap: 7px;
}

.champ-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, 1.45fr);
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.champ-stats__item {
  display: flex;
  align-items: center;
  gap: 9px;
}

.champ-stats__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.champ-stats__item > div {
  display: flex;
  flex-direction: column;
}

.champ-stats__item strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.champ-stats__item span:not(.champ-stats__icon) {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.champ-stats__progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-size: 9.5px;
}

.champ-stats__progress-head strong {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   25. Pestañas
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin: 16px 0 22px;
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  height: 43px;
  padding: 0 13px;
  border-bottom: 2px solid transparent;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  border-bottom-color: var(--red);
  color: var(--ink);
  font-weight: 600;
}

.tab__icon {
  display: inline-flex;
  color: var(--ink-3);
}

.tab.is-active .tab__icon {
  color: var(--red);
}

.tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 8.5px;
  font-weight: 700;
}

.tab.is-active .tab__count {
  background: var(--red-soft);
  color: var(--red);
}

.tab-content {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   26. Resumen del campeonato
   -------------------------------------------------------------------------- */

.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.mini-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mini-card__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.mini-card__icon--red { background: var(--red-soft); color: var(--red); }
.mini-card__icon--blue { background: var(--blue-soft); color: var(--blue); }
.mini-card__icon--amber { background: var(--amber-soft); color: var(--amber); }
.mini-card__icon--green { background: var(--green-soft); color: var(--green); }

.mini-card > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-card strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.mini-card > div > span {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mini-card small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}

.overview-grid__main,
.overview-grid__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.category-status-list {
  display: flex;
  flex-direction: column;
}

.category-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 110px auto;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  margin: 0 -8px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.15s var(--ease);
}

.category-status:first-child {
  border-top: 0;
}

.category-status:hover {
  background: var(--surface-2);
}

.category-status__disc {
  display: inline-flex;
}

.category-status__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.category-status__main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-status__main small {
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 9px;
}

.category-status__bar .progress {
  height: 4px;
}

.info-list {
  display: flex;
  flex-direction: column;
}

.info-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.info-list > div:first-child {
  border-top: 0;
}

.info-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.info-list .icon {
  color: var(--ink-3);
}

.info-list strong {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  text-align: right;
}

.info-description {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.55;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

/* --------------------------------------------------------------------------
   27. Tabla de categorías
   -------------------------------------------------------------------------- */

.bracket-state .badge {
  font-size: 8.5px;
}

/* --------------------------------------------------------------------------
   28. Inscripciones y selector de plantilla
   -------------------------------------------------------------------------- */

.roster-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.roster-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.roster-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.roster-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.roster-item:hover {
  background: var(--surface-2);
}

.roster-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.roster-item__check {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: transparent;
}

.roster-item input:checked ~ .roster-item__check {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.roster-item input:focus-visible ~ .roster-item__check {
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.15);
}

.roster-item .avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 10px;
}

.roster-item__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.roster-item__main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-item__main small {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-item__main .belt {
  gap: 4px;
  font-size: 8.5px;
}

.roster-item__main .belt i {
  width: 8px;
  height: 8px;
}

.roster-item__flag,
.roster-item__ok {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.roster-item__flag {
  background: var(--amber-soft);
  color: var(--amber);
}

.roster-item__ok {
  background: var(--green-soft);
  color: var(--green);
}

.roster-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: -8px;
}

/* --------------------------------------------------------------------------
   29. Selector y cabecera de llaves
   -------------------------------------------------------------------------- */

.bracket-selector {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.bracket-pill {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-width: 205px;
  max-width: 260px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.bracket-pill:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.bracket-pill.is-active {
  border-color: var(--red);
  background: var(--red-soft);
}

.bracket-pill__dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

.bracket-pill__dot--neutral { background: #9c9fa6; }
.bracket-pill__dot--info { background: var(--blue); }
.bracket-pill__dot--live { background: var(--red); }
.bracket-pill__dot--success { background: var(--green); }
.bracket-pill__dot--warning { background: var(--amber); }

.bracket-pill__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bracket-pill__text strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-pill__text small {
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8.5px;
}

.bracket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 14px;
}

.bracket-head__main {
  min-width: 0;
}

.bracket-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bracket-head__main h2 {
  margin-top: 7px;
  font-size: 30px;
}

.bracket-head__main > p {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.bracket-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bracket-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 15px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bracket-summary__stat {
  display: flex;
  flex-direction: column;
  min-width: 74px;
}

.bracket-summary__stat span {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bracket-summary__stat strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.bracket-summary__progress {
  flex: 1 1 200px;
  min-width: 160px;
  padding-left: 0;
}

.bracket-summary__progress > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--ink-3);
  font-size: 9px;
}

.bracket-summary__progress strong {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   30. Árbol de llaves
   -------------------------------------------------------------------------- */

.bracket-scroll {
  overflow-x: auto;
  padding: 2px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 1px 1px, rgba(25, 27, 32, 0.035) 1px, transparent 0) 0 0 / 20px 20px,
    var(--surface-2);
}

.bracket-canvas {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding: 18px 22px;
}

.bracket-lines {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.bracket-lines path {
  fill: none;
  stroke: #c5bfb1;
  stroke-width: 1.5;
}

.bracket-rounds {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 52px;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  width: 248px;
  flex-shrink: 0;
}

.bracket-round__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.bracket-round__title span {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bracket-round__title em {
  color: var(--ink-3);
  font-size: 8.5px;
  font-style: normal;
}

.bracket-round__matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
}

.bracket-match {
  width: 248px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 5px rgba(25, 27, 32, 0.04);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease);
}

.bracket-match.is-interactive {
  cursor: pointer;
}

.bracket-match.is-interactive:hover,
.bracket-match.is-interactive:focus-visible {
  border-color: var(--red);
  box-shadow: 0 9px 20px -14px rgba(200, 53, 44, 0.55);
  transform: translateY(-1px);
  outline: none;
}

.bracket-match.is-finished {
  border-color: #d6d1c5;
}

.bracket-match.is-bye .fighter__score {
  display: none;
}

.bracket-match.is-bye {
  border-style: dashed;
  background: #fbf8f1;
}

.bracket-match__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.bracket-match__number {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bracket-match__head .badge {
  padding: 2px 6px;
  font-size: 7.5px;
}

.bracket-match__bye {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bracket-match__fighters {
  display: flex;
  flex-direction: column;
}

.fighter {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 6px 9px;
  border-top: 1px solid var(--line);
}

.bracket-match__fighters .fighter:first-child {
  border-top: 0;
}

.fighter__seed {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

.fighter__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fighter__name strong {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fighter__name small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fighter__check {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}

.fighter__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.fighter.is-winner {
  background: #fdf1ef;
}

.fighter.is-winner .fighter__name strong {
  color: var(--red-dark);
}

.fighter.is-winner .fighter__score {
  background: var(--red);
  color: #fff;
}

.fighter.is-winner .fighter__check {
  background: var(--red-dark);
}

.fighter--empty .fighter__name strong {
  color: var(--ink-3);
  font-weight: 500;
}

.fighter--empty .fighter__score {
  background: transparent;
  color: var(--ink-3);
}

.bracket-match__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 5px 9px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 8px;
}

.bracket-match__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bracket-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.bracket-legend .icon {
  flex-shrink: 0;
  color: var(--ink-3);
}

.bracket-legend .badge {
  margin-left: auto;
}

.bracket-podium {
  margin-top: 20px;
}

.bracket-podium .podium-grid {
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   31. Podios y clasificación
   -------------------------------------------------------------------------- */

.podium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 13px;
}

.podium-grid--single {
  grid-template-columns: minmax(0, 470px);
}

.podium-grid--overview {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.podium-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fdfaf4, #faf6ee);
}

.podium-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.podium-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.podium-card__meta .muted {
  font-size: 8.5px;
}

.podium-card__head h3 {
  font-size: 18px;
  line-height: 1.08;
}

.podium-card__trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f6ecd6;
  color: var(--gold);
}

.podium-card__rows {
  display: flex;
  flex-direction: column;
}

.podium-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}

.podium-row:first-child {
  border-top: 0;
}

.podium-row__person {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.podium-row__person strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-row__person small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-row--empty {
  opacity: 0.6;
}

.podium-row--empty .podium-row__person strong {
  color: var(--ink-3);
  font-weight: 500;
}

.standings {
  display: flex;
  flex-direction: column;
}

.standings__head {
  display: grid;
  grid-template-columns: 30px minmax(130px, 1fr) 34px 34px 34px 42px;
  align-items: center;
  gap: 6px;
  padding: 0 8px 6px;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.standings__row {
  display: grid;
  grid-template-columns: 30px minmax(130px, 1fr) 34px 34px 34px 42px;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
  border-radius: 7px;
}

.standings__row.is-leader {
  border-top-color: transparent;
  background: #fdf3f0;
}

.standings__rank {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.standings__row.is-leader .standings__rank {
  color: var(--red);
}

.standings__club {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.standings__club strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings__row b {
  color: var(--ink);
  font-weight: 700;
}

.standings__points {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.standings--compact .standings__head,
.standings--compact .standings__row {
  grid-template-columns: 26px minmax(110px, 1fr) 30px 30px 30px 36px;
  gap: 4px;
  padding-left: 4px;
  padding-right: 4px;
}

.standings--compact .medal-mark {
  width: 18px;
  height: 18px;
  margin: 0 auto;
}

.standings--compact .medal-mark svg {
  width: 10px;
  height: 10px;
}

.standings--compact .standings__club strong {
  font-size: 10px;
}

.standings--compact .avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 8.5px;
}

/* --------------------------------------------------------------------------
   32. Tatamis
   -------------------------------------------------------------------------- */

.tatami-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 15px;
  align-items: start;
}

.tatami-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.tatami-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}

.tatami-card__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
}

.tatami-card__title {
  min-width: 0;
}

.tatami-card__title h2 {
  font-size: 22px;
  line-height: 1.1;
}

.tatami-card__title p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9.5px;
}

.tatami-card__actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.tatami-card__actions .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.tatami-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 8px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9px;
}

.tatami-card__stats strong {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.tatami-categories {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.tatami-categories--unassigned {
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tatami-categories__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.tatami-categories__head strong {
  color: var(--ink-2);
  font-size: 10px;
}

.tatami-categories__head strong span {
  margin-left: 4px;
  color: var(--ink-3);
  font-weight: 500;
}

.tatami-categories__head small {
  color: var(--ink-3);
  font-size: 9px;
}

.tatami-category-dropzone {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  padding: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tatami-category-dropzone.is-drop-target {
  border-color: var(--red);
  background: var(--red-soft);
}

.tatami-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 10px;
  line-height: 1.3;
}

button.tatami-category-chip {
  cursor: grab;
  user-select: none;
}

button.tatami-category-chip:active {
  cursor: grabbing;
}

.tatami-category-chip__handle {
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  cursor: grab;
  touch-action: none;
}

.tatami-category-chip.is-dragging {
  opacity: 0.45;
}

.tatami-category-chip.is-saving {
  opacity: 0.55;
  pointer-events: none;
}

.tatami-categories__empty {
  align-self: center;
  padding: 2px 4px;
  color: var(--ink-3);
  font-size: 9px;
}

.category-drag-active,
.category-drag-active * {
  user-select: none !important;
}

.tatami-card__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
}

.tatami-match {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.tatami-match.is-finished {
  opacity: 0.65;
  background: var(--surface-2);
}

.tatami-match__time {
  color: var(--ink-3);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

.tatami-match__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tatami-match__cat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-size: 8px;
}

.tatami-match__main strong {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-match__main strong em {
  margin: 0 2px;
  color: var(--red);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.tatami-match__main small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-match__state {
  display: flex;
  justify-content: flex-end;
}

.tatami-match__state .badge {
  font-size: 7.5px;
}

.tatami-match__actions {
  display: flex;
  grid-column: 2 / -1;
  justify-content: flex-end;
  gap: 5px;
  margin-top: -1px;
}

.tatami-match .btn--xs {
  height: 24px;
  padding: 0 7px;
  font-size: 9px;
}

.tatami-finished {
  border-top: 1px solid var(--line);
}

.tatami-finished summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 15px;
  color: var(--ink-3);
  font-size: 9.5px;
  cursor: pointer;
  user-select: none;
}

.tatami-finished summary::marker {
  content: "";
}

.tatami-finished summary:hover {
  color: var(--ink);
}

.tatami-finished > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 12px;
}

.tatami-card--unassigned {
  margin-top: 15px;
  border-style: dashed;
  border-color: #dbc6a2;
}

.tatami-card--unassigned .tatami-card__icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.tatami-card--unassigned .tatami-card__head {
  background: #fdf8ec;
}

/* Árbitros */

.referee-board {
  margin-bottom: 18px;
}

.referee-tatami-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  align-items: start;
}

.referee-tatami {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.referee-tatami--unassigned {
  border-style: dashed;
  border-color: #dbc6a2;
  background: #fdf8ec;
}

.referee-tatami__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.referee-tatami--unassigned .referee-tatami__head {
  background: #fbf3e2;
}

.referee-tatami__title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.referee-tatami__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
}

.referee-tatami--unassigned .referee-tatami__icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.referee-tatami__title strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referee-tatami__title small {
  display: block;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referee-tatami__count {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
}

.referee-tatami--unassigned .referee-tatami__count {
  background: var(--amber-soft);
  color: var(--amber);
}

.referee-tatami__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.referee-tatami__empty {
  margin: 5px 3px;
  color: var(--ink-3);
  font-size: 10px;
}

.referee-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.referee-chip .avatar {
  flex-shrink: 0;
}

.referee-chip__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.referee-chip__main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referee-chip__main small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referee-chip__meta {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.referee-license {
  color: var(--ink-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.referee-chip__meta .badge {
  padding: 3px 6px;
  font-size: 7.5px;
}

.referee-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #dbc6a2;
  border-radius: var(--radius);
  background: #fdf8ec;
  color: #7a5c21;
  font-size: 11px;
  line-height: 1.45;
}

.referee-notice .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.referee-table td {
  vertical-align: middle;
}

.referee-license-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.referee-license-cell strong {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.referee-assign {
  min-width: 132px;
  height: 32px;
  padding: 0 30px 0 9px;
  background-position: right 9px center;
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   33. Medallero
   -------------------------------------------------------------------------- */

.medals-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.medal-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.medal-feature__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.medal-feature--gold {
  border-color: #d8c8a3;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(193, 145, 47, 0.14), transparent 70%),
    linear-gradient(135deg, #24221c, #17181b);
  color: #f6f0e1;
}

.medal-feature--gold .medal-feature__icon {
  background: rgba(230, 190, 95, 0.14);
  color: #e4bd61;
}

.medal-feature > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.medal-feature > div > span {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.medal-feature--gold > div > span {
  color: rgba(246, 240, 225, 0.44);
}

.medal-feature strong {
  overflow: hidden;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medal-feature small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medal-feature--gold small {
  color: rgba(246, 240, 225, 0.4);
}

.medals-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 15px;
  align-items: start;
}

.medal-tally {
  display: flex;
  flex-direction: column;
}

.medal-tally__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.medal-tally__row:first-child {
  border-top: 0;
}

.medal-tally__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.medal-tally__row > span:nth-child(2) {
  color: var(--ink-2);
  font-size: 11px;
}

.medal-tally__row > strong {
  margin-left: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.medal-tally__row--points {
  margin-top: 3px;
  border-top-style: dashed;
}

.medal-tally__row--points .medal-tally__mark {
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--red);
}

.medal-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.45;
}

.medal-note .icon {
  margin-top: 1px;
  color: var(--ink-3);
}

.medals-podiums {
  margin-top: 22px;
}

/* --------------------------------------------------------------------------
   34. Modal de resultado
   -------------------------------------------------------------------------- */

.match-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-modal__banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.match-modal__round {
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-modal__num {
  color: var(--ink-3);
  font-size: 9px;
}

.match-modal__tatami {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--ink-3);
  font-size: 9px;
}

.match-modal__label {
  margin-bottom: -7px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.winner-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.winner-picker__vs {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.winner-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.winner-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.winner-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}

.winner-card:hover .winner-card__body {
  border-color: var(--ink-3);
}

.winner-card input:checked + .winner-card__body {
  border-color: var(--red);
  background: #fdf3f1;
  box-shadow: inset 0 0 0 1px var(--red);
}

.winner-card input:focus-visible + .winner-card__body {
  box-shadow: 0 0 0 3px rgba(200, 53, 44, 0.16);
}

.winner-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.winner-card__top .avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.winner-card__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.winner-card__name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-card__name small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-card__tag {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.winner-card input:checked + .winner-card__body .winner-card__tag {
  display: inline-flex;
}

.winner-card__seed {
  color: var(--ink-3);
  font-size: 8px;
}

/* --------------------------------------------------------------------------
   35. Clubes
   -------------------------------------------------------------------------- */

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.club-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.club-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.club-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 17px 14px;
}

.club-card__identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.club-card__identity > div {
  min-width: 0;
}

.club-card__identity h2 {
  overflow: hidden;
  font-size: 23px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-card__identity p {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.club-card__actions {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
}

.club-card__actions .icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

.club-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.club-card__stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-left: 1px solid var(--line);
}

.club-card__stats > div:first-child {
  border-left: 0;
}

.club-card__stats strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.club-card__stats span {
  color: var(--ink-3);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.club-card__medals strong {
  display: flex;
  gap: 3px;
  font-family: var(--font-body);
}

.club-card__medals em {
  font-style: normal;
}

.club-card__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 13px;
  padding: 11px 17px;
  color: var(--ink-3);
  font-size: 9.5px;
}

.club-card__contact a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  transition: color 0.15s var(--ease);
}

.club-card__contact a:hover {
  color: var(--red);
}

.club-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px 17px;
  border-top: 1px solid var(--line);
}

.club-card__coach {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   36. Mi club e inscripción rápida
   -------------------------------------------------------------------------- */

.my-club-athletes,
.my-club-champs {
  display: flex;
  flex-direction: column;
}

.my-club-athlete {
  display: grid;
  grid-template-columns: 30px 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}

.my-club-athlete:first-child,
.my-club-champ:first-child {
  border-top: 0;
}

.my-club-athlete__rank {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
}

.my-club-athlete__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.my-club-athlete__main strong {
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-club-athlete__main small {
  display: flex;
  align-items: center;
  gap: 3px;
}

.my-club-medals {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 8.5px;
}

.my-club-medals > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.my-club-medals--compact {
  gap: 6px;
}

.my-club-points {
  display: flex;
  min-width: 48px;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
}

.my-club-points strong,
.my-club-champ__points strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.my-club-points small,
.my-club-champ__points small {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.my-club-champ {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto auto 18px;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  transition: background 0.15s var(--ease);
}

.my-club-champ:hover {
  background: var(--surface-2);
}

.my-club-champ__position {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.my-club-champ__position small {
  color: var(--ink-3);
  font-family: var(--font-body);
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.my-club-champ__position.is-first {
  background: linear-gradient(145deg, #e3bd5a, #a97a22);
  color: #fff;
}

.my-club-champ__position.is-first small {
  color: rgba(255, 255, 255, 0.82);
}

.my-club-champ__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.my-club-champ__main strong {
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-club-champ__main small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-club-champ__points {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.my-club-champ__arrow {
  color: var(--ink-3);
}

.my-club-contact {
  padding: 16px;
}

.my-club-contact__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}

.my-club-contact__head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.my-club-contact__head strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-club-contact__head small {
  color: var(--ink-3);
  font-size: 9px;
}

.my-club-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.my-club-details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-club-details dt {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.my-club-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.my-club-details a {
  color: var(--ink-2);
  transition: color 0.15s var(--ease);
}

.my-club-details a:hover {
  color: var(--red);
}

.quick-actions--stack {
  flex-direction: column;
  align-items: stretch;
  padding: 0 16px 14px;
}

.quick-actions--stack .btn {
  justify-content: flex-start;
}

.my-club-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 0 16px 16px;
  color: var(--ink-3);
  font-size: 8.5px;
  line-height: 1.55;
}

.my-club-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.quick-reg {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-reg__intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.quick-reg__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
}

.quick-reg__intro strong {
  font-size: 12px;
}

.quick-reg__intro p {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.5;
}

.quick-reg__legend {
  display: flex;
  gap: 14px;
  color: var(--ink-3);
  font-size: 8.5px;
}

.quick-reg__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.quick-reg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.quick-reg-dot--done {
  background: var(--green);
}

.quick-reg__roster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-reg-row {
  display: grid;
  grid-template-columns: 30px minmax(130px, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}

.quick-reg-row:first-child {
  border-top: 0;
}

.quick-reg-row__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.quick-reg-row__main strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-reg-row__main small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 8.5px;
}

.quick-reg-row__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.quick-reg-cat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-reg-cat input {
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--red);
}

.quick-reg-cat.is-done {
  background: var(--green-soft);
  color: var(--green);
}

.quick-reg-none {
  color: var(--ink-3);
  font-size: 8.5px;
  font-style: italic;
}

@media (max-width: 980px) {
  .my-club-champ {
    grid-template-columns: 52px minmax(0, 1fr) auto auto 18px;
  }

  .my-club-champ__status {
    display: none;
  }
}

@media (max-width: 820px) {
  .my-club-athlete {
    grid-template-columns: 26px 32px minmax(0, 1fr) auto;
  }

  .my-club-athlete .my-club-medals {
    grid-column: 3 / -1;
    padding-bottom: 2px;
  }

  .my-club-athlete .my-club-points {
    grid-column: 4;
    grid-row: 1;
  }

  .my-club-champ {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .my-club-champ__medals,
  .my-club-champ__arrow {
    display: none;
  }
}

@media (max-width: 680px) {
  .quick-reg-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .quick-reg-row__categories {
    grid-column: 1 / -1;
  }

  .my-club-athlete__rank {
    display: none;
  }

  .my-club-athlete {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .my-club-athlete .my-club-medals {
    grid-column: 2 / -1;
  }

  .my-club-athlete .my-club-points {
    grid-column: 3;
  }
}

/* --------------------------------------------------------------------------
   37. Usuarios y roles
   -------------------------------------------------------------------------- */

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.role-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.role-card--admin { border-left-color: var(--red); }
.role-card--organizer { border-left-color: var(--blue); }

.role-card--club_manager { border-left-color: var(--green); }

.role-card__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.role-card--admin .role-card__icon { background: var(--red-soft); color: var(--red); }
.role-card--organizer .role-card__icon { background: var(--blue-soft); color: var(--blue); }

.role-card--club_manager .role-card__icon { background: var(--green-soft); color: var(--green); }

.role-card strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.role-card p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   38. Adaptación responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1250px) {
  .champ-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .champ-stats__progress {
    grid-column: 1 / -1;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .medals-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1150px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .dashboard-grid__side > .card:last-child {
    grid-column: 1 / -1;
  }

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

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

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

  .medal-feature:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .main-shell {
    margin-left: 0;
  }

  .sidebar {
    width: 272px;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(16, 18, 22, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s var(--ease), visibility 0.24s var(--ease);
  }

  .shell.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .topbar {
    padding: 0 24px;
  }

  .topbar__menu {
    display: inline-flex;
  }

  .topbar__brand,
  .topbar__slash {
    display: none;
  }

  .main {
    padding: 24px 24px 56px;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-hero {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 28px clamp(22px, 7vw, 48px) 22px;
  }

  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
  }

  .login-mobile-brand .brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
  }

  .login-mobile-brand .brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }

  .login-mobile-brand .brand__text strong {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.16em;
  }

  .login-mobile-brand .brand__text small {
    margin-top: 4px;
    color: var(--ink-3);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .login-panel__inner {
    max-width: 460px;
    padding: 0;
  }
}

@media (max-width: 820px) {
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .page-heading h1 {
    font-size: 39px;
  }

  .page-heading__actions {
    padding-bottom: 0;
  }

  .championship-head__main {
    flex-direction: column;
    gap: 12px;
  }

  .championship-head__actions {
    width: 100%;
  }

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

  .champ-stats__progress {
    grid-column: 1 / -1;
  }

  .dashboard-grid__side {
    display: flex;
    align-items: stretch;
  }

  .tab-toolbar {
    align-items: flex-start;
  }

  .tab-toolbar__filters {
    flex: 1 1 100%;
  }

  .tab-toolbar__filters .search-box {
    flex: 1 1 240px;
  }

  .tab-toolbar__actions {
    width: 100%;
    justify-content: space-between;
  }

  .result-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .result-row__meta {
    display: none;
  }

  .upcoming-row {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .upcoming-row__arrow {
    display: none;
  }

  .medals-summary {
    grid-template-columns: 1fr;
  }

  .medal-feature:last-child {
    grid-column: auto;
  }

  .championship-head__title h1 {
    font-size: 36px;
  }

  .bracket-rounds {
    gap: 38px;
  }

  .form-grid--2 {
    grid-template-columns: 1fr;
  }

  .tatami-board {
    grid-template-columns: 1fr;
  }

  .club-grid,
  .champ-grid {
    grid-template-columns: 1fr;
  }

  .podium-grid--overview {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 19px 15px 48px;
  }

  .topbar {
    height: 57px;
    padding: 0 15px;
  }

  .topbar__right {
    gap: 0;
  }

  .topbar__date,
  .topbar__status {
    display: none;
  }

  .topbar__health {
    padding: 6px;
  }

  .topbar__health-text {
    display: none;
  }

  .page-heading {
    margin-bottom: 20px;
  }

  .page-heading h1 {
    font-size: 35px;
  }

  .page-heading__sub {
    font-size: 12px;
  }

  .page-heading__actions {
    width: 100%;
  }

  .page-heading__actions .btn {
    flex: 0 1 auto;
  }

  .toolbar {
    align-items: stretch;
  }

  .filter-pills {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .pill {
    flex-shrink: 0;
  }

  .search-box {
    flex: 1 1 100%;
    max-width: none;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 13px;
    gap: 9px;
  }

  .stat-card__icon {
    width: 34px;
    height: 34px;
  }

  .stat-card__body strong {
    font-size: 26px;
  }

  .stat-card__body small {
    white-space: normal;
  }

  .dashboard-grid,
  .dashboard-grid__main,
  .dashboard-grid__side {
    gap: 13px;
  }

  .card {
    padding: 17px 16px;
  }

  .card__head h2 {
    font-size: 23px;
  }

  .active-champ {
    padding: 21px 18px;
  }

  .active-champ__head {
    flex-direction: column;
    gap: 9px;
  }

  .active-champ__head h2 {
    font-size: 28px;
  }

  .active-champ__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 0;
  }

  .active-champ__stats div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .active-champ__actions {
    gap: 6px;
  }

  .active-champ--empty {
    padding: 28px 20px;
  }

  .active-champ--empty h2 {
    font-size: 28px;
  }

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

  .overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .mini-card {
    padding: 12px;
  }

  .championship-head {
    padding: 18px 16px 16px;
  }

  .championship-head__title h1 {
    font-size: 32px;
  }

  .champ-stats {
    gap: 13px;
  }

  .champ-stats__item {
    gap: 7px;
  }

  .champ-stats__icon {
    width: 29px;
    height: 29px;
  }

  .tabs {
    margin: 13px 0 18px;
  }

  .tab {
    height: 40px;
    padding: 0 10px;
    font-size: 10.5px;
  }

  .tab__count {
    display: none;
  }

  .category-status {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .category-status__bar {
    display: none;
  }

  .champ-card__body h2 {
    font-size: 24px;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .medals-summary {
    gap: 9px;
  }

  .medal-feature {
    padding: 13px 14px;
  }

  .winner-picker {
    grid-template-columns: 1fr;
  }

  .winner-picker__vs {
    padding: 1px 0;
  }

  .roster {
    grid-template-columns: 1fr;
  }

  .roster-item:nth-child(odd) {
    border-right: 0;
  }

  .modal__foot {
    gap: 6px;
  }

  .modal__foot .btn {
    flex: 1 1 40%;
  }

  .modal__spacer {
    display: none;
  }

  .login-panel {
    padding: 24px 18px 18px;
  }

  .login-panel__head h2 {
    font-size: 38px;
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .login-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .bracket-head__main h2 {
    font-size: 26px;
  }

  .bracket-head {
    align-items: flex-start;
  }

  .bracket-summary {
    gap: 10px 18px;
  }

  .bracket-canvas {
    padding: 14px;
  }

  .bracket-rounds {
    gap: 32px;
  }

  .bracket-round,
  .bracket-match {
    width: 228px;
  }

  .standings {
    overflow-x: auto;
  }

  .standings__head,
  .standings__row {
    min-width: 336px;
  }

  .podium-grid,
  .podium-grid--single {
    grid-template-columns: 1fr;
  }

  .upcoming-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .upcoming-row__time {
    grid-column: 1 / -1;
  }

  .upcoming-row__round {
    display: none;
  }

  .mini-champ__date {
    width: 55px;
  }

  .not-found h1,
  .access-denied h1 {
    font-size: 34px;
  }

  .not-found__kanji {
    font-size: 94px;
  }
}

@media (max-width: 520px) {
  .modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .modal__head {
    padding: 17px 18px 13px;
  }

  .modal__head h2 {
    font-size: 26px;
  }

  .modal__body {
    padding: 17px 18px;
  }

  .modal__foot {
    padding: 13px 18px;
  }

  .modal__foot .btn {
    height: 38px;
    font-size: 12px;
  }

  #toast-root {
    right: 12px;
    bottom: 12px;
  }

  .toast {
    font-size: 11.5px;
  }

  .champ-card__stats strong {
    font-size: 19px;
  }

  .champ-card__stats small {
    font-size: 6.8px;
  }

  .champ-card__footer {
    flex-wrap: wrap;
  }

  .champ-stats__item strong {
    font-size: 20px;
  }

  .mini-card strong {
    font-size: 22px;
  }

  .paper-toolbar {
    flex-wrap: wrap;
  }

  .tabs {
    gap: 0;
  }

  .tab {
    padding: 0 9px;
    font-size: 10px;
  }

  .tab__icon {
    display: none;
  }

  .bracket-round,
  .bracket-match {
    width: 210px;
  }

  .tatami-match {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .tatami-match__state {
    display: none;
  }

  .tatami-match__actions {
    grid-column: 2;
  }

  .stat-card__body small {
    display: none;
  }

  .result-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .result-row__score {
    font-size: 16px;
  }

  .login-panel__head h2 {
    font-size: 34px;
  }

  .demo-access__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .card__head {
    flex-wrap: wrap;
  }
}

/* --------------------------------------------------------------------------
   39. Perfil, configuraciones e informes
   -------------------------------------------------------------------------- */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card__head {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-card__head h2 {
  margin-top: 2px;
  font-size: 25px;
}

.profile-card__head p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.profile-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.profile-facts {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
}

.profile-facts div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--ink-3);
  font-size: 10.5px;
}

.profile-facts dd {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  text-align: right;
}

.profile-card__note {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.profile-card__note .icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--red);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.preference-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.settings-main,
.settings-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-note {
  display: flex;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.5;
}

.settings-note .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.settings-text {
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.6;
}

.session-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.session-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.session-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.session-item__body {
  min-width: 0;
  flex: 1;
}

.session-item__body strong {
  display: block;
  font-size: 11.5px;
}

.session-item__body small {
  color: var(--ink-3);
  font-size: 10px;
}

.reports-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.reports-toolbar__main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.reports-toolbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
}

.reports-toolbar h2 {
  margin-top: 2px;
  font-size: 24px;
}

.reports-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.reports-toolbar__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reports-toolbar__select {
  flex-shrink: 0;
  width: 260px;
}

.reports-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.reports-summary__item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.reports-summary__item span {
  display: block;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.reports-summary__item strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.report-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.report-card__head {
  display: flex;
  gap: 12px;
}

.report-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--red);
}

.report-card__head h3 {
  margin-top: 2px;
  font-size: 19px;
}

.report-card__head p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.55;
}

.report-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.report-format {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 600;
}

.report-format--final {
  background: var(--red-soft);
  color: var(--red);
}

.report-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.reports-note {
  display: flex;
  gap: 7px;
  margin: 18px 0;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.55;
}

.reports-note .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.reports-help__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reports-help__grid > div {
  display: flex;
  gap: 9px;
}

.reports-help__grid .icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--red);
}

.reports-help__grid strong {
  display: block;
  font-size: 11.5px;
}

.reports-help__grid p {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.payment-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.payment-cell small {
  color: var(--ink-3);
  font-size: 9.5px;
}

.payment-cell .text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font: inherit;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
}

.payment-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.payment-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--red);
}

.payment-summary strong {
  display: block;
  font-size: 12px;
}

.payment-summary p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.pref-compact-tables .data-table tbody td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.pref-compact-tables .data-table thead th {
  padding-top: 7px;
  padding-bottom: 7px;
}

.pref-reduced-motion *,
.pref-reduced-motion *::before,
.pref-reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

@media (max-width: 1100px) {
  .profile-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

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

  .reports-help__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .reports-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-toolbar__select {
    width: 100%;
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

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

  .preference-checks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .profile-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reports-summary {
    grid-template-columns: 1fr;
  }

  .report-card {
    padding: 15px 16px;
  }

  .report-card__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   40. Pantalla pública y consola de tatami (Fase 1)
   -------------------------------------------------------------------------- */

[data-role-field][hidden] {
  display: none !important;
}

.club-tag small {
  color: var(--ink-3);
  font-size: 9px;
}

.role-card--tatami_operator { border-left-color: var(--amber); }
.role-card--judge { border-left-color: var(--violet); }
.role-card--tatami_operator .role-card__icon { background: var(--amber-soft); color: var(--amber); }
.role-card--judge .role-card__icon { background: #efecf6; color: var(--violet); }

.realtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.realtime-pill i,
.public-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 3px rgba(138, 141, 149, 0.12);
}

.realtime-pill.is-online,
.public-connection.is-online {
  border-color: rgba(47, 122, 84, 0.28);
  color: var(--green);
}

.realtime-pill.is-online i,
.public-connection.is-online i {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 122, 84, 0.15);
  animation: realtime-pulse 2.2s infinite;
}

.realtime-pill.is-offline i,
.public-connection.is-offline i {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(178, 122, 36, 0.14);
}

@keyframes realtime-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Pantalla pública --------------------------------------------------------- */

.public-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(1100px 460px at 82% -10%, rgba(200, 53, 44, 0.06), transparent 62%),
    var(--bg);
}

.public-screen--loading {
  align-items: center;
  justify-content: center;
}

.public-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  padding: 0 clamp(18px, 3.2vw, 46px);
  border-bottom: 3px solid var(--red);
  background: #14161a;
  color: var(--sidebar-ink);
  box-shadow: 0 12px 34px -24px rgba(0, 0, 0, 0.75);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.public-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
}

.public-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.public-brand__text strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.public-brand__text small {
  margin-top: 5px;
  color: var(--sidebar-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.public-topbar__center {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.public-select-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 540px;
  width: 100%;
}

.public-select-wrap > span {
  flex-shrink: 0;
  color: var(--sidebar-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-select {
  width: 100%;
  min-width: 0;
  padding: 8px 34px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-ink);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--sidebar-muted) 50%),
    linear-gradient(135deg, var(--sidebar-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.public-select option {
  background: #fff;
  color: var(--ink);
}

.public-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sidebar-muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.16s var(--ease);
}

.public-back:hover {
  color: var(--sidebar-ink);
}

.public-topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.public-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--sidebar-muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.public-clock {
  font-family: var(--font-display);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}

.public-login {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sidebar-muted);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.16s var(--ease);
}

.public-login:hover {
  color: var(--sidebar-ink);
}

.public-main {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 34px) clamp(16px, 3vw, 46px) 46px;
}

.public-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: auto;
  padding: 15px clamp(18px, 3.2vw, 46px);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 9px;
}

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(620px 280px at 88% 0%, rgba(200, 53, 44, 0.3), transparent 66%),
    linear-gradient(135deg, #17191e 0%, #222018 100%);
  color: #f4f1e8;
  box-shadow: var(--shadow-lg);
}

.public-hero::after {
  content: "空手";
  position: absolute;
  right: -18px;
  bottom: -42px;
  color: rgba(255, 255, 255, 0.045);
  font-family: var(--font-display);
  font-size: clamp(130px, 16vw, 240px);
  font-weight: 600;
  line-height: 0.9;
  pointer-events: none;
}

.public-hero > * {
  position: relative;
  z-index: 1;
}

.public-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--sidebar-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 900px;
  margin-top: 12px;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.98;
  text-wrap: balance;
}

.public-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 17px;
  color: #c7c2b6;
  font-size: 11.5px;
}

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

.public-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.public-hero__stats div {
  padding: 15px 17px;
  background: rgba(20, 22, 26, 0.72);
}

.public-hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.public-hero__stats strong small {
  color: var(--sidebar-muted);
  font-size: 0.45em;
}

.public-hero__stats span {
  display: block;
  margin-top: 5px;
  color: var(--sidebar-muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-tatamis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.public-tatami-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.public-tatami-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.public-tatami-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-tatami-card__head h2 {
  margin-top: 4px;
  font-size: 25px;
}

.public-tatami-card__head p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10px;
}

.public-tatami-card__counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  text-align: right;
}

.public-tatami-card__counts > span:not(.badge) {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink-3);
  font-size: 8.5px;
  white-space: nowrap;
}

.public-tatami-card__counts strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
}

.public-tatami-card__current {
  margin: 13px 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.public-tatami-card__current-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.public-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.public-live-dot svg {
  animation: realtime-pulse 1.6s infinite;
}

.public-tatami-card__next {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 14px 3px;
}

.public-tatami-card__next-label {
  padding: 5px 0 3px;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-next-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
}

.public-next-line > span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.public-next-line strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-next-line strong em {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.public-next-line small {
  color: var(--ink-3);
  font-size: 8.5px;
  white-space: nowrap;
}

.public-tatami-card__foot {
  margin-top: auto;
  padding: 10px 14px 12px;
}

.public-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 9.5px;
  font-weight: 600;
}

.public-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-match {
  padding: 11px 12px 10px;
}

.public-match__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.public-match__category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 8.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-match__round {
  flex-shrink: 0;
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.public-match__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.public-match__score {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.public-athlete {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.public-athlete:last-child {
  text-align: right;
}

.public-athlete__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-athlete:last-child .public-athlete__name {
  justify-content: flex-end;
}

.public-athlete.is-winner .public-athlete__name {
  color: var(--red);
}

.public-athlete__club {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-match__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 8.5px;
}

.public-match__foot > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.public-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

.public-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.public-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.public-panel__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 20px;
}

.public-panel__head > span {
  color: var(--ink-3);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.public-results {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 13px;
  padding: 10px 17px;
  border-bottom: 1px solid var(--line);
}

.public-result:last-child {
  border-bottom: 0;
}

.public-result__category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-result__round {
  color: var(--ink-3);
  font-size: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.public-result__names {
  grid-column: 1 / 3;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  font-size: 10.5px;
}

.public-result__names em {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.public-result__names .is-winner {
  color: var(--red);
  font-weight: 700;
}

.public-result__score {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.public-standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.public-standings th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.public-standings th:nth-child(1),
.public-standings th:nth-child(2) {
  text-align: left;
}

.public-standings td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.public-standings tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   Torneo: Bracket tradicional estilo llave de karate
   ========================================================================== */

.tournament-bracket {
  max-width: 100%;
}

.tournament-bracket__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  margin-bottom: 20px;
}

.tournament-bracket__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tournament-bracket__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.tournament-bracket__title {
  display: flex;
  flex-direction: column;
}

.tournament-bracket__title strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.tournament-bracket__title small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.tournament-bracket__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--ink-2);
}

.tournament-scroll {
  overflow-x: auto;
  padding: 2px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.tournament-canvas {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding: 20px 24px;
}

.tournament-lines {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.tournament-lines path {
  fill: none;
  stroke: #c5bfb1;
  stroke-width: 1.5;
}

.tournament-rounds {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 40px;
}

.tournament-round {
  display: flex;
  flex-direction: column;
  width: 260px;
  flex-shrink: 0;
}

.tournament-round__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.tournament-round__title > div {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.tournament-round__title em {
  color: var(--ink-3);
  font-size: 8.5px;
  font-style: normal;
  text-align: center;
}

.tournament-round__matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
}

.tournament-match {
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 5px rgba(25, 27, 32, 0.04);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease);
}

.tournament-match.is-interactive {
  cursor: pointer;
}

.tournament-match.is-interactive:hover,
.tournament-match.is-interactive:focus-visible {
  border-color: var(--red);
  box-shadow: 0 9px 20px -14px rgba(200, 53, 44, 0.55);
  transform: translateY(-1px);
  outline: none;
}

.tournament-match.is-finished {
  border-color: #d6d1c5;
}

.tournament-match.is-bye .tournament-fighter__score {
  display: none;
}

.tournament-match.is-bye {
  border-style: dashed;
  background: #fbf8f1;
}

.tournament-match__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.tournament-match__number {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tournament-match__head .badge {
  padding: 2px 6px;
  font-size: 7.5px;
}

.tournament-match__bye {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tournament-match__fighters {
  display: flex;
  flex-direction: column;
}

.tournament-fighter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
}

.tournament-match__fighters .tournament-fighter:first-child {
  border-top: 0;
}

.tournament-fighter__seed {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  min-width: 18px;
}

.tournament-fighter__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tournament-fighter__name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-fighter__name small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-fighter__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
}

.tournament-fighter.is-winner {
  background: #fdf1ef;
}

.tournament-fighter.is-winner .tournament-fighter__name strong {
  color: var(--red-dark);
}

.tournament-fighter.is-winner .tournament-fighter__score {
  background: var(--red);
  color: #fff;
}

.tournament-fighter.is-winner .tournament-fighter__check {
  background: var(--red-dark);
}

.tournament-fighter--empty .tournament-fighter__name strong {
  color: var(--ink-3);
  font-weight: 500;
}

.tournament-fighter--empty .tournament-fighter__score {
  background: transparent;
  color: var(--ink-3);
}

.tournament-fighter__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  margin-left: 4px;
}

.tournament-match__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 8px;
}

.tournament-match__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Podio tradicional */
.tournament-podium {
  margin-top: 24px;
}

.tournament-podium__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.tournament-podium__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.tournament-podium__subtitle {
  color: var(--ink-3);
  font-size: 11px;
}

.tournament-podium__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tournament-podium__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.tournament-podium__rank {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.tournament-podium__rank--gold { background: var(--gold); }
.tournament-podium__rank--silver { background: var(--silver); }
.tournament-podium__rank--bronze { background: var(--bronze); }

.tournament-podium__athlete {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tournament-podium__athlete strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-podium__athlete small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.tournament-podium__medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.tournament-podium__medal--gold { background: var(--gold); }
.tournament-podium__medal--silver { background: var(--silver); }
.tournament-podium__medal--bronze { background: var(--bronze); }

.tournament-podium__note {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.45;
}

/* Torneo: Header de categoría */
.tournament-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  margin-bottom: 20px;
}

.tournament-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tournament-header__logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.tournament-header__title {
  display: flex;
  flex-direction: column;
}

.tournament-header__title strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.tournament-header__title small {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.tournament-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--ink-2);
}

.tournament-podium-section {
  margin-top: 24px;
}

.tournament-podium-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.tournament-podium-section__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.tournament-podium-section__subtitle {
  color: var(--ink-3);
  font-size: 11px;
}

/* Impresión */
@media print {
  .tournament-bracket {
    font-size: 11px;
  }
  .tournament-bracket__header {
    padding: 12px 16px;
  }
  .tournament-bracket__title strong {
    font-size: 20px;
  }
  .tournament-scroll {
    border: 0;
    box-shadow: none;
  }
  .tournament-match {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .tournament-round {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.public-standings td:nth-child(1),
.public-standings td:nth-child(2) {
  text-align: left;
}

.public-standings td:nth-child(1) {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 14px;
}

.public-standings td strong {
  color: var(--ink);
}

.public-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 52px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.public-empty--small {
  padding: 24px 16px;
  border: 0;
  background: transparent;
}

.public-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 2px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--red);
}

.public-empty h2 {
  font-size: 25px;
}

.public-empty p {
  max-width: 460px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.55;
}

.public-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.public-tatami-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.public-tatami-hero h1 {
  margin-top: 6px;
  font-size: clamp(38px, 5vw, 58px);
}

.public-tatami-hero__meta {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
}

.public-tatami-hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  color: var(--ink-3);
  font-size: 9px;
}

.public-tatami-hero__stats strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.public-live-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(650px 260px at 50% 120%, rgba(200, 53, 44, 0.16), transparent 70%),
    linear-gradient(135deg, #17191e, #24211b);
  color: #f4f1e8;
  box-shadow: var(--shadow-lg);
}

.public-live-card.is-live {
  border: 1px solid rgba(200, 53, 44, 0.5);
  box-shadow: 0 24px 70px -38px rgba(200, 53, 44, 0.65);
}

.public-live-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.public-live-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sidebar-muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-live-card.is-live .public-live-card__status {
  color: #ff7a6e;
}

.public-live-card__head h2 {
  margin-top: 6px;
  font-size: clamp(27px, 3.2vw, 42px);
}

.public-live-card__head p {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-size: 10.5px;
}

.public-live-card__clock {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.public-live-card__fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 38px);
  padding: clamp(24px, 3vw, 42px) 0;
}

.public-athlete--big .public-athlete__name {
  color: #f4f1e8;
  font-family: var(--font-display);
  font-size: clamp(27px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.05;
  white-space: normal;
}

.public-athlete--big.is-winner .public-athlete__name {
  color: #ff8a7f;
}

.public-athlete--big .public-athlete__club {
  margin-top: 4px;
  color: var(--sidebar-muted);
  font-size: 10.5px;
}

.public-athlete--big:last-child {
  align-items: flex-end;
  text-align: right;
}

.public-live-card__score {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(50px, 7vw, 92px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 0.9;
  white-space: nowrap;
}

.public-live-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sidebar-muted);
  font-size: 9px;
}

.public-live-card__foot > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.public-queue {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-queue li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 17px;
  border-bottom: 1px solid var(--line);
}

.public-queue li:last-child {
  border-bottom: 0;
}

.public-queue__time {
  color: var(--ink-3);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.public-queue__names {
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-queue__names em {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.public-queue__cat {
  color: var(--ink-3);
  font-size: 8.5px;
  white-space: nowrap;
}

/* Consola de tatami ------------------------------------------------------- */

.tatami-console {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tatami-console__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.tatami-console__hero-text h1 {
  margin-top: 5px;
  font-size: clamp(34px, 4vw, 48px);
}

.tatami-console__hero-text > p:not(.eyebrow) {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 11px;
}

.tatami-console__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tatami-console__hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.tatami-console-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
}

.tatami-console-select > span {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tatami-console-select select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
}

.tatami-console__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9px;
}

.tatami-console__stats strong {
  margin-right: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.tatami-console__operators {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.tatami-console-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid rgba(52, 100, 143, 0.22);
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  line-height: 1.45;
}

.tatami-console-current {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(760px 250px at 92% -20%, rgba(200, 53, 44, 0.08), transparent 62%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.tatami-console-current.is-live {
  border-top-color: var(--red);
}

.tatami-console-current__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 19px 13px;
  border-bottom: 1px solid var(--line);
}

.tatami-console-current__head h2 {
  margin-top: 3px;
  font-size: clamp(25px, 3vw, 34px);
}

.tatami-console-current__head p:not(.eyebrow) {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10px;
}

.tatami-console-current__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.tatami-console-current__clock {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.tatami-console-current__fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2.6vw, 32px);
  padding: clamp(20px, 2.6vw, 30px) 20px;
}

.tatami-console-current__score {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 62px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 0.9;
  white-space: nowrap;
}

.tatami-fighter {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tatami-fighter:last-child {
  align-items: flex-end;
  text-align: right;
}

.tatami-fighter__name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-fighter.is-winner .tatami-fighter__name {
  color: var(--red);
}

.tatami-fighter__club {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-fighter--big .tatami-fighter__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.05;
  white-space: normal;
}

.tatami-fighter--big .tatami-fighter__club {
  margin-top: 3px;
  font-size: 10px;
}

.tatami-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 17px;
}

.tatami-console-current > .tatami-actions {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.tatami-console-readonly {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10px;
}

.tatami-console__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tatami-console-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.tatami-console-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.tatami-console-panel__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 19px;
}

.tatami-console-panel__head > span {
  color: var(--ink-3);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tatami-console-match {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.tatami-console-match:last-child {
  border-bottom: 0;
}

.tatami-console-match.is-finished {
  background: var(--surface-2);
}

.tatami-console-match__time {
  color: var(--ink-3);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.tatami-console-match__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.tatami-console-match__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-console-match__main strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tatami-console-match__main strong em {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.tatami-console-match__main small {
  color: var(--ink-3);
  font-size: 8.5px;
}

.tatami-console-match__state {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.tatami-console-match > .tatami-actions {
  grid-column: 2 / -1;
  padding: 3px 0 0;
}

.tatami-console-waiting {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.tatami-console-waiting > summary {
  padding: 9px 16px;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.tatami-console-waiting > summary:hover {
  color: var(--ink);
}

/* Bloqueo e historial del resultado -------------------------------------- */

.match-modal__notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(52, 100, 143, 0.2);
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.match-modal__notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.match-modal__notice div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.match-modal__notice strong {
  font-size: 10.5px;
  font-weight: 700;
}

.match-modal__notice span {
  font-size: 9.5px;
  line-height: 1.45;
}

.match-modal__notice--locked {
  border-color: rgba(178, 122, 36, 0.26);
  background: var(--amber-soft);
  color: var(--amber);
}

.match-history-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.match-history-box > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.match-history-box > summary:hover {
  color: var(--ink);
}

.match-history-box[open] > summary {
  border-bottom: 1px solid var(--line);
}

.match-history {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  margin: 0;
  padding: 5px 11px;
  overflow-y: auto;
  list-style: none;
}

.match-history__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.match-history__item:last-child {
  border-bottom: 0;
}

.match-history__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-3);
}

.match-history__item--lock .match-history__dot {
  background: var(--amber-soft);
  color: var(--amber);
}

.match-history__item--result .match-history__dot {
  background: var(--green-soft);
  color: var(--green);
}

.match-history__item--unlock .match-history__dot {
  background: var(--blue-soft);
  color: var(--blue);
}

.match-history__item--reset .match-history__dot {
  background: var(--red-soft);
  color: var(--red);
}

.match-history__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.match-history__body strong {
  font-size: 9.5px;
  font-weight: 600;
}

.match-history__body span {
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1.45;
}

.match-history__body small {
  color: var(--ink-3);
  font-size: 8px;
}

.match-history__empty {
  padding: 12px;
  color: var(--ink-3);
  font-size: 9.5px;
  text-align: center;
}

@media (max-width: 1150px) {
  .public-hero {
    grid-template-columns: 1fr;
  }

  .public-hero__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .public-tatamis {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  }

  .public-columns {
    grid-template-columns: 1fr;
  }

  .tatami-console__columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .public-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .public-topbar__center {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
  }

  .public-select-wrap {
    max-width: none;
  }

  .public-topbar__right {
    gap: 10px;
  }

  .public-clock,
  .public-login {
    display: none;
  }

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

  .tatami-console__hero {
    align-items: flex-start;
  }

  .tatami-console__hero-actions {
    width: 100%;
  }

  .tatami-console-select {
    flex: 1 1 220px;
  }
}

@media (max-width: 680px) {
  .public-main {
    padding: 15px 13px 32px;
  }

  .public-brand__text small {
    display: none;
  }

  .public-connection span {
    display: none;
  }

  .public-hero {
    padding: 21px 18px;
    border-radius: var(--radius-lg);
  }

  .public-hero h1 {
    font-size: 38px;
  }

  .public-tatamis {
    grid-template-columns: 1fr;
  }

  .public-tatami-card__head {
    flex-direction: column;
    gap: 8px;
  }

  .public-tatami-card__counts {
    justify-content: flex-start;
    text-align: left;
  }

  .public-tatami-card__current {
    margin: 11px 11px 0;
  }

  .public-result {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .public-result__names {
    grid-column: 1;
  }

  .public-result__score {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .public-result__round {
    display: none;
  }

  .public-live-card__fighters {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
  }

  .public-athlete--big:last-child {
    align-items: center;
    text-align: center;
  }

  .public-athlete--big .public-athlete__name {
    justify-content: center;
  }

  .public-live-card__score {
    font-size: 52px;
  }

  .public-queue li {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .public-queue__cat {
    grid-column: 2;
    white-space: normal;
  }

  .tatami-console__hero {
    padding: 16px 16px;
  }

  .tatami-console-current__fighters {
    grid-template-columns: 1fr;
    gap: 13px;
    text-align: center;
  }

  .tatami-fighter:last-child {
    align-items: center;
    text-align: center;
  }

  .tatami-fighter--big .tatami-fighter__name {
    justify-content: center;
  }

  .tatami-console-current__score {
    font-size: 44px;
  }

  .tatami-console-match {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .tatami-console-match__state {
    grid-column: 2;
    justify-content: flex-start;
  }

  .tatami-console-match > .tatami-actions {
    grid-column: 2;
  }

  .tatami-console__operators {
    margin-left: 0;
  }

  .match-history {
    max-height: 180px;
  }
}

@media print {
  .public-topbar,
  .public-footer,
  .public-login,
  .public-tatami-card__foot,
  .tatami-console__hero-actions {
    display: none !important;
  }

  .public-screen,
  .public-main {
    background: #fff;
  }

  .public-hero,
  .public-live-card {
    box-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   41. Movimiento reducido
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   42. Impresión
   -------------------------------------------------------------------------- */

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: #fff;
    color: #111;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sidebar,
  .sidebar-overlay,
  .topbar,
  .back-link,
  .tabs,
  .tab-toolbar,
  .bracket-selector,
  .bracket-head__actions,
  .bracket-legend,
  .championship-head__actions,
  .champ-stats,
  .quick-actions,
  .text-link,
  .card__foot-link,
  .tatami-card__actions,
  .icon-btn,
  #toast-root,
  #modal-root,
  .active-champ__actions,
  .login-hero {
    display: none !important;
  }

  .main-shell {
    margin-left: 0;
  }

  .main {
    max-width: none;
    padding: 0;
  }

  .page-heading {
    margin-bottom: 10px;
  }

  .page-heading h1 {
    font-size: 26px;
  }

  .page-heading__actions {
    display: none;
  }

  .championship-head {
    padding: 0 0 11px;
    border: 0;
    border-bottom: 2px solid #c8352c;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .championship-head__title h1 {
    font-size: 28px;
  }

  .tab-content {
    margin-top: 12px;
  }

  .card,
  .table-card,
  .tatami-card,
  .podium-card,
  .club-card,
  .stat-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .bracket-scroll {
    overflow: visible;
    border: 0;
    background: #fff;
  }

  .bracket-canvas {
    width: max-content;
    min-width: 0;
    padding: 0;
  }

  .bracket-rounds {
    gap: 24px;
  }

  .bracket-round,
  .bracket-match {
    width: 204px;
  }

  .bracket-match {
    break-inside: avoid;
  }

  .bracket-lines path {
    stroke: #999;
  }

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

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

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

  .medal-feature:last-child {
    grid-column: auto;
  }

  a[href]::after {
    content: none !important;
  }
}

/* --------------------------------------------------------------------------
   43. Logos de club y fotos de competidor
   -------------------------------------------------------------------------- */

.club-card__logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  background: var(--surface);
}

.club-card__head .club-card__logo {
  margin-right: 14px;
}

.competitor-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.competitor-photo--sm {
  width: 32px;
  height: 32px;
}

/* Scoreboard: nombre del club junto al competidor */
.club-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
}

.club-chip img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   43b. Carga de logo e importación de competidores
   -------------------------------------------------------------------------- */

.logo-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.logo-field__body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.logo-field__preview {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.logo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-field__preview .avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 22px;
}

.champ-logo-field__preview {
  width: 84px;
  height: 60px;
  border-radius: 8px;
}

.champ-logo-field__preview img {
  object-fit: contain;
  background: #fff;
}

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

.logo-field__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logo-field__actions .field__hint {
  margin: 0;
}

.import-club {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.import-club strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.import-club .field__hint {
  margin-top: 3px;
}

.import-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.import-box__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.import-box h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.import-box p {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.import-headers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.import-headers code {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--red-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
}

.import-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
  padding: 22px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-3);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
    color 0.16s var(--ease);
}

.import-drop:hover,
.import-drop:focus-within {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red-dark);
}

.import-drop strong {
  color: var(--ink);
  font-size: 13px;
}

.import-drop span {
  font-size: 11px;
}

.import-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}

.import-result {
  padding: 13px 15px;
  border: 1px solid #ecd9b9;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #775a25;
  font-size: 12px;
}

.import-result strong {
  display: block;
  margin-bottom: 3px;
}

.import-result p {
  margin: 0 0 6px;
}

.import-result ul {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.import-result__hint {
  margin: 7px 0 0 !important;
  font-size: 11px;
  font-style: italic;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .logo-field__body {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-box__head {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   45. Estado offline y sincronización
   -------------------------------------------------------------------------- */

.offline-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.offline-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
}

.offline-status[data-status="online"] i {
  background: var(--green);
}

.offline-status[data-status="offline"] {
  border-color: #e7c2bd;
  background: var(--red-soft);
  color: var(--red-dark);
}

.offline-status[data-status="offline"] i,
.offline-status[data-status="conflict"] i {
  background: var(--red);
}

.offline-status[data-status="pending"],
.offline-status[data-status="syncing"] {
  border-color: #ecd9b9;
  background: var(--amber-soft);
  color: #775a25;
}

.offline-status[data-status="pending"] i,
.offline-status[data-status="syncing"] i {
  background: var(--amber);
}

.offline-status[data-status="conflict"] {
  border-color: #e7c2bd;
  background: var(--red-soft);
  color: var(--red-dark);
}

.offline-review__intro,
.offline-review__warning {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.offline-review__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 40vh;
  overflow: auto;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.offline-review__list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.offline-review__list strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: capitalize;
}

.offline-review__list span,
.offline-review__list p {
  color: var(--ink-2);
  font-size: 10.5px;
}

.offline-review__list p {
  color: var(--red-dark);
}

.offline-review__warning {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: #775a25;
}

@media (max-width: 760px) {
  .offline-status {
    padding: 5px 7px;
    font-size: 0;
  }

  .offline-status i {
    flex: 0 0 7px;
  }
}

/* --------------------------------------------------------------------------
   45b. Torneo: Layout con panel de competidores
   -------------------------------------------------------------------------- */

.tournament-layout {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.tournament-bracket-wrapper {
  flex: 1;
  min-width: 0;
}

.competitors-panel {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitors-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}

.competitors-panel__header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.competitors-panel__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.competitors-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}

.competitor-item:hover {
  border-color: var(--line-strong);
}

.competitor-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.competitor-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.competitor-item__info {
  flex: 1;
  min-width: 0;
}

.competitor-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__club {
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__status {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.competitor-photo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.tournament-bracket-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tournament-export {
  position: fixed;
  top: 0;
  left: -100000px;
  z-index: -1;
  width: max-content;
  padding: 24px;
  background: #fff;
  color: #17181b;
}

.tournament-export__header {
  margin-bottom: 16px;
  font-family: var(--font-display);
}

.tournament-export__header h1,
.tournament-export__header h2 {
  margin: 0;
}

.tournament-export__header h1 {
  font-size: 24px;
}

.tournament-export__header h2 {
  margin-top: 3px;
  font-size: 19px;
}

.tournament-export .tournament-fighter {
  min-height: 56px;
  padding: 10px 12px;
}

.tournament-export .tournament-fighter__name strong,
.tournament-export .tournament-fighter__name small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tournament-export .tournament-fighter__name strong {
  font-size: 12px;
  line-height: 1.3;
}

.tournament-export .tournament-fighter__name small {
  font-size: 10px;
  line-height: 1.3;
}

/* Categoría: Encabezado estilo torneo */
.category-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

.category-header__left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-header__logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.category-header__title {
  flex: 1;
  min-width: 0;
}

.category-header__title h1 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.category-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-header__info {
  color: var(--ink-3);
  font-size: 11px;
}

.category-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-header__stats {
  display: flex;
  gap: 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.stat__label {
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-header__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Competitors panel */
.competitors-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}

.competitors-panel__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.competitors-panel__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.competitors-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}

.competitor-item:hover {
  border-color: var(--line-strong);
}

.competitor-item__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.competitor-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.competitor-item__info {
  flex: 1;
  min-width: 0;
}

.competitor-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__club {
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__status {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.competitor-photo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.tournament-scroll {
  overflow-x: auto;
  padding: 2px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  min-height: 600px;
}

.tournament-canvas {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding: 20px 24px;
}

.tournament-lines {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.tournament-lines path {
  fill: none;
  stroke: #c5bfb1;
  stroke-width: 1.5;
}

.tournament-rounds {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  gap: 52px;
}

.tournament-round {
  display: flex;
  flex-direction: column;
  width: 248px;
  flex-shrink: 0;
}

.tournament-round__title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.tournament-round__title div {
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tournament-round__title em {
  color: var(--ink-3);
  font-size: 8.5px;
  font-style: normal;
}

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

.tournament-match {
  width: 248px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 5px rgba(25, 27, 32, 0.04);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    transform 0.16s var(--ease);
}

.tournament-match.is-interactive {
  cursor: pointer;
}

.tournament-match.is-interactive:hover,
.tournament-match.is-interactive:focus-visible {
  border-color: var(--red);
  box-shadow: 0 9px 20px -14px rgba(200, 53, 44, 0.55);
  transform: translateY(-1px);
  outline: none;
}

.tournament-match.is-finished {
  border-color: #d6d1c5;
}

.tournament-match.is-bye .tournament-fighter__score {
  display: none;
}

.tournament-match.is-bye {
  border-style: dashed;
  background: #fbf8f1;
}

.tournament-match__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.tournament-match__number {
  color: var(--ink-3);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tournament-match__head .badge {
  padding: 2px 6px;
  font-size: 7.5px;
}

.tournament-match__bye {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tournament-match__fighters {
  display: flex;
  flex-direction: column;
}

.tournament-fighter {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 6px 9px;
  border-top: 1px solid var(--line);
}

.tournament-match__fighters .tournament-fighter:first-child {
  border-top: 0;
}

.tournament-fighter__seed {
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

.tournament-fighter__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tournament-fighter__name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-fighter__name small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-fighter__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.tournament-fighter.is-winner {
  background: #fdf1ef;
}

.tournament-fighter.is-winner .tournament-fighter__name strong {
  color: var(--red-dark);
}

.tournament-fighter.is-winner .tournament-fighter__score {
  background: var(--red);
  color: #fff;
}

.tournament-fighter.is-winner .tournament-fighter__check {
  background: var(--red-dark);
}

.tournament-fighter--empty .tournament-fighter__name strong {
  color: var(--ink-3);
  font-weight: 500;
}

.tournament-fighter--empty .tournament-fighter__score {
  background: transparent;
  color: var(--ink-3);
}

.tournament-fighter--aka {
  border-left: 4px solid #d43b32;
  background: #fff7f6;
}

.tournament-fighter--ao {
  border-left: 4px solid #2675c9;
  background: #f3f8ff;
}

.tournament-fighter--ao.is-winner {
  background: #e8f2ff;
}

.tournament-fighter--ao.is-winner .tournament-fighter__name strong {
  color: #1d5fa8;
}

.tournament-fighter--ao.is-winner .tournament-fighter__score {
  background: #2675c9;
}

.tournament-fighter--ao.is-winner .tournament-fighter__check {
  background: #1d5fa8;
}

.tournament-match__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 5px 9px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 8px;
}

.tournament-match__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* --------------------------------------------------------------------------
   45b. Torneo: Layout con panel de competidores
   -------------------------------------------------------------------------- */

.tournament-layout {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.tournament-bracket-wrapper {
  flex: 1;
  min-width: 0;
}

.competitors-panel {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.competitors-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}

.competitors-panel__header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.competitors-panel__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.competitors-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}

.competitor-item:hover {
  border-color: var(--line-strong);
}

.competitor-item__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.competitor-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.competitor-item__info {
  flex: 1;
  min-width: 0;
}

.competitor-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__club {
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-item__status {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.competitor-photo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.tournament-bracket-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tournament-scroll {
  width: 100%;
  min-width: 0;
}

.tournament-rounds {
  width: max-content;
}

@media (max-width: 1200px) {
  .tournament-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .tournament-bracket-wrapper,
  .competitors-panel {
    width: 100%;
    min-width: 0;
  }
}

/* Mejoras al selector de categorías con botones */
.bracket-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.bracket-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.bracket-pill:hover {
  border-color: var(--red);
  color: var(--ink);
}

.bracket-pill.is-active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red-dark);
}

.bracket-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bracket-pill__text strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.bracket-pill__text small {
  font-size: 9px;
  color: var(--ink-3);
  display: block;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Impresión: Solo la llave
   -------------------------------------------------------------------------- */

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body * {
    visibility: hidden !important;
  }

  #area-impresion,
  #area-impresion * {
    visibility: visible !important;
  }

  #area-impresion {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12mm !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
    z-index: 1000 !important;
  }

  .sidebar,
  .topbar,
  .bracket-selector,
  .category-header__actions,
  .bracket-legend,
  .no-imprimir,
  .acciones,
  .tabs,
  .tab-toolbar,
  .logo,
  .icon-btn,
  #toast-root,
  #modal-root {
    display: none !important;
  }

  .tournament-layout {
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .competitors-panel {
    display: none !important;
  }

  .tournament-bracket-wrapper {
    width: 100% !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .tournament-scroll {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tournament-canvas {
    position: relative !important;
    width: max-content !important;
    min-width: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .tournament-lines path {
    stroke: #999 !important;
    stroke-width: 1 !important;
  }

  .tournament-rounds {
    gap: 24px !important;
  }

  .tournament-round {
    width: 204px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .tournament-match {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .tournament-fighter.is-winner {
    background: #fff !important;
  }

  .tournament-fighter.is-winner .tournament-fighter__name strong {
    color: #111 !important;
  }

  .tournament-fighter.is-winner .tournament-fighter__score {
    background: #111 !important;
    color: #fff !important;
  }

  .tournament-match__head {
    border-bottom: 1px solid #999 !important;
    background: #f4f1e8 !important;
  }

  .tournament-match__meta {
    border-top: 1px solid #999 !important;
    background: #f4f1e8 !important;
    color: #666 !important;
  }

  .category-header__actions,
  .category-header {
    visibility: visible !important;
    display: flex !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .category-header {
    page-break-inside: avoid !important;
  }

  .tournament-match__number,
  .tournament-fighter__name strong,
  .tournament-fighter__name small,
  .category-header__title h1,
  .category-header__meta span {
    color: #111 !important;
  }

  .tournament-fighter__seed {
    color: #666 !important;
  }

  .tournament-match__bye {
    border-style: dashed !important;
    background: #f4f1e8 !important;
    color: #c5bfb1 !important;
  }
}

