/* Boccho CRM — animated AI-style brand logo */

.sidebar-brand,
.brand-logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-block {
  flex-direction: column;
  text-align: center;
}

.logo.brand-logo-block {
  margin-bottom: 1.75rem;
}

.brand-logo {
  position: relative;
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.brand-logo--lg {
  width: 2.4rem;
  height: 2.4rem;
}

.brand-logo-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 155, 213, 0.35) 0%,
    rgba(155, 142, 196, 0.22) 35%,
    rgba(204, 153, 51, 0.18) 55%,
    transparent 72%
  );
  animation: brand-glow-pulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

.brand-logo-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-sidebar, #0f0f0f), var(--bg-sidebar, #0f0f0f)) padding-box,
    conic-gradient(
      from 0deg,
      rgba(91, 155, 213, 0.85),
      rgba(155, 142, 196, 0.85),
      rgba(204, 153, 51, 0.95),
      rgba(91, 155, 213, 0.85)
    ) border-box;
  animation: brand-ring-spin 8s linear infinite;
  opacity: 0.75;
  pointer-events: none;
}

.brand-logo--lg .brand-logo-ring {
  inset: -3px;
}

.brand-logo-core {
  position: relative;
  z-index: 2;
  font-size: 1.05rem;
  line-height: 1;
  background: linear-gradient(
    135deg,
    #7eb8f0 0%,
    #b8a8e8 35%,
    var(--gold, #cc9933) 65%,
    #f0d080 100%
  );
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(204, 153, 51, 0.45));
  animation: brand-core-shimmer 4s ease-in-out infinite;
}

.brand-logo--lg .brand-logo-core {
  font-size: 1.45rem;
}

.brand-logo-scan {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: none;
}

.brand-logo-scan::after {
  content: '';
  position: absolute;
  left: -40%;
  top: 50%;
  width: 45%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(126, 184, 240, 0.15),
    rgba(255, 255, 255, 0.85),
    rgba(204, 153, 51, 0.35),
    transparent
  );
  box-shadow: 0 0 10px rgba(126, 184, 240, 0.35);
  animation: brand-scan-sweep 2.8s ease-in-out infinite;
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text, #fff);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-text--auth {
  font-size: 1.3rem;
  margin-top: 0.35rem;
}

.brand-word {
  background: linear-gradient(
    110deg,
    var(--gold, #cc9933) 0%,
    #f0d080 22%,
    #b8a8e8 45%,
    #7eb8f0 58%,
    var(--gold-light, #d4a84a) 78%,
    var(--gold, #cc9933) 100%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-word-shimmer 5s ease-in-out infinite;
}

.logo-sub {
  font-size: 0.82rem;
  color: var(--text-tertiary, #5a5549);
  margin-top: 0.25rem;
}

.brand-logo-block .brand-logo-glow {
  inset: -10px;
}

@keyframes brand-glow-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes brand-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes brand-core-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 8px rgba(204, 153, 51, 0.45));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 12px rgba(126, 184, 240, 0.5));
  }
}

@keyframes brand-scan-sweep {
  0% {
    transform: translateX(0) rotate(-18deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  55% {
    transform: translateX(280%) rotate(-18deg);
    opacity: 1;
  }
  100% {
    transform: translateX(280%) rotate(-18deg);
    opacity: 0;
  }
}

@keyframes brand-word-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-glow,
  .brand-logo-ring,
  .brand-logo-core,
  .brand-logo-scan::after,
  .brand-word {
    animation: none !important;
  }

  .brand-logo-ring {
    opacity: 0.45;
  }

  .brand-logo-core,
  .brand-word {
    background-position: 50% 50%;
  }
}

@media (max-width: 768px) {
  .sidebar-brand {
    padding: 1rem 1.1rem;
    gap: 0.6rem;
  }

  .brand-text {
    font-size: 0.98rem;
  }

  .brand-logo {
    width: 1.5rem;
    height: 1.5rem;
  }
}
