/* App shell, header, nav, grids, responsive */

.app-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 64px; }

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(6, 20, 13, 0.92), rgba(6, 20, 13, 0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}

.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  font-size: 1.8rem; width: 48px; height: 48px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 14px; box-shadow: 0 6px 18px var(--accent-glow);
}
.logo-text h1 { font-size: 1.25rem; font-weight: 900; letter-spacing: 0.5px; }
.logo-text p { font-size: 0.72rem; color: var(--text-muted); }

.club-switcher { display: flex; align-items: center; gap: 6px; justify-self: center; }
.club-switcher select {
  background: var(--panel-strong); color: var(--text); border: 1px solid var(--panel-border);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 0.85rem; max-width: 180px;
}

.app-nav { display: flex; gap: 4px; justify-self: end; flex-wrap: wrap; }
.nav-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 0.86rem;
  color: var(--text-muted); border: 1px solid transparent; transition: all 0.2s var(--ease);
}
.nav-btn:hover { color: var(--text); background: var(--panel); }
.nav-btn.active {
  color: #04140b; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px var(--accent-glow);
}

/* Tabs */
.tab-content { display: none; animation: fadeUp 0.35s var(--ease); }
.tab-content.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-header h2 { font-size: 1.5rem; }

/* Dashboard grid */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stats-cards-container { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-full { grid-column: 1 / -1; }

/* Match flow */
.match-flow-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* Players + teams areas */
.players-area { display: flex; flex-direction: column; gap: 22px; }
.pos-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.teams-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.history-list { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 860px) {
  .app-header { grid-template-columns: 1fr auto; row-gap: 10px; }
  .club-switcher { grid-column: 1 / -1; order: 3; justify-self: start; }
  .app-nav { grid-column: 1 / -1; order: 4; justify-self: stretch; overflow-x: auto; }
  .dashboard-grid, .match-flow-grid { grid-template-columns: 1fr; }
  .stats-cards-container { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .app-container { padding: 0 12px 56px; }
  .nav-btn .nav-label { display: none; }
  .nav-btn { padding: 10px 14px; font-size: 1rem; }
}
