/* ============================================
   MIGHANTECT BUILDING — Dark Cyberpunk Theme
   Style: Neon Cyan/Purple/Magenta on Dark Navy
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
  --bg-deep:        #0a0a1a;
  --bg-surface:     #12122a;
  --bg-panel:       #1a1a3e;
  --bg-panel-hover: #222255;
  --bg-input:       #0e0e25;

  --neon-cyan:      #00f5ff;
  --neon-purple:    #7b2ff7;
  --neon-magenta:   #ff00ff;
  --neon-pink:      #ff3399;
  --neon-green:     #00ff88;
  --neon-amber:     #ffaa00;
  --neon-red:       #ff3366;

  --text-primary:   #e0e0ff;
  --text-secondary: #8888bb;
  --text-muted:     #555577;

  --glow-cyan:      0 0 10px rgba(0,245,255,0.4), 0 0 20px rgba(0,245,255,0.15);
  --glow-purple:    0 0 10px rgba(123,47,247,0.4), 0 0 20px rgba(123,47,247,0.15);
  --glow-pink:      0 0 10px rgba(255,51,153,0.4);

  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;

  --font-ui:        'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-mono:      'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  user-select: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 3px; }

/* ===== TOOLBAR (Top) ===== */
#toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid rgba(0,245,255,0.15);
  z-index: 100;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(var(--glow-cyan));
}

.toolbar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.version-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--neon-cyan);
  background: rgba(0,245,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: super;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gateway-indicator {
  font-size: 14px;
  color: #ff4444;
  margin-left: 4px;
  transition: color 0.3s ease;
  cursor: help;
}

.btn-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toolbar:hover {
  background: var(--bg-panel-hover);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.btn-icon-only {
  padding: 6px 10px;
  font-size: 16px;
}

/* ===== MAIN LAYOUT ===== */
#app {
  display: flex;
  height: calc(100vh - 48px);
}

/* ===== LIFT PANEL (Left) ===== */
#lift-panel {
  width: 165px;
  min-width: 165px;
  background: var(--bg-panel);
  border-right: 1px solid rgba(123,47,247,0.2);
  display: flex;
  flex-direction: column;
  padding: 10px 6px 10px 6px;
  z-index: 50;
  overflow: hidden;
}

#lift-buttons {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,47,247,0.4) transparent;
  padding-right: 2px;
}

#lift-buttons::-webkit-scrollbar {
  width: 4px;
}
#lift-buttons::-webkit-scrollbar-track {
  background: transparent;
}
#lift-buttons::-webkit-scrollbar-thumb {
  background: rgba(123,47,247,0.4);
  border-radius: 4px;
}
#lift-buttons::-webkit-scrollbar-thumb:hover {
  background: rgba(123,47,247,0.7);
}

.lift-header {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.lift-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lift-btn:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(123,47,247,0.3);
  color: var(--text-primary);
}

.lift-btn.active {
  background: linear-gradient(135deg, rgba(123,47,247,0.3), rgba(0,245,255,0.15));
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.lift-btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.lift-btn-label {
  font-size: 12px;
  line-height: 1.2;
}

/* Floor icon colors */
.floor-b  .lift-btn-icon { background: #3d2c1c; }
.floor-l1 .lift-btn-icon { background: #1a4a6a; }
.floor-l2 .lift-btn-icon { background: #6a1a6a; }
.floor-l3 .lift-btn-icon { background: #6a5a1a; }
.floor-l4 .lift-btn-icon { background: #1a6a3a; }
.floor-l5 .lift-btn-icon { background: #4a2a7a; }
.floor-l6 .lift-btn-icon { background: #2a5a5a; }

/* ===== GAME CONTAINER (Center) ===== */
#game-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

/* ===== CHAT / COMMAND PANEL (Bottom overlay) ===== */
#chat-panel {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(580px, calc(100% - 32px));
  background: rgba(18, 18, 42, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,245,255,0.15);
  border-radius: var(--radius-xl);
  padding: 10px 14px;
  z-index: 60;
}

.chat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.chat-messages {
  max-height: 80px;
  overflow-y: auto;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.chat-messages:empty {
  display: none;
}

.chat-msg {
  padding: 2px 0;
}

.chat-msg .msg-author {
  font-weight: 600;
  color: var(--neon-cyan);
}

/* ─── Typing indicator (Task G) ─── */
.chat-typing {
  opacity: 0.7;
  font-style: italic;
}
.typing-dots span {
  display: inline-block;
  animation: typingBounce 1.2s infinite;
  font-size: 14px;
  color: #7b2ff7;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-emoji-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-panel-hover);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-emoji-btn:hover {
  background: rgba(123,47,247,0.3);
}

#chat-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid rgba(0,245,255,0.1);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0,245,255,0.15);
}

#chat-input::placeholder {
  color: var(--text-muted);
}

.btn-send {
  padding: 7px 18px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.btn-send:hover {
  opacity: 0.9;
  box-shadow: var(--glow-cyan);
}

.btn-mic {
  padding: 7px 14px;
  background: var(--bg-panel-hover);
  border: 1px solid rgba(255,51,153,0.2);
  border-radius: var(--radius);
  color: var(--neon-pink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mic:hover {
  background: rgba(255,51,153,0.15);
  border-color: var(--neon-pink);
  box-shadow: var(--glow-pink);
}

/* ===== STATUS PANEL (Right) ===== */
#status-panel {
  width: 220px;
  min-width: 220px;
  background: var(--bg-panel);
  border-left: 1px solid rgba(123,47,247,0.2);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 50;
  overflow-y: auto;
}

#room-info h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.status-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.status-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
}

#agent-list h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#agent-list-items {
  list-style: none;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.agent-item:hover {
  border-color: rgba(0,245,255,0.2);
  background: var(--bg-panel-hover);
}

.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 6px rgba(0,255,136,0.5);
  flex-shrink: 0;
}

.agent-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.agent-role {
  font-size: 11px;
  color: var(--text-muted);
}

.agent-item.selected {
  border-color: var(--neon-cyan);
  background: rgba(0,245,255,0.08);
}

/* ===== AGENT SIDEBAR (NPC Detail Panel) ===== */
.agent-sidebar {
  position: fixed;
  top: 48px;
  right: 0;
  width: 320px;
  height: calc(100vh - 48px);
  background: var(--bg-panel);
  border-left: 1px solid rgba(0,245,255,0.2);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
.agent-sidebar.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.asb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,245,255,0.1);
}
.asb-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.asb-chat-jump {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  color: var(--text-primary);
}
.asb-chat-jump:hover {
  background: rgba(0, 245, 255, 0.22);
  border-color: rgba(0, 245, 255, 0.55);
}
.asb-header-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-align: center;
}
.asb-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.asb-avatar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.asb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(0, 245, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
}
.asb-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-purple);
  flex-shrink: 0;
}
.asb-dot.asb-dot-hidden {
  display: none;
}
.asb-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.asb-emoji {
  flex-shrink: 0;
  font-size: 17px;
  line-height: 1;
}
.asb-role {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.25;
  max-width: 100%;
}
.asb-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.asb-close:hover {
  background: rgba(255,51,102,0.15);
  color: var(--neon-red);
}

.asb-tabs {
  display: flex;
  border-bottom: 1px solid rgba(123,47,247,0.2);
}
.asb-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.asb-tab:hover {
  color: var(--text-secondary);
  background: rgba(0,245,255,0.03);
}
.asb-tab.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.asb-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.asb-section {
  margin-bottom: 16px;
}
.asb-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.asb-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.asb-quick-task {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid rgba(0,245,255,0.08);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.asb-quick-task:hover {
  border-color: var(--neon-cyan);
  background: rgba(0,245,255,0.06);
  box-shadow: 0 0 8px rgba(0,245,255,0.1);
}

.asb-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  padding: 8px 0;
}

.asb-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.asb-status-badge.idle {
  background: rgba(0,255,136,0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0,255,136,0.2);
}
.asb-status-badge.walking {
  background: rgba(0,245,255,0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0,245,255,0.2);
}
.asb-status-badge.working {
  background: rgba(123,47,247,0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(123,47,247,0.2);
}

.asb-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.asb-label {
  font-size: 11px;
  color: var(--text-muted);
}
.asb-value {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}
.asb-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius);
}
.asb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.asb-chip {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(123,47,247,0.1);
  border: 1px solid rgba(123,47,247,0.2);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

.asb-log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asb-log-item {
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  font-size: 11px;
  align-items: flex-start;
}
.asb-log-time {
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}
.asb-log-action {
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===== AUTONOMY PANEL ===== */
.autonomy-panel {
  position: fixed;
  right: 0;
  top: 46px;
  width: 420px;
  height: calc(100vh - 46px);
  background: var(--bg-panel);
  border-left: 1px solid rgba(0,245,255,0.15);
  display: flex;
  flex-direction: column;
  z-index: 60;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  transition: transform 0.25s ease;
}
.autonomy-panel.hidden { display: none; }

.aup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,245,255,0.05);
  border-bottom: 1px solid rgba(0,245,255,0.1);
}
.aup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}
.aup-icon { font-size: 16px; }
.aup-heartbeat-dot {
  font-size: 10px;
  color: #555;
  margin-left: 4px;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.aup-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.aup-close:hover { color: var(--neon-red); background: rgba(255,51,102,0.1); }

.aup-nav {
  display: flex;
  padding: 0 8px;
  gap: 2px;
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(123,47,247,0.15);
}
.aup-nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 4px;
  font-size: 11px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}
.aup-nav-btn:hover { color: var(--text-primary); background: rgba(123,47,247,0.08); }
.aup-nav-btn.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}
.aup-badge {
  font-size: 9px;
  background: var(--neon-red);
  color: white;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 4px;
}
.aup-badge.hidden { display: none; }

.aup-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.aup-section {
  margin-bottom: 16px;
}
.aup-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.aup-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  padding: 12px;
  text-align: center;
}

/* Workflow Cards */
.aup-wf-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aup-wf-card {
  background: var(--bg-surface);
  border: 1px solid rgba(0,245,255,0.15);
  border-radius: var(--radius);
  padding: 12px;
  cursor: default;
  transition: all 0.2s;
}
.aup-wf-card:hover { background: var(--bg-panel-hover); }
.aup-wf-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.aup-wf-icon { font-size: 18px; }
.aup-wf-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.aup-wf-desc { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.aup-wf-steps {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.aup-wf-launch {
  border: 1px solid;
  background: transparent;
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.aup-wf-launch:hover { filter: brightness(1.3); }
.aup-wf-launch:disabled { opacity: 0.5; cursor: default; }

/* Active Workflows */
.aup-wf-active {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 8px;
}
.aup-wf-active-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.aup-wf-status { margin-left: auto; font-size: 10px; font-weight: 700; }
.aup-wf-progress {
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.aup-wf-progress-bar { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.aup-wf-step-info { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.aup-wf-actions { display: flex; gap: 6px; margin-top: 6px; }
.aup-wf-btn {
  border: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 10px;
  cursor: pointer;
}
.aup-wf-btn:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

/* Agent Grid */
.aup-agent-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aup-agent-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: background 0.2s;
}
.aup-agent-card:hover { background: var(--bg-panel-hover); }
.aup-agent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.aup-agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aup-agent-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.aup-agent-state { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }
.aup-agent-role { font-size: 10px; color: var(--text-muted); margin-left: 16px; }
.aup-agent-task {
  font-size: 10px;
  color: var(--neon-cyan);
  margin: 4px 0 2px 16px;
  font-family: var(--font-mono);
}
.aup-agent-unread {
  font-size: 10px;
  color: var(--neon-amber);
  margin-left: 16px;
}
.aup-agent-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  margin-left: 16px;
}
.aup-agent-btn {
  border: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-secondary);
  padding: 2px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
}
.aup-agent-btn:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

.aup-bulk-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.aup-bulk-btn {
  border: 1px solid var(--text-muted);
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
}
.aup-bulk-btn:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

/* Messages */
.aup-msg-compose {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.aup-select, .aup-input {
  background: var(--bg-input);
  border: 1px solid rgba(0,245,255,0.15);
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-ui);
}
.aup-select { flex: 0 0 auto; min-width: 100px; }
.aup-input { flex: 1; min-width: 120px; }
.aup-input:focus, .aup-select:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}
.aup-send-btn {
  background: var(--neon-cyan);
  color: var(--bg-deep);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.aup-send-btn:hover { filter: brightness(1.2); }

.aup-msg-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.aup-msg-item {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  font-size: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.aup-msg-item.unread { border-left: 2px solid var(--neon-cyan); }
.aup-msg-time { color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }
.aup-msg-icon { flex-shrink: 0; }
.aup-msg-from { color: var(--neon-cyan); font-weight: 600; }
.aup-msg-arrow { color: var(--text-muted); }
.aup-msg-to { color: var(--neon-purple); font-weight: 600; }
.aup-msg-content { color: var(--text-secondary); flex: 1; min-width: 100px; }

/* Heartbeat */
.aup-hb-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.aup-hb-dot { font-size: 16px; }
.aup-hb-info {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 8px;
}
.aup-hb-config {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}
.aup-hb-config label {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 120px;
}
.aup-hb-config input {
  width: 80px;
}
.aup-hb-check {
  font-size: 11px;
  color: var(--neon-green);
}
.aup-hb-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px;
}
.aup-hb-btn {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  transition: all 0.2s;
}
.aup-hb-btn.start {
  background: rgba(0,255,136,0.1);
  border-color: var(--neon-green);
  color: var(--neon-green);
}
.aup-hb-btn.start:hover { background: rgba(0,255,136,0.25); }
.aup-hb-btn.stop {
  background: rgba(255,51,102,0.1);
  border-color: var(--neon-red);
  color: var(--neon-red);
}
.aup-hb-btn.stop:hover { background: rgba(255,51,102,0.25); }
.aup-hb-btn:disabled { opacity: 0.5; cursor: default; }

/* ===== AGENT CAPABILITY PANEL ===== */
.capability-panel {
  position: fixed;
  right: 0;
  top: 46px;
  width: 400px;
  height: calc(100vh - 46px);
  background: var(--bg-panel);
  border-left: 1px solid rgba(123,47,247,0.2);
  display: flex;
  flex-direction: column;
  z-index: 59;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}
.capability-panel.hidden { display: none; }

/* ── Prevent capability-panel from overlapping agent-sidebar ── */
body:has(.agent-sidebar:not(.hidden)) .capability-panel:not(.hidden) {
  right: 320px;
}

.cap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(123,47,247,0.08);
  border-bottom: 1px solid rgba(123,47,247,0.15);
}
.cap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-purple);
  letter-spacing: 0.5px;
}
.cap-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.cap-close:hover { color: var(--neon-red); }

.cap-nav {
  display: flex;
  padding: 0 8px;
  gap: 2px;
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(123,47,247,0.1);
}
.cap-nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 4px;
  font-size: 11px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.cap-nav-btn:hover { color: var(--text-primary); }
.cap-nav-btn.active {
  color: var(--neon-purple);
  border-bottom-color: var(--neon-purple);
}

.cap-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.cap-section { margin-bottom: 16px; }
.cap-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.cap-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  padding: 12px;
  text-align: center;
}

/* Skill chips */
.cap-skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cap-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid rgba(0,255,136,0.15);
  color: var(--neon-green);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}
.cap-skill-chip .cap-skill-level {
  background: rgba(0,255,136,0.15);
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
}

/* Capability bars */
.cap-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cap-bar-label {
  font-size: 10px;
  color: var(--text-secondary);
  min-width: 80px;
}
.cap-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.cap-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.cap-bar-value {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  min-width: 30px;
  text-align: right;
}

/* Artifact cards */
.cap-artifact-list { display: flex; flex-direction: column; gap: 6px; }
.cap-artifact-item {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 11px;
}
.cap-artifact-type {
  font-size: 9px;
  color: var(--neon-amber);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cap-artifact-preview {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 3px;
  font-family: var(--font-mono);
}
.cap-artifact-time {
  color: var(--text-muted);
  font-size: 9px;
  margin-top: 2px;
}

/* Idea cards */
.cap-idea-list { display: flex; flex-direction: column; gap: 6px; }
.cap-idea-item {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 8px 10px;
  border-left: 3px solid var(--neon-amber);
}
.cap-idea-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.cap-idea-desc {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.cap-idea-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 9px;
  color: var(--text-muted);
}
.cap-idea-actions { display: flex; gap: 4px; margin-top: 6px; }
.cap-idea-btn {
  border: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 9px;
  cursor: pointer;
}
.cap-idea-btn:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

/* Model info */
.cap-model-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 10px;
  border: 1px solid rgba(0,245,255,0.1);
}
.cap-model-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
}
.cap-model-detail {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ===== WORKFLOW EDITOR (Visual Node Graph) ===== */
.wfe {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
}
.wfe.hidden { display: none; }

/* Toolbar */
.wfe-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid rgba(0,245,255,0.15);
  height: 46px;
  flex-shrink: 0;
}
.wfe-toolbar-left, .wfe-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wfe-logo {
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}
.wfe-name-input {
  background: var(--bg-input);
  border: 1px solid rgba(0,245,255,0.15);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  width: 200px;
  font-family: var(--font-ui);
}
.wfe-name-input:focus { outline: none; border-color: var(--neon-cyan); box-shadow: var(--glow-cyan); }

.wfe-tb-btn {
  background: var(--bg-surface);
  border: 1px solid rgba(0,245,255,0.15);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.wfe-tb-btn:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }
.wfe-close-btn { color: var(--neon-red); border-color: rgba(255,51,102,0.3); }
.wfe-close-btn:hover { background: rgba(255,51,102,0.15); border-color: var(--neon-red); }
.wfe-tb-template { color: #ffd700; border-color: rgba(255,215,0,0.3); }
.wfe-tb-template:hover { background: rgba(255,215,0,0.1); border-color: #ffd700; }
.wfe-tb-engine { color: #cc88ff; border-color: rgba(123,47,247,0.4); }
.wfe-tb-engine:hover { background: rgba(123,47,247,0.15); border-color: #7b2ff7; }

/* Saved flow action buttons */
.wfe-saved-actions { display: flex; gap: 3px; opacity: 0; transition: opacity 0.15s; }
.wfe-saved-item:hover .wfe-saved-actions { opacity: 1; }
.wfe-action-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: #aaa; border-radius: 3px; padding: 1px 5px;
  cursor: pointer; font-size: 11px; line-height: 1.4;
}
.wfe-action-btn:hover { color: #fff; border-color: #fff; }
.wfe-del-btn:hover { color: #ff3366; border-color: #ff3366; }
.wfe-dup-btn:hover { color: #00f5ff; border-color: #00f5ff; }

/* Main layout */
.wfe-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Palette (left sidebar) */
.wfe-palette {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid rgba(0,245,255,0.1);
  overflow-y: auto;
  padding: 10px;
}
.wfe-palette-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.wfe-palette-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wfe-palette-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  cursor: grab;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.wfe-palette-item:hover { background: var(--bg-panel-hover); }
.wfe-palette-item:active { cursor: grabbing; }
.wfe-pi-icon { font-size: 16px; flex-shrink: 0; }
.wfe-pi-name { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.wfe-pi-role { font-size: 9px; color: var(--text-muted); }
.wfe-palette-empty {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px;
  text-align: center;
}

/* Canvas */
.wfe-canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(0,245,255,0.02) 0%, transparent 70%),
    linear-gradient(rgba(0,245,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
  cursor: default;
}
.wfe-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}
.wfe-wires {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  transform-origin: 0 0;
}
.wfe-wires path { pointer-events: stroke; }
.wfe-wire:hover { stroke-opacity: 1 !important; filter: drop-shadow(0 0 4px currentColor); }

.wfe-canvas-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  text-align: center;
  opacity: 0.5;
}

/* Nodes */
.wfe-node {
  position: absolute;
  background: var(--bg-panel);
  border: 1.5px solid;
  border-radius: var(--radius);
  cursor: move;
  user-select: none;
  transition: box-shadow 0.15s;
  min-height: 40px;
}
.wfe-node:hover { box-shadow: 0 0 12px rgba(0,245,255,0.2); }
.wfe-node.selected { box-shadow: 0 0 0 2px var(--neon-cyan), 0 0 20px rgba(0,245,255,0.3); }

.wfe-node-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 11px;
}
.wfe-node-header.wfe-node-compact {
  border-radius: var(--radius);
  padding: 8px 14px;
}
.wfe-node-icon { font-size: 14px; }
.wfe-node-name { font-weight: 700; color: var(--text-primary); font-size: 11px; }
.wfe-node-body { padding: 4px 10px 8px; }
.wfe-node-role { font-size: 9px; color: var(--text-muted); }
.wfe-node-task { font-size: 9px; color: var(--text-secondary); margin-top: 2px; font-family: var(--font-mono); }
.wfe-node-task.wfe-placeholder { color: var(--text-muted); font-style: italic; font-family: var(--font-ui); }

/* Ports */
.wfe-port {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-cyan);
  border: 2px solid var(--bg-deep);
  cursor: crosshair;
  z-index: 5;
  transition: transform 0.15s;
}
.wfe-port:hover { transform: scale(1.4); box-shadow: 0 0 8px var(--neon-cyan); }
.wfe-port-in {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}
.wfe-port-in:hover { transform: translateY(-50%) scale(1.4); }
.wfe-port-out {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}
.wfe-port-out:hover { transform: translateY(-50%) scale(1.4); }

/* Properties panel (right) */
.wfe-props {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-left: 1px solid rgba(123,47,247,0.15);
  overflow-y: auto;
  padding: 12px;
}
.wfe-props.hidden { display: none; }
.wfe-props-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--neon-purple);
  font-weight: 700;
  margin-bottom: 14px;
}

.wfe-prop-group { margin-bottom: 12px; }
.wfe-prop-group label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wfe-prop-value {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}
.wfe-prop-textarea,
.wfe-prop-input,
.wfe-prop-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(0,245,255,0.15);
  color: var(--text-primary);
  padding: 6px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-mono);
  resize: vertical;
}
.wfe-prop-textarea:focus, .wfe-prop-input:focus, .wfe-prop-select:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}
.wfe-prop-hint {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-style: italic;
}
.wfe-prop-apply {
  width: 100%;
  background: rgba(0,245,255,0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}
.wfe-prop-apply:hover { background: rgba(0,245,255,0.2); }
.wfe-prop-delete {
  width: 100%;
  background: rgba(255,51,102,0.08);
  border: 1px solid rgba(255,51,102,0.3);
  color: var(--neon-red);
  padding: 6px;
  border-radius: var(--radius);
  font-size: 10px;
  cursor: pointer;
}
.wfe-prop-delete:hover { background: rgba(255,51,102,0.2); }


/* ══════════════════════════════════════════
   CREDIT PANEL — Coin/Balance HUD
   ══════════════════════════════════════════ */

.credit-panel {
  position: fixed;
  top: 8px;
  left: 450px;
  bottom: auto;
  right: auto;
  transform: none;
  z-index: 9999;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #e0e0ff;
  user-select: none;
}

/* ── Collapsed pill ── */
.credit-collapsed .cp-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #12122a;
  border: 1px solid #2a2a5a;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.credit-collapsed .cp-pill:hover { border-color: #7b2ff7; box-shadow: 0 0 8px #7b2ff755; }

/* ── Expanded panel ── */
.credit-expanded {
  width: 300px;
  background: #12122a;
  border: 1px solid #2a2a5a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px #00000088;
}
.credit-expanded .cp-pill-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1a1a3e;
  border-bottom: 1px solid #2a2a5a;
  cursor: pointer;
  font-weight: 600;
}
.cp-body {
  padding: 10px;
  max-height: 520px;
  overflow-y: auto;
}
.cp-body::-webkit-scrollbar { width: 4px; }
.cp-body::-webkit-scrollbar-track { background: transparent; }
.cp-body::-webkit-scrollbar-thumb { background: #3a3a6a; border-radius: 2px; }

/* ── Alert levels ── */
.cp-ok    { border-color: #2ecc71 !important; }
.cp-warn  { border-color: #f39c12 !important; }
.cp-crit  { border-color: #e74c3c !important; box-shadow: 0 0 10px #e74c3c55 !important; }
.cp-pending { border-color: #7b2ff7 !important; }

/* ── Pill elements ── */
.cp-coin-icon { font-size: 16px; }
.cp-bal  { font-weight: 700; font-size: 14px; }
.cp-usd  { font-size: 11px; color: #8080aa; }
.cp-chevron { font-size: 10px; margin-left: auto; color: #8080aa; }
.cp-badge {
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ── Cards ── */
.cp-card {
  background: #1a1a3e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.cp-balance-card {
  text-align: center;
  border: 1px solid #2a2a5a;
}
.cp-bal-big { font-size: 22px; font-weight: 800; color: #00ffcc; }
.cp-coin-label { font-size: 12px; color: #8080aa; }
.cp-bal-usd { font-size: 12px; color: #8080aa; margin: 2px 0 8px; }

/* ── Monthly cap bar ── */
.cp-cap-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.cp-bar-track { background: #0a0a1a; border-radius: 4px; height: 6px; overflow: hidden; }
.cp-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.4s; }
.cp-cap-meta  { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; color: #8080aa; }

/* ── Sections ── */
.cp-section { margin-bottom: 8px; }
.cp-section-title { font-size: 10px; text-transform: uppercase; color: #8080aa; letter-spacing: 0.5px; margin-bottom: 5px; padding-bottom: 3px; border-bottom: 1px solid #2a2a5a; }

/* ── Service rows ── */
.cp-svc-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; border-bottom: 1px solid #1a1a3e; }
.cp-svc-name { color: #c0c0e0; }
.cp-svc-val  { color: #7b2ff7; font-weight: 600; }
.cp-svc-empty { font-size: 11px; color: #8080aa; font-style: italic; }

/* ── Approval rows ── */
.cp-appr-row { background: #1a1a3e; border-radius: 6px; padding: 8px; margin-bottom: 6px; border: 1px solid #7b2ff755; }
.cp-appr-info { font-size: 12px; margin-bottom: 6px; }
.cp-appr-amt  { display: block; font-size: 11px; color: #f39c12; font-weight: 600; margin-top: 2px; }
.cp-appr-btns { display: flex; gap: 6px; }

/* ── Transaction rows ── */
.cp-tx-row  { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; border-bottom: 1px solid #1a1a3e; }
.cp-tx-desc { color: #c0c0e0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.cp-tx-in   .cp-tx-amt { color: #2ecc71; font-weight: 700; }
.cp-tx-out  .cp-tx-amt { color: #e74c3c; }

/* ── Alerts ── */
.cp-alert-item { font-size: 11px; padding: 5px 8px; border-radius: 4px; margin-bottom: 4px; }
.cp-alert-ok   { background: #0d3a2c; color: #2ecc71; }
.cp-alert-warn { background: #3a2a00; color: #f39c12; }
.cp-alert-crit { background: #3a0a0a; color: #e74c3c; }
.cp-alert-err  { background: #3a0a0a; color: #e74c3c; }
.cp-alert-info { background: #0a1a3a; color: #7b2ff7; }

/* ── Buttons ── */
.cp-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}
.cp-btn:hover { opacity: 0.85; }
.cp-topup-btn    { background: #7b2ff7; color: #fff; width: 100%; margin-top: 4px; padding: 7px; }
.cp-approve-btn  { background: #1a3a1a; color: #2ecc71; border: 1px solid #2ecc71; flex: 1; }
.cp-reject-btn   { background: #3a1a1a; color: #e74c3c; border: 1px solid #e74c3c; flex: 1; }
.cp-save-cfg-btn { background: #1a2a3a; color: #00bfff; border: 1px solid #00bfff44; width: 100%; margin-top: 6px; }

/* ── Config inputs ── */
.cp-config-section { border-top: 1px solid #2a2a5a; padding-top: 8px; }
.cp-config-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cp-config-row label { font-size: 11px; color: #8080aa; min-width: 110px; }
.cp-config-input { background: #0a0a1a; border: 1px solid #3a3a6a; color: #e0e0ff; padding: 3px 6px; border-radius: 4px; font-size: 12px; width: 80px; }
.cp-config-unit { font-size: 10px; color: #8080aa; }
.cp-loading { color: #8080aa; font-size: 12px; text-align: center; padding: 16px; }
