﻿/* ==========================================================================
   Praxisverwaltung Ergotherapie Grumbach - Gestaltung seit 12.11.2026
   (Neugestaltung "moderner und aufgeräumter", Augustin).

   Grundsatz: Die Seiten bleiben, wie sie sind - Markup, IDs, Skripte. Was sich
   ändert, kommt von hier und aus MasterPage/AddMenu:
   - Kopfzeile weiß, Seitenleiste hell mit Gruppen, Inhalt auf grauem Grund.
   - panelHeader + panelContent (auf allen 15 gerahmten Seiten) werden zu
     einer weißen Karte mit Titelzeile statt des blauen Balkens.
   - Eingaben und Schaltflächen bekommen ein einheitliches Maß. Die Regeln für
     Schaltflächen und Felder stehen in :where() und haben damit die
     Spezifität 0 - jede Regel einer Seite (Symbolknöpfe in Tabellen, Breiten,
     Farben) gewinnt weiterhin.
   Die Tabellenregeln Augustins (16.09.2026) gelten unverändert: Kopfzeilen
   fett mit grauer Trennlinie, kein farbiger Kopf, Einträge nicht fett, Stift
   vorn mit 18 px Abstand - das regeln die Seiten selbst.
   ========================================================================== */

:root {
    --hausfarbe: #0085AD;          /* Hausblau der Praxis, wie Website und Mails */
    --hausfarbe-dunkel: #006B8C;
    --hausfarbe-hell: #E6F3F7;
    --hausfarbe-hauch: #F2F9FB;
    --text: #1F2A33;
    --text-leise: #5C6B77;
    --linie: #E3E8EC;
    --linie-feld: #C9D3DA;
    --grund: #F3F6F8;
    --karte: #FFFFFF;
    --rot: #B42318;
    --rot-hell: #FDECEA;
    --radius: 10px;
    --radius-klein: 6px;
    --schatten: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --kopf: 64px;
    --leiste: 240px;
    --rand: 20px;
    --schrift: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    height: 100%;
    width: 100%;
}

body {
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    font-size: 13.5px;
    line-height: 1.45;
    font-family: var(--schrift);
    color: var(--text);
    background: var(--grund);
    overflow: hidden;              /* die Inhaltskarten scrollen selbst (windowResize der Seiten) */
    -webkit-font-smoothing: antialiased;
}

a { color: var(--hausfarbe-dunkel); }

.page {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* --- Kopfzeile ----------------------------------------------------------- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    height: var(--kopf);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 var(--rand) 0 16px;
    background: var(--karte);
    border-bottom: 1px solid var(--linie);
}

.headerLogo { display: flex; align-items: center; }
.headerLogo img { height: 44px; width: auto; display: block; }

.headerText {
    display: flex;
    align-items: center;
    padding-left: 14px;
    border-left: 1px solid var(--linie);
    height: 28px;
}

.headerTitel {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-leise);
    letter-spacing: .01em;
}

.headerLogin {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    color: var(--text);
}

.benutzer { display: flex; align-items: center; gap: 10px; }

.benutzerKreis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hausfarbe-hell);
    color: var(--hausfarbe-dunkel);
    font-weight: 600;
    font-size: 12.5px;
}

.benutzerName { font-weight: 500; }

/* Abmelden/Anmelden als ruhige Schaltfläche */
a.linkHeader:link, a.linkHeader:visited {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--linie-feld);
    border-radius: var(--radius-klein);
    color: var(--text);
    text-decoration: none;
    background: var(--karte);
    line-height: 1.2;
}
a.linkHeader:hover { background: var(--grund); color: var(--text); }
a.linkHeader:active { color: var(--text); }

/* Hinweis "N Protokolle warten auf Ihre Bestätigung" (seit 15.09.2026) - als Pille */
.hinweisOffen { color: var(--rot); font-weight: bold; }
a.hinweisOffen:link, a.hinweisOffen:visited {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--rot-hell);
    color: var(--rot);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
a.hinweisOffen:hover { text-decoration: underline; }

.menuSchalter {
    display: none;
    border: 0;
    background: none;
    padding: 6px;
    margin: 0 -4px 0 0;
    cursor: pointer;
    color: var(--text);
    border-radius: var(--radius-klein);
}
.menuSchalter svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; display: block; }
.menuSchalter:hover { background: var(--grund); }

/* --- Seitenleiste -------------------------------------------------------- */

.menu {
    position: fixed;
    top: var(--kopf);
    bottom: 0;
    left: 0;
    z-index: 20;
    width: var(--leiste);
    box-sizing: border-box;
    padding: 8px 12px 24px 12px;
    background: var(--karte);
    border-right: 1px solid var(--linie);
    overflow-y: auto;
}

.menuGruppe {
    margin: 18px 10px 6px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8A97A1;
}
.menuGruppe:first-child { margin-top: 10px; }

a.menuEintrag {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    margin: 1px 0;
    border-radius: 8px;
    color: #3A4752;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}
a.menuEintrag:hover { background: var(--grund); color: var(--text); }
a.menuEintrag.aktiv { background: var(--hausfarbe-hell); color: var(--hausfarbe-dunkel); font-weight: 600; }
a.menuEintrag.aktiv::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--hausfarbe);
}

svg.menuSymbol {
    width: 19px;
    height: 19px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .85;
}
a.menuEintrag.aktiv svg.menuSymbol { opacity: 1; }

/* Roter Zähler am Menüpunkt (seit 12.11.2026): offene Protokolle bzw. Anfragen. */
.menuZaehler {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #D92D20;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.menuSchleier { display: none; }

/* --- Inhalt -------------------------------------------------------------- */

.content {
    display: block;
    box-sizing: border-box;
    margin-top: var(--kopf);
    margin-left: var(--leiste);
    padding: var(--rand) var(--rand) 0 var(--rand);
    min-width: 16em;
    overflow: hidden;
}

/* Die Überschrift der MasterPage füllt bisher keine Seite (cphHeadline) - leer
   nähme sie nur Platz über der ersten Karte weg. Wer sie nutzt, nimmt das hier heraus. */
.content > h1 { display: none; }
/* Eine Leerzeile direkt am Anfang ist nur Abstand zu einer ausgeblendeten Karte
   (Anfrage-Detail blendet den Filter aus) - sonst entstünde oben eine Lücke. */
.content > h1 + br { display: none; }

.footer { display: none; }

/* --- Karten: panelHeader (Titel) + panelContent (Inhalt) ------------------ */

div.panelHeader,
div.panelContent {
    box-sizing: border-box;
    background: var(--karte);
    border: 1px solid var(--linie);
    width: 100%;
}

div.panelHeader {
    border-bottom: 1px solid var(--linie);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 10px 14px 9px 14px;
}

div.panelContent {
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--schatten);
    /* Innenabstand der Karte (Augustin, 12.11.2026: "an den Rand geklatscht"):
       Tabellentext steht damit bündig mit dem Kartentitel (10 + 6 px Zellabstand
       = 16 px). Gilt für alle Listen gleich, also rückt auch die Stift-Spalte
       überall um dasselbe Maß ein - die Abstände untereinander bleiben gleich. */
    padding: 6px 10px;
}

/* Filterkarten hatten feste Höhen für die alten 20-px-Felder (42 px, 145 px);
   mit dem neuen Feldmaß würden sie überlaufen. */
div.panelContent[id$="_panFilter"] { height: auto !important; }
/* Filter als Leiste (Augustin, 12.11.2026 abends: "Filterbereiche moderner"):
   Beschriftung klein und grau ÜBER dem Feld, die Felder nebeneinander statt
   untereinander. Rein über CSS - die Seiten bauen ihre Filter weiter als
   Tabelle mit je einer Zeile "Beschriftung | Feld" (Markup, IDs und
   AutoPostBack unverändert). Jede Zeile wird zur Spalte, der tbody zur
   umbrechenden Leiste; auf dem Handy brechen die Felder von selbst um.
   Bis dahin: Beschriftung links mit 200 px, Feld über die halbe Breite. */
div.panelContent[id$="_panFilter"] > div {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 24px;
    padding: 8px 6px !important;
}
/* Buchungsliste: die beiden Hälften (50 %, float) werden Teil der Leiste. */
div.panelContent[id$="_panFilter"] div[id$="_panFilterLeft"],
div.panelContent[id$="_panFilter"] div[id$="_panFilterRight"] { width: auto !important; float: none !important; }
div.panelContent[id$="_panFilter"] div[id$="_panFilterLeft"] > div,
div.panelContent[id$="_panFilter"] div[id$="_panFilterRight"] > div { padding-right: 0 !important; }
div.panelContent[id$="_panFilter"] table { width: auto !important; max-width: 100%; }
div.panelContent[id$="_panFilter"] table > tbody {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 20px;
}
div.panelContent[id$="_panFilter"] table > tbody > tr { display: flex; flex-direction: column; gap: 6px; }
div.panelContent[id$="_panFilter"] table > tbody > tr > td { display: block; width: auto !important; padding: 0; }
div.panelContent[id$="_panFilter"] table > tbody > tr > td:first-child {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-leise);
    white-space: nowrap;
}
div.panelContent[id$="_panFilter"] table > tbody > tr > td:first-child > span { width: auto !important; }
/* Felder so breit wie ihr Inhalt, mindestens 190 px (die Seiten setzen width:100%). */
div.panelContent[id$="_panFilter"] select,
div.panelContent[id$="_panFilter"] input[type="text"] { width: auto !important; min-width: 170px; max-width: 280px; }

/* Datumsfeld mit Kalenderknopf (Scripts/eingabe.js, data-datum - seit 13.11.2026 statt des
   CalendarExtender aus dem AjaxControlToolkit). Das Textfeld bleibt zum Tippen; der Knopf öffnet
   die Datumsauswahl des Browsers über ein unsichtbares Datumsfeld direkt daneben. */
.datumRahmen { position: relative; display: flex; align-items: stretch; gap: 6px; max-width: 100%; }
/* Nicht wachsen, nur schrumpfen: Das Feld behält die Breite der Seite (100 % in Buchen,
   120 px in der Dienstberatung) und macht dem Knopf Platz. */
.datumRahmen > input[type="text"] { flex: 0 1 auto; min-width: 0; }
button.datumKnopf {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid var(--linie-feld);
    border-radius: 8px;
    background: var(--karte);
    color: var(--hausfarbe-dunkel);
}
button.datumKnopf:hover { border-color: var(--hausfarbe); background: var(--hausfarbe-hauch); }
button.datumKnopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
input.datumWahl { position: absolute; right: 0; bottom: 0; width: 36px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* Ablagefläche für Dateien (Beleg in Buchen, CSV im Import - seit 12.11.2026). Das Dateifeld der
   Upload-Steuerung liegt unsichtbar über der ganzen Fläche: Klick öffnet die
   Auswahl, eine hineingezogene Datei landet direkt darin. */
.belegVorhanden { padding: 6px 0 8px 0; }
.dateiAblage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: 520px;
    min-height: 120px;
    padding: 16px;
    box-sizing: border-box;
    border: 2px dashed var(--linie-feld);
    border-radius: var(--radius);
    background: var(--hausfarbe-hauch);
    color: var(--text-leise);
    text-align: center;
    transition: border-color .12s, background-color .12s;
}
.dateiAblage svg { width: 30px; height: 30px; fill: none; stroke: var(--hausfarbe); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dateiAblageText strong { color: var(--hausfarbe-dunkel); }
.dateiAblageHinweis { font-size: 12px; }
.dateiAblage:hover, .dateiAblage.ziehen { border-color: var(--hausfarbe); background: var(--hausfarbe-hell); }
.dateiAblage.laedt, .dateiAblage.gewaehlt { border-style: solid; border-color: var(--hausfarbe); }
.dateiAblage.gewaehlt .dateiAblageHinweis { color: var(--hausfarbe-dunkel); font-weight: 600; }
.dateiAblage input[type="file"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer;
    z-index: 2;
}

/* Kennzahlen (Summen der Buchungsliste, seit 12.11.2026) */
.kennzahlen { display: flex; flex-wrap: wrap; gap: 12px; }
.kennzahl {
    flex: 1 1 110px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    background: var(--hausfarbe-hauch);
}
.kennzahlTitel { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-leise); }
.kennzahlWert { font-size: 20px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kennzahl.plus .kennzahlWert { color: #1E7B34; }
.kennzahl.minus .kennzahlWert { color: var(--rot); }
.kennzahl.gesamt { background: var(--karte); border-color: var(--linie-feld); }

td.panelHeaderTableCellText,
td.panelHeaderTableCellTextLower {
    background: transparent;
    height: auto;
    padding: 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    vertical-align: middle !important;
}

td.panelHeaderTableCellImage,
td.panelHeaderTableCellButtons {
    background: transparent;
    height: auto;
    padding: 0 2px;
    vertical-align: middle !important;
}

/* Blätter-Pfeile und "Heute" in Arbeitszeit und Urlaubsplanung: vorher weiß
   auf dem blauen Balken. */
div.panelHeader .azKopfNav a,
div.panelHeader .upKopfNav a {
    color: var(--hausfarbe-dunkel);
    font-weight: 600;
    padding: 3px 8px;
    margin: 0 1px;
    border-radius: var(--radius-klein);
    text-decoration: none;
}
div.panelHeader .azKopfNav a:hover,
div.panelHeader .upKopfNav a:hover { background: var(--hausfarbe-hell); text-decoration: none; }

/* Symbolknöpfe in der Titelzeile (Krank, Urlaub, ... erfassen): die Symbole
   sind weiß für den alten Balken - hier dunkel umgefärbt, mit Schaltflächenfläche. */
div.panelHeader input[type="image"] {
    box-sizing: content-box;
    padding: 5px;
    border-radius: var(--radius-klein);
    vertical-align: middle;
    cursor: pointer;
}
div.panelHeader input[type="image"][src*="_White"] { filter: brightness(0); opacity: .62; }
div.panelHeader input[type="image"]:hover { background: var(--hausfarbe-hell); opacity: 1; }
div.panelHeader input[type="image"][src*="_White"]:hover {
    /* weiß -> Hausblau. Ohne Fläche: Der Filter färbt auch den Hintergrund,
       die helle Fläche würde sonst zum vollen blauen Quadrat (Augustin, 12.11.2026). */
    background: none;
    filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1588%) hue-rotate(169deg) brightness(91%) contrast(101%);
}

/* --- Kopfzeilen der Karten als Leiste (Augustin, 12.11.2026 abends: "Listen-
   kopfzeilen moderner"). Die Seiten bauen den Kopf als Tabelle (Titel | Navi |
   je Symbol eine Zelle mit fester Breite). Hier wird die Zeile zur Flexleiste:
   Titel nimmt den Platz, alles Weitere rückt rechts mit gleichem Abstand
   zusammen und bricht auf dem Handy unter den Titel statt den Titel zu quetschen. */
div.panelHeader { padding: 12px 16px 11px 16px; }
div.panelHeader > table > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
div.panelHeader > table > tbody > tr > td { display: block; width: auto !important; padding: 0; }
div.panelHeader > table > tbody > tr > td:first-child { flex: 1 1 auto; min-width: 0; padding-right: 10px; }
/* Symbolknöpfe (ImageButtons): die Fläche liegt auf der Zelle, weil der Filter,
   der die weißen Symbole umfärbt, sonst auch Rand und Fläche umfärben würde. */
div.panelHeader td:has(> input[type="image"]) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid var(--linie-feld);
    border-radius: 8px;
    background: var(--karte);
    transition: border-color .12s, background-color .12s;
}
div.panelHeader td:has(> input[type="image"]):hover { border-color: var(--hausfarbe); background: var(--hausfarbe-hauch); }
div.panelHeader td:has(> input[type="image"]) > input[type="image"] { padding: 0; margin: 0; }
div.panelHeader td:has(> input[type="image"]) > input[type="image"]:hover { background: none; }
/* Blätter-Navigation als zusammenhängende Knopfgruppe ◀ | Heute | ▶. */
div.panelHeader :is(.azKopfNav, .upKopfNav) { display: flex !important; align-items: center; margin-right: 6px; }
div.panelHeader :is(.azKopfNav, .upKopfNav) > :is(a, span) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    box-sizing: border-box;
    margin: 0 0 0 -1px;
    padding: 0 10px;
    border: 1px solid var(--linie-feld);
    border-radius: 0;
    background: var(--karte);
    font-size: 13px;
}
div.panelHeader :is(.azKopfNav, .upKopfNav) > :first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
div.panelHeader :is(.azKopfNav, .upKopfNav) > :last-child { border-radius: 0 8px 8px 0; }
div.panelHeader :is(.azKopfNav, .upKopfNav) a:hover { position: relative; border-color: var(--hausfarbe); background: var(--hausfarbe-hauch); }
/* Grenze erreicht (vor 2024, nach dem Folgejahr): Pfeil als Span, ausgegraut. */
div.panelHeader :is(.azKopfNav, .upKopfNav) > span { margin: 0 0 0 -1px !important; color: #C3CCD3; }

/* Kennzahlen der Buchungsliste stehen seit der Filterleiste rechts in der Leiste,
   fest nebeneinander (vorher brachen sie bei Inhaltsbreite auf zwei Zeilen um). */
/* flex: none - sonst stauchte die Leiste sie statt sie umzubrechen, und der Rest lief rechts aus der Karte. */
div.panelContent[id$="_panFilter"] div[id$="_panFilterRight"] { margin-left: auto; flex: none; max-width: 100%; }
div.panelContent[id$="_panFilter"] .kennzahlen { flex-wrap: nowrap; }
div.panelContent[id$="_panFilter"] .kennzahl { flex: 0 0 auto; min-width: 128px; padding: 9px 14px; }
div.panelContent[id$="_panFilter"] .kennzahlWert { font-size: 18px; }

/* --- Filter mit Ansichtskacheln (Arbeitszeit, seit 12.11.2026) ------------
   Links die Auswahllisten, rechts daneben je Ansicht eine Kachel mit Symbol. */

.filterMitAnsicht {
    display: flex;
    align-items: flex-end;         /* seit der Filterleiste (12.11.2026 abends) bündig mit der Feldunterkante */
    flex-wrap: wrap;
    gap: 16px 28px;
}

table.filterFelder { max-width: 100%; }   /* bis zur Filterleiste fest 620 px */

.ansichtWahl { display: flex; gap: 10px; }

button.ansichtKachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 92px;                   /* seit der Filterleiste flacher: 104 x 84 -> 92 x 58, */
    height: 58px;                  /* so hoch wie Beschriftung + Feld daneben */
    padding: 6px;
    font-size: 12.5px;
    border: 1px solid var(--linie-feld);
    border-radius: var(--radius);
    background: var(--karte);
    color: var(--text-leise);
    font-weight: 600;
}
button.ansichtKachel svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
button.ansichtKachel:hover { border-color: var(--hausfarbe); color: var(--hausfarbe-dunkel); background: var(--hausfarbe-hauch); }
button.ansichtKachel.aktiv {
    border-color: var(--hausfarbe);
    background: var(--hausfarbe-hell);
    color: var(--hausfarbe-dunkel);
    box-shadow: inset 0 0 0 1px var(--hausfarbe);
    cursor: default;
}

/* Kleine Schaltflächen mit Symbol in der Titelzeile einer Karte (Downloads der
   Buchungsliste, seit 12.11.2026). */
button.kopfKnopf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    margin-left: 6px;
    padding: 4px 11px 4px 9px;
    border: 1px solid var(--linie-feld);
    background: var(--karte);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
button.kopfKnopf svg { width: 17px; height: 17px; fill: none; stroke: var(--hausfarbe); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
button.kopfKnopf:hover { border-color: var(--hausfarbe); background: var(--hausfarbe-hauch); color: var(--hausfarbe-dunkel); }

/* --- Eingaben und Schaltflächen (Spezifität 0, siehe oben) ---------------- */

input, select, textarea {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
}

:where(input[type="text"], input[type="password"], input[type="number"], input[type="date"],
       input[type="time"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], input:not([type]), select, textarea) {
    min-height: 36px;              /* 12.11.2026 abends: 32 -> 36 px, Formulare luftiger (Augustin) */
    padding: 7px 11px;
    border: 1px solid var(--linie-feld);
    border-radius: 8px;
    background-color: #FCFDFE;
    color: var(--text);
    line-height: 1.3;
    transition: border-color .12s, box-shadow .12s, background-color .12s;
}
:where(input[type="text"], input[type="password"], input[type="number"], input[type="date"],
       input[type="time"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], input:not([type]), select, textarea):hover {
    border-color: #AEBBC5;
}
:where(input, select, textarea)::placeholder { color: #9AA6B0; }

:where(textarea) { line-height: 1.45; }

:where(input[type="text"], input[type="password"], input[type="number"], input[type="date"],
       input[type="time"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], input:not([type]), select, textarea):focus {
    outline: none;
    border-color: var(--hausfarbe);
    background-color: var(--karte);
    box-shadow: 0 0 0 3px rgba(0, 133, 173, .18);
}

:where(input, select, textarea):disabled { background-color: var(--grund); color: var(--text-leise); }

select option { background-color: var(--karte); text-shadow: none; }

:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--hausfarbe); }

/* Schaltflächen: ruhig (Hausblau hell), Speichern/Anmelden kräftig, Löschen rot. */
:where(input[type="submit"], input[type="button"], button) {
    min-height: 36px;
    padding: 7px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--hausfarbe-hell);
    color: var(--hausfarbe-dunkel);
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .12s, border-color .12s, color .12s;
}
:where(input[type="submit"], input[type="button"], button):hover { background: #D3EAF1; }
:where(input[type="submit"], input[type="button"], button):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 133, 173, .25);
}
:where(input[type="submit"], input[type="button"], button):disabled { opacity: .55; cursor: default; }

/* Hauptaktion nach Beschriftung - so bleibt das Markup der Seiten unberührt. */
:where(input[type="submit"], input[type="button"]):where([value*="peichern"], [value="Anmelden"], [value*="bernehmen"],
       [value="Freigeben"], [value^="Einlesen"], [value*="bestätige"], [value*="Bestätige"], [value="OK"], [value^="Buchen"]) {
    background: var(--hausfarbe);
    color: #fff;
}
:where(input[type="submit"], input[type="button"]):where([value*="peichern"], [value="Anmelden"], [value*="bernehmen"],
       [value="Freigeben"], [value^="Einlesen"], [value*="bestätige"], [value*="Bestätige"], [value="OK"], [value^="Buchen"]):hover {
    background: var(--hausfarbe-dunkel);
}
:where(input[type="submit"], input[type="button"]):where([value*="öschen"], [value*="ntfernen"], [value="Ablehnen"]) {
    background: var(--rot-hell);
    color: var(--rot);
}
:where(input[type="submit"], input[type="button"]):where([value*="öschen"], [value*="ntfernen"], [value="Ablehnen"]):hover {
    background: #F9D7D3;
}

/* Hauptaktion per Klasse, wo die Beschriftung keine der obigen ist ("Link anfordern"). */
input.knopfHauptSeite { background: var(--hausfarbe); color: #fff; }
input.knopfHauptSeite:hover { background: var(--hausfarbe-dunkel); }

/* Symbolknöpfe (ein Bild als Inhalt, z. B. Stift in den Modelltabellen) bleiben schlicht. */
:where(button:has(> img)) {
    min-height: 0;
    padding: 2px;
    background: transparent;
    border-radius: 4px;
}
:where(button:has(> img)):hover { background: var(--hausfarbe-hell); }

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

table.TableInput { width: 100%; }
tr.TableRowInput { width: auto; }
td.TableCellInputLabel { width: 200px; }
td.TableCellInputValue { width: auto; }

/* Formulare (Augustin, 12.11.2026 abends: "auch moderner gestalten"): Beschriftung
   grau und auf Feldmitte, mehr Luft zwischen den Zeilen - wie das Kursformular
   (table.dbDetail). Nur oben/unten, die Seiten behalten ihre Breiten. */
body table.TableInput { border-collapse: separate; border-spacing: 0; }
body td.TableCellInputLabel {
    color: var(--text-leise);
    font-weight: 500;
    vertical-align: top;
    padding-top: 13px;
    padding-bottom: 6px;
    padding-right: 16px;
}
body td.TableCellInputValue {
    vertical-align: top;
    padding-top: 5px;
    padding-bottom: 5px;
}
/* Abschnittstitel in Formularen (Mitarbeiter, Dienstberatung, Kurse): ohne harte
   schwarze Linie, etwas größer, mehr Abstand nach oben. */
body :is(.maAbschnitt, .dbAbschnitt) {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding-top: 22px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--linie);
    margin-bottom: 10px;
}

/* Kopfzeilen fett mit grauer Trennlinie (Augustin, 16.09.2026) - nur weicher. */
td.TableCellWithBottomBorder,
td.TableCellWithBottomBorderRed,
td.TableCellWithBottomBorderGreen {
    border-bottom: 1px solid var(--linie);
}
td.TableCellWithBottomBorderRed { color: var(--rot); }
td.TableCellWithBottomBorderGreen { color: #1E7B34; }

/* Zeilen der Listen leicht hervorheben, wenn die Maus darüber steht. */
table[class$="Liste"] > tbody > tr:hover > td,
table[class$="liste"] > tbody > tr:hover > td,
tr.tablerow:hover > td { background-color: var(--hausfarbe-hauch); }

/* Listentabellen leiser und luftiger (Augustin, 12.11.2026: "wirken alle sehr
   kompakt und durch die schwarze Schrift sehr dominant"). Kopfzeile bleibt fett
   mit grauer Trennlinie und ohne Hintergrund, nur kleiner und grau; Einträge in
   Schiefergrau statt Fast-Schwarz, mehr Zeilenhöhe, feinere Linien.
   Spezifität (0,1,3) mit "body": schlägt die Grundregeln der Seiten
   (table.x td = 0,1,2), aber nicht deren Zustandsregeln (tr.entwurf td,
   td.datum, td.stift = 0,2,x) - Farben für erledigt/Wochenende und der
   Stiftabstand von 18 px bleiben Sache der Seiten. Links und rechts wird hier
   kein Innenabstand gesetzt, nur oben und unten. */
body :is(table.dbListe, table.maListe, table.maTabelle, table.ukTabelle,
         table.azListe, table.dbKenntnis, table.dbPunkte, table.bhListe) th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-leise);
    background: none;
    padding-top: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--linie-feld);
}
body :is(table.dbListe, table.maListe, table.maTabelle, table.ukTabelle,
         table.azListe, table.dbKenntnis, table.dbPunkte, table.bhListe) td {
    color: #3D4650;
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid #EDF1F4;
    font-variant-numeric: tabular-nums;
}
body :is(table.dbListe, table.maListe, table.maTabelle, table.ukTabelle,
         table.azListe, table.dbKenntnis, table.dbPunkte, table.bhListe) td a {
    color: inherit;
}
/* Buchungsliste: Rot/Grün der Bestandsklassen gegen die Regel oben halten. */
body table.bhListe td.TableCellWithBottomBorderRed { color: var(--rot); }
body table.bhListe td.TableCellWithBottomBorderGreen { color: #1E7B34; }

/* Rücksprung aus "Buchen": die zuletzt geöffnete Buchung hervorheben (seit 12.11.2026). */
tr.zuletzt > td { background-color: var(--hausfarbe-hell) !important; }

hr {
    border: 0;
    border-top: 1px solid var(--linie);
}

/* --- Bestand: Verweise, Kommentarzellen, Protokolltext ------------------ */

a.linkMenu:link, a.linkMenu:visited, a.linkMenu:hover, a.linkMenu:active { color: var(--text); text-decoration: none; }
a.linkInvisible { color: var(--text); text-decoration: none; }
a.linkInvisibleRed { color: var(--rot); text-decoration: none; }
a.linkInvisibleGreen { color: #1E7B34; text-decoration: none; }

.CellWithComment { position: relative; }

.CellComment {
    display: none;
    position: absolute;
    z-index: 100;
    background-color: var(--karte);
    border: 1px solid var(--linie-feld);
    border-radius: var(--radius-klein);
    box-shadow: 0 4px 12px rgba(16, 24, 40, .12);
    padding: 6px 8px;
    top: 20px;
    left: 20px;
    font-style: normal;
    font-size: 12.5px;
    font-family: var(--schrift);
}

.CellWithComment:hover span.CellComment { display: block; }

/* Dienstberatungsprotokolle (seit 15.09.2026): pre-wrap erhält Zeilenumbrüche,
   Einrückungen und Mehrfachleerzeichen des HTML-kodierten Protokolltextes. */
div.protokollText {
    white-space: pre-wrap;
    line-height: 1.5;
    padding: 8px 0;
}

/* --- Dialoge (Scripts/dialog.js, natives <dialog>) -----------------------
   Seit 13.11.2026 ohne jQuery UI (Augustin: keine unnötigen Fremdkomponenten).
   Gestaltung wie am 12.11.2026 abends festgelegt:
   - viel Luft, größerer Titel, weiche Einblendung, Hintergrund leicht unscharf
   - Feldbeschriftungen wie in der Filterleiste (klein, grau, über dem Feld)
   - Auswahl per Radio (Arbeitszeit/Krank/Urlaub ...) als Auswahlchips
   - Fußleiste weiß; Löschen/Entfernen steht links abgesetzt, die übrigen
     Schaltflächen rechts - so liegt die gefährliche Aktion nie direkt neben
     "Speichern". Die Einordnung (knopfHaupt/knopfGefahr) setzt das Skript am
     Ende der MasterPage nach der Beschriftung. */

dialog.pDialog {
    box-sizing: border-box;
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: var(--karte);
    color: var(--text);
    font-family: var(--schrift);
    font-size: 13.5px;
    box-shadow: 0 20px 40px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
    overflow: hidden;
    flex-direction: column;
}
dialog.pDialog[open] { display: flex; animation: dialogEin .16s ease-out; }
dialog.pDialog::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); }
@keyframes dialogEin { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.pDialog[open] { animation: none; } }

dialog.pDialog .pDialogKopf {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 22px;
    border-bottom: 1px solid var(--linie);
}
dialog.pDialog .pDialogTitel { flex: 1 1 auto; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
dialog.pDialog button.pDialogZu {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-leise);
}
dialog.pDialog button.pDialogZu:hover { background: var(--grund); color: var(--text); }
dialog.pDialog button.pDialogZu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

dialog.pDialog .pDialogInhalt { flex: 1 1 auto; overflow: auto; padding: 18px 22px 20px 22px; line-height: 1.5; }
dialog.pDialog .pDialogInhalt table th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-leise);
    padding-bottom: 6px;
}
dialog.pDialog .pDialogInhalt table th label { color: inherit; }
dialog.pDialog .pDialogInhalt table td { padding-bottom: 10px; }

dialog.pDialog .pDialogFuss { flex: none; padding: 12px 22px 14px 22px; border-top: 1px solid var(--linie); background: var(--karte); }
dialog.pDialog .pDialogKnoepfe { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
dialog.pDialog .pDialogKnoepfe button {
    margin: 0;
    min-height: 36px;
    padding: 7px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--hausfarbe-hell);
    color: var(--hausfarbe-dunkel);
    font-weight: 600;
}
dialog.pDialog .pDialogKnoepfe button:hover { background: #D3EAF1; }
dialog.pDialog .pDialogKnoepfe button.knopfHaupt { background: var(--hausfarbe); color: #fff; }
dialog.pDialog .pDialogKnoepfe button.knopfHaupt:hover { background: var(--hausfarbe-dunkel); }
dialog.pDialog .pDialogKnoepfe button.knopfGefahr { order: -1; margin-right: auto; background: var(--rot-hell); color: var(--rot); }
dialog.pDialog .pDialogKnoepfe button.knopfGefahr:hover { background: #F9D7D3; }

/* Beschriftung über einem Feld (<label for> in einer .zeile, z. B. Mitarbeiter, Bemerkung). */
dialog.pDialog .pDialogInhalt .zeile > label[for] {
    display: inline-block;
    padding-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-leise);
}
dialog.pDialog .pDialogInhalt .zeile > label[for] + br { display: none; }
dialog.pDialog .pDialogInhalt .zeile > label[for] + br + :is(select, textarea, input) { display: block; }
dialog.pDialog .pDialogInhalt .zeile { padding: 0 0 12px 0; }

/* Radio-Auswahl als Chips; das Radio bleibt bedienbar (Tastatur, Vorleser), nur unsichtbar. */
dialog.pDialog .pDialogInhalt .radio { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 14px 0; }
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]) {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 6px 13px;
    border: 1px solid var(--linie-feld);
    border-radius: 999px;
    background: var(--karte);
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .12s, background-color .12s, color .12s;
}
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]) > input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]):hover { border-color: var(--hausfarbe); }
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]:checked) {
    border-color: var(--hausfarbe);
    background: var(--hausfarbe-hell);
    color: var(--hausfarbe-dunkel);
    font-weight: 600;
}
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]:focus-visible) { box-shadow: 0 0 0 3px rgba(0, 133, 173, .25); }
dialog.pDialog .pDialogInhalt .radio label:has(> input[type="radio"]:disabled) { opacity: .5; cursor: default; }

/* --- Ohne Anmeldung: keine Seitenleiste, Anmeldung als Karte -------------- */

.page.abgemeldet .menu,
.page.abgemeldet .menuSchalter { display: none; }

.page.abgemeldet .content {
    margin-left: auto;
    margin-right: auto;
    max-width: 440px;
    padding-top: 12vh;
}

/* windowResize der Anmeldeseite zieht die Karte sonst bis an den Fensterrand. */
.page.abgemeldet div.panelContent { height: auto !important; }
.page.abgemeldet div.panelContent > div { padding: 10px 8px !important; }
.page.abgemeldet table[id$="_tblLogin"] { width: 100% !important; }
.page.abgemeldet input[id$="_cmdLogin"] { width: 100% !important; min-height: 38px; }

/* --- Schmale Fenster (Tablet, Handy): Leiste als Schublade ---------------- */

@media (max-width: 900px) {
    :root { --rand: 12px; }

    .menuSchalter { display: block; }
    .headerText { display: none; }
    .benutzerName { display: none; }

    .menu {
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: none;
    }
    body.menuOffen .menu { transform: none; box-shadow: 0 10px 30px rgba(16, 24, 40, .2); }
    body.menuOffen .menuSchleier {
        display: block;
        position: fixed;
        inset: var(--kopf) 0 0 0;
        z-index: 15;
        background: rgba(16, 24, 40, .35);
    }

    .content { margin-left: 0; }

    /* Beschriftungsspalten der Formulare sind fest 200 px (asp:TableCell Width). */
    div.panelContent td[style*="width:200px"] { width: 96px !important; }

    /* Breite Listen (Arbeitszeit, Buchungen) seitlich scrollen statt abschneiden. */
    div.panelContent { overflow-x: auto !important; }
}
