/* ── Page header ─────────────────────────────────────────── */
.teams-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.teams-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.teams-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -.02em;
}
.teams-count {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2px 10px;
}
.btn-add-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -.01em;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-add-team:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-add-team:active { transform: translateY(0); }
.teams-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn-add-team-secondary {
  background: #fff;
  color: #334155;
  border: 1.5px solid #e2e8f0;
}
.btn-add-team-secondary:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* ── Empty state ─────────────────────────────────────────── */
.teams-empty {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
}
.teams-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.teams-empty p { font-size: 15px; font-weight: 500; color: #64748b; }
.teams-empty span { font-size: 13px; }

/* ── Team grid ───────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── Team card ───────────────────────────────────────────── */
.team-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  transition: box-shadow .2s, border-color .2s;
}
.team-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: #cbd5e1;
}

/* ── Logo / initials ─────────────────────────────────────── */
.team-logo-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin-bottom: 12px;
  flex-shrink: 0;
  position: relative;
}
.team-logo-img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  display: block;
}
.team-initials {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #1e3a5f 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.01em;
}

/* ── Team name row ───────────────────────────────────────── */
.team-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  text-align: center;
}
.team-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -.01em;
}

/* ── Seeded star ─────────────────────────────────────────── */
.seeded-tag {
  font-size: 16px;
  cursor: pointer;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color .2s, transform .15s;
  line-height: 1;
}
.seeded-tag:hover { transform: scale(1.2); }
.seeded-tag.active { color: #f59e0b; }

/* ── Players ─────────────────────────────────────────────── */
.team-players {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.team-player-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
}
.player-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.player-avatar-init {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.player-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.player-name-full,
.player-name-mobile {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-name-mobile {
  display: none;
}
.captain-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  background: #1e293b;
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: .04em;
}
.team-players-more {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  padding: 2px 0 0 2px;
}

/* ── Actions ─────────────────────────────────────────────── */
.team-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}
.team-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  font-family: inherit;
  transition: background .15s, transform .1s;
  text-align: center;
}
.team-btn:active { transform: scale(.97); }
.team-btn-edit {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}
.team-btn-edit:hover { background: #f1f5f9; border-color: #cbd5e1; }
.team-btn-remove,
.team-btn-leave {
  background: #fff;
  border-color: #fecaca;
  color: #dc2626;
}
.team-btn-remove:hover,
.team-btn-leave:hover { background: #fef2f2; border-color: #fca5a5; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .player-name-full { display: none; }
  .player-name-mobile { display: inline; }
}
