/* Herman dashboard — Telegram-tab style motion */

@keyframes tg-ripple {
  0% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 14px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes tg-orbit {
  0% { transform: rotate(0deg) translateX(4px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(4px) rotate(-360deg); }
}

@keyframes tg-gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes tg-breathe {
  0%, 100% { opacity: 0.85; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.15); }
}

@keyframes spin-dots {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.herman-hero {
  position: relative;
  overflow: hidden;
}
.herman-hero::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(56,189,248,0.12) 0%, transparent 45%),
              radial-gradient(circle at 70% 60%, rgba(192,132,252,0.1) 0%, transparent 40%);
  animation: tg-gradient-flow 8s ease infinite;
  background-size: 200% 200%;
  pointer-events: none;
}

.herman-briefing.pulse-panel {
  animation: tg-ripple 3s ease-in-out infinite;
}

.briefing-card, .briefing-chart-panel, .briefing-stat {
  animation: tg-breathe 4s ease-in-out infinite;
}
.briefing-card:nth-child(2) { animation-delay: 0.5s; }
.briefing-card:nth-child(3) { animation-delay: 1s; }

.hub-kpi-row .kpi-card {
  animation: tg-ripple 3.5s ease-in-out infinite;
}
.hub-kpi-row .kpi-card:nth-child(2) { animation-delay: 0.4s; }
.hub-kpi-row .kpi-card:nth-child(3) { animation-delay: 0.8s; }
.hub-kpi-row .kpi-card:nth-child(4) { animation-delay: 1.2s; }
.hub-kpi-row .kpi-card:nth-child(5) { animation-delay: 1.6s; }

.live-badge::before { animation: tg-orbit 2s linear infinite, pulse-dot 1.2s ease-in-out infinite; }

.briefing-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 20;
  border-radius: 12px;
}
.briefing-loading-overlay .loading-dots {
  display: flex;
  gap: 0.5rem;
}
.briefing-loading-overlay .loading-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--pulse-blue, #38bdf8);
  animation: spin-dots 1.2s ease-in-out infinite;
}
.briefing-loading-overlay .loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.briefing-loading-overlay .loading-dots span:nth-child(3) { animation-delay: 0.3s; }
.briefing-loading-overlay p { color: var(--text-primary); font-size: 1rem; margin: 0; }

.herman-briefing { position: relative; }

.retail-highlight {
  animation: fade-up 0.4s ease;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, background 0.2s;
  padding: 0.4rem 0.25rem;
  border-radius: 8px;
}
.retail-highlight:hover {
  background: rgba(56,189,248,0.1);
  transform: translateX(4px);
}

.feed-card { animation: tg-breathe 5s ease-in-out infinite; }

.count-up { display: inline-block; transition: color 0.3s; }

.section-fill:not(:empty) {
  min-height: 2rem;
}

.briefing-card h3, .horizon-card h3 {
  text-shadow: 0 0 20px rgba(56,189,248,0.25);
}

.topnav-herman.active, .topnav a.active {
  animation: pulse-ring 2.5s infinite;
}
