/* ============================================
   ACTIVITY PANEL STYLES
   ============================================ */

/* Floating toggle button removed - now using Activity tab in mode-tabs */

.dev-panel {
  position: fixed;
  bottom: 160px;
  right: var(--space-4);
  width: 360px;
  max-width: calc(100vw - var(--space-8));
  max-height: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--black-40);
}

.dev-panel.visible {
  display: flex;
}

.dev-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--black-20);
}

.dev-panel-title {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dev-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-2xl);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: var(--radius-md);
}

.dev-panel-close:hover {
  color: var(--text);
}

.dev-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.dev-tab {
  flex: 1;
  padding: var(--space-2) var(--space-2);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}

.dev-tab:hover {
  color: var(--text);
  background: var(--accent-05);
}

.dev-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.dev-panel-content {
  flex: 1;
  overflow: hidden;
}

.dev-tab-content {
  display: none;
  height: 100%;
  padding: var(--space-4);
  overflow-y: auto;
}

.dev-tab-content.active {
  display: block;
}

/* Token Stats */
.token-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.token-stat {
  background: var(--black-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
}

.token-stat.total {
  grid-column: span 2;
  background: var(--accent-05);
  border-color: var(--accent);
}

.token-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.token-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--text);
}

.token-session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--black-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.token-session .token-label {
  margin-bottom: 0;
}

.token-session .token-value {
  color: var(--accent);
}

.dev-btn {
  width: 100%;
  padding: var(--space-2);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.dev-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* API Logs */
.api-log-list,
.tool-list,
.error-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.empty-log {
  text-align: center;
  color: var(--text-dim);
  font-size: var(--text-sm);
  padding: var(--space-5);
}

.api-log-entry,
.tool-entry,
.error-entry {
  background: var(--black-20);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

.api-log-header,
.tool-header,
.error-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.api-method {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-muted);
}

.api-method.POST { background: var(--success-20); color: var(--success); }
.api-method.GET { background: var(--accent-20); color: var(--accent); }
.api-method.DELETE { background: var(--error-20); color: var(--error); }

.api-url {
  font-size: var(--text-sm);
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.api-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.api-status.status-2 { background: var(--success-20); color: var(--success); }
.api-status.status-4,
.api-status.status-5 { background: var(--error-20); color: var(--error); }

.api-duration {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.api-response,
.tool-args {
  margin-top: var(--space-2);
}

.api-response summary,
.tool-args summary {
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
}

.api-response pre,
.tool-args pre {
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: var(--black-30);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  overflow-x: auto;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Tool Calls */
.tool-name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
}

.tool-summary {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}

.tool-entry.has-error .tool-summary {
  color: var(--error);
}

.tool-time,
.error-time {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-left: auto;
}

/* Errors */
.error-entry {
  border-color: var(--error-30);
}

.error-message {
  font-size: var(--text-sm);
  color: var(--error);
  flex: 1;
}

.error-context {
  font-size: var(--text-xs);
  color: var(--text-dim);
  margin-top: var(--space-2);
}

/* Mobile adjustments (--breakpoint-sm: 480px) */
@media (max-width: 480px) {
  .dev-panel {
    bottom: 140px;
    left: var(--space-4);
    right: var(--space-4);
    width: auto;
  }
}

/* Accessibility: Respect reduced motion preference (M-09) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
