:root {
  --bg: #f2f6f8;
  --card: #ffffff;
  --ink: #14283a;
  --muted: #5b7083;
  --line: #dde6ec;
  --brand: #0f9d8f;
  --brand-dark: #0b7f74;
  --brand-soft: #e2f4f1;
  --warn: #d97706;
  --warn-soft: #fef3e2;
  --ok: #15803d;
  --ok-soft: #e8f5ec;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 58, .06), 0 8px 24px rgba(20, 40, 58, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
}
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 960px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 19px;
}
.logo svg { width: 28px; height: 28px; }
.logo .lane { color: var(--brand-dark); }
.site-header nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.site-header nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 10px;
}
.site-header nav a:hover { background: var(--brand-soft); }
.site-header nav a.cta { background: var(--brand); color: #fff; }
.site-header nav a.cta:hover { background: var(--brand-dark); }

/* ---------- Layout ---------- */
.container { max-width: 760px; margin: 0 auto; padding: 20px 16px 64px; }
.container.wide { max-width: 900px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 6px; font-size: 20px; }
.card h3 { margin: 0 0 4px; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; }
.right { margin-left: auto; }

/* ---------- Formulare ---------- */
.label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
.label .opt { color: var(--muted); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
textarea.input { resize: vertical; min-height: 72px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field-error { color: var(--danger); font-size: 13.5px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; font-size: 16px; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; font-family: inherit;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { background: #b8c7cf; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand-dark); border: 1.5px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-plain { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-plain:hover { background: #f0f4f6; border-color: #c6d3db; }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.linklike { background: none; border: none; color: var(--brand-dark); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* ---------- Tabs (Register) ---------- */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14.5px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab .cnt { font-weight: 700; font-size: 12.5px; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.tab.active .cnt { background: rgba(255,255,255,.2); color: #fff; }
.tab .cnt.warn { background: var(--warn-soft); color: var(--warn); }
.tab .cnt.full { background: var(--ok-soft); color: var(--ok); }

/* ---------- Status / Fortschritt ---------- */
.progress { height: 8px; border-radius: 999px; background: #e6edf1; overflow: hidden; margin: 6px 0 4px; }
.progress > div { height: 100%; border-radius: 999px; background: var(--brand); transition: width .3s; }
.progress.warn > div { background: var(--warn); }
.progress.full > div { background: var(--ok); }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--brand-soft); color: var(--brand-dark); }
.badge.off { background: #eceff2; color: var(--muted); }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin: 10px 0; }
.notice.warn { background: var(--warn-soft); color: #92400e; }
.notice.ok { background: var(--ok-soft); color: #14532d; }
.notice.err { background: var(--danger-soft); color: #991b1b; }
.notice.info { background: var(--brand-soft); color: #0b5d55; }

/* ---------- Einträge ---------- */
.entry-list { list-style: none; margin: 8px 0 0; padding: 0; }
.entry-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 2px; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.entry-list li:last-child { border-bottom: none; }
.entry-list .who { color: var(--muted); font-size: 13px; }
.item-block { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; }
.item-block.full { background: #f6faf7; border-color: #cde7d6; }

/* ---------- Editor ---------- */
.section-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 14px; background: #fbfdfe; }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.kind-pick button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px;
  cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3;
}
.kind-pick button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.kind-pick .k-icon { display: block; font-size: 20px; margin-bottom: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item-row { display: grid; grid-template-columns: 1fr 84px 84px 38px; gap: 8px; align-items: end; margin-top: 8px; }
.item-row .del, .icon-btn {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 18px; padding: 8px 4px; border-radius: 8px;
}
.item-row .del:hover, .icon-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Diverses ---------- */
.share-url {
  display: block; width: 100%; padding: 11px 12px; font-size: 14.5px;
  font-family: ui-monospace, Consolas, monospace;
  border: 1.5px dashed var(--brand); border-radius: 12px; background: var(--brand-soft);
  color: var(--brand-dark); word-break: break-all;
}
.qr-box { text-align: center; padding: 8px; }
.qr-box img { max-width: 220px; width: 100%; height: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 13px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 15px; box-shadow: var(--shadow); z-index: 100; max-width: 92vw;
}
.toast.err { background: var(--danger); }

.site-footer { max-width: 960px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 13.5px; }
.site-footer a { color: var(--muted); }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 40px 16px 26px; }
.hero h1 { font-size: clamp(28px, 6vw, 42px); margin: 0 0 12px; }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature-grid .card { margin: 0; }
.feature-grid .f-icon { font-size: 26px; }
.price-tag { font-size: 26px; font-weight: 800; }

/* ---------- Druck (Aushang) ---------- */
.print-only { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-only, .print-only * { visibility: visible; display: block; }
  .print-only {
    position: absolute; inset: 0; padding: 40px; text-align: center;
  }
  .print-only h1 { font-size: 34pt; margin: 0 0 8pt; }
  .print-only .p-date { font-size: 16pt; margin-bottom: 24pt; }
  .print-only img { width: 300pt; height: 300pt; margin: 12pt auto; }
  .print-only .p-url { font-size: 13pt; font-family: ui-monospace, Consolas, monospace; margin-top: 16pt; }
  .print-only .p-hint { font-size: 12pt; color: #333; margin-top: 20pt; }
}

@media (max-width: 560px) {
  .two-col { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 70px 70px 34px; }
  .kind-pick { grid-template-columns: 1fr 1fr 1fr; }
  .card { padding: 16px; }
}
