/* Layout und Komponenten. Farben ausschließlich über die Variablen aus themes.css. */
:root {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --leiste-breite: 232px;
  --leiste-breite-eingeklappt: 60px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--hintergrund); line-height: 1.45; }
a { color: var(--akzent); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --- Grundlayout: Seitenleiste links, Arbeitsbereich rechts --- */
body.mit-seitenleiste { display: grid; grid-template-columns: var(--leiste-breite) 1fr; min-height: 100vh; }
[data-seitenleiste="eingeklappt"] body.mit-seitenleiste { grid-template-columns: var(--leiste-breite-eingeklappt) 1fr; }
.arbeitsbereich { min-width: 0; display: flex; flex-direction: column; }

/* --- Seitenleiste --- */
.seitenleiste { background: var(--leiste-hintergrund); color: var(--leiste-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.seitenleiste-haupt { flex: 1 0 auto; }
.seitenleiste-unten { border-top: 1px solid var(--leiste-hover); padding-top: .5rem; }
.seitenleiste-unten ul { padding-bottom: .25rem; }
.seitenleiste .konto { border-top: 1px solid var(--leiste-hover); padding-top: .5rem; }
.konto-zeile { display: flex; align-items: center; gap: .25rem; padding: .35rem .5rem .6rem; }
.konto-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .4rem .6rem; border-radius: 4px; color: var(--leiste-aktiv-text); text-decoration: none; white-space: nowrap; }
.konto-name:hover { background: var(--leiste-hover); }
.konto-name.aktiv { background: var(--leiste-aktiv); }
.konto-name .beschriftung { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.konto-abmelden { display: flex; padding: .45rem; background: none; border: 0; border-radius: 4px; color: var(--leiste-text-gedaempft); cursor: pointer; }
.konto-abmelden:hover { background: var(--leiste-hover); color: var(--leiste-aktiv-text); }
.seitenleiste form { margin: 0; }
button.menuepunkt { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
button.menuepunkt:hover { background: var(--leiste-hover); }
.seitenleiste-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem .75rem .9rem 1rem; min-height: 56px; }
.seitenleiste .marke { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--leiste-aktiv-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.marke-name { overflow: hidden; text-overflow: ellipsis; }
/* Logo auf heller Kachel, damit auch Logos mit weißem Hintergrund auf der dunklen Leiste passen. */
.logo-kachel { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 32px; min-width: 32px; padding: 2px; background: #fff; border-radius: 6px; }
.logo-kachel img { display: block; max-height: 28px; max-width: 120px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.gross, .kuerzel.gross { width: 72px; height: 72px; font-size: 1.4rem; }
.logo-einstellung { display: grid; gap: .75rem; justify-items: start; }
.logo-vorschau { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: var(--leiste-hintergrund); border-radius: 6px; }
.marke-vorschau { color: var(--leiste-aktiv-text); font-weight: 600; }
.platzhalter-feld { display: flex; gap: 1.25rem; align-items: center; border: 1px solid var(--linie); border-radius: 6px; padding: .75rem 1rem; color: var(--text-gedaempft); }
.seitenleiste .umschalter { background: none; border: 0; padding: .3rem; color: var(--leiste-text-gedaempft); cursor: pointer; border-radius: 4px; display: flex; }
.seitenleiste .umschalter:hover { background: var(--leiste-hover); color: var(--leiste-text); }
.seitenleiste ul { list-style: none; margin: 0; padding: .25rem .5rem 1rem; }
.menuepunkt { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border-radius: 4px; color: var(--leiste-text); text-decoration: none; white-space: nowrap; }
a.menuepunkt:hover { background: var(--leiste-hover); }
.menuepunkt.aktiv { background: var(--leiste-aktiv); color: var(--leiste-aktiv-text); }
.menuepunkt.platzhalter { color: var(--leiste-text-gedaempft); cursor: default; }
.menuepunkt .beschriftung { overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.menuepunkt .hinweis { display: block; font-size: .72rem; opacity: .8; }
.menuepunkt { position: relative; }
.menue-zahl { margin-left: auto; background: #c0392b; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 0 .4rem; line-height: 1.15rem; min-width: 1.15rem; text-align: center; box-sizing: border-box; }
[data-seitenleiste="eingeklappt"] .menue-zahl { position: absolute; top: 2px; right: 4px; font-size: .6rem; line-height: .95rem; min-width: .95rem; padding: 0 .25rem; }

[data-seitenleiste="eingeklappt"] .seitenleiste .marke,
[data-seitenleiste="eingeklappt"] .menuepunkt .beschriftung,
[data-seitenleiste="eingeklappt"] .konto-name .beschriftung { display: none; }
[data-seitenleiste="eingeklappt"] .seitenleiste-kopf { justify-content: center; padding-inline: .5rem; }
[data-seitenleiste="eingeklappt"] .konto-zeile { flex-direction: column; }
[data-seitenleiste="eingeklappt"] .konto-name { justify-content: center; }
[data-seitenleiste="eingeklappt"] [data-seitenleiste="eingeklappt"] [data-seitenleiste="eingeklappt"] [data-seitenleiste="eingeklappt"] [data-seitenleiste="eingeklappt"] .umschalter .icon { transform: rotate(180deg); }
[data-seitenleiste="eingeklappt"] .menuepunkt { justify-content: center; }

/* Schmale Bildschirme: Seitenleiste nur mit Symbolen */
@media (max-width: 800px) {
  body.mit-seitenleiste { grid-template-columns: var(--leiste-breite-eingeklappt) 1fr; }
  .seitenleiste .marke, .menuepunkt .beschriftung, .konto-name .beschriftung, .seitenleiste .umschalter { display: none; }
  .konto-zeile { flex-direction: column; }
  .konto-name { justify-content: center; }
          .menuepunkt { justify-content: center; }
}

/* --- Kopfzeile --- */
.kopf { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding: .6rem 1.5rem; min-height: 56px; background: var(--kopf-hintergrund); border-bottom: 1px solid var(--kopf-linie); }
body.ohne-seitenleiste .kopf { justify-content: flex-start; background: var(--leiste-hintergrund); border: 0; }
body.ohne-seitenleiste .kopf .marke { color: var(--leiste-aktiv-text); font-weight: 600; }

/* --- Inhalt --- */
main { width: 100%; max-width: 1440px; padding: 1.5rem 1.5rem 3rem; }
body.ohne-seitenleiste main { margin: 0 auto; max-width: 900px; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-weight: 600; color: var(--text-gedaempft); font-size: .9rem; }
button, .knopf { background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 4px; padding: .5rem .9rem; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.link { background: none; padding: 0; color: var(--akzent); text-decoration: underline; }
button.dok-name { background: none; border: 0; padding: 0; color: var(--akzent); font: inherit; text-align: left; cursor: pointer; }
button.dok-name:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--hintergrund); padding: .45rem .5rem; border: 1px solid var(--linie); border-radius: 4px; max-width: 100%; }
.titelzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.suche, .zeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin: 0 0 1rem; }
.suche input[type=search] { flex: 1; min-width: 14rem; }
.zeile p { margin: 0; }
.formular p { display: grid; gap: .25rem; max-width: 36rem; }
.formular .helptext { color: var(--text-gedaempft); font-size: .85rem; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; }
.daten dt { color: var(--text-gedaempft); }
.daten dd { margin: 0; }
.notiz { background: var(--flaeche); padding: .75rem; border-radius: 4px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kachel { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border: 1px solid var(--linie); border-radius: 6px; text-decoration: none; color: var(--text); }
.kachel strong { font-size: 1.6rem; color: var(--akzent); }
.marker { font-size: .75rem; background: var(--markierung); padding: .1rem .35rem; border-radius: 3px; }
.meldungen { list-style: none; padding: 0; }
.meldungen li { padding: .6rem .8rem; border-radius: 4px; background: var(--flaeche); margin-bottom: .5rem; }
.meldungen .error { color: var(--fehler); } .meldungen .success { color: var(--erfolg); }
/* Meldungen im Arbeitsbereich: kleines Fenster oben mittig, über dem Inhalt (verschiebt nichts). */
.meldungen.schwebend { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; margin: 0; width: max-content; max-width: min(36rem, calc(100vw - 2rem)); display: grid; gap: .4rem; }
.meldungen.schwebend li { display: flex; align-items: flex-start; gap: .75rem; margin: 0; padding: .55rem .6rem .55rem .9rem; background: var(--hintergrund); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: 8px; box-shadow: 0 8px 24px rgb(20 30 45 / .18); color: var(--text); font-size: .92rem; transition: opacity .3s, transform .3s; }
.meldungen.schwebend li.success { border-left-color: var(--erfolg); }
.meldungen.schwebend li.error { border-left-color: var(--fehler); }
.meldungen.schwebend li.warning { border-left-color: var(--warnung); }
.meldungen.schwebend li span { flex: 1; padding-top: .1rem; }
.meldungen.schwebend li.weg { opacity: 0; transform: translateY(-8px); }
.meldung-schliessen { flex: none; background: none; color: var(--text-gedaempft); font-size: 1.15rem; line-height: 1; padding: .15rem .4rem; border-radius: 5px; }
.meldung-schliessen:hover { background: var(--flaeche); color: var(--text); }
.errorlist { color: var(--fehler); }
.reiter { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--linie); margin: 0 0 1.25rem; }
.reiter-eintrag { padding: .55rem .7rem; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text); text-decoration: none; }
a.reiter-eintrag:hover { color: var(--akzent); }
.reiter-eintrag.aktiv { border-bottom-color: var(--akzent); color: var(--akzent); font-weight: 600; }
.reiter-eintrag.platzhalter { color: var(--text-gedaempft); opacity: .7; cursor: default; }
.kombifeld { position: relative; display: flex; width: 100%; }
.kombifeld input { flex: 1; min-width: 0; padding-right: 2.2rem; }
.kombifeld-pfeil { position: absolute; right: 1px; top: 1px; bottom: 1px; display: flex; align-items: center; padding: 0 .5rem; background: none; color: var(--text-gedaempft); border-radius: 0 4px 4px 0; }
.kombifeld-pfeil:hover { background: var(--flaeche); color: var(--text); }
.kombifeld-liste { position: absolute; z-index: 10; top: calc(100% + 2px); left: 0; right: 0; margin: 0; padding: .25rem 0; list-style: none; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 4px; box-shadow: 0 4px 12px rgb(0 0 0 / .12); max-height: 16rem; overflow-y: auto; }
.kombifeld-liste[hidden] { display: none; }
.kombifeld-liste [role=option] { display: block; padding: .45rem .6rem; cursor: pointer; }
.kombifeld-liste [role=option][hidden] { display: none; }
.kombifeld-liste [role=option]:hover, .kombifeld-liste .markiert { background: var(--flaeche); color: var(--akzent); }
.erlaeuterung { color: var(--text-gedaempft); margin-top: -.25rem; }
.seiten { margin-top: 1rem; display: flex; gap: 1rem; }

/* --- Kopf einer Akte (Pfad, Titel, Reiter) --- */
.brotkrumen { color: var(--text-gedaempft); font-size: .9rem; margin-bottom: .35rem; }
.brotkrumen a { text-decoration: none; }
.titelzeile h1 .zusatz { color: var(--text-gedaempft); font-weight: 400; font-size: 1rem; margin-left: .6rem; }
.knopf.zweit { background: var(--hintergrund); color: var(--akzent); border: 1px solid var(--linie); }
.knopf.platzhalter { opacity: .55; cursor: default; }
.reiter-eintrag .zahl { font-size: .75rem; background: var(--flaeche); color: var(--text-gedaempft); border-radius: 999px; padding: 0 .45rem; margin-left: .2rem; font-weight: 400; }
button.gefahr { background: var(--fehler); }
.nowrap { white-space: nowrap; }
.gedaempft { color: var(--text-gedaempft); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Dokumente: Ordnerbaum links, Liste rechts --- */
.dok { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.ordner { border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche); padding: .6rem 0 .75rem; }
.ordner-kopf { display: flex; justify-content: space-between; align-items: center; padding: 0 .75rem .5rem; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-gedaempft); font-weight: 600; }
.ordner-kopf .werkzeug { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .85rem; text-decoration: none; }
.ordner ul { list-style: none; margin: 0; padding: 0; }
.ordner-zeile { display: flex; align-items: center; gap: .45rem; padding: .38rem .75rem .38rem calc(.75rem + var(--tiefe, 0) * 1rem); color: var(--text); text-decoration: none; font-size: .93rem; }
.ordner-zeile .icon { width: 16px; height: 16px; color: var(--text-gedaempft); }
.ordner-zeile:hover { background: var(--hintergrund); }
.ordner-zeile.aktiv { background: var(--hintergrund); color: var(--akzent); font-weight: 600; box-shadow: inset 3px 0 0 var(--akzent); }
.ordner-zeile.ziel { background: var(--markierung); outline: 1px dashed var(--akzent); outline-offset: -1px; }
.ordner-name { overflow: hidden; text-overflow: ellipsis; }
.ordner .anzahl { margin-left: auto; color: var(--text-gedaempft); font-size: .8rem; font-weight: 400; }
.ordner-werkzeuge { display: flex; gap: .6rem; align-items: center; padding: 0 .75rem .3rem calc(2.2rem + var(--tiefe, 0) * 1rem); font-size: .8rem; }
.ordner-werkzeuge form { display: flex; gap: .35rem; margin: 0; }
.ordner-werkzeuge button.link { text-decoration: none; font-size: .95rem; }
.ordner-neu { border-top: 1px solid var(--linie); margin: .5rem .75rem 0; padding-top: .5rem; font-size: .9rem; }
.ordner-neu summary { color: var(--akzent); cursor: pointer; }
.ordner-neu form { display: grid; gap: .45rem; margin-top: .5rem; }
.ordner-neu label { display: grid; gap: .15rem; color: var(--text-gedaempft); font-size: .82rem; }
.ablage { display: flex; flex-direction: column; align-items: center; gap: .25rem; border: 2px dashed var(--akzent); border-radius: 8px; background: var(--akzent-flaeche); padding: 1.1rem; text-align: center; color: var(--akzent); margin: 0 0 1rem; }
.ablage.ueber { background: var(--markierung); }
.ablage strong { font-size: 1.05rem; }
.ablage small { color: var(--text-gedaempft); }
.ablage .als-link { color: var(--akzent); text-decoration: underline; cursor: pointer; }
.ablage .ziel-ordner { background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 4px; padding: .15rem .5rem; color: var(--text); font-size: .85rem; }
.hochladen-status { width: 100%; color: var(--text); font-size: .88rem; text-align: left; margin-top: .4rem; }
.hochladen-status .balken { height: 6px; background: var(--hintergrund); border-radius: 3px; overflow: hidden; margin-top: .3rem; }
.hochladen-status .balken span { display: block; height: 100%; width: 0; background: var(--akzent); transition: width .2s; }
.werkzeugleiste { display: flex; gap: .5rem; align-items: center; margin: 0 0 .6rem; flex-wrap: wrap; }
.werkzeugleiste input[type=search] { flex: 1; min-width: 14rem; }
.chip { border: 1px solid var(--linie); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; background: var(--hintergrund); color: var(--text-gedaempft); }
.chip.an { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
table.doks td, table.doks th { font-size: .9rem; vertical-align: middle; }
table.doks tr[draggable=true] { cursor: grab; }
table.doks a { text-decoration: none; }
.da-filter select { width: auto; }
.da-typen { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .8rem; }
.da-typen .chip { text-decoration: none; }
.da-typen .chip.leer { opacity: .55; }
.da-zahl { font-size: .75rem; opacity: .75; margin-left: .15rem; }
.da-zuruecksetzen { font-size: .85rem; margin-left: .4rem; }
.da-tabelle th { white-space: nowrap; }
.da-sortieren { color: inherit; display: inline-flex; gap: .3rem; align-items: center; }
.da-sortieren .da-pfeil { font-size: .7rem; color: var(--text-gedaempft); opacity: .5; }
.da-sortieren:hover .da-pfeil, .da-sortieren.an .da-pfeil { opacity: 1; color: var(--akzent); }
.da-klein { font-size: .8rem; color: var(--text-gedaempft); }
.da-fuss { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: space-between; margin-top: .8rem; font-size: .88rem; color: var(--text-gedaempft); }
.da-seiten { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.da-seiten a, .da-seiten span { min-width: 2rem; text-align: center; padding: .2rem .5rem; border-radius: 6px; border: 1px solid transparent; text-decoration: none; }
.da-seiten a:hover { border-color: var(--linie); background: var(--flaeche); }
.da-seiten .an { background: var(--akzent); color: var(--akzent-text); font-weight: 600; }
.da-seiten .aus { opacity: .4; }
.da-pro-seite select { width: auto; margin-left: .3rem; }
.dok-version { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--akzent); border: 1px solid var(--linie); border-radius: 4px; padding: 0 .35rem; vertical-align: middle; }
h2 .dok-version { font-size: .8rem; }
.dok-gesperrt { display: inline-block; font-size: .72rem; font-weight: 600; color: #8a5a00; background: #fff3d6; border: 1px solid #ecd28f; border-radius: 4px; padding: 0 .35rem; vertical-align: middle; }
.dok-bearbeitung { border: 1px solid var(--linie); border-radius: 8px; padding: .4rem 1.2rem 1rem; margin: 0 0 1.5rem; max-width: 60rem; }
.dok-sperrhinweis { background: var(--flaeche); border-radius: 6px; padding: .6rem .8rem; }
.dok-sperrhinweis.fremd { background: #fff3d6; color: #6b4e00; }
.dok-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.dok-neue-version h4 { margin: .5rem 0; }
.dok-neue-version .breit { flex: 1; min-width: 16rem; }
.dok-neue-version .zeile p { display: grid; gap: .25rem; }
.dok-gesperrt.eigen { color: #1f6b2a; background: #e5f4e4; border-color: #a9d8a6; }

/* Fura-Agent: „Öffnen“, Aufklappmenü, Geräte */
form.inline { display: inline; }
.ag-oeffnen { display: inline-block; border: 1px solid var(--akzent); color: var(--akzent); background: var(--hintergrund); border-radius: 5px; padding: .1rem .6rem; font-size: .85rem; font-weight: 600; cursor: pointer; }
.ag-oeffnen:hover { background: var(--flaeche); }
.ag-mehr { display: inline-block; position: relative; margin-left: .3rem; vertical-align: middle; }
.ag-mehr summary { list-style: none; cursor: pointer; border: 1px solid var(--linie); border-radius: 5px; padding: 0 .45rem; color: var(--text-gedaempft); background: var(--hintergrund); }
.ag-mehr summary::-webkit-details-marker { display: none; }
.ag-menue { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.15); min-width: 20rem; padding: .3rem 0; text-align: left; white-space: normal; }
.ag-menue a, .ag-menue button { display: block; width: 100%; text-align: left; padding: .35rem .9rem; color: var(--text); background: none; border: 0; border-radius: 0; font: inherit; font-size: .9rem; font-weight: normal; cursor: pointer; }
.ag-menue a:hover, .ag-menue button:hover { background: var(--flaeche); }
.ag-menue small { display: block; color: var(--text-gedaempft); font-size: .78rem; }
.ag-menue hr { border: 0; border-top: 1px solid var(--linie); margin: .3rem 0; }
.ag-leiste { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: 6px; padding: .55rem .9rem; margin: 0 0 1rem; font-size: .9rem; }
.ag-leiste > span { flex: 1 1 30rem; }
.ag-karte { border: 1px solid var(--linie); border-radius: 8px; padding: .2rem 1.2rem 1rem; margin: 0 0 1.5rem; max-width: 60rem; }
.ag-koppeln { display: flex; gap: 1rem 2rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.ag-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: .15em; color: var(--akzent); }
.ag-klein { font-size: .85rem; color: var(--text-gedaempft); }
.ag-schritte li { margin: .25rem 0; }
.ag-browser { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 1rem 0 .5rem; }
.ag-status { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; background: #b8b8b8; }
.ag-status.ag-erreichbar { background: #2e9d46; }
.ag-status.ag-verwaist { background: #c0392b; }
.dp-karte { border: 1px solid var(--linie); border-radius: 8px; padding: .2rem 1.2rem 1rem; margin: 0 0 1.5rem; max-width: 60rem; }
.dp-dateien { display: flex; flex-wrap: wrap; gap: .8rem 2rem; margin: .8rem 0; }
.dp-datei .knopf { display: inline-block; margin-bottom: .3rem; }
.dp-klein { font-size: .85rem; color: var(--text-gedaempft); }
.dp-schritte li { margin: .25rem 0; }
.dp-pruefsumme { margin-top: .6rem; font-size: .85rem; }
.dp-pruefsumme code { word-break: break-all; }
.dp-hochladen { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin: .6rem 0 .2rem; }
.dp-hochladen label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; }
.dp-hochladen input[type=file] { width: auto; }
.dp-marke { display: inline-block; font-size: .72rem; padding: 0 .4rem; border-radius: 3px; background: var(--akzent); color: #fff; }
.dok-haken { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .9rem; }
.dok-haken input { width: auto; }
tr.aktuell td { background: var(--flaeche); }
.typ { display: inline-flex; min-width: 34px; height: 20px; padding: 0 .25rem; border-radius: 3px; font-size: .65rem; font-weight: 700; align-items: center; justify-content: center; color: #fff; background: var(--typ-sonstige); }
.typ-pdf { background: var(--typ-pdf); } .typ-word { background: var(--typ-word); } .typ-excel { background: var(--typ-excel); }
.typ-email { background: var(--typ-email); } .typ-bild { background: var(--typ-bild); }
.kuerzel { display: inline-flex; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--leiste-aktiv); color: var(--leiste-aktiv-text); font-size: .7rem; align-items: center; justify-content: center; font-weight: 600; }
.fuss { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-gedaempft); font-size: .85rem; margin-top: .6rem; }

@media (max-width: 800px) {
  main { padding: 1rem; }
  .dok { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}

/* --- Profil und Benutzerverwaltung --- */
.profil-formular { margin-bottom: 2rem; max-width: 56rem; }
.profil-felder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem 1rem; margin-bottom: 1rem; }
.profil-feld { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; min-width: 0; }
.profil-feld.breit { grid-column: span 2; }
.profil-feld.halb { grid-column: span 3; }
.profil-feld input, .profil-feld .kombifeld { width: 100%; box-sizing: border-box; font-weight: 400; }
.profil-feld .hilfe { color: var(--text-gedaempft); font-weight: 400; font-size: .78rem; }
.fehlertext { color: var(--fehler); font-weight: 400; }
table.rechte-matrix th.gruppe, table.rechte-matrix td.wahl { text-align: center; }
table.rechte-matrix .ueberschrift-art th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 0; padding-bottom: 0; }
table.rechte-matrix .ueberschrift-art th.gruppe { border-bottom: 2px solid var(--linie); }
table.rechte-matrix tr.inaktiv td { color: var(--text-gedaempft); }
table.rechte-matrix td.wahl input { width: 1.1rem; height: 1.1rem; }
.gruppen-liste td { vertical-align: middle; }
.gruppen-liste form { display: inline; margin: 0; }
.aktionen { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; }
@media (max-width: 800px) { .profil-felder { grid-template-columns: 1fr 1fr; } .profil-feld.breit, .profil-feld.halb { grid-column: span 2; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- Eingang (Login, zweiter Faktor, Passwort vergessen): zentrierte Kachel --- */
body.eingang { background: var(--flaeche); }
.eingang-mitte { min-height: 100vh; max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; box-sizing: border-box; }
.login-kachel { width: 100%; max-width: 400px; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgb(20 30 45 / .18); }
.login-kopf { background: var(--leiste-hintergrund); padding: 1.6rem 1.5rem 1.4rem; text-align: center; }
.login-logo { display: inline-flex; align-items: center; justify-content: center; padding: .5rem .75rem; background: #fff; border-radius: 8px; }
.login-logo img { display: block; max-height: 56px; max-width: 240px; }
.login-marke { color: var(--leiste-aktiv-text); font-size: 1.4rem; font-weight: 600; letter-spacing: .04em; }
.login-rumpf { padding: 1.5rem 1.8rem 1.6rem; }
.login-rumpf h1 { font-size: 1.2rem; margin: 0 0 1.1rem; }
.login-rumpf .meldungen { margin: 0 0 1rem; }
.login-rumpf form p { margin: 0 0 .9rem; }
.login-rumpf input:not([type=checkbox]):not([type=radio]) { width: 100%; box-sizing: border-box; }
.login-feld { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; font-size: .88rem; font-weight: 600; }
.login-feld input { font-size: .95rem; padding: .55rem .65rem; font-weight: 400; }
.login-rumpf .errorlist { list-style: none; margin: 0 0 .9rem; padding: 0; font-weight: 400; font-size: .9rem; }
.login-feld .errorlist { margin: 0; }
.login-merken { display: flex; gap: .4rem; align-items: center; font-size: .85rem; margin-bottom: .6rem; }
.login-rumpf .login-zeile { display: flex; justify-content: flex-end; font-size: .85rem; margin: -.2rem 0 1.1rem; }
.login-rumpf .voll { display: block; width: 100%; padding: .65rem; font-size: .98rem; text-align: center; box-sizing: border-box; }
.login-rumpf button.zweit { background: var(--hintergrund); color: var(--akzent); border: 1px solid var(--linie); }
.trenner { display: flex; align-items: center; gap: .7rem; color: var(--text-gedaempft); font-size: .8rem; margin: 1rem 0; }
.trenner::before, .trenner::after { content: ""; flex: 1; border-top: 1px solid var(--linie); }
.eingang-unter { margin: 1.2rem 0 0; font-size: .78rem; color: var(--text-gedaempft); }
/* Leiste über Listen: Knöpfe zum Anlegen links, Anzeigefilter rechts */
.aktionsleiste { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.aktionsleiste .neu { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.aktionsleiste .anzeige { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0 0 0 auto; }
.aktionsleiste .suche { flex: 0 1 40rem; }
.benutzer-formular h3 { font-size: 1rem; margin: 1.5rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--linie); }
.benutzer-formular h3:first-of-type { margin-top: .5rem; }
.formular-titel { margin-top: .25rem; }
.schalter-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; margin: .25rem 0 .5rem; font-size: .9rem; }
.schalter { display: flex; align-items: center; gap: .4rem; }

/* --- Dropdown mit Mehrfachauswahl (core/_mehrfachwahl.html) --- */
.mehrfachwahl { position: relative; display: inline-block; min-width: 12rem; max-width: 100%; text-align: left; }
.mehrfachwahl-knopf { display: flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; min-height: 2.2rem; box-sizing: border-box; padding: .25rem .45rem .25rem .5rem; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 4px; font-size: .9rem; }
.mehrfachwahl-knopf::-webkit-details-marker { display: none; }
.mehrfachwahl-knopf:hover, .mehrfachwahl[open] > .mehrfachwahl-knopf { border-color: #9db6cf; }
.mehrfachwahl-knopf .icon { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--text-gedaempft); }
.mehrfachwahl-text { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.mehrfachwahl-text:empty::before { content: attr(data-leer); color: var(--text-gedaempft); }
.mehrfachwahl-wert { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; padding: 0 .5rem; font-size: .82rem; white-space: nowrap; }
.mehrfachwahl-liste { position: absolute; left: 0; top: calc(100% + 4px); z-index: 20; min-width: 100%; max-height: 18rem; overflow-y: auto; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 8px 24px rgb(20 30 45 / .18); padding: .3rem; box-sizing: border-box; }
.mehrfachwahl-liste label { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 4px; cursor: pointer; white-space: nowrap; font-weight: 400; }
.mehrfachwahl-liste label:hover { background: var(--flaeche); }
.mehrfachwahl-liste p { margin: .3rem .5rem; }
.mehrfachwahl[data-gesperrt] .mehrfachwahl-knopf { cursor: default; background: var(--flaeche); }
.profil-feld .mehrfachwahl { width: 100%; }
table.rechte-matrix td.zuordnung .mehrfachwahl { min-width: 14rem; }
.mehrfachwahl-liste input[type=checkbox] { width: auto; flex: none; margin: 0; }
.da-trenner { width: 1px; align-self: stretch; background: var(--linie); margin: 0 .2rem; }
.da-typ .da-haken { display: inline-block; width: 0; overflow: hidden; transition: width .1s; }
.da-typ.an .da-haken { width: 1.1em; }
.da-zuruecksetzen-zeile { margin: -.4rem 0 .6rem; }
