:root {
  color-scheme: dark;
  --bg: #101617;
  --panel: #182122;
  --panel-2: #202b2c;
  --text: #f4f7f2;
  --muted: #a8b3ad;
  --line: rgba(255, 255, 255, 0.11);
  --lime: #c6ff3d;
  --mint: #57e6b0;
  --red: #ff5d5d;
  --blue: #70a7ff;
  --gold: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(198, 255, 61, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(112, 167, 255, 0.14), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.menu-toggle {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(16, 22, 23, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--lime), var(--mint));
  color: #101617;
  font-weight: 950;
  box-shadow: 0 12px 38px rgba(198, 255, 61, 0.2);
}

.brand strong,
h1,
h2,
h3 {
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.session-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

label,
.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select,
input,
textarea {
  width: 100%;
  color: var(--text);
  background: #111819;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.96;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

h3,
p {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
}

.grid {
  display: grid;
  gap: 18px;
}

.dashboard {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

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

.panel,
.match-card,
.player-card,
.league-row,
.team-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.hero-match {
  min-height: 420px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  position: relative;
}

.hero-match::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 22, 23, 0.78), rgba(16, 22, 23, 0.26)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 90px),
    linear-gradient(135deg, #276b49, #1c3931 55%, #111819);
  z-index: -1;
}

.hero-match h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  max-width: 760px;
}

.kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kpi,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
  color: var(--text);
}

.badge.member {
  color: #101617;
  background: var(--lime);
  border-color: transparent;
}

.badge.guest {
  color: var(--text);
  background: rgba(112, 167, 255, 0.15);
}

.badge.admin {
  color: #101617;
  background: var(--gold);
  border-color: transparent;
}

.account-approved,
.payment-paid,
.status-open {
  color: #101617;
  background: var(--mint);
  border-color: transparent;
}

.account-pending,
.payment-pending,
.status-scheduled,
.status-closed {
  color: #101617;
  background: var(--gold);
  border-color: transparent;
}

.account-blocked,
.payment-overdue,
.status-cancelled {
  color: #fff;
  background: rgba(255, 93, 93, 0.22);
  border-color: rgba(255, 93, 93, 0.45);
}

.status-voting_open {
  color: #101617;
  background: var(--blue);
  border-color: transparent;
}

.status-finished,
.status-voting_closed,
.status-archived {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

button,
.button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  color: #101617;
  background: var(--lime);
  font-weight: 850;
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

button.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

button.compact {
  min-height: 34px;
  padding: 7px 10px;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(198, 255, 61, 0.45);
  outline-offset: 2px;
}

.match-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  display: grid;
  gap: 14px;
  isolation: isolate;
}

.match-card .match-head {
  position: relative;
  z-index: 2;
  padding-right: 5.25rem;
}

.match-orb {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 5.25rem;
  height: 5.25rem;
  perspective: 480px;
  perspective-origin: 52% 38%;
  pointer-events: none;
  z-index: 3;
}

.match-orb__stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(11deg);
}

.match-orb__shadow {
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  z-index: 0;
  width: 74%;
  height: 0.85rem;
  margin-left: -37%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.28) 42%,
    rgba(0, 0, 0, 0) 72%
  );
  filter: blur(5px);
  transform: translate3d(0, 0, -28px) rotateX(82deg);
  transform-origin: center center;
  animation: ballShadow3d 3.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform, opacity, filter;
}

.match-orb__ball {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: 50% 58%;
  animation: ball3dRoll 3.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
}

.match-orb__ball::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 28% 22%,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.05) 36%,
    rgba(255, 255, 255, 0) 58%
  );
  pointer-events: none;
  mix-blend-mode: soft-light;
  transform: translateZ(2px);
}

.match-orb__ball img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent;
  -webkit-user-drag: none;
  user-select: none;
  backface-visibility: hidden;
  transform: translateZ(1px);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.38));
}

.cards-3 .match-card:nth-child(3n + 2) .match-orb__ball,
.cards-3 .match-card:nth-child(3n + 2) .match-orb__shadow {
  animation-delay: -1.25s;
}

.cards-3 .match-card:nth-child(3n) .match-orb__ball,
.cards-3 .match-card:nth-child(3n) .match-orb__shadow {
  animation-delay: -2.5s;
}

.match-card:has(.status-open) .match-orb__ball img {
  filter:
    drop-shadow(0 7px 12px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 14px rgba(198, 255, 61, 0.22));
}

.match-card:has(.status-voting_open) .match-orb__ball img {
  filter:
    drop-shadow(0 7px 12px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 16px rgba(112, 167, 255, 0.3));
}

/* Rodar en sitio: giro Y + micro rebote, bucle continuo */
@keyframes ball3dRoll {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(5deg) rotateY(-28deg) rotateZ(0deg) scale(1);
  }

  25% {
    transform: translate3d(1px, -1px, 5px) rotateX(7deg) rotateY(-6deg) rotateZ(0.6deg) scale(1.008);
  }

  50% {
    transform: translate3d(0, -2px, 8px) rotateX(4deg) rotateY(22deg) rotateZ(0deg) scale(1.012);
  }

  75% {
    transform: translate3d(-1px, -1px, 5px) rotateX(6deg) rotateY(10deg) rotateZ(-0.6deg) scale(1.008);
  }
}

/* Sombra de contacto: más lejos/difusa cuando el balón “sube” */
@keyframes ballShadow3d {
  0% {
    opacity: 0.82;
    transform: translate3d(0, 0, -28px) rotateX(82deg) scale(0.9);
    filter: blur(5px);
  }

  40% {
    opacity: 0.48;
    transform: translate3d(2px, 1px, -28px) rotateX(82deg) scale(1.14);
    filter: blur(9px);
  }

  100% {
    opacity: 0.82;
    transform: translate3d(-1px, 0, -28px) rotateX(82deg) scale(0.9);
    filter: blur(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .match-orb__ball,
  .match-orb__shadow {
    animation: none;
  }

  .match-orb__ball {
    transform: rotateX(4deg) rotateY(-18deg);
  }

  .match-orb__shadow {
    opacity: 0.7;
    transform: translate3d(0, 0, -28px) rotateX(82deg) scale(0.95);
  }
}

.match-head,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--mint));
}

label small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.match-calendar {
  margin-bottom: 18px;
}

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

.calendar-weekdays {
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.calendar-cell {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.calendar-cell.has-match {
  border-color: rgba(198, 255, 61, 0.26);
  background: rgba(198, 255, 61, 0.08);
}

.empty-cell {
  background: transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.player-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(255, 209, 102, 0.18), rgba(87, 230, 176, 0.08)),
    var(--panel);
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  pointer-events: none;
}

.rating {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 950;
}

.avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin: 16px auto;
  border-radius: 50%;
  color: #101617;
  background: linear-gradient(135deg, var(--gold), var(--lime));
  font-size: 2rem;
  font-weight: 950;
}

.player-card h3 {
  text-align: center;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.player-card .alias {
  text-align: center;
  color: var(--gold);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.stat {
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.15rem;
}

.league-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) repeat(5, minmax(42px, 70px));
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.league-row.header {
  color: var(--muted);
  box-shadow: none;
  background: transparent;
}

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

.team-name-cell img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.team-name-cell small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-tabs {
  margin-bottom: 16px;
}

.file-drop {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(198, 255, 61, 0.45);
  border-radius: 8px;
  background: rgba(198, 255, 61, 0.06);
  text-transform: none;
  letter-spacing: 0;
}

.file-drop input {
  padding: 10px;
  cursor: pointer;
}

.file-drop span {
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-player-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.quick-player-box h3 {
  margin-top: 0;
}

.competition-list,
.competition-rounds,
.competition-match-list {
  display: grid;
  gap: 12px;
}

.competition-card,
.competition-round {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.competition-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.competition-teams span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.competition-teams img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}

.competition-round summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.competition-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr) minmax(160px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.competition-match>strong {
  text-align: center;
  color: var(--lime);
}

.competition-match small {
  color: var(--muted);
}

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

.team-box {
  padding: 16px;
}

.team-box ul,
.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.clean-list li,
.team-box li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

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

.role-ranking {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.role-ranking h3 {
  margin: 0 0 10px;
}

.role-ranking p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0;
}

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

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 22px;
  align-items: stretch;
}

.login-hero {
  min-height: 540px;
  display: grid;
  align-content: end;
  padding: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 22, 23, 0.18), rgba(16, 22, 23, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 82px),
    linear-gradient(135deg, #26503e, #182122 62%, #111819);
  box-shadow: var(--shadow);
}

.login-hero h2 {
  max-width: 760px;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.92;
}

.login-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.login-form {
  align-self: center;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.admin-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(110px, 0.8fr)) minmax(130px, auto);
  gap: 10px;
  align-items: center;
  min-width: 760px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-table-head {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tabs-bar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 23, 0.82);
  backdrop-filter: blur(18px);
}

.tabs-bar button {
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.tabs-bar button.active {
  color: #101617;
  background: var(--lime);
}

.user-admin-list,
.schedule-list {
  display: grid;
  gap: 14px;
}

.admin-user-card,
.schedule-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

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

.mini-history {
  margin-top: 10px;
}

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

.history-grid span {
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.history-grid strong,
.history-grid small {
  display: block;
}

.history-grid small {
  color: var(--muted);
}

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

.schedule-guide div,
.help-card {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(198, 255, 61, 0.08);
}

.schedule-guide strong,
.schedule-guide span {
  display: block;
}

.schedule-guide span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

.modal-history {
  margin-top: 10px;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.table-list {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(90px, auto));
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.table-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.empty {
  min-height: 180px;
  display: grid;
  align-content: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 40px));
  display: grid;
  gap: 8px;
}

.toast-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #0d1213, #1d2829);
  box-shadow: var(--shadow);
  animation: toastIn 260ms ease-out;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(6px);
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 31;
  width: min(980px, 100vw);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  transform: translateX(-50%);
  padding: 12px 18px 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(31, 42, 43, 0.98), rgba(14, 20, 21, 0.98));
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.45);
  animation: sheetUp 240ms ease-out;
}

@keyframes sheetUp {
  from {
    transform: translateX(-50%) translateY(100%);
  }

  to {
    transform: translateX(-50%) translateY(0);
  }
}

.sheet-handle {
  width: 52px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

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

@media (max-width: 940px) {
  .shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    border-right: 1px solid var(--line);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 41;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 8px;
    gap: 4px;
    background: rgba(16, 22, 23, 0.92);
  }

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

  main {
    grid-column: 1 / -1;
    padding-top: 76px;
  }

  .topbar {
    padding-left: 48px;
  }

  .dashboard,
  .cards-3,
  .team-board,
  .login-screen,
  .admin-grid,
  .admin-form-grid,
  .schedule-guide,
  .role-rankings {
    grid-template-columns: 1fr;
  }

  .tabs-bar {
    position: static;
  }
}

@media (max-width: 640px) {

  main,
  .sidebar {
    padding: 16px;
  }

  .topbar {
    padding-left: 42px;
  }

  .topbar,
  .between,
  .match-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs-bar {
    grid-template-columns: 1fr;
  }

  .hero-match {
    min-height: 360px;
  }

  .league-row {
    grid-template-columns: 34px minmax(120px, 1fr) 48px 48px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .admin-table-row {
    min-width: 0;
    grid-template-columns: minmax(150px, 1fr) 86px 92px 70px;
    gap: 6px;
    padding: 9px;
  }

  .admin-table-row span:nth-child(4),
  .admin-table-row span:nth-child(5) {
    display: none;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .row-actions .ghost {
    display: none;
  }

  .bottom-sheet {
    width: 100vw;
    max-height: 92vh;
    padding-inline: 14px;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }

  .league-row span:nth-child(n+5) {
    display: none;
  }

  .competition-match {
    grid-template-columns: 1fr 54px 1fr;
  }

  .competition-match small,
  .competition-match button {
    grid-column: 1 / -1;
  }
}