:root {
  --bg: #102a43;
  --surface: #ffffff;
  --surface-strong: #f7fbff;
  --text: #102a43;
  --muted: #6e8496;
  --line: rgba(31, 122, 224, 0.16);
  --brand: #1f7ae0;
  --brand-strong: #125fb5;
  --green: #49b078;
  --red: #d55345;
  --yellow: #e7b331;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  font-family: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(239, 246, 252, 0.88), rgba(232, 241, 248, 0.96)),
    url("/assets/futbol/images/background/app-futbol-field-scroll.png") center top / cover fixed,
    #eef4f8;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.is-hidden {
  display: none !important;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px 14px;
}

.login-panel,
.settings-panel,
.settings-account-card {
  display: grid;
  gap: 24px;
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--brand);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-panel .eyebrow {
  font-size: 1.38rem;
  line-height: 1.1;
}

.referee-pansolvs-logo {
  display: block;
  width: 132px;
  height: 34px;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 0 12px rgba(0, 184, 255, 0.18));
}

.settings-panel {
  width: min(100%, 560px);
  margin: 0 auto;
  gap: 18px;
  border-bottom-width: 1px;
  border-radius: 8px;
}

.settings-account-card {
  width: min(100%, 560px);
  margin: 0 auto 12px;
  gap: 6px;
  padding: 16px 18px;
  border-bottom-width: 1px;
  border-radius: 8px;
}

.settings-account-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.settings-account-card strong {
  color: var(--text);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.form-stack label {
  display: grid;
  gap: 7px;
  color: var(--brand-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.form-stack input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--brand-strong);
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle::before {
  content: "";
  width: 16px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px / 700px;
}

.password-toggle::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.password-toggle[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 0;
  background: currentColor;
  transform: rotate(-38deg);
}

.password-toggle:hover:not(:disabled) {
  color: #102a43;
  border-color: var(--brand);
  background: var(--brand);
}

.auth-warning {
  padding: 10px 12px;
  border: 1px solid rgba(31, 122, 224, 0.5);
  border-radius: 8px;
  color: #1f7ae0;
  background: rgba(31, 122, 224, 0.16);
  font-size: 0.86rem;
  font-weight: 800;
}

.app-password-warning {
  margin: 0 0 14px;
}

#login-status {
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.92rem;
  text-align: left;
}

#login-status.is-error {
  color: var(--red);
  background: transparent;
}

#login-status.is-ok {
  color: #237a4e;
}

.app-shell {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 18px 14px 34px;
}

.app-header,
.section-heading,
.clock-topline,
.flow-actions,
.section-actions,
.match-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -14px 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.referee-header-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.referee-header-brand .referee-pansolvs-logo {
  flex: 0 0 auto;
  width: 92px;
  height: 24px;
  max-width: 92px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-button {
  display: grid;
  align-content: center;
  gap: 5px;
  width: 44px;
  min-height: 44px;
  padding: 0 11px;
  background: rgba(31, 122, 224, 0.1);
  border: 1px solid var(--line);
}

.menu-button span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 14px;
  z-index: 20;
  display: grid;
  width: min(260px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.mobile-menu.is-hidden {
  display: none;
}

.mobile-menu button {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mobile-menu button:active {
  background: rgba(31, 122, 224, 0.16);
}

.eyebrow {
  display: block;
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.35rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.connection-pill {
  max-width: min(220px, 42vw);
  min-width: 78px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(73, 176, 120, 0.45);
  border-radius: 999px;
  color: #237a4e;
  background: rgba(73, 176, 120, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-pill.is-offline {
  border-color: rgba(213, 83, 69, 0.5);
  color: #b23b31;
  background: rgba(213, 83, 69, 0.22);
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.league-list,
.match-list,
.upcoming-day-list,
.event-list,
.player-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.league-card,
.match-card,
.event-row,
.player-option {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.league-card {
  display: grid;
  gap: 8px;
  text-align: left;
}

.league-card strong {
  font-size: 1.16rem;
}

.league-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.league-card.is-assigned,
.match-card.is-assigned {
  border-color: rgba(31, 122, 224, 0.88);
  background:
    linear-gradient(90deg, rgba(31, 122, 224, 0.16), rgba(255, 255, 255, 0.94) 58%),
    rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 2px rgba(31, 122, 224, 0.14),
    var(--shadow);
}

.assigned-label {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(31, 122, 224, 0.48);
  border-radius: 999px;
  color: var(--brand-strong) !important;
  background: rgba(31, 122, 224, 0.16);
  font-size: 0.76rem !important;
  font-weight: 900;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.match-card.is-readonly .match-card-open {
  cursor: default;
}

.match-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.match-card-open {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.match-card strong {
  font-size: 1.1rem;
}

.match-card span,
.match-meta,
.clock-state,
.event-row span,
.flow-summary {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.match-card-referee {
  min-width: 0;
  overflow-wrap: anywhere;
}

.match-card-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.status-tag {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(31, 122, 224, 0.16);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.head-assign-select {
  width: min(100%, 190px);
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(31, 122, 224, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-weight: 800;
}

.upcoming-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 12, 0.62);
  overflow: hidden;
}

.upcoming-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  color: var(--brand-strong);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.upcoming-group > summary::-webkit-details-marker {
  display: none;
}

.upcoming-group > summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 1.1rem;
}

.upcoming-group[open] > summary::after {
  transform: rotate(180deg);
}

.upcoming-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.back-button,
.secondary-button,
.icon-button {
  background: rgba(31, 122, 224, 0.1);
  border: 1px solid var(--line);
}

.back-button {
  margin-bottom: 12px;
  padding: 0 14px;
}

.match-nav-row {
  margin-bottom: 12px;
}

.match-nav-row .back-button {
  margin-bottom: 0;
}

.match-date-warning {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 122, 224, 0.56);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.16);
  color: var(--brand-strong);
  font-weight: 900;
  line-height: 1.2;
}

.match-referee-label {
  flex: 1 1 auto;
  min-width: 0;
  color: #237a4e;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.assign-match-button,
.my-match-button {
  min-width: 0;
  padding: 0 14px;
}

.assign-match-button.is-release {
  border-color: rgba(213, 83, 69, 0.56);
  color: #b23b31;
  background: rgba(213, 83, 69, 0.2);
}

.icon-button {
  width: 44px;
}

.primary-button {
  background: var(--brand);
  color: #ffffff;
}

.danger-button {
  background: var(--red);
  color: #fff;
}

.match-hero,
.clock-panel,
.event-panel,
.summary-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.match-hero {
  display: grid;
  gap: 10px;
  text-align: center;
}

.match-meta {
  text-align: center;
}

.score-line {
  font-size: clamp(2.6rem, 18vw, 5.4rem);
  font-weight: 900;
  line-height: 1;
}

.match-team-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.match-team-title button {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(31, 122, 224, 0.35);
  background: rgba(31, 122, 224, 0.1);
  color: inherit;
  font: inherit;
}

.match-team-title button.is-confirmed::after {
  content: " ✓";
  color: #237a4e;
}

.roster-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.roster-heading,
.roster-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roster-player-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 10px;
  margin: 14px 0;
}

.roster-player-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "check name"
    "check detail";
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 136, 255, 0.24);
  border-radius: 12px;
  color: #edf7ff;
  background: #0a202d;
  cursor: pointer;
}

.roster-player-option input {
  grid-area: check;
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.roster-player-option > span {
  grid-area: name;
  min-width: 0;
  color: #f5fbff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roster-player-option.is-locked {
  border-color: rgba(98, 233, 194, 0.42);
  background: rgba(16, 67, 59, 0.92);
}

.roster-player-option small {
  grid-area: detail;
  color: #a9bfcc;
  font-size: 0.82rem;
  line-height: 1.2;
}

.roster-sanction-warning {
  color: #b23b31 !important;
  font-weight: 800;
}

.clock-topline {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  place-items: center;
  text-align: center;
}

.head-referee-list {
  display: grid;
  gap: 6px;
}

.head-referee-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) minmax(92px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(31, 122, 224, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
}

.head-referee-row.is-assigned {
  border-color: rgba(31, 122, 224, 0.32);
  background: rgba(31, 122, 224, 0.09);
}

.head-referee-row.is-free {
  border-color: rgba(82, 177, 119, 0.24);
}

.head-referee-name,
.head-referee-match {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.head-referee-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-weight: 850;
}

.head-referee-match {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.head-referee-match.is-free {
  color: #49b078;
}

.head-referee-role {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(31, 122, 224, 0.32);
  border-radius: 999px;
  color: var(--brand-strong);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.head-referee-reset {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(31, 122, 224, 0.16);
  border-radius: 6px;
  background: rgba(31, 122, 224, 0.08);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.head-referee-reset:disabled {
  opacity: 0.35;
}

.period-status {
  justify-self: center;
  width: 100%;
  color: var(--brand-strong);
  font-size: 1.45rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.clock-state {
  text-align: center;
}

.clock-display {
  margin: 18px 0 6px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(4rem, 25vw, 8rem);
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
}

.clock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.clock-actions #start-period-button {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 280px);
}

.clock-actions #finish-period-button {
  grid-column: 1 / -1;
  min-height: 52px;
  font-size: 1.05rem;
}

.event-type-grid,
.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-panel .section-heading {
  justify-content: center;
  text-align: center;
}

.event-type-grid {
  grid-template-columns: repeat(4, minmax(66px, 96px));
  justify-content: center;
  gap: 10px;
}

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

.event-type-grid button,
.choice-grid button {
  padding: 12px 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.event-type-grid button {
  display: grid;
  place-items: center;
  width: clamp(66px, 19vw, 96px);
  aspect-ratio: 1;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 34%, rgba(31, 122, 224, 0.16), transparent 42%),
    var(--surface-strong);
  border: 2px solid rgba(31, 122, 224, 0.82);
  box-shadow:
    0 0 0 1px rgba(245, 209, 91, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.36);
}

.event-type-grid button.is-active,
.choice-grid button.is-active,
.player-option.is-active {
  border-color: rgba(31, 122, 224, 0.85);
  background: rgba(31, 122, 224, 0.22);
}

.player-option.is-collapsed {
  border-style: dashed;
}

.event-type-grid button.is-active {
  border-color: var(--brand-strong);
  background:
    radial-gradient(circle at 50% 34%, rgba(31, 122, 224, 0.22), transparent 42%),
    rgba(31, 122, 224, 0.24);
  box-shadow:
    0 0 0 3px rgba(31, 122, 224, 0.2),
    0 16px 34px rgba(0, 0, 0, 0.42);
}

.goal-type-panel,
.foul-card-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.goal-type-panel.is-hidden,
.foul-card-panel.is-hidden {
  display: none;
}

.goal-type-actions {
  width: 100%;
}

.goal-type-actions button {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 800;
}

.foul-card-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.foul-card-actions button {
  display: grid;
  place-items: center;
  width: 70px;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(31, 122, 224, 0.7);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 34%, rgba(31, 122, 224, 0.14), transparent 42%),
    var(--surface-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.foul-card-actions button.is-active {
  border-color: var(--brand-strong);
  background: rgba(31, 122, 224, 0.24);
  box-shadow:
    0 0 0 3px rgba(31, 122, 224, 0.18),
    0 14px 28px rgba(0, 0, 0, 0.38);
}

.event-icon {
  display: block;
  width: 54%;
  aspect-ratio: 1;
}

.event-icon.is-goal {
  background: url("/assets/futbol/images/eventos/ball_app_arbitros.png") center / contain no-repeat;
}

.event-icon.is-foul {
  background: url("/assets/futbol/images/eventos/falta.png") center / contain no-repeat;
}

.event-icon:is(.is-yellow-card, .is-red-card) {
  position: relative;
  width: 42%;
  aspect-ratio: 0.68;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.event-icon.is-yellow-card {
  background: linear-gradient(145deg, #ffe86f, #e7b331);
}

.event-icon.is-red-card {
  background: linear-gradient(145deg, #ff7a6d, #c94f43);
}

.event-icon:is(.is-yellow-card, .is-red-card)::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
}

.event-flow {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.event-flow.is-hidden {
  display: none;
}

.flow-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.player-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.player-option small {
  color: var(--muted);
}

.flow-summary {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

#event-summary:empty {
  display: none;
}

.summary-heading {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(31, 122, 224, 0.46);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.17);
  color: var(--text);
  text-align: center;
}

.summary-heading h3 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 900;
}

.summary-toggle {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(31, 122, 224, 0.12);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.07);
  color: var(--text);
  text-align: center;
}

.summary-toggle > span:last-child {
  font-size: 1rem;
  font-weight: 900;
}

.summary-toggle::after {
  content: "+";
  margin-top: 4px;
  color: var(--brand-strong);
  font-size: 1.2rem;
  line-height: 1;
}

.summary-toggle[aria-expanded="true"]::after {
  content: "-";
}

.summary-content {
  margin-top: 14px;
}

.summary-content.is-hidden,
.bo-panel.is-hidden,
.penalty-panel.is-hidden {
  display: none;
}

.summary-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--brand-strong);
  font-weight: 900;
  text-align: center;
}

.summary-team {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.summary-team strong {
  color: var(--text);
  font-size: clamp(0.92rem, 4.1vw, 1.15rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.summary-team span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.1;
}

.summary-result {
  min-width: 72px;
  margin-top: 8px;
  color: var(--brand-strong);
  font-size: 1.7rem;
  line-height: 1;
}

.summary-player-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--text);
  text-align: left;
}

.summary-player-list.is-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.summary-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid rgba(31, 122, 224, 0.1);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.055);
}

.summary-player-name {
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.summary-player-events {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.summary-event-count {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.summary-event-count img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.summary-event-count .event-card-icon {
  width: 13px;
  height: 18px;
  margin-inline: 0;
}

.bo-panel,
.penalty-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 224, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.bo-panel h3,
.penalty-panel h3 {
  margin-top: 2px;
  font-size: 1.16rem;
  text-align: center;
}

.bo-panel .eyebrow,
.penalty-panel .eyebrow {
  text-align: center;
}

.bo-panel label,
.penalty-panel label {
  display: grid;
  gap: 7px;
  color: var(--brand-strong);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bo-panel select,
.penalty-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.1);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

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

.penalty-panel input {
  text-align: center;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.bo-panel select option {
  color: #102a43;
}

.flow-summary.is-ok {
  border-color: rgba(73, 176, 120, 0.7);
  color: #237a4e;
}

.flow-summary.is-error {
  border-color: rgba(213, 83, 69, 0.65);
  color: #b23b31;
  background: rgba(213, 83, 69, 0.12);
}

.match-notes-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(31, 122, 224, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.match-notes-panel label {
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.match-notes-panel textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(31, 122, 224, 0.08);
  color: var(--text);
  font: inherit;
  line-height: 1.35;
}

.match-notes-panel textarea::placeholder {
  color: rgba(232, 237, 226, 0.48);
}

.confirm-report-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  justify-items: center;
  margin-top: 16px;
}

.confirm-report-row #confirm-report-button {
  grid-column: 2;
}

.confirm-report-row #annul-match-button {
  grid-column: 3;
  justify-self: end;
}

.annul-match-dialog,
.action-confirm-dialog {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid rgba(98, 233, 194, 0.28);
  border-radius: 18px;
  color: #edf7ff;
  background: #071923;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.annul-match-dialog::backdrop,
.action-confirm-dialog::backdrop {
  background: rgba(1, 8, 13, 0.78);
  backdrop-filter: blur(4px);
}

.action-confirm-form {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: clamp(22px, 5vw, 30px);
}

.action-confirm-mark {
  grid-row: 1 / span 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(213, 83, 69, 0.46);
  border-radius: 50%;
  color: #ff887c;
  background: rgba(213, 83, 69, 0.12);
  font-size: 1.4rem;
  font-weight: 900;
}

.action-confirm-form h2 {
  margin: 3px 0 0;
  color: #edf7ff;
  line-height: 1.15;
}

.action-confirm-form > p {
  grid-column: 2;
  margin: 0;
  color: #a9bfcc;
  line-height: 1.55;
}

.action-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.action-confirm-actions button {
  min-width: 132px;
  padding-inline: 18px;
}

.annul-match-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 5vw, 30px);
}

.annul-dialog-heading,
.annul-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.annul-dialog-heading h2 {
  margin: 3px 0 0;
}

.annul-dialog-close {
  width: 42px;
  padding: 0;
  border: 1px solid rgba(166, 210, 234, 0.28);
  color: #dcebf3;
  background: rgba(166, 210, 234, 0.065);
  font-size: 1.7rem;
}

.annul-dialog-intro {
  margin: 0;
  color: #a9bfcc;
  line-height: 1.5;
}

.annul-reason-options {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.annul-reason-options legend {
  margin-bottom: 9px;
  color: #bad0dd;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.annul-reason-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(166, 210, 234, 0.2);
  border-radius: 12px;
  background: #0a202d;
  cursor: pointer;
}

.annul-reason-options input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.annul-reason-options span,
.annul-conditional-field {
  display: grid;
  gap: 4px;
}

.annul-reason-options small {
  color: #a9bfcc;
  line-height: 1.35;
}

.annul-conditional-field {
  color: #bad0dd;
  font-size: 0.86rem;
  font-weight: 800;
}

.annul-conditional-field select,
.annul-conditional-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(166, 210, 234, 0.28);
  border-radius: 10px;
  color: #edf7ff;
  background: #0a202d;
  font: inherit;
}

.annul-conditional-field textarea {
  resize: vertical;
}

.event-row strong {
  display: block;
  margin-bottom: 2px;
}

.event-row-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.event-row-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.event-card-icon {
  width: 18px;
  height: 24px;
  margin-inline: 4px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

.event-card-icon.is-yellow_card {
  background: linear-gradient(135deg, #fff07a 0%, #ffd21f 58%, #d6a600 100%);
}

.event-card-icon.is-red_card {
  background: linear-gradient(135deg, #ff796d 0%, #e21f16 58%, #9b0804 100%);
}

.event-row-copy {
  min-width: 0;
}

.event-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.event-row button {
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px;
}

.edit-event-button span {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.edit-event-button span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 5px;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
}

.compact {
  align-items: flex-start;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 10;
  display: none;
  width: min(calc(100% - 28px), 520px);
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #102a43;
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  display: block;
}

@media (max-width: 520px) {
  .confirm-report-row {
    grid-template-columns: 1fr;
  }

  .confirm-report-row #confirm-report-button,
  .confirm-report-row #annul-match-button {
    grid-column: 1;
  }

  .confirm-report-row #annul-match-button {
    justify-self: end;
  }

  .annul-dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .annul-dialog-actions button {
    width: 100%;
  }

  .action-confirm-form {
    grid-template-columns: 40px 1fr;
    gap: 13px;
  }

  .action-confirm-mark {
    width: 40px;
    height: 40px;
  }

  .action-confirm-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .action-confirm-actions button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .my-match-button {
    max-width: 146px;
    white-space: normal;
    line-height: 1.05;
  }

  .match-nav-row {
    align-items: stretch;
  }

  .match-nav-row > button {
    flex: 1 1 0;
    white-space: normal;
    line-height: 1.1;
  }

  .match-referee-label {
    flex: 1.15 1 0;
    align-self: center;
    font-size: 0.78rem;
    line-height: 1.08;
  }

  .match-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .match-card-main,
  .match-card-open {
    gap: 6px;
  }

  .head-assign-select {
    width: min(44vw, 154px);
    min-height: 32px;
  }

  .event-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

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

  .summary-result {
    order: -1;
    grid-column: 1 / -1;
    min-width: 58px;
    margin: 0 0 4px;
    font-size: 1.52rem;
  }

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