:root {
  --bg: #0b0f17;
  --panel: #131a26;
  --panel-2: #1a2333;
  --border: #233044;
  --text: #e6edf6;
  --muted: #8a99ad;
  --accent: #4f8cff;
  --accent-2: #2dd4bf;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --bubble-user: #2563eb;
  --bubble-bot: #1e2a3d;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
button:hover { background: #243049; border-color: #2f3e57; }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: #3f7ae6; }
button.danger { background: transparent; border-color: #57303a; color: #ff8a8a; }
button.danger:hover { background: #2a1820; }
button.ghost { background: transparent; }
button.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

input, textarea, select {
  font: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 5px; }
textarea { resize: vertical; min-height: 70px; }

.row { display: flex; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
}
.pill.green { color: #86efac; border-color: #1f4030; background: #0f2419; }
.pill.amber { color: #fcd34d; border-color: #4a3a12; background: #271e09; }
.pill.red { color: #fca5a5; border-color: #4a2226; background: #2a1316; }
.pill.blue { color: #93c5fd; border-color: #1e3358; background: #0e1c34; }

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

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #0f1722; border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { border-color: #57303a; color: #ffb4b4; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #243049; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
