/* Baltrix – Brand SUPER Pack (Arena Gold)
   Adds stronger “sport-tech premium” look:
   - richer topbar glass + active underline
   - better page spacing + container spotlight
   - devices grid + premium item cards
   - badges tuned for dark theme
   - subtle animated aurora + grain (still CSP-safe)
*/

/* -------- Background: aurora + subtle grain -------- */
body.bg::before,
body.bx-login-body::before,
body.training::before{
  /* keep the base stack from brand.enhance + add a very subtle grain layer */
  background:
    radial-gradient(1200px 800px at 50% -220px, rgba(78,93,163,.26), transparent 55%),
    radial-gradient(900px 700px at 85% 15%, rgba(216,184,106,.12), transparent 60%),
    radial-gradient(700px 520px at 15% 25%, rgba(255,222,120,.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.20)),
    url("./hero.webp"),
    /* grain */
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 1px, transparent 1px 9px);
  background-size: auto, auto, auto, auto, cover, auto;
  background-position: 50% -220px, 85% 15%, 15% 25%, 0 0, center, 0 0;
  background-blend-mode: screen, screen, screen, normal, normal, overlay;
  animation: bx-aurora 18s ease-in-out infinite alternate;
}

@keyframes bx-aurora{
  0%{ filter: saturate(1.05) contrast(1.03); }
  100%{ filter: saturate(1.12) contrast(1.05); }
}

/* -------- Container: add spotlight behind content -------- */
body.bg #app{
  position: relative;
}
body.bg #app::before{
  content:"";
  position: absolute;
  inset: -60px -20px auto -20px;
  height: 420px;
  pointer-events: none;
  background: radial-gradient(700px 320px at 35% 30%, rgba(240,215,138,.12), transparent 60%);
  filter: blur(0.2px);
  opacity: .9;
}

/* -------- Topbar: richer glass + active indicator -------- */
body.bg .topbar{
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,.14);
  box-shadow: 0 18px 70px rgba(0,0,0,.46);
}
body.bg .brand-logo{
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.40)) drop-shadow(0 0 18px rgba(216,184,106,.12));
}
body.bg .brand-name{
  font-weight: 900;
  letter-spacing: .45px;
  text-transform: none;
}

/* Pill links: add gold underline on active */
body.bg .nav .nav-link,
body.bg .ant-nav-link{
  position: relative;
  overflow: hidden;
}
body.bg .nav .nav-link::after,
body.bg .ant-nav-link::after{
  content:"";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(240,215,138,.85), transparent);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .15s ease, transform .15s ease;
}
body.bg .nav .nav-link.active::after,
body.bg .ant-nav-link.active::after{
  opacity: .9;
  transform: translateY(0);
}

/* Hover shimmer (subtle) */
@media (hover:hover){
  body.bg .nav .nav-link:hover,
  body.bg .ant-nav-link:hover{
    box-shadow: 0 0 0 1px rgba(240,215,138,.10), 0 16px 40px rgba(0,0,0,.35);
  }
}

/* -------- Devices: make the grid intentional -------- */
body.bg .grid,
body.bg .list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* Some pages wrap list inside another container; keep it nice */
body.bg .card > .grid,
body.bg .card > .list{
  margin-top: 12px;
}

/* -------- Device item cards: premium border + hover lift -------- */
body.bg .item{
  position: relative;
  border-radius: 18px;
  padding: 14px 14px;
  border: 1px solid rgba(148,163,184,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028));
  box-shadow: 0 14px 55px rgba(0,0,0,.40);
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

/* gradient “edge” */
body.bg .item::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(240,215,138,.40), rgba(78,93,163,.20), rgba(240,215,138,.10));
  -webkit-mask: 
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events:none;
  opacity: .85;
}

/* ambient glow */
body.bg .item::after{
  content:"";
  position:absolute;
  inset:-40px -30px auto -30px;
  height: 160px;
  background: radial-gradient(240px 120px at 40% 30%, rgba(240,215,138,.18), transparent 70%);
  opacity: .55;
  pointer-events:none;
  filter: blur(1px);
}

body.bg .item:hover{
  transform: translateY(-2px);
  border-color: rgba(240,215,138,.18);
  box-shadow: 0 22px 80px rgba(0,0,0,.52);
}

body.bg .item .fw-600{
  font-size: 16px;
  letter-spacing: .15px;
}
body.bg .item .muted{
  color: rgba(234,240,255,.55);
}

/* Right column spacing */
body.bg .item .right{
  align-items: center;
  justify-content: flex-end;
}

/* -------- Badges tuned for dark theme -------- */
body.bg .badge{
  padding: 6px 10px;
  display: inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: lowercase;
}

body.bg .badge .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}

body.bg .badge.online{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
  color: rgba(220,252,231,.92);
}
body.bg .badge.online .dot{ background: rgb(34,197,94); }

body.bg .badge.offline{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.32);
  color: rgba(254,226,226,.92);
}
body.bg .badge.offline .dot{ background: rgb(239,68,68); }

body.bg .badge.unknown{
  background: rgba(148,163,184,.10);
  border-color: rgba(148,163,184,.22);
  color: rgba(226,232,240,.92);
}
body.bg .badge.unknown .dot{ background: rgb(148,163,184); }

/* -------- Buttons: make primary actions pop a bit more -------- */
body.bg #btn-reload{
  border-color: rgba(240,215,138,.24) !important;
  background: linear-gradient(180deg, rgba(240,215,138,.18), rgba(240,215,138,.08)) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset, 0 18px 45px rgba(0,0,0,.40);
}
body.bg #btn-reload:hover{
  border-color: rgba(240,215,138,.32) !important;
  background: linear-gradient(180deg, rgba(240,215,138,.22), rgba(240,215,138,.10)) !important;
}

/* Settings buttons: slightly cleaner */
body.bg .item .btn{
  padding: 8px 12px;
  min-height: 36px;
}

/* -------- Footer line polish -------- */
body.bg footer,
body.bg .footer,
body.bg .copyright{
  opacity: .75;
}


/* -------- Login: hero header + gradient title -------- */
.bx-login-card{
  position: relative;
  overflow: hidden;
}
.bx-login-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(240,215,138,.40), rgba(78,93,163,.20), rgba(240,215,138,.12));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events:none;
  opacity: .85;
}
.bx-login-card::after{
  content:"";
  position:absolute;
  inset:-80px -60px auto -60px;
  height: 260px;
  background: radial-gradient(400px 200px at 45% 30%, rgba(240,215,138,.22), transparent 70%);
  opacity: .6;
  pointer-events:none;
  filter: blur(1px);
}
.bx-login-title{
  background: linear-gradient(90deg, rgba(240,215,138,1), rgba(234,240,255,.95));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .2px;
}

/* Inputs: slightly clearer focus ring */
.bx-input:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus{
  outline: none;
  box-shadow: 0 0 0 1px rgba(240,215,138,.22), 0 0 0 4px rgba(240,215,138,.10);
  border-color: rgba(240,215,138,.28) !important;
}

/* -------- Subtle page transitions (no JS) -------- */
#app > section{
  animation: bx-fade-up .18s ease-out both;
}
@keyframes bx-fade-up{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: translateY(0); }
}


/* -------- Headings: more “premium” -------- */
body.bg #app h1{
  font-size: 34px;
  letter-spacing: .2px;
  margin: 22px 0 10px;
  background: linear-gradient(90deg, rgba(240,215,138,1), rgba(234,240,255,.94));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.bg .section-title{
  font-weight: 900;
  letter-spacing: .2px;
}
