:root {
  --bg: #0f0f12;
  --surface: #1a1a1f;
  --border: #2a2a32;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --user-bubble: #3b82f6;
  --assistant-bubble: #27272a;
  --success: #22c55e;
  --error: #ef4444;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.layout-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

/* Playground layout — single viewport */
.playground {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.playground-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .playground-header {
    gap: 0.6rem;
  }
}

.playground-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playground-logo .agent-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.playground-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.agent-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.agent-selector label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.agent-selector select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.playground-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.playground-input-wrap {
  flex-shrink: 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

/* Budget */
.budget-gauge {
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Agent card */
.agent-card {
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 0.85rem;
}

.agent-card summary {
  cursor: pointer;
  color: var(--text-muted);
}

.agent-card summary:hover {
  color: var(--accent);
}

.agent-card-content {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 220px;
  max-height: 200px;
  overflow-y: auto;
}

.agent-card-desc {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.agent-card-section {
  margin-bottom: 0.75rem;
}

.agent-card-section:last-child {
  margin-bottom: 0;
}

.agent-card-section strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.agent-card-section ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
}

.agent-card-section li {
  margin-bottom: 0.25rem;
}

.agent-card-section code {
  font-size: 0.75rem;
  background: var(--border);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.agent-card-section p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Position agent-card relative for dropdown */
.playground-header {
  position: relative;
}

.agent-card[open] .agent-card-body {
  display: block;
}

.budget-gauge.budget-updated {
  animation: budget-pulse 0.4s ease-out;
}

@keyframes budget-pulse {
  0% {
    background: var(--accent);
    color: white;
  }
  100% {
    background: var(--surface);
    color: var(--text-muted);
  }
}

/* Messages */
.message {
  max-width: 90%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: var(--user-bubble);
  color: white;
}

.message.assistant {
  align-self: flex-start;
  background: var(--assistant-bubble);
  border: 1px solid var(--border);
}

.message.assistant.placeholder .placeholder-content {
  color: var(--text-muted);
  font-style: italic;
}

.message.error {
  color: var(--error);
}

.message-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.message-header .content {
  flex: 1;
}

.message .meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-btn:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
}

/* Activity items */
.activity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  align-self: flex-start;
  animation: activity-fade-in 0.2s ease-out;
}

@keyframes activity-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.activity-item.hook .activity-badge {
  font-size: 0.7rem;
  color: var(--accent);
}

.activity-label {
  flex: 1;
}

/* Input */
.input-row {
  display: flex;
  gap: 0.5rem;
}

.input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
}

.input-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.input-row button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.input-row button:hover {
  background: var(--accent-hover);
}

.input-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Multimodal input */
.input-row.multimodality {
  flex-direction: column;
  align-items: stretch;
}

.input-row .attachment-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.input-row .attachment-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.input-row .attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.input-row .attachment-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-row .attachment-remove:hover {
  background: var(--error);
}

.input-row .input-group {
  display: flex;
  gap: 0.5rem;
}

.input-row .input-group input {
  flex: 1;
}

.input-row .file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.input-row .file-upload-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.input-row .file-upload-btn input {
  display: none;
}

/* Message attachments */
.message-attachments {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.message-attachment {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 160px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-attachment-link {
  display: block;
  max-height: 160px;
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
  border: none;
  background: none;
  padding: 0;
}

.message-attachment-link:hover {
  opacity: 0.9;
}

.message-attachment-link img {
  width: 100%;
  height: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.message-attachment-download {
  font-size: 0.7rem;
  color: var(--accent);
  padding: 0.2rem 0.4rem;
  text-decoration: none;
  text-align: center;
}

.message-attachment-download:hover {
  color: var(--accent-hover);
}

.message.assistant .message-attachment {
  border-color: var(--border);
}

.message-attachment-video {
  max-width: 320px;
}

.message-attachment-video-el {
  width: 100%;
  max-height: 240px;
  display: block;
  background: #000;
}

/* Trace sidebar */
.trace-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  animation: overlay-fade-in 0.2s ease-out;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.trace-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 90vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  animation: sidebar-slide-in 0.25s ease-out;
}

@keyframes sidebar-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.trace-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.trace-sidebar-header h3 {
  margin: 0;
  font-size: 1rem;
}

.trace-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trace-copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.trace-copy-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.trace-sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.trace-sidebar-close:hover {
  color: var(--text);
}

.trace-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.agent-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.agent-details-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

/* Agent details modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  animation: overlay-fade-in 0.2s ease-out;
}

.agent-details-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 101;
  display: flex;
  flex-direction: column;
  animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Image viewer modal */
.image-viewer-overlay {
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
}

.image-viewer-modal {
  position: fixed;
  top: 1rem;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 201;
  display: flex;
  flex-direction: column;
  animation: image-viewer-fade-in 0.2s ease-out;
  outline: none;
}

@keyframes image-viewer-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.image-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.image-viewer-zoom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-viewer-zoom button {
  width: 2rem;
  height: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.image-viewer-zoom button:hover:not(:disabled) {
  background: var(--border);
}

.image-viewer-zoom button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.image-viewer-zoom-val {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 3.5rem;
  text-align: center;
}

.image-viewer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.image-viewer-download {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.image-viewer-download:hover {
  color: var(--accent-hover);
}

.image-viewer-content {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 0;
}

.image-viewer-content img {
  max-width: 100%;
  height: auto;
  transition: transform 0.15s ease;
  transform-origin: center center;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-title-row .agent-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.modal-agent-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.modal-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
}

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

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.modal-section {
  margin-bottom: 1.25rem;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-section label svg {
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.9;
}

.modal-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.internal-agents-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.internal-agents-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text);
}

.internal-agents-list li .agent-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.modal-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.agent-select-in-modal {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.workflow-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.workflow-node {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.85rem;
}

.workflow-node .agent-icon {
  color: var(--accent);
}

.workflow-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.workflow-placeholder {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tool-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.tool-list li {
  margin-bottom: 0.35rem;
}

.tool-list code {
  font-size: 0.8rem;
  background: var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.budget-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Trace sidebar — visual event cards */
.trace-meta-cards {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.trace-meta-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

.trace-meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trace-meta-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.trace-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trace-event-card {
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.trace-event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.trace-event-header .trace-event-label {
  margin-bottom: 0;
  flex: 1;
}

.trace-copy-section {
  flex-shrink: 0;
  font-size: 0.8rem;
}

.trace-event-label {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.trace-event-ctx {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.trace-event-row {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.trace-event-key {
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.trace-event-val {
  color: var(--text);
  word-break: break-all;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.trace-event-val code {
  font-size: 0.7rem;
  max-width: 100%;
}

.trace-event-img-preview {
  max-width: 80px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.trace-expand-btn {
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
}

.trace-expand-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent);
}

.trace-event-data-placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.trace-meta {
  margin: 0;
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Loading skeleton */
.playground-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1rem;
}

.loading-skeleton {
  width: 200px;
  height: 24px;
  background: var(--surface);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.loading {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Error state */
.playground-error {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.error {
  color: var(--error);
  margin-bottom: 0.5rem;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Agent config modal — remote config UI */
.agent-config-modal {
  width: min(560px, 92vw);
  max-height: 88vh;
}

.config-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-loading,
.config-error {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.config-error {
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.config-retry {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.config-retry:hover {
  background: rgba(99, 102, 241, 0.1);
}

.config-status {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.config-status-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.config-status-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.config-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.config-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.config-section-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.config-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
}

.config-section-header:hover {
  background: rgba(99, 102, 241, 0.08);
}

.config-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-section-class {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
}

.config-section-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.config-section-fields {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.config-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.config-field-row:last-child {
  border-bottom: none;
}

.config-field-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.config-field-path {
  font-size: 0.8rem;
  background: var(--surface);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--text);
}

.config-field-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.config-field-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
  border-radius: 4px;
}

.config-field-values {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.config-field-baseline,
.config-field-current {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.config-field-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.config-field-value {
  font-size: 0.85rem;
  color: var(--text);
}

.config-field-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  min-width: 120px;
}

.config-field-input:focus {
  outline: none;
  border-color: var(--accent);
}

.config-field-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  min-width: 140px;
  cursor: pointer;
}

.config-field-select:focus {
  outline: none;
  border-color: var(--accent);
}

.config-field-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.config-field-toggle input {
  accent-color: var(--accent);
}

.config-field-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.config-field-btn {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
}

.config-field-btn-apply {
  background: var(--accent);
  color: white;
}

.config-field-btn-apply:hover:not(:disabled) {
  background: var(--accent-hover);
}

.config-field-btn-revert {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.config-field-btn-revert:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.config-field-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
