:root {
  --msf-navy: #091a33;
  --msf-green: #18a558;
  --msf-light: #f4f7f6;
}
*, *::before, *::after { box-sizing: border-box; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--msf-light); }
.msf-nav { background: var(--msf-navy); border-bottom: 3px solid var(--msf-green); }
.navbar-brand { max-width: calc(100% - 3.5rem); white-space: normal; font-size: clamp(.9rem, 3.5vw, 1.25rem); }
.navbar-brand span { color: #65db91; }
.navbar-toggler { flex: 0 0 auto; }
.dashboard-sidebar { padding-left: 260px; }
.dashboard-sidebar .msf-nav { position: fixed; inset: 0 auto 0 0; z-index: 1030; width: 260px; min-height: 100vh; align-items: flex-start; }
.dashboard-sidebar .msf-nav > .container { display: block; width: 100%; max-width: none; min-height: 100vh; padding: 1.5rem; }
.dashboard-sidebar .navbar-brand { display: block; max-width: 100%; margin: 0 0 2rem; }
.dashboard-sidebar .navbar-toggler { display: none; }
.dashboard-sidebar .navbar-collapse { display: block !important; }
.dashboard-sidebar .navbar-nav { width: 100%; margin-left: 0 !important; flex-direction: column; align-items: stretch; }
.dashboard-sidebar .navbar-nav .nav-link { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.dashboard-sidebar .navbar-nav .dropdown-menu { position: static; width: 100%; margin: 0; padding: 0 0 .35rem .75rem; background: transparent; border: 0; }
.dashboard-sidebar .navbar-nav .dropdown-item { padding: .45rem 0; color: rgba(255,255,255,.75); white-space: normal; }
.dashboard-sidebar .navbar-nav .dropdown-item:hover,
.dashboard-sidebar .navbar-nav .dropdown-item:focus { color: #65db91; background: transparent; }
.page-back-bar { padding-top: .75rem; }
.page-back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--msf-navy); font-weight: 700; text-decoration: none; }
.page-back-link:hover { color: var(--msf-green); }
.page-back-link:focus-visible { outline: 3px solid var(--msf-green); outline-offset: 3px; border-radius: 4px; }
.page-back-arrow { font-size: 1.5rem; line-height: 1; }
.hero-section { background: linear-gradient(110deg, rgba(9,26,51,.82), rgba(9,26,51,.25)), url('../images/home-team.jpeg') center/cover; }
.min-vh-50 { min-height: 50vh; }
.eyebrow { color: #65db91; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.hero-section h1 { font-size: clamp(2rem, 6vw, 3.5rem); overflow-wrap: anywhere; }
.btn-msf { background: var(--msf-green); border-color: var(--msf-green); color: white; font-weight: 700; }
.btn-msf:hover { background: #128849; border-color: #128849; color: white; }
.btn { min-height: 40px; white-space: normal; }
.msf-card { border: 0; border-radius: 12px; box-shadow: 0 8px 24px rgba(9,26,51,.08); }
.card-body, .row > *, .d-flex > * { min-width: 0; }
.card h1, .card h2, .card h3, .card p, .card a { overflow-wrap: anywhere; }
.form-control, .form-select { max-width: 100%; min-width: 0; }
.table-responsive { max-width: 100%; }
.fixture-team { display: flex; align-items: center; justify-content: center; gap: .45rem; overflow-wrap: anywhere; }
.team-logo, .team-logo-placeholder { display: inline-flex; flex: 0 0 2.5rem; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; }
.team-logo { border: 1px solid #dfe6e2; border-radius: .5rem; background: #fff; object-fit: contain; padding: .15rem; }
.team-logo-placeholder { border-radius: 50%; background: var(--msf-navy); color: #fff; font-size: .85rem; }
.member-passport-photo, .member-passport-placeholder { width: 140px; height: 170px; max-width: 100%; border: 1px solid #dfe6e2; border-radius: .5rem; object-fit: cover; }
.member-passport-placeholder { display: inline-flex; align-items: center; justify-content: center; background: #e8eeeb; color: var(--msf-navy); font-size: 3rem; font-weight: 700; }
.team-selection-preview { display: flex; align-items: center; gap: .5rem; min-height: 2.5rem; color: var(--msf-navy); font-weight: 600; }
.team-selection-preview[hidden], .team-logo[hidden], .team-logo-placeholder[hidden] { display: none !important; }
.fixture-summary { cursor: pointer; }
.fixture-summary:focus-visible { outline: 3px solid var(--msf-green); outline-offset: -3px; }
.auth-page { min-height: calc(100vh - 142px); display: grid; align-items: center; padding: 3rem 0; }
.dashboard-page { min-height: calc(100vh - 142px); }
.msf-footer { margin-top: auto; background: var(--msf-navy); color: white; }
.registration-wrap { max-width: 760px; }
.registration-switch { display: flex; padding: 5px; gap: 5px; margin: 0 auto 1rem; border-radius: 14px; background: #e4eae7; }
.registration-toggle { flex: 1; border: 0; border-radius: 10px; padding: .8rem 1rem; color: var(--msf-navy); background: transparent; font-weight: 700; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.registration-toggle:hover { background: rgba(255,255,255,.65); }
.registration-toggle.is-active { color: #fff; background: var(--msf-navy); box-shadow: 0 3px 10px rgba(9,26,51,.18); }
.registration-toggle:focus-visible { outline: 3px solid var(--msf-green); outline-offset: 2px; }
.registration-hint { min-height: 1.5rem; margin-bottom: .75rem; color: #65716c; text-align: center; font-size: .9rem; }
.registration-panel[hidden] { display: none !important; }
@media (max-width: 480px) {
  .registration-toggle { padding: .7rem .45rem; font-size: .9rem; }
}
@media (max-width: 575.98px) {
  main.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .dashboard-page > .container { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .dashboard-page .card-body { padding: 1rem; }
  .dashboard-page form .row.g-2 > .col,
  .dashboard-page form .row.g-2 > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .dashboard-page .d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
  .auth-page { min-height: auto; padding: 2rem 0; }
  .hero-section .min-vh-50 { min-height: 55vh; padding-top: 2rem; padding-bottom: 2rem; }
  .registration-switch { position: sticky; top: .5rem; z-index: 5; }
  .fixture-teams { gap: .35rem; }
  .fixture-score { padding-left: .35rem !important; padding-right: .35rem !important; font-size: 1.1rem; white-space: nowrap; }
}
@media (max-width: 767.98px) {
  .dashboard-sidebar { padding-left: 0; }
  .dashboard-sidebar .msf-nav { position: relative; inset: auto; width: 100%; min-height: 0; align-items: center; }
  .dashboard-sidebar .msf-nav > .container { display: flex; flex-wrap: wrap; min-height: 0; padding: .5rem 1rem; }
  .dashboard-sidebar .navbar-brand { display: inline-block; max-width: calc(100% - 3.5rem); margin: 0; }
  .dashboard-sidebar .navbar-toggler { display: block; }
  .dashboard-sidebar .navbar-collapse { display: none !important; flex-basis: 100%; }
  .dashboard-sidebar .navbar-collapse.show { display: block !important; }
  .dashboard-sidebar .navbar-nav .nav-link { border-bottom: 0; }
}
