/* Bot-IT — plain CSS, no framework. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #5b6672;
  --line: #e3e0d8;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #d8efe9;
  --warn: #9a5b06;
  --warn-soft: #fdf1dc;
  --ok: #15803d;
  --bad: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(23 32 42 / 6%), 0 4px 16px rgb(23 32 42 / 6%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161b;
    --surface: #182027;
    --ink: #e8ecef;
    --muted: #9aa6b1;
    --line: #2a343d;
    --accent: #2dd4bf;
    --accent-ink: #062925;
    --accent-soft: #123b37;
    --warn: #f5b754;
    --warn-soft: #3a2b12;
    --ok: #4ade80;
    --bad: #f87171;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; padding-bottom: 3rem; }
a { color: var(--accent); }
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 1.5rem 0 1rem; }
code, pre { font-family: var(--mono); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 420px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.inline { display: inline; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand-logo { border-radius: 10px; background: #fff; }
.nav { display: flex; align-items: center; gap: 1rem; }
.nav a { text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: 0.9rem; }

/* Buttons */
.button {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.button-small { padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.button-ghost { background: transparent; color: var(--accent); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }

/* Home */
.hero { padding: 3rem 0 2rem; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin: 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-figure {
  margin: 0; display: grid; place-items: center; padding: 2rem;
  border-radius: 28px; background: linear-gradient(135deg, #d8efe9, #f3e9d6);
}
.hero-figure img {
  width: min(300px, 100%); height: auto; display: block;
  border-radius: 24px; background: #fff; box-shadow: var(--shadow);
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding-top: 1rem; }
.feature-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.feature-grid h2 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.feature-grid p { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .hero-inner, .feature-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero { padding-top: 1.5rem; }
}

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
section.card { margin-top: 3rem; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
input[type=text], input[type=password] {
  font: inherit; padding: 0.6rem 0.75rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
input:focus-visible, .button:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.field-error { color: var(--bad); font-weight: 500; font-size: 0.875rem; }
.help ul { margin: 0; padding-left: 1.2em; }
.alert { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 0.6rem 0.9rem; }

/* Dashboard */
.bot-list { display: grid; gap: 1rem; }
.bot-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bot h2 { margin: 0; font-size: 1.2rem; }
.bot-actions { display: flex; align-items: center; gap: 0.75rem; }
.bot-desc { color: var(--muted); margin: 0.5rem 0 0; }
.output {
  margin-top: 1rem; background: #0e1419; color: #d7e0e7; border-radius: 8px;
  max-height: 22rem; overflow: auto; padding: 0.9rem 1rem;
}
.output pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; }
.status { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.status-running, .status-queued { color: var(--accent); }
.status-success { color: var(--ok); }
.status-failed, .status-timeout { color: var(--bad); }
.section-title { margin-top: 2.5rem; font-size: 1.2rem; }
.runs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.runs th, .runs td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.runs th { color: var(--muted); font-weight: 600; }
