/* IT-Cockpit Web — helles Etiketten-Design, uebernommen aus der PSA-Lager-App.
   (Fabian am 26.08.2026: "im psa web app design hol dir das aus dem projekt.")

   Bis dahin war das Cockpit ein dunkler Leitstand: Graphit im Ofenlicht, Glutskala als
   Datensprache, Mono als Stimme der Instrumente. Das war stimmig, aber es war ein zweites
   Design im Haus. Die PSA-App laeuft produktiv und hat ihres bereits: Flaeche = heller
   Beton, Karten = Etiketten-Weiss, Tinte = Anthrazit der Wortmarke, LOEWE-Gruen nur fuer
   Primaeraktion und Marke, Signalrot fuer das Dringende.

   UEBERNOMMEN aus psa-lager/pb_public/style.css, Wert fuer Wert:
     Flaechen, Tinte, Gruen, Signal, Warn, Radius, Schatten, Uebergangskurve
     und der Kantenstreifen (3 px links) als Zustandsmarke.

   GEBLIEBEN ist die ORDNUNG - die Zeitfaecher, die Schiene, der Artstempel. Das war eine
   Entscheidung ueber Struktur, nicht ueber Farbe; die beiden Achsen sind unabhaengig.
   Der Kantenstreifen der PSA-App und die Schiene des Cockpits sind ohnehin dieselbe Idee.

   ABWEICHUNGEN, und warum:
   - Die Tintenstufen sind NICHT eins zu eins uebernommen. Die PSA-App kommt mit drei aus;
     das Cockpit braucht vier, und ihr hellster Ton (#90938b) erreicht auf Beton nur 2,80:1 -
     das ist unter WCAG AA und im Cockpit stuenden damit Marken, Meta-Zeilen und Fristen.
     Nachgerechnet am 26.08.2026 auf #f2f3f0:
       --tinte 15,16:1 · --tinte-2 7,72:1 · --tinte-3 5,83:1 · --tinte-4 4,96:1
     Alle vier bestehen AA.
   - Die Glutskala wird auf die PSA-Signalfarben abgebildet: was ueberfaellig ist, traegt
     Signalrot, was bald faellig ist, Bernstein. Dieselbe Aussage, die Farben des Hauses. */

:root {
    /* Flaechen: heller Beton, Etiketten-Weiss, eingelassene Felder */
    --tiefe:        #f2f3f0;   /* Grundflaeche */
    --blech:        #ffffff;   /* Karte, Tabelle */
    --blech-hoch:   #f7f8f5;   /* Zeile hervorgehoben, Menue */
    --blech-hoeher: #ffffff;   /* Ueberlagerung, Dialog */
    --feld:         #f7f8f5;   /* Eingaben liegen leicht eingelassen */

    /* Kanten: Anthrazit mit wenig Deckung, wie in der PSA-App */
    --kante:        rgba(29, 29, 27, 0.12);
    --kante-stark:  rgba(29, 29, 27, 0.22);

    /* Tinte: Anthrazit der Wortmarke, vier Stufen - siehe Kopf, alle AA-fest */
    --tinte:        #1d1d1b;
    --tinte-2:      #4a4d47;
    --tinte-3:      #5c5f58;
    --tinte-4:      #666a62;

    /* Glutskala auf hellem Grund: dieselbe Aussage, die Signalfarben der PSA-App.
       Auf Beton: Signal 4,81:1 · Warn 4,76:1 - beide AA-fest. */
    --glut-1:       #a52f15;   /* dunkelstes Signal */
    --glut-2:       #c23a1d;   /* ueberfaellig */
    --glut-3:       #a05a0a;   /* bald faellig */
    --glut-4:       #a05a0a;   /* Abzeichentext, auf hell derselbe Ton */
    --glut-5:       #fbf1df;   /* Warn-Toenung */
    --signal-hell:  #faeae5;
    --warn-hell:    #fbf1df;

    --font-mono: ui-monospace, "Cascadia Code", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;

    /* LOEWE-Gruen: einziger Akzent. `--lack-hell` heisst auf hellem Grund nicht heller,
       sondern KRAEFTIGER - Links und Hervorhebungen muessen hier dunkler werden, nicht
       blasser. Der Name bleibt, damit kein Aufrufer angefasst werden muss. */
    --lack:         #008639;
    --lack-hell:    #006e2f;
    --lack-schimmer: #e6f2ea;

    --warn:         var(--glut-3);
    --signal:       var(--glut-2);

    --radius-klein: 8px;
    --radius:       10px;
    --radius-gross: 14px;

    /* Der Schatten der PSA-App: eine Haarlinie plus zwei weiche Lagen. */
    --schatten: 0 0 0 1px rgba(29,29,27,0.06), 0 1px 2px -1px rgba(29,29,27,0.08), 0 4px 12px rgba(29,29,27,0.08);

    --takt: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Das hidden-Attribut wirkt nur ueber die Browser-Regel [hidden]{display:none} - und die
   verliert gegen JEDE eigene display-Angabe. #anmeldung (display:flex) und #fussnav
   (display:flex am Handy) blieben dadurch sichtbar, obwohl sie ausgeblendet sein sollten.
   Diese Regel macht hidden verlaesslich. */
[hidden] { display: none !important; }

body {
    font-family: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
    background: var(--tiefe);
    color: var(--tinte);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p  { text-wrap: pretty; }
a  { color: var(--lack-hell); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Rack-Beschriftung: Bereichslabels wie am Schaltschrank gestempelt.
   Mono + weit gesperrt ist der Unterschied zwischen "Instrument" und "Kachel". */
.marke {
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 400; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--tinte-3);
}
/* Alles Abgelesene in Mono: Zahlen, Daten, Fristen, Kennungen. */
.zahl, .zeile-meta, .abzeichen, .tabelle th, .tabelle .rechts {
    font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.leise { color: var(--tinte-3); }
.leiser { color: var(--tinte-4); }

/* ================= Kopfzeile ================= */
/* Wie in der PSA-App: Etikettenweiss mit Unschaerfe dahinter, eine Haarlinie darunter.
   Der gruene Verlauf von vorher haette auf hellem Grund nur schmutzig gewirkt. */
#kopf {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--kante);
}
.kopf-innen {
    display: flex; align-items: center; gap: 20px;
    padding: 0 20px; height: 56px; max-width: 1600px; margin: 0 auto;
}
/* Im Kopf eine typografische Wortmarke statt des Bildes: bei 22 px Hoehe wuerde die Zeile
   "THE INDUSTRY EXPERTS" zu Matsch. Das Negativlogo steht auf der Anmeldekarte, wo Platz ist. */
.marke-block { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.marke-loewe { font-size: 16px; font-weight: 700; letter-spacing: 0.06em; color: var(--tinte); }
.marke-strich { width: 2px; height: 16px; background: var(--lack); border-radius: 1px; }
.marke-name { font-size: 15px; font-weight: 500; color: var(--tinte-2); letter-spacing: -0.01em; }

#reiter { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#reiter::-webkit-scrollbar { display: none; }
.reiter-knopf {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    color: var(--tinte-3); font: inherit; font-weight: 500;
    padding: 7px 12px; border-radius: var(--radius-klein); white-space: nowrap;
    transition: color 140ms var(--takt), background-color 140ms var(--takt);
}
.reiter-knopf:hover { color: var(--tinte); background: var(--feld); }
.reiter-knopf[aria-current="page"] {
    color: var(--lack-hell); background: var(--lack-schimmer); font-weight: 600;
}
.reiter-knopf .punkt {
    display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px;
    background: var(--lack); color: #fff; border-radius: 9px;
    font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}

.kopf-rechts { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Globale Suche: der eine Ort, an dem alles zusammenlaeuft */
.suchfeld { position: relative; }
.suchfeld input {
    width: 230px; height: 32px; padding: 0 10px;
    background: var(--feld); border: 1px solid var(--kante);
    border-radius: var(--radius-klein); color: var(--tinte); font: inherit; font-size: 13px;
    transition: width 180ms var(--takt), border-color 140ms var(--takt);
}
.suchfeld input::placeholder { color: var(--tinte-4); }
.suchfeld input:focus { outline: none; border-color: var(--lack); width: 300px; }

/* ================= Flaeche ================= */
main { max-width: 1600px; margin: 0 auto; padding: 24px 20px 96px; }
.reihe { display: flex; align-items: center; gap: 10px; }
.reihe-verteilt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bereich { margin-bottom: 32px; }
.bereich-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

.karte {
    background: var(--blech); border: 1px solid var(--kante);
    border-radius: var(--radius); padding: 16px; box-shadow: var(--schatten);
}
/* Breite Tabellen scrollen in ihrer eigenen Karte - die Seite selbst darf nie waagerecht scrollen */
.karte-still {
    background: var(--blech); border: 1px solid var(--kante);
    border-radius: var(--radius); overflow-x: auto; box-shadow: var(--schatten);
}

/* ================= Projektkopf (und frueher: Heute) ================= */
/* Kantenstreifen links statt Verlauf - die Regalkennzeichnung der PSA-App. */
.heute-kopf {
    background: var(--blech);
    border: 1px solid var(--kante); border-left: 3px solid var(--lack);
    border-radius: var(--radius); box-shadow: var(--schatten);
    padding: 22px 24px; margin-bottom: 22px;
}
/* Die Begruessung ist Hoeflichkeit, nicht die Nachricht - sie tritt zurueck, damit das
   Fristenband darunter der Blickfang sein kann. */
.heute-titel { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; color: var(--tinte-2); }
.heute-lage { color: var(--tinte); margin-top: 4px; font-size: 15px; }

/* ================= Die Bahn: eine Ordnung nach Zeit ================= */
/* Bis zum 25.08.2026 lag hier ein waagerechtes Fristenband und darunter eine Kacheltafel
   aus acht Feldern, eines je Gegenstand. Beides ist ersetzt: die Skala steht jetzt
   senkrecht und traegt die Seite. Links das Zeitfach mit Anzahl, rechts alles, was
   hineinfaellt - gleich ob Aufgabe, Vertrag, Ticket, Mail oder Termin.
   Die Faecher selbst stehen in kern.js (FAECHER), damit Name und Glut an einer Stelle
   liegen und nicht je Ansicht neu erfunden werden. */

/* Die Lage steht auf einer Kante statt in einem Kasten mit Verlauf: der Blickfang soll
   die Bahn darunter sein, nicht die Begruessung. */
.lage {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    padding-bottom: 18px; border-bottom: 1px solid var(--kante-stark);
}
.lage-satz { font-size: 23px; font-weight: 600; letter-spacing: -0.01em; margin-top: 5px; }
.zaehler { display: flex; gap: 36px; flex-shrink: 0; }
.z-wert {
    font-family: var(--font-mono); font-variant-numeric: tabular-nums;
    font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.z-wert.signal { color: var(--signal); }
.z-wert.warn   { color: var(--warn); }

/* Jedes Fach ist ein eigener Block: Schiene auf dem Betongrund, Inhalt auf Etiketten-Weiss.
   Ohne die Trennung liefen die Faecher auf hellem Grund ineinander - auf dunklem Grund
   genuegte dafuer die Haarlinie, hier nicht mehr. */
.abschnitt { display: grid; grid-template-columns: 172px 1fr; margin-bottom: 14px; }
.schiene { position: relative; padding: 16px 20px 16px 0; }
/* Die senkrechte Skala. Die Farbe kommt als --f aus kern.js an den Knoten, damit Fach
   und Kante nicht auseinanderlaufen koennen. */
.schiene::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 14px; width: 3px;
    border-radius: 2px; background: var(--f, var(--kante));
}
.s-titel {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
    text-transform: uppercase; font-weight: 600; color: var(--tinte-2);
}
.s-titel.signal { color: var(--signal); }
.s-titel.warn   { color: var(--warn); }
.s-titel.leise  { color: var(--tinte-3); }
.s-titel.leiser { color: var(--tinte-4); }
.s-zahl {
    font-family: var(--font-mono); font-variant-numeric: tabular-nums;
    font-size: 12px; color: var(--tinte-4); margin-top: 3px;
}
/* Die Zeilen sind dieselben wie ueberall (.liste > li) - sie ruecken nur von der Schiene
   ab, damit die Kante nicht am Text klebt. */
.eintraege {
    min-width: 0; background: var(--blech);
    border: 1px solid var(--kante); border-radius: var(--radius);
    box-shadow: var(--schatten); overflow: hidden;
}
.eintraege > .liste > li { padding-left: 16px; }

/* Der Artstempel: weil nur noch die Zeit sortiert, muss die Zeile sagen, WAS sie ist.
   In reinen Listen (Aufgaben, Mails) entfaellt er - dort waere er Laerm. */
.art {
    flex: 0 0 78px; text-align: center;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--tinte-4);
    border: 1px solid var(--kante); border-radius: 3px; padding: 2px 0;
}

/* Faellt eine Quelle aus, steht das unter der Bahn. Ein Ausfall von Zammad darf nicht
   aussehen wie "keine offenen Tickets" - genau das konnte die alte Kachel, und genau
   das darf die Bahn nicht verlieren. */
.stoerung {
    display: flex; align-items: center; gap: 10px; margin-top: 14px;
    color: var(--tinte-3); font-size: 13px;
}

/* Fussband: was keine Frist hat, faellt nicht weg - es steht ruhig darunter statt als
   eigene Kachel darueber. */
.fussband {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px;
    margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--kante-stark);
    font-size: 13px;
}
.fuss-inhalt { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }

/* Das Zeitfach als Tabellenzeile (Vertraege). Dieselbe Schiene wie in den Listen - sie
   liegt hier nur als Kante an der Trennzeile statt als eigene Spalte. */
.fachzeile td {
    background: rgba(29, 29, 27, 0.03);
    padding: 11px 12px; border-bottom: 1px solid var(--kante-stark);
}
.fachzeile .s-titel, .fachzeile .s-zahl { display: inline; }

/* ================= Listen und Tabellen: der ruhige Teil ================= */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th {
    text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--tinte-3);
    padding: 8px 12px; border-bottom: 1px solid var(--kante-stark); white-space: nowrap;
}
.tabelle th.sortierbar { cursor: pointer; user-select: none; }
.tabelle th.sortierbar:hover { color: var(--tinte); }
.tabelle td { padding: 9px 12px; border-bottom: 1px solid var(--kante); vertical-align: middle; }
.tabelle tbody tr { transition: background-color 120ms var(--takt); }
.tabelle tbody tr:hover { background: var(--feld); }
.tabelle tbody tr.klickbar { cursor: pointer; }
.tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 12px; border-bottom: 1px solid var(--kante);
    transition: background-color 120ms var(--takt);
}
.liste > li:last-child { border-bottom: 0; }
.liste > li:hover { background: var(--feld); }
.zeile-haupt { flex: 1; min-width: 0; }
.zeile-titel { font-weight: 500; }
.zeile-meta { font-size: 12px; color: var(--tinte-3); margin-top: 2px; }

/* ================= Abzeichen ================= */
/* Abzeichen sind Stempel, keine Pillen: eckiger, Mono, versal. */
.abzeichen {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500;
    letter-spacing: 0.04em;
    border: 1px solid var(--kante-stark); color: var(--tinte-2); white-space: nowrap;
}
.abzeichen.lack   { background: var(--lack-schimmer); border-color: rgba(0, 134, 57, 0.35); color: var(--lack-hell); }
.abzeichen.warn   { background: var(--warn-hell);    border-color: rgba(160, 90, 10, 0.30); color: var(--warn); }
.abzeichen.signal { background: var(--signal-hell);  border-color: rgba(194, 58, 29, 0.32); color: var(--signal); }
.abzeichen.still { color: var(--tinte-4); }

/* ================= Bedienelemente ================= */
button, .knopf {
    appearance: none; font: inherit; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 34px; padding: 0 14px; border-radius: var(--radius-klein);
    /* Ohne nowrap bricht ein langer Knopftext bei fester Hoehe aus dem Rahmen heraus -
       am 25.08.2026 an "Als Anleitung festhalten" aufgefallen. */
    white-space: nowrap;
    border: 1px solid var(--kante); background: var(--blech); color: var(--tinte);
    font-weight: 600;
    transition: background-color 140ms var(--takt), border-color 140ms var(--takt), transform 100ms var(--takt);
}
button:hover, .knopf:hover { background: var(--feld); border-color: var(--kante-stark); }
button:active, .knopf:active { transform: scale(0.97); }
button:focus-visible, .knopf:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[contenteditable]:focus-visible {
    outline: 2px solid var(--lack); outline-offset: 1px;
}
button[disabled] { opacity: 0.45; cursor: not-allowed; }

.knopf-primaer { background: var(--lack); border-color: var(--lack); color: #fff; }
.knopf-primaer:hover { background: var(--lack-hell); border-color: var(--lack-hell); }
.knopf-still { background: transparent; border-color: transparent; color: var(--tinte-3); }
.knopf-still:hover { background: var(--feld); color: var(--tinte); }
.knopf-klein { height: 28px; padding: 0 10px; font-size: 13px; }
/* Wie in der PSA-App schon im Ruhezustand als Gefahr erkennbar - nicht erst beim
   Ueberfahren. Wer erst beim Zeigen merkt, dass er auf „Loeschen“ steht, merkt es zu spaet. */
.knopf-gefahr { border-color: rgba(194, 58, 29, 0.45); color: var(--signal); }
.knopf-gefahr:hover { background: var(--signal-hell); border-color: var(--signal); color: var(--signal); }

/* Eingaben liegen tiefer als ihre Umgebung — sie nehmen etwas auf */
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=url], input[type=search], select, textarea, .editor {
    width: 100%; font: inherit; color: var(--tinte);
    background: var(--feld); border: 1px solid var(--kante);
    border-radius: var(--radius-klein); padding: 7px 10px;
    transition: border-color 140ms var(--takt);
}
/* Feste Hoehe und normale Zeilenhoehe fuer einzeilige Felder: mit dem geerbten
   line-height 1.5 sitzt der Cursor in Chrome hoeher als der Text daneben, und die
   Felder sind neben Auswahlfeldern und Knoepfen unterschiedlich hoch. */
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=url], select {
    height: 34px; line-height: normal;
}
input:hover, select:hover, textarea:hover { border-color: var(--kante-stark); }
/* background-COLOR, nicht die Kurzschreibweise: `background:` setzt auch
   background-repeat und -position zurueck. Der eigene Auswahlpfeil des <select> kachelte
   dadurch ueber das ganze Feld - als Zickzackmuster ueber dem Text.
   (Fabian am 26.08.2026, im Vertragsdialog aufgefallen.) */
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--lack); background-color: var(--blech);
}
input::placeholder, textarea::placeholder { color: var(--tinte-4); }
textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
select {
    appearance: none; padding-right: 30px;
    /* eigener Pfeil, weil appearance:none den systemeigenen entfernt */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235c5f58' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
select:hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%231d1d1b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Auf hellem Grund ist das Symbol von Haus aus richtig - kein Umkehren mehr. */
input[type=date]::-webkit-calendar-picker-indicator {
    cursor: pointer; opacity: 0.6;
}
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.feldgruppe { margin-bottom: 14px; }
/* Nur die Beschriftung eines Feldes, NICHT jedes label darin: die Kaestchen-Zeilen in
   "genutzt von" sind ebenfalls labels und wurden hier faelschlich zu Bloecken gemacht. */
.feldgruppe > label.feldname { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 500; color: var(--tinte-2); }
.kaestchen-zeile { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.feldpaar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Editor mit ruhiger, kontraststarker Flaeche — hier wird gelesen und geschrieben */
.editor { min-height: 160px; background: var(--feld); line-height: 1.6; overflow-y: auto; }
.editor:empty::before { content: attr(data-platzhalter); color: var(--tinte-4); }

input[type=checkbox] {
    appearance: none; width: 18px; height: 18px; flex: 0 0 18px; margin: 0;
    border: 1px solid var(--kante-stark); border-radius: 4px; background: var(--blech);
    cursor: pointer; position: relative;
    transition: background-color 120ms var(--takt), border-color 120ms var(--takt);
}
input[type=checkbox]:checked { background: var(--lack); border-color: var(--lack); }
input[type=checkbox]:checked::after {
    content: ""; position: absolute; left: 6px; top: 2px; width: 4px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* Trefferflaeche vergroessern, ohne das Kaestchen zu vergroessern. Bewusst 30 statt 40 px:
   Listenzeilen stehen 40 px auseinander, eine 40er Flaeche wuerde in die Nachbarzeile ragen
   und dort Klicks abfangen. */
input[type=checkbox]::before {
    content: ""; position: absolute; left: -6px; top: -6px; width: 30px; height: 30px;
}

/* ================= Ueberlagerung ================= */
.schleier {
    position: fixed; inset: 0; z-index: 60; background: rgba(29, 29, 27, 0.42);
    display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px;
    overflow-y: auto; animation: einblenden 140ms var(--takt);
}
.dialog {
    background: var(--blech-hoeher); border: 1px solid var(--kante);
    border-radius: var(--radius-gross); width: 100%; max-width: 620px;
    box-shadow: 0 0 0 1px rgba(29,29,27,0.06), 0 18px 48px rgba(29, 29, 27, 0.20);
    animation: auftauchen 180ms var(--takt);
}
.dialog-breit { max-width: 900px; }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--kante); }
.dialog-koerper { padding: 20px; }
/* flex-wrap: bei vier, fuenf Knoepfen im Fuss ist eine zweite Reihe besser als Gequetsche. */
.dialog-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--kante); }

@keyframes einblenden { from { opacity: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: scale(0.97) translateY(6px); } }

/* Suchergebnisse haengen am Suchfeld, nicht in der Bildschirmmitte */
.suchpanel {
    position: absolute; top: 38px; right: 0; width: 460px; max-height: 62vh; overflow-y: auto;
    background: var(--blech-hoeher); border: 1px solid var(--kante); border-radius: var(--radius);
    box-shadow: var(--schatten), 0 18px 40px rgba(29, 29, 27, 0.16); z-index: 50;
    transform-origin: top right; animation: auftauchen 150ms var(--takt);
}
.such-gruppe { padding: 6px 0; border-top: 1px solid var(--kante); }
.such-gruppe:first-child { border-top: 0; }
.such-gruppe > .marke { padding: 6px 14px 4px; display: block; }
.such-treffer { display: block; width: 100%; text-align: left; padding: 8px 14px; border: 0; border-radius: 0; background: transparent; height: auto; }
.such-treffer:hover { background: var(--feld); }

/* Der Toast der PSA-App: Anthrazit, weisse Schrift - auf hellem Grund ist eine helle
   Sprechblase nicht zu sehen. */
.meldung {
    position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80;
    background: var(--tinte); color: #fff; border: 0;
    border-radius: var(--radius); padding: 10px 16px; font-weight: 600;
    box-shadow: var(--schatten), 0 12px 30px rgba(29, 29, 27, 0.22);
    animation: auftauchen 160ms var(--takt);
}
.meldung.signal { background: var(--signal); }

.leerbild { padding: 34px 20px; text-align: center; color: var(--tinte-3); }
.leerbild .marke { display: block; margin-bottom: 6px; }

/* ================= Anmeldung ================= */
#anmeldung {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: var(--tiefe);
}
.anmelde-karte {
    width: 100%; max-width: 380px; background: var(--blech);
    border: 1px solid var(--kante); border-radius: var(--radius);
    box-shadow: var(--schatten); padding: 28px;
}
/* Auf hellem Grund traegt das normale Logo, nicht das Negativ. */
.anmelde-karte img { height: 42px; width: auto; margin-bottom: 22px; }

/* ================= Handy ================= */
#fussnav { display: none; }

@media (max-width: 860px) {
    .kopf-innen { height: 52px; padding: 0 14px; gap: 12px; }
    #reiter { display: none; }
    main { padding: 16px 14px 84px; }
    .suchfeld input { width: 100%; }
    .suchfeld { flex: 1; }
    .heute-kopf { padding: 18px; }
    .heute-titel { font-size: 22px; }
    .feldpaar { grid-template-columns: 1fr; }
    .schleier { padding: 0; }
    .dialog { max-width: none; border-radius: var(--radius-gross) var(--radius-gross) 0 0; margin-top: auto; }

    /* Am Handy fehlt die Breite fuer eine eigene Schienenspalte. Das Fach wird zur
       Zwischenueberschrift, die Glut sitzt als Kante links daran - dieselbe Skala,
       andere Form. */
    .abschnitt { grid-template-columns: 1fr; }
    .schiene {
        display: flex; align-items: baseline; gap: 10px;
        padding: 14px 0 6px 10px; border-left: 2px solid var(--f, var(--kante));
    }
    .schiene::after { display: none; }
    .s-zahl { margin-top: 0; }
    .eintraege { padding: 0; }
    .eintraege > .liste > li { padding-left: 0; }
    .art { flex: none; padding: 1px 5px; font-size: 9px; letter-spacing: 0.1em; }

    .lage { flex-direction: column; align-items: flex-start; gap: 14px; }
    .lage-satz { font-size: 20px; }
    .zaehler { gap: 26px; }
    .z-wert { font-size: 26px; }
    .fussband { gap: 24px; margin-top: 26px; }

    /* Tabellen werden am Handy zu Zeilen — Kopfzeile weg, Feldnamen davor */
    .tabelle thead { display: none; }
    .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
    .tabelle tr { border-bottom: 1px solid var(--kante); padding: 10px 2px; }
    .tabelle td { border: 0; padding: 3px 0; }
    .tabelle td[data-feld]::before {
        content: attr(data-feld) " "; color: var(--tinte-4); font-size: 11px;
        text-transform: uppercase; letter-spacing: 0.07em; margin-right: 6px;
    }

    #fussnav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
        background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
        border-top: 1px solid var(--kante); padding-bottom: env(safe-area-inset-bottom);
    }
    #fussnav button {
        flex: 1; height: 54px; flex-direction: column; gap: 3px; border: 0; border-radius: 0;
        background: transparent; color: var(--tinte-4); font-size: 11px; font-weight: 500;
    }
    /* Gruener Strich oben wie in der PSA-App - dort ist es dieselbe Leiste. */
    #fussnav button[aria-current="page"] { color: var(--lack); font-weight: 700; position: relative; }
    #fussnav button[aria-current="page"]::before {
        content: ""; position: absolute; top: -1px; left: 25%; right: 25%;
        height: 2px; background: var(--lack); border-radius: 0 0 2px 2px;
    }
    #fussnav button svg { width: 20px; height: 20px; }
}

/* Die restlichen Reiter hinter "Mehr". Bewusst grosse Flaechen: das wird mit dem Daumen
   getroffen, nicht mit der Maus. 48px ist das uebliche Mindestmass fuer Beruehrungsziele. */
.mehr-liste { display: flex; flex-direction: column; gap: 2px; }
.mehr-reiter {
    display: block; width: 100%; height: 48px; padding: 0 14px;
    text-align: left; font-size: 15px; font-weight: 500;
    background: transparent; border: 0; border-radius: var(--radius);
    color: var(--tinte); cursor: pointer;
}
.mehr-reiter:hover { background: var(--blech-hoch); }
/* Der Reiter, auf dem man gerade steht - sonst weiss man im Blatt nicht, wo man ist. */
.mehr-reiter[aria-current="page"] { color: var(--lack); font-weight: 700; background: var(--blech-hoch); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
