/* Gemeinsames UI-Scaffolding — vor Seiten-<style> laden (CSP: style-src 'self').
   Seiten-Paletten (Factory, Conference, Testsuite) überschreiben :root bei Bedarf. */
:root {
  --bg: #ebe6dc;
  --bg-deep: #e4ddd1;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --field: #f3f4f6;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn-bg: #fff7ed;
  --danger: #b91c1c;
  --danger-bg: #fde8e8;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(28, 25, 23, 0.08);
}

* { box-sizing: border-box; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0 0 8px; color: #374151; }

.field, select.field, textarea.field {
  width: 100%; border: 1px solid var(--line); background: var(--field);
  border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 1rem;
  outline: none; transition: border-color 160ms, box-shadow 160ms, background 160ms;
  color: var(--ink);
}
textarea.field { min-height: 96px; resize: vertical; }
.field:focus {
  border-color: #fdba74; background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.stack { display: grid; gap: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font: inherit;
  font-weight: 700; cursor: pointer; background: var(--accent); color: #fff;
  transition: background 140ms ease, transform 140ms ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  font-weight: 600;
}
.btn.ghost:hover { background: var(--field); }
.btn.small { padding: 8px 12px; font-size: 0.9rem; }
.btn.warn { background: #c2410c; }
.btn.warn:hover { background: #9a3412; }

.hidden { display: none !important; }

.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 28px 20px 64px; }

.tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.tab {
  border: 0; background: transparent; font: inherit; font-weight: 600;
  color: var(--muted); padding: 10px 14px; border-radius: 999px; cursor: pointer;
}
.tab.active { background: #fff7ed; color: var(--accent-hover); }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
}
.pill.on { background: var(--ok-bg); color: var(--ok); }
.pill.off { background: var(--field); color: var(--muted); }

.hint { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; line-height: 1.4; }

.outbox {
  margin-top: 12px; padding: 14px; border-radius: 12px; background: #1c1917; color: #fafaf9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem;
  white-space: pre-wrap; word-break: break-word; min-height: 120px; max-height: 420px; overflow: auto;
}
.outbox.empty { color: #a8a29e; }

.job-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
