:root {
  --ink: #11241c;
  --muted: #63736b;
  --paper: #f5f6f0;
  --surface: #ffffff;
  --line: #dde3dc;
  --green: #176b45;
  --green-dark: #0c472e;
  --lime: #dfff43;
  --orange: #ff7759;
  --yellow: #f4c84b;
  --red: #d94343;
  --shadow: 0 24px 70px rgba(18, 51, 37, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 10%, rgba(223, 255, 67, 0.13), transparent 30%),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: end;
  min-height: 44px;
}

.checkbox-field input {
  width: auto;
}

button {
  color: inherit;
}

.site-header {
  width: min(1240px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: var(--green-dark);
  border-radius: 10px 10px 10px 3px;
  font-weight: 900;
  transform: rotate(-3deg);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav-button {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.nav-button:hover,
.nav-button.active {
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.1);
}

.account-area {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.notification-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.notification-button span {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--paper);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--lime);
  font-weight: 800;
}

.user-chip span {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  width: min(1240px, calc(100% - 32px));
  min-height: 520px;
  margin: 16px auto 34px;
  padding: clamp(30px, 5vw, 70px);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg, rgba(11, 72, 46, 0.97), rgba(16, 91, 59, 0.94)),
    linear-gradient(45deg, #0c472e, #176b45);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.eyebrow,
.modal-kicker {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(42px, 5.7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.hero-text {
  max-width: 580px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border 160ms ease;
}

.button-spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 650ms linear infinite;
}

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

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

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button.primary {
  color: var(--green-dark);
  background: var(--lime);
}

.button.secondary {
  color: white;
  background: var(--green);
}

.button.ghost {
  color: inherit;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
}

.button.soft {
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.09);
}

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

.button.wide {
  width: 100%;
}

.button.small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 13px;
}

.hero-board {
  position: relative;
  min-height: 370px;
  background: #2e8b5b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: inset 0 0 80px rgba(5, 61, 38, 0.2);
}

.field-lines {
  position: absolute;
  inset: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
}

.field-lines::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px solid rgba(255, 255, 255, 0.35);
}

.field-lines::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  top: 50%;
  left: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.score-strip {
  position: absolute;
  top: 30px;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 12px;
  transform: translateX(-50%) rotate(-1deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.score-strip span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.score-strip strong {
  font-size: 18px;
}

.feature-chip {
  position: absolute;
  z-index: 3;
  min-width: 178px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(4, 43, 27, 0.2);
}

.feature-chip small,
.feature-chip strong {
  display: block;
}

.feature-chip small {
  color: var(--muted);
  font-size: 10px;
}

.feature-chip strong {
  font-size: 14px;
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: var(--green-dark);
  border-radius: 10px;
  font-weight: 900;
}

.chip-a {
  top: 116px;
  left: 10px;
  transform: rotate(-2deg);
}

.chip-b {
  top: 205px;
  right: 5px;
  transform: rotate(2deg);
}

.chip-c {
  bottom: 20px;
  left: 55px;
  transform: rotate(1deg);
}

.content-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 460px;
  margin: 0 auto 80px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 0 0 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 520px;
  margin: 7px 0 0;
  color: var(--muted);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin-top: 3px;
  font-size: 28px;
}

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

.competition-card,
.panel,
.team-card,
.match-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.competition-card {
  position: relative;
  min-height: 270px;
  padding: 22px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.competition-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(19, 61, 43, 0.08);
}

.competition-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  bottom: -42px;
  border: 18px solid rgba(23, 107, 69, 0.06);
  border-radius: 50%;
}

.card-topline,
.meta-row,
.team-card-head,
.match-scoreline,
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.09);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge.private {
  color: #8a4c0f;
  background: #fff2dd;
}

.badge.live {
  color: #a52626;
  background: #ffe9e9;
}

.competition-card h3 {
  margin: 36px 0 9px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.competition-card .organizer {
  color: var(--muted);
  font-size: 13px;
}

.competition-card .meta-row {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.locked-card {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(23, 107, 69, 0.018),
      rgba(23, 107, 69, 0.018) 9px,
      transparent 9px,
      transparent 18px
    ),
    var(--surface);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 24px;
}

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

.panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.panel-intro,
.muted {
  color: var(--muted);
}

.panel-intro {
  margin: 0 0 20px;
  font-size: 14px;
}

.empty-state {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed #cbd4cc;
  border-radius: var(--radius);
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 18px;
}

.team-list,
.match-list,
.request-list {
  display: grid;
  gap: 10px;
}

.team-card,
.match-card,
.request-row {
  padding: 16px;
}

.team-card h4,
.match-card h4 {
  margin: 0;
  font-size: 16px;
}

.team-card.archived {
  opacity: 0.72;
}

.roster-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.roster-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  background: #f8faf7;
  border: 1px solid #e0e7e1;
  border-radius: 10px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.roster-row:nth-child(even) {
  background: #f1f5f0;
}

.roster-row:hover,
.roster-row:focus-within {
  background: #ffffff;
  border-color: #9db3a2;
  box-shadow: 0 4px 12px rgba(23, 62, 37, 0.08);
}

.roster-player-info {
  min-width: 0;
}

.roster-player-info strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.roster-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  padding-left: 10px;
  border-left: 1px solid #dce4dd;
}

.roster-row small {
  display: block;
  color: var(--muted);
}

.roster-row.inactive {
  opacity: 0.55;
}

.roster-row .action-row,
.team-card-head .action-row {
  margin-top: 0;
}

.import-tools {
  margin-top: 0;
}

.import-preview {
  padding: 12px;
  background: #f4f7f3;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-preview strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.import-preview-list {
  display: grid;
  gap: 4px;
  max-height: 160px;
  overflow: auto;
  font-size: 12px;
}

.team-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.match-card {
  cursor: pointer;
}

.match-card:hover {
  border-color: #aab9ad;
}

.match-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.match-filter-result {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.match-filter-result strong {
  color: var(--green-dark);
  font-size: 22px;
}

.supervisor-competition-group {
  margin-top: 24px;
}

.match-filters + .supervisor-competition-group {
  margin-top: 0;
}

.supervisor-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.supervisor-group-heading .eyebrow,
.supervisor-group-heading h3 {
  margin: 0;
}

.supervisor-group-heading .eyebrow {
  color: var(--green);
}

.supervisor-group-heading h3 {
  font-size: 20px;
}

.match-scoreline {
  margin-top: 13px;
  font-weight: 800;
}

.match-scoreline .score {
  color: var(--green-dark);
  font-size: 19px;
  white-space: nowrap;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcf9;
  border: 1px solid #ced7cf;
  border-radius: 10px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 69, 0.1);
}

textarea {
  resize: vertical;
}

dialog {
  color: var(--ink);
}

.modal {
  width: min(540px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  padding: 30px;
  overflow: auto;
  background: var(--surface);
  border: 0;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(8, 30, 21, 0.63);
  backdrop-filter: blur(5px);
}

.modal-wide {
  width: min(760px, calc(100% - 24px));
}

.detail-modal,
.match-modal {
  width: min(960px, calc(100% - 24px));
}

.modal h2 {
  margin: 0 0 22px;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.modal .modal-kicker {
  color: var(--green);
}

.modal-close {
  position: sticky;
  z-index: 10;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef1ec;
  font-size: 21px;
  cursor: pointer;
}

.text-button {
  width: 100%;
  margin-top: 15px;
  color: var(--green);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.demo-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.demo-box > span {
  color: var(--muted);
  font-size: 12px;
}

.demo-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.demo-buttons button {
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faf7;
  font-size: 11px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.detail-hero {
  padding: 24px;
  color: white;
  background: var(--green-dark);
  border-radius: 18px;
}

.detail-hero h2 {
  margin: 12px 0 8px;
}

.detail-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.detail-fact {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.detail-fact small,
.detail-fact strong {
  display: block;
}

.detail-fact small {
  color: rgba(255, 255, 255, 0.58);
}

.champion-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 15px 18px;
  color: var(--green-dark);
  background: var(--lime);
  border-radius: 14px;
}

.champion-banner strong {
  font-size: 20px;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h3 {
  margin: 0 0 13px;
}

.locked-detail {
  padding: 70px 20px;
  text-align: center;
}

.locked-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--lime);
  background: var(--green-dark);
  border-radius: 20px;
  font-size: 27px;
}

.request-row {
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.request-row p {
  margin: 0;
  font-size: 13px;
}

.request-row small {
  color: var(--muted);
}

.match-console-head {
  padding: 22px;
  text-align: center;
  color: white;
  background: var(--green-dark);
  border-radius: 18px;
}

.match-console-head .status {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.match-maintenance-action {
  justify-content: center;
  margin-top: 15px;
}

.match-maintenance-action .button.soft {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.match-maintenance-action .button.soft:hover {
  background: rgba(255, 255, 255, 0.2);
}

.console-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 22px 0 10px;
}

.console-score strong {
  font-size: clamp(18px, 4vw, 28px);
}

.console-score .score {
  min-width: 115px;
  font-size: clamp(37px, 7vw, 62px);
  letter-spacing: -0.07em;
}

.match-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.match-clock.overdue {
  color: #ffcf66;
}

.period-status {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.time-actions {
  margin-top: 0;
}

.inline-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.lineup-grid,
.event-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.lineup-panel,
.event-panel {
  padding: 18px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.lineup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lineup-heading h3 {
  margin: 0;
}

.lineup-counter {
  min-width: 112px;
  padding: 8px 11px;
  color: #8a4c0f;
  background: #fff2dd;
  border-radius: 11px;
  text-align: right;
}

.lineup-counter strong {
  font-size: 22px;
}

.lineup-counter span {
  font-weight: 800;
}

.lineup-counter small {
  display: block;
  font-size: 11px;
}

.lineup-counter.complete {
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.1);
}

.player-checks {
  max-height: 280px;
  margin: 14px 0;
  overflow: auto;
}

.player-check {
  display: grid;
  grid-template-columns: auto 38px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 5px;
  border-bottom: 1px solid #e6ebe5;
  font-weight: 500;
}

.player-check input {
  width: auto;
}

.player-check:has(input:disabled:not(:checked)) {
  opacity: 0.5;
}

.lineup-form button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lineup-footer-actions {
  margin-top: 18px;
  text-align: center;
}

.lineup-footer-actions p {
  margin: 0;
  font-size: 12px;
}

.lineup-footer-actions .action-row {
  justify-content: center;
  margin-top: 10px;
}

.discipline-alert {
  margin-top: 10px;
  padding: 9px 11px;
  color: #8c2929;
  background: #fff0ed;
  border: 1px solid #ffd5cd;
  border-radius: 9px;
  font-size: 12px;
}

.suspension-label {
  color: #b32d2d;
  font-weight: 800;
}

.shirt-number {
  color: var(--green);
  font-weight: 850;
}

.timeline {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.event-item {
  display: grid;
  grid-template-columns: 45px 30px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.event-item.voided {
  opacity: 0.58;
  background: #f2f3f0;
  text-decoration: line-through;
}

.event-maintenance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
}

.event-maintenance-form,
.event-maintenance-history {
  padding: 18px;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.event-maintenance-history h3 {
  margin-top: 0;
}

.maintenance-event-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow: auto;
}

.maintenance-event-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.maintenance-event-row small {
  display: block;
  color: var(--muted);
}

.text-button.compact {
  width: auto;
  margin: 0;
  padding: 5px;
  font-size: 12px;
}

.danger-text {
  color: var(--red);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.standings-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.competition-stats {
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.statistics-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-top: 14px;
}

.statistics-table {
  min-width: 540px;
}

.statistics-table th:first-child,
.statistics-table td:first-child {
  text-align: left;
}

.player-ranking {
  display: grid;
  gap: 7px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ranking-position {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--lime);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.ranking-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.ranking-numbers {
  white-space: nowrap;
  font-size: 12px;
}

.group-grid .panel {
  overflow: auto;
}

.standings-table th,
.standings-table td {
  padding: 11px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  text-align: left;
}

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

.event-minute {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.event-symbol {
  text-align: center;
  font-size: 18px;
}

.form-hint {
  margin: -8px 0 0;
  font-size: 12px;
}

.formation-section {
  margin-top: 22px;
}

.formation-heading,
.formation-team-name,
.squad-strip,
.dismissed-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.formation-heading h3,
.formation-heading .eyebrow {
  margin: 0;
}

.formation-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}

.team-formation {
  overflow: hidden;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.formation-team-name {
  padding: 13px 16px;
}

.formation-team-name span {
  color: var(--muted);
  font-size: 12px;
}

.football-pitch {
  position: relative;
  min-height: 430px;
  margin: 0 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 12.5%,
      rgba(0, 0, 0, 0.025) 12.5%,
      rgba(0, 0, 0, 0.025) 25%
    ),
    #268354;
  border-radius: 12px;
  box-shadow: inset 0 0 36px rgba(6, 58, 36, 0.18);
}

.pitch-markings {
  position: absolute;
  inset: 13px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 4px;
  pointer-events: none;
}

.pitch-markings::before {
  content: "";
  position: absolute;
  width: 42%;
  height: 16%;
  top: -2px;
  left: 50%;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-top: 0;
  transform: translateX(-50%);
}

.pitch-markings::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  top: 50%;
  left: 50%;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.formation-players {
  position: relative;
  z-index: 1;
  min-height: 430px;
  padding: 28px 17px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
}

.formation-line {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 5px;
}

.pitch-player {
  width: min(76px, 19%);
  min-width: 48px;
  padding: 0;
  color: white;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pitch-player:disabled {
  opacity: 0.78;
  cursor: default;
}

.player-marker {
  width: 42px;
  height: 42px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: var(--lime);
  border: 3px solid white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 15px rgba(4, 48, 29, 0.3);
  transition: transform 150ms ease;
}

.away .player-marker {
  color: white;
  background: var(--orange);
}

.pitch-player:not(:disabled):hover .player-marker,
.pitch-player:not(:disabled):focus-visible .player-marker {
  transform: translateY(-3px) scale(1.06);
}

.player-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.player-event-badges {
  min-height: 17px;
  display: flex;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
}

.squad-strip,
.dismissed-strip {
  align-items: flex-start;
  padding: 12px 16px;
  font-size: 12px;
}

.squad-strip > span,
.dismissed-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.bench-player {
  padding: 2px 7px;
  color: var(--green-dark);
  background: rgba(23, 107, 69, 0.09);
  border-radius: 999px;
}

.dismissed-strip {
  justify-content: flex-start;
  color: #8c2929;
  background: #fff0ed;
  border-top: 1px solid #ffd5cd;
}

.quick-event-modal {
  width: min(480px, calc(100% - 24px));
}

.quick-event-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.quick-action {
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  font-weight: 800;
  cursor: pointer;
}

.quick-action span {
  font-size: 24px;
}

.quick-action.goal {
  color: var(--green-dark);
  background: #efffdc;
}

.quick-action.yellow {
  color: #6d5700;
  background: #fff8d5;
}

.quick-action.red {
  color: #8c2929;
  background: #fff0ed;
}

.notification-modal {
  width: min(650px, calc(100% - 24px));
}

.notification-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.notification-heading h2,
.notification-heading .modal-kicker {
  margin-top: 0;
}

.notification-list {
  max-height: min(65vh, 620px);
  display: grid;
  gap: 8px;
  overflow: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 13px;
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.notification-item.unread {
  background: #f5ffe8;
  border-color: #cfe5a2;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  background: transparent;
  border-radius: 50%;
}

.notification-item.unread .notification-dot {
  background: var(--green);
}

.notification-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 13px;
}

.notification-item small {
  color: var(--muted);
}

.locked-participation {
  max-width: 480px;
  margin: 20px auto 0;
  text-align: left;
}

.locked-access-actions {
  justify-content: center;
  margin-top: 16px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  inset: auto 20px 20px auto;
  width: min(360px, calc(100vw - 40px));
  margin: 0;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: transparent;
  border: 0;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 12px 15px;
  color: white;
  background: var(--green-dark);
  border-radius: 11px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  animation: toast-in 180ms ease;
}

.toast.error {
  background: #9f3030;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.loading {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 25px 0 35px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

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

  .hero-board {
    min-height: 320px;
  }

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

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .roster-row {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }

  .roster-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid #dce4dd;
    border-left: 0;
  }

  .site-header {
    width: min(100% - 22px, 1240px);
    gap: 10px;
  }

  .account-area .button {
    padding: 8px 11px;
  }

  .user-chip span {
    display: none;
  }

  .hero {
    width: min(100% - 22px, 1240px);
    min-height: auto;
    margin-top: 5px;
    padding: 31px 22px 22px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-board {
    min-height: 285px;
  }

  .feature-chip {
    min-width: 150px;
    padding: 10px;
  }

  .chip-a {
    top: 100px;
    left: 0;
  }

  .chip-b {
    top: 170px;
    right: 0;
  }

  .chip-c {
    bottom: 14px;
    left: 22px;
  }

  .content-shell {
    width: min(100% - 22px, 1240px);
  }

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

  .card-grid,
  .dashboard-grid,
  .form-grid,
  .match-filters,
  .event-maintenance-layout,
  .lineup-grid,
  .event-layout,
  .formation-board,
  .statistics-grid {
    grid-template-columns: 1fr;
  }

  .match-filter-result {
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }

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

  .competition-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .export-actions {
    width: 100%;
  }

  .football-pitch,
  .formation-players {
    min-height: 390px;
  }

  .panel.span-2 {
    grid-column: auto;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .console-score {
    gap: 8px;
  }

  .console-score .score {
    min-width: 85px;
  }

  .demo-buttons {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    width: min(100% - 22px, 1240px);
    flex-direction: column;
  }
}
