/* ============================================
   HERO MANAGEMENT CARD — Glassmorphism
   Agent-of-Record card with edge relationships
   ============================================ */

.hero-mgmt-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---- Header ---- */
.hmc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hmc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(216, 98, 240, 0.1);
  border: 1px solid rgba(216, 98, 240, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hmc-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.hmc-name {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hmc-meta {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

.hmc-status {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* ---- Edge Relationships ---- */
.hmc-edges {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hmc-edges-title {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 12px;
}

.hmc-edge-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hmc-edge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  opacity: 0;
  transform: translateY(6px);
  animation: hmcFadeIn 0.4s ease forwards;
}

.hmc-edge[data-delay="0"] { animation-delay: 0.6s; }
.hmc-edge[data-delay="1"] { animation-delay: 0.9s; }
.hmc-edge[data-delay="2"] { animation-delay: 1.2s; }
.hmc-edge[data-delay="3"] { animation-delay: 1.5s; }
.hmc-edge[data-delay="4"] { animation-delay: 1.8s; }

.hmc-edge + .hmc-edge {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.hmc-edge-type {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 88px;
  text-align: center;
}

.hmc-edge-type--owns {
  background: rgba(216, 98, 240, 0.1);
  border: 1px solid rgba(216, 98, 240, 0.18);
  color: #d862f0;
}

.hmc-edge-type--budgeted {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: #10B981;
}

.hmc-edge-type--configured {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: #3B82F6;
}

.hmc-edge-type--triggers {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.hmc-edge-type--escalates {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

.hmc-edge-desc {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.hmc-edge-dim {
  color: rgba(255, 255, 255, 0.35);
}

.hmc-edge-arrow {
  color: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ---- Stats Section ---- */
.hmc-stats {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hmc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
}

.hmc-row + .hmc-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.hmc-label {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  min-width: 55px;
}

.hmc-value {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: -0.01em;
  text-align: right;
}

/* Budget bar */
.hmc-budget {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.hmc-budget-bar {
  width: 100px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.hmc-budget-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10B981, #f59e0b);
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hmc-budget-text {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* Access tags */
.hmc-access-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hmc-tag {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: -0.01em;
}

/* ---- Emergency Controls ---- */
.hmc-controls {
  padding: 14px 24px 18px;
}

.hmc-controls-title {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 10px;
}

.hmc-controls-row {
  display: flex;
  gap: 8px;
}

.hmc-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  background: transparent;
}

.hmc-btn--pause {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.06);
}

.hmc-btn--pause:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.hmc-btn--stop {
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.2);
  background: rgba(249, 115, 22, 0.06);
}

.hmc-btn--stop:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
}

.hmc-btn--kill {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.06);
}

.hmc-btn--kill:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

/* ---- Hero Right Container ---- */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

@media (min-width: 900px) {
  .hero-right {
    flex: 1;
  }
}

/* ---- Animation ---- */
@keyframes hmcFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1199px) {
  .hero-mgmt-card {
    max-width: 400px;
  }

  .hmc-header {
    padding: 16px 20px;
  }

  .hmc-edges,
  .hmc-stats,
  .hmc-controls {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 899px) {
  .hero-right {
    margin-top: 0;
    padding: 32px 24px;
  }

  .hero-mgmt-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hmc-header {
    padding: 14px 16px;
  }

  .hmc-edges,
  .hmc-stats,
  .hmc-controls {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hmc-budget-bar {
    width: 70px;
  }

  .hmc-access-tags {
    gap: 4px;
  }

  .hmc-tag {
    font-size: 10px;
    padding: 2px 8px;
  }

  .hmc-edge-type {
    min-width: 72px;
    font-size: 9px;
  }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hmc-edge {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hmc-budget-fill {
    transition: none;
  }
}
