/* Handball Dynasty 28.0 — Unified Interface */
:root {
  --ui-bg: #f3f5f4;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f8faf9;
  --ui-ink: #12221c;
  --ui-muted: #68756f;
  --ui-line: #dfe6e2;
  --ui-radius: 16px;
  --ui-radius-sm: 10px;
  --ui-shadow: 0 10px 30px rgba(18,34,28,.08);
  --ui-space-1: .5rem;
  --ui-space-2: .75rem;
  --ui-space-3: 1rem;
  --ui-space-4: 1.5rem;
  --ui-space-5: 2rem;
}

.hd-v28 { background: var(--ui-bg); color: var(--ui-ink); }
.hd-v28 .v10-app-shell { background: var(--ui-bg); }
.hd-v28 .v10-leaguebar { border-bottom: 1px solid rgba(255,255,255,.1); }

/* Six-item primary navigation */
.hd-v28 .v10-mainnav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 18px;
  gap: 6px;
}
.hd-v28 .v10-mainnav a {
  min-height: 54px;
  border-radius: 12px 12px 0 0;
  justify-content: center;
  gap: 9px;
}
.hd-v28 .v10-mainnav a.active {
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 -3px 0 var(--club-accent);
}

/* Secondary navigation behaves like one consistent tab bar */
.hd-v28 .v10-subnav { background: var(--ui-surface); border-bottom: 1px solid var(--ui-line); }
.hd-v28 .v10-subnav-inner {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 10px 18px;
  max-width: 1180px;
  margin: 0 auto;
}
.hd-v28 .v10-subnav a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ui-muted);
  font-weight: 700;
  border: 1px solid transparent;
}
.hd-v28 .v10-subnav a:hover { background: var(--ui-surface-soft); color: var(--ui-ink); }
.hd-v28 .v10-subnav a.active {
  background: var(--ui-ink);
  color: #fff;
  border-color: var(--ui-ink);
}

.hd-v28 .v10-workspace { max-width: 1180px; margin: 0 auto; padding: 18px 18px 90px; }
.hd-v28 .v10-pagehero {
  min-height: 168px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--ui-shadow);
}
.hd-v28 .v10-pagehero-content h1 { font-size: clamp(1.8rem,3vw,2.7rem); }
.hd-v28 .v10-pagehero-content p { max-width: 560px; }

/* Unified surfaces */
.hd-v28 :where(.panel,.card,.box,.widget,.section-card,.dashboard-card,.management-card,.v23-card,.v24-card,.legacy-card) {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-line);
  box-shadow: 0 4px 16px rgba(18,34,28,.05);
}
.hd-v28 :where(.panel,.card,.box,.widget,.section-card,.dashboard-card) { background: var(--ui-surface); }
.hd-v28 :where(.grid,.cards,.dashboard-grid,.stats-grid) { gap: 16px; }
.hd-v28 :where(h2,h3) { letter-spacing: -.02em; }
.hd-v28 :where(p,small,.muted) { line-height: 1.55; }

/* One button language */
.hd-v28 :where(button,.button,.primary-button,.secondary-button,.danger-button,input[type=submit]) {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.hd-v28 :where(button,.button,.primary-button,input[type=submit]):hover { transform: translateY(-1px); }
.hd-v28 :where(.primary-button,button.primary,input[type=submit]) {
  background: var(--club-accent);
  color: #102018;
  border-color: transparent;
}
.hd-v28 .secondary-button { background: var(--ui-surface); color: var(--ui-ink); border: 1px solid var(--ui-line); }
.hd-v28 .danger-button { background: #b42318; color: #fff; border-color: transparent; }

/* One table language */
.hd-v28 table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); overflow: hidden; }
.hd-v28 thead th { background: var(--ui-surface-soft); color: var(--ui-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--ui-line); }
.hd-v28 :where(th,td) { padding: 12px 14px; }
.hd-v28 tbody tr:not(:last-child) td { border-bottom: 1px solid #edf1ef; }
.hd-v28 tbody tr:hover td { background: #fbfcfb; }

/* Forms */
.hd-v28 :where(input,select,textarea) { border-radius: 10px; border: 1px solid var(--ui-line); background: #fff; min-height: 42px; }
.hd-v28 :where(input,select,textarea):focus { outline: 3px solid color-mix(in srgb, var(--club-accent) 28%, transparent); border-color: var(--club-accent); }

/* Compact dashboard: lower visual noise and clearer order */
.hd-v28.dashboard .v10-pagehero { min-height: 145px; }
.hd-v28.dashboard main section + section { margin-top: 18px; }
.hd-v28 .flash { border-radius: 12px; box-shadow: var(--ui-shadow); }

@media (max-width: 920px) {
  .hd-v28 .v10-mainnav { grid-template-columns: repeat(3,1fr); }
  .hd-v28 .v10-mainnav a { border-radius: 10px; min-height: 48px; }
  .hd-v28 .v10-workspace { padding-inline: 12px; }
  .hd-v28 .v10-pagehero { border-radius: 15px; min-height: 145px; }
}
@media (max-width: 680px) {
  .hd-v28 .v10-mainnav { display: none; }
  .hd-v28 .v10-subnav-inner { padding-inline: 12px; }
  .hd-v28 .v10-pagehero-meta { display: none; }
  .hd-v28 :where(th,td) { padding: 10px 9px; }
}

/* 28.1 — centered, symmetrical navigation */
.hd-v28 .v10-mainnav {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--v10-forest);
}
.hd-v28 .v10-mainnav-inner,
.hd-v28 .v28-footer-nav .v10-mainnav-inner {
  width: min(100%, 1180px);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  box-sizing: border-box;
}
.hd-v28 .v10-mainnav-inner a,
.hd-v28 .v28-footer-nav a {
  min-width: 0;
  min-height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #cbd3cf;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}
.hd-v28 .v10-mainnav-inner a:hover,
.hd-v28 .v28-footer-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.05);
}
.hd-v28 .v10-mainnav-inner a.active,
.hd-v28 .v28-footer-nav a.active {
  color: #fff;
  border-bottom-color: var(--club-accent);
  background: rgba(255,255,255,.07);
  box-shadow: none;
}
.hd-v28 .v10-subnav-inner {
  width: min(100%, 1180px);
  min-height: 56px;
  margin: 0 auto;
  padding: 0 18px;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
  box-sizing: border-box;
  scrollbar-width: none;
}
.hd-v28 .v10-subnav-inner::-webkit-scrollbar { display: none; }
.hd-v28 .v10-subnav a {
  min-height: 56px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
}
.hd-v28 .v10-subnav a:hover {
  background: transparent;
  color: var(--ui-ink);
}
.hd-v28 .v10-subnav a.active {
  color: var(--ui-ink);
  background: transparent;
  border-color: var(--club-accent);
}
.hd-v28 .v28-footer-nav {
  width: 100%;
  margin-top: 28px;
  background: var(--v10-forest);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hd-v28 .v28-footer-nav svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

@media (max-width: 920px) {
  .hd-v28 .v10-mainnav-inner,
  .hd-v28 .v28-footer-nav .v10-mainnav-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 8px 12px;
  }
  .hd-v28 .v10-mainnav-inner a,
  .hd-v28 .v28-footer-nav a {
    min-height: 46px;
    border-radius: 8px;
    border-bottom-width: 2px;
  }
}
@media (max-width: 850px) {
  .hd-v28 .v10-mainnav,
  .hd-v28 .v28-footer-nav { display: none !important; }
  .hd-v28 .v10-subnav-inner {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    gap: 8px;
  }
  .hd-v28 .v10-subnav a { min-height: 44px; }
}

/* 28.2 — every navigation level is centered consistently */
.hd-v28 .v10-mainnav,
.hd-v28 .v28-footer-nav,
.hd-v28 .v10-subnav {
  width: 100% !important;
}

.hd-v28 .v10-mainnav-inner,
.hd-v28 .v28-footer-nav .v10-mainnav-inner {
  margin-inline: auto !important;
  justify-content: center !important;
}

/* The scroll container stays full width. The menu itself becomes max-content,
   so short menus are truly centered and long menus remain safely scrollable. */
.hd-v28 .v10-subnav {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}
.hd-v28 .v10-subnav::-webkit-scrollbar { display: none !important; }
.hd-v28 .v10-subnav-inner {
  display: flex !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 18px !important;
  justify-content: center !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
}

/* Center all in-page tab menus as well. */
.hd-v28 :is(
  .club-hub-tabs,
  .management-tabs,
  .living-tabs,
  .legacy-tabs,
  .online-tabs,
  .tm14-tabs,
  .dna15-nav
) {
  justify-content: center !important;
}

.hd-v28 :is(
  .club-hub-tabs,
  .management-tabs,
  .living-tabs,
  .legacy-tabs,
  .online-tabs,
  .tm14-tabs
) > a {
  text-align: center !important;
}

@media (max-width: 850px) {
  .hd-v28 .v10-subnav-inner {
    width: max-content !important;
    min-width: 100% !important;
    justify-content: center !important;
    padding-inline: 12px !important;
  }

  .hd-v28 :is(
    .club-hub-tabs,
    .management-tabs,
    .living-tabs,
    .legacy-tabs,
    .online-tabs,
    .tm14-tabs,
    .dna15-nav
  ) {
    justify-content: center !important;
  }
}
