* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button { outline: none; }
button:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }

html, body, #root {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ─── Header ─── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header h1 {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  transition: background 0.3s, box-shadow 0.3s;
}

.dot-connected { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
.dot-connecting { background: #eab308; animation: pulse 1s infinite; }
.dot-disconnected { background: #ef4444; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  min-width: 120px;
  max-width: 400px;
  user-select: none;
  transition: width 0.25s ease, min-width 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  border-right: none;
  pointer-events: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Resize handle */
.side-resizer {
  position: absolute;
  top: 0;
  right: -2px;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 20;
  background: transparent;
  transition: background 0.2s;
}

.side-resizer::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1px;
  width: 2px;
  height: 30px;
  background: #334155;
  border-radius: 1px;
  transform: translateY(-50%);
  transition: background 0.2s, height 0.2s;
}

.side-resizer:hover::after,
.side-resizer:active::after {
  background: #f59e0b;
  height: 50px;
}

.side-resizer:active {
  background: rgba(245, 158, 11, 0.06);
}

/* Tabs scrollable area */
.sidebar-tabs {
  overflow-y: auto;
  flex: 1;
  scrollbar-gutter: stable;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 4px 8px 8px;
}

/* ─── Icon buttons ─── */
.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  outline: none;
}

.btn-icon:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: scale(0.92) translateY(0);
}

.btn-help {
  font-weight: 700;
  font-size: 15px;
}

.btn-add {
  font-size: 18px;
  font-weight: 300;
}

.btn-settings {
  font-size: 16px;
}

.btn-save, .btn-load {
  font-size: 14px;
}

/* ─── Chat tabs ─── */
.chat-tab-row {
  display: flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  transition: background 0.12s;
  border-left: 3px solid transparent;
  outline: none;
}

.chat-tab-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat-tab-row.active {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  box-shadow: inset 3px 0 8px -4px rgba(245, 158, 11, 0.3);
}

.chat-tab-row.archived { opacity: 0.35; font-style: italic; }

.chat-tab-label {
  flex: 1;
  padding: 9px 8px 9px 12px;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.12s;
}

.chat-tab-row:hover .chat-tab-label { color: #f59e0b; }
.chat-tab-row.active .chat-tab-label { color: #f59e0b; font-weight: 600; }

.chat-tab-actions {
  display: flex;
  gap: 2px;
  padding-right: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.chat-tab-row:hover .chat-tab-actions { opacity: 1; }

.tab-action {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  line-height: 1;
  outline: none;
}

.tab-action:hover { background: rgba(255, 255, 255, 0.08); border-color: #334155; }

.archive-action:hover { color: #f59e0b; border-color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.delete-action:hover { color: #ef4444; border-color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.rename-action:hover { color: #3b82f6; border-color: #3b82f6; background: rgba(59, 130, 246, 0.1); }

/* ─── Archive toggle ─── */
.archive-toggle {
  width: 100%;
  padding: 5px;
  border: 1px dashed #334155;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 4px;
}

.archive-toggle:hover:not(:disabled) { background: rgba(255, 255, 255, 0.04); color: #94a3b8; border-color: #475569; }
.archive-toggle:active:not(:disabled) { transform: scale(0.97); }
.archive-toggle:disabled { opacity: 0.25; cursor: default; border-color: #1e293b; color: #334155; }

/* ─── Reconnect ─── */
.btn-reconnect {
  width: 100%;
  padding: 7px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: #f87171;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.btn-reconnect:hover {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

.btn-reconnect:active { transform: scale(0.97); }

/* ─── Main ─── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f172a;
  min-width: 0;
}

/* ─── Chat ─── */
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.message-list.empty {
  justify-content: center;
  align-items: center;
  color: #64748b;
  font-size: 14px;
  gap: 4px;
}

.empty-state p { margin: 2px 0; }

.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: fadeIn 0.25s ease;
  position: relative;
}

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

.message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.message-agent {
  align-self: flex-start;
  background: linear-gradient(135deg, #334155, #1e293b);
  border-bottom-left-radius: 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid #475569;
  color: #f1f5f9;
}

.msg-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-user { background: rgba(255, 255, 255, 0.15); color: #fff; }
.avatar-agent { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.msg-name {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

.msg-text {
  white-space: pre-wrap;
}

.msg-text p { margin: 0 0 6px; }
.msg-text p:last-child { margin-bottom: 0; }
.msg-text code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
}
.msg-text pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 6px 0;
  border: 1px solid #334155;
}
.msg-text pre code {
  background: none;
  padding: 0;
  font-size: 12px;
}
.msg-text ul, .msg-text ol { padding-left: 20px; margin: 4px 0; }
.msg-text li { margin: 2px 0; }
.msg-text strong { font-weight: 700; color: #f1f5f9; }
.msg-text h1, .msg-text h2, .msg-text h3, .msg-text h4 { margin: 8px 0 4px; color: #f59e0b; }
.msg-text h1 { font-size: 16px; }
.msg-text h2 { font-size: 15px; }
.msg-text h3 { font-size: 14px; }
.msg-text a { color: #60a5fa; text-decoration: underline; }
.msg-text blockquote {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
  margin: 6px 0;
  color: #94a3b8;
}
.msg-text table { border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.msg-text th, .msg-text td { border: 1px solid #334155; padding: 4px 8px; text-align: left; }
.msg-text th { background: rgba(255, 255, 255, 0.05); font-weight: 600; }

/* ─── File cards ─── */
.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.file-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.file-icon { font-size: 18px; flex-shrink: 0; line-height: 1; }

.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 12px; font-weight: 500; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 10px; color: #64748b; margin-top: 1px; }

.file-dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.file-dl:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4); }
.file-dl:active { transform: translateY(0); }

/* ─── Buttons in messages (elevated) ─── */
.btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: none;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }

.btn-secondary {
  background: linear-gradient(135deg, #475569, #334155);
  color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  border: 1px solid #64748b;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
  color: #f8fafc;
  border-color: #94a3b8;
}

.btn-secondary:active { transform: scale(0.96) translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.96); }

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}

.btn-danger:active { transform: scale(0.96); }

.msg-time {
  font-size: 9px;
  color: #64748b;
  margin-top: 3px;
  text-align: right;
}

.typing-indicator {
  color: #94a3b8;
  font-style: italic;
  font-size: 12px;
  padding: 3px 0;
}

/* ─── Input ─── */
.input-area {
  flex-shrink: 0;
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #1e293b;
  background: linear-gradient(0deg, #0f172a, #1a2332);
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input input[type="text"]::placeholder { color: #475569; }

.chat-input input[type="text"]:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.chat-input input[type="text"]:disabled { opacity: 0.35; cursor: default; }

.btn-send {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-send:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-send:active:not(:disabled) { transform: scale(0.96); }
.btn-send:disabled { opacity: 0.3; cursor: default; box-shadow: none; }

.file-btn {
  font-size: 20px;
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 10px;
  line-height: 1;
  transition: all 0.15s;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #334155;
  color: #94a3b8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.file-btn:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  transform: translateY(-1px);
}

.file-btn:active { transform: scale(0.92); }

/* ─── Attachments bar ─── */
.attach-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 16px;
  background: #1a2332;
  border-top: 1px solid #1e293b;
}

.attach-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #1e293b;
  border-radius: 8px;
  font-size: 11px;
  color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid #334155;
}

.attach-tag .remove {
  cursor: pointer;
  font-size: 15px;
  color: #ef4444;
  margin-left: 2px;
  line-height: 1;
  transition: color 0.15s, transform 0.12s;
}

.attach-tag .remove:hover { color: #f87171; transform: scale(1.2); }

.attach-list { margin-top: 3px; }

/* ─── Help modal ─── */
.help-btn-header {
  font-size: 14px;
  cursor: pointer;
  padding: 0 7px;
  border-radius: 6px;
  line-height: 1.6;
  transition: all 0.15s;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #334155;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.help-btn-header:hover { background: #1e293b; color: #e2e8f0; border-color: #475569; }
.help-btn-header:active { transform: scale(0.92); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.modal h2 { font-size: 15px; color: #f59e0b; margin-bottom: 12px; letter-spacing: -0.2px; }
.modal table { width: 100%; border-collapse: collapse; }
.modal td { padding: 5px 0; font-size: 13px; vertical-align: top; }
.modal td:first-child { color: #f59e0b; font-family: monospace; white-space: nowrap; padding-right: 16px; }
.modal td:last-child { color: #cbd5e1; }
.modal-close {
  float: right;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.12s;
}
.modal-close:hover { color: #e2e8f0; transform: scale(1.15); }

/* ─── Settings modal ─── */
.settings-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
}

.settings-section:last-child { border-bottom: none; }

.settings-section label {
  font-size: 12px;
  color: #94a3b8;
  min-width: 100px;
  flex-shrink: 0;
}

.settings-section .settings-value {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

.settings-reconnect {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
}

.settings-agent {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
}

.settings-agent-text {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

.settings-agent-btns {
  margin-top: 0;
}

/* Settings categories */
.settings-categories {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
}

.settings-cat-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.settings-cat-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Settings sub-header */
.settings-sub-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.settings-sub-header h2 {
  font-size: 15px;
  color: #f59e0b;
  margin: 0;
}

/* Toggle switches */
.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid #334155;
  cursor: pointer;
  transition: background 0.12s;
}

.toggle-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.toggle-label {
  font-size: 13px;
  color: #cbd5e1;
  font-family: monospace;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch.on { background: #22c55e; }
.toggle-switch.off { background: #475569; }

.toggle-knob {
  position: absolute;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}

.toggle-switch.on .toggle-knob { left: 18px; }
.toggle-switch.off .toggle-knob { left: 2px; }

/* Soul form */
.settings-soul-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.soul-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.soul-field span {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.soul-field input,
.soul-field textarea {
  padding: 8px 10px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  resize: vertical;
}

.soul-field input:focus,
.soul-field textarea:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.soul-field input::placeholder,
.soul-field textarea::placeholder {
  color: #475569;
}

/* Placeholder */
.settings-placeholder {
  text-align: center;
  padding: 20px 0;
}

.settings-placeholder p {
  font-size: 13px;
  color: #94a3b8;
}

.settings-muted {
  font-size: 11px !important;
  color: #64748b !important;
  margin-top: 4px;
}

/* Plan */
/* ─── Toast ─── */
.toast {
  position: fixed;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 8px 18px;
  background: #1e293b;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #f59e0b;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.1);
  animation: toastIn 0.25s ease;
  pointer-events: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Load dialog ─── */
.load-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.load-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
}

.settings-plan .settings-section:last-child {
  border-bottom: none;
}

.save-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.save-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
  outline: none;
}

.save-input:focus {
  border-color: #f59e0b;
}

.save-confirm {
  white-space: nowrap;
}
