:root {
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --card: rgba(14, 24, 43, 0.85);
  --line: rgba(148, 163, 184, 0.18);
  --text: #10233f;
  --muted: #6f7785;
  --accent: #dba64d;
  --accent-2: #5964e8;
  --danger: #fb7185;
  --success: #34d399;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.shell { min-height: 100vh; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 80px rgba(0,0,0,0.25);
  padding: 24px;
  color: #edf2ff;
}
.label {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.dashboard.hidden, .hidden { display: none !important; }
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  background: #fff;
}
.auth-visual {
  background:
    linear-gradient(180deg, rgba(5,85,175,0.08), rgba(0,0,0,0.08)),
    linear-gradient(180deg, #0f72b8 0%, #13a3d3 54%, #dce8d7 100%),
    url('https://assets.misterpandaaatje.nl/background-blue.jpg') center center / cover no-repeat;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  border-top-left-radius: 28px;
  border-bottom-left-radius: 28px;
  box-shadow: -14px 0 40px rgba(16,35,63,0.06);
}
.auth-panel-inner { width: min(100%, 320px); margin: 0 auto; }
.auth-logo { width: 92px; height: auto; display: block; margin-bottom: 24px; }
.auth-title { margin: 0; color: var(--accent); font-size: 24px; line-height: 1.28; font-weight: 500; }
.auth-copy { margin: 34px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.auth-copy-spaced { margin-top: 2px; }
.auth-error { margin-top: 18px; }
.dashboard {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}
form, .inline-form { display: flex; gap: 12px; flex-wrap: wrap; }
input, textarea, select, button {
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
}
input, select {
  flex: 1;
  min-width: 220px;
  background: rgba(9,16,30,0.85);
  color: #ffffff;
  padding: 14px 16px;
}
select { appearance: none; }
textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: rgba(9,16,30,0.85);
  color: #ffffff;
  padding: 14px 16px;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.62); }
button {
  background: linear-gradient(135deg, #747b88, #5f6673);
  color: #ffffff;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255,255,255,0.12);
}
button.ghost { background: rgba(255,255,255,0.06); color: #edf2ff; }
button:disabled, input:disabled, textarea:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
.discord-button {
  margin-top: 46px;
  background: linear-gradient(135deg, #5d69ef, #4f5ae2);
  color: white;
  padding: 18px 20px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  min-width: 218px;
  box-shadow: 0 12px 24px rgba(93,105,239,0.22);
}
.toolbar .discord-button { margin-top: 0; min-width: auto; padding: 12px 16px; }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.toolbar-right { display: flex; gap: 12px; align-items: center; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.bot-overview { display: flex; flex-direction: column; gap: 0; }
.bot-overview-list { display: flex; flex-direction: column; gap: 12px; }
.bot-overview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  color: #edf2ff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  gap: 16px;
  text-align: left;
}
.bot-overview-bar:hover {
  background: rgba(24, 40, 72, 0.95);
  border-color: rgba(148,163,184,0.35);
}
.bot-overview-bar-left { display: flex; flex-direction: column; gap: 4px; }
.bot-overview-bar-name { font-size: 18px; font-weight: 700; color: #edf2ff; }
.bot-overview-bar-meta { font-size: 13px; color: var(--muted); }
.bot-overview-bar-right { display: flex; align-items: center; gap: 12px; }
.bot-overview-bar-arrow { color: var(--muted); font-size: 20px; }
.no-bots-message {
  padding: 40px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
}
#bot-detail { display: flex; flex-direction: column; gap: 16px; }
#bot-manager, #bot-create-card { margin-bottom: 0; }
.control-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; margin-bottom: 16px; }
.control-row button { min-width: 120px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(125,211,252,0.12);
  color: var(--accent);
  border: 1px solid rgba(125,211,252,0.2);
  font-size: 13px;
}
.pill.success { color: #a7f3d0; background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.25); }
.pill.warning { color: #fde68a; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.25); }
.pill.stopped { color: var(--muted); background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.2); }
.pill.danger { color: #fecdd3; background: rgba(251,113,133,0.12); border-color: rgba(251,113,133,0.25); }
.list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stack-form { display: grid; gap: 12px; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; }
.danger-button { background: rgba(251,113,133,0.12); color: #fecdd3; border-color: rgba(251,113,133,0.25); padding: 10px 12px; }
.muted, .error { color: var(--muted); }
.error { color: var(--danger); }
h4 { margin: 20px 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 34vh; }
  .auth-panel { border-radius: 28px 28px 0 0; margin-top: -28px; padding: 32px 24px 40px; }
  .dashboard { width: min(1380px, calc(100% - 24px)); }
}
.fm-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 12px;
  gap: 10px;
  transition: background 0.12s, border-color 0.12s;
}
.fm-file-row:hover { background: rgba(255,255,255,0.06); border-color: rgba(148,163,184,0.25); }
.fm-file-row.pinned { border-color: rgba(125,211,252,0.25); background: rgba(125,211,252,0.05); }
.fm-file-row .fm-filename { font-size: 14px; color: #e2e8f0; word-break: break-all; flex: 1; cursor: pointer; }
.fm-file-row .fm-filename:hover { color: #7dd3fc; text-decoration: underline; }
.fm-file-row .fm-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fm-file-row .fm-actions { display: flex; gap: 6px; }
.fm-file-row button { padding: 6px 12px; font-size: 12px; font-weight: 600; }
#fm-file-list::-webkit-scrollbar { width: 6px; }
#fm-file-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 6px; }
#fm-file-list::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 6px; }
#fm-editor { background: rgba(5, 10, 20, 0.9); color: #e2e8f0; border-color: rgba(125,211,252,0.2); }
#fm-editor:focus { outline: none; border-color: rgba(125,211,252,0.5); }
#console-output::-webkit-scrollbar { width: 6px; }
#console-output::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 6px; }
#console-output::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 6px; }
.console-line-bot { color: #7dd3fc; }
.console-line-error { color: #fca5a5; }
.console-line-warn { color: #fde68a; }
#console-input { pointer-events: none; }