/* ── Reset & Base ─────────────────────────────────────────────────────────── */
/* forward declaration for eden-logo-img (used in sidebar) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #09090f;
  --surface:     #111118;
  --surface-2:   #18181f;
  --surface-3:   #212130;
  --border:      #26263a;
  --border-2:    #32324a;

  --primary:     #7c6cf5;
  --primary-2:   #6355e0;
  --primary-bg:  rgba(124, 108, 245, 0.1);
  --primary-glow:rgba(124, 108, 245, 0.25);

  --teal:        #3ecfca;
  --green:       #4ade80;
  --red:         #f87171;
  --yellow:      #fbbf24;
  --orange:      #fb923c;

  --text:        #e0e0ec;
  --text-2:      #8888a8;
  --text-3:      #55556a;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;

  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 8px  rgba(0,0,0,.3);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --sidebar-w: 230px;
  --header-h:  60px;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  font-size:   14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
textarea, input, select { font-family: var(--font); }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─────────────────────────────────────────────────────────────────────────
   LOGIN PAGE
   ──────────────────────────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,108,245,.15) 0%, transparent 60%), var(--bg);
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 0 20px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  justify-content: center;
}

.logo-icon { font-size: 32px; }
.logo-text  { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.logo-sub   { font-size: 11px; color: var(--text-3); letter-spacing: .05em; text-transform: uppercase; }

.login-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.login-form h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.login-error {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────
   APP SHELL
   ──────────────────────────────────────────────────────────────────────── */
.app-page { overflow: hidden; }

.shell {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.sidebar-logo .logo-icon { font-size: 24px; }
.sidebar-logo .logo-text  { font-size: 16px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.sidebar-logo .logo-sub   { font-size: 10px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  user-select: none;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
  opacity: .7;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item:hover svg { opacity: 1; }

.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.user-avatar {
  width: 30px; height: 30px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}

.user-details { min-width: 0; }
.user-name    { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role    { font-size: 11px; color: var(--text-3); }

/* ── Main ────────────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 32px 36px;
  max-width: 1100px;
  width: 100%;
}

/* ─────────────────────────────────────────────────────────────────────────
   PAGE HEADER
   ──────────────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title   { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.page-subtitle { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.page-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   STATS GRID (Dashboard)
   ──────────────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color .2s;
}

.stat-card:hover { border-color: var(--border-2); }

.stat-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.stat-sub   { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ─────────────────────────────────────────────────────────────────────────
   NEURONS GRID
   ──────────────────────────────────────────────────────────────────────── */
.neurons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.neuron-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, transform .15s;
  position: relative;
}

.neuron-card:hover { border-color: var(--border-2); transform: translateY(-1px); }

.neuron-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.neuron-avatar {
  width: 48px; height: 48px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.neuron-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
}

.neuron-status-badge.active   { color: var(--green);  border-color: rgba(74,222,128,.2); background: rgba(74,222,128,.06); }
.neuron-status-badge.inactive { color: var(--text-3); border-color: var(--border); }
.neuron-status-badge .dot     { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.neuron-name    { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.neuron-creator { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.neuron-purpose { font-size: 13px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.neuron-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.badge.primary { background: var(--primary-bg); color: var(--primary); border-color: transparent; }
.badge.teal    { background: rgba(62,207,202,.08); color: var(--teal); border-color: transparent; }

.neuron-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────
   NEURON EDITOR
   ──────────────────────────────────────────────────────────────────────── */
.editor-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.editor-avatar-btn {
  width: 52px; height: 52px;
  background: var(--surface-3);
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
  position: relative;
}

.editor-avatar-btn:hover { border-color: var(--primary); }

.avatar-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 100;
  box-shadow: var(--shadow);
}

.avatar-option {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s;
}
.avatar-option:hover { background: var(--surface-3); }
.avatar-option.selected { background: var(--primary-bg); }

.editor-title { flex: 1; min-width: 0; }

.editor-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.tab-btn:hover  { color: var(--text); }
.tab-btn.active { background: var(--surface-3); color: var(--text); border: 1px solid var(--border); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─────────────────────────────────────────────────────────────────────────
   FORMS
   ──────────────────────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field:last-child { margin-bottom: 0; }

label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
}

.field-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

select { appearance: none; cursor: pointer; }

textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 120px;
}

textarea.tall  { min-height: 220px; }
textarea.xtall { min-height: 340px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Toggle switch */
.toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
}

.toggle-field .toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-field .toggle-label { font-size: 13.5px; font-weight: 500; }
.toggle-field .toggle-hint  { font-size: 11px; color: var(--text-3); }

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-2);
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ─────────────────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-xs);
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .15s, opacity .15s, transform .1s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn svg { width: 15px; height: 15px; fill: currentColor; }

.btn-primary  { background: var(--primary);   color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-2); }

.btn-secondary { background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover:not(:disabled) { background: var(--border-2); }

.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-danger { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.2); }
.btn-danger:hover:not(:disabled) { background: rgba(248,113,113,.2); }

.btn-teal    { background: rgba(62,207,202,.12); color: var(--teal); border: 1px solid rgba(62,207,202,.2); }
.btn-teal:hover:not(:disabled)  { background: rgba(62,207,202,.2); }

.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-full { width: 100%; }

.btn-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-3);
  transition: background .15s, color .15s;
  cursor: pointer;
}

.btn-icon:hover { background: var(--surface-3); color: var(--text); }
.btn-icon svg   { width: 18px; height: 18px; fill: currentColor; }

/* ─────────────────────────────────────────────────────────────────────────
   TABLE
   ──────────────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}

tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr + tr td { border-top: 1px solid var(--border); }

td {
  padding: 13px 16px;
  font-size: 13.5px;
  vertical-align: middle;
}

.td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ─────────────────────────────────────────────────────────────────────────
   CHAT (test interface)
   ──────────────────────────────────────────────────────────────────────── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 480px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}

.chat-empty .chat-empty-icon { font-size: 32px; opacity: .4; }

.msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.msg.user { flex-direction: row-reverse; align-self: flex-end; }

.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg.user .msg-avatar   { background: var(--primary-bg); color: var(--primary); font-size: 12px; font-weight: 700; }
.msg.asst .msg-avatar   { background: var(--surface-3); }

.msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user .msg-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.msg.asst .msg-bubble { background: var(--surface-3); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.msg-meta   { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.msg.user .msg-meta { text-align: right; }

/* typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--text-3);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 42px;
  line-height: 1.5;
  transition: border-color .15s;
}

.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text-3); }

.chat-controls { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 0 0 8px; }

/* ─────────────────────────────────────────────────────────────────────────
   MODAL
   ──────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow);
}

.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-body  { font-size: 13.5px; color: var(--text-2); margin-bottom: 24px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ─────────────────────────────────────────────────────────────────────────
   TOAST
   ──────────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn .25s ease;
  max-width: 320px;
}

.toast.success { border-color: rgba(74,222,128,.3); }
.toast.error   { border-color: rgba(248,113,113,.3); }
.toast .toast-icon { font-size: 16px; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────────────
   MISC
   ──────────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}

.empty-state .empty-icon { font-size: 40px; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: 13.5px; color: var(--text-2); margin-bottom: 24px; }

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card + .card { margin-top: 16px; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.text-muted  { color: var(--text-2); }
.text-danger { color: var(--red); }
.text-green  { color: var(--green); }
.text-teal   { color: var(--teal); }
.text-sm     { font-size: 12px; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: color .15s;
}

.back-btn:hover { color: var(--text); }
.back-btn svg   { width: 16px; height: 16px; fill: currentColor; }

/* token display */
.token-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  word-break: break-all;
}

.token-display .token-copy {
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text-3);
  transition: color .15s;
}

.token-display .token-copy:hover { color: var(--primary); }

/* ─────────────────────────────────────────────────────────────────────────
   PROVIDER CARDS (gamificado)
   ──────────────────────────────────────────────────────────────────────── */
.provider-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .2s;
  cursor: default;
}

/* Fundo decorativo do card */
.provider-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pv-glow, transparent) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity .3s;
  opacity: .5;
}

.provider-card:hover { transform: translateY(-2px); }
.provider-card:hover::before { opacity: 1; }

/* Conectado */
.provider-card.connected {
  border-color: var(--pv-color, var(--border));
  box-shadow: 0 0 0 1px var(--pv-glow, transparent),
              inset 0 1px 0 rgba(255,255,255,.04);
}

/* Cores por provider */
.provider-card[data-pv="openai"] {
  --pv-color: #10a37f;
  --pv-glow:  rgba(16,163,127,.18);
  --pv-dim:   rgba(16,163,127,.08);
}
.provider-card[data-pv="anthropic"] {
  --pv-color: #d4845a;
  --pv-glow:  rgba(212,132,90,.18);
  --pv-dim:   rgba(212,132,90,.08);
}
.provider-card[data-pv="custom"] {
  --pv-color: var(--primary);
  --pv-glow:  var(--primary-glow);
  --pv-dim:   var(--primary-bg);
}

.pv-logo {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}

.pv-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.2px;
}

.pv-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pv-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}

.pv-dot.on {
  background: var(--pv-color, var(--green));
  box-shadow: 0 0 6px var(--pv-color, var(--green));
  animation: pvPulse 2.5s infinite;
}

@keyframes pvPulse {
  0%, 100% { box-shadow: 0 0 4px var(--pv-color); opacity: 1; }
  50%       { box-shadow: 0 0 10px var(--pv-color); opacity: .7; }
}

.pv-key-box {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pv-key-copy {
  cursor: pointer;
  color: var(--text-3);
  font-size: 13px;
  transition: color .15s;
  flex-shrink: 0;
}
.pv-key-copy:hover { color: var(--pv-color, var(--primary)); }

.pv-model-count {
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 18px;
}

.pv-model-count strong { color: var(--text-2); }

.pv-actions { display: flex; gap: 8px; }

/* Not configured state */
.pv-empty {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 18px;
  padding: 16px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

/* API key input inside card */
.pv-key-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pv-key-form input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 8px 10px;
}

/* model suggestions list */
.model-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.model-pill:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─────────────────────────────────────────────────────────────────────────
   EDEN SIDEBAR IDENTITY ELEMENTS
   ──────────────────────────────────────────────────────────────────────── */
.eden-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(124,108,245,.5);
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}

.sidebar-logo:hover .eden-logo-img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.nav-eden-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.eden-nav-item {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────
   EDEN IDENTITY PAGE
   ──────────────────────────────────────────────────────────────────────── */

/* A página de Eden usa o main sem padding padrão */
.eden-identity-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Hero — vídeo de fundo com overlay */
.eden-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 32px;
  flex-shrink: 0;
}

.eden-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eden-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,9,15,.95) 0%, rgba(9,9,15,.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 40px;
}

.eden-hero-name {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, rgba(124,108,245,.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.eden-hero-tag {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eden-hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--primary);
  display: inline-block;
}

/* Profile section — dois painéis lado a lado */
.eden-profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* Painel esquerdo: foto + info + áudio */
.eden-left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eden-portrait-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface);
}

.eden-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .4s ease;
}

.eden-portrait-wrap:hover .eden-portrait {
  transform: scale(1.03);
}

/* Brilho sutil no canto */
.eden-portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,108,245,.08) 0%, transparent 50%);
  pointer-events: none;
}

.eden-bio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.eden-bio-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 4px;
}

.eden-bio-org {
  font-size: 12px;
  color: var(--primary);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}

.eden-bio-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}

.eden-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.eden-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  color: var(--text-3);
  background: var(--surface-3);
}

/* Áudio */
.eden-audio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.eden-audio-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

audio {
  width: 100%;
  height: 36px;
  filter: invert(1) hue-rotate(200deg) brightness(.85);
  border-radius: 8px;
}

/* Painel direito: vídeos + galeria */
.eden-right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eden-video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.eden-video-card video {
  width: 100%;
  display: block;
  max-height: 340px;
  object-fit: cover;
  background: #000;
}

.eden-video-meta {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eden-video-title {
  font-size: 13.5px;
  font-weight: 600;
}

.eden-video-sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.eden-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.eden-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.eden-stat-n {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--primary);
}

.eden-stat-l {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   TOOL CARDS
   ──────────────────────────────────────────────────────────────────────── */
.tool-list { display: flex; flex-direction: column; gap: 10px; }

.tool-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .15s;
}

.tool-card:hover { border-color: var(--border-2); }

.tool-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tool-icon.webhook { background: rgba(124,108,245,.12); }
.tool-icon.builtin { background: rgba(62,207,202,.12); }

.tool-info { flex: 1; min-width: 0; }

.tool-name {
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.tool-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

.tool-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.tool-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 13px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* JSON textarea highlight */
textarea.json-input {
  font-family: var(--mono);
  font-size: 12.5px;
  min-height: 160px;
  line-height: 1.7;
  tab-size: 2;
}

.builtin-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.builtin-badge {
  display: inline-flex; gap: 5px; align-items: center;
  font-size: 12px; font-family: var(--mono);
  padding: 4px 10px; border-radius: 6px;
  background: rgba(62,207,202,.08);
  border: 1px solid rgba(62,207,202,.2);
  color: var(--teal);
  cursor: pointer;
  transition: background .15s;
}
.builtin-badge:hover { background: rgba(62,207,202,.16); }

/* ─────────────────────────────────────────────────────────────────────────
   APP CARDS (página de Aplicações)
   ──────────────────────────────────────────────────────────────────────── */
.app-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.app-card:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-glow); }
.app-card-inactive { opacity: .6; }

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.app-card-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.app-card-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.app-card-meta { display: flex; align-items: center; gap: 6px; }

.app-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────────────────
   PLAYGROUND (página /apps/:id/playground)
   ──────────────────────────────────────────────────────────────────────── */
.playground-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}

.pg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.pg-app-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-app-name {
  font-size: 15px;
  font-weight: 700;
}

.playground-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

/* Left config panel */
.pg-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.pg-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.pg-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.pg-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}
.pg-select:focus { outline: none; border-color: var(--primary); }

.pg-thread-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}

.pg-thread-id {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  word-break: break-all;
}

.pg-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: background .12s;
}
.pg-icon-btn:hover { background: var(--surface-3); }

.pg-new-btn { width: 100%; margin-top: 8px; }

.pg-hint p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

/* Right panel */
.pg-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pg-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
  flex-shrink: 0;
}

.pg-tab {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.pg-tab:hover { color: var(--text); }
.pg-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.pg-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.pg-panel.hidden { display: none; }

/* Chat panel */
.pg-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pg-empty-chat {
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  margin: auto;
  padding: 32px;
}

.pg-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
}
.pg-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.pg-msg-asst { align-self: flex-start; }

.pg-msg-avatar {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.pg-msg-body { display: flex; flex-direction: column; gap: 4px; }

.pg-msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.pg-msg-user .pg-msg-bubble {
  background: var(--primary-bg);
  border-color: rgba(124,108,245,.25);
}

.pg-msg-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  padding: 0 4px;
}

.pg-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.pg-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 13.5px;
  resize: none;
  line-height: 1.5;
  transition: border-color .15s;
}
.pg-input:focus { outline: none; border-color: var(--primary); }

/* API Reference panel */
.api-ref {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.api-ref-section { margin-bottom: 20px; }

.api-ref-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.api-endpoint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
}

.api-method-badge {
  background: rgba(124,108,245,.15);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.api-url {
  flex: 1;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  word-break: break-all;
}

.api-headers-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.api-hrow {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.api-hrow:last-child { border-bottom: none; }

.api-hname {
  width: 180px;
  flex-shrink: 0;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.api-hval {
  flex: 1;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface);
}

.api-schema-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.api-srow {
  display: grid;
  grid-template-columns: 120px 140px 1fr;
  border-bottom: 1px solid var(--border);
}
.api-srow:last-child { border-bottom: none; }

.api-fname {
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.api-ftype {
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.api-req {
  color: var(--orange);
  font-style: normal;
  font-size: 10.5px;
  margin-left: 4px;
}

.api-fdesc {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface);
}

.api-code-tabbar {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.api-code-tab {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.api-code-tab:hover { color: var(--text); background: var(--surface-3); }
.api-code-tab.active { background: var(--primary-bg); color: var(--primary); border-color: rgba(124,108,245,.3); }

.code-block {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.code-block.hidden { display: none; }

.code-block pre {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
}

.code-copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  color: var(--text-2);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.code-copy-btn:hover { background: var(--primary-bg); color: var(--primary); }

/* ─────────────────────────────────────────────────────────────────────────
   CONVERSAS — filtros e expansão inline
   ──────────────────────────────────────────────────────────────────────── */
.thought-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

.thought-row { cursor: default; }
.thought-row:hover td { background: rgba(124,108,245,.04); }

.thought-detail-row { background: var(--surface-2); }
.thought-detail-row.hidden { display: none; }

.thought-msgs-panel {
  padding: 0;
}

.thought-msgs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.thought-bubbles {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 20px;
  max-height: 420px;
  overflow-y: auto;
}

.thought-bubble {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.thought-bubble:last-child { border-bottom: none; }

.thought-bubble-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.thought-bubble-user .thought-bubble-role { color: var(--primary); }

.thought-bubble-content {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.thought-bubble-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  margin-top: 6px;
}

/* ─────────────────────────────────────────────────────────────────────────
   EDEN CODE — actions no playground
   ──────────────────────────────────────────────────────────────────────── */
.pg-actions {
  margin-top: 10px;
  border: 1px solid rgba(124,108,245,.25);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: rgba(124,108,245,.04);
}

.pg-actions-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(124,108,245,.15);
  background: rgba(124,108,245,.08);
}

.pg-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(124,108,245,.08);
  font-size: 12px;
}
.pg-action-item:last-child { border-bottom: none; }

.pg-action-type {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 130px;
}

.pg-action-path {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-action-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pg-action-pending  { background: rgba(251,191,36,.12); color: var(--yellow); border: 1px solid rgba(251,191,36,.25); }
.pg-action-executed { background: rgba(74,222,128,.12); color: var(--green);  border: 1px solid rgba(74,222,128,.25); }
.pg-action-failed   { background: rgba(248,113,113,.12);color: var(--red);    border: 1px solid rgba(248,113,113,.25); }
