:root {
  --fg: #111;
  --bg: #fff;
  --muted: #555;
  --akzent: #0a5;
  --warn: #c00;
  --rand: #ddd;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }

body {
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.hauptinhalt {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.2; }
h1.kategorie { color: var(--akzent); }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }

.meldungstyp { font-size: 1.1rem; color: var(--akzent); font-weight: 600; }
.meta { color: var(--muted); margin-bottom: 1rem; }
.meta-akzent { color: var(--akzent); font-weight: 600; margin-bottom: 1rem; }

.lage-text {
  white-space: pre-wrap;
  font-size: 1.05rem;
  line-height: 1.55;
  background: #fafafa;
  border: 1px solid var(--rand);
  border-radius: .25rem;
  padding: 1rem;
  margin: 1rem 0;
  overflow-wrap: anywhere;
}

.abschnitt {
  margin: 1.25rem 0;
}
.abschnitt h2 {
  font-size: 1rem;
  color: var(--akzent);
  margin: 0 0 .35rem;
  border-bottom: 1px solid var(--rand);
  padding-bottom: .15rem;
}
.abschnitt-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.5;
}
.abschnitt.naechste-meldung .abschnitt-text {
  font-weight: 600;
}

.banner {
  padding: .75rem 1rem;
  border-radius: .25rem;
  margin: 1rem 0;
  font-weight: 600;
}
.banner-warn { background: #fee; color: var(--warn); border: 1px solid var(--warn); }
.banner-ok   { background: #efe; color: var(--akzent); border: 1px solid var(--akzent); }
.banner-info { background: #ffd; color: #663; border: 1px solid #cc6; }

.signatur dt { font-weight: 600; color: var(--muted); }
.signatur dd { margin: 0 0 .5rem; }

details { margin: .5rem 0; }
summary { cursor: pointer; color: var(--muted); padding: .5rem 0; }

.aktionen { margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
button, .button {
  font: inherit;
  padding: .65rem 1.1rem;
  min-height: 44px;
  border: 1px solid var(--rand);
  background: #f5f5f5;
  border-radius: .25rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.primary, .button.primary { background: var(--akzent); color: #fff; border-color: var(--akzent); }
button.warn, .button.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
button[disabled] { opacity: .5; cursor: not-allowed; }
button:focus-visible, .button:focus-visible, a:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

input[type=text], input[type=password], input[type=datetime-local],
select, textarea {
  font: inherit;
  width: 100%;
  padding: .65rem;
  min-height: 44px;
  border: 1px solid var(--rand);
  border-radius: .25rem;
  background: #fff;
  color: var(--fg);
}
textarea { min-height: 12rem; }

.feld { margin: .75rem 0; }
.feld label { display: block; font-weight: 600; margin-bottom: .25rem; }
.feld .hinweis { color: var(--muted); font-size: .9rem; }

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tr.zurueckgezogen td { color: var(--muted); text-decoration: line-through; }

.status-badge {
  display: inline-block;
  padding: .15rem .55rem;
  font-size: .85rem;
  border-radius: .25rem;
  background: #eee;
  white-space: nowrap;
}
.status-veroeffentlicht { background: #cfe; color: #060; }
.status-entwurf         { background: #eee; color: #444; }
.status-zurueckgezogen  { background: #fdd; color: #900; }

.seitenfuss {
  margin: 2rem auto 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  max-width: 720px;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .tabelle th, .tabelle td { padding: .4rem .35rem; }
  .aktionen { gap: .4rem; }
  .aktionen button, .aktionen .button { flex: 1 1 auto; }
}

@media print {
  body { font-size: 12pt; color: #000; }
  .aktionen, .seitenfuss, .nicht-drucken, form[action$="/logout"] { display: none !important; }
  details { display: block; }
  details > summary { display: none; }
  details[open] > *, details > *:not(summary) { display: block !important; }
  .lage-text { background: none; border: none; padding: 0; }
  .hauptinhalt { max-width: 100%; padding: 0; }
  .druck-fuss { display: block; font-size: 9pt; color: #000; margin-top: 2rem; border-top: 1px solid #999; padding-top: .5rem; }
  a { color: #000; text-decoration: none; }
}
.druck-fuss { display: none; }
