:root { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #17172a; background: #f3f4f8; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f4f8; }
button { font: inherit; touch-action: manipulation; }
.monitor-shell { width: min(100%, 600px); min-height: 100vh; margin: 0 auto; padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); display: grid; align-content: start; gap: 12px; }
.monitor-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; color: white; background: #00004d; border-radius: 16px; }
.eyebrow { margin: 0 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
h1, h2, h3, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: 1.4rem; } h2 { margin-bottom: 8px; font-size: 1.08rem; } h3 { margin: 0; font-size: 1.45rem; color: #00004d; }
.connection { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; white-space: nowrap; background: #ffffff18; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.connection i { width: 9px; height: 9px; background: #5fe49a; border-radius: 50%; }.connection.offline i { background: #ff7384; }
.assignment-card, .work-area { padding: 16px; border-radius: 16px; box-shadow: 0 8px 25px #16162a0a; }
.assignment-card { background: #fff; border: 1px solid #dfe1e9; }
.work-area { background: #e9edf7; border: 2px solid #c9cfdf; }
.assignment-list { display: grid; gap: 8px; }
.assignment-item { width: 100%; min-height: 64px; display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 10px; padding: 11px 12px; text-align: left; color: inherit; background: #f5f6fa; border: 2px solid transparent; border-radius: 12px; cursor: pointer; }
.assignment-item.active { color: #00004d; background: #eef0ff; border-color: #00004d; }
.assignment-text { display: grid; gap: 3px; }.assignment-text strong { color: #00004d; }.assignment-text span { font-size: .84rem; color: #606174; font-weight: 700; }
.assignment-meta { font-size: .72rem; color: #6d6e80; font-weight: 800; text-align: right; }.assignment-arrow { font-size: 1.25rem; font-weight: 900; transform: rotate(-90deg); transition: transform .15s ease; }.assignment-item.active .assignment-arrow { transform: rotate(0); }
.empty { margin: 0; color: #666779; }.main-empty { padding: 22px 4px 8px; text-align: center; }
.work-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.work-heading h2 { margin: 0; color: #00004d; }.work-heading > strong { font-size: .78rem; color: #606174; }
.match-list { display: grid; gap: 8px; padding: 10px; background: #f8f9fc; border: 1px solid #d8dce8; border-radius: 14px; }
.match-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 58px minmax(0,1fr) 9px 18px; align-items: center; gap: 10px; padding: 9px 10px; color: #303144; text-align: left; background: #f5f6fa; border: 2px solid transparent; border-radius: 12px; cursor: pointer; }
.match-row.selected { color: #00004d; background: #eef0ff; border-color: #00004d; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.match-row.locked { background: #f4eef0; }
.match-row-time { display: grid; justify-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.match-row-time strong { font-size: .9rem; }
.match-row-time small { color: #7a7b8b; font-size: .62rem; font-weight: 850; }
.match-row-players { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; }
.match-row-players strong { min-width: 0; font-size: .94rem; line-height: 1.2; overflow-wrap: anywhere; }
.match-row-players strong:first-child { text-align: right; }
.match-row-players strong:last-child { text-align: left; }
.match-row-players > span { min-width: 38px; text-align: center; white-space: nowrap; }
.match-row-versus { color: #747586; font-size: .72rem; font-weight: 900; }
.match-row-result { padding: 5px 8px; color: #fff; background: #16713b; border-radius: 999px; font-size: .98rem; font-weight: 950; line-height: 1; font-variant-numeric: tabular-nums; }
.match-row > i { width: 9px; height: 9px; border-radius: 50%; background: #d59b24; }
.match-row.finalized > i { background: #23a35b; }
.match-row.locked > i { background: #a44a5a; }
.match-row-arrow { font-size: 1.2rem; font-weight: 900; transform: rotate(-90deg); transition: transform .15s ease; }
.match-row.selected .match-row-arrow { transform: rotate(0); }
.match-detail { margin-top: -8px; padding: 0 6px 6px; background: #eef0ff; border: 2px solid #00004d; border-top: 0; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.main-match-card { padding: 10px 9px 9px; border: 1px solid #dedfe8; border-radius: 15px; background: #fff; }.main-match-card.locked { background: #f7f7fa; }
.scoreboard { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }.score-side { min-width: 0; display: grid; align-content: start; justify-items: center; gap: 10px; padding: 14px 8px; background: #f6f7fa; border-radius: 14px; }.player-name { min-height: 44px; display: grid; place-items: center; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }.big-score { color: #00004d; font-size: clamp(2.8rem, 14vw, 4.5rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.score-buttons { width: 100%; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; }.score-button { min-height: 60px; border: 0; border-radius: 12px; font-weight: 900; cursor: pointer; }.score-button:disabled { opacity: .42; cursor: default; }.score-button.minus { color: #7f2232; background: #f5dfe3; font-size: 2rem; }.score-button.plus { display: grid; place-items: center; align-content: center; color: white; background: #00004d; }.score-button.plus span { font-size: 1.6rem; line-height: .8; }.score-button.plus small { font-size: .65rem; letter-spacing: .05em; }
.save-status { min-height: 22px; margin: 13px 0 9px; text-align: center; color: #8b5b00; font-size: .82rem; font-weight: 900; }.save-status.saved { color: #16713b; }.save-status.saving { color: #42589d; }.save-status.error, .save-status.conflict, .save-status.locked { color: #9e1528; }
.save-button { width: 100%; min-height: 54px; padding: 0 14px; color: white; background: #16713b; border: 0; border-radius: 12px; font-weight: 900; letter-spacing: .02em; cursor: pointer; }.save-button:disabled { color: #77798a; background: #e1e2e8; cursor: default; }
.match-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }.nav-button { min-height: 48px; color: #00004d; background: white; border: 1px solid #cdd0df; border-radius: 11px; font-weight: 850; cursor: pointer; }.nav-button:disabled { opacity: .4; cursor: default; }
.monitor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px; color: #666779; }.monitor-footer button { min-height: 48px; padding: 0 18px; color: #9e1528; background: white; border: 1px solid #d9a4ac; border-radius: 12px; font-weight: 800; }.error-message { margin: 0; color: #a8162a; font-weight: 700; }
@media (max-width: 390px) { .match-row { grid-template-columns: 48px minmax(0,1fr) 8px 16px; gap: 6px; padding-inline: 7px; } .match-row-players { gap: 5px; } .match-row-players strong { font-size: .84rem; } .match-row-players > span { min-width: 34px; } .match-row-result { padding: 5px 6px; font-size: .9rem; } .monitor-header { align-items: flex-start; flex-direction: column; }.connection { align-self: flex-start; }.assignment-item { grid-template-columns: minmax(0,1fr) 18px; }.assignment-meta { grid-column: 1; text-align: left; }.assignment-arrow { grid-column: 2; grid-row: 1 / span 2; }.scoreboard { gap: 8px; }.score-side { padding-inline: 6px; }.score-buttons { grid-template-columns: 44px minmax(0,1fr); }.score-button { min-height: 56px; } }

/* Clasificación provisional y legibilidad del control desplegado. */
.player-name { font-size: clamp(1.08rem, 4.7vw, 1.35rem); font-weight: 900; color: #00004d; }
.monitor-standings { margin-top: 14px; overflow: hidden; border: 1px solid #dfe1e9; border-radius: 14px; background: #fff; }
.monitor-standings-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px; color: #00004d; background: #f0f1f8; }
.monitor-standings-heading strong { font-size: .95rem; }
.monitor-standings-heading span { color: #6d6e80; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.standing-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 38px 30px 52px; gap: 5px; align-items: center; min-height: 48px; padding: 7px 9px; border-top: 1px solid #ececf2; text-align: center; font-size: .78rem; font-variant-numeric: tabular-nums; }
.standing-header { min-height: 32px; color: #6b6c7e; background: #fafafd; border-top: 0; font-size: .64rem; font-weight: 900; text-transform: uppercase; }
.standing-row > :nth-child(2) { text-align: left; }
.standing-name { min-width: 0; display: grid; gap: 2px; }
.standing-name strong { overflow-wrap: anywhere; color: #25263a; font-size: .8rem; line-height: 1.15; }
.standing-name small { color: #77788a; font-size: .62rem; font-weight: 700; }
@media (max-width: 390px) {
  .player-name { font-size: 1.08rem; }
  .standing-row { grid-template-columns: 29px minmax(0,1fr) 34px 26px 46px; padding-inline: 6px; }
  .monitor-standings-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* Mayor contraste entre enfrentamientos y consulta completa de fase final. */
.work-area { background: #dce3f1; border-color: #aeb9cf; }
.match-list { background: #e5e9f2; border-color: #bfc7d8; }
.match-row { background: #f0f2f7; border-color: #d2d7e2; }
.match-row.locked { background: #eadde1; border-color: #d3b8c0; }
.match-row.selected { background: #dde3ff; }
.monitor-final-overview { order: -1; margin-bottom: 12px; display: grid; gap: 12px; }
.monitor-final-overview-title { display: grid; gap: 3px; padding: 12px; color: #4d1230; background: #e9cad9; border: 1px solid #c895ae; border-radius: 13px; }
.monitor-final-overview-title span, .monitor-final-category-heading span { font-size: .7rem; font-weight: 800; color: #70435a; }
.monitor-final-category { display: grid; gap: 10px; padding: 10px; background: #f0dce6; border: 1px solid #d2aabc; border-radius: 14px; }
.monitor-final-category-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; color: #4d1230; }
.monitor-final-standing, .monitor-cross-ranking { overflow: hidden; background: #fff; border: 1px solid #d6c2cc; border-radius: 12px; }
.monitor-final-standing-heading, .monitor-cross-ranking-heading { display: flex; justify-content: space-between; gap: 8px; padding: 10px; background: #f7edf2; color: #4d1230; }
.monitor-final-standing-heading span, .monitor-cross-ranking-heading span { color: #765668; font-size: .66rem; font-weight: 800; text-align: right; }
.final-standing-row { display: grid; grid-template-columns: 34px minmax(130px,1fr) 38px 30px 68px 58px; gap: 5px; align-items: center; min-height: 48px; padding: 7px 8px; border-top: 1px solid #eee4e9; text-align: center; font-size: .72rem; font-variant-numeric: tabular-nums; }
.final-standing-header { min-height: 34px; border-top: 0; color: #725b68; background: #fcf8fa; font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.final-standing-player { min-width: 0; display: grid; gap: 2px; text-align: left; }
.final-standing-player strong { overflow-wrap: anywhere; font-size: .76rem; line-height: 1.15; }
.final-standing-player small { color: #8b315d; font-size: .58rem; font-weight: 850; }
.final-standing-row.direct { background: #edf7ef; }
.final-standing-row.coefficient-selected { background: #fff1cb; }
.final-standing-row.coefficient-candidate { background: #fff8e5; }
.cross-row { display: grid; grid-template-columns: 34px minmax(135px,1fr) 78px 70px 60px; gap: 5px; align-items: center; min-height: 46px; padding: 7px 8px; border-top: 1px solid #eee4e9; text-align: center; font-size: .7rem; font-variant-numeric: tabular-nums; }
.cross-header { min-height: 34px; border-top: 0; color: #725b68; background: #fcf8fa; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.cross-row > :nth-child(2) { text-align: left; overflow-wrap: anywhere; }
.cross-row.selected { background: #fff1cb; }
.cross-note { margin: 0; padding: 9px 10px; color: #6f5966; background: #fcf8fa; font-size: .65rem; font-weight: 700; }
@media (max-width: 520px) {
  .monitor-final-standing, .monitor-cross-ranking { overflow-x: auto; }
  .final-standing-row { min-width: 540px; }
  .cross-row { min-width: 500px; }
  .monitor-final-category-heading, .monitor-final-standing-heading, .monitor-cross-ranking-heading { align-items: flex-start; flex-direction: column; }
}

.monitor-final-category-heading span.closed{color:#17643d;background:#dff3e7;border:1px solid #a9d7ba;border-radius:999px;padding:4px 8px}.monitor-final-category-heading span.provisional{color:#8b315d;background:#f7e7ef;border:1px solid #d7aabd;border-radius:999px;padding:4px 8px}.monitor-final-standing-heading span{border-radius:999px;padding:3px 7px}.monitor-final-standing-heading span:where(:not(.closed)){background:#f7e7ef}.monitor-final-standing-heading span.closed{color:#17643d;background:#dff3e7;border:1px solid #a9d7ba}

/* Identidad visual por categoría y tipo de asignación. */
.assignment-item {
  background: color-mix(in srgb, var(--category-color, #00004d) 12%, white);
  border-color: color-mix(in srgb, var(--category-color, #00004d) 32%, #dfe1e9);
}
.assignment-item.assignment-final {
  background: color-mix(in srgb, var(--category-color, #8b315d) 18%, #fff7fb);
  border-style: solid;
  box-shadow: inset 5px 0 0 color-mix(in srgb, var(--category-color, #8b315d) 78%, #4d1230);
}
.assignment-item.active {
  background: color-mix(in srgb, var(--category-color, #00004d) 20%, white);
  border-color: var(--category-color, #00004d);
  box-shadow: inset 5px 0 0 var(--category-color, #00004d);
}
.assignment-text strong { font-size: 1rem; }
.assignment-meta { display: grid; justify-items: end; gap: 5px; }
.assignment-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font-size: .66rem; line-height: 1; white-space: nowrap; }
.assignment-status.open { color: #155c37; background: #dff3e7; border: 1px solid #9fcfb0; }
.assignment-status.closed { color: #9a1f31; background: #f7dfe4; border: 1px solid #d9a5af; }
.assignment-status.final { color: #5d2344; background: #f1d9e6; border: 1px solid #c99bb3; }

/* Rondas de fase final: etiqueta y borde diferenciados. */
.match-row.final-round { border-left-width: 7px; }
.round-badge { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 3px 6px; border-radius: 999px; font-size: .56rem; font-weight: 950; line-height: 1.05; text-align: center; white-space: normal; }
.round-round_of_32 { --round-color: #6a4c93; }
.round-round_of_16 { --round-color: #2463a6; }
.round-quarterfinal { --round-color: #b56b00; }
.round-semifinal { --round-color: #a3294b; }
.round-final { --round-color: #16713b; }
.match-row.final-round { border-left-color: var(--round-color, #5e6070); }
.round-badge { color: #fff; background: var(--round-color, #5e6070); }
.match-row.final-round.selected { box-shadow: inset 4px 0 0 var(--round-color, #5e6070); }

@media (max-width: 390px) {
  .assignment-meta { justify-items: start; }
  .round-badge { font-size: .52rem; padding-inline: 5px; }
}
.monitor-cross-ranking-heading span.closed { color: #17643d; background: #dff3e7; border: 1px solid #a9d7ba; border-radius: 999px; padding: 4px 8px; }
.monitor-cross-ranking-heading span.provisional { color: #8b315d; background: #f7e7ef; border: 1px solid #d7aabd; border-radius: 999px; padding: 4px 8px; }
.cross-places { margin: 6px 10px 10px; color: #66545e; font-size: .75rem; font-weight: 700; }

/* Identidad de la cabecera móvil */
.monitor-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.monitor-brand img { width:52px; height:52px; object-fit:contain; flex:0 0 auto; }
.monitor-brand > div { min-width:0; }
@media (max-width:390px){.monitor-brand img{width:46px;height:46px}}

/* Parche 17: jerarquía de asignaciones y cuadro de honor */
.work-heading h2 { line-height: 1.22; }
.work-heading .eyebrow[hidden] { display: none; }
.honor-board {
  margin-top: 14px;
  padding: 15px;
  border: 2px solid #c7a83f;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8d8, #f4e7ad);
  box-shadow: 0 8px 20px #6e571a1a;
}
.honor-board h3 { margin: 0 0 12px; text-align: center; font-size: 1.15rem; color: #4c3a00; }
.honor-row { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.honor-row + .honor-row { margin-top: 8px; }
.honor-row > span { font-size: 1.75rem; text-align: center; }
.honor-row div { min-width: 0; display: grid; gap: 2px; }
.honor-row small { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.honor-row strong { overflow-wrap: anywhere; font-size: 1.08rem; }
.honor-row.champion { background: #fff2a8; color: #4a3500; }
.honor-row.runner-up { background: #eef0f4; color: #303846; }


/* Parche 18: cabecera de fase final, grupos visibles y cuadro de honor con mayor contraste. */
.work-heading { align-items: flex-start; }
.work-heading-copy { min-width: 0; display: grid; gap: 4px; }
.work-heading-copy h2 { margin: 0; font-size: 1.08rem; line-height: 1.22; }
.work-heading-copy p { margin: 0; color: #6d6e80; font-size: .78rem; font-weight: 750; line-height: 1.3; }
.work-heading-meta { flex: 0 0 auto; display: grid; justify-items: end; gap: 6px; }
.work-heading-meta > strong { padding: 5px 8px; color: #606174; background: #f5f6fa; border: 1px solid #dfe1e9; border-radius: 999px; font-size: .72rem; font-weight: 850; white-space: nowrap; }
.monitor-final-overview-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monitor-final-overview-title span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.monitor-final-overview-title span.closed { color: #17643d; background: #dff3e7; border: 1px solid #a9d7ba; }
.monitor-final-overview-title span.provisional { color: #8b315d; background: #f7e7ef; border: 1px solid #d7aabd; }
.monitor-final-standing-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 11px; background: #eef0f7; border-bottom: 1px solid #dfe1e9; }
.monitor-final-standing-heading > strong { color: #00004d; font-size: .92rem; }
.honor-board { background: #f6d96b; border-color: #c59a16; }
.honor-row.champion { background: #d9a928; color: #3f2d00; }
.honor-row.runner-up { background: #f4f5f7; color: #303846; }
@media (max-width: 390px) {
  .work-heading { flex-direction: column; }
  .work-heading-meta { width: 100%; justify-items: start; }
  .monitor-final-overview-title { align-items: flex-start; flex-direction: column; }
}

.assignment-status.waiting{color:#705200;background:#fff1b8;border:1px solid #d8bd54}.monitor-final-standing-heading>strong{font-size:.78rem;line-height:1.25;font-weight:800}


/* Parche 20: clasificaciones compactas y cruces identificables */
.monitor-final-standing-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 5px;
  padding: 7px 9px;
}
.monitor-final-standing-meta {
  color: #707786;
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
}
.monitor-final-standing-heading > span.closed,
.monitor-final-standing-heading > span.provisional {
  justify-self: start;
  font-size: .64rem;
  line-height: 1.15;
  padding: 3px 7px;
  text-align: left;
}
.final-standing-row {
  min-height: 39px;
  padding: 4px 7px;
  gap: 4px;
  line-height: 1.15;
}
.final-standing-player strong { line-height: 1.15; }
.final-standing-player small { margin-top: 1px; line-height: 1.1; }
.monitor-final-standing { margin-top: 7px; }
.round-badge { white-space: nowrap; }

/* Parche 21: semáforos coherentes en toda la pantalla del monitor.
   Abierto/editable = verde. Cerrado/bloqueado = rojo. */
.assignment-status.open,
.assignment-status.final {
  color: #155c37;
  background: #dff3e7;
  border-color: #9fcfb0;
}
.assignment-status.closed {
  color: #8f1729;
  background: #f6d9df;
  border-color: #d69aa6;
}

.monitor-final-overview-title span.provisional,
.monitor-final-standing-heading > span.provisional,
.monitor-cross-ranking-heading span.provisional,
.monitor-final-category-heading span.provisional {
  color: #155c37;
  background: #dff3e7;
  border: 1px solid #9fcfb0;
}
.monitor-final-overview-title span.closed,
.monitor-final-standing-heading > span.closed,
.monitor-cross-ranking-heading span.closed,
.monitor-final-category-heading span.closed {
  color: #8f1729;
  background: #f6d9df;
  border: 1px solid #d69aa6;
}

/* La línea Grupo · Campo · Turno · Monitor es información neutra. */
.monitor-final-standing-heading {
  background: transparent;
  border-bottom-color: #e2e4ea;
}
.monitor-final-standing-meta {
  color: #747987;
  background: transparent;
  font-weight: 400;
}


/* Parche 22: restaurar cabeceras neutras y simplificar la clasificación de grupo. */
.monitor-final-standing-heading {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e4ea;
}
.monitor-final-standing-meta {
  display: block;
  color: #747987 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}
.monitor-standings-heading {
  justify-content: flex-start;
}


/* Parche 23: ganador señalado de forma sutil solo en fase final resuelta. */
.match-row-winner {
  color: #145d37;
  text-decoration: underline;
  text-decoration-color: #9fcfb0;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.score-side-winner .player-name {
  color: #145d37;
}

/* Parche móvil: enfrentamientos compactos en dos filas. */
.match-row {
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 5px;
  padding: 8px 9px;
}
.match-row-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  grid-column: 1;
  grid-row: 1;
}
.match-row-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #626476;
  font-size: .69rem;
  font-variant-numeric: tabular-nums;
}
.match-row-identity strong { color: #4b4d61; font-size: .69rem; font-weight: 850; }
.match-row-hour { white-space: nowrap; }
.round-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  color: #fff !important;
  background: var(--round-color, #5e6070);
  border-radius: 999px;
  font-size: .62rem !important;
  line-height: 1;
}
.match-row-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8a650d;
  font-size: .62rem;
  font-weight: 850;
  white-space: nowrap;
}
.match-row-state i { width: 8px; height: 8px; border-radius: 50%; background: #d59b24; }
.match-row-state.finalized { color: #16713b; }
.match-row-state.finalized i { background: #23a35b; }
.match-row-state.locked { color: #9e2437; }
.match-row-state.locked i { background: #a44a5a; }
.match-row-players {
  grid-column: 1;
  grid-row: 2;
  gap: 6px;
}
.match-row-players strong {
  font-size: .82rem;
  line-height: 1.16;
}
.match-row-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.match-row.final-round { border-left-width: 5px; }
.match-row > i, .match-row-time, .round-badge { display: none; }
.match-navigation { display: none !important; }

@media (max-width: 390px) {
  .match-row {
    grid-template-columns: minmax(0, 1fr) 15px;
    gap: 4px 5px;
    padding: 7px;
  }
  .match-row-top { gap: 5px; }
  .match-row-identity { gap: 6px; font-size: .63rem; }
  .match-row-identity strong { font-size: .63rem; }
  .match-row-state small { display: none; }
  .match-row-players strong { font-size: .76rem; }
  .match-row-players > span { min-width: 32px; }
  .match-row-result { padding: 4px 6px; font-size: .84rem; }
}

/* Filas de enfrentamiento sin indicador lateral: se aprovecha toda la anchura móvil. */
.match-row {
  grid-template-columns: minmax(0, 1fr);
}
.match-row-top,
.match-row-players {
  grid-column: 1;
}
.match-row-arrow {
  display: none !important;
}
@media (max-width: 390px) {
  .match-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Modo móvil de administrador y gestor */
.management-mobile-mode .monitor-shell { max-width: 760px; }
.mobile-header-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.mobile-header-actions button,
.management-mobile-mode .monitor-footer button {
  border: 1px solid rgba(255,255,255,.55); border-radius: .65rem; background: #fff; color: #00004d;
  font: inherit; font-weight: 800; padding: .55rem .75rem; cursor: pointer;
}
.mobile-category { border: 1px solid #d9dce5; border-left: .35rem solid var(--category-color); border-radius: .8rem; overflow: hidden; background: #fff; }
.mobile-category + .mobile-category { margin-top: .55rem; }
.mobile-category-button { width: 100%; border: 0; background: #fff; padding: .8rem .85rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; text-align: left; color: #17172d; cursor: pointer; }
.mobile-category-button strong { display: block; font-size: 1rem; }
.mobile-category-button small { display: block; margin-top: .2rem; color: #686a77; font-size: .76rem; }
.mobile-category-button > b { font-size: 1.25rem; color: var(--category-color); }
.mobile-category.active .mobile-category-button { background: color-mix(in srgb, var(--category-color) 9%, white); }
.mobile-category-assignments { padding: .5rem; border-top: 1px solid #e5e6ec; background: #f4f5f8; }
.mobile-category-assignments .assignment-item { margin: 0 0 .45rem; }
.mobile-category-assignments .assignment-item:last-child { margin-bottom: 0; }
@media (max-width: 520px) {
  .mobile-header-actions { width: 100%; justify-content: space-between; }
  .management-mobile-mode .monitor-header { align-items: flex-start; flex-wrap: wrap; }
}
