/* Control de jugadores en los grupos de WhatsApp. */
.wa-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 90px;
}

.wa-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 12%, rgba(101, 239, 189, .18), transparent 30%),
    linear-gradient(135deg, rgba(64, 216, 255, .1), transparent 42%),
    linear-gradient(145deg, rgba(24, 13, 68, .96), rgba(8, 5, 29, .96));
  box-shadow: var(--shadow);
}

.wa-hero h1 {
  max-width: 900px;
  margin: 4px 0 13px;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  font-weight: 1000;
  letter-spacing: -.055em;
  line-height: .95;
  text-transform: uppercase;
}

.wa-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.wa-access-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(101, 239, 189, .38);
  border-radius: 999px;
  color: #83f4c9;
  background: rgba(70, 221, 165, .1);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wa-panel {
  min-width: 0;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(10, 6, 35, .92);
  box-shadow: var(--shadow);
}

.wa-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.wa-session small,
.wa-session strong {
  display: block;
}

.wa-session small {
  margin-bottom: 4px;
  color: var(--muted);
}

.wa-session strong {
  overflow-wrap: anywhere;
}

.wa-session-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.wa-summary div {
  padding: 16px 12px;
  border: 1px solid rgba(141, 77, 255, .3);
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, .035);
}

.wa-summary strong,
.wa-summary span {
  display: block;
}

.wa-summary strong {
  font-size: 1.9rem;
  line-height: 1;
}

.wa-summary span {
  margin-top: 6px;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.wa-summary .status-no_controlado strong { color: var(--gold); }
.wa-summary .status-en_grupo strong { color: #76f3c2; }
.wa-summary .status-no_en_grupo strong { color: #ff8da4; }
.wa-summary .status-salio_del_grupo strong { color: #ff3158; }

.wa-section-title {
  margin: 0 0 11px;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wa-tournament-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.wa-tournament-button {
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(141, 77, 255, .32);
  border-radius: 12px;
  color: #e9e6f7;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.wa-tournament-button:hover {
  transform: translateY(-1px);
  border-color: rgba(64, 216, 255, .62);
}

.wa-tournament-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wa-tournament-button strong,
.wa-tournament-button span {
  display: block;
  overflow-wrap: anywhere;
}

.wa-tournament-button strong {
  font-size: .78rem;
  line-height: 1.25;
}

.wa-tournament-button span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .67rem;
}

.wa-tournament-button.is-active {
  border-color: #65efbd;
  background: linear-gradient(145deg, rgba(70, 221, 165, .15), rgba(64, 216, 255, .08));
  box-shadow: inset 0 0 0 1px rgba(101, 239, 189, .12);
}

.wa-tournament-button.is-active strong { color: #9af6d5; }

.wa-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(220px, .7fr);
  gap: 12px;
  align-items: end;
}

.wa-toolbar label {
  display: grid;
  gap: 7px;
}

.wa-toolbar label > span {
  color: #ebe9f7;
  font-size: .75rem;
  font-weight: 800;
}

.wa-toolbar input,
.wa-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(141, 77, 255, .4);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #17103f;
}

.wa-toolbar input:focus,
.wa-toolbar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(64, 216, 255, .11);
}

.wa-message {
  margin: 12px 0 14px;
}

.wa-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wa-player-card {
  min-width: 0;
  padding: clamp(17px, 2.5vw, 22px);
  border: 1px solid rgba(141, 77, 255, .34);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 14, 72, .86), rgba(8, 5, 29, .94));
  box-shadow: 0 15px 34px rgba(0, 0, 0, .2);
}

.wa-player-card.status-no_controlado { border-color: rgba(255, 201, 40, .38); }
.wa-player-card.status-en_grupo { border-color: rgba(101, 239, 189, .52); }
.wa-player-card.status-no_en_grupo { border-color: rgba(255, 72, 110, .48); }
.wa-player-card.status-salio_del_grupo {
  border: 2px solid #ff3158;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 49, 88, .25), transparent 34%),
    linear-gradient(145deg, rgba(78, 8, 31, .94), rgba(18, 4, 28, .98));
  box-shadow: 0 0 0 1px rgba(255, 49, 88, .12), 0 18px 42px rgba(168, 0, 45, .34);
}

.wa-player-card.status-salio_del_grupo .wa-card-header h2 {
  color: #ff9ab0;
}

.wa-player-card.status-salio_del_grupo .wa-card-tournament {
  border-left-color: #ff3158;
  background: rgba(255, 49, 88, .09);
}

.wa-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.wa-card-header h2 {
  margin: 0;
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.wa-card-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .75rem;
}

.wa-status-badge {
  flex: 0 0 auto;
  max-width: 155px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.wa-status-badge.status-no_controlado { color: #ffdc68; background: rgba(255, 201, 40, .13); }
.wa-status-badge.status-en_grupo { color: #83f4c9; background: rgba(70, 221, 165, .14); }
.wa-status-badge.status-no_en_grupo { color: #ff9ab0; background: rgba(255, 49, 88, .13); }
.wa-status-badge.status-salio_del_grupo {
  border: 1px solid rgba(255, 154, 176, .62);
  color: #fff;
  background: #c80c3b;
  box-shadow: 0 0 20px rgba(255, 49, 88, .28);
}

.wa-card-tournament {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 9px 9px 0;
  background: rgba(64, 216, 255, .06);
}

.wa-card-tournament strong,
.wa-card-tournament span {
  display: block;
}

.wa-card-tournament strong {
  font-size: .8rem;
}

.wa-card-tournament span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .68rem;
}

.wa-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 13px;
}

.wa-meta-grid > div {
  min-width: 0;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
}

.wa-meta-grid > div:last-child {
  grid-column: 1 / -1;
}

.wa-meta-grid small,
.wa-meta-grid span,
.wa-meta-grid a {
  display: block;
}

.wa-meta-grid small {
  margin-bottom: 4px;
  color: var(--cyan);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.wa-meta-grid span,
.wa-meta-grid a {
  overflow-wrap: anywhere;
  color: #ebe9f7;
  font-size: .8rem;
}

.wa-meta-grid .wa-phone-link {
  width: fit-content;
  color: #76f3c2;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.wa-meta-grid .wa-phone-link:hover,
.wa-meta-grid .wa-phone-link:focus-visible {
  color: #a3ffdc;
}

.wa-status-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.wa-status-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(141, 77, 255, .36);
  border-radius: 10px;
  color: #d7d2eb;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 850;
  line-height: 1.2;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.wa-status-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--cyan);
}

.wa-status-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.wa-status-button.is-active.status-no_controlado { border-color: var(--gold); color: #ffdc68; background: rgba(255, 201, 40, .13); }
.wa-status-button.is-active.status-en_grupo { border-color: #65efbd; color: #8ff5cf; background: rgba(70, 221, 165, .15); }
.wa-status-button.is-active.status-no_en_grupo { border-color: #ff496d; color: #ff9ab0; background: rgba(255, 49, 88, .13); }
.wa-status-button.is-active.status-salio_del_grupo {
  border-color: #ff3158;
  color: #fff;
  background: rgba(200, 12, 59, .62);
  box-shadow: inset 0 0 0 1px rgba(255, 154, 176, .2);
}
.wa-status-button:disabled { cursor: default; transform: none; opacity: .82; }

.wa-updated {
  display: block;
  margin-top: 11px;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.4;
}

.wa-history {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.wa-history summary {
  width: fit-content;
  color: var(--cyan);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 800;
}

.wa-history ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.wa-history li {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.wa-history strong,
.wa-history span {
  display: block;
  font-size: .67rem;
  line-height: 1.4;
}

.wa-history span {
  margin-top: 2px;
  color: var(--muted);
}

.wa-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .wa-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-tournament-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-player-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wa-layout {
    width: min(100% - 28px, 1180px);
    margin-top: 12px;
  }

  .wa-hero,
  .wa-session {
    align-items: flex-start;
    flex-direction: column;
  }

  .wa-hero h1 {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }

  .wa-access-badge {
    align-self: flex-start;
  }

  .wa-session-actions {
    width: 100%;
  }

  .wa-toolbar,
  .wa-tournament-list {
    grid-template-columns: 1fr;
  }

  .wa-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .wa-status-badge {
    max-width: none;
  }

  .wa-meta-grid,
  .wa-status-controls {
    grid-template-columns: 1fr;
  }

  .wa-meta-grid > div:last-child {
    grid-column: auto;
  }
}
