:root {
  --grund: #f4f2ee;
  --karte: #ffffff;
  --text: #1d2327;
  --leise: #5d676e;
  --linie: #d9d5cd;
  --akzent: #1f5a4c;
  --akzent-dunkel: #174438;
  --gut: #e4f1ea;
  --gut-rand: #2e7d5b;
  --schlecht: #fbe9e6;
  --schlecht-rand: #b3402d;
  --neutral: #eef1f4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 .9rem; }
.meldung h2 { font-size: 1.5rem; }
h3 { font-size: 1rem; margin: 0 0 .2rem; }
p { margin: 0 0 .6rem; }
code { font-size: .9em; background: rgba(0,0,0,.06); padding: .05em .3em; border-radius: 3px; }
a { color: var(--akzent); }
.klein { font-size: .875rem; color: var(--leise); }

.kopf { background: var(--akzent); color: #fff; }
.kopf-innen {
  max-width: 62rem; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.marke { font-size: 1.3rem; font-weight: 700; margin: 0; letter-spacing: .01em; }
.firma { margin: 0; opacity: .85; font-size: .9rem; }
.kopf nav { display: flex; gap: 1.25rem; }
.kopf nav a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }
.kopf nav a:hover { border-bottom-color: #fff; }

main { max-width: 62rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
form#rechnung { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 1.25rem; }
.einlesen { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.einlesen h2 { margin-bottom: .2rem; }
.einlesen p { margin: 0; max-width: 34rem; }
.einlesen form { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.absender { background: transparent; }
.absender p { margin-bottom: .4rem; }

.raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem 1rem; }
.raster .breit { grid-column: span 2; }
.raster .ganz { grid-column: 1 / -1; }
label { display: grid; gap: .25rem; font-size: .875rem; color: var(--leise); }
input, select {
  font: inherit; color: var(--text); width: 100%;
  padding: .5rem .6rem; border: 1px solid #b9b4aa; border-radius: 6px; background: #fff;
}
input[type=file] { padding: .35rem; max-width: 20rem; min-width: 0; flex: 1 1 12rem; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #7fb5a5; outline-offset: 1px;
}

.tabelle-rahmen { overflow-x: auto; margin-bottom: .8rem; }
table.positionen { width: 100%; border-collapse: collapse; min-width: 44rem; }
.positionen th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--leise); padding: 0 .3rem .4rem; }
.positionen td { padding: .2rem .3rem; vertical-align: middle; }
.positionen td:first-child, .positionen th:first-child { padding-left: 0; width: 38%; }
.positionen .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.positionen td.netto { white-space: nowrap; min-width: 6.5rem; }
.positionen td:nth-child(2) { width: 6rem; }
.positionen td:nth-child(3) { width: 9rem; }
.positionen td:nth-child(4) { width: 8.5rem; }
.positionen td:nth-child(5) { width: 5.5rem; }
.weg {
  border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--leise);
  cursor: pointer; padding: .3rem .5rem; border-radius: 6px;
}
.weg:hover { color: var(--schlecht-rand); background: var(--schlecht); }

.summen {
  display: grid; grid-template-columns: auto auto; justify-content: end; gap: .25rem 2rem;
  margin: 1rem 0 0; font-variant-numeric: tabular-nums;
}
.summen dt { color: var(--leise); }
.summen dd { margin: 0; text-align: right; white-space: nowrap; }
.summen .gesamt { font-weight: 700; color: var(--text); font-size: 1.1rem; padding-top: .3rem; border-top: 1px solid var(--linie); }

.knopf {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--akzent); color: #fff; border: 1px solid var(--akzent);
  padding: .55rem 1rem; border-radius: 6px;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf.leise { background: #fff; color: var(--akzent); }
.knopf.leise:hover { background: var(--gut); }
.knopf.gross { font-size: 1.05rem; padding: .8rem 1.5rem; }
.abschluss { display: flex; justify-content: flex-end; }

.meldung { border-radius: 8px; padding: 1rem 1.25rem; border: 1px solid; margin: 0; }
.meldung h2 { margin-bottom: .4rem; }
.meldung ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.meldung.gut { background: var(--gut); border-color: var(--gut-rand); }
.meldung.schlecht { background: var(--schlecht); border-color: var(--schlecht-rand); }
.meldung.neutral { background: var(--neutral); border-color: #c5cdd5; }
.dateien { display: flex; gap: .6rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.pruefungen { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pruefung p { margin: 0; }
.pruefung li { margin-bottom: .3rem; overflow-wrap: anywhere; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .55rem 0; border-top: 1px solid var(--linie);
}
.liste li:first-child { border-top: 0; padding-top: 0; }
.liste a { margin-left: 1rem; }

@media (max-width: 720px) {
  .raster { grid-template-columns: 1fr 1fr; }
  .pruefungen { grid-template-columns: 1fr; }
  .abschluss .knopf { width: 100%; }
}
@media (max-width: 460px) {
  .raster { grid-template-columns: 1fr; }
  .raster .breit { grid-column: auto; }
}

/* Anmeldung */
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 1rem; }
main.schmal { max-width: 26rem; padding-top: 3rem; }
main.schmal .karte { display: grid; gap: 1rem; }
main.schmal .karte p { margin: 0; }
main.schmal label { font-size: .9rem; }
main.schmal input { font-size: 1rem; padding: .65rem .7rem; }
input.code { font-size: 1.6rem !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.kopf nav { align-items: center; }
.abmelden { margin: 0; }
.abmelden button {
  font: inherit; color: #fff; background: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: .3rem .7rem;
}
.abmelden button:hover { background: rgba(255,255,255,.15); }
