:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --text: #1c2420;
  --muted: #5d6b64;
  --line: #dde3df;
  --brand: #3f7d2e;       /* LS-Grün */
  --brand-dark: #2f6122;
  --accent: #b80c14;      /* Tankstellen-Rot */
  --ok: #2f8a3a;
  --err: #b3261e;
  --warn: #9a6a00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121714; --surface: #1b221e; --text: #e6ece8; --muted: #9aa8a0; --line: #2c3631;
    --brand: #6bb152; --brand-dark: #5a9c43; --ok: #5cc26a; --err: #ff8a80; --warn: #e0b24a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
code { background: color-mix(in srgb, var(--text) 7%, transparent); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; font-size: .9em; background: var(--surface); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: .45em; font-weight: 700; color: var(--text); text-decoration: none; }
.brand small { font-weight: 400; color: var(--muted); font-size: .8em; }
.brand-pump { font-size: 1.2em; }
nav { display: flex; align-items: center; gap: 14px; }
nav a { text-decoration: none; }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }

main.wrap { padding-top: 28px; padding-bottom: 48px; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: .6em 1.15em; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:focus-visible, input:focus-visible, .linkbtn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.btn-small { padding: .35em .8em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand-dark); }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

/* Meldungen */
.flash { padding: .7em 1em; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.flash-error { background: color-mix(in srgb, var(--err) 10%, var(--surface)); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.flash-info { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-color: var(--line); }

/* Karten & Formulare */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin: 20px auto; }
.muted { color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .95rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form input[type=text], .form input:not([type]), .form input[type=email], .form input[type=password], .form input[type=number] {
  font: inherit; padding: .55em .7em; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); width: 100%;
}
.form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.form .check input { margin-top: .3em; }
.form.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form.grid .span2 { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; }
.err { color: var(--err); font-weight: 400; font-size: .88rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

/* Startseite */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; margin-bottom: 40px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.steps h2 { font-size: 1.5rem; margin-bottom: 18px; }
.steplist { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 16px; }
.steplist > li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 20px 70px; position: relative; box-shadow: var(--shadow); }
.steplist > li::before {
  content: counter(s); position: absolute; left: 20px; top: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.steplist p { margin: .4em 0; }
.hint { font-size: .9rem; color: var(--muted); }
.copybox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.copybox code { background: none; padding: 0; flex: 1 1 260px; }
.more { margin-top: 10px; }
.more summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.more ul { margin: .6em 0 0; padding-left: 1.2em; }

/* Tankstellen-Schild */
.sign { width: 100%; max-width: 330px; justify-self: center; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.sign-cap { height: 12px; background: #c9cdd1; border-radius: 3px 3px 0 0; margin: 0 -4px; border-bottom: 2px solid #a3a8ad; }
.sign-body { background: #eef0f2; padding: 10px 10px 4px; }
.sign-row { display: grid; grid-template-columns: 42% 58%; height: 62px; overflow: hidden; margin-bottom: 8px; border-bottom: 1px solid #b7bcc0; }
.sign-label { background: #d6e0e2; color: #b80c14; font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; padding-left: 12px; font-stretch: condensed; }
.sign-led { background: #0f0f11; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.led { display: flex; align-items: center; gap: 2px; }
.led img { height: 48px; width: auto; display: block; }
.sign-foot { text-align: center; font-size: .78rem; color: #3a3f45; padding: 4px 0 6px; }
.sign-pole { width: 40px; height: 44px; margin: 0 auto; background: linear-gradient(90deg, #8e9398 0 25%, #a9aeb3 25%); }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.target-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.target-head h2 { margin-bottom: .2em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.target-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.badge { font-size: .75rem; font-weight: 700; padding: .2em .6em; border-radius: 99px; border: 1px solid; }
.badge-ok { color: var(--ok); border-color: currentColor; }
.badge-error { color: var(--err); border-color: currentColor; }
.badge-new { color: var(--warn); border-color: currentColor; }
.badge-paused { color: var(--muted); border-color: currentColor; }
.facts { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin: 16px 0 0; }
.facts div { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.facts dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; }
.log { list-style: none; padding: 0; margin: .6em 0 0; font-size: .9rem; }
.log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.dot-ok { background: var(--ok); }
.dot-err { background: var(--err); }

/* Fußzeile */
.foot { border-top: 1px solid var(--line); padding: 20px 0; font-size: .85rem; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .sign { max-width: 300px; }
  .led img { height: 42px; }
  .brand small { display: none; }
  .form.grid, .grid2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts .wide { grid-column: 1 / -1; }
  .steplist > li { padding-left: 22px; padding-top: 60px; }
}

/* Installer */
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.checks li { padding: 8px 12px; border-radius: 8px; background: var(--bg); }
.checks li.ok { color: var(--ok); }
.checks li.bad { color: var(--err); }
.checks small { color: var(--muted); }
.form select { font: inherit; padding: .55em .7em; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
.form.grid h2 { margin: 12px 0 0; }
.grid-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 760px) { .grid-sub { grid-template-columns: 1fr; } }
