/* ── Agent character groups ───────────────────────────────────────── */
/*
  CRITICAL: Agent position is set via SVG transform ATTRIBUTE by JS (setAttribute).
  CSS `transform` on these elements REPLACES the attribute in browsers — causes
  the "fleeing" bug where agents snap to SVG origin on hover.
  Fix: use only filter/opacity on hover, never CSS transform on .agent-char.
*/
.agent-char {
  cursor: pointer;
  will-change: filter, opacity;
}

/* Glow effect on hover — no transform, no reflow */
.agent-char:hover { filter: brightness(1.35) drop-shadow(0 0 6px currentColor); }

/* Status dot pulse for online */
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.status-online { animation: status-pulse 2s ease-in-out infinite; }

/* Meeting table hover */
.meeting-table { cursor: pointer; }
.meeting-table:hover rect, .meeting-table:hover ellipse {
  filter: brightness(1.2);
}

/* ── Office agent dialog (bottom sheet) ───────────────────────────── */
#office-agent-dialog {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  transition: transform 0.3s ease;
  width: 520px;
  max-width: 96vw;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.7);
}
#office-agent-dialog.open { transform: translateX(-50%) translateY(0); }

.dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dialog-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.dialog-name { font-weight: 700; font-size: 15px; }
.dialog-close {
  margin-left: auto;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 18px;
  padding: 4px 8px;
}

.dialog-tasks h4 { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.task-chip {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  margin: 2px;
}

.dialog-chat { display: flex; gap: 8px; margin-top: 12px; }
.dialog-chat input { flex: 1; }

/* ── Meeting modal ────────────────────────────────────────────────── */
#meeting-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#meeting-modal .meeting-inner {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(88,166,255,0.15);
}

/* ── Sidebar agent full-info panel ───────────────────────────────── */
#sidebar-agent-detail {
  position: fixed;
  top: 48px;
  left: 0;
  width: 320px;
  max-width: 95vw;
  height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  z-index: 500;
  padding: 16px;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}
#sidebar-agent-detail.open { transform: translateX(0); }
#sidebar-agent-detail .close-detail {
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.xp-bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 4px 0 2px; }
.xp-bar-fill  { height: 100%; border-radius: 4px; transition: width 1s ease; }

.info-section { margin-bottom: 16px; }
.info-section h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.metric-row:last-child { border-bottom: none; }
.metric-val { font-weight: 600; color: var(--accent); }
