:root {
  --paper: #f4ecd8; --card: #fffdf7; --ink: #43392a; --soft: #6f6049; --faint: #9a8b73;
  --leaf: #7fb069; --leaf-deep: #4f7a3a; --line: #e7dcc2; --alert: #e0726a; --amber: #f0b24a;
  --shadow: 0 8px 22px rgba(67,57,42,.12);
  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--paper);
  background-image: radial-gradient(circle at 12% -10%, #fff7e6 0, transparent 45%), radial-gradient(circle at 100% 0, #eef5e3 0, transparent 40%);
  min-height: 100vh; -webkit-font-smoothing: antialiased; }
.bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(251,243,225,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand .sub { color: var(--faint); font-weight: 700; font-size: 14px; }
.conn { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(154,139,115,.18); }
.dot.on { background: var(--leaf); box-shadow: 0 0 0 3px rgba(127,176,105,.25); }
.dot.bad { background: var(--alert); box-shadow: 0 0 0 3px rgba(224,114,106,.25); }
main { width: min(820px, 94vw); margin: 22px auto 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.login { max-width: 420px; margin: 8vh auto; }
.login h1 { font-size: 24px; margin-bottom: 4px; }
.muted { color: var(--soft); font-size: 14px; margin-bottom: 16px; }
label { display: block; font-weight: 800; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); margin: 10px 0 6px; }
input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; font: inherit; background: #fff; }
input:focus { outline: none; border-color: var(--leaf); }
.btn { font-family: var(--font); font-weight: 800; font-size: 15px; padding: 12px 18px; border-radius: 999px; border: none;
  cursor: pointer; background: var(--card); color: var(--ink); box-shadow: 0 4px 12px rgba(67,57,42,.1); transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--leaf); color: #1f3314; width: 100%; margin-top: 16px; }
.btn.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.run { background: var(--leaf); color: #1f3314; }
.btn.stop { background: var(--alert); color: #fff; }
.err { color: var(--alert); font-weight: 700; font-size: 13px; margin-top: 10px; min-height: 1em; }
.row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.actions { display: flex; gap: 8px; }
h2 { font-size: 18px; margin: 22px 0 12px; }
.bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bot { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(67,57,42,.08); }
.bot .name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.bot .meta { color: var(--soft); font-size: 13px; margin: 4px 0 12px; }
.bot .sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.bot.live .sdot { background: var(--leaf); box-shadow: 0 0 0 3px rgba(127,176,105,.22); }
.console { background: #2a2419; color: #e9dec6; border-radius: 14px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.5; height: 320px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.console .l { opacity: .92; }
.console .lvl { color: #b9a97f; }
.console .er { color: #f0a59c; }
.console .ou { color: #9fd28a; }
