:root{
  --bg:#24263a;
  --bg2:#2a2d44;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.10);
  --text:#f3f4f6;
  --muted:rgba(255,255,255,.72);
  --accent:#7c5cff;
  --gold:#ffd86b;
  --danger:#ff3b5c;
  --shadow:0 18px 50px rgba(0,0,0,.35);
  --radius:18px;
}

html[data-theme="light"]{
  --bg:#f2f3f7;
  --bg2:#fff;
  --card:rgba(0,0,0,.04);
  --card2:rgba(0,0,0,.06);
  --border:rgba(0,0,0,.10);
  --text:#12131a;
  --muted:rgba(0,0,0,.70);
  --shadow:0 18px 50px rgba(0,0,0,.12);
}

*{box-sizing:border-box}

/* ✅ ФОН: стабільний, без color-mix (без полос) */
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(124,92,255,.22), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(255,216,107,.12), transparent 40%),
    linear-gradient(180deg, #1e2136 0%, #1b1e31 45%, #171a2a 100%);
}

.container{max-width:1180px;margin:0 auto;padding:18px}

/* ✅ TOPBAR: теж без color-mix, стабільний */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;

  width: 100vw;      /* ✅ важливо */
  left: 0;           /* ✅ важливо */
  right: 0;          /* ✅ важливо */

  background: rgba(20, 22, 36, .72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);

  padding: 10px 24px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
/* логотип ліворуч */
.brand{
  justify-self: start;
}

/* меню строго по центру */
.nav{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

/* кнопки строго праворуч */
.actions{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}
.nav{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.actions{
  justify-self: end;   /* ✅ притискає до правого краю grid */
  display:flex;
  align-items:center;
  gap:10px;
}
/* =========================
   BRAND (тільки логотип)
========================= */
.brand{
  display:flex;
  align-items:center;
  text-decoration:none;
  flex: 0 0 auto;
  gap:0;
}

/* Працює і для class="logo", і для class="brand-logo" */
.brand .logo,
.brand .brand-logo{
  height: 40px;
  width: auto;
  display:block;
  object-fit: contain;
}

/* Повністю ховаємо будь-який текст всередині бренду */
.brand .brand-text,
.brand span,
.brand b{
  display:none !important;
}

.nav{
  display:flex;
  align-items:center;
  gap:14px;
  flex:1 1 auto;
  justify-content:center;
}

.nav a{
  color:var(--muted);
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
}

.nav a.active{
  color:var(--text);
  border-color:rgba(124,92,255,.75);
  box-shadow:0 0 0 2px rgba(124,92,255,.22);
}

.nav a:hover{color:var(--text)}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:max-content;
}

.btn{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
}

.btn:hover{background:var(--card2)}

.btn.primary{
  background: rgba(124,92,255,.32);
  border-color: rgba(124,92,255,.55);
}

.btn.primary:hover{
  background: rgba(124,92,255,.42);
}

.btn.ghost{background:transparent}

.burger{display:none}

/* ✅ HERO: прибрав color-mix, щоб не давало “смуги” */
.hero{
  border:1px solid var(--border);
  background:
    radial-gradient(circle at 20% 0%, rgba(124,92,255,.18), transparent 45%),
    linear-gradient(180deg, var(--bg2) 0%, rgba(124,92,255,.10) 100%);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.h1{font-size:42px;margin:6px 0;letter-spacing:.2px}
.h1 .gold{color:var(--gold)}

.sub{color:var(--muted);margin:0 0 14px}

.toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}

.input,.select{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  outline:none;
}

.input{min-width:240px;flex:1 1 240px}
.select{min-width:180px}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--muted);
}

.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:18px 0 10px;
}

.section-title h2{margin:0;font-size:18px}
.section-title .muted{color:var(--muted);font-size:13px}

.grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.card{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 12px 35px rgba(0,0,0,.25);
  transition:transform .15s ease,background .15s ease;
}

.card:hover{
  transform:translateY(-2px);
  background:var(--card2);
}

/* ✅ THUMB: без color-mix */
.card .thumb{
  height:150px;
  background: linear-gradient(135deg, rgba(124,92,255,.22), transparent 60%);
  position:relative;
}

.badge-live{
  position:absolute;
  top:10px;
  left:10px;
  background: rgba(255,59,92,.78);
  border:1px solid rgba(255,59,92,.55);
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.dot{
  width:8px;
  height:8px;
  background:#fff;
  border-radius:50%;
  opacity:.9;
  animation:pulse 1.2s infinite;
}

@keyframes pulse{
  0%{transform:scale(1);opacity:.7}
  50%{transform:scale(1.35);opacity:1}
  100%{transform:scale(1);opacity:.7}
}

body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);

  /* базовий фон */
  background:
    radial-gradient(circle at 18% 0%, rgba(124,92,255,.22), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(255,216,107,.12), transparent 40%),
    linear-gradient(180deg, #1e2136 0%, #1b1e31 45%, #171a2a 100%);

  /* важливо для псевдоелемента */
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);

  background:
    radial-gradient(circle at 18% 0%, rgba(124,92,255,.22), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(255,216,107,.12), transparent 40%),
    linear-gradient(180deg, #1e2136 0%, #1b1e31 45%, #171a2a 100%);

  min-height:100vh;

  /* ✅ ОЦЕ ГОЛОВНЕ */
  display:flex;
  flex-direction:column;
}

main.container{
  flex:1;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.pfp{
  width:40px;
  height:40px;
  border-radius:12px;
  object-fit:cover;
  border:1px solid var(--border);
}

.name{font-weight:900}

.meta{color:var(--muted);font-size:12px;margin-top:4px}

.kpi{color:var(--gold);font-weight:900}

a.link{color:var(--text);text-decoration:none}
a.link:hover{text-decoration:underline}

/* ✅ FOOTER: без color-mix */
.footer{
  margin-top:24px;
  border-top:1px solid var(--border);
  background: rgba(20, 22, 36, .72);
}

.footer-inner{
  max-width:1180px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.muted{color:var(--muted)}

.panel{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--radius);
  padding:14px;
}

.admin-only{display:none}

@media (max-width:980px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nav{display:none}
  .burger{display:inline-flex}

  .nav.open{
    display:flex;
    position:absolute;
    left:18px;
    right:18px;
    top:62px;
    flex-direction:column;
    background: rgba(20, 22, 36, .92);
    border:1px solid var(--border);
    padding:10px;
    border-radius:16px;
  }
}

.muted a{
  color:inherit;
  text-decoration:none;
}

.muted a:hover{
  text-decoration:underline;
}