/* Várzea — times personalizados. Estética própria (terceiro eixo de identidade:
   clube / seleção / várzea): acento terroso, tom de campo de terra. Tudo em rem
   (escala de acessibilidade do font_scale). */

/* O container é o .arena-main (1240px + padding 2rem) — a página NÃO cria um
   segundo container, senão desalinha do subnav (padding duplo). */
.varzea-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.varzea-accent { color: #b45309; }

.varzea-flash {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}
.varzea-flash-success {
  background: rgba(45, 106, 79, 0.12);
  color: #2d6a4f;
  border: 1px solid rgba(45, 106, 79, 0.4);
}
.varzea-flash-alert {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.varzea-page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.varzea-page-header p {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  max-width: 46rem;
  line-height: 1.5;
}

.varzea-card {
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}

.varzea-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.varzea-subsection {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 1.1rem 0 0.5rem;
}

/* ── Hero da página do time ── */

.varzea-hero {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: linear-gradient(120deg, rgba(180, 83, 9, 0.12), transparent 65%);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}

.varzea-hero-info { flex: 1; min-width: 0; }
.varzea-hero-info h1 { font-size: 1.45rem; font-weight: 800; color: var(--text-primary); }
.varzea-hero-info p { color: var(--text-secondary); margin-top: 0.25rem; font-size: 0.9rem; }
.varzea-hero-jersey { flex-shrink: 0; }

/* ── Grid da página do time (campo + sidebar) ── */

.varzea-team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .varzea-team-grid { grid-template-columns: 1fr; }
}

.varzea-team-main,
.varzea-team-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.varzea-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.varzea-club-chip-full {
  border: 1px solid #b45309;
  color: #b45309;
  font-weight: 700;
}

/* ── O campinho de terra batida (assinatura da Várzea) ──
   Ilustração com cores próprias — terra, cal e grama rala — estável nos dois
   temas, como um escudo. Campo vertical, ataque em cima. */

.varzea-pitch-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.varzea-pitch-count {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.varzea-pitch {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  /* Terra batida: manchas de grama rala + áreas gastas na frente dos gols
     e no meio-campo, sobre base de terra. */
  background:
    radial-gradient(ellipse 40% 14% at 50% 12%, rgba(74, 48, 28, 0.30), transparent),
    radial-gradient(ellipse 40% 14% at 50% 88%, rgba(74, 48, 28, 0.30), transparent),
    radial-gradient(ellipse 30% 12% at 50% 50%, rgba(74, 48, 28, 0.18), transparent),
    radial-gradient(ellipse 26% 18% at 16% 32%, rgba(96, 128, 80, 0.32), transparent),
    radial-gradient(ellipse 30% 16% at 86% 66%, rgba(96, 128, 80, 0.28), transparent),
    radial-gradient(ellipse 20% 12% at 30% 80%, rgba(96, 128, 80, 0.22), transparent),
    radial-gradient(ellipse 22% 10% at 72% 22%, rgba(96, 128, 80, 0.20), transparent),
    linear-gradient(168deg, #b08350, #8f6542 55%, #7d5738);
  box-shadow: inset 0 0 40px rgba(60, 38, 20, 0.35);
}

.varzea-pitch-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.varzea-pitch-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 5.6rem;
  text-decoration: none;
  text-align: center;
}

.varzea-pitch-jersey {
  position: relative;
  display: inline-flex;
  filter: drop-shadow(0 2px 3px rgba(40, 24, 10, 0.45));
  transition: transform 0.12s ease;
}

.varzea-pitch-player:hover .varzea-pitch-jersey { transform: scale(1.1); }
.varzea-pitch-player:focus-visible { outline: 2px solid #F5EDE0; outline-offset: 3px; border-radius: 8px; }

.varzea-pitch-captain {
  position: absolute;
  top: -0.3rem;
  right: -0.4rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #f5ede0;
  color: #7d5738;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #7d5738;
}

.varzea-pitch-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fdf8ee;
  background: rgba(52, 32, 16, 0.72);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.varzea-pitch-club {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(253, 248, 238, 0.75);
}

.varzea-pitch-open { opacity: 0.85; }

.varzea-pitch-open-circle {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 2px dashed rgba(245, 237, 224, 0.7);
  color: rgba(245, 237, 224, 0.85);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.varzea-pitch-name-open {
  background: transparent;
  color: rgba(245, 237, 224, 0.75);
  font-weight: 600;
}

@media (max-width: 480px) {
  .varzea-pitch-slot { width: 4.6rem; }
  .varzea-pitch-name { font-size: 0.62rem; }
  .varzea-pitch-club { display: none; }
}

/* ── Elenco ── */

.varzea-roster { display: flex; flex-direction: column; gap: 0.4rem; }

.varzea-roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.varzea-roster-empty {
  border-style: dashed;
  color: var(--text-secondary);
  font-size: 0.85rem;
  justify-content: center;
}

.varzea-roster-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.varzea-roster-name {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}
.varzea-roster-name:hover { text-decoration: underline; }

.varzea-founder-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #b45309;
  border: 1px solid #b45309;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.varzea-club-chip {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.varzea-roster-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

.varzea-cap-hint {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Convites ── */

.varzea-invite-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border-color);
}
.varzea-invite-row:first-of-type { border-top: 0; }

.varzea-invite-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.varzea-invite-info strong { color: var(--text-primary); }
.varzea-invite-info span { font-size: 0.8rem; color: var(--text-secondary); }
.varzea-invite-actions { display: flex; gap: 0.4rem; }

.varzea-invite-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.varzea-invite-form .varzea-input { flex: 1; min-width: 12rem; }

/* ── Builder ── */

.varzea-builder-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .varzea-builder-grid { grid-template-columns: 1fr; }
}

.varzea-builder-preview {
  position: sticky;
  top: 1rem;
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.varzea-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 10rem;
}

.varzea-preview-hint { margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-secondary); }

.varzea-builder-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}

.varzea-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.9rem;
}
.varzea-field-label:first-child { margin-top: 0; }

.varzea-field-hint { font-size: 0.78rem; color: var(--text-secondary); }

.varzea-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.varzea-swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.varzea-swatch { position: relative; cursor: pointer; }
.varzea-swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.varzea-swatch span {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--swatch);
  border: 2px solid var(--border-color);
  transition: transform 0.1s ease;
}
.varzea-swatch input:checked + span {
  border-color: #b45309;
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.35);
  transform: scale(1.12);
}
.varzea-swatch input:focus-visible + span { outline: 2px solid #b45309; outline-offset: 2px; }

.varzea-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.varzea-chip { position: relative; cursor: pointer; }
.varzea-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.varzea-chip span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.varzea-chip input:checked + span {
  border-color: #b45309;
  color: #b45309;
  font-weight: 700;
  background: rgba(180, 83, 9, 0.08);
}
.varzea-chip input:focus-visible + span { outline: 2px solid #b45309; outline-offset: 2px; }

/* ── Botões ── */

.varzea-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.varzea-btn-primary { background: #b45309; color: #fff; }
.varzea-btn-primary:hover { background: #92400e; }

.varzea-btn-ghost {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.varzea-btn-ghost:hover { border-color: #b45309; color: #b45309; }

.varzea-btn-danger {
  background: transparent;
  border-color: #dc2626;
  color: #dc2626;
}
.varzea-btn-danger:hover { background: rgba(220, 38, 38, 0.08); }

.varzea-btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.varzea-btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }

.varzea-submit {
  margin-top: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  background: #b45309;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
}
.varzea-submit:hover { background: #92400e; }

.varzea-cta-card { text-align: left; }
.varzea-cta-card p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.5; }

.varzea-admin-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.varzea-danger-zone { border-color: rgba(220, 38, 38, 0.35); }

.varzea-back-link { font-size: 0.85rem; }
.varzea-back-link a { color: var(--text-secondary); text-decoration: none; }
.varzea-back-link a:hover { color: #b45309; }
