/* GrandStat Panel — поверх Tailwind */

[x-cloak] { display: none !important; }

html, body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }

/* ===== Animated background ===== */
.bg-aurora {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 10%, rgba(139, 92, 246, 0.30), transparent 60%),
    radial-gradient(35% 30% at 85% 15%, rgba(217, 70, 239, 0.22), transparent 60%),
    radial-gradient(40% 35% at 60% 90%, rgba(34, 211, 238, 0.20), transparent 60%);
  filter: blur(40px);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-2%, 2%) scale(1.05); }
  100% { transform: translate(2%, -2%) scale(1.02); }
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 75%);
}

/* ===== Logo mark ===== */
.logo-mark {
  position: relative;
  width: 88px; height: 88px;
  display: grid; place-items: center;
}
.logo-mark--small { width: 36px; height: 36px; }
.logo-ring {
  position: absolute; inset: 0;
  border-radius: 22px;
  background: conic-gradient(from 90deg, #8b5cf6, #d946ef, #22d3ee, #8b5cf6);
  filter: blur(0.5px);
  animation: spin 8s linear infinite;
  mask: radial-gradient(circle, transparent 55%, #000 56%);
  -webkit-mask: radial-gradient(circle, transparent 55%, #000 56%);
}
.logo-mark--small .logo-ring { border-radius: 10px; }
.logo-core {
  position: relative;
  width: 76%; height: 76%;
  border-radius: 18px;
  background: linear-gradient(180deg, #11162a, #0b0f1a);
  display: grid; place-items: center;
  font-weight: 800; color: #fff;
  font-size: 26px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 8px 30px -10px rgba(139,92,246,0.6);
}
.logo-mark--small .logo-core { font-size: 12px; border-radius: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Splash (animated brand intro) ===== */
.splash {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  z-index: 60;
  background:
    radial-gradient(60% 80% at 50% 40%, #0d1226 0%, #06080f 60%, #04060c 100%);
  overflow: hidden;
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
.splash.hidden {
  opacity: 0; pointer-events: none;
  transform: scale(1.04);
  filter: blur(10px);
}

/* — фоновое цветное «дыхание» — */
.splash-aura {
  position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(35% 30% at 25% 30%, rgba(139, 92, 246, 0.45), transparent 60%),
    radial-gradient(30% 28% at 78% 25%, rgba(217,  70, 239, 0.40), transparent 60%),
    radial-gradient(40% 35% at 55% 80%, rgba( 34, 211, 238, 0.35), transparent 60%);
  filter: blur(60px);
  animation: splashAura 14s ease-in-out infinite alternate;
}
@keyframes splashAura {
  0%   { transform: translate(0,0)   scale(1);   opacity: .85; }
  50%  { transform: translate(-3%,2%) scale(1.08); opacity: 1; }
  100% { transform: translate(2%,-2%) scale(1.04); opacity: .9; }
}
.splash-grid {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 75%);
  animation: splashGridShift 12s linear infinite;
}
@keyframes splashGridShift {
  to { background-position: 36px 36px, 36px 36px; }
}

/* — мерцающие частицы — */
.splash-particles {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; pointer-events: none;
}
.splash-particles span {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  animation: splashTwinkle 4s ease-in-out infinite;
}
.splash-particles span:nth-child(1)  { top: 12%; left: 18%; animation-delay: .0s;  }
.splash-particles span:nth-child(2)  { top: 24%; left: 82%; animation-delay: .4s;  width: 3px; height: 3px; }
.splash-particles span:nth-child(3)  { top: 70%; left:  9%; animation-delay: .8s;  }
.splash-particles span:nth-child(4)  { top: 88%; left: 78%; animation-delay: 1.2s; width: 5px; height: 5px; }
.splash-particles span:nth-child(5)  { top:  8%; left: 50%; animation-delay: 1.6s; width: 3px; height: 3px; }
.splash-particles span:nth-child(6)  { top: 60%; left: 92%; animation-delay: 2.0s; }
.splash-particles span:nth-child(7)  { top: 35%; left:  6%; animation-delay: 2.4s; width: 5px; height: 5px; }
.splash-particles span:nth-child(8)  { top: 50%; left: 70%; animation-delay: 2.8s; width: 3px; height: 3px; }
.splash-particles span:nth-child(9)  { top: 18%; left: 36%; animation-delay: .2s;  }
.splash-particles span:nth-child(10) { top: 80%; left: 40%; animation-delay: .6s;  width: 3px; height: 3px; }
.splash-particles span:nth-child(11) { top: 42%; left: 22%; animation-delay: 1.0s; }
.splash-particles span:nth-child(12) { top: 55%; left: 58%; animation-delay: 1.4s; width: 5px; height: 5px; }
.splash-particles span:nth-child(13) { top: 92%; left: 25%; animation-delay: 1.8s; }
.splash-particles span:nth-child(14) { top:  4%; left: 70%; animation-delay: 2.2s; width: 3px; height: 3px; }
.splash-particles span:nth-child(15) { top: 30%; left: 60%; animation-delay: 2.6s; }
.splash-particles span:nth-child(16) { top: 66%; left: 42%; animation-delay: 3.0s; width: 4px; height: 4px; }
.splash-particles span:nth-child(17) { top: 14%; left: 92%; animation-delay: 3.4s; }
.splash-particles span:nth-child(18) { top: 78%; left: 60%; animation-delay: 3.8s; width: 3px; height: 3px; }
@keyframes splashTwinkle {
  0%, 100% { opacity: 0; transform: scale(.6); }
  50%      { opacity: .9; transform: scale(1.2); }
}

/* — центрированная обёртка над контентом сплэша — */
.splash-body {
  position: absolute;
  top: 50%; left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  z-index: 2;
  display: -webkit-flex; display: flex;
  flex-direction: column;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  gap: 0;
  width: 320px;
  pointer-events: none;
}

/* — центральная сцена с логотипом — */
.splash-stage {
  position: relative;
  flex-shrink: 0;
  width: 240px; height: 240px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  animation: splashStageIn .9s cubic-bezier(.2,.9,.2,1.1) both;
}
@keyframes splashStageIn {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: scale(1);  }
}

/* пульсирующие радиусы вокруг логотипа */
.splash-pulse {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.45);
  opacity: 0;
  animation: splashPulseRing 3s ease-out infinite;
}
.splash-pulse--1 { animation-delay: 0s;   }
.splash-pulse--2 { animation-delay: 1s;   border-color: rgba(217, 70, 239, 0.45); }
.splash-pulse--3 { animation-delay: 2s;   border-color: rgba( 34,211,238, 0.45); }
@keyframes splashPulseRing {
  0%   { transform: scale(.45); opacity: .9; }
  80%  { opacity: .15; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* кольца */
.splash-ring { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.splash-ring svg { width: 100%; height: 100%; }
.splash-ring--1 { animation: splashSpin  16s linear infinite; }
.splash-ring--2 { animation: splashSpinR 22s linear infinite; }
.splash-ring--3 { animation: splashSpin  10s linear infinite; }
@keyframes splashSpin  { to { transform: rotate(360deg);  } }
@keyframes splashSpinR { to { transform: rotate(-360deg); } }

/* орбиты с иконками */
.splash-orbit {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
}
.splash-orbit--a { animation: splashSpin  9s linear infinite; }
.splash-orbit--b { animation: splashSpinR 12s linear infinite; }
.splash-orbit--c { animation: splashSpin  15s linear infinite; }
.splash-orbit--d { animation: splashSpinR 18s linear infinite; }
.splash-chip {
  position: absolute;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(140deg, #1a2040, #11162a);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 4px 18px -2px rgba(0,0,0,.5),
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 0 22px -6px rgba(139,92,246,.6);
  color: #c4b5fd;
}
.splash-orbit--a .splash-chip { transform: translate(0,  -110px); color: #c4b5fd; }
.splash-orbit--b .splash-chip { transform: translate(110px, 0);  color: #f0abfc; }
.splash-orbit--c .splash-chip { transform: translate(0,   110px); color: #67e8f9; }
.splash-orbit--d .splash-chip { transform: translate(-110px, 0); color: #fcd34d; }
/* контр-вращение, чтобы иконки не «кувыркались» */
.splash-chip > svg { animation: splashSpinR 9s linear infinite; }
.splash-orbit--b .splash-chip > svg { animation: splashSpin 12s linear infinite; }
.splash-orbit--c .splash-chip > svg { animation: splashSpinR 15s linear infinite; }
.splash-orbit--d .splash-chip > svg { animation: splashSpin 18s linear infinite; }

/* центральное ядро */
.splash-core {
  position: relative;
  flex-shrink: 0;
  width: 96px; height: 96px;
  border-radius: 24px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  isolation: isolate;
  animation: splashCoreFloat 5s ease-in-out infinite;
}
.splash-core-bg {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #1b2247 0%, #0b0f1a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 18px 60px -18px rgba(139, 92, 246, .85),
    0 8px 30px -10px rgba(217, 70, 239, .5);
}
.splash-core-letter {
  position: relative; z-index: 2;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800; font-size: 44px; line-height: 1;
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(217,70,239,.7)) drop-shadow(0 2px 6px rgba(139,92,246,.5));
  animation: splashLetterShine 3.5s ease-in-out infinite;
}
@supports (-webkit-background-clip: text) {
  .splash-core-letter {
    background: linear-gradient(140deg, #e9d5ff 0%, #fff 30%, #a5f3fc 70%, #fff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: none;
  }
}
.splash-core-shine {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 24px;
  background: linear-gradient(120deg,
    transparent 25%,
    rgba(255,255,255,0.18) 50%,
    transparent 75%);
  background-size: 200% 100%;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: splashShine 3s linear infinite;
}
@keyframes splashCoreFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes splashLetterShine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes splashShine {
  0%   { background-position: -120% 0; }
  100% { background-position:  220% 0; }
}

/* Wordmark — побуквенно */
.splash-wordmark {
  position: relative; z-index: 2;
  margin-top: 36px;
  display: flex; gap: 2px;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .12em;
  background: linear-gradient(90deg, #fff 0%, #e9d5ff 50%, #a5f3fc 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 4px 30px rgba(139,92,246,.35);
}
.splash-wordmark > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: splashLetterIn .7s cubic-bezier(.2,.9,.2,1.1) forwards;
  animation-delay: calc(0.55s + var(--i) * 70ms);
}
@keyframes splashLetterIn {
  to { opacity: 1; transform: translateY(0); }
}

.splash-tagline {
  position: relative; z-index: 2;
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: 0;
  animation: splashFadeIn .8s ease forwards;
  animation-delay: 1.4s;
}
@keyframes splashFadeIn { to { opacity: 1; } }

/* Прогресс-бар с шиммером */
.splash-progress {
  position: relative; z-index: 2;
  margin-top: 28px;
  width: 220px; height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  opacity: 0;
  animation: splashFadeIn .6s ease forwards;
  animation-delay: 1.5s;
}
.splash-progress-bar {
  height: 100%; width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6, #d946ef, #22d3ee);
  background-size: 200% 100%;
  will-change: transform;
  animation: splashProgress 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite,
             splashProgressGrad 3s linear infinite;
}
.splash-progress-shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: splashProgressShine 2s linear infinite;
}
@keyframes splashProgress {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(300%); }
}
@keyframes splashProgressGrad {
  to { background-position: 200% 0; }
}
@keyframes splashProgressShine {
  0%   { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}

.splash-status {
  position: relative; z-index: 2;
  margin-top: 12px;
  font-size: 11px;
  color: #64748b;
  letter-spacing: .12em;
  opacity: 0;
  animation: splashFadeIn .6s ease forwards;
  animation-delay: 1.7s;
}

/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .splash *,
  .splash *::before,
  .splash *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* На очень узких экранах уменьшаем сцену */
@media (max-width: 380px) {
  .splash-stage { width: 200px; height: 200px; }
  .splash-orbit--a .splash-chip { transform: translate(0,  -90px); }
  .splash-orbit--b .splash-chip { transform: translate(90px, 0);  }
  .splash-orbit--c .splash-chip { transform: translate(0,   90px); }
  .splash-orbit--d .splash-chip { transform: translate(-90px, 0); }
  .splash-core { width: 84px; height: 84px; }
  .splash-core-letter { font-size: 38px; }
  .splash-wordmark { font-size: 22px; }
}

/* ===== Cards ===== */
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 70, 239, 0.35);
  box-shadow: 0 20px 50px -15px rgba(139, 92, 246, 0.35);
}

/* ===== Hero ===== */
.hero-card {
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(34,211,238,0.15), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.10);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
}
.hero-orb--1 { width: 220px; height: 220px; top: -60px; right: -40px; background: #8b5cf6; }
.hero-orb--2 { width: 160px; height: 160px; bottom: -50px; left: 30%;  background: #22d3ee; opacity: 0.35; }
.hero-orb--3 { width: 120px; height: 120px; top: 40%; left: -30px; background: #d946ef; opacity: 0.4; }

.kpi {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px 14px;
  min-width: 130px;
}
.kpi-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: #94a3b8; }
.kpi-value { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; margin-top: 4px; }
.kpi-sub   { font-size: 11px; color: #64748b; margin-top: 2px; }

.text-gradient {
  background: linear-gradient(90deg, #c4b5fd, #f0abfc 40%, #67e8f9);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 60%, #22d3ee 130%);
  box-shadow: 0 10px 30px -8px rgba(139,92,246,0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 40px -8px rgba(217,70,239,0.6); }
.btn-ghost {
  color: #e2e8f0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }

/* ===== Inputs ===== */
.input, .select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e2e8f0; border-radius: 10px;
  padding: 9px 12px; font-size: 13px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .select:focus { border-color: rgba(217,70,239,0.6); box-shadow: 0 0 0 3px rgba(217,70,239,0.18); }
.search {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px; padding: 7px 12px; min-width: 240px;
}
.search input { background: transparent; outline: none; color: #e2e8f0; font-size: 13px; flex: 1; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row > span { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== Nav ===== */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; color: #cbd5e1; text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.nav-item--active {
  background: linear-gradient(90deg, rgba(139,92,246,0.18), rgba(217,70,239,0.10));
  color: #fff;
  border: 1px solid rgba(217,70,239,0.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.nav-item--active i { color: #f0abfc; }

/* ===== Avatars ===== */
.avatar {
  display: grid; place-items: center; border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff; font-weight: 700;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--md { width: 40px; height: 40px; font-size: 14px; }
.avatar--xl { width: 96px; height: 96px; font-size: 30px; box-shadow: 0 12px 40px -10px rgba(217,70,239,0.5); }

/* ===== Badges, tags, status ===== */
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid transparent;
  text-transform: uppercase;
}
.badge-emerald { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.badge-violet  { background: rgba(139,92,246,0.15); color: #c4b5fd; border-color: rgba(139,92,246,0.3); }
.badge-fuchsia { background: rgba(217,70,239,0.15); color: #f0abfc; border-color: rgba(217,70,239,0.35); }
.badge-amber   { background: rgba(245,158,11,0.12); color: #fcd34d; border-color: rgba(245,158,11,0.3); }

.tag {
  display: inline-flex; align-items: center;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.08);
}

.metric {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 10px 8px;
}
.metric-value { font-size: 15px; font-weight: 700; color: #fff; }
.metric-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.status-pill {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid transparent;
}
.status-active    { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.status-on-review { background: rgba(245,158,11,0.12); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.status-draft     { background: rgba(148,163,184,0.10); color: #cbd5e1; border-color: rgba(148,163,184,0.25); }
.status-completed { background: rgba(99,102,241,0.12); color: #a5b4fc; border-color: rgba(99,102,241,0.3); }
.status-paid      { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.status-received  { background: rgba(34,211,238,0.12); color: #67e8f9; border-color: rgba(34,211,238,0.3); }
.status-approved  { background: rgba(139,92,246,0.15); color: #c4b5fd; border-color: rgba(139,92,246,0.3); }
.status-rejected  { background: rgba(244,63,94,0.12); color: #fda4af; border-color: rgba(244,63,94,0.3); }

/* ===== Activity dots ===== */
.activity-dot {
  width: 9px; height: 9px; margin-top: 6px;
  border-radius: 999px; flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}
.act-deal     { background: #34d399; color: #34d399; }
.act-review   { background: #c4b5fd; color: #c4b5fd; }
.act-topup    { background: #67e8f9; color: #67e8f9; }
.act-moderate { background: #fcd34d; color: #fcd34d; }
.act-withdraw { background: #fda4af; color: #fda4af; }
.act-dispute  { background: #fb923c; color: #fb923c; }
.act-platform { background: #a78bfa; color: #a78bfa; }
.act-referral { background: #f0abfc; color: #f0abfc; }

/* ===== Toast ===== */
.toast {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e2e8f0; font-size: 13px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
  animation: toastIn 0.25s ease-out;
}
.toast--ok    { border-color: rgba(16,185,129,0.35); }
.toast--warn  { border-color: rgba(245,158,11,0.35); }
.toast--err   { border-color: rgba(244,63,94,0.35); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Telegram WebApp safe areas */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }
::-webkit-scrollbar-track { background: transparent; }

/* ===== STAGE 4 — ADS / MODERATION / CATALOG FILTERS ===== */

/* Сегментированные вкладки (фильтр статусов / kind в каталоге) */
.seg {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 9px; font-size: 12.5px;
  color: #cbd5e1; transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.seg-btn:hover { color: #fff; }
.seg-btn--on {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff; box-shadow: 0 6px 18px -6px rgba(217,70,239,0.6);
}
.seg-btn .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.25); color: rgba(255,255,255,0.85);
}
.seg-btn--on .count { background: rgba(255,255,255,0.22); color: #fff; }

/* Карточка объявления */
.ad-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: cardIn 0.45s cubic-bezier(.2,.7,.2,1) both;
}
.ad-card .ad-media {
  position: relative;
  height: 140px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(34,211,238,0.10));
  overflow: hidden;
}
.ad-card .ad-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ad-card:hover .ad-media img { transform: scale(1.05); }
.ad-card .ad-media-empty {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.35);
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(139,92,246,0.25), transparent 60%),
    radial-gradient(60% 80% at 80% 90%, rgba(34,211,238,0.20), transparent 60%);
}
.ad-card .ad-media .ad-status {
  position: absolute; top: 10px; right: 10px;
  backdrop-filter: blur(10px);
}
.ad-card .ad-media .ad-format {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(8,7,18,0.65); backdrop-filter: blur(8px);
  font-size: 10px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12); color: #e2e8f0;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delay (применяем 1..n через style) */
.ad-card:nth-child(1) { animation-delay: 0.02s; }
.ad-card:nth-child(2) { animation-delay: 0.06s; }
.ad-card:nth-child(3) { animation-delay: 0.10s; }
.ad-card:nth-child(4) { animation-delay: 0.14s; }
.ad-card:nth-child(5) { animation-delay: 0.18s; }
.ad-card:nth-child(6) { animation-delay: 0.22s; }
.ad-card:nth-child(7) { animation-delay: 0.26s; }
.ad-card:nth-child(8) { animation-delay: 0.30s; }

/* Empty state */
.empty-state {
  display: grid; place-items: center; padding: 56px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.10);
}
.empty-state .ico {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  display: grid; place-items: center; margin-bottom: 14px;
  box-shadow: 0 18px 40px -10px rgba(217,70,239,0.45);
}

/* Кнопка-звёздочка (избранное) */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #94a3b8; transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.fav-btn:hover { color: #fcd34d; background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.30); }
.fav-btn--on { color: #fbbf24; background: rgba(245,158,11,0.16); border-color: rgba(245,158,11,0.45); }
.fav-btn--on i { fill: currentColor; }
.fav-btn:active { transform: scale(0.92); }
.fav-btn.bumped { animation: favBump 0.5s ease; }
@keyframes favBump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35) rotate(-15deg); }
  60%  { transform: scale(0.92) rotate(8deg); }
  100% { transform: scale(1); }
}

/* Compare bar (нижняя плашка сравнения) */
.compare-bar {
  position: fixed; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(8,7,18,0.85);
  border: 1px solid rgba(217,70,239,0.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px -15px rgba(217,70,239,0.45);
  z-index: 45;
  backdrop-filter: blur(14px);
  animation: compareIn 0.3s ease-out;
}
@keyframes compareIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.compare-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12px; border-radius: 999px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.10);
}

/* Модалка (общая для ads/compare/moderation) */
.modal-overlay {
  background: rgba(6,8,18,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  background: linear-gradient(180deg, rgba(17,22,42,0.92), rgba(11,15,26,0.92));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-card .modal-head {
  position: relative;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(60% 100% at 0% 0%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, rgba(34,211,238,0.12), transparent 60%);
}

/* Ценник в каталоге */
.price-tag {
  display: inline-flex; flex-direction: column;
  text-align: right;
}
.price-tag .from { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; }
.price-tag .val  { font-size: 18px; font-weight: 800; }

/* Range slider — единый стиль */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #d946ef);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(217,70,239,0.35), 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
}
.range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(217,70,239,0.35), 0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
}

/* Очередь модерации — стрипа сверху */
.queue-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px;
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(245,158,11,0.20), transparent 60%),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(245,158,11,0.30);
}

/* История версий — таймлайн */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(217,70,239,0.5), rgba(34,211,238,0.3));
}
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before {
  content: ''; position: absolute; left: -19px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #d946ef; box-shadow: 0 0 0 3px rgba(217,70,239,0.18);
}
.timeline-item.tl-approve::before { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,0.20); }
.timeline-item.tl-reject::before  { background: #fb7185; box-shadow: 0 0 0 3px rgba(251,113,133,0.20); }
.timeline-item.tl-submit::before  { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.20); }

/* Сравнение — таблица */
.compare-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px; overflow: hidden;
}
.compare-grid > div {
  background: rgba(11,15,26,0.85); padding: 10px 12px; font-size: 13px;
}
.compare-grid .label { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.compare-grid .winner { color: #34d399; font-weight: 700; }

/* Подстроим line-clamp без плагина */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============== ЭТАП 5 — сделки и слоты ============== */

/* Карточка сделки */
.deal-card { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.deal-card:hover { transform: translateY(-1px); }

/* Шаги сделки (мини-степпер на карточке) */
.deal-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #64748b;
}
.deal-steps .step {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px;
  background: rgba(148,163,184,0.06); border: 1px solid rgba(148,163,184,0.10);
}
.deal-steps .step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 999px;
  background: rgba(148,163,184,0.15); color: #cbd5e1; font-weight: 700; font-size: 9px;
}
.deal-steps .step.on {
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(217,70,239,0.12));
  color: #f5d0fe; border-color: rgba(217,70,239,0.35);
  box-shadow: 0 0 0 1px rgba(217,70,239,0.15) inset;
}
.deal-steps .step.on span {
  background: linear-gradient(135deg, #8b5cf6, #d946ef); color: #fff;
}

/* Часовая сетка слотов */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 12px;
  background: rgba(15,23,42,0.4);
  border: 1px solid rgba(255,255,255,0.06);
}
.slot-btn {
  padding: 8px 6px; border-radius: 8px;
  background: rgba(148,163,184,0.06);
  border: 1px solid rgba(148,163,184,0.18);
  color: #e2e8f0; font-size: 12px; font-weight: 600;
  text-align: center; cursor: pointer;
  transition: all .15s ease;
}
.slot-btn:hover:not(:disabled) {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.45);
  transform: translateY(-1px);
}
.slot-btn--on {
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(217,70,239,0.3));
  border-color: rgba(217,70,239,0.6);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(217,70,239,0.5);
}
.slot-btn--busy {
  background: rgba(244,63,94,0.06);
  border-color: rgba(244,63,94,0.18);
  color: #64748b;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Таймлайн в модалке сделки */
.timeline {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: rgba(148,163,184,0.15);
}
.timeline li {
  display: flex; align-items: center; gap: 10px;
  padding-left: 4px; color: #64748b; font-size: 13px;
  position: relative;
}
.timeline li i {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #11162a; border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.25); color: #94a3b8;
  z-index: 1;
}
.timeline li.on { color: #e2e8f0; }
.timeline li.on i {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  border-color: rgba(217,70,239,0.6);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(217,70,239,0.12);
}

/* badge cyan для GMV */
.badge-cyan {
  background: rgba(34,211,238,0.12); color: #67e8f9;
  border: 1px solid rgba(34,211,238,0.3);
}

/* ===== Этап 6: payments ===== */
.pay-method-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 12px 8px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  color: #cbd5e1;
  transition: all .18s ease;
  cursor: pointer; min-height: 78px;
}
.pay-method-card:hover { border-color: rgba(255,255,255,0.18); color: #fff; transform: translateY(-1px); }
.pay-method-card--on {
  border-color: rgba(217,70,239,0.55);
  background: rgba(217,70,239,0.07);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(217,70,239,0.10);
}
.pay-method-card__glow {
  position: absolute; inset: 0; opacity: .35; pointer-events: none;
  filter: blur(20px);
}

@keyframes paySuccessBurst {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.pay-success-burst {
  animation: paySuccessBurst .55s cubic-bezier(.19,1,.22,1);
  box-shadow: 0 0 0 0 rgba(52,211,153,0.45);
  animation-fill-mode: forwards;
  position: relative;
}
.pay-success-burst::after {
  content: ""; position: absolute; inset: -8px; border-radius: 999px;
  border: 2px solid rgba(52,211,153,0.6);
  animation: paySuccessRing 1.0s ease-out;
  pointer-events: none;
}
@keyframes paySuccessRing {
  0%   { transform: scale(.6); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}

.pay-kpi {
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  /* запас справа под абсолютную иконку 36x36 + 12px отступ */
  padding: 16px 60px 16px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  overflow: hidden;
  min-width: 0;
}
.pay-kpi__ico {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pay-kpi__label,
.pay-kpi__value,
.pay-kpi__hint {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pay-kpi__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #94a3b8; }
.pay-kpi__value { font-size: clamp(14px, 3vw, 18px); font-weight: 800; margin-top: 2px; }
.pay-kpi__hint  { font-size: 11px; color: #64748b; margin-top: 2px; }

.pay-row { transition: background .15s; }
.pay-row:hover { background: rgba(255,255,255,0.03); }

.pay-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  vertical-align: middle; margin-right: 6px;
}

/* =============================================================
   Этап 7 — Вывод средств (статусы, шаги, timeline, success-burst)
   ============================================================= */

.status-pill.st-pending    { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }
.status-pill.st-approved   { background: rgba(34,211,238,0.12); color: #67e8f9; border: 1px solid rgba(34,211,238,0.25); }
.status-pill.st-processing { background: rgba(167,139,250,0.14); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.30); animation: wd-pulse 1.6s ease-in-out infinite; }
.status-pill.st-paid       { background: rgba(52,211,153,0.14); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.30); }
.status-pill.st-rejected   { background: rgba(244,63,94,0.12);  color: #fda4af; border: 1px solid rgba(244,63,94,0.30); }
.status-pill.st-cancelled  { background: rgba(148,163,184,0.10); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.25); }

@keyframes wd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(167,139,250,0); }
}

/* способы вывода — карточки в шаге 1 */
.wmethod {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all .18s ease;
  cursor: pointer;
}
.wmethod:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
.wmethod--on {
  background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(34,211,238,0.12));
  border-color: rgba(217,70,239,0.45);
  box-shadow: 0 6px 22px -10px rgba(217,70,239,0.55);
}

/* burst-эффект на кнопке создания */
.success-burst {
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(110,231,183,0.55) 0%, rgba(110,231,183,0) 65%);
  animation: wd-burst .9s ease-out forwards;
  pointer-events: none;
}
@keyframes wd-burst {
  0%   { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* timeline в деталях заявки */
.wd-timeline { position: relative; margin: 0; padding: 4px 0 4px 18px; list-style: none; }
.wd-timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(to bottom, rgba(217,70,239,0.55), rgba(34,211,238,0.35), rgba(255,255,255,0.05));
  border-radius: 2px;
}
.wd-timeline__item {
  position: relative;
  padding: 8px 0 10px 14px;
  display: flex; gap: 10px;
}
.wd-timeline__dot {
  position: absolute; left: -17px; top: 12px;
  width: 10px; height: 10px; border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.85);
}

/* ============================================================ */
/* DISPUTES (этап 8)                                            */
/* ============================================================ */

/* badge palette */
.badge-amber   { background: rgba(245,158,11,0.15);  color: #fde68a; border: 1px solid rgba(245,158,11,0.3); }
.badge-cyan    { background: rgba(34,211,238,0.15);  color: #a5f3fc; border: 1px solid rgba(34,211,238,0.3); }
.badge-rose    { background: rgba(244,63,94,0.15);   color: #fecdd3; border: 1px solid rgba(244,63,94,0.3); }
.badge-emerald { background: rgba(52,211,153,0.15);  color: #a7f3d0; border: 1px solid rgba(52,211,153,0.3); }
.badge-violet  { background: rgba(139,92,246,0.18);  color: #ddd6fe; border: 1px solid rgba(139,92,246,0.3); }
.badge-slate   { background: rgba(148,163,184,0.15); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }

/* dispute list card */
.dispute-card {
  position: relative;
  padding: 18px 18px 16px 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.dispute-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,158,11,0.35);
  box-shadow: 0 18px 40px -22px rgba(245,158,11,0.4);
}
.dispute-card__rail {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 4px 0 0 4px;
}
.rail-amber   { background: linear-gradient(to bottom, #f59e0b, #fb923c); }
.rail-cyan    { background: linear-gradient(to bottom, #22d3ee, #38bdf8); }
.rail-rose    { background: linear-gradient(to bottom, #f43f5e, #ec4899); }
.rail-emerald { background: linear-gradient(to bottom, #34d399, #10b981); }
.rail-violet  { background: linear-gradient(to bottom, #a855f7, #d946ef); }
.rail-slate   { background: linear-gradient(to bottom, #64748b, #94a3b8); }

/* modal shell */
.dispute-modal {
  box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(245,158,11,0.07);
  animation: dsp-modal-in .3s ease-out;
}
@keyframes dsp-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* timeline (open → chat → arbiter → resolved) */
.dispute-timeline { user-select: none; }
.dispute-step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #94a3b8;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.dispute-step--done {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(217,70,239,0.18));
  border-color: rgba(245,158,11,0.4);
  color: #fde68a;
  transform: translateY(-1px);
}
.dispute-step--cancel {
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.3);
  color: #cbd5e1;
  text-decoration: line-through;
}

/* chat scroll */
.dispute-chat-scroll {
  background:
    radial-gradient(800px 200px at 50% 0%, rgba(245,158,11,0.05), transparent 70%),
    linear-gradient(to bottom, rgba(255,255,255,0.01), rgba(0,0,0,0.05));
}
.dispute-chat-scroll::-webkit-scrollbar { width: 8px; }
.dispute-chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08); border-radius: 999px;
}
.dispute-chat-scroll::-webkit-scrollbar-track { background: transparent; }

/* message bubbles */
.dispute-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  word-wrap: break-word;
  animation: dsp-msg-in .3s ease-out;
  box-shadow: 0 4px 16px -8px rgba(0,0,0,0.5);
}
@keyframes dsp-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dispute-msg--mine {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(139,92,246,0.18));
  border-color: rgba(217,70,239,0.35);
  border-bottom-right-radius: 6px;
}
.dispute-msg--other {
  margin-right: auto;
  border-bottom-left-radius: 6px;
}
.dispute-msg__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11px; margin-bottom: 4px;
}
.dispute-msg__role {
  font-weight: 600; letter-spacing: 0.02em;
}
.dispute-msg__role.role-buyer    { color: #fb7185; }
.dispute-msg__role.role-seller   { color: #34d399; }
.dispute-msg__role.role-admin,
.dispute-msg__role.role-moderator{ color: #f0abfc; }
.dispute-msg__time { color: #64748b; font-variant-numeric: tabular-nums; }
.dispute-msg__body { font-size: 13.5px; color: #e2e8f0; line-height: 1.4; white-space: pre-wrap; }
.dispute-msg__attach { display: inline-block; }
.dispute-msg__attach img { transition: transform .25s ease, box-shadow .25s ease; }
.dispute-msg__attach img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px -10px rgba(217,70,239,0.4);
}

/* system messages */
.dispute-msg-system {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(34,211,238,0.06);
  border: 1px dashed rgba(34,211,238,0.25);
  color: #67e8f9;
  font-size: 11.5px;
  width: fit-content;
}
.dispute-chat-scroll > div { display: flex; flex-direction: column; }

/* admin resolution panel slide-in */
.dispute-admin-panel {
  animation: dsp-admin-in .35s ease-out;
}
@keyframes dsp-admin-in {
  from { opacity: 0; transform: translateY(-6px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 600px; }
}

/* spin */
.animate-spin { animation: dsp-spin 1s linear infinite; }
@keyframes dsp-spin { to { transform: rotate(360deg); } }

/* ============================================================
   ============== ЭТАП 9 — Админ-панель ======================
   ============================================================ */

/* hero gradient */
.admin-hero {
  background:
    radial-gradient(1100px 220px at 0% 0%, rgba(217,70,239,0.18), transparent 70%),
    radial-gradient(900px 200px at 100% 0%, rgba(34,211,238,0.15), transparent 70%),
    linear-gradient(135deg, rgba(168,85,247,0.10), rgba(15,23,42,0.6));
  border: 1px solid rgba(217,70,239,0.18);
}
.admin-hero-bg {
  background:
    repeating-linear-gradient(45deg, rgba(217,70,239,0.04) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(34,211,238,0.03) 0 2px, transparent 2px 22px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 80%);
}

/* sub-tabs */
.admin-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: #cbd5e1;
  transition: all .2s ease;
  cursor: pointer;
}
.admin-tab:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(217,70,239,0.30);
  color: #fff;
}
.admin-tab--active {
  background: linear-gradient(135deg, rgba(217,70,239,0.30), rgba(168,85,247,0.18));
  border-color: rgba(217,70,239,0.50);
  color: #fff;
  box-shadow: 0 0 18px rgba(217,70,239,0.25);
}

/* KPI cards with neon glow */
.kpi-card {
  position: relative;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.kpi-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 0% 0%, var(--kpi-glow, rgba(217,70,239,0.18)), transparent 60%);
  opacity: .85;
  pointer-events: none;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--kpi-border, rgba(217,70,239,0.5));
  box-shadow: 0 12px 28px -16px var(--kpi-glow, rgba(217,70,239,0.55));
}
.kpi-card .kpi-label { position: relative; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #94a3b8; }
.kpi-card .kpi-value { position: relative; font-size: 22px; font-weight: 700; color: #fff; margin-top: 4px; animation: kpi-pulse 1.6s ease-out; }
.kpi-card .kpi-sub   { position: relative; font-size: 10.5px; color: #94a3b8; margin-top: 2px; }
.kpi-card--violet  { --kpi-glow: rgba(168,85,247,0.30); --kpi-border: rgba(168,85,247,0.55); }
.kpi-card--cyan    { --kpi-glow: rgba(34,211,238,0.28); --kpi-border: rgba(34,211,238,0.55); }
.kpi-card--fuchsia { --kpi-glow: rgba(217,70,239,0.30); --kpi-border: rgba(217,70,239,0.60); }
.kpi-card--emerald { --kpi-glow: rgba(16,185,129,0.28); --kpi-border: rgba(16,185,129,0.55); }
.kpi-card--amber   { --kpi-glow: rgba(245,158,11,0.30); --kpi-border: rgba(245,158,11,0.55); }
.kpi-card--rose    { --kpi-glow: rgba(244,63,94,0.28); --kpi-border: rgba(244,63,94,0.55); }

@keyframes kpi-pulse {
  0%   { opacity: 0; transform: translateY(4px); }
  60%  { opacity: 1; transform: translateY(-1px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* staggered fade for KPI grid children */
.stagger-fade > * { opacity: 0; animation: stf .45s ease-out forwards; }
.stagger-fade > *:nth-child(1) { animation-delay: .02s; }
.stagger-fade > *:nth-child(2) { animation-delay: .07s; }
.stagger-fade > *:nth-child(3) { animation-delay: .12s; }
.stagger-fade > *:nth-child(4) { animation-delay: .17s; }
.stagger-fade > *:nth-child(5) { animation-delay: .22s; }
.stagger-fade > *:nth-child(6) { animation-delay: .27s; }
.stagger-fade > *:nth-child(7) { animation-delay: .32s; }
.stagger-fade > *:nth-child(8) { animation-delay: .37s; }
@keyframes stf { to { opacity: 1; transform: translateY(0); } from { transform: translateY(8px); } }

/* admin tables */
.admin-table { border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(15,23,42,0.55);
}
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.admin-table--sticky thead th { position: sticky; top: 0; z-index: 2; backdrop-filter: blur(8px); }
.admin-table tbody tr { transition: background .15s ease; }
.row-fade { animation: rfade .4s ease-out; }
@keyframes rfade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* small input style for admin filters */
.ip {
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: #e2e8f0;
  transition: border-color .15s ease, background .15s ease;
}
.ip:focus { outline: none; border-color: rgba(217,70,239,0.55); background: rgba(255,255,255,0.06); }
.ip::placeholder { color: #64748b; }

/* 2FA card decorative gradient */
.admin-2fa-card {
  background:
    radial-gradient(700px 140px at 100% 0%, rgba(217,70,239,0.10), transparent 65%),
    rgba(15,23,42,0.55);
  border: 1px solid rgba(217,70,239,0.20);
}

/* ===== STAGE 10C — back-bar (universal) + promotions ===== */

.back-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 18px;
  animation: backbarIn 0.3s ease-out;
}
@keyframes backbarIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(217,70,239,0.14));
  border: 1px solid rgba(217,70,239,0.32);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.back-btn:hover {
  transform: translateX(-2px);
  background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(217,70,239,0.22));
  box-shadow: 0 8px 20px -6px rgba(217,70,239,0.50);
}
.back-btn:active { transform: scale(0.96); }
.back-btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: #94a3b8;
}
.back-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #94a3b8;
  flex: 1; min-width: 0;
}
.back-crumb .crumb-current { color: #e2e8f0; font-weight: 600; }
.back-crumb .crumb-sub { color: #c4b5fd; font-weight: 600; }

/* TOP / PREMIUM / FEATURED — карточные бейджи */
.promo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em;
  padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 6px 18px -6px currentColor;
}
.promo-badge--top {
  background: linear-gradient(90deg, #8b5cf6, #d946ef);
  color: #fff;
}
.promo-badge--premium {
  background: linear-gradient(90deg, #f59e0b, #d946ef);
  color: #fff;
}
.promo-badge--featured {
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  color: #fff;
}

/* Карточка площадки в каталоге с активным TOP получает рамку-подсветку */
.platform-card--top {
  border-color: rgba(217,70,239,0.45) !important;
  box-shadow: 0 18px 50px -16px rgba(217,70,239,0.45);
}
.platform-card--premium::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(217,70,239,0.06));
}

/* Featured-баннер — большой hero сверху каталога */
.featured-hero {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(34,211,238,0.18), transparent 60%),
    radial-gradient(80% 100% at 100% 100%, rgba(139,92,246,0.22), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(34,211,238,0.30);
  margin-bottom: 18px;
  animation: heroIn 0.5s ease-out;
}
@keyframes heroIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.featured-hero .ribbon {
  position: absolute; top: 14px; right: -36px;
  transform: rotate(35deg);
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 4px 44px; letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px -4px rgba(139,92,246,0.5);
}

/* Кнопка «Продвинуть» — с искрой */
.promote-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 12px; font-weight: 700; border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef 60%, #22d3ee);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(217,70,239,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.promote-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -6px rgba(217,70,239,0.65);
}
.promote-btn:active { transform: scale(0.96); }
.promote-btn--active {
  background: rgba(245,158,11,0.18);
  border: 1px solid rgba(245,158,11,0.40);
  color: #fcd34d;
  box-shadow: none;
}

/* Карточка пакета продвижения в модалке */
.promo-pkg-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.promo-pkg-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217,70,239,0.35);
  background: rgba(255,255,255,0.06);
}
.promo-pkg-card--on {
  border-color: rgba(217,70,239,0.6) !important;
  box-shadow: 0 16px 36px -10px rgba(217,70,239,0.45);
  background: linear-gradient(180deg, rgba(217,70,239,0.10), rgba(34,211,238,0.05));
}
.promo-pkg-card .pkg-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
}
.promo-pkg-card .pkg-price {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(90deg, #c4b5fd, #f0abfc 50%, #67e8f9);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.promo-pkg-card .pkg-effect {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #cbd5e1;
}

/* Success-burst для покупки продвижения */
.promo-burst {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center;
  z-index: 5;
  animation: burstIn 1s ease-out forwards;
}
.promo-burst .ring {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 999px;
  border: 2px solid rgba(217,70,239,0.6);
  animation: burstRing 0.9s ease-out forwards;
}
.promo-burst .ring:nth-child(2) { animation-delay: 0.18s; border-color: rgba(34,211,238,0.6); }
.promo-burst .ring:nth-child(3) { animation-delay: 0.34s; border-color: rgba(139,92,246,0.6); }
@keyframes burstIn { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes burstRing { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }

/* список активных продвижений на карточке «Мои площадки» */
.promo-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.promo-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: rgba(217,70,239,0.12);
  border: 1px solid rgba(217,70,239,0.30);
  color: #f0abfc; font-weight: 700;
  letter-spacing: 0.04em;
}

/* ====== Этап 11B: Бан-листы и Risk-score ====== */
.ban-row { animation: banRowIn 0.35s ease-out both; }
@keyframes banRowIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.risk-row { animation: riskRowIn 0.32s ease-out both; }
@keyframes riskRowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sec-chip { transition: transform .15s ease, border-color .2s ease, background .2s ease; }
.sec-chip:hover { transform: translateY(-1px); border-color: rgba(217,70,239,0.35); background: rgba(255,255,255,0.08); }

.risk-score-bar {
  position: relative;
  height: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  min-width: 80px;
  display: block;
}
.risk-score-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 0 12px rgba(244,63,94,0.25);
  animation: riskFillIn 0.6s ease-out;
}
@keyframes riskFillIn { from { width: 0 !important; } }
.risk-score-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  letter-spacing: 0.04em;
}

/* мягкое мерцание для KPI (используется на бан-листе) */
.kpi-pulse {
  animation: kpiPulse 2.6s ease-in-out infinite;
}
@keyframes kpiPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(244,63,94,0)); }
  50%      { filter: drop-shadow(0 0 6px rgba(244,63,94,0.45)); }
}

/* ============================================================ */
/*  Аналитика (Этап 13)                                         */
/* ============================================================ */
.hero-analytics {
  background:
    radial-gradient(120% 90% at 90% 10%, rgba(34,211,238,0.18), transparent 60%),
    radial-gradient(120% 90% at 10% 90%, rgba(168,85,247,0.18), transparent 60%),
    linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.85));
}

/* Period selector */
.anlx-period-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 60px; padding: 8px 14px;
  font-size: 12px; font-weight: 600; color: #94a3b8;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.anlx-period-btn:hover {
  color: #e2e8f0;
  background: rgba(217,70,239,0.10);
  border-color: rgba(217,70,239,0.35);
}
.anlx-period-btn--on {
  color: #fff;
  background: linear-gradient(135deg, rgba(217,70,239,0.30), rgba(34,211,238,0.30));
  border-color: rgba(217,70,239,0.65);
  box-shadow: 0 4px 14px rgba(217,70,239,0.25);
}

/* Funnel */
.anlx-funnel { display: flex; flex-direction: column; gap: 14px; }
.anlx-funnel-row {
  display: flex; align-items: stretch; gap: 12px;
  opacity: 0; transform: translateY(8px);
  animation: anlxFunnelIn 0.5s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: calc(var(--idx, 0) * 80ms);
}
@keyframes anlxFunnelIn {
  to { opacity: 1; transform: translateY(0); }
}
.anlx-funnel-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(34,211,238,0.14));
  border: 1px solid rgba(217,70,239,0.30);
  color: #f5d0fe;
}
.anlx-funnel-body { flex: 1; min-width: 0; }
.anlx-funnel-bar {
  flex: 1; height: 10px;
  background: rgba(148,163,184,0.10);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.anlx-funnel-fill {
  height: 100%;
  background: linear-gradient(90deg, #d946ef 0%, #a855f7 50%, #22d3ee 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(217,70,239,0.45);
  animation: anlxFunnelFill 0.8s cubic-bezier(.22,1,.36,1);
}
@keyframes anlxFunnelFill { from { width: 0 !important; } }

/* Sources */
.anlx-src-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px;
  transition: background 0.2s ease;
}
.anlx-src-row:hover { background: rgba(255,255,255,0.03); }
.anlx-src-dot {
  width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.anlx-src-bar {
  height: 4px; background: rgba(148,163,184,0.10);
  border-radius: 999px; overflow: hidden;
}
.anlx-src-bar-fill {
  height: 100%; border-radius: 999px;
  animation: anlxSrcFill 0.7s cubic-bezier(.22,1,.36,1);
}
@keyframes anlxSrcFill { from { width: 0 !important; } }

/* Legend dots */
.anlx-legend {
  display: inline-flex; align-items: center; gap: 5px;
  color: #94a3b8;
}
.anlx-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  box-shadow: 0 0 6px currentColor;
}

/* Top-ads table */
.anlx-table { border-collapse: separate; border-spacing: 0; }
.anlx-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #64748b; font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
.anlx-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(148,163,184,0.06);
  font-size: 12.5px;
}
.anlx-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.anlx-roi {
  display: inline-block;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.anlx-roi--pos {
  color: #6ee7b7; background: rgba(16,185,129,0.14);
  border: 1px solid rgba(16,185,129,0.35);
}
.anlx-roi--neg {
  color: #fca5a5; background: rgba(244,63,94,0.14);
  border: 1px solid rgba(244,63,94,0.35);
}

/* Export cards */
.anlx-export-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 14px;
  text-align: left; cursor: pointer;
  transition: all 0.2s ease;
}
.anlx-export-card:hover {
  background: rgba(217,70,239,0.06);
  border-color: rgba(217,70,239,0.40);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(217,70,239,0.18);
}
.anlx-export-card:active { transform: translateY(0); }

/* ============================================================
   ЭТАП 15 — Премиальный UI: sparklines, 3D-cards, micro-anim
   ============================================================ */

/* ---- Particle canvas background ---- */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ---- Sparkline canvas в KPI ---- */
.kpi-sparkline {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 8px;
  opacity: 0.75;
}

/* ---- KPI hero cards (дашборд) с sparkline ---- */
.kpi-hero {
  position: relative;
  /* иконка 30x30, top/right 12px — запас 42px справа */
  padding: 14px 46px 10px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
  min-width: 155px;
}
.kpi-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(90% 60% at 0% 0%, var(--kh-color, rgba(139,92,246,0.22)), transparent 65%);
  pointer-events: none;
}
.kpi-hero:hover {
  transform: translateY(-4px) perspective(600px) rotateX(2deg);
  border-color: var(--kh-border, rgba(139,92,246,0.45));
  box-shadow: 0 20px 50px -15px var(--kh-shadow, rgba(139,92,246,0.35));
}
.kpi-hero .kh-icon {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--kh-color, rgba(139,92,246,0.22));
  border: 1px solid var(--kh-border, rgba(139,92,246,0.35));
  color: #fff; font-size: 13px;
}
.kpi-hero .kh-label {
  position: relative;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.02em;
  color: #94a3b8;
}
.kpi-hero .kh-value {
  position: relative;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: clamp(12px, 2.2vw, 15px); font-weight: 800; color: #fff;
  line-height: 1.15; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi-hero .kh-delta {
  position: relative;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600; margin-top: 3px;
  padding: 2px 5px; border-radius: 999px;
}
.kpi-hero .kh-delta--up   { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.kpi-hero .kh-delta--down { background: rgba(244,63,94,0.15);  color: #fda4af; }
.kpi-hero .kh-delta--flat { background: rgba(148,163,184,0.12); color: #cbd5e1; }

.kpi-hero--violet  { --kh-color: rgba(168,85,247,0.22); --kh-border: rgba(168,85,247,0.45); --kh-shadow: rgba(168,85,247,0.35); }
.kpi-hero--fuchsia { --kh-color: rgba(217,70,239,0.22); --kh-border: rgba(217,70,239,0.50); --kh-shadow: rgba(217,70,239,0.40); }
.kpi-hero--cyan    { --kh-color: rgba(34,211,238,0.20);  --kh-border: rgba(34,211,238,0.45); --kh-shadow: rgba(34,211,238,0.35); }
.kpi-hero--emerald { --kh-color: rgba(16,185,129,0.20);  --kh-border: rgba(16,185,129,0.45); --kh-shadow: rgba(16,185,129,0.35); }
.kpi-hero--amber   { --kh-color: rgba(245,158,11,0.20);  --kh-border: rgba(245,158,11,0.45); --kh-shadow: rgba(245,158,11,0.35); }

/* ---- 3D Tilt card wrapper ---- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}
.tilt-card .tilt-content {
  transform: translateZ(12px);
}

/* ---- Gradient progress bars ---- */
.prog-bar {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.prog-fill {
  height: 100%;
  border-radius: 999px;
  position: relative;
  animation: progFill 0.9s cubic-bezier(.22,1,.36,1);
  background: linear-gradient(90deg, #8b5cf6, #d946ef 55%, #22d3ee);
  box-shadow: 0 0 10px rgba(217,70,239,0.5);
}
@keyframes progFill { from { width: 0 !important; } }
.prog-fill::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: progShine 2.5s ease-in-out infinite;
}
@keyframes progShine {
  0%   { opacity: 0; transform: translateX(-20px); }
  50%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(10px); }
}

/* ---- Ripple effect on buttons ---- */
.ripple-btn {
  position: relative;
  overflow: hidden;
}
.ripple-btn .ripple {
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ---- Neon glow text ---- */
.glow-text {
  text-shadow:
    0 0 20px rgba(217,70,239,0.8),
    0 0 40px rgba(139,92,246,0.5);
}

/* ---- Counter number animation ---- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.count-anim { animation: countUp 0.5s cubic-bezier(.22,1,.36,1); }

/* ---- Chart container with glass effect ---- */
.chart-glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.chart-glass::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,70,239,0.5), rgba(34,211,238,0.5), transparent);
}

/* ---- Animated number counter ---- */
.num-flip {
  display: inline-block;
  animation: numFlip 0.4s cubic-bezier(.22,1,.36,1);
}
@keyframes numFlip {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Page transition ---- */
.page-enter {
  animation: pageEnter 0.35s cubic-bezier(.22,1,.36,1);
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Sidebar nav improvements ---- */
.nav-item {
  position: relative;
}
.nav-item::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; border-radius: 2px;
  background: linear-gradient(180deg, #8b5cf6, #d946ef);
  transition: height 0.2s ease;
}
.nav-item--active::before {
  height: 60%;
}

/* ---- Animated gradient border on active nav ---- */
.nav-item--active {
  background: linear-gradient(90deg, rgba(139,92,246,0.15), rgba(217,70,239,0.08)) !important;
}

/* ---- Tooltip ---- */
.tooltip-wrap {
  position: relative;
}
.tooltip-wrap .tooltip-box {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,25,0.95);
  border: 1px solid rgba(217,70,239,0.35);
  border-radius: 8px; padding: 6px 10px;
  font-size: 11.5px; color: #e2e8f0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0; transition: opacity 0.18s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
}
.tooltip-wrap:hover .tooltip-box { opacity: 1; }
.tooltip-wrap .tooltip-box::after {
  content: '';
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(217,70,239,0.35);
}

/* ---- Live pulse dot ---- */
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
}
.live-dot::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px; border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ---- Skeleton shimmer ---- */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s linear infinite;
  border-radius: 8px;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Hover glow on platform/catalog cards ---- */
.platform-card {
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px -20px rgba(139,92,246,0.45);
  border-color: rgba(139,92,246,0.45) !important;
}

/* ---- Метрика с трендовой стрелкой ---- */
.trend-up   { color: #34d399; }
.trend-down { color: #fb7185; }
.trend-flat { color: #94a3b8; }

/* ---- Scrollbar more minimal ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(217,70,239,0.5); }

/* ---- Glassmorphism sidebar ---- */
aside.gl-sidebar {
  background: rgba(7,9,19,0.65) !important;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid rgba(217,70,239,0.10) !important;
}

/* ---- Active route indicator line ---- */
.route-indicator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #d946ef, #22d3ee);
  z-index: 999;
  animation: routeSlide 0.4s ease-out;
  transform-origin: left;
}
@keyframes routeSlide {
  from { transform: scaleX(0); opacity: 0.6; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* ---- Notification badge pulse ---- */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; font-size: 10px; font-weight: 800;
  background: linear-gradient(135deg, #d946ef, #8b5cf6);
  color: #fff;
  animation: badgePop 0.4s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 12px rgba(217,70,239,0.6);
}
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ---- Chart gradient area ---- */
.chart-area-gradient {
  position: relative;
}
.chart-area-gradient::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(139,92,246,0.08), transparent);
  pointer-events: none;
  border-radius: 0 0 16px 16px;
}

/* ---- Mobile bottom nav improvements ---- */
.mobile-nav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 12px;
  font-size: 10px; color: #64748b;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.mobile-nav-btn:hover,
.mobile-nav-btn--active {
  color: #f0abfc;
  background: rgba(217,70,239,0.10);
}
.mobile-nav-btn--active::before {
  content: '';
  position: absolute; bottom: -8px;
  width: 20px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #d946ef);
}

/* ---- Success animation overlay ---- */
.success-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(6,8,18,0.75);
  backdrop-filter: blur(12px);
  animation: successOverlayIn 0.35s ease-out;
}
@keyframes successOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.success-card {
  text-align: center; padding: 40px 48px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(34,211,238,0.10));
  border: 1px solid rgba(16,185,129,0.35);
  box-shadow: 0 40px 80px -20px rgba(16,185,129,0.3);
  animation: successCardIn 0.5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes successCardIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-check {
  width: 72px; height: 72px; border-radius: 999px; margin: 0 auto 18px;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  display: grid; place-items: center; font-size: 32px;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.5);
  animation: successCheckPulse 0.8s ease-out;
}
@keyframes successCheckPulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  100% { box-shadow: 0 0 0 30px rgba(52,211,153,0); }
}

/* ---- Improved modal animation ---- */
.modal-anim {
  animation: modalIn 0.3s cubic-bezier(.22,1,.36,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header top bar improvements ---- */
.top-bar-glow {
  position: relative;
}
.top-bar-glow::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.4), rgba(217,70,239,0.4), transparent);
}

/* ---- Category filter chip ---- */
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.filter-chip:hover {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.35);
  color: #c4b5fd;
}
.filter-chip--on {
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(217,70,239,0.18));
  border-color: rgba(217,70,239,0.5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217,70,239,0.25);
}

/* ---- Data table zebra rows ---- */
.table-zebra tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.012);
}

/* ---- Glow ring on avatar ---- */
.avatar-glow {
  box-shadow:
    0 0 0 2px rgba(217,70,239,0.4),
    0 0 20px rgba(217,70,239,0.3),
    0 8px 24px rgba(0,0,0,0.4);
  animation: avatarGlow 3s ease-in-out infinite alternate;
}
@keyframes avatarGlow {
  from { box-shadow: 0 0 0 2px rgba(217,70,239,0.4), 0 0 20px rgba(217,70,239,0.3); }
  to   { box-shadow: 0 0 0 2px rgba(34,211,238,0.4), 0 0 20px rgba(34,211,238,0.3); }
}

/* ---- Neon line separator ---- */
.neon-divider {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,70,239,0.4), rgba(34,211,238,0.35), transparent);
  margin: 16px 0;
}

/* ---- Metric trend sparkline chip ---- */
.sparkchip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.sparkchip--up   { background: rgba(16,185,129,0.14); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.sparkchip--down { background: rgba(244,63,94,0.14);  color: #fca5a5; border: 1px solid rgba(244,63,94,0.3); }

/* ---- Smooth page section reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.22,1,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================ */
/*  Партнёрские боты на дашборде (3 карточки в едином стиле)    */
/* ============================================================ */
/* ── Partner bots: заголовок + пагинатор ── */
.pb-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; margin-top: 2px;
}
.pb-pager {
  display: flex; align-items: center; gap: 5px;
}
.pb-pager-btn {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  color: #94a3b8;
  cursor: pointer;
  transition: background .18s, color .18s, opacity .18s;
}
.pb-pager-btn:hover:not(:disabled) {
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.30);
}
.pb-pager-btn:disabled { opacity: .3; cursor: default; }
.pb-pager-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: none; cursor: pointer;
  transition: background .18s, width .18s;
  padding: 0;
}
.pb-pager-dot.active {
  background: #a78bfa;
  width: 20px;
}

/* ── Partner bots: горизонтальные компактные карточки ── */
.partner-bots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
@media (min-width: 540px) {
  .partner-bots-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
}
@media (min-width: 900px) {
  .partner-bots-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* горизонтальная карточка: иконка слева, контент справа */
.partner-bot-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%),
    rgba(11, 15, 26, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px -8px rgba(2,6,23,0.6);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  min-width: 0;
}
.partner-bot-card:active,
.partner-bot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217,70,239,0.3);
  box-shadow:
    0 10px 28px -8px rgba(139,92,246,0.28),
    0 0 0 1px rgba(217,70,239,0.14) inset;
}
.partner-bot-card__glow {
  position: absolute; inset: -2px; pointer-events: none;
  background:
    radial-gradient(90px 60px at 0% 50%, rgba(139,92,246,0.16), transparent 70%),
    radial-gradient(80px 50px at 100% 50%, rgba(34,211,238,0.12), transparent 70%);
  opacity: .8;
}

/* ── иконка / аватар ── */
.partner-bot-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.45);
  flex-shrink: 0;
  overflow: hidden;
}
.partner-bot-card__icon i { width: 24px; height: 24px; }

.pb-icon--violet  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.pb-icon--cyan    { background: linear-gradient(135deg, #22d3ee, #0ea5e9); }
.pb-icon--fuchsia { background: linear-gradient(135deg, #d946ef, #a21caf); }
.pb-icon--emerald { background: linear-gradient(135deg, #10b981, #047857); }
.pb-icon--sky     { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.pb-icon--amber   { background: linear-gradient(135deg, #f59e0b, #b45309); }
.pb-icon--rose    { background: linear-gradient(135deg, #fb7185, #be123c); }
.pb-icon--orange  { background: linear-gradient(135deg, #f97316, #c2410c); }
.pb-icon--photo   { background: transparent; overflow: hidden; padding: 0; }

/* ── правая часть карточки ── */
.partner-bot-card__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}

/* строка: заголовок + бейдж */
.partner-bot-card__title-row {
  display: flex; align-items: center; gap: 7px;
  min-width: 0;
}
.partner-bot-card__title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.015em;
  flex-shrink: 1; min-width: 0;
}
.partner-bot-card__badge {
  display: inline-flex; align-items: center; flex-shrink: 0;
  font-size: 8px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid transparent;
}
.pb-badge--violet  { background: rgba(139,92,246,.15); color: #c4b5fd; border-color: rgba(139,92,246,.35); }
.pb-badge--cyan    { background: rgba(34,211,238,.12); color: #67e8f9; border-color: rgba(34,211,238,.30); }
.pb-badge--fuchsia { background: rgba(217,70,239,.15); color: #f0abfc; border-color: rgba(217,70,239,.32); }
.pb-badge--emerald { background: rgba(16,185,129,.14); color: #6ee7b7; border-color: rgba(16,185,129,.32); }
.pb-badge--sky     { background: rgba(56,189,248,.13); color: #7dd3fc; border-color: rgba(56,189,248,.30); }
.pb-badge--amber   { background: rgba(245,158,11,.14); color: #fcd34d; border-color: rgba(245,158,11,.32); }
.pb-badge--rose    { background: rgba(251,113,133,.14); color: #fda4af; border-color: rgba(251,113,133,.30); }
.pb-badge--orange  { background: rgba(249,115,22,.14); color: #fdba74; border-color: rgba(249,115,22,.30); }

/* @username */
.partner-bot-card__handle {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* краткое описание */
.partner-bot-card__short {
  position: relative; z-index: 1;
  font-size: 11.5px;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.4;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* стрелочка */
.partner-bot-card__open {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  flex-shrink: 0;
}

/* пагинация-точки (скрыта — список вертикальный) */
.partner-bots-dots { display: none; }

/* Hero "chips" подсказки рядом с описанием */
.hero-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: #cbd5e1; font-weight: 600;
  letter-spacing: .02em;
}
.hero-chip i { color: #a78bfa; }

/* ============================================================ */
/*  Stats modal (статистика канала из открытых источников)      */
/* ============================================================ */
.stats-modal-card {
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(139,92,246,0.18), transparent 60%),
    radial-gradient(800px 400px at 100% 100%, rgba(34,211,238,0.14), transparent 60%),
    rgba(11, 15, 26, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 22px;
  max-width: 720px; width: 92vw;
  max-height: 88vh; overflow: auto;
  box-shadow: 0 30px 80px -20px rgba(2,6,23,0.85);
}
.stats-kpi {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px; border-radius: 14px;
  text-align: center;
}
.stats-kpi__label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #94a3b8;
}
.stats-kpi__value {
  font-size: 18px; font-weight: 800; color: #fff; margin-top: 4px;
}
.stats-kpi__sub {
  font-size: 11px; color: #64748b; margin-top: 2px;
}
.stats-source-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1; text-decoration: none;
  transition: all .2s ease;
}
.stats-source-pill:hover {
  border-color: rgba(217,70,239,0.4);
  color: #fff;
  background: rgba(217,70,239,0.08);
}
.stats-source-pill i { color: #a78bfa; }

/* ===== Dashboard: Quick Actions Bar ===== */
.dash-quick-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .dash-quick-bar { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .dash-quick-bar { grid-template-columns: repeat(8, 1fr); }
}
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03); cursor: pointer;
  font-size: 11px; color: #94a3b8;
  transition: all .18s ease;
  user-select: none;
}
.quick-action:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: #f1f5f9;
  transform: translateY(-2px);
}
.quick-action:active { transform: translateY(0); }
.quick-action i { transition: transform .18s; }
.quick-action:hover i { transform: scale(1.15); }

/* ===== Dashboard: Pending actions banner ===== */
.pending-banner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(245,158,11,0.30);
  background: rgba(245,158,11,0.06);
  margin-bottom: 18px;
}

/* Кнопка «Статистика» в карточке каталога */
.btn-stats {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  background: rgba(34,211,238,0.10);
  border: 1px solid rgba(34,211,238,0.28);
  color: #67e8f9;
  transition: all .2s ease;
}
.btn-stats:hover {
  background: rgba(34,211,238,0.18);
  border-color: rgba(34,211,238,0.5);
  color: #fff;
}

/* =============================================================
   MOBILE RESPONSIVE FIXES (< 640px — sm breakpoint)
   ============================================================= */

/* ---- Scrollbar hidden on touch devices ---- */
@media (max-width: 639px) {
  ::-webkit-scrollbar { width: 3px; height: 3px; }
}

/* ---- Search: remove fixed min-width on mobile ---- */
@media (max-width: 639px) {
  .search { min-width: 0; width: 100%; }
}

/* ---- Header: tighter gap on mobile ---- */
@media (max-width: 479px) {
  header .ml-auto { gap: 4px; }
  header .ml-auto .p-2 { padding: 6px; }
}

/* ---- Chart heights: smaller on mobile ---- */
@media (max-width: 639px) {
  .chart-mobile-sm { height: 160px !important; }
  .chart-mobile-md { height: 180px !important; }
}

/* ---- KPI hero cards: allow narrower on very small screens ---- */
@media (max-width: 479px) {
  .kpi-hero { min-width: 120px; padding: 12px 38px 10px 11px; }
  .kpi-hero .kh-value { font-size: clamp(11px, 4vw, 15px); }
  .kpi-hero .kh-icon { width: 26px; height: 26px; top: 8px; right: 8px; }
}

/* ---- Hero section: compact on mobile ---- */
@media (max-width: 639px) {
  .hero-card { padding: 18px 18px; }
  .hero-card h1 { font-size: 1.5rem; }
}

/* ---- Buttons: compact on small screens ---- */
@media (max-width: 379px) {
  .btn { padding: 8px 12px; font-size: 12px; gap: 6px; }
}

/* ---- Seg tabs: horizontal scroll wrapper ---- */
@media (max-width: 639px) {
  .seg-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .seg-scroll-wrap .seg { flex-wrap: nowrap; }
}

/* ---- Modals: full-width on mobile ---- */
@media (max-width: 639px) {
  .modal-card {
    margin: 0 8px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Modal overlays with p-4: reduce to p-2 */
  .modal-p-adjust { padding: 8px !important; }
}

/* ---- Back bar: compact on mobile ---- */
@media (max-width: 479px) {
  .back-bar { padding: 7px 10px; gap: 8px; margin-bottom: 12px; }
  .back-crumb { font-size: 10px; gap: 4px; }
}

/* ---- Quick actions bar: 4 columns on very small ---- */
@media (max-width: 379px) {
  .dash-quick-bar { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .quick-action { padding: 10px 4px; font-size: 9px; gap: 5px; border-radius: 10px; }
}

/* ---- Tables: ensure min-width for readability ---- */
@media (max-width: 639px) {
  .admin-table, .anlx-table { font-size: 11px; }
  .admin-table th, .admin-table td { padding: 8px 8px; }
}

/* ---- Cards grid: single column on mobile ---- */
@media (max-width: 479px) {
  .card-grid-auto { grid-template-columns: 1fr !important; }
}

/* ---- Partner bots grid: single column on mobile ---- */
@media (max-width: 479px) {
  .partner-bots-grid { grid-template-columns: 1fr; }
}

/* ---- Content area: bottom padding for safe area ---- */
@media (max-width: 1023px) {
  .main-content-area {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  }
}

/* ---- Toast: left margin on mobile ---- */
@media (max-width: 639px) {
  .fixed.bottom-4.right-4 { left: 16px; right: 16px; }
}

/* ---- Compare bar: full width on mobile ---- */
@media (max-width: 639px) {
  .compare-bar {
    left: 12px; right: 12px;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ---- Wallet chart + payment charts height ---- */
@media (max-width: 639px) {
  [id$="Chart"] { max-height: 180px; }
}

/* ---- Stat charts (disputes/withdrawals) ---- */
@media (max-width: 639px) {
  .chart-glass { padding: 14px 14px; border-radius: 14px; }
  .chart-glass .text-sm { font-size: 12px; }
}

/* ---- Deal/Platform cards on mobile ---- */
@media (max-width: 639px) {
  .platform-card, .deal-card { padding: 12px 14px; }
}

/* ---- Section headings on mobile ---- */
@media (max-width: 479px) {
  .page-title { font-size: 1.1rem; }
  .section-meta { font-size: 10px; }
}

/* ---- Modal overlay: reduce padding on mobile ---- */
@media (max-width: 639px) {
  .modal-overlay,
  [class*="fixed inset-0"][class*="flex items-center justify-center"] {
    padding: 8px !important;
    align-items: flex-end;
  }
  .modal-card,
  .modal-card.card {
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  /* Center small modals (confirm, etc.) */
  .modal-card.max-w-sm,
  .modal-card.max-w-xs {
    border-radius: 20px !important;
    margin: auto !important;
    max-width: calc(100vw - 16px) !important;
    align-self: center;
  }
}

/* ---- Prevent horizontal overflow of main layout ---- */
body, html { overflow-x: hidden; max-width: 100vw; }
main { min-width: 0; overflow-x: hidden; }

/* ---- Hero action buttons: wrap nicely on mobile ---- */
@media (max-width: 479px) {
  .hero-card .btn { font-size: 11px; padding: 8px 10px; gap: 5px; }
  .hero-card .btn i { width: 14px; height: 14px; }
}

/* ---- Seg-tabs inside filter bars: make parent scrollable ---- */
@media (max-width: 639px) {
  .seg { white-space: nowrap; }
  div > .seg { max-width: 100%; overflow-x: auto; }
}

/* ---- Wallet chart: limit height on mobile ---- */
@media (max-width: 639px) {
  #walletChart { max-height: 160px; }
}

/* ---- Analytics funnel bars: shrink on mobile ---- */
@media (max-width: 639px) {
  .anlx-funnel-bar { height: 28px !important; }
}

/* =============================================================
   CHART.JS INFINITE GROWTH PREVENTION
   ============================================================= 
   Problem: Chart.js `responsive:true, maintainAspectRatio:false`
   polls the parent's clientHeight. If canvas is in document flow,
   it contributes to parent height → parent grows → canvas grows.
   Fix: all chart canvases are absolutely positioned inside their
   fixed-height containers, which also clip with overflow:hidden.
   ============================================================= */

/* Step 1 — every div that directly wraps a named chart canvas
   must be a positioned block that clips overflow */
div:has(> canvas[id]:not([id="balanceSparkline"])) {
  position: relative !important;
  overflow: hidden !important;
}

/* Step 2 — named chart canvases fill their container absolutely
   so Chart.js reads a stable, unchanging clientHeight */
canvas[id]:not([id="balanceSparkline"]) {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width:  100% !important;
  height: 100% !important;
}

/* =============================================================
   MOBILE — additional fixes for smaller screens
   ============================================================= */

/* KPI hero row: horizontal scroll on very narrow screens */
@media (max-width: 479px) {
  .kpi-hero-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    gap: 8px;
  }
  .kpi-hero-row .kpi-hero { scroll-snap-align: start; }
}

/* Admin KPI grid: 2 columns on small screens */
@media (max-width: 639px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}

/* Charts on very small screens: reduce height via named chart containers */
@media (max-width: 479px) {
  /* Only chart wrappers — NOT generic layout divs */
  .chart-glass > div { max-height: 160px !important; }
}

/* Prevent admin table horizontal overflow: make it scroll */
@media (max-width: 767px) {
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table      { min-width: 520px; }
}

/* Fix main layout on mobile: don't allow shrink below 0 */
@media (max-width: 1023px) {
  main > div { min-width: 0; }
}

/* Seg-tabs: ensure horizontal scroll always on mobile */
@media (max-width: 639px) {
  .seg { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
         padding-bottom: 4px; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
}

/* Referrals chart row: single column on mobile */
@media (max-width: 639px) {
  .ref-charts-grid { grid-template-columns: 1fr !important; }
}

/* Notifications: compact on mobile */
@media (max-width: 479px) {
  .notif-item { padding: 10px 12px; gap: 8px; }
  .notif-item .text-sm { font-size: 11px; }
}

/* Dispute/withdrawal cards: less padding on mobile */
@media (max-width: 479px) {
  .dsp-card, .wd-card { padding: 10px 12px; }
  .dsp-card .text-xs, .wd-card .text-xs { font-size: 10px; }
}

/* Analytics KPI row: compact on mobile */
@media (max-width: 479px) {
  .anlx-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .anlx-kpi-card { padding: 10px 12px !important; }
}

/* =========================================================
   SCROLL-TO-TOP BUTTON
   ========================================================= */
.scroll-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(139,92,246,0.18);
  border: 1px solid rgba(139,92,246,0.35);
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  backdrop-filter: blur(8px);
}
.scroll-top-btn:hover {
  background: rgba(139,92,246,0.32);
  color: #ede9fe;
  transform: translateY(-2px);
}
.scroll-top-btn[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* =========================================================
   ENHANCED COMPARE MODAL
   ========================================================= */
.compare-grid .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
}
.compare-grid > * {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  display: flex;
  align-items: center;
}
.compare-grid .winner {
  color: #4ade80;
  font-weight: 700;
}
.compare-grid .winner::after {
  content: '✓';
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
}

/* =========================================================
   ONBOARDING BANNER
   ========================================================= */
.onboard-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(59,130,246,0.1) 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
}
.onboard-banner__icon {
  width: 36px; height: 36px;
  background: rgba(139,92,246,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.onboard-close {
  position: absolute; top: 10px; right: 10px;
  color: #64748b; background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 6px;
  transition: color 0.15s;
}
.onboard-close:hover { color: #94a3b8; }
.onboard-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.onboard-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #94a3b8;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 3px 10px;
  cursor: pointer; transition: all 0.15s;
}
.onboard-step:hover { border-color: rgba(139,92,246,0.4); color: #c4b5fd; }
.onboard-step.done { color: #4ade80; border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }
.onboard-step i { flex-shrink: 0; }
