/* Handball Dynasty 11.1 – Horizontal navigation & unified vertical content */
:root{--v11-content:1480px;--v11-page-gap:18px}

/* Global shell reset */
body.hd-v10{overflow-x:hidden!important}
.v10-app-shell{width:100%!important;min-width:0!important}

/* Main navigation: always horizontally aligned on desktop */
.v10-mainnav{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
  white-space:nowrap!important;
}
.v10-mainnav::-webkit-scrollbar{display:none!important}
.v10-mainnav>a{
  display:inline-flex!important;
  flex:0 0 auto!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:112px!important;
  width:auto!important;
  white-space:nowrap!important;
}

/* Context menu: horizontally aligned below main menu */
.v10-subnav{width:100%!important;overflow:hidden!important}
.v10-subnav-inner{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  width:100%!important;
  max-width:var(--v11-content)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
  white-space:nowrap!important;
}
.v10-subnav-inner::-webkit-scrollbar{display:none!important}
.v10-subnav a{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;white-space:nowrap!important}

/* One consistent content column */
.v10-workspace{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:var(--v11-content)!important;
  gap:var(--v11-page-gap)!important;
}
.v10-workspace>*,
.v10-workspace>section,
.v10-workspace>nav,
.v10-workspace>.card,
.v10-workspace>.panel,
.v10-workspace>.flash{
  width:100%!important;
  max-width:none!important;
  margin-top:0!important;
  margin-left:0!important;
  margin-right:0!important;
}
.v10-pagehero,.v11-portal-hero{margin-bottom:0!important}

/* Stack all major page regions vertically */
.dashboard35-main,
.dashboard35-lower,
.market-v32-dashboard,
.market-v32-side,
.matchday33-grid,
.matchday33-analysis,
.player-v32-grid,
.player-history-v41,
.club-hub-grid,
.management-grid,
.budget-layout,
.legacy-grid,
.museum-layout,
.mx-report-grid,
.mx-live-layout,
.online-layout,
.world-layout,
.friendly-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  gap:var(--v11-page-gap)!important;
}

/* Uniform cards and sections */
.v10-workspace .card,
.v10-workspace .panel,
.v10-workspace [class*="-panel"],
.v10-workspace [class*="-card"]{
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Tables always fill the content width */
.table-wrap,.tablewrap,.modern-table-wrap,.league42-table-shell,.history-table-v41{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
}

/* KPI and compact item rows may remain horizontal */
.dashboard35-kpis,.management-kpis,.club-hub-kpis,.legacy-kpis,.mx-kpis,.squad-v32-summary,.legacy-record-strip{
  width:100%!important;
}

/* Desktop navigation density */
@media(min-width:851px) and (max-width:1180px){
  .v10-mainnav{justify-content:flex-start!important;padding-inline:12px!important}
  .v10-mainnav>a{min-width:104px!important;padding-inline:13px!important}
}

/* Mobile keeps bottom navigation; subnav remains horizontal */
@media(max-width:850px){
  .v10-mainnav{display:none!important}
  .v10-workspace{gap:14px!important}
  .v10-subnav-inner{justify-content:flex-start!important}
}

@media(max-width:640px){
  .dashboard35-kpis,.management-kpis,.club-hub-kpis,.legacy-kpis,.mx-kpis,.squad-v32-summary,.legacy-record-strip{
    grid-template-columns:1fr!important;
  }
}
