/* Portal Krieglmeier — ruhig, im Ton der Belege: Lato, Tinte #1A1A18, warme Grautöne. */
@font-face { font-family: "Lato"; font-weight: 400; src: url("/schriften/Lato-Regular.ttf"); }
@font-face { font-family: "Lato"; font-weight: 700; src: url("/schriften/Lato-Bold.ttf"); }

:root {
  --tinte: #1A1A18; --grau: #6B6A66; --linie: #DDDAD3; --flaeche: #F6F5F2; --papier: #FFFFFF;
  --ok: #2F6B3A; --ok-flaeche: #E8F1E9; --fehler: #9B2C1F; --fehler-flaeche: #F8E6E3;
  --hinweis: #7A5B12; --hinweis-flaeche: #FBF1D9;
}
* { box-sizing: border-box; }
html { font: 15px/1.5 "Lato", system-ui, sans-serif; color: var(--tinte); background: var(--flaeche); }
body { margin: 0; }
a { color: inherit; }
h1 { font-size: 1.35rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .25rem; }
h1 .nummer { letter-spacing: .02em; text-transform: none; }
h2 { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--grau);
     margin: 2rem 0 .6rem; }
.leise { color: var(--grau); }
.klein { font-size: .85rem; }

header { background: var(--papier); border-bottom: 1px solid var(--linie); }
header .innen { max-width: 1120px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center;
                gap: 2rem; flex-wrap: wrap; }
header img { height: 15px; display: block; }
nav { display: flex; gap: 1.25rem; flex: 1; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--grau); padding: .2rem 0; border-bottom: 2px solid transparent; }
nav a.aktiv, nav a:hover { color: var(--tinte); border-bottom-color: var(--tinte); }
header form { margin: 0; }

main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: 6px; padding: 1.1rem 1.25rem;
         margin-bottom: 1rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
             margin-bottom: 1rem; }
.zeile { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem 1rem; }
.raster .breit { grid-column: 1 / -1; }

.meldung { padding: .65rem .9rem; border-radius: 6px; margin-bottom: .75rem; }
.meldung.ok { background: var(--ok-flaeche); color: var(--ok); }
.meldung.fehler { background: var(--fehler-flaeche); color: var(--fehler); }
.meldung.hinweis { background: var(--hinweis-flaeche); color: var(--hinweis); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grau);
     font-weight: 700; padding: .45rem .5rem; border-bottom: 1px solid var(--tinte); }
td { padding: .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
tr.verweis { cursor: pointer; }
tr.verweis:hover td { background: var(--flaeche); }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }

label { display: block; font-size: .78rem; color: var(--grau); margin-bottom: .2rem; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: .45rem .55rem; border: 1px solid var(--linie);
                          border-radius: 4px; background: var(--papier); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--tinte); outline-offset: -1px; }
textarea { min-height: 3.2rem; resize: vertical; }
table.posten td { padding: .3rem .25rem; }
table.posten input { padding: .35rem .45rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; color: var(--tinte); }
.check input { width: auto; margin-top: .25rem; }

button, .knopf { font: inherit; display: inline-block; padding: .5rem 1rem; border-radius: 4px; cursor: pointer;
                 border: 1px solid var(--tinte); background: var(--papier); color: var(--tinte); text-decoration: none; }
button.haupt, .knopf.haupt { background: var(--tinte); color: var(--papier); }
button.gefahr { border-color: var(--fehler); color: var(--fehler); }
button.leise { border-color: var(--linie); color: var(--grau); }
button:hover, .knopf:hover { opacity: .85; }

.marke { display: inline-block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .45rem;
         border-radius: 3px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--grau); }
.marke.entwurf { background: var(--hinweis-flaeche); color: var(--hinweis); border-color: transparent; }
.marke.ausgestellt, .marke.versandt, .marke.bezahlt { background: var(--ok-flaeche); color: var(--ok); border-color: transparent; }
.marke.storniert, .marke.ueberfaellig, .marke.wird_versandt { background: var(--fehler-flaeche); color: var(--fehler); border-color: transparent; }
.summe { font-size: 1.15rem; font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; word-break: break-all; }

.anmelden { max-width: 360px; margin: 12vh auto; }
.anmelden img { width: 220px; display: block; margin: 0 auto 2rem; }

@media (max-width: 700px) {
  table.posten thead { display: none; }
  table.posten tr { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .5rem 0;
                    border-bottom: 1px solid var(--linie); }
  table.posten td { border: 0; }
  table.posten td.text { grid-column: 1 / -1; }
}
.voll { width: 100%; }
.mitte { text-align: center; margin: 0; }
table.posten td:nth-child(1) { width: 14%; }
table.posten td:nth-child(2) { width: 30%; }
table.posten td:nth-child(3) { width: 18%; }
table.posten td:nth-child(4) { width: 7%; }
table.posten td:nth-child(5) { width: 12%; }
table.posten td:nth-child(6) { width: 11%; white-space: nowrap; }
table.posten input[name=einzelpreis], table.posten input[name=menge] { text-align: right; }
table.protokoll td:nth-child(1) { width: 11rem; white-space: nowrap; }
table.protokoll td:nth-child(2) { width: 12rem; }
.kopfzeile form.zeile input { width: 16rem; }
