/* Lenguaje visual compartido de las páginas internas de Arena Castell. */
body {
  --font: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --bg: #0c0e0f;
  --surface: #17191b;
  --surface2: #25282a;
  --line: #42474a;
  --text: #f5f4f1;
  --muted: #bdc1c1;
  --accent: #e1e2df;
  --accent-soft: #f2f1ec;
  --radius: 9px;
  background: #0c0e0f;
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.site-header { background: #0c0e0f; border-bottom: 1px solid #373b3e; box-shadow: none; }
.nav-wrap { min-height: 88px; }
.brand strong { font-weight: 720; letter-spacing: .055em; }
.main-nav { gap: 24px; }
.main-nav a {
  min-height: 44px;
  padding-block: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}
.main-nav a[aria-current="page"]::after {
  right: auto;
  bottom: 2px;
  left: 50%;
  width: 36px;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #fff 28%, #fff 72%, transparent);
  box-shadow: 0 2px 9px rgba(244, 245, 245, .58);
}
html.auth-pending [data-account-link] { visibility: hidden; }
.eyebrow { color: #c9ccca; letter-spacing: .15em; font-weight: 700; }
h1, h2 { letter-spacing: -.04em; }
h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.09; font-weight: 730; }
h2 { line-height: 1.16; font-weight: 680; }
.page-intro h1 { margin-bottom: 18px; }
.page-intro p { color: #c8cccb; font-size: 16px; line-height: 1.7; }
.section-heading h2, .visit-copy h2 { font-size: clamp(31px, 3vw, 44px); }
.btn {
  min-height: 49px;
  padding: 12px 21px;
  border: 1px solid #e5e5e2;
  border-radius: 5px;
  background: #e5e5e2;
  color: #17191a;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}
.btn:hover { background: #ffffff; border-color: #ffffff; }
.btn.secondary { background: #1c2022; border: 1px solid #838b8e; color: #f3f3f1; }
.btn.secondary:hover { background: #303538; border-color: #d5d8d6; }
.btn.quiet { border-color: transparent; background: transparent; color: #eceeed; }
.btn.danger { background: #ad515b; border-color: #ad515b; color: #fff; }
.btn.danger:hover { background: #bb616a; border-color: #bb616a; }
.service-hero,
.panel,
.auth-card,
.category,
.stat,
.mail-item,
.flyer,
.map-frame,
.cash-item {
  border-color: #4a5153;
  border-radius: 9px;
  background: #1a1d1f;
  box-shadow: none;
}
.service-copy h2, .panel h2, .auth-card h1, .auth-card h2 { letter-spacing: -.03em; }
.service-copy p, .panel p, .auth-story p { line-height: 1.7; }
.section.alt { background: #131617; border-color: #3b4143; }
.text-link { color: #e5e8e6; font-size: 13px; }
.field label, legend { font-size: 13px; }
.field input, .field select, .field textarea {
  border: 1px solid #737c7f;
  border-radius: 6px;
  background: #111415;
  color: #f5f4f1;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #d9ddda; background: #181c1d; }
.field input::placeholder, .field textarea::placeholder { color: #abb2b2; }
.field input[readonly] { background: #24282a; color: #d9ddde; }
.form-block > legend { font-size: 16px; }
.payment-choice { border-color: #737c7f; background: #171a1c; }
.payment-choice:has(input:checked) { border-color: #d5d9d7; background: #262a2c; box-shadow: inset 4px 0 #e1e2df; }
.table-wrap { border-color: #4a5153; box-shadow: none; }
caption, th { background: #252a2c; }
td { color: #e4e7e5; }
.cta-strip { border-color: #5a6365; border-radius: 8px; background: #202426; box-shadow: none; }
.cta-strip h3 { font-family: Georgia, "Times New Roman", serif; font-size: 27px; }
.site-footer { background: #0a0c0d; border-color: #383d3e; }
a:focus-visible, button:focus-visible { outline: 3px solid #e9ece9; outline-offset: 4px; }
@media (max-width: 820px) {
  .main-nav { background: #141718; }
  .nav-wrap { min-height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* Planteles de torneos */
.team-roster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr);
  gap: 24px;
  align-items: start;
}
.team-roster-panel { padding: 0; overflow: hidden; }
.team-roster-hero {
  position: relative;
  padding: 30px;
  border-bottom: 1px solid #4a5153;
  background: linear-gradient(120deg, #25200f 0%, #1a1d1f 62%, #121516 100%);
}
.team-roster-hero::after {
  content: "";
  position: absolute;
  top: -54px;
  right: -42px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(216, 174, 66, .28);
  border-radius: 50%;
}
.team-roster-hero h2 { margin: 8px 0 6px; font-size: clamp(27px, 3vw, 40px); }
.team-roster-hero p { margin: 0; }
.team-roster-progress { height: 5px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: #0e1112; }
.team-roster-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b98a25, #f0d47b); transition: width .25s ease; }
.roster-grid { display: grid; gap: 12px; padding: 22px; }
.roster-player-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid #42494b;
  border-radius: 8px;
  background: #151819;
}
.roster-shirt-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: 62px;
  border: 1px solid #8b702f;
  border-radius: 7px;
  background: #241f12;
  color: #f0d47b;
  font-size: 29px;
  font-weight: 800;
}
.roster-shirt-number span { margin-right: 2px; font-size: 14px; }
.roster-player-copy { min-width: 0; }
.roster-player-copy small { color: #aeb5b5; }
.roster-player-copy h3 { margin: 3px 0; overflow-wrap: anywhere; }
.roster-player-copy p { margin: 0; color: #c2c7c6; font-size: 13px; }
.team-player-form { position: sticky; top: 100px; }
.team-player-form > .eyebrow { margin-bottom: 8px; color: #d9b95c; }

@media (max-width: 860px) {
  .team-roster-layout { grid-template-columns: 1fr; }
  .team-player-form { position: static; }
}
@media (max-width: 560px) {
  .team-roster-hero { padding: 24px 20px; }
  .roster-grid { padding: 15px; }
  .roster-player-card { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
  .roster-shirt-number { min-height: 54px; font-size: 24px; }
  .roster-player-card .btn { grid-column: 1 / -1; width: 100%; }
}

/* Consulta administrativa de equipos inscritos */
.admin-team-search { max-width: 720px; margin: 24px 0 10px; }
.admin-tournament-teams { display: grid; gap: 14px; margin-top: 18px; }
.admin-team-card { padding: 0; overflow: hidden; }
.admin-team-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 20px;
  align-items: center;
  padding: 21px 24px;
  cursor: pointer;
  list-style: none;
}
.admin-team-card > summary::-webkit-details-marker { display: none; }
.admin-team-card > summary::after { content: "+"; color: #d7b754; font-size: 22px; }
.admin-team-card[open] > summary::after { content: "−"; }
.admin-team-card > summary > span:first-child { display: grid; gap: 4px; }
.admin-team-card > summary small { color: #b7bdbc; }
.admin-team-card > summary strong { font-size: 19px; overflow-wrap: anywhere; }
.admin-team-summary-meta { display: flex; gap: 12px; align-items: center; }
.status-pill { display: inline-flex; padding: 5px 9px; border: 1px solid #6f7678; border-radius: 99px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.status-confirmado { border-color: #3b9a76; color: #8ee0bc; }
.status-pendiente { border-color: #b58e37; color: #f0cf78; }
.status-cancelado { border-color: #98515a; color: #e89aa3; }
.admin-team-details { padding: 0 24px 24px; border-top: 1px solid #414749; }
.admin-team-owner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 26px;
}
.admin-team-owner > div { display: grid; gap: 5px; min-width: 0; padding: 13px; border: 1px solid #3f4648; border-radius: 7px; background: #141718; }
.admin-team-owner small { color: #aeb5b4; }
.admin-team-owner a, .admin-team-owner strong { overflow-wrap: anywhere; }
.admin-player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-player-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px; border: 1px solid #3e4547; border-radius: 7px; background: #141718; }
.admin-player-row > div { display: grid; gap: 3px; min-width: 0; }
.admin-player-row strong, .admin-player-row small { overflow-wrap: anywhere; }
.admin-player-row small { color: #b5bcba; }
.admin-shirt-badge { display: grid; place-items: center; min-height: 48px; border-radius: 6px; background: #2a2413; color: #f0d47b; font-size: 18px; font-weight: 800; }
.admin-team-danger-zone {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #70464c;
  border-radius: 7px;
  background: #211719;
}
.admin-team-danger-zone > div { display: grid; gap: 5px; }
.admin-team-danger-zone p { margin: 0; color: #cbb7b9; font-size: 13px; }

@media (max-width: 900px) {
  .admin-team-owner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .admin-team-card > summary { grid-template-columns: minmax(0, 1fr) 20px; padding: 18px; }
  .admin-team-summary-meta { grid-column: 1 / -1; justify-content: space-between; }
  .admin-team-card > summary::after { grid-column: 2; grid-row: 1; }
  .admin-team-details { padding: 0 16px 18px; }
  .admin-team-owner, .admin-player-list { grid-template-columns: 1fr; }
  .admin-team-danger-zone { align-items: stretch; flex-direction: column; }
  .admin-team-danger-zone .btn { width: 100%; }
}

/* Ficha del equipo dentro de Mi actividad */
.tournament-team-card {
  position: relative;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-color: #78652f;
  background: linear-gradient(115deg, #201d14 0%, #191c1d 45%, #141718 100%);
}
.tournament-team-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#f0d47b, #9a7220);
}
.tournament-team-identity {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 24px 26px 24px 30px;
}
.tournament-team-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid #8d7332;
  border-radius: 50%;
  background: #2b2514;
  color: #f0d47b;
}
.tournament-team-mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tournament-team-copy { min-width: 0; }
.tournament-team-kicker { display: flex; flex-wrap: wrap; gap: 9px 12px; align-items: center; color: #d8bd6c; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.tournament-team-kicker .tag { letter-spacing: normal; }
.tournament-team-card h3 { margin: 8px 0 15px; font-size: clamp(23px, 2.4vw, 32px); overflow-wrap: anywhere; }
.tournament-team-details { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1fr); gap: 12px; margin: 0; }
.tournament-team-details div { display: grid; gap: 3px; min-width: 0; }
.tournament-team-details dt { color: #9fa6a5; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.tournament-team-details dd { margin: 0; color: #f0f1ef; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.tournament-team-actions {
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  padding: 24px;
  border-left: 1px solid #4d4938;
  background: rgba(9, 11, 12, .3);
  text-align: center;
}
.tournament-team-actions .btn { width: 100%; }

@media (max-width: 900px) {
  .tournament-team-card { flex-direction: column; }
  .tournament-team-actions { flex-basis: auto; border-top: 1px solid #4d4938; border-left: 0; }
}
@media (max-width: 620px) {
  .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 5px; }
  .tabs button { flex: 0 0 auto; min-height: 44px; }
  .tournament-team-identity { grid-template-columns: 52px minmax(0, 1fr); gap: 13px; padding: 20px 18px 20px 22px; }
  .tournament-team-mark { width: 50px; height: 50px; }
  .tournament-team-mark svg { width: 25px; height: 25px; }
  .tournament-team-details { grid-template-columns: 1fr; }
  .tournament-team-actions { padding: 18px; }
}
