/* ==========================================================================
   KITTYHOST OS - HYPER-MODERN CYBER-GIRLY & ANIMATED THEME
   Strict Rule: Security Dashboard (.security-dashboard) is 100% UNTOUCHED!
   ========================================================================== */

:root {
  --neon-pink-hot: #ff2a85;
  --neon-pink-bubble: #ff65a3;
  --neon-pink-soft: #ffb8d7;
  --cyber-magenta: #e11d48;
  --cyber-fuchsia: #d946ef;
  --holo-violet: #a855f7;
  --holo-purple: #8b5cf6;
  --holo-cyan: #06b6d4;
  --dark-obsidian: #0e0712;
  --dark-plum: #1a0b1f;
  --glass-border: rgba(255, 105, 180, 0.3);
  --glass-border-glow: rgba(255, 42, 133, 0.45);
  --glass-bg-card: rgba(25, 11, 28, 0.75);
  --glass-bg-card-light: rgba(255, 255, 255, 0.95);
  --laser-pink-glow: 0 0 20px rgba(255, 42, 133, 0.55), 0 0 40px rgba(217, 70, 239, 0.25);
}

/* --------------------------------------------------------------------------
   Ambient Cyber Background (VisionOS Fluid Orbs + Tech Dot Matrix)
   Strictly hidden/disabled on Security Dashboard!
   -------------------------------------------------------------------------- */
#kitty-ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  transition: opacity 0.5s ease;
}

body:has(.security-dashboard) #kitty-ambient-canvas,
body.is-security-view #kitty-ambient-canvas,
.security-dashboard ~ #kitty-ambient-canvas {
  display: none !important;
  opacity: 0 !important;
}

/* --------------------------------------------------------------------------
   ANIMATED CYBER-KITTY COMPANION (In Sidebar / Side Perch)
   Strictly hidden on Security Dashboard!
   -------------------------------------------------------------------------- */
.kitty-companion-card {
  margin: 18px 12px 14px;
  padding: 14px 12px;
  background: linear-gradient(145deg, rgba(38, 14, 42, 0.8), rgba(20, 8, 24, 0.92));
  border: 1.5px solid rgba(255, 105, 180, 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 30px -5px rgba(255, 42, 133, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  cursor: pointer;
  z-index: 10;
}

.kitty-companion-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--neon-pink-hot);
  box-shadow: 0 16px 40px -5px rgba(255, 42, 133, 0.5), inset 0 0 15px rgba(255, 105, 180, 0.2);
}

body:has(.security-dashboard) .kitty-companion-card,
body.is-security-view .kitty-companion-card {
  display: none !important;
}

/* Speech Bubble */
.kitty-bubble {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 235, 245, 0.95));
  border: 1.5px solid var(--neon-pink-soft);
  color: #831843;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(255, 42, 133, 0.25);
  margin-bottom: 8px;
  text-align: center;
  animation: bubbleFloat 3s ease-in-out infinite;
  white-space: nowrap;
}

.kitty-bubble:after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(255, 235, 245, 0.98);
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Cat Animations */
@keyframes kittyBreathing {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(1.5px) scaleY(0.97); }
}

@keyframes earTwitchLeft {
  0%, 88%, 100% { transform: rotate(0deg); }
  92% { transform: rotate(-8deg); }
  96% { transform: rotate(-2deg); }
}

@keyframes earTwitchRight {
  0%, 86%, 100% { transform: rotate(0deg); }
  90% { transform: rotate(8deg); }
  94% { transform: rotate(2deg); }
}

@keyframes kittyBlink {
  0%, 94%, 98%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.08); }
}

@keyframes tailSwish {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(14deg); }
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px #ff2a85); }
  50% { transform: scale(1.25); filter: drop-shadow(0 0 10px #ff2a85) drop-shadow(0 0 16px #ff70a6); }
}

.kitty-svg {
  width: 140px;
  height: 98px;
  overflow: visible;
  filter: drop-shadow(0 6px 12px rgba(255, 42, 133, 0.25));
}

.kitty-body-group {
  animation: kittyBreathing 3.6s ease-in-out infinite;
  transform-origin: center bottom;
}

.kitty-ear-left {
  animation: earTwitchLeft 6s ease-in-out infinite;
  transform-origin: 48px 38px;
}

.kitty-ear-right {
  animation: earTwitchRight 7.2s ease-in-out infinite;
  transform-origin: 92px 38px;
}

.kitty-eye {
  animation: kittyBlink 4.2s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.kitty-tail {
  animation: tailSwish 2.8s ease-in-out infinite;
  transform-origin: 110px 80px;
}

.kitty-heart-charm {
  animation: heartPulse 1.8s ease-in-out infinite;
  transform-origin: 70px 78px;
}

/* Purr vibration when hovering companion */
.kitty-companion-card:hover .kitty-body-group {
  animation: purrVibe 0.15s ease-in-out infinite alternate !important;
}

@keyframes purrVibe {
  0% { transform: translateY(0); }
  100% { transform: translateY(-1px); }
}

/* --------------------------------------------------------------------------
   FLAG-WAVE LOADING SPINNER (Hypnotic Neon Wave)
   -------------------------------------------------------------------------- */
@keyframes flagWaveNeon {
  0% {
    transform: translateY(0px) scale(0.85);
    opacity: 0.4;
    box-shadow: 0 0 4px rgba(255, 105, 180, 0.4);
  }
  22% {
    transform: translateY(-18px) scale(1.3);
    opacity: 1;
    box-shadow: 0 0 16px #ff2a85, 0 0 28px #ec4899, 0 0 38px #d946ef;
    filter: brightness(1.25);
  }
  44% {
    transform: translateY(0px) scale(0.95);
    opacity: 0.65;
    box-shadow: 0 0 6px #ff2a85;
  }
  66% {
    transform: translateY(14px) scale(0.8);
    opacity: 0.35;
    box-shadow: 0 0 3px #a855f7;
  }
  88%, 100% {
    transform: translateY(0px) scale(0.85);
    opacity: 0.4;
  }
}

.kitty-flag-spinner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 28px;
  border-radius: 24px;
  background: rgba(30, 10, 34, 0.75);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 12px 35px -5px rgba(255, 42, 133, 0.35);
  margin: 16px auto;
  user-select: none;
}

.kitty-flag-spinner-track {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 6px;
}

.kitty-flag-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  animation: flagWaveNeon 1.45s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.kitty-flag-dot:nth-child(1) { animation-delay: 0.00s; background: linear-gradient(135deg, #ff9ec4, #ff2a85); }
.kitty-flag-dot:nth-child(2) { animation-delay: 0.12s; background: linear-gradient(135deg, #ff2a85, #ec4899); }
.kitty-flag-dot:nth-child(3) { animation-delay: 0.24s; background: linear-gradient(135deg, #ec4899, #f43f5e); }
.kitty-flag-dot:nth-child(4) { animation-delay: 0.36s; background: linear-gradient(135deg, #f43f5e, #d946ef); }
.kitty-flag-dot:nth-child(5) { animation-delay: 0.48s; background: linear-gradient(135deg, #d946ef, #c084fc); }
.kitty-flag-dot:nth-child(6) { animation-delay: 0.60s; background: linear-gradient(135deg, #c084fc, #a855f7); }
.kitty-flag-dot:nth-child(7) { animation-delay: 0.72s; background: linear-gradient(135deg, #a855f7, #8b5cf6); }

.kitty-flag-caption {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff7dae, #ff2a85, #d946ef, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   HYPER-MODERN SIDEBAR & NAVIGATION (Cyber-Glass Aesthetic)
   -------------------------------------------------------------------------- */
.studio-sidebar {
  background: linear-gradient(180deg, rgba(22, 9, 25, 0.95) 0%, rgba(14, 5, 16, 0.98) 100%) !important;
  border-right: 1.5px solid rgba(255, 105, 180, 0.25) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  box-shadow: 10px 0 40px -10px rgba(255, 42, 133, 0.18) !important;
}

.brand-cat {
  background: linear-gradient(135deg, #fff2f8 0%, #ffd4e8 100%) !important;
  border: 2px solid var(--neon-pink-hot) !important;
  box-shadow: 0 0 20px var(--glass-border-glow) !important;
  border-radius: 16px !important;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.brand-cat:hover {
  transform: scale(1.15) rotate(8deg) !important;
  box-shadow: 0 0 30px var(--neon-pink-hot) !important;
}

.brand-name {
  background: linear-gradient(135deg, #ffffff 15%, #ffd6e8 55%, #ff2a85 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 900 !important;
  letter-spacing: -0.05em !important;
  filter: drop-shadow(0 0 12px rgba(255, 42, 133, 0.45));
}

.nav-item {
  border-radius: 14px !important;
  transition: all 0.26s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin: 3px 0 !important;
  font-weight: 600 !important;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 42, 133, 0.15) !important;
  color: #fff !important;
  transform: translateX(6px) !important;
  border-color: rgba(255, 105, 180, 0.4) !important;
}

.nav-item.is-active {
  background: linear-gradient(135deg, #e11d48 0%, #ec4899 50%, #d946ef 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px -2px rgba(236, 72, 153, 0.6), 0 0 12px rgba(255, 42, 133, 0.4) !important;
  transform: translateX(8px) !important;
  font-weight: 750 !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   DASHBOARD OVERVIEW HERO (Cyber-Pastel VisionOS Glow)
   -------------------------------------------------------------------------- */
@keyframes cyberGlowShift {
  0% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(18deg); }
  100% { filter: hue-rotate(0deg); }
}

.modern-dashboard .dashboard-overview-hero {
  background: linear-gradient(135deg, #1f0a24 0%, #351038 50%, #260a26 100%) !important;
  border: 1.5px solid rgba(255, 105, 180, 0.45) !important;
  box-shadow: 0 24px 70px -15px rgba(255, 42, 133, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 26px !important;
  position: relative;
  overflow: hidden;
  animation: cyberGlowShift 12s ease-in-out infinite;
}

.modern-dashboard .dashboard-overview-hero:after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  background-image: 
    radial-gradient(circle, rgba(255, 42, 133, 0.2) 1.2px, transparent 1.2px),
    radial-gradient(ellipse at 80% 20%, rgba(217, 70, 239, 0.28), transparent 50%) !important;
  background-size: 18px 18px, 100% 100% !important;
  pointer-events: none !important;
}

.modern-dashboard .dashboard-overview-hero h1 {
  background: linear-gradient(135deg, #ffffff 15%, #ffe0ee 55%, #ff5299 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  letter-spacing: -0.05em !important;
  font-weight: 850 !important;
  filter: drop-shadow(0 0 16px rgba(255, 42, 133, 0.35));
}

/* --------------------------------------------------------------------------
   TOPOLOGY CANVAS & NETWORK MAP (High-Tech Holographic Nodes & Wire Lasers)
   -------------------------------------------------------------------------- */
@keyframes wireLaserFlow {
  0% { stroke-dashoffset: 32; }
  100% { stroke-dashoffset: 0; }
}

@keyframes hubEnergyCore {
  0%, 100% {
    box-shadow: 0 0 0 10px rgba(255, 42, 133, 0.2), 0 0 0 24px rgba(217, 70, 239, 0.1), 0 10px 45px rgba(255, 42, 133, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(255, 42, 133, 0.38), 0 0 0 34px rgba(217, 70, 239, 0.18), 0 16px 60px rgba(255, 42, 133, 0.75);
    transform: scale(1.05);
  }
}

.modern-dashboard .infrastructure-canvas {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(217, 70, 239, 0.08), transparent 65%),
    radial-gradient(circle, rgba(255, 42, 133, 0.25) 1.2px, transparent 1.2px) !important;
  background-size: 100% 100%, 22px 22px !important;
  border-radius: 26px !important;
}

/* Caddy Central Hub */
.modern-dashboard .map-proxy {
  background: radial-gradient(circle at 35% 25%, #ffffff 0%, #ffd0e5 40%, #ff4290 100%) !important;
  border: 2.5px solid var(--neon-pink-hot) !important;
  animation: hubEnergyCore 3.2s ease-in-out infinite !important;
}

.modern-dashboard .map-proxy:hover {
  transform: scale(1.1) !important;
}

/* Map Nodes */
.modern-dashboard .map-node {
  border: 1.5px solid rgba(255, 105, 180, 0.38) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 8px 24px -4px rgba(255, 42, 133, 0.14) !important;
  backdrop-filter: blur(16px) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.modern-dashboard .map-node:hover {
  border-color: var(--neon-pink-hot) !important;
  box-shadow: 0 14px 38px -4px rgba(255, 42, 133, 0.38), 0 0 16px rgba(255, 105, 180, 0.3) !important;
  transform: translateY(-5px) scale(1.03) !important;
}

.modern-dashboard .map-node.is-selected {
  border-color: #ff1493 !important;
  box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.3), 0 14px 35px rgba(255, 20, 147, 0.35) !important;
  background: #fff0f7 !important;
}

/* Topology Wires with High-Speed Laser Dash */
.modern-dashboard .map-wire {
  stroke: #ff5299 !important;
  stroke-width: 2.2 !important;
  stroke-dasharray: 8 6 !important;
  animation: wireLaserFlow 1.3s linear infinite !important;
  filter: drop-shadow(0 0 4px rgba(255, 82, 153, 0.7)) !important;
}

.modern-dashboard .map-wire:not(.is-dim):not(.is-disabled) {
  stroke: #ff0077 !important;
  stroke-width: 2.8 !important;
  filter: drop-shadow(0 0 8px #ff0077) drop-shadow(0 0 14px rgba(255, 0, 119, 0.6)) !important;
}

/* --------------------------------------------------------------------------
   BUTTONS & CARDS (Ultra-Modern Neon Beams)
   -------------------------------------------------------------------------- */
.btn-primary:not(.security-dashboard *):not([class*="security-"]),
button.bg-indigo-600:not(.security-dashboard *),
button.bg-pink-600:not(.security-dashboard *) {
  background: linear-gradient(135deg, #ff1493 0%, #ec4899 50%, #a855f7 100%) !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #fff !important;
  font-weight: 750 !important;
  box-shadow: 0 6px 25px -2px rgba(255, 20, 147, 0.55) !important;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-primary:not(.security-dashboard *):hover,
button.bg-indigo-600:not(.security-dashboard *):hover {
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 10px 35px rgba(255, 20, 147, 0.75), 0 0 20px rgba(236, 72, 153, 0.5) !important;
}

.modern-dashboard>.grid>.panel {
  border: 1.5px solid rgba(255, 105, 180, 0.35) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 10px 30px -5px rgba(255, 42, 133, 0.1) !important;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease !important;
}

.modern-dashboard>.grid>.panel:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 18px 45px -5px rgba(255, 42, 133, 0.22) !important;
  border-color: var(--neon-pink-hot) !important;
}

/* --------------------------------------------------------------------------
   STRICT PROTECTION OF SECURITY DASHBOARD
   Zero style overrides for anything inside or related to .security-dashboard
   -------------------------------------------------------------------------- */
.security-dashboard,
.security-dashboard * {
  /* 100% Protected - Pure original styles */
}
