* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; background: #f3f4f6; color: #1f2937; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.wrap.schmal { max-width: 640px; }
h1 { font-size: 1.4rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
a { color: #1d4ed8; }
.leise { color: #6b7280; font-size: .9em; }
.kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kopf nav a { margin-left: 12px; }
.karte { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
input, select, button { font: inherit; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; }
input:focus, select:focus { outline: 2px solid #2563eb; border-color: #2563eb; }
input[readonly] { background: #f3f4f6; color: #4b5563; }
input.gross { font-size: 1.5rem; font-weight: 700; text-align: right; }
button { padding: 10px 16px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; }
button.primaer { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
button.link { border: 0; background: none; color: #1d4ed8; padding: 4px 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.raster.zwei { grid-template-columns: 1fr 1fr; }
.raster .breit { grid-column: 1 / -1; }
.raster button { margin-bottom: 12px; }
.knoepfe { display: flex; gap: 8px; }
.knoepfe .primaer { flex: 1; }
.panel { border: 2px solid #2563eb; }
.hinweis { background: #fef3c7; color: #92400e; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; }
.meldung { padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; }
.meldung.ok { background: #dcfce7; color: #166534; }
.meldung.warn { background: #fef3c7; color: #92400e; }
.meldung.fehler { background: #fee2e2; color: #991b1b; }
.treffer { list-style: none; margin: 0 0 8px; padding: 0; }
.treffer button { display: block; width: 100%; text-align: left; margin-bottom: 6px; }
.treffer button span { display: block; }
.treffer button:focus { outline: 2px solid #2563eb; }
.positionen { list-style: none; margin: 0; padding: 0; }
.positionen li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.positionen li span { display: block; }
.positionen li.neu strong::after { content: " NEU"; color: #b45309; font-size: .75em; }
.abweichung { color: #b45309 !important; }
.loeschen { padding: 4px 10px; color: #991b1b; flex-shrink: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 8px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
th.r, td.r { text-align: right; white-space: nowrap; }
thead th { background: #f9fafb; font-size: .85rem; }
tfoot th { font-size: 1rem; }
.tabelle-scroll { overflow-x: auto; }
.aktionen a { margin-right: 8px; white-space: nowrap; }
.status { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.status.offen { background: #dbeafe; color: #1e40af; }
.status.abgeschlossen { background: #e5e7eb; color: #374151; }
.fehler { color: #991b1b; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kennzahlen div { background: #fff; border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: #6b7280; font-size: .9rem; }
.kennzahlen span { display: block; font-size: 1.4rem; font-weight: 700; color: #1f2937; }
.abschluss { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
@media print {
  body { background: #fff; }
  .kopf nav, .abschluss { display: none; }
  .karte, .kennzahlen div { box-shadow: none; padding: 0; }
}
tr.gruppe { cursor: pointer; }
tr.gruppe:hover td { background: #f9fafb; }
.pfeil { display: inline-block; width: 1em; color: #6b7280; }
tr.details > td { background: #f9fafb; padding: 4px 8px 12px 28px; }
table.einzeln { font-size: .9rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; }
table.einzeln th, table.einzeln td { padding: 6px 8px; }
input.klein { display: inline-block; width: 90px; margin: 0; padding: 4px 6px; text-align: right; }
table.einzeln .aktionen form { display: flex; gap: 6px; margin: 0; }
table.einzeln button { padding: 4px 10px; font-size: .85rem; }
@media print { tr.details[hidden] { display: none; } .pfeil, table.einzeln .aktionen, table.einzeln th:last-child { display: none; } }
