:root {
  --bg: #06060c;
  --card: rgba(18, 18, 32, .55);
  --card-hi: rgba(30, 30, 52, .6);
  --line: rgba(255, 255, 255, .08);
  --text: #eeeefc;
  --muted: #8b8ba7;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --lime: #a3e635;
  --amber: #fbbf24;
  --red: #fb7185;
  --radius: 22px;
  --display: "Unbounded", "Segoe UI", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--body);
  font-size: 15px; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ---- фон: северное сияние и зерно ---- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .45;
  mix-blend-mode: screen; animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: radial-gradient(circle, var(--violet), transparent 65%); left: -15vmax; top: -20vmax; }
.aurora i:nth-child(2) { background: radial-gradient(circle, var(--cyan), transparent 65%); right: -20vmax; top: 5vmax; animation-duration: 32s; opacity: .3; }
.aurora i:nth-child(3) { background: radial-gradient(circle, var(--pink), transparent 65%); left: 20vmax; bottom: -30vmax; animation-duration: 38s; opacity: .3; }
.aurora i:nth-child(4) { background: radial-gradient(circle, #4f46e5, transparent 65%); right: 10vmax; bottom: -10vmax; animation-duration: 44s; opacity: .35; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15) rotate(40deg); }
  100% { transform: translate(-6vmax, 10vmax) scale(.95) rotate(-20deg); }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- боковая полоса ---- */
.rail {
  position: fixed; z-index: 5; left: 18px; top: 18px; bottom: 18px; width: 68px; border-radius: 26px;
  background: rgba(14, 14, 26, .6); border: 1px solid var(--line); backdrop-filter: blur(22px);
  display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 26px;
}
.logo span {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-size: 20px;
  background: conic-gradient(from 200deg, var(--violet), var(--cyan), var(--pink), var(--violet));
  box-shadow: 0 0 30px rgba(139, 92, 246, .6); animation: spin-hue 8s linear infinite;
}
@keyframes spin-hue { to { filter: hue-rotate(360deg); } }
.rail nav { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rail nav a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--muted);
  text-decoration: none; font-weight: 700; font-size: 17px; transition: .25s;
}
.rail nav a:hover, .rail nav a.on { color: var(--text); background: rgba(139, 92, 246, .18); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .4); }
.live b { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(163, 230, 53, .7); animation: pulse 2s infinite; }
.live.stale b { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(163, 230, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); } }

main { position: relative; z-index: 2; max-width: 1380px; margin: 0 auto; padding: 22px 28px 40px 116px; display: grid; gap: 20px; }

/* ---- карточки ---- */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(140%); padding: 24px; overflow: hidden;
  opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .18), transparent 35%, transparent 65%, rgba(139, 92, 246, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.kpis .card:nth-child(2) { animation-delay: .08s; } .kpis .card:nth-child(3) { animation-delay: .16s; }
.kpis .card:nth-child(4) { animation-delay: .24s; } .kpis .card:nth-child(5) { animation-delay: .32s; }
.chart-card { animation-delay: .3s; } .split .card { animation-delay: .4s; }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
h2 { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.muted { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---- главный блок ---- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 34px 38px; min-height: 250px; }
.hero.glow::after {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; filter: blur(26px); opacity: .55;
  background: conic-gradient(from var(--a, 0deg), var(--violet), var(--cyan), var(--pink), var(--violet)); animation: orbit 6s linear infinite;
}
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes orbit { to { --a: 360deg; } }
.eyebrow { color: var(--muted); font-weight: 600; letter-spacing: .4px; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 18px; color: #c4c4e0; margin: 14px 0 4px; }
.mega { font-family: var(--display); font-weight: 800; font-size: clamp(54px, 8vw, 104px); line-height: 1; letter-spacing: -2px;
  background: linear-gradient(100deg, #fff 10%, #c4b5fd 40%, #67e8f9 70%, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 40px rgba(139, 92, 246, .35)); }
.mega small { font-size: .42em; margin-left: 10px; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: rgba(163, 230, 53, .14); color: var(--lime); border: 1px solid rgba(163, 230, 53, .3); }
.chip.down { background: rgba(251, 113, 133, .12); color: var(--red); border-color: rgba(251, 113, 133, .3); }
.chip.ghost { background: rgba(255, 255, 255, .05); color: #c9c9e3; border-color: var(--line); }
.hero-right { position: relative; width: 200px; height: 200px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(255, 255, 255, .06); }
.ring-fg { stroke: url(#ringg); stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 8px rgba(34, 211, 238, .6)); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-family: var(--display); font-size: 34px; }
.ring-label span { color: var(--muted); font-size: 12px; }

/* ---- показатели ---- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.kpi { padding: 20px 22px; transition: transform .3s, background .3s; }
.kpi:hover { transform: translateY(-4px); background: var(--card-hi); }
.kpi p { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi h3 { font-family: var(--display); font-size: 25px; font-weight: 700; margin: 10px 0 6px; white-space: nowrap; }
.kpi em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.kpi.warn h3 { color: var(--amber); text-shadow: 0 0 24px rgba(251, 191, 36, .45); }
.kpi.ton h3 { color: var(--cyan); }

/* ---- график ---- */
.legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.dot.games { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.dot.tiktok { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.chart-wrap { position: relative; height: 290px; }
#chart-svg { width: 100%; height: 100%; overflow: visible; }
.area { opacity: 0; animation: fade 1.2s .5s forwards; }
.stroke { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 2.2s .3s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.gridline { stroke: rgba(255, 255, 255, .06); stroke-dasharray: 3 6; }
.axis { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.hover-line { stroke: rgba(255, 255, 255, .35); stroke-dasharray: 3 4; }
.tip { position: absolute; pointer-events: none; padding: 12px 14px; border-radius: 14px; background: rgba(10, 10, 20, .9);
  border: 1px solid var(--line); font-size: 13px; min-width: 150px; transform: translate(-50%, -110%); backdrop-filter: blur(10px); }
.tip b { font-family: var(--display); font-size: 16px; display: block; margin: 4px 0; }
.tip span { color: var(--muted); }

/* ---- боты, хиты, ленты ---- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.bots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bot { position: relative; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: .3s; }
.bot:hover { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .35); transform: translateY(-3px); }
.bot .ico { font-size: 24px; }
.bot h4 { font-size: 14px; margin: 8px 0 2px; }
.bot .sub { color: var(--muted); font-size: 12px; }
.bot .nums { display: flex; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.bot .nums b { display: block; font-family: var(--display); font-size: 17px; color: var(--text); }
.bot .nums .hot b { color: var(--amber); }
.bot .state { position: absolute; top: 16px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: #3f3f5a; }
.bot .state.on { background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2s infinite; }

.top { display: grid; gap: 14px; }
.bar-row { display: grid; gap: 7px; }
.bar-row header { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.bar-row header span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row header b { font-family: var(--display); font-size: 13px; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 14px rgba(34, 211, 238, .5); }

.feed { list-style: none; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.feed::-webkit-scrollbar { width: 6px; } .feed::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 9px; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid transparent; transition: .25s; animation: slide .5s both; }
.feed li:hover { border-color: var(--line); background: rgba(255, 255, 255, .06); }
@keyframes slide { from { opacity: 0; transform: translateX(-10px); } }
.feed .tag { font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 9px; white-space: nowrap; text-transform: uppercase; letter-spacing: .4px; }
.tag.dispute { background: rgba(251, 113, 133, .16); color: var(--red); }
.tag.refund { background: rgba(244, 114, 182, .16); color: var(--pink); }
.tag.call { background: rgba(34, 211, 238, .14); color: var(--cyan); }
.tag.problem { background: rgba(251, 191, 36, .14); color: var(--amber); }
.tag.overdue, .tag.term { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.tag.games { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.tag.tiktok { background: rgba(34, 211, 238, .14); color: var(--cyan); }
.feed .what { min-width: 0; }
.feed .what b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .what span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .when { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.feed .when b { display: block; font-family: var(--display); color: var(--text); font-size: 14px; }
.feed li.seen { opacity: .55; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, 1fr); } .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .rail { display: none; }
  main { padding: 16px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 26px; }
  .hero-right { width: 150px; height: 150px; align-self: center; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 16px; }
  .kpi h3 { font-size: 17px; white-space: normal; }
  .bots { grid-template-columns: 1fr 1fr; }
  .chart-wrap { height: 220px; }
}
@media (max-width: 420px) { .kpis, .bots { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .card { opacity: 1; transform: none; } }
