:root {
  --ink: #1a1c1f;
  --muted: #6b7178;
  --line: #e2e4e7;
  --bg: #f4f5f6;
  --surface: #ffffff;
  --accent: #b45309;      /* Signal-Ocker: Aktion / laeuft */
  --accent-ink: #7c3a06;
  --ok: #15803d;
  --ok-bg: #e7f3ec;
  --amber-bg: #fbf0df;
  --neutral-bg: #eceef0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.topbar { background: var(--ink); color: #fff; }
.topbar-inner { max-width: 640px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; }
.brand { font-weight: 600; letter-spacing: .01em; }
.back { color: #fff; text-decoration: none; font-size: .95rem; }
.wrap { max-width: 640px; margin: 0 auto; padding: 18px; }

h1 { font-size: 1.4rem; margin: .2em 0 .1em; }
h2 { font-size: 1rem; margin: 0 0 .6em; color: var(--muted); font-weight: 600; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.desc { margin: 0; white-space: pre-wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }

.badge { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-scheduled { background: var(--neutral-bg); color: var(--muted); }
.badge-in_progress { background: var(--amber-bg); color: var(--accent-ink); }
.badge-done, .badge-invoiced { background: var(--ok-bg); color: var(--ok); }

.joblist { list-style: none; padding: 0; margin: 8px 0; }
.jobcard { display: flex; justify-content: space-between; gap: 12px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.jobcard:active { background: #fafbfb; }
.jobcard-title { font-weight: 600; }
.jobcard-sub { color: var(--muted); font-size: .88rem; }
.jobcard-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.time { color: var(--muted); font-size: .85rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; border-radius: 10px;
  padding: 12px 18px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn:active { opacity: .9; }
.btn-accent { background: var(--accent); }
.btn-block { display: flex; width: 100%; margin-top: 8px; }

.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ln-name { font-weight: 500; }
.ln-sub { color: var(--muted); font-size: .85rem; }
.ln-sum { text-align: right; white-space: nowrap; }
.ln-del { width: 32px; text-align: right; }
.lines tfoot td { font-weight: 700; border-bottom: none; padding-top: 12px; }
.empty-row { color: var(--muted); text-align: center; }

.addline { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.addline select { flex: 1 1 200px; }
.addline input { width: 90px; }
select, input[type="text"], input[type="number"], textarea {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
textarea { resize: vertical; }
input[type="text"] { margin-top: 10px; }

.linkbtn { background: none; border: none; color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: 0 4px; }
.linkbtn.clear { font-size: .9rem; display: block; margin: 6px 0 0 auto; }

.sigpad { width: 100%; height: 180px; border: 1px dashed #b9bdc2; border-radius: 10px; background: #fff; touch-action: none; }
.sig-img { max-width: 220px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 22px; color: var(--muted); text-align: center; }

/* --- Kopfzeile: angemeldeter Nutzer --- */
.topbar-inner { justify-content: space-between; }
.topbar-user { display: flex; align-items: center; gap: 12px; color: #cfd2d6; font-size: .9rem; }
.logout-form { margin: 0; }
.logout-btn { background: transparent; border: 1px solid #3a3d42; color: #fff; border-radius: 8px;
  padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.logout-btn:active { background: #2a2c30; }

/* --- Login --- */
.login { max-width: 360px; margin: 6vh auto 0; }
.brandmark { text-align: center; margin-bottom: 22px; }
.brandmark-text { font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.login-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.alert { background: #fdecec; color: #a12626; border: 1px solid #f3c9c9; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; font-size: .9rem; }

/* --- Installations-Assistent --- */
.setup { max-width: 560px; }
.setup h2 { margin-top: 26px; }
.setup p { margin: 0 0 12px; }
.setup hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
.setup label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem;
  color: var(--muted); margin-bottom: 14px; }
.setup label.check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); }
.setup label.check input { width: auto; margin-top: 3px; }
.setup form { background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; margin: 16px 0; }
.setup input[type="text"] { margin-top: 0; }
.setup .code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem;
  white-space: pre; overflow-x: auto; margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .85rem; }
.ok-line { font-weight: 600; color: var(--ok); }

.stepbar { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0;
  margin: 0 0 18px; font-size: .8rem; color: var(--muted); }
.stepbar li { padding: 4px 10px; border-radius: 999px; background: var(--neutral-bg); }
.stepbar li.done { background: var(--ok-bg); color: var(--ok); }
.stepbar li.now { background: var(--accent); color: #fff; font-weight: 600; }

.checks { list-style: none; padding: 0; margin: 0 0 18px; }
.checks li { background: var(--surface); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.checks li strong { display: block; font-size: .95rem; }
.checks li span { color: var(--muted); font-size: .85rem; }
.checks li.ok { border-left-color: var(--ok); }
.checks li.warn { border-left-color: var(--accent); }
.checks li.bad { border-left-color: #a12626; }

.steps-list { padding-left: 1.2em; margin: 0 0 16px; }
.steps-list li { margin-bottom: 6px; }
