@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;600;700&display=swap');

/* ==========================================================================
   Digitale Fertigung - Stylesheet
   Seit 2.0.0 (Alex, 07.10.2026): neu geordnete Oberflaeche (Seitenleiste,
   ein roter Hauptknopf je Ansicht, Reiter, Mehr-Menues). Die Klassennamen
   der Vorversion bleiben bestehen - Vorlagen, Tests und Skripte greifen
   darauf zu; geaendert hat sich vor allem das Aussehen und die Anordnung.
   ========================================================================== */

:root {
    --jt-rot: #dd001a;
    --jt-rot-dunkel: #b40015;
    --jt-rot-hell: #fdecee;
    --jt-schwarz: #0d0d0d;
    --jt-text: #333333;
    --jt-grau: #6b6b6b;
    --jt-hell: #6f6f6f;
    --jt-rand: #e2e2e0;
    --jt-rand-stark: #c9c9c6;
    --jt-hintergrund: #fafaf8;   /* ruhige Flaeche in Karten (Hinweise, Kopfzeilen) */
    --jt-seite: #f4f4f2;         /* Seitenhintergrund */
    --jt-gruen: #1a7a1a;
    --jt-orange: #8f5400;
    --jt-petrol: #1f6f73;
    --jt-blau: #1f5fa8;
    --jt-r: 8px;
    --jt-r-gross: 12px;
    --jt-seitenleiste: 216px;
    --jt-schatten: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

/* Das `hidden`-Attribut muss auch dann greifen, wenn ein Element eine
   eigene display-Regel mitbringt. Der Browser-Standard `[hidden] {
   display: none }` stammt aus dem User-Agent-Stylesheet und verliert
   deshalb gegen JEDE Regel aus dieser Datei - `.jt-btn { display:
   inline-flex }` etwa liess einen per JavaScript auf `hidden` gesetzten
   Knopf munter weiter sichtbar (Rueckfrage des Kunden 09.09.2026: "der
   speichern button ist ja immer noch da"). */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
}
/* html verhindert das seitliche Scrollen; body nur "clip", weil `hidden` den
   body zum eigenen Scrollbereich machte und damit die feste Aktionsleiste
   (position: sticky) am Fertigungsschritt lahmlegte. */
html { overflow-x: hidden; }
body { overflow-x: clip; }

/* Beim Ziehen ueber den oberen Rand hinaus (iOS-/macOS-Safari-Ueberzieheffekt)
   wird kurz die Flaeche HINTER der Seite sichtbar. Die Kopfzeile ist
   `position: fixed` und deckt sie zuverlaessig ab (ein z-index:-1-Deckelement
   hatte beim Testen ein Schwarzbild verursacht und wurde verworfen). Seit 2.0.0
   ist die Kopfzeile hell, deshalb ist es auch die Flaeche dahinter. */
html { background: var(--jt-seite); }

body {
    font-family: 'Titillium Web', 'Segoe UI', sans-serif;
    color: var(--jt-text);
    background: var(--jt-seite);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    /* Reserviert Platz fuer die fest angeheftete Kopfzeile - ihre Hoehe misst
       app.js und setzt sie als CSS-Variable (sie kann je nach Breite ein- oder
       zweizeilig sein). */
    padding-top: var(--jt-header-hoehe, 56px);
}

a { color: var(--jt-rot); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Seitenleiste ------------------------------------------------------- */
.jt-seitenleiste {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--jt-seitenleiste);
    background: var(--jt-schwarz);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 60;
    padding: 0 0 16px;
}

.jt-seitenleiste .jt-logo { display: block; padding: 16px 20px 18px; }
.jt-seitenleiste .jt-logo img { height: 30px; display: block; }

/* Kundenname-Verbot 01.09.: Text-Ersatz fuer das fruehere kundenspezifische
   Bild-Logo (nur Demo). */
.jt-logo-text {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .02em;
    text-decoration: none;
    border-left: 4px solid var(--jt-rot);
    padding-left: 10px;
    line-height: 1.2;
}
.jt-seitenleiste .jt-logo-text { margin: 18px 20px 20px; padding: 2px 0 2px 10px; }
.jt-logo-text:hover { color: #fff; text-decoration: none; }

#hauptnav { display: flex; flex-direction: column; flex: 1; padding: 0 8px; }

.jt-nav-gruppe { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.jt-nav-gruppe.jt-nav-unten { margin-top: auto; margin-bottom: 0; padding-top: 12px; border-top: 1px solid #262626; }
.jt-nav-titel {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7d7d7d;
    padding: 4px 12px;
}

#hauptnav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--jt-r);
    color: #c9c9c9;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
#hauptnav a:hover { background: #1a1a1a; color: #fff; text-decoration: none; }
#hauptnav a.aktiv { background: #242424; color: #fff; }
#hauptnav a.aktiv::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--jt-rot);
}
/* Symbole stehen vor dem Text; sie haengen an der Zieladresse des Links, damit
   das Menue-Markup (Tests, Support-Pruefung) unveraendert einfach bleibt. */
#hauptnav a::after {
    content: "";
    order: -1;
    flex: none;
    width: 20px;
    height: 20px;
    background: currentColor;
    opacity: .75;
    -webkit-mask: var(--jt-sym) center / contain no-repeat;
    mask: var(--jt-sym) center / contain no-repeat;
}
#hauptnav a.aktiv::after { opacity: 1; }
#hauptnav a[href="/"] { --jt-sym: url(symbole/uebersicht.svg); }
#hauptnav a[href$="/projekte"] { --jt-sym: url(symbole/projekte.svg); }
#hauptnav a[href$="/alle-maschinen"], #hauptnav a[href$="/meine-maschinen"] { --jt-sym: url(symbole/maschinen.svg); }
#hauptnav a[href$="/vorrichtungen"] { --jt-sym: url(symbole/vorrichtungen.svg); }
#hauptnav a[href$="/werkzeuge"] { --jt-sym: url(symbole/werkzeuge.svg); }
#hauptnav a[href$="/zeiterfassung"] { --jt-sym: url(symbole/zeit.svg); }
#hauptnav a[href$="/auswertung"] { --jt-sym: url(symbole/auswertung.svg); }
#hauptnav a[href$="/einstellungen"] { --jt-sym: url(symbole/einstellungen.svg); }
#hauptnav a[href$="/handbuecher"], #hauptnav a[href$="/handbuch"] { --jt-sym: url(symbole/handbuch.svg); }
#hauptnav a[href$="/support"] { --jt-sym: url(symbole/support.svg); }

/* Der Zaehler offener Urlaubsantraege im Menue. Die Betriebsleitung hat bisher
   nicht mitbekommen, dass jemand Urlaub beantragt hat - die
   Genehmigungsseite musste man von sich aus aufrufen (Ansage 10.09.2026). */
.jt-menue-zaehler {
    display: inline-block;
    margin-left: auto;
    background: var(--jt-rot);
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
}

.jt-nav-schleier {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 55;
}

/* ---- Kopfzeile ---------------------------------------------------------- */
/* `position: fixed` statt nur sticky, ganz bewusst: ein wirklich fest
   angeheftetes Element bleibt beim iOS-/macOS-Safari-Ueberzieheffekt
   garantiert an der gleichen Bildschirmposition stehen. */
header.jt-header {
    background: #fff;
    border-bottom: 1px solid var(--jt-rand);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    min-height: 56px;
    position: fixed;
    top: 0;
    left: var(--jt-seitenleiste);
    right: 0;
    z-index: 50;
}

/* Nicht angemeldet (Login): keine Seitenleiste, schwarze Kopfzeile wie bisher. */
body.jt-abgemeldet header.jt-header { left: 0; background: var(--jt-schwarz); border-bottom: 0; padding: 10px 20px; }
body.jt-abgemeldet .jt-seite-inhalt { margin-left: 0; }

header.jt-header .jt-logo img { height: 28px; display: block; }
header.jt-header .jt-kopf-logo { display: none; }
body.jt-abgemeldet header.jt-header .jt-kopf-logo { display: block; }

.jt-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: -10px;
}
.jt-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--jt-schwarz); margin: 0 auto; border-radius: 1px; }

header.jt-header form.jt-nav-suche {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
header.jt-header form.jt-nav-suche input {
    min-height: 40px;
    width: 240px;
    padding: 6px 14px 6px 38px;
    border: 1px solid var(--jt-rand-stark);
    border-radius: 20px;
    background: var(--jt-seite) url(symbole/lupe.svg) 12px center / 18px no-repeat;
    color: var(--jt-text);
    font-family: inherit;
    font-size: 14px;
}
header.jt-header form.jt-nav-suche input:focus { outline: 2px solid var(--jt-rot); outline-offset: 1px; background-color: #fff; }
header.jt-header form.jt-nav-suche button {
    min-height: 40px;
    padding: 6px 14px;
    border: 1px solid var(--jt-rand-stark);
    border-radius: 20px;
    background: #fff;
    color: var(--jt-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
header.jt-header form.jt-nav-suche button:hover { border-color: var(--jt-rot); color: var(--jt-rot); }

/* Spotlight-Suche (2.3.0): klein im Ruhezustand, beim Antippen breiter; der Knopf erscheint dann und ist erst mit Eingabe anwaehlbar.
   Ohne Skript (kein .jt-suche-js) bleibt es ein gewoehnliches Formular: Knopf sichtbar, Feld in der bisherigen Breite. */
header.jt-header form.jt-nav-suche { position: relative; }
header.jt-header form.jt-nav-suche.jt-suche-js { flex: 0 1 150px; min-width: 0; transition: flex-basis .18s ease; }
header.jt-header form.jt-nav-suche.jt-suche-js.offen { flex-basis: 340px; }
header.jt-header form.jt-nav-suche.jt-suche-js input { flex: 1 1 auto; width: auto; min-width: 0; }
header.jt-header form.jt-nav-suche.jt-suche-js:not(.offen) button { display: none; }
/* Beim Aufklappen gibt das Suchfeld nach, nicht Logo, Akku und Konto (sie umbrechen sonst). */
header.jt-header > :not(form.jt-nav-suche) { flex-shrink: 0; }
header.jt-header form.jt-nav-suche button:disabled { opacity: .45; cursor: default; }
header.jt-header form.jt-nav-suche button:disabled:hover { border-color: var(--jt-rand-stark); color: var(--jt-text); }
.jt-suche-ergebnisse {
    position: absolute; top: calc(100% + 6px); right: 0; width: min(460px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto;
    background: #fff; border: 1px solid var(--jt-rand-stark); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 4px 6px 8px; z-index: 70; text-align: left;
}
.jt-suche-ergebnisse[hidden] { display: none; }
.jt-suche-hinweis { padding: 12px 12px 8px; color: var(--jt-grau); font-size: 14px; }
.jt-suche-gruppe { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--jt-grau); }
.jt-suche-treffer { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 44px; padding: 8px 12px; border-radius: 8px; color: var(--jt-text); text-decoration: none; }
.jt-suche-treffer strong { font-weight: 600; }
.jt-suche-treffer span { color: var(--jt-grau); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jt-suche-treffer.aktiv, .jt-suche-treffer:hover { background: var(--jt-seite); }
.jt-suche-alle { display: block; margin: 6px 6px 0; padding: 10px 12px; border-top: 1px solid var(--jt-rand); color: var(--jt-rot); font-weight: 600; font-size: 14px; text-decoration: none; }
.jt-suche-alle.aktiv, .jt-suche-alle:hover { text-decoration: underline; }

/* Akkustand im Kopf. Fully Kiosk laeuft im Vollbild und blendet die
   Android-Statusleiste aus - ohne diese Anzeige merkt in der Werkstatt
   niemand, dass ein Tablet leerlaeuft. */
.jt-akku {
    color: var(--jt-text);
    background: var(--jt-seite);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.jt-akku.jt-akku-kritisch { background: var(--jt-rot); color: #fff; }

details.jt-benutzer { position: relative; }
details.jt-benutzer > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 8px 0 4px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--jt-text);
}
details.jt-benutzer > summary::-webkit-details-marker { display: none; }
details.jt-benutzer > summary::after {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    opacity: .6;
    -webkit-mask: url(symbole/runter.svg) center / contain no-repeat;
    mask: url(symbole/runter.svg) center / contain no-repeat;
}
details.jt-benutzer > summary:hover { background: var(--jt-seite); }
.jt-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--jt-schwarz);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.jt-benutzer-menue {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r-gross);
    box-shadow: var(--jt-schatten), 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 70;
}
.jt-benutzer-kopf { padding: 8px 12px; font-size: 12px; color: var(--jt-hell); text-transform: uppercase; letter-spacing: .06em; }
.jt-benutzer-menue a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--jt-r);
    color: var(--jt-text);
    font-weight: 600;
}
.jt-benutzer-menue a:hover { background: var(--jt-seite); text-decoration: none; }
.jt-benutzer-menue a.aktiv { color: var(--jt-rot); }

/* ---- Seite -------------------------------------------------------------- */
.jt-seite-inhalt { margin-left: var(--jt-seitenleiste); }
main.jt-inhalt {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 28px 60px;
}

h1, h2, h3 {
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 0;
}
h1 { font-size: 26px; line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 17px; margin-bottom: 10px; }
h3 { font-size: 15px; }

.jt-untertitel {
    color: var(--jt-grau);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

/* ---- Knoepfe: eine Rangfolge --------------------------------------------
   .jt-btn                  = Hauptaktion (rot) - je Ansicht moeglichst nur eine
   .jt-btn-sekundaer        = zweitrangig (weiss mit Rand)
   .jt-btn-klein            = kompakter (Tabellen, Menues)
   .jt-btn-riesig           = Werkstatt/Tablet, volle Breite, 60 px */
.jt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--jt-rot);
    color: #fff;
    font-weight: 700;
    padding: 10px 20px;
    min-height: 44px;
    border: 1px solid var(--jt-rot);
    border-radius: var(--jt-r);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
}
.jt-btn:hover { background: var(--jt-rot-dunkel); border-color: var(--jt-rot-dunkel); color: #fff; text-decoration: none; }
.jt-btn.jt-btn-sekundaer { background: #fff; color: var(--jt-text); border-color: var(--jt-rand-stark); }
.jt-btn.jt-btn-sekundaer:hover { background: var(--jt-seite); border-color: #9d9d9a; color: var(--jt-schwarz); }
.jt-btn.jt-btn-klein { padding: 7px 14px; min-height: 40px; font-size: 14px; }
.jt-btn:disabled { background: #ececea; border-color: #ececea; color: #a3a3a0; cursor: not-allowed; }
.jt-btn:disabled:hover { background: #ececea; border-color: #ececea; }
/* Tablet-first fuer das Mitarbeiter-Dashboard (Anweisung Abschnitt 8) -
   moeglichst wenige Klicks, grosse eindeutige Bedienflaechen. */
.jt-btn.jt-btn-riesig { padding: 16px 24px; min-height: 60px; font-size: 18px; width: 100%; }
.jt-btn:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(221, 0, 26, 0.45); outline-offset: 2px; }
/* Loeschen sieht anders aus als Speichern. Beide Knoepfe stehen in der
   Tagesansicht direkt untereinander am selben Stempel. */
.jt-btn.jt-btn-gefahr { background: #7a0010; border-color: #7a0010; }
.jt-btn.jt-btn-gefahr:hover { background: #560009; border-color: #560009; }
/* Der deutliche Rueckweg unter der Ueberschrift - zusaetzlich zu den
   Brotkrumen, weil am Tablet ein grosser Knopf eher getroffen wird als
   ein Textlink in einer Leiste. */
.jt-btn.jt-btn-zurueck::before { content: "‹ "; }

/* ---- Karten, Hinweise, Kennzahlen -------------------------------------- */
.jt-karten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.jt-karte {
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    padding: 16px 18px;
}
.jt-karte .zahl { font-size: 30px; font-weight: 700; color: var(--jt-schwarz); line-height: 1.15; }
.jt-karte .label { font-size: 13px; color: var(--jt-grau); }

.jt-hinweisbox {
    background: var(--jt-hintergrund);
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}
.jt-hinweisbox[style*="background:#fff"] { background: #fff !important; }
/* Ein Hinweis, der etwas VERLANGT (ein Tag muss geklaert werden), muss
   sich von einem Hinweis unterscheiden, der nur erklaert - sonst liest
   die Betriebsleitung auf der Tagesansicht ueber die Zeile hinweg, auf die es ankommt. */
.jt-hinweisbox.jt-hinweisbox-warnung { background: #fff6e8; border-color: #e9c98b; }

.jt-flash { padding: 12px 16px; margin-bottom: 18px; font-size: 14px; border-radius: var(--jt-r); }
.jt-flash-erfolg { background: #e6f4e6; border-left: 4px solid var(--jt-gruen); }
.jt-flash-fehler { background: #fbe6e6; border-left: 4px solid var(--jt-rot); }

.jt-login-box {
    max-width: 380px;
    margin: 60px auto;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    box-shadow: var(--jt-schatten);
}
.jt-login-box h1 { font-size: 24px; }

/* ---- Tabellen ----------------------------------------------------------- */
table.jt-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.jt-tabelle-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
}
/* Verschachtelte Tabellen in Karten bleiben ohne doppelten Rahmen. */
.jt-hinweisbox .jt-tabelle-wrapper, .jt-karte .jt-tabelle-wrapper, .jt-reiter-tafel .jt-tabelle-wrapper { margin-bottom: 16px; }

table.jt-tabelle th {
    text-align: left;
    background: var(--jt-hintergrund);
    color: var(--jt-hell);
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--jt-rand);
}
table.jt-tabelle td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0ee;
    vertical-align: middle;
}
table.jt-tabelle tr:last-child td { border-bottom: 0; }
table.jt-tabelle tr:hover td { background: #fcfcfb; }

/* ---- Status-Etiketten: helle Flaeche + Punkt ----------------------------- */
.jt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--jt-text);
    background: #ececea;
    white-space: nowrap;
    vertical-align: middle;
}
.jt-status::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.jt-status a { color: inherit; text-decoration: underline; }

.jt-status-verfuegbar { background: #e6f3e6; color: var(--jt-gruen); }
.jt-status-im_einsatz { background: #e3eff0; color: var(--jt-petrol); }
.jt-status-wartung { background: #fbf0dc; color: var(--jt-orange); }
.jt-status-defekt { background: var(--jt-rot-hell); color: var(--jt-rot); }

/* Projekt-/Fertigungsauftrags-/Fertigungsschritt-Status (eigene Bedeutung,
   deshalb eigene Farbgebung statt Wiederverwendung der Vorrichtungs-Status-Farben). */
.jt-status-offen { background: #ececea; color: #555; }
.jt-status-in_arbeit { background: var(--jt-rot-hell); color: var(--jt-rot); }
.jt-status-erledigt, .jt-status-abgeschlossen { background: #e6f3e6; color: var(--jt-gruen); }

/* Terminrisiko-Stufen (Rueckwaertsterminierung) - eigene Skala von "laeuft
   entspannt" bis "rechnerisch nicht mehr zu schaffen". */
.jt-status-risiko-im_plan, .jt-status-risiko-erledigt { background: #e6f3e6; color: var(--jt-gruen); }
.jt-status-risiko-kein_termin { background: #ececea; color: #777; }
.jt-status-risiko-wird_knapp { background: #fbf0dc; color: var(--jt-orange); }
.jt-status-risiko-kritisch { background: var(--jt-rot-hell); color: var(--jt-rot); }
.jt-status-risiko-nicht_haltbar { background: #f3d6da; color: #7a0010; }

/* Neutrale Angaben (Intern, Maschine, Zugewiesen ...) */
.jt-status-neutral { background: #ececea; color: #444; }
.jt-status-gedaempft { background: #f2f2f0; color: #6b6b6b; }
.jt-status-extern { background: #fbf0dc; color: #7a4a00; }
.jt-status-gruen { background: #e6f3e6; color: #2c6e49; }
/* Aeltere Vorlagen setzen die Farbe noch inline - die bleiben als dunkle Etiketten lesbar. */
.jt-status[style*="background"] { color: #fff; }

/* ---- Formulare ----------------------------------------------------------- */
form.jt-formular { max-width: 640px; }
form.jt-filter { max-width: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 16px; }

.jt-feld { margin-bottom: 16px; }
.jt-feld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.jt-feld input[type=text], .jt-feld input[type=email], .jt-feld input[type=password],
.jt-feld input[type=number], .jt-feld input[type=date], .jt-feld input[type=datetime-local],
.jt-feld input[type=search], .jt-feld select, .jt-feld textarea {
    width: 100%;
    /* `width: 100%` allein genuegt bei einem <select> NICHT: seine
       intrinsische Mindestbreite richtet sich nach der laengsten Option
       und ueberstimmt die Prozentbreite. Beim PDF-Import stehen dort
       vollstaendige Maschinennamen ("Neu anlegen als 'Mazak QT-Compact
       200 MYL mit Stangenlader'") - auf dem Handy lief das Feld dadurch
       aus der Seite (gemessen 412px bei 375px Viewport, 09.09.2026). */
    max-width: 100%;
    min-width: 0;
    padding: 11px 12px;
    min-height: 44px;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r);
    background: #fff;
    color: var(--jt-text);
    font-family: inherit;
    /* 16px verhindert, dass iOS beim Fokussieren automatisch hineinzoomt. */
    font-size: 16px;
}
.jt-feld textarea { min-height: 70px; }
.jt-feld input[type=file] { padding: 8px 0; }
.jt-filterzeile select, .jt-menge-feld input, input[type=datetime-local], input[type=date] {
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r);
    background: #fff;
    font-family: inherit;
}

/* Sortier-Auswahl direkt an der Tabellen-Ueberschrift (Alex' Wunsch
   02.09.: Pfeile statt Dropdown) - <details>/<summary> statt eigenem JS,
   gleiches Muster wie .jt-feld-erkannt weiter unten. */
.jt-sort { display: inline-block; position: relative; margin-left: 4px; }
.jt-sort summary {
    cursor: pointer;
    list-style: none;
    padding: 6px 8px;
    font-weight: 400;
    color: #b5b5b2;
}
.jt-sort summary::-webkit-details-marker { display: none; }
.jt-sort[open] summary, .jt-sort summary:hover { color: var(--jt-rot); }
.jt-sort-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    text-transform: none;
    letter-spacing: normal;
}
.jt-sort-menu a {
    padding: 11px 16px;
    color: var(--jt-text);
    font-weight: 400;
    font-size: 13px;
}
.jt-sort-menu a:hover { background: var(--jt-seite); text-decoration: none; }
.jt-sort-menu a + a { border-top: 1px solid var(--jt-rand); }

.jt-feld-erkannt { margin-bottom: 16px; }
.jt-feld-erkannt summary {
    cursor: pointer;
    font-size: 14px;
    padding: 10px 12px;
    background: #e6f4e6;
    border-left: 4px solid var(--jt-gruen);
    border-radius: 0 var(--jt-r) var(--jt-r) 0;
}
.jt-feld-erkannt[open] summary { margin-bottom: 10px; }
.jt-feld-erkannt .jt-feld { margin: 10px 0 0; }

/* Brotkrumen: der fachliche Rueckweg (siehe templates/_brotkrumen.html).
   Gross genug fuer Handschuhe am Tablet - jeder Link mindestens 38px
   hoch ueber das Padding. */
.jt-brotkrumen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--jt-grau);
}
.jt-brotkrumen a {
    display: inline-block;
    padding: 9px 4px;
    margin: -9px -4px;
    color: var(--jt-grau);
    text-decoration: none;
}
.jt-brotkrumen a:hover { color: var(--jt-rot); text-decoration: underline; }
.jt-brotkrumen-trenner { color: #b5b5b2; padding: 0 2px; }
.jt-brotkrumen-aktuell { color: var(--jt-schwarz); font-weight: 600; }

/* Grossansicht fuer Fotos (static/fotogross.js): schwarzer Vollbild-
   Dialog, Bild so gross wie moeglich, ohne Rahmen. */
.jt-fotogross {
    border: 0;
    padding: 0;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.jt-fotogross[open] { display: flex; flex-direction: column; }
.jt-fotogross::backdrop { background: rgba(0, 0, 0, .92); }
.jt-fotogross img {
    max-width: 100vw;
    max-height: calc(100vh - 44px);
    object-fit: contain;
}
.jt-fotogross-hinweis {
    margin: 0;
    padding: 12px;
    font-size: 13px;
    color: #bbb;
}


/* Ein Haken im Filterformular - gross genug fuer den Finger, in einer
   Zeile mit den uebrigen Filterfeldern. */
.jt-haken {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.jt-haken input[type="checkbox"] { width: 22px; height: 22px; margin: 0; cursor: pointer; }

.jt-listenzahl { margin: 10px 0 0; font-size: 13px; color: #666; }

/* Technische Kennung neben der verstaendlichen Bezeichnung - klein,
   grau, damit ein aelterer Verweis (FA-3) noch zuzuordnen ist, ohne die
   Zeile zu dominieren. */
.jt-technisch { font-size: 11px; color: #999; margin-left: 6px; white-space: nowrap; }

.jt-belegt-badge {
    display: inline-block;
    background: var(--jt-rot);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.jt-foto { max-width: 100%; height: auto; display: block; margin-bottom: 12px; border: 1px solid var(--jt-rand); }

/* Fotogalerie an Vorrichtungen und Sonderwerkzeugen.
   `image-orientation: from-image` ist die Rueckfalllinie fuer die
   EXIF-Drehung: normalerweise dreht static/foto-upload.js das Bild schon
   beim Verkleinern richtig herum, aber ein Foto, das ohne JavaScript
   hochgeladen wurde, laege sonst quer. */
/* Bemerkung an einer Vorrichtung: ein Bedienhinweis fuer die Werkstatt,
   deshalb farblich abgesetzt und mit erhaltenen Zeilenumbruechen. */
.jt-bemerkung { border-left: 4px solid var(--jt-orange); white-space: pre-line; }

.jt-fotogalerie { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.jt-fotokachel { margin: 0; width: 160px; }
.jt-fotokachel img {
    width: 160px; height: 160px; object-fit: cover; display: block;
    border: 1px solid var(--jt-rand); background: #f4f4f4;
    image-orientation: from-image;
}
.jt-fotokachel form { margin-top: 6px; }
/* 1.12.0: Loeschen-Knopf an der Kachel und Bestaetigungsseite mit genau
   diesem Foto in voller Breite (auf dem Tablet hoechstens Bildschirmbreite). */
.jt-fotokachel .jt-foto-loeschen { margin-top: 6px; display: inline-flex; }
.jt-foto-loeschen-vorschau { margin: 0 0 16px; max-width: 640px; }
.jt-foto-loeschen-vorschau img {
    display: block; max-width: 100%; height: auto; max-height: 70vh;
    border: 1px solid var(--jt-rand); background: #f4f4f4; image-orientation: from-image;
}
.jt-foto-loeschen-vorschau figcaption { font-size: 13px; color: #555; margin-top: 6px; overflow-wrap: anywhere; }
.jt-foto-nachweis { margin: 8px 0 16px; font-size: 13px; }
.jt-foto-nachweis summary { cursor: pointer; font-weight: 600; }
.jt-foto-nachweis li { overflow-wrap: anywhere; }
.jt-foto-aufnahme { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.jt-foto-aufnahme > form { flex: 1 1 260px; min-width: 0; }
.jt-foto-aufnahme input[type="file"] { max-width: 100%; }
.jt-feld-label { display: block; font-weight: 600; margin-bottom: 4px; }
/* Auf dem Tablet stehen die beiden Foto-Formulare untereinander statt
   nebeneinander - 375px reichen fuer zwei Spalten nicht. */
@media (max-width: 700px) {
    .jt-foto-aufnahme { flex-direction: column; gap: 16px; }
    .jt-fotokachel, .jt-fotokachel img { width: 132px; }
    .jt-fotokachel img { height: 132px; }
}

footer.jt-footer {
    text-align: center;
    color: #9a9a97;
    font-size: 12px;
    padding: 20px;
}

/* ==========================================================================
   2.0.0 - neue Bausteine
   ========================================================================== */

/* Seitenkopf: Titel links, Hauptaktionen rechts */
.jt-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 18px;
}
.jt-kopf h1 { margin-bottom: 6px; }
.jt-kopf-titel { min-width: 0; }
.jt-kopf-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jt-kopf-aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jt-seitentitel-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.jt-seitentitel-zeile h1 { margin: 0; }
.jt-seitentitel-zusatz { color: var(--jt-grau); font-size: 14px; }

/* Reiter (static/app.js baut die Leiste aus den Tafeln; ohne Skript stehen
   alle Tafeln untereinander mit ihrer Ueberschrift) */
.jt-reiter { margin: 20px 0; }
.jt-reiter-leiste {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    border-bottom: 1px solid var(--jt-rand);
    margin-bottom: 16px;
}
.jt-reiter-knopf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 2px;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    color: var(--jt-grau);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.jt-reiter-knopf:hover { color: var(--jt-schwarz); }
.jt-reiter-knopf[aria-selected="true"] { color: var(--jt-schwarz); border-bottom-color: var(--jt-rot); }
.jt-reiter-zaehler {
    display: inline-block;
    min-width: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--jt-seite);
    color: var(--jt-grau);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.jt-reiter-knopf[aria-selected="true"] .jt-reiter-zaehler { background: var(--jt-schwarz); color: #fff; }
.jt-reiter-tafel-titel { font-size: 17px; margin: 22px 0 10px; }
.jt-reiter.jt-reiter-aktiv .jt-reiter-tafel-titel, .jt-reiter:not(.jt-reiter-aktiv) .jt-reiter-tafel:only-child > .jt-reiter-tafel-titel { display: none; }
.jt-reiter.jt-reiter-aktiv .jt-reiter-tafel[hidden] { display: none !important; }

/* Mehr-Menue: seltene Aktionen hinter drei Punkten */
details.jt-mehr { position: relative; display: inline-block; }
details.jt-mehr > summary.jt-mehr-knopf {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r);
    background: #fff;
    cursor: pointer;
}
details.jt-mehr > summary.jt-mehr-knopf::-webkit-details-marker { display: none; }
details.jt-mehr > summary.jt-mehr-knopf::before {
    content: "";
    width: 20px;
    height: 20px;
    background: var(--jt-text);
    -webkit-mask: url(symbole/mehr.svg) center / contain no-repeat;
    mask: url(symbole/mehr.svg) center / contain no-repeat;
}
details.jt-mehr > summary.jt-mehr-knopf:hover, details.jt-mehr[open] > summary.jt-mehr-knopf { background: var(--jt-seite); border-color: #9d9d9a; }
.jt-mehr-menue {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r-gross);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    padding: 6px;
    z-index: 40;
    text-align: left;
}
.jt-mehr-menue .jt-mehr-trenner { height: 1px; background: var(--jt-rand); margin: 6px 4px; }
.jt-mehr-menue a.jt-mehr-link,
.jt-mehr-menue details.jt-mehr-punkt > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--jt-r);
    color: var(--jt-text);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    text-decoration: none;
}
.jt-mehr-menue details.jt-mehr-punkt > summary::-webkit-details-marker { display: none; }
.jt-mehr-menue a.jt-mehr-link:hover,
.jt-mehr-menue details.jt-mehr-punkt > summary:hover,
.jt-mehr-menue details.jt-mehr-punkt[open] > summary { background: var(--jt-seite); }
.jt-mehr-menue details.jt-mehr-punkt > .jt-formular,
.jt-mehr-menue details.jt-mehr-punkt > form { padding: 10px 12px 12px; margin: 0; max-width: none; }
.jt-mehr-menue button.jt-mehr-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--jt-r);
    background: none;
    color: var(--jt-text);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.jt-mehr-menue button.jt-mehr-link:hover:not(:disabled) { background: var(--jt-seite); }
.jt-mehr-menue button.jt-mehr-link:disabled { color: #b3b3b0; cursor: not-allowed; }
.jt-mehr-menue form { margin: 0; }
.jt-position-fa-tabelle { border: 0 !important; border-top: 1px solid #f0f0ee !important; border-radius: 0 !important; background: transparent !important; }
.jt-position-fa-tabelle table.jt-tabelle { background: transparent; }
.jt-position-fa-tabelle table.jt-tabelle th { background: transparent; padding-top: 8px; padding-bottom: 4px; }
.jt-position-fa-tabelle table.jt-tabelle td { padding-top: 6px; padding-bottom: 6px; }
.jt-mehr-menue .jt-mehr-hinweis { padding: 2px 12px 8px; font-size: 12px; color: var(--jt-hell); }

/* Zeilenkarte (Position im Projekt) */
.jt-positionen { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.jt-position {
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    padding: 14px 18px;
}
.jt-position-zeile {
    display: grid;
    grid-template-columns: auto minmax(180px, 1.4fr) auto minmax(0, 2.2fr) auto;
    gap: 10px 20px;
    align-items: center;
}
.jt-position-nr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: var(--jt-r);
    background: var(--jt-seite);
    font-weight: 700;
    color: var(--jt-text);
}
.jt-position-titel { min-width: 0; }
.jt-position-titel > strong { display: block; font-size: 16px; color: var(--jt-schwarz); overflow-wrap: anywhere; }
.jt-feldklein { display: flex; flex-direction: column; font-size: 14px; }
.jt-feldklein small { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--jt-hell); }
.jt-position-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jt-position-aktionen { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.jt-position-fa { font-size: 14px; }
.jt-position-fa .jt-technisch { display: block; margin: 0; }
.jt-position-unten { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0ee; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; }
.jt-position-fa-liste { margin: 10px 0 0; border-top: 1px solid #f0f0ee; }
.jt-position-fa-zeile { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 10px 0 0; }
.jt-position-fa-zeile .jt-position-aktionen { margin-left: auto; }
.jt-leerzeile { color: var(--jt-grau); font-size: 14px; }

/* Aktionsleiste ("Arbeiten") und Auftragskontext - Fertigungsschritt */
.jt-schritt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}
.jt-schritt-haupt { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jt-schritt-seite { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jt-kachel {
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    padding: 16px 18px;
    min-width: 0;
}
.jt-kachel > h2 { font-size: 16px; margin-bottom: 12px; }
.jt-kachel .jt-hinweisbox { margin-bottom: 12px; }
.jt-kachel .jt-tabelle-wrapper { border-radius: var(--jt-r); }
.jt-liste-kv { margin: 0; }
.jt-liste-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f1f1ef; font-size: 14px; }
.jt-liste-kv > div:last-child { border-bottom: 0; }
.jt-liste-kv dt { color: var(--jt-grau); }
.jt-liste-kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.jt-kontext-aktion { margin-top: 12px; }
.jt-kontext-aktion .jt-feld { margin-bottom: 0; }

/* Der Arbeitsstand: Banner oben, Felder darunter */
.jt-arbeit { padding: 0; overflow: hidden; }
.jt-arbeit > * { margin-left: 18px; margin-right: 18px; }
.jt-arbeit > .jt-belegt-badge { margin: 0 0 14px; }
.jt-arbeit > :last-child { margin-bottom: 18px; }
.jt-belegt-badge {
    display: block;
    background: var(--jt-rot-hell);
    color: var(--jt-rot-dunkel);
    padding: 12px 18px;
    font-size: 14.5px;
    font-weight: 700;
    border-bottom: 1px solid #f6c9cf;
}
.jt-belegt-badge::before { content: "● "; color: var(--jt-rot); }
.jt-ruest-badge { background: var(--jt-petrol-bg, #e3eff0); color: #134f52; border-bottom-color: #bcd9db; margin-top: 0; }
.jt-ruest-badge::before { color: var(--jt-petrol); }
.jt-badge-pause { background: #fbf0dc; color: #7a4a00; border-bottom-color: #ecd29b; }
.jt-badge-pause::before { color: var(--jt-orange); }
.jt-ruest-badge a { color: inherit; text-decoration: underline; }
.jt-arbeit-felder { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.jt-arbeit-felder form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }

.jt-aktionsleiste {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-radius: var(--jt-r-gross);
    padding: 12px 14px;
}
.jt-aktionsleiste > * { margin: 0; }
.jt-aktionsleiste form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.jt-aktionsleiste .jt-btn { min-height: 52px; font-size: 16px; padding: 10px 22px; }
.jt-aktionsleiste .jt-fertigmeldung { margin-left: auto; align-items: center; }
.jt-aktionsleiste .jt-menge-feld { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; }
.jt-aktionsleiste .jt-menge-feld > span.jt-untertitel { order: 3; white-space: nowrap; text-transform: none; letter-spacing: normal; font-size: 13px; }
.jt-aktionsleiste .jt-menge-feld input { width: 84px; min-height: 52px; font-size: 20px; text-align: center; }
.jt-aktionsleiste .jt-aktionsleiste-hinweis { flex: 1 1 100%; font-size: 13px; color: var(--jt-grau); }
/* Pausieren: das Formular klappt als Karte ueber der Leiste auf */
.jt-aktionsleiste details.jt-pause-dialog { position: static; margin: 0; }
.jt-aktionsleiste details.jt-pause-dialog[open] > form {
    position: relative;
    margin-top: 10px !important;
    max-width: 460px;
    background: #fff;
    border: 1px solid var(--jt-rand-stark);
    border-radius: var(--jt-r-gross);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
    padding: 16px;
    margin: 0;
    z-index: 30;
}

/* Hinweis: eine Zeile Erklaerung unter einem Feld, klein und grau */
.jt-hinweiszeile { font-size: 12.5px; color: var(--jt-grau); margin: 6px 0 0; }

/* Kennzahlen oben (Uebersicht) */
.jt-kennzahlen { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
.jt-kennzahl { background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 16px 18px; min-width: 0; }
.jt-kennzahl-titel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--jt-grau); margin-bottom: 8px; }
.jt-kennzahl .zahl { font-size: 32px; font-weight: 700; color: var(--jt-schwarz); line-height: 1.1; }
.jt-kennzahl .label { font-size: 13px; color: var(--jt-grau); margin-top: 4px; }
.jt-kennzahl-gross { font-size: 32px; font-weight: 700; color: var(--jt-schwarz); line-height: 1.1; }
.jt-kennzahl-klein { font-size: 13px; color: var(--jt-grau); margin-top: 4px; }
.jt-risikozeile { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.jt-risiko-zahl { display: inline-flex; align-items: baseline; gap: 7px; }
.jt-risiko-zahl strong { font-size: 30px; line-height: 1.1; }
.jt-risiko-zahl span { font-size: 13px; color: var(--jt-grau); }
.jt-risikoleiste { display: flex; gap: 3px; height: 8px; margin-top: 12px; }
.jt-risikoleiste i { display: block; border-radius: 4px; min-width: 6px; }
.jt-zahl-gruen { color: var(--jt-gruen); } .jt-zahl-orange { color: var(--jt-orange); } .jt-zahl-rot { color: var(--jt-rot); } .jt-zahl-dunkelrot { color: #7a0010; } .jt-zahl-grau { color: #8d8d8d; }
.jt-bg-gruen { background: var(--jt-gruen); } .jt-bg-orange { background: var(--jt-orange); } .jt-bg-rot { background: var(--jt-rot); } .jt-bg-dunkelrot { background: #7a0010; } .jt-bg-grau { background: #8d8d8d; }
.jt-kennzahl-punkte { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12.5px; color: var(--jt-grau); }
.jt-kennzahl-punkte span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.jt-uebersicht-raster { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 16px; align-items: start; margin-bottom: 24px; }
.jt-lieferliste { list-style: none; margin: 0; padding: 0; }
.jt-lieferliste li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0ee; }
.jt-lieferliste li:last-child { border-bottom: 0; }
.jt-punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.jt-lieferliste-text { min-width: 0; font-size: 14px; }
.jt-lieferliste-text a { font-weight: 700; }
.jt-lieferliste-text small { display: block; color: var(--jt-grau); font-size: 12px; }
.jt-lieferliste-datum { text-align: right; font-weight: 700; color: var(--jt-schwarz); font-size: 14px; }
.jt-lieferliste-datum small { display: block; color: var(--jt-grau); font-weight: 400; font-size: 12px; }

/* Segment-Filter (Zeitstrahl: Alle / Typ) - wirkt per Skript, ohne Skript unsichtbar */
.jt-segmente { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.jt-segment {
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--jt-rand-stark);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--jt-text);
    cursor: pointer;
}
.jt-segment[aria-pressed="true"] { background: var(--jt-schwarz); border-color: var(--jt-schwarz); color: #fff; }
.jt-karten-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.jt-karten-kopf h2 { margin: 0; }

/* Listenwerkzeugleiste (Suche + Filter) */
.jt-werkzeugleiste { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.jt-werkzeugleiste form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0; }
.jt-werkzeugleiste input[type=search], .jt-werkzeugleiste input[type=text] {
    min-height: 44px; width: 300px; max-width: 100%; padding: 8px 16px 8px 40px; border: 1px solid var(--jt-rand-stark); border-radius: 22px; font-family: inherit; font-size: 15px;
    background: #fff url(symbole/lupe.svg) 13px center / 18px no-repeat;
}
.jt-werkzeugleiste select { min-height: 44px; border-radius: var(--jt-r); padding: 6px 10px; font-size: 15px; }
.jt-filterchips { display: flex; flex-wrap: wrap; gap: 8px; }
.jt-filterchip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px;
    border: 1px solid var(--jt-rand-stark); border-radius: 999px; background: #fff; color: var(--jt-text); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.jt-filterchip:hover { text-decoration: none; border-color: #9d9d9a; }
.jt-filterchip.aktiv { background: var(--jt-schwarz); border-color: var(--jt-schwarz); color: #fff; }
.jt-filterchip small { font-size: 12px; font-weight: 700; color: var(--jt-grau); }
.jt-filterchip.aktiv small { color: #cfcfcf; }
.jt-zweizeilig { display: block; }
.jt-zweizeilig small { display: block; font-size: 12px; color: var(--jt-grau); }

/* ---- Schmale Ansichten --------------------------------------------------- */
/* Tablet quer und kleiner: Seitenleiste wird ein Menue, die Kopfzeile traegt Logo und Menueknopf. */
@media (max-width: 1280px) {
    :root { --jt-seitenleiste: 0px; }
    .jt-seitenleiste {
        width: 272px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        padding-top: 8px;
    }
    .jt-seitenleiste.offen { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
    .jt-menu-toggle { display: flex; }
    header.jt-header .jt-kopf-logo { display: block; }
    header.jt-header { padding: 6px 16px; }
    main.jt-inhalt { padding: 20px 20px 48px; }
    .jt-schritt { grid-template-columns: minmax(0, 1fr) 300px; }
    .jt-kennzahlen { grid-template-columns: 1fr 1fr; }
    .jt-kennzahlen .jt-kennzahl:first-child { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
    .jt-schritt { grid-template-columns: minmax(0, 1fr); }
    .jt-schritt-seite { order: 2; }
    .jt-uebersicht-raster { grid-template-columns: minmax(0, 1fr); }
    .jt-position-zeile { grid-template-columns: auto minmax(0, 1fr) auto; }
    .jt-position-zeile > .jt-feldklein, .jt-position-zeile > .jt-position-chips { grid-column: 2 / -1; }
}

/* Tablet im Werkstattbetrieb: die Aktionsleiste bleibt beim Scrollen am unteren Rand. */
@media (max-width: 1280px) and (min-width: 641px) {
    .jt-schritt-haupt .jt-aktionsleiste { order: 99; position: sticky; bottom: 0; z-index: 20; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.1); }
}

/* Ab hier: Smartphone-Breite. Tablet (ab ca. 640px aufwaerts) bekommt die
   normale Tabelle - dort ist genug Platz, um sie komfortabel mit dem Finger zu
   bedienen. */
@media (max-width: 640px) {
    main.jt-inhalt { padding: 16px 12px 40px; }
    h1 { font-size: 22px; }
    header.jt-header { flex-wrap: wrap; gap: 6px 10px; padding: 6px 12px; }
    header.jt-header form.jt-nav-suche { order: 9; width: 100%; margin-left: 0; }
    header.jt-header form.jt-nav-suche input { flex: 1; width: auto; }
    /* Spotlight-Suche am Telefon: in der zweiten Zeile bleibt das Feld klein und waechst beim Antippen auf die ganze Breite. */
    header.jt-header form.jt-nav-suche.jt-suche-js { width: 150px; flex: 0 0 150px; }
    header.jt-header form.jt-nav-suche.jt-suche-js.offen { width: 100%; flex-basis: 100%; }
    .jt-suche-ergebnisse { left: 0; right: 0; width: auto; }
    .jt-akku { margin-left: auto; }
    .jt-benutzer-name { display: none; }
    .jt-kennzahlen { grid-template-columns: 1fr; }
    .jt-schritt-haupt .jt-aktionsleiste { position: static; }
    .jt-aktionsleiste .jt-fertigmeldung { margin-left: 0; width: 100%; }
    .jt-aktionsleiste .jt-btn { width: 100%; }
    .jt-aktionsleiste form { width: 100%; }
    .jt-mehr-menue { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-width: none; bottom: 12px; max-height: 70vh; overflow-y: auto; }

    /* Tabellen, die fuer den Betrieb an der Maschine wichtig sind (Vorrichtungs-
       liste, aktuelle Belegungen, Werkzeug-Stueckliste, Einsatzverlauf),
       werden auf dem Telefon zu einer Kartenliste statt einer schmal
       gequetschten, seitlich scrollenden Tabelle - jede Zeile wird ein
       eigener Block, jede Spalte bekommt ihre Beschriftung vorangestellt. */
    table.jt-tabelle-karten,
    table.jt-tabelle-karten tbody,
    table.jt-tabelle-karten tr,
    table.jt-tabelle-karten td {
        display: block;
        width: 100%;
    }

    /* Nur die Kopfzeile der Kartentabelle selbst ausblenden - `:has(th)`
       ohne `>` traf auch jede Datenzeile, in der eine verschachtelte
       Tabelle einen Kopf hat (Fund 11.09.2026, Arbeitsgang-Vergleich im
       PDF-Import: die ganze Positionskarte verschwand auf dem Telefon). */
    table.jt-tabelle-karten tr:has(> th) { display: none; }

    table.jt-tabelle-karten tr {
        border: 1px solid var(--jt-rand);
        border-radius: var(--jt-r);
        margin-bottom: 12px;
        padding: 4px 12px;
    }

    table.jt-tabelle-karten td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }

    table.jt-tabelle-karten td:last-child { border-bottom: none; }

    table.jt-tabelle-karten td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        text-align: left;
        flex-shrink: 0;
    }

    table.jt-tabelle-karten td:not([data-label]) { justify-content: flex-end; }

    /* Die Zelle mit den Feldhaken bzw. dem Arbeitsgang-Vergleich braucht
       die volle Breite: Beschriftung oben, Inhalt darunter, linksbuendig. */
    table.jt-tabelle-karten td:has(> .jt-feldhaken) {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 6px;
    }
    table.jt-tabelle-karten td:has(> .jt-feldhaken) .jt-feldhaken { width: 100%; }
}


/* Zeitstrahl mit Kalenderraster (Belegungsplan-Übersicht + Maschinendetail).
   Fahrbahn (.jt-zeitstrahl-spur) ist immer 100% breit, alle Positionen der
   Kinder sind vom Server als Prozentwerte vorgegeben (siehe app.py
   _zeitstrahl_segment/_kalender_tage) - hier nur die Darstellung. */
.jt-zeitstrahl-wrapper { overflow-x: auto; margin-bottom: 24px; }
.jt-zeitstrahl-inhalt { min-width: 700px; }

.jt-zeitstrahl-zeile, .jt-zeitstrahl-kopf {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 6px;
}

.jt-zeitstrahl-label {
    width: 190px;
    flex-shrink: 0;
    padding: 4px 0;
    font-size: 13px;
}
.jt-zeitstrahl-label .jt-untertitel { margin-bottom: 0; }

.jt-zeitstrahl-spur {
    position: relative;
    flex: 1;
    min-height: 46px;
    background: #fff;
    border: 1px solid var(--jt-rand);
    overflow: hidden;
}

.jt-zeitstrahl-kopf .jt-zeitstrahl-spur {
    min-height: 32px;
    border: none;
    background: transparent;
}

.jt-tag-zelle {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid #ececec;
    /* verhindert, dass das Label eines schmalen ersten/letzten (Teil-)Tages
       über die Nachbarzelle hinausläuft und sich mit deren Label überlagert */
    overflow: hidden;
}
.jt-tag-zelle.wochenende { background: #eee; }
.jt-zeitstrahl-kopf .jt-tag-zelle.wochenende { background: transparent; }

.jt-tag-label {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}

.jt-kw-label {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    border-left: 2px solid #999;
    padding-left: 3px;
}

.jt-jetzt-linie {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--jt-rot);
    z-index: 3;
}

.jt-belegt-balken {
    position: absolute;
    top: 6px;
    bottom: 6px;
    background: var(--jt-rot);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
    z-index: 2;
    text-decoration: none;
}
.jt-belegt-balken:hover { color: #fff; text-decoration: none; opacity: 0.9; }
.jt-belegt-balken.offen {
    background: linear-gradient(90deg, var(--jt-rot) 0%, var(--jt-rot) 75%, rgba(221,0,26,0.25) 100%);
}
.jt-belegt-balken.abgeschlossen { background: #888; }

/* Team-Kalender (Zeiterfassung): Monatsraster mit kleinen Initialen-Badges
   für genehmigte Abwesenheiten - steckt wie der Zeitstrahl oben in
   .jt-zeitstrahl-wrapper, damit er auf schmalen Bildschirmen horizontal
   scrollt statt die 7 Spalten zu stauchen (siehe Alex' Auftrag "nicht
   überlaufen"). */
.jt-monatskalender { min-width: 640px; }

.jt-monatskalender-kopf, .jt-monatskalender-woche {
    display: flex;
    gap: 4px;
}
.jt-monatskalender-kopf { margin-bottom: 4px; }
.jt-monatskalender-woche { margin-bottom: 4px; }

.jt-monatskalender-kopfzelle {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    padding: 4px 0;
}

.jt-monatskalender-tag {
    flex: 1;
    min-height: 74px;
    background: #fff;
    border: 1px solid var(--jt-rand);
    padding: 4px;
}
.jt-monatskalender-tag.wochenende { background: #eee; }
.jt-monatskalender-tag.ausserhalb { opacity: 0.4; }
.jt-monatskalender-tag.heute { border: 2px solid var(--jt-rot); }

.jt-monatskalender-tagnummer {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.jt-monatskalender-tag.heute .jt-monatskalender-tagnummer { color: var(--jt-rot); font-weight: 700; }

.jt-monatskalender-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.jt-abwesend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.jt-abwesend-urlaub { background: var(--jt-gruen); }
.jt-abwesend-krankheit { background: var(--jt-orange); }
.jt-abwesend-allgemein { background: #6b7280; }

@media (max-width: 640px) {
    .jt-monatskalender-tag { min-height: 60px; }
}

/* Rüstblatt: für Werkstatt/Tablet/Ausdruck - Header, Fußzeile und alles,
   was beim Drucken nicht gebraucht wird, blenden sich weg. */
@media print {
    header.jt-header, footer.jt-footer, .jt-keine-druckansicht { display: none !important; }
    body { padding-top: 0 !important; }
    main.jt-inhalt { max-width: none; padding: 0; }
    body::before { display: none; }
}

/* Schalter "Passwort anzeigen" - steht direkt unter dem Feld und ist
   bewusst gross genug fuer einen Finger auf dem Tablet. */
.jt-passwort-schalter { margin-top: 6px; min-height: 40px; }

/* Brotkrumen-Sprung "Position 02" landet auf dem Anker #position-<id>;
   der Header ist fixiert, ohne Rand laege die Karte dahinter. */
[id^="position-"] { scroll-margin-top: calc(var(--jt-header-hoehe, 70px) + 12px); }

/* PDF-Import-Vergleich: ein Haken je geaendertem Feld (11.09.2026) */
.jt-feldhaken { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jt-feldhaken li { margin: 0; }
.jt-feldhaken .jt-haken { align-items: flex-start; }

/* PDF-Import-Vergleich: Arbeitsgaenge alt/neu je Position.
   Feste Spaltenaufteilung, damit die Tabelle auf dem Tablet im Hochformat
   (800 px) NICHT seitlich scrollt - der Haken muss ohne Wischen sichtbar
   sein. Text bricht innerhalb der Zelle um. */
table.jt-vergleich { table-layout: fixed; width: 100%; }
table.jt-vergleich th:nth-child(1) { width: 19%; }
table.jt-vergleich th:nth-child(2) { width: 13%; }
table.jt-vergleich th:nth-child(4) { width: 15%; }
table.jt-vergleich td { overflow-wrap: anywhere; }
/* .jt-technisch ist sonst nowrap (kurze Kennungen wie "FA-12") - im
   Vergleich stehen darin ganze Saetze, die umbrechen muessen. */
table.jt-vergleich .jt-ag-vergleich .jt-technisch,
table.jt-vergleich .jt-hinweisbox .jt-technisch { white-space: normal; margin-left: 0; display: block; }
table.jt-vergleich .jt-ag-tabelle .jt-technisch { display: inline; }
.jt-ag-vergleich { display: block; margin-top: 6px; }
.jt-ag-tabelle { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; table-layout: fixed; }
.jt-ag-tabelle th:nth-child(3) { width: 30%; }
.jt-ag-tabelle th, .jt-ag-tabelle td { text-align: left; padding: 4px 6px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.jt-ag-tabelle th { font-size: 12px; color: #666; font-weight: 600; }
/* Innerhalb einer Kartentabelle bleibt der Arbeitsgang-Vergleich eine
   echte kleine Tabelle - die Kartenregeln (block/flex) gelten fuer ihre
   Zeilen und Zellen nicht. */
table.jt-tabelle-karten .jt-ag-tabelle { display: table; width: 100%; }
table.jt-tabelle-karten .jt-ag-tabelle tbody { display: table-row-group; }
table.jt-tabelle-karten .jt-ag-tabelle tr { display: table-row; border: none; margin: 0; padding: 0; }
table.jt-tabelle-karten .jt-ag-tabelle tr:has(> th) { display: table-row; }
table.jt-tabelle-karten .jt-ag-tabelle td, table.jt-tabelle-karten .jt-ag-tabelle th {
    display: table-cell; text-align: left; width: auto; padding: 4px 6px; border-bottom: 1px solid #e3e3e3;
}
table.jt-tabelle-karten .jt-ag-tabelle td::before { content: none; }

/* ---- 1.9.0: Schrittpausen, Mitarbeiterliste, Horizont ------------------- */
.jt-status-pausiert { background: #fbf0dc; color: var(--jt-orange); }
.jt-status-pause-grund { background: #f6e6c4; color: #7a4a00; }
.jt-mitarbeiter-karte.pausiert { border-left: 6px solid var(--jt-orange); }
.jt-mitarbeiter-karte.erledigt { opacity: 0.6; }
.jt-mitarbeiter-karte + .jt-mitarbeiter-karte { margin-top: 14px; }
.jt-karten-aktionen { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }

/* Der Pausen-Dialog: ein <details>, dessen Zusammenfassung wie ein Knopf
   aussieht - ohne Skript bedienbar, mit grosser Trefferflaeche am Tablet. */
.jt-pause-dialog summary { list-style: none; display: inline-flex; justify-content: center; cursor: pointer; }
.jt-pause-dialog summary::-webkit-details-marker { display: none; }
.jt-pause-dialog[open] summary { opacity: 0.85; }
.jt-pause-dialog .jt-formular { padding: 12px; border: 1px solid var(--jt-rand); background: var(--jt-hintergrund); }
.jt-filterzeile { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 18px; }
.jt-filterzeile select { min-height: 44px; font-size: 16px; }
.jt-filterzeile .jt-haken { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.jt-filterzeile .jt-haken input { width: 22px; height: 22px; }

/* Fertigstellungshorizont (Dashboard der Betriebsleitung): blau = Termin vor uns, rot
   schraffiert = ueberfaellig, orange = heute. Der Text im Balken traegt
   dieselbe Aussage - Farbe ist nie das einzige Merkmal. */
.jt-horizont-balken {
    position: absolute; top: 8px; bottom: 8px;
    background: #1f5fa8; color: #fff; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap;
    z-index: 2; text-decoration: none; border-radius: 2px;
}
.jt-horizont-balken:hover { color: #fff; text-decoration: none; opacity: 0.9; }
.jt-horizont-balken.offen { background: linear-gradient(90deg, #1f5fa8 0%, #1f5fa8 80%, rgba(31,95,168,0.25) 100%); }
.jt-horizont-balken-heute { background: var(--jt-orange); }
.jt-horizont-balken-ueberfaellig {
    background: repeating-linear-gradient(45deg, var(--jt-rot) 0, var(--jt-rot) 6px, #ff8a95 6px, #ff8a95 12px);
    color: #fff; text-shadow: 0 0 3px #000;
    border: 2px solid var(--jt-rot-dunkel);
}
.jt-horizont-zeile.jt-horizont-ueberfaellig .jt-zeitstrahl-label { border-left: 4px solid var(--jt-rot); padding-left: 8px; }
.jt-horizont-ohne { position: absolute; left: 8px; top: 12px; font-size: 12px; color: #888; }

/* 14-Tage-Zeitstrahlen (Horizont, Mitarbeiter): breiter, damit die
   Tagesbeschriftungen nicht ineinanderlaufen - der Wrapper scrollt seitlich. */
.jt-zeitstrahl-14 { min-width: 1080px; }

/* Mitarbeiter-Zeitstrahl: mehrere Balken je Maschine untereinander. */
.jt-zeitstrahl-mehrzeilig { min-height: calc(12px + var(--jt-balken-zahl, 1) * var(--jt-balken-hoehe, 30px)); }
.jt-zeitstrahl-mehrzeilig .jt-zeitstrahl-spur { min-height: calc(12px + var(--jt-balken-zahl, 1) * var(--jt-balken-hoehe, 30px)); }
.jt-balken-laeuft { background: var(--jt-rot); }
/* 1.12.0: Ruesten neben einem Lauf - eigene Farbe, immer mit dem Wort. */
.jt-balken-ruesten, .jt-belegt-balken.jt-balken-ruesten { background: #0f766e; }
/* Maschinenseite: Lauf oben, Ruesten in einer eigenen unteren Spur. */
.jt-zwei-spuren, .jt-zwei-spuren .jt-zeitstrahl-spur { min-height: 72px; }
.jt-zwei-spuren .jt-belegt-balken { top: 6px; bottom: auto; height: 28px; }
.jt-zwei-spuren .jt-belegt-balken.jt-balken-ruesten { top: 38px; }
.jt-balken-pausiert { background: var(--jt-orange); }
.jt-balken-offen { background: #1f5fa8; }
.jt-balken-offen.offen { background: linear-gradient(90deg, #1f5fa8 0%, #1f5fa8 75%, rgba(31,95,168,0.25) 100%); }
.jt-belegt-balken.ueberfaellig { border: 2px solid var(--jt-rot-dunkel); }

/* Foto-Aufnahme am Tablet (1.9.0): zwei klar getrennte, grosse Wege -
   das eigentliche Dateifeld ist unsichtbar, die Beschriftung ist der Knopf. */
.jt-foto-aufnahme > form { border: 1px solid var(--jt-rand); padding: 12px; background: #fff; }
.jt-foto-knopf { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 18px; cursor: pointer; }
.jt-foto-knopf input[type=file] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.jt-foto-knopf:focus-within { outline: 3px solid var(--jt-rot); outline-offset: 2px; }
.jt-foto-auswahl { font-size: 13px; color: #555; margin-top: 8px; min-height: 18px; }


/* ---- 1.10.0: Kartentitel, Sammellauf, Fertigmenge, Prioritaet, Kamera-Check ---- */
/* Der neue Kartentitel "123456-07: 1.OP" darf auf 375 px nie ueberlaufen -
   eine lange Arbeitsgang-Bezeichnung bricht um. */
.jt-karten-titel { overflow-wrap: anywhere; word-break: break-word; font-size: 22px; line-height: 1.25; }
.jt-sammel-haken { display: inline-flex; align-items: center; margin-right: 6px; vertical-align: middle; }
.jt-sammel-haken input { width: 26px; height: 26px; margin: 0; }
.jt-mitarbeiter-karte.sammel-gewaehlt { outline: 3px solid var(--jt-rot); outline-offset: 2px; }
.jt-sammel-zaehler { white-space: nowrap; font-weight: 400; margin-left: .35em; }
.jt-sammelstart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border: 1px solid var(--jt-rand); background: #fff; padding: 12px; margin-bottom: 18px; }
.jt-status-sammellauf { background: #ebe4f5; color: #5a3d8a; }
.jt-status-ruesten { background: #dff1ef; color: #0f766e; }

.jt-status-mehrmenge { background: #fbe9d4; color: #b35c00; }
.jt-fertigmeldung { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.jt-menge-feld { display: inline-flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; }
.jt-menge-feld input { width: 110px; min-height: 44px; font-size: 18px; padding: 6px 8px; }
.jt-positions-prio { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.jt-positions-prio button[disabled] { opacity: .4; }
.jt-foto-hinweis { margin: -4px 0 10px; }
.jt-kamera-check section { border: 1px solid var(--jt-rand); background: #fff; padding: 12px; margin-bottom: 12px; }
.jt-kamera-check input[type=file] { display: block; max-width: 100%; font-size: 16px; min-height: 44px; }
.jt-kamera-protokoll { background: #fff; border: 1px solid var(--jt-rand); padding: 10px 10px 10px 30px; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .jt-karten-titel { font-size: 19px; }
    .jt-fertigmeldung { flex-direction: column; align-items: stretch; }
    .jt-menge-feld input { width: 100%; }
}

/* 1.11.0 - Zeichnungsnummer und Zeichnungen an der Position (Wunsch des Kunden
   25.09.2026). Lange Nummern brechen um, statt die Seite auf dem Galaxy Tab
   zu verbreitern. */
.jt-zeichnungsnummer { display: block; margin-top: 2px; font-size: 16px; overflow-wrap: anywhere; word-break: break-word; }
.jt-zeichnungsnummer strong { font-weight: 700; }
.jt-zeichnungsnummer-leer { color: #595959; font-size: 14px; }
.jt-zeichnungsnummer-zelle { overflow-wrap: anywhere; word-break: break-word; }
/* Aenderungsliste der Projektseite: die Entfern-Nachweise (1.11.1) tragen
   Dateinamen, meist ohne Leerzeichen - auf dem Telefon liefen sie ueber
   die Kartenzelle hinaus (regression-reviewer 25.09.2026, B1). Nur die
   Spalten mit Dateinamen (Vorher/Nachher): auf ALLE Zellen angewendet,
   quetschte die Tabellenbreitenverteilung am Desktop jede Spalte und brach
   Datum, Feldname und Namen mitten im Wort (Nachpruefung R1). */
table.jt-aenderungsliste td[data-label="Vorher"],
table.jt-aenderungsliste td[data-label="Nachher"] { overflow-wrap: anywhere; word-break: break-word; min-width: 8em; }
/* min-width: knapp ueber dem Kartenumbruch (641-740 px) bekamen Vorher/Nachher
   sonst nur einen Rest von rund 80 px, und Datum oder Schrittname brachen mitten
   im Wort (Nachpruefung 2, N1) - lieber seitlich scrollen wie vor 1.11.1. Worte
   breiter als die Zelle (ab etwa 13 Zeichen) brechen im Band weiterhin um
   (Nachpruefung 3, R3-1; siehe docs/architektur.md). */
.jt-zeichnungen { background: #fff; }
.jt-zeichnungen h2 { margin-top: 0; }
/* Ruecksprung nach dem Hochladen/Entfernen landet auf #zeichnungen - wie
   bei den Positionsankern oben nicht hinter dem fixierten Header. */
#zeichnungen { scroll-margin-top: calc(var(--jt-header-hoehe, 70px) + 12px); }
.jt-zeichnungen-liste { list-style: none; padding: 0; margin: 10px 0; }
.jt-zeichnungen-liste li { padding: 8px 0; border-bottom: 1px solid var(--jt-rand); overflow-wrap: anywhere; }
.jt-zeichnungen-liste li:last-child { border-bottom: 0; }
.jt-zeichnung-link { font-weight: 600; margin-right: 8px; }
.jt-zeichnung-info { display: inline-block; font-size: 13px; color: #666; margin-right: 8px; }
.jt-zeichnung-entfernen { display: inline; }
.jt-zeichnung-bild { display: block; margin-bottom: 6px; }
.jt-zeichnung-hochladen { margin-top: 12px; }


/* Eingebauter PDF-Betrachter (1.11.2, templates/pdf_ansicht.html). Der
   Seitenbereich scrollt in sich - beim Zoomen auch seitlich -, die Seite
   selbst laeuft bei 375 px nicht ueber. */
.jt-pdf-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}
.jt-pdf-titel {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}
.jt-pdf-werkzeuge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.jt-pdf-werkzeuge .jt-btn { min-width: 44px; }
.jt-pdf-info { color: #666; font-size: 14px; }
.jt-pdf-original { font-size: 14px; }
.jt-pdf-meldung { margin: 6px 0; color: #555; }
.jt-pdf-meldung[hidden], .jt-pdf-direkt[hidden] { display: none; }
.jt-pdf-meldung-fehler { color: var(--jt-rot-dunkel); font-weight: 600; }
.jt-pdf-direkt { margin: 0 0 8px; font-size: 14px; }
.jt-pdf-seiten {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--jt-header-hoehe, 70px) - 190px);
    min-height: 320px;
    overflow: auto;
    /* Klassische Bildlaufleisten (Windows-PC): Platz immer freihalten, sonst
       misst die erste Seite ihre Breite ohne Leiste und ist danach zu breit.
       Die Tablets haben ueberlagernde Leisten - dort aendert es nichts. */
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    background: #d9dcdf;
    padding: 8px;
    border-radius: 4px;
}
.jt-pdf-seite {
    position: relative;
    margin: 0 auto 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.jt-pdf-seite canvas {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
}
.jt-pdf-seite canvas[hidden] { display: none; }

/* Uebersicht der Mitarbeiter (1.11.2): Zeichnungsnummer an der Karte - eine
   lange Nummer bricht um, statt die Karte bei 375 px zu verbreitern. */
.jt-karten-zeichnungsnummer {
    overflow-wrap: anywhere;
    margin-top: 2px;
    /* Die Nummer genau wie eingetragen - Gross-/Kleinschreibung gehoert
       dazu (Nachpruefliste 1.11.0, Punkt 7); .jt-untertitel setzt sonst
       alles in Grossbuchstaben. */
    text-transform: none;
    letter-spacing: normal;
}
.jt-sammel-hinweis { margin-bottom: 12px; }

/* Maschine wechseln (1.12.0): Aufklapper an Karte und
   Schrittseite; das Auswahlfeld bricht bei 375 px nicht aus. */
.jt-maschine-wechseln { margin: 8px 0; }
.jt-maschine-wechseln select { max-width: 100%; }

/* Vorrichtungen: Einsatz und Rueckgabe (1.12.0). Der
   Lagerplatz steht gross da, weil genau er bestaetigt wird; lange
   Bezeichnungen brechen um. */
.jt-status-rueckgabe { background: #fbf0dc; color: #b45309; }
.jt-vorrichtung-lage {
    margin: 16px 0 24px;
    padding: 12px 14px;
    border: 1px solid var(--jt-rand);
    border-radius: 6px;
    max-width: 640px;
}
.jt-lagerplatz-gross {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.jt-rueckgabe { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.jt-rueckgabe .jt-haken { overflow-wrap: anywhere; }
.jt-rueckgabe-aufklapper { margin-top: 6px; }

/* Auswertung der Fertigungszeiten (1.12.0). Kennzahlen als Kacheln, die bei
   375 px untereinander stehen; breite Tabellen scrollen in ihrem Rahmen. */
.jt-auswertung-erklaerung { margin: 0 0 16px; }
.jt-auswertung-erklaerung ul { margin: 8px 0 0 18px; padding: 0; }
.jt-auswertung-filterfelder { display: flex; flex-wrap: wrap; gap: 12px; }
.jt-auswertung-filterfelder .jt-feld { flex: 1 1 160px; min-width: 0; margin-bottom: 0; }
.jt-auswertung-filterfelder select, .jt-auswertung-filterfelder input { max-width: 100%; }
.jt-auswertung-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jt-auswertung-block { margin: 24px 0; }
.jt-auswertung-summen { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 12px; }
.jt-auswertung-kennzahl {
    flex: 1 1 200px;
    min-width: 0;
    border: 1px solid var(--jt-rand);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-wrap: anywhere;
}
.jt-auswertung-zahl { font-size: 22px; font-weight: 700; }
.jt-auswertung-position { margin: 12px 0; }
.jt-auswertung-position > summary { cursor: pointer; overflow-wrap: anywhere; }
.jt-auswertung-hinweis { text-transform: none; letter-spacing: normal; }
.jt-auswertung-detailzeile > td { padding-top: 0; }
.jt-auswertung-plan { font-weight: 600; }


/* ==========================================================================
   2.0.0 - Anpassungen an bestehenden Bausteinen
   ========================================================================== */

/* Werkstattkarten (Mitarbeiter-Uebersicht) */
.jt-mitarbeiter-karte {
    background: #fff;
    border: 1px solid var(--jt-rand);
    border-left: 6px solid var(--jt-rand-stark);
    border-radius: var(--jt-r-gross);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.jt-mitarbeiter-karte.laeuft { border-left-color: var(--jt-rot); }
.jt-mitarbeiter-karte.blockiert { opacity: 0.72; }
.jt-mitarbeiter-karte .jt-karten-titel { color: var(--jt-schwarz); }
.jt-karten-aktionen { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; max-width: none; align-items: flex-start; }
.jt-karten-aktionen > form, .jt-karten-aktionen > details, .jt-karten-aktionen > a, .jt-karten-aktionen > .jt-fertigmeldung { flex: 1 1 260px; max-width: 420px; }
.jt-karten-aktionen > .jt-hinweisbox, .jt-karten-aktionen > .jt-untertitel { flex: 1 1 100%; max-width: none; }

/* Zeitstrahl */
.jt-zeitstrahl-wrapper { background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 14px 16px; }
.jt-zeitstrahl-zeile { border-top: 1px solid #f0f0ee; padding-top: 6px; margin-bottom: 0; }
.jt-zeitstrahl-kopf { margin-bottom: 4px; }
.jt-zeitstrahl-spur { background: transparent; border: 0; border-radius: 4px; min-height: 42px; }
.jt-zeitstrahl-label a { font-weight: 700; color: var(--jt-schwarz); }
.jt-zeitstrahl-label .jt-untertitel { text-transform: none; letter-spacing: normal; font-size: 12px; margin-top: 2px; }
.jt-tag-zelle { border-right: 0; }
.jt-tag-zelle.wochenende { background: #f3f3f1; }
.jt-belegt-balken { border-radius: 4px; top: 7px; bottom: 7px; }
.jt-horizont-balken { border-radius: 4px; }
.jt-zeitstrahl-label[hidden], .jt-zeitstrahl-zeile[hidden] { display: none !important; }

/* Kalender, Fotos, Sonstiges: weiche Ecken */
.jt-monatskalender-tag, .jt-fotokachel img, .jt-foto, .jt-foto-aufnahme > form, .jt-kamera-check section, .jt-kamera-protokoll,
.jt-sammelstart, .jt-auswertung-kennzahl, .jt-vorrichtung-lage { border-radius: var(--jt-r); }
.jt-abwesend-badge { border-radius: 4px; }
.jt-pause-dialog summary { min-height: 44px; }
.jt-pause-dialog .jt-formular { border-radius: var(--jt-r-gross); }
.jt-zeichnungen { background: #fff; }

/* Druck: Seitenleiste und Kopfzeile weg */
@media print {
    .jt-seitenleiste, .jt-nav-schleier, header.jt-header, footer.jt-footer, .jt-keine-druckansicht { display: none !important; }
    .jt-seite-inhalt { margin-left: 0 !important; }
    body { padding-top: 0 !important; background: #fff; }
    main.jt-inhalt { max-width: none; padding: 0; }
}

.jt-nur-screenreader { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.jt-werkzeugleiste.jt-filter { background: transparent; }
.jt-werkzeugleiste .jt-feld label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--jt-hell); }
.jt-zweizeilig a { font-weight: 600; }

/* Tabellen mit Mehr-Menues: das Menue darf ueber den Tabellenrand hinausragen. */
.jt-tabelle-wrapper.jt-wrapper-frei { overflow-x: auto; }
@media (min-width: 1101px) { .jt-tabelle-wrapper.jt-wrapper-frei { overflow: visible; } }
@media (max-width: 1100px) { .jt-wrapper-frei .jt-mehr-menue { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-width: none; bottom: 12px; max-height: 70vh; overflow-y: auto; } }
.jt-tabelle-wrapper.jt-wrapper-frei table.jt-tabelle { border-radius: var(--jt-r-gross); }
.jt-mehr-menue .jt-feld input[type=password], .jt-mehr-menue input[type=password] { width: 100%; }
.jt-mehr-menue .jt-passwort-schalter { margin: 0 0 8px; }

.jt-menue-feld { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--jt-rand-stark); border-radius: var(--jt-r); font-size: 16px; font-family: inherit; margin-bottom: 8px; }

/* Logo-Text in der hellen Kopfzeile (Tablet/Telefon) dunkel, auf der Anmeldeseite hell. */
header.jt-header .jt-logo-text { color: var(--jt-schwarz); }
body.jt-abgemeldet header.jt-header .jt-logo-text { color: #fff; }
header.jt-header .jt-logo-text:hover { color: var(--jt-rot); }
body.jt-abgemeldet header.jt-header .jt-logo-text:hover { color: #fff; }

/* Werkstattkarte: Mehr-Menue oben rechts, Details-Link unten */
.jt-mitarbeiter-karte { position: relative; }
details.jt-mehr.jt-mehr-karte { position: absolute; top: 12px; right: 12px; }
.jt-mitarbeiter-karte .jt-untertitel, .jt-mitarbeiter-karte h2.jt-karten-titel { padding-right: 52px; }
.jt-karten-fuss { margin-top: 12px; font-size: 14px; }
.jt-karten-fuss a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.jt-mehr-menue .jt-maschine-wechseln { margin: 0; }
.jt-mehr-menue .jt-maschine-wechseln > summary { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--jt-r); background: none; border: 0; color: var(--jt-text); font-size: 14.5px; font-weight: 600; cursor: pointer; justify-content: flex-start; list-style: none; }
.jt-mehr-menue .jt-maschine-wechseln > summary:hover { background: var(--jt-seite); }
.jt-mehr-menue .jt-maschine-wechseln > form { padding: 10px 12px 12px; }

/* Dritte Knopfart: Textknopf fuer Seltenes in Tabellenzeilen (Entfernen u. ae.) */
.jt-btn.jt-btn-text { background: none; border-color: transparent; color: var(--jt-grau); padding: 6px 10px; min-height: 44px; }
.jt-btn.jt-btn-text:hover { background: var(--jt-rot-hell); border-color: transparent; color: var(--jt-rot-dunkel); }
details > summary.jt-btn { list-style: none; width: auto; }
details > summary.jt-btn::-webkit-details-marker { display: none; }
details[open] > summary.jt-btn.jt-btn-sekundaer { background: var(--jt-seite); }

@media (max-width: 1280px) and (min-width: 641px) {
    .jt-aktionsleiste details.jt-pause-dialog[open] > form { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); margin-top: 0 !important; }
}
/* Geschlossene Seitenleiste nicht per Tab erreichbar */
@media (max-width: 1280px) { .jt-seitenleiste:not(.offen) { visibility: hidden; } }
/* Druck: alle Reiter-Tafeln aufs Papier, ohne Reiterleiste */
@media print { .jt-reiter-tafel[hidden] { display: block !important; } .jt-reiter-leiste { display: none !important; } .jt-reiter .jt-reiter-tafel-titel { display: block !important; } }

/* ==== Auswertung der Fertigungszeiten (2.0.1): Zeitarten in eigenen Farben ==== */
:root {
    --art-ruesten: #1f6f73;
    --art-aktiv: #0e6b2d;
    --art-automatisiert: #1f5fa8;
    --art-unbestimmt: #8d8d8d;
    --art-ohne_maschine: #d98a00;
    --art-pause: #7c5cc4;
    --art-stoerung: #dd001a;
}
.jt-art-ruesten { background: var(--art-ruesten); }
.jt-art-aktiv { background: var(--art-aktiv); }
.jt-art-stoerung { background: var(--art-stoerung); }
.jt-art-pause { background: var(--art-pause); }
.jt-art-automatisiert { background: var(--art-automatisiert); }
.jt-art-unbestimmt { background: var(--art-unbestimmt); }
.jt-art-ohne_maschine { background: var(--art-ohne_maschine); }
.jt-artpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }
.jt-artenkarte { background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 14px 18px; margin-bottom: 16px; }
.jt-artenkarte-titel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--jt-grau); margin-bottom: 8px; }
.jt-artenleiste { display: flex; gap: 2px; height: 16px; border-radius: 8px; overflow: hidden; background: var(--jt-seite); min-width: 40px; }
.jt-artenleiste > i { display: block; min-width: 3px; }
.jt-artenleiste-klein { height: 8px; width: 160px; flex: none; }
.jt-artenleiste-zeit { height: 22px; margin: 0 0 10px; }
.jt-artenlegende { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; color: var(--jt-grau); }
.jt-artenlegende strong { color: var(--jt-schwarz); margin-left: 4px; }
.jt-artenlegende .jt-artpunkt { margin-right: 7px; }
.jt-auswertung-summen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 14px; }
.jt-auswertung-kennzahl { background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.jt-auswertung-zahl { font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--jt-schwarz); }
.jt-auswertung-kennzahl > span:last-child { font-size: 13px; color: var(--jt-grau); }
.jt-auswertung-block { margin: 0 0 28px; }
.jt-auswertung-filter { max-width: none; background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 14px 18px; margin-bottom: 14px; }
.jt-auswertung-filterfelder .jt-feld label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--jt-hell); }
.jt-auswertung-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.jt-auswertung-auswahl { margin: 10px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.jt-hilfe > summary.jt-hilfe-knopf { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--jt-rot); font-weight: 700; }
details.jt-hilfe > summary.jt-hilfe-knopf::-webkit-details-marker { display: none; }
details.jt-hilfe > summary.jt-hilfe-knopf::before { content: "?"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border: 2px solid var(--jt-rot); border-radius: 50%; font-size: 13px; }
.jt-hilfe-fenster { width: 620px; padding: 16px 20px 16px 8px; }
.jt-hilfe-fenster ul { margin: 0 0 0 18px; padding: 0; font-size: 14px; }
.jt-hilfe-fenster li { margin-bottom: 8px; }
.jt-auswertung-position > summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.jt-auswertung-positionstitel { min-width: 0; }
.jt-auswertung-position { background: #fff; border: 1px solid var(--jt-rand); border-radius: var(--jt-r-gross); padding: 10px 16px; margin: 8px 0; }
.jt-auswertung-position[open] { padding-bottom: 14px; }
@media (max-width: 1100px) { .jt-hilfe-fenster { position: fixed; left: 12px; right: 12px; top: auto; width: auto; bottom: 12px; max-height: 75vh; overflow-y: auto; } }
form.jt-formular.jt-auswertung-filter { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.jt-auswertung-filter .jt-auswertung-filterfelder { flex: 1 1 640px; flex-wrap: nowrap; }
.jt-auswertung-filter .jt-auswertung-filterfelder .jt-feld { flex: 1 1 0; }
.jt-auswertung-filter .jt-auswertung-knoepfe { margin: 0 0 0 auto; padding-bottom: 0; }
.jt-auswertung-filter .jt-auswertung-auswahl { flex: 1 1 100%; margin: 0; }
@media (max-width: 1100px) { .jt-auswertung-filter .jt-auswertung-filterfelder { flex-wrap: wrap; } .jt-auswertung-filter .jt-auswertung-knoepfe { margin-left: 0; } }
@media (max-width: 1100px) { .jt-auswertung-filter .jt-auswertung-filterfelder .jt-feld { flex: 1 1 150px; } }
@media (max-width: 640px) { .jt-auswertung-filter .jt-auswertung-filterfelder .jt-feld { flex: 1 1 100%; } .jt-auswertung-filter .jt-auswertung-filterfelder { flex-basis: 100%; } }

/* Stoerung (Pause wegen Maschinendefekt): rot, auch am Schritt und auf der Werkstattkarte */
.jt-belegt-badge.jt-badge-stoerung { background: var(--jt-rot-hell); color: var(--jt-rot-dunkel); border-bottom-color: #f6c9cf; }
.jt-belegt-badge.jt-badge-stoerung::before { color: var(--jt-rot); }
.jt-status-stoerung { background: var(--jt-rot-hell); color: var(--jt-rot-dunkel); }

/* Aufklappzeile der Position: eigener Pfeil (display:flex nimmt dem summary das Dreieck) */
.jt-auswertung-position > summary { list-style: none; position: relative; padding-left: 22px; cursor: pointer; }
.jt-auswertung-position > summary::-webkit-details-marker { display: none; }
.jt-auswertung-position > summary::before { content: ""; position: absolute; left: 2px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--jt-grau); border-bottom: 2px solid var(--jt-grau); transform: rotate(-45deg); transition: transform .15s; }
.jt-auswertung-position[open] > summary::before { transform: rotate(45deg); margin-top: -8px; }
/* Mehr-Menue der Filterleiste auf Tablet und Telefon unten fest */
@media (max-width: 1100px) { .jt-auswertung-knoepfe .jt-mehr-menue { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-width: none; bottom: 12px; } }

/* Auswertung: breite Tabellen (Arbeitsgaenge, Zeitabschnitte) brechen Koepfe um und werden kompakter,
   damit auch am Desktop und Tablet kein waagerechtes Scrollen noetig ist. */
table.jt-tabelle.jt-auswertung-schritte, table.jt-tabelle.jt-auswertung-abschnitte { table-layout: auto; }
table.jt-tabelle.jt-auswertung-schritte th, table.jt-tabelle.jt-auswertung-abschnitte th { white-space: normal; letter-spacing: .02em; font-size: 10px; padding: 8px 8px; vertical-align: bottom; line-height: 1.25; }
table.jt-tabelle.jt-auswertung-schritte td, table.jt-tabelle.jt-auswertung-abschnitte td { padding: 10px 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.jt-auswertung-schritte td:first-child { min-width: 150px; }
.jt-auswertung-schritte .jt-artpunkt, .jt-auswertung-abschnitte .jt-artpunkt { margin-right: 5px; }
.jt-auswertung-detailzeile > td { padding-left: 0; padding-right: 0; }
.jt-auswertung-detailzeile details { max-width: 100%; }
.jt-auswertung-detailzeile .jt-tabelle { margin-top: 8px; }

/* Tablet im Hochformat: die breiten Auswertungstabellen werden wie am Telefon zu Karten (kein seitliches Scrollen). */
@media (max-width: 900px) {
    table.jt-auswertung-schritte, table.jt-auswertung-schritte > tbody, table.jt-auswertung-schritte tr, table.jt-auswertung-schritte td,
    table.jt-auswertung-abschnitte, table.jt-auswertung-abschnitte > tbody, table.jt-auswertung-abschnitte tr, table.jt-auswertung-abschnitte td { display: block; width: 100%; }
    table.jt-auswertung-schritte tr:has(> th), table.jt-auswertung-abschnitte tr:has(> th) { display: none; }
    table.jt-auswertung-schritte > tbody > tr:not(.jt-auswertung-detailzeile), table.jt-auswertung-abschnitte tr { border: 1px solid var(--jt-rand); border-radius: var(--jt-r); margin: 0 0 10px; padding: 4px 12px; }
    table.jt-auswertung-schritte td[data-label], table.jt-auswertung-abschnitte td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; text-align: right; }
    table.jt-auswertung-schritte td[data-label]::before, table.jt-auswertung-abschnitte td[data-label]::before { content: attr(data-label); font-weight: 600; color: #666; text-align: left; flex-shrink: 0; }
    table.jt-auswertung-abschnitte td[data-label="Art"] .jt-artpunkt { margin: 0 6px 0 auto; }
    table.jt-auswertung-schritte td[data-label="Arbeitsgang"] { display: block; text-align: left; }
    table.jt-auswertung-schritte td[data-label="Arbeitsgang"]::before { content: none; }
}

/* ---- Reihenfolge der Maschinen (1.14.0) ------------------------------------ */
/* Umschalter "Eigene Reihenfolge | Nach Name" ueber der Uebersicht und die
   Knoepfe zum Verschieben im Namensfeld jeder Zeile. Alles bleibt Links bzw.
   kleine Formulare; die Knoepfe sind fuer das Tablet mindestens 44 px breit. */
/* Nach dem Verschieben springt die Seite an die Zeile der Maschine (#maschine-<id>); die Kopfzeile ist
   fest angeheftet, wie bei den Positionen bleibt oben Platz dafuer. */
[id^="maschine-"] { scroll-margin-top: calc(var(--jt-header-hoehe, 70px) + 12px); }
.jt-reihenfolge-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.jt-reihenfolge-text { font-size: 13px; font-weight: 700; margin-right: 2px; }
.jt-reihenfolge-hinweis { font-size: 12px; color: var(--jt-grau); }
.jt-maschine-schieben { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.jt-maschine-schieben .jt-btn { padding: 6px 10px; min-width: 44px; min-height: 44px; }

/* ---- Schnelle Anmeldung: zuletzt benutzte Adressen (1.14.0) ---------------- */
.jt-login-chips { margin: 0 0 16px; }
.jt-login-chips[hidden] { display: none; }
.jt-login-chips-titel { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.jt-login-chips-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.jt-login-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--jt-rand-stark); border-radius: var(--jt-r); background: #fff; overflow: hidden; }
.jt-login-chip button { font: inherit; background: transparent; border: 0; cursor: pointer; min-height: 44px; color: inherit; }
.jt-login-chip-name { padding: 0 12px; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.jt-login-chip-x { min-width: 44px; border-left: 1px solid var(--jt-rand); font-size: 20px; color: var(--jt-grau); }
.jt-login-chip button:hover { background: var(--jt-seite); }

/* Listen ohne Aufzaehlungspunkte (Vorrichtungen zuordnen/abziehen, 2.3.0) */
.jt-liste-schlicht { list-style: none; margin: 6px 0 12px; padding: 0; }
.jt-liste-schlicht > li { margin: 0 0 8px; }

/* ---- Stempelstelle (2.3.0) ------------------------------------------------- */
/* Das Terminal: eine eigene Vollbildseite ohne Kopfzeile und Menue (templates/stempelstelle.html). Der Hintergrund zeigt den Zustand:
   dunkel in Ruhe, gruen nach einer Buchung, blau bei einer Info, teal bei der Wahl, dunkelrot bei einem Fehler. */
body.jt-kiosk-seite { padding-top: 0; background: var(--jt-schwarz); color: #fff; }
html:has(body.jt-kiosk-seite) { background: var(--jt-schwarz); }
.jt-kiosk { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
            padding: 24px 16px; text-align: center; background: var(--jt-schwarz); color: #fff; transition: background 0.15s; }
.jt-kiosk[data-ton="ok"] { background: #0e6b2d; }
.jt-kiosk[data-ton="info"] { background: var(--jt-blau); }
.jt-kiosk[data-ton="wahl"] { background: var(--jt-petrol); }
.jt-kiosk[data-ton="fehler"] { background: #7a0010; }
/* Ruheansicht (Vorschlag A "Leuchtring", Alex 23.10.2026): schwarz mit rotem Leuchten unten, roter Balken oben, die Uhr oben, in der Mitte ein Ring um das Logo, an dem
   der Chip vorgehalten wird. Masseinheit --u ist 1vmin (die kleinere Seite des Bildschirms): Hoch- und Querformat ergeben dasselbe Bild. */
.jt-kiosk { --u: 1vmin; }
.jt-kiosk[data-ton="ruhe"] { background: radial-gradient(ellipse 95% 55% at 50% 118%, rgba(221, 0, 26, 0.42), transparent 66%), var(--jt-schwarz); }
.jt-kiosk[data-ton="ruhe"]::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: calc(var(--u) * 1.4); background: var(--jt-rot); }
.jt-kiosk-uhr { font-size: calc(var(--u) * 13); font-weight: 700; line-height: 1; letter-spacing: 0.02em; }
.jt-kiosk-datum { font-size: calc(var(--u) * 3.4); opacity: 0.85; margin-top: calc(var(--u) * 1.2); }
.jt-kiosk-datum::after { content: ''; display: block; width: calc(var(--u) * 11); height: calc(var(--u) * 0.7); background: var(--jt-rot); margin: calc(var(--u) * 2) auto 0; }
.jt-kiosk-ruhe { position: relative; width: 100%; flex: 1 1 auto; min-height: calc(100dvh - 48px); }
.jt-kiosk-zeit { position: absolute; top: calc(var(--u) * 5); left: 0; right: 0; }
.jt-kiosk-feld { position: absolute; top: 61%; left: 50%; transform: translate(-50%, -50%); width: calc(var(--u) * 50); aspect-ratio: 1 / 1; box-sizing: border-box;
                 border: calc(var(--u) * 1) solid var(--jt-rot); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 2.4);
                 box-shadow: 0 0 0 calc(var(--u) * 2.2) rgba(221, 0, 26, 0.18), 0 0 0 calc(var(--u) * 4.6) rgba(221, 0, 26, 0.08), 0 0 calc(var(--u) * 14) rgba(221, 0, 26, 0.5);
                 background: radial-gradient(circle, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.01) 72%); }
.jt-kiosk-logo { position: relative; width: 82%; height: auto; }
.jt-kiosk-feld .jt-kiosk-hinweis { position: relative; margin: 0; font-size: calc(var(--u) * 4.6); font-weight: 600; max-width: 9em; }
/* ruhige Wellen vom Ring nach aussen (aus bei "Bewegung reduzieren") */
.jt-kiosk-welle { position: absolute; inset: calc(var(--u) * -1); border: calc(var(--u) * 0.5) solid var(--jt-rot); border-radius: 50%; opacity: 0; pointer-events: none;
                  animation: jt-kiosk-welle 4.2s ease-out infinite; }
.jt-kiosk-welle-2 { animation-delay: 2.1s; }
@keyframes jt-kiosk-welle { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jt-kiosk-welle { animation: none; } }
.jt-kiosk-hinweis { margin: 12px 0 0; font-size: clamp(18px, 4.5vw, 28px); max-width: 28em; overflow-wrap: anywhere; }
.jt-kiosk-titel { margin: 0; font-size: clamp(26px, 6vw, 40px); color: #fff; }
.jt-kiosk-anzeige { width: 100%; max-width: 640px; }
.jt-kiosk-anzeige[hidden], .jt-kiosk-ruhe[hidden] { display: none; }
.jt-kiosk-name { margin: 0 0 8px; font-size: clamp(36px, 10vw, 72px); line-height: 1.1; overflow-wrap: anywhere; color: #fff; }
.jt-kiosk-text { margin: 0 0 16px; font-size: clamp(20px, 5vw, 34px); overflow-wrap: anywhere; }
.jt-kiosk-wahl { display: flex; flex-direction: column; gap: 14px; }
.jt-kiosk .jt-btn.jt-kiosk-knopf { min-height: 96px; font-size: clamp(22px, 6vw, 36px); background: #fff; color: var(--jt-schwarz); border-color: #fff; }
.jt-kiosk .jt-btn.jt-kiosk-knopf:hover { background: #e9e9e9; border-color: #e9e9e9; color: var(--jt-schwarz); }
.jt-kiosk-meldung { margin: 0; padding: 10px 14px; border-radius: var(--jt-r); background: #7a0010; max-width: 28em; overflow-wrap: anywhere; }
.jt-kiosk-formular { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; }
.jt-kiosk-label { font-size: 14px; opacity: 0.85; }
.jt-kiosk-code { font-size: 28px; text-align: center; letter-spacing: 0.15em; text-transform: uppercase; padding: 10px; border-radius: var(--jt-r); border: 2px solid #fff; background: #fff; color: var(--jt-schwarz); }
/* Das Eingabefeld des Lesers: immer fokussiert, aber nicht zu sehen (kein display:none - ein verstecktes Feld bekommt keine Tasten). */
.jt-kiosk-versteckt { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.jt-kiosk-demo { margin-top: 24px; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 420px; }
.jt-kiosk-demo input { font-size: 20px; padding: 10px; border-radius: var(--jt-r); border: 2px solid #fff; background: #fff; color: var(--jt-schwarz); text-align: center; }
/* Verwaltungsseite: der Kopplungscode gross und eindeutig lesbar */
.jt-code { font-size: 32px; font-weight: 700; letter-spacing: 0.15em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.jt-abschnitt { margin-top: 32px; }
