/* PCM Website V2.28 — Final Public QA / Bug Fix Pack */
:root { --pcm-qa-version: "2.28"; }

/* Global overflow safety */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video, canvas { max-width: 100%; height: auto; }
pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Header/navigation final QA */
.site-header { gap: 14px; }
.brand-with-logo { min-width: 0; }
.brand-with-logo > span:last-child { min-width: 0; }
.brand-with-logo strong, .brand-with-logo small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo-wrap { flex: 0 0 auto; }
.brand-logo-wrap img { display:block; max-height: 52px; width: auto; object-fit: contain; }
.site-nav { min-width: 0; }
.site-nav a { white-space: nowrap; }
.nav-toggle { flex: 0 0 auto; }

/* Table/card overflow safety */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { min-width: 720px; }
.card, .club-tile, .player-card, .searchable-card, .stat-card, .launch-card, .readiness-card { min-width: 0; }
.card h1, .card h2, .card h3, .club-tile h3, .player-card h3 { overflow-wrap: anywhere; }
.hero, .page-hero, .section { min-width: 0; }
.hero-actions, .status-row { flex-wrap: wrap; }

/* Admin dashboard final polish */
.admin-tool-grid .card { display:flex; flex-direction:column; justify-content:space-between; }
.admin-tool-grid .text-link { margin-top: auto; }
.admin-hero .hero-actions { align-items:center; }
.admin-hero .btn { min-height: 42px; }

/* Footer/legal/support link polish */
.site-footer a, footer a { overflow-wrap: anywhere; }
.footer-links, .legal-links, .support-links { display:flex; flex-wrap:wrap; gap:10px 16px; }

/* Asset fallback/image containment */
.club-logo, .club-crest, .club-crest-small, .player-avatar, .admin-logo-preview, .admin-player-preview { object-fit: contain; }
.admin-logo-preview, .admin-player-preview { max-width: 72px !important; max-height: 72px !important; }

/* Forms final QA */
input, select, textarea, button { max-width: 100%; }
.form-grid, .filter-grid, .scouting-filter-grid { min-width: 0; }

/* Mobile final QA */
@media (max-width: 980px) {
  .site-header { align-items:flex-start; }
  .brand-with-logo { max-width: calc(100% - 56px); }
  .brand-logo-wrap img { max-height: 44px; }
  .site-nav { width: 100%; }
  .site-nav.open { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .site-nav.open a { justify-content:center; text-align:center; white-space: normal; }
  .hero-actions .btn, .admin-hero .btn { flex: 1 1 220px; justify-content:center; }
}

@media (max-width: 620px) {
  .brand-with-logo strong { font-size: 14px; }
  .brand-with-logo small { font-size: 10px; }
  .brand-logo-wrap img { max-height: 38px; }
  .site-nav.open { grid-template-columns: 1fr; }
  .hero-actions .btn, .admin-hero .btn { flex-basis: 100%; }
  table { min-width: 640px; }
}
