/* Oberfläche der Reporting-Plattform. Ruhig und sachlich – die Gestaltung
   gehört in den Bericht, nicht ins Werkzeug. */

:root {
    --grund: #eef0f4;
    --flaeche: #ffffff;
    --flaeche-leise: #f6f7f9;
    --tinte: #0b0d10;
    --tinte-leise: #59616e;
    --linie: #d3d8e0;
    --linie-fein: #e5e9ef;
    /* Markenfarben Sachsen Media. --akzent trägt Flächen, --akzent-tief steht
       für Text und Linien, wo #009EE3 auf Weiss zu blass wäre. */
    --akzent: #009ee3;
    --akzent-hell: #e3f4fc;
    --akzent-tief: #06739f;
    --magenta: #d6007e;
    --ok: #147a52;
    --ok-hell: #e3f4ec;
    --warnung: #8a5a00;
    --warnung-hell: #fdf1dc;
    --fehler: #b3261e;
    --fehler-hell: #fbe9e7;
    --radius: 10px;
    --schatten: 0 1px 2px rgba(11, 13, 16, .06), 0 8px 24px rgba(11, 13, 16, .06);

    --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --schrift-eng: "Archivo Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--tinte);
    font: 15px/1.55 var(--schrift);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); }
a:hover { color: var(--akzent-tief); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

.leise { color: var(--tinte-leise); }
.klein { font-size: 13px; }
.zahl { font-variant-numeric: tabular-nums; }
.rechts { text-align: right; }

/* --- Rahmen --------------------------------------------------------------- */

.kopf {
    background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
    position: sticky;
    top: 0;
    z-index: 20;
}

.kopf-innen {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.marke {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--tinte);
    white-space: nowrap;
    font: 700 13px/1 var(--schrift-eng);
    letter-spacing: .16em;
    text-transform: uppercase;
}
.marke img { width: 118px; height: auto; }
.marke span {
    padding-left: 11px;
    border-left: 1px solid var(--linie);
    color: var(--tinte-leise);
}

.kopf nav { display: flex; gap: 4px; margin-left: auto; }
.kopf nav a {
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--tinte-leise);
    font-size: 14px;
}
.kopf nav a:hover { background: var(--flaeche-leise); color: var(--tinte); }
.kopf nav a[aria-current] { background: var(--akzent-hell); color: var(--akzent-tief); font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
main.schmal { max-width: 460px; padding-top: 12vh; }

.seitenkopf { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.seitenkopf .werkzeuge { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* --- Karten --------------------------------------------------------------- */

.karte {
    background: var(--flaeche);
    border: 1px solid var(--linie-fein);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 22px 24px;
    margin-bottom: 18px;
}
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.karte-kopf { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.karte-kopf h2, .karte-kopf h3 { margin: 0; }
.karte-kopf .leise { margin-left: auto; }

/* --- Formulare ------------------------------------------------------------ */

label { display: block; font-size: 13px; font-weight: 600; color: var(--tinte-leise); margin-bottom: 5px; }

input[type=text], input[type=url], input[type=date], input[type=time],
input[type=number], input[type=password], input[type=search], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--linie);
    border-radius: 8px;
    background: var(--flaeche);
    color: var(--tinte);
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--akzent);
    outline-offset: -1px;
    border-color: var(--akzent);
}
input[type=number] { font-variant-numeric: tabular-nums; }
textarea { min-height: 90px; resize: vertical; }

.feld { margin-bottom: 16px; }
.reihe { display: flex; gap: 16px; flex-wrap: wrap; }
.reihe > .feld { flex: 1 1 200px; margin-bottom: 16px; }
.reihe > .feld.eng { flex: 0 1 156px; }

fieldset { border: 1px solid var(--linie-fein); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; font-size: 15px; }

.schalter { display: flex; flex-wrap: wrap; gap: 6px; }
.schalter label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid var(--linie);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    color: var(--tinte);
    font-size: 14px;
    background: var(--flaeche);
}
.schalter label:hover { border-color: var(--akzent); }
.schalter input { accent-color: var(--akzent); margin: 0; }
.schalter input:checked + span { font-weight: 700; color: var(--akzent-tief); }

/* --- Knöpfe --------------------------------------------------------------- */

.marke.gestapelt { display: block; }
.marke.gestapelt span { padding: 0; border: 0; display: block; margin-top: 8px; }

.knopf, button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--linie);
    border-radius: 8px;
    background: var(--flaeche);
    color: var(--tinte);
    font: 600 14px/1.2 var(--schrift);
    text-decoration: none;
    cursor: pointer;
}
.knopf:hover, button:hover { border-color: var(--akzent); color: var(--akzent-tief); }

.knopf.stark, button.stark {
    background: var(--akzent);
    border-color: var(--akzent);
    color: #fff;
}
.knopf.stark:hover, button.stark:hover { background: var(--akzent-tief); border-color: var(--akzent-tief); color: #fff; }

.knopf.still, button.still { border-color: transparent; background: transparent; color: var(--tinte-leise); }
.knopf.still:hover, button.still:hover { background: var(--flaeche-leise); }

.knopf.gefahr, button.gefahr { color: var(--fehler); }
.knopf.gefahr:hover, button.gefahr:hover { border-color: var(--fehler); background: var(--fehler-hell); color: var(--fehler); }

.knopfreihe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.knopfreihe .rechts-schub { margin-left: auto; }

/* --- Tabellen ------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; }
/* Eingabetabellen mit festem Raster: sonst drückt die breiteste Option eines
   <select> die übrigen Spalten zusammen. */
table.raster { table-layout: fixed; }
table.raster input, table.raster select { min-width: 0; }
/* Enger setzen: ein natives Datumsfeld braucht rund 110 px, die gewinnt man
   am ehesten beim Zellenabstand zurück. */
table.raster th, table.raster td { padding-left: 6px; padding-right: 6px; }
table.raster th:first-child, table.raster td:first-child { padding-left: 0; }
table.raster th:last-child, table.raster td:last-child { padding-right: 0; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--linie-fein); vertical-align: middle; }
th {
    font: 700 11px/1.3 var(--schrift-eng);
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--tinte-leise);
    border-bottom-color: var(--linie);
    white-space: nowrap;
}
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--flaeche-leise); }
table input, table select { padding: 7px 9px; }
tr.leer td { color: var(--tinte-leise); text-align: center; padding: 26px; }

/* --- Meldungen ------------------------------------------------------------ */

.meldung {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}
.meldung.ok { background: var(--ok-hell); color: var(--ok); border-color: #bfe3d3; }
.meldung.warnung { background: var(--warnung-hell); color: var(--warnung); border-color: #f0dcb4; }
.meldung.fehler { background: var(--fehler-hell); color: var(--fehler); border-color: #f2c9c5; }

.marke-kennzeichen {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font: 700 11px/1.7 var(--schrift-eng);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.marke-kennzeichen.entwurf { background: var(--flaeche-leise); color: var(--tinte-leise); }
.marke-kennzeichen.fertig { background: var(--ok-hell); color: var(--ok); }

/* --- Assistent ------------------------------------------------------------ */

.assistent { display: grid; grid-template-columns: 226px 1fr; gap: 28px; align-items: start; }

.schrittliste { position: sticky; top: 88px; }
.schrittliste ol { list-style: none; margin: 0; padding: 0; counter-reset: schritt; }
.schrittliste a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--tinte-leise);
    font-size: 14px;
}
.schrittliste a::before {
    counter-increment: schritt;
    content: counter(schritt);
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--linie);
    display: grid;
    place-items: center;
    font: 700 11px/1 var(--schrift);
    font-variant-numeric: tabular-nums;
}
.schrittliste a:hover { background: var(--flaeche); color: var(--tinte); }
.schrittliste a[aria-current] { background: var(--flaeche); color: var(--tinte); font-weight: 700; box-shadow: var(--schatten); }
.schrittliste a[aria-current]::before { background: var(--akzent); border-color: var(--akzent); color: #fff; }

.kennzahlband { display: flex; flex-wrap: wrap; gap: 1px; background: var(--linie-fein); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.kennzahlband div { flex: 1 1 150px; background: var(--flaeche); padding: 14px 16px; }
.kennzahlband dt { font: 700 11px/1.3 var(--schrift-eng); letter-spacing: .09em; text-transform: uppercase; color: var(--tinte-leise); }
.kennzahlband dd { margin: 3px 0 0; font: 700 22px/1.1 var(--schrift); font-variant-numeric: tabular-nums; }
.kennzahlband dd small { display: block; font: 400 12px/1.4 var(--schrift); color: var(--tinte-leise); margin-top: 2px; }

.hilfe { font-size: 13px; color: var(--tinte-leise); margin: -6px 0 14px; }

/* Ein Textvorschlag steht sichtbar neben dem Feld, nie darin: übernommen wird
   er erst per Klick. */
.vorschlag {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--akzent-hell);
    border-left: 3px solid var(--akzent);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.vorschlag .marke {
    margin: 0 0 6px;
    font: 700 11px/1.3 var(--schrift-eng);
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--akzent-tief);
}
.vorschlag p + p { margin: 0 0 12px; line-height: 1.6; }
.vorschlag button { background: #fff; }

.bildfeld { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--linie-fein); }
.bildfeld:last-child { border-bottom: 0; }
.bildfeld img { width: 132px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linie); flex: none; }
.bildfeld .platzhalter {
    width: 132px; height: 88px; flex: none;
    border: 1px dashed var(--linie); border-radius: 8px;
    display: grid; place-items: center; color: var(--tinte-leise); font-size: 12px;
}
.bildfeld > div:last-child { flex: 1; }

@media (max-width: 860px) {
    .assistent { grid-template-columns: 1fr; }
    .schrittliste { position: static; }
    .schrittliste ol { display: flex; overflow-x: auto; gap: 4px; }
    .kopf-innen { gap: 12px; padding: 0 16px; }
    main { padding: 20px 16px 60px; }
}
