/*
 * BMC v88 — header-only dark/light theme restoration.
 * Scope is deliberately limited to the public capsule header.
 * No homepage, tournament, squad, auction, SMTP or database styles are changed.
 */

/* DARK / SYSTEM-DARK: remove the ash-grey capsule and restore clean black glass. */
html:not([data-theme="light"]) .topbar,
html[data-theme="dark"] .topbar{
  background:linear-gradient(180deg,rgba(1,3,7,.96),rgba(1,3,7,.78))!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:blur(18px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(135%)!important;
}

html:not([data-theme="light"]) .topbar .topbar-inner,
html:not([data-theme="light"]) .topbar.bmc-viewport-fixed .topbar-inner,
html:not([data-theme="light"]) body>.topbar .topbar-inner,
html[data-theme="dark"] .topbar .topbar-inner,
html[data-theme="dark"] .topbar.bmc-viewport-fixed .topbar-inner,
html[data-theme="dark"] body>.topbar .topbar-inner{
  background:linear-gradient(135deg,rgba(4,7,13,.96),rgba(1,3,7,.94))!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 16px 40px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.065)!important;
  backdrop-filter:blur(22px) saturate(145%)!important;
  -webkit-backdrop-filter:blur(22px) saturate(145%)!important;
}

html:not([data-theme="light"]) .topbar .nav,
html[data-theme="dark"] .topbar .nav{
  background:rgba(0,2,7,.86)!important;
  border-color:rgba(255,255,255,.08)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 9px 24px rgba(0,0,0,.28)!important;
}

html:not([data-theme="light"]) .topbar .brand,
html:not([data-theme="light"]) .topbar .header-actions,
html[data-theme="dark"] .topbar .brand,
html[data-theme="dark"] .topbar .header-actions{
  background:transparent!important;
  box-shadow:none!important;
}

html:not([data-theme="light"]) .topbar .icon-btn.mobile-menu,
html:not([data-theme="light"]) .topbar .notification-bell,
html:not([data-theme="light"]) .topbar .account-chip,
html:not([data-theme="light"]) .topbar .header-login-btn,
html[data-theme="dark"] .topbar .icon-btn.mobile-menu,
html[data-theme="dark"] .topbar .notification-bell,
html[data-theme="dark"] .topbar .account-chip,
html[data-theme="dark"] .topbar .header-login-btn{
  background:rgba(0,2,7,.78)!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 8px 18px rgba(0,0,0,.26)!important;
}

html:not([data-theme="light"]) .topbar .account-chip span,
html[data-theme="dark"] .topbar .account-chip span{
  color:#fff!important;
}

/* LIGHT: restore the original clean white capsule instead of carrying dark/grey overrides across themes. */
html[data-theme="light"] .topbar{
  background:linear-gradient(180deg,rgba(248,250,253,.96),rgba(248,250,253,.80))!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:blur(18px) saturate(125%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(125%)!important;
}

html[data-theme="light"] .topbar .topbar-inner,
html[data-theme="light"] .topbar.bmc-viewport-fixed .topbar-inner,
html[data-theme="light"] body>.topbar .topbar-inner{
  background:rgba(255,255,255,.94)!important;
  border:1px solid rgba(15,23,42,.10)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.13),inset 0 1px 0 rgba(255,255,255,.95)!important;
  backdrop-filter:blur(22px) saturate(130%)!important;
  -webkit-backdrop-filter:blur(22px) saturate(130%)!important;
}

html[data-theme="light"] .topbar .nav{
  background:#f4f6fa!important;
  border-color:rgba(15,23,42,.09)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.92)!important;
}

html[data-theme="light"] .topbar .nav a{
  color:#4b5565!important;
}

html[data-theme="light"] .topbar .nav a:hover{
  color:#111827!important;
  background:rgba(15,23,42,.06)!important;
  border-color:rgba(15,23,42,.07)!important;
}

html[data-theme="light"] .topbar .nav a.active{
  color:#fff!important;
  background:linear-gradient(135deg,#ef1737,#a90b24)!important;
  border-color:rgba(239,23,55,.46)!important;
}

html[data-theme="light"] .topbar .icon-btn.mobile-menu,
html[data-theme="light"] .topbar .notification-bell,
html[data-theme="light"] .topbar .account-chip,
html[data-theme="light"] .topbar .header-login-btn{
  background:#fff!important;
  border-color:rgba(15,23,42,.11)!important;
  color:#111827!important;
  box-shadow:0 5px 14px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.95)!important;
}

html[data-theme="light"] .topbar .account-chip span{
  color:#111827!important;
}

/* Keep the existing animated BMC mark readable in both themes. */
html[data-theme="dark"] .topbar .brand span b::after,
html:not([data-theme="light"]) .topbar .brand span b::after{
  background:linear-gradient(90deg,#fff 0%,#fff 32%,#ff3141 48%,#fff 64%,#fff 100%)!important;
  background-size:240% 100%!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  -webkit-text-fill-color:transparent!important;
}

html[data-theme="light"] .topbar .brand span b::after{
  background:linear-gradient(90deg,#111827 0%,#111827 32%,#e50914 48%,#111827 64%,#111827 100%)!important;
  background-size:240% 100%!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  -webkit-text-fill-color:transparent!important;
}
