/* LiftTec DMS – Corporate Design: Dunkelblau #283C81, Hellblau #5A68D3, Arial */
:root {
  --marke: #283C81;
  --marke-hell: #5A68D3;
  --bg: #f5f6fa;
  --flaeche: #ffffff;
  --flaeche-2: #f0f2f8;
  --linie: #e1e4ee;
  --text: #1d2233;
  --leise: #646b80;
  --auswahl: #e6e9fb;
  --hover: #f0f2fb;
  --gefahr: #c0392b;
  --ok: #1e8449;
  --warn: #b9770e;
  --schatten: 0 8px 28px rgba(20, 30, 70, .16);
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151f; --flaeche: #1a1e2b; --flaeche-2: #222838; --linie: #2d3447; --text: #e6e8ef; --leise: #9aa1b5;
    --auswahl: #2a3264; --hover: #232a3d; --marke-hell: #7c88e6; --schatten: 0 8px 28px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--marke-hell); }
.leise { color: var(--leise); }
.klein { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- Grundlayout */
.app { display: grid; grid-template-rows: 52px 1fr; grid-template-columns: 240px 1fr; height: 100vh; }
.kopf { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--marke); color: #fff; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 16px; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: #fff; color: var(--marke); font-weight: bold; font-size: 13px; letter-spacing: -.5px; }
.suche { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.suche input { width: 100%; height: 34px; border: 0; border-radius: 6px; padding: 0 12px 0 36px; background: rgba(255,255,255,.95); color: #1d2233; }
.suche svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: #646b80; }
.benutzer { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--marke-hell); color: #fff; display: grid; place-items: center; font-weight: bold; font-size: 13px; border: 2px solid rgba(255,255,255,.6); cursor: pointer; }
.menuknopf { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }

.seite { background: var(--flaeche); border-right: 1px solid var(--linie); overflow-y: auto; padding: 12px 8px; }
.seite .neu { width: 100%; margin-bottom: 12px; justify-content: center; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; color: var(--text); text-decoration: none; cursor: pointer; }
.nav a:hover { background: var(--hover); }
.nav a.aktiv { background: var(--auswahl); font-weight: bold; color: var(--marke); }
@media (prefers-color-scheme: dark) { .nav a.aktiv { color: #fff; } }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav h4 { margin: 16px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); }
.speicher { margin: 18px 12px 0; font-size: 12px; color: var(--leise); }

.haupt { display: flex; overflow: hidden; min-width: 0; }
.inhalt { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.befehle { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche); flex-wrap: wrap; min-height: 50px; }
.befehle .abstand { flex: 1; }
.pfadzeile { display: flex; align-items: center; gap: 4px; padding: 16px 24px 8px; font-size: 20px; flex-wrap: wrap; }
.pfadzeile a { color: var(--leise); text-decoration: none; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.pfadzeile a:hover { background: var(--hover); color: var(--text); }
.pfadzeile .letzter { color: var(--text); font-weight: bold; }
.pfadzeile .trenner { color: var(--leise); font-size: 14px; }
.hinweiszeile { padding: 0 24px 8px; color: var(--leise); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.liste-rahmen { flex: 1; overflow: auto; padding: 0 16px 24px; container-type: inline-size; }

/* ---------- Knöpfe */
.knopf { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text); }
.knopf:hover { background: var(--hover); }
.knopf:disabled { opacity: .45; cursor: default; background: transparent; }
.knopf svg { width: 16px; height: 16px; }
.knopf.primaer { background: var(--marke); color: #fff; }
.knopf.primaer:hover { background: #1f2f69; }
.knopf.rahmen { border-color: var(--linie); background: var(--flaeche); }
.knopf.gefahr { color: var(--gefahr); }
.knopf.klein { height: 28px; padding: 0 8px; font-size: 13px; }
.knopf:focus-visible, a:focus-visible, input:focus-visible, .zeile:focus-visible { outline: 2px solid var(--marke-hell); outline-offset: 1px; }
.icon-knopf { width: 32px; padding: 0; justify-content: center; }

/* ---------- Dateiliste */
table.dateien { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.dateien th { text-align: left; font-weight: normal; color: var(--leise); font-size: 13px; padding: 8px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: var(--bg); cursor: pointer; user-select: none; z-index: 1; }
table.dateien td { padding: 6px 8px; border-bottom: 1px solid var(--linie); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.zeile { cursor: default; }
.zeile:hover { background: var(--hover); }
.zeile.gewaehlt { background: var(--auswahl); }
.zeile.ziel { outline: 2px dashed var(--marke-hell); outline-offset: -2px; }
.col-check { width: 36px; }
.col-name { width: auto; }
.col-datum { width: 130px; }
.col-von { width: 150px; }
.col-groesse { width: 90px; text-align: right !important; }
.col-info { width: 120px; }
.namezelle { display: flex; align-items: center; gap: 10px; min-width: 0; }
.namezelle .name { overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.namezelle .name:hover { text-decoration: underline; }
.typicon { width: 28px; height: 28px; flex: none; }
.marker { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--leise); margin-left: 4px; }
.marker svg { width: 13px; height: 13px; }
.stern { color: #d4a017; }
.check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--leise); display: grid; place-items: center; opacity: 0; cursor: pointer; }
.zeile:hover .check, .zeile.gewaehlt .check, .alle-check.sichtbar { opacity: 1; }
.zeile.gewaehlt .check { background: var(--marke-hell); border-color: var(--marke-hell); color: #fff; }
.check svg { width: 12px; height: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.pm { background: #e8ebfb; border-color: #c9cff3; color: #283C81; }
.chip.hrlt { background: #fdf0e1; border-color: #f2d3ad; color: #8a4b08; }
.chip.vertraulich { background: #fbe9e7; border-color: #f1c1bb; color: #a93226; }
@media (prefers-color-scheme: dark) {
  .chip.pm { background: #283062; border-color: #3a4590; color: #d6dbff; }
  .chip.hrlt { background: #4a3416; border-color: #6d4d22; color: #ffdcae; }
  .chip.vertraulich { background: #4d2420; border-color: #6e322c; color: #ffc9c2; }
}

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-top: 8px; }
.kachel { border: 1px solid transparent; border-radius: var(--radius); padding: 14px 10px 10px; text-align: center; cursor: default; position: relative; background: var(--flaeche); }
.kachel:hover { border-color: var(--linie); background: var(--hover); }
.kachel.gewaehlt { background: var(--auswahl); border-color: var(--marke-hell); }
.kachel .vorschau { height: 96px; display: grid; place-items: center; margin-bottom: 8px; overflow: hidden; border-radius: 4px; }
.kachel .vorschau img { max-width: 100%; max-height: 96px; object-fit: cover; }
.kachel .vorschau .typicon { width: 64px; height: 64px; }
.kachel .name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel .check { position: absolute; top: 8px; left: 8px; }
.kachel:hover .check, .kachel.gewaehlt .check { opacity: 1; }

.leer { text-align: center; padding: 64px 16px; color: var(--leise); }
.leer svg { width: 96px; height: 96px; color: var(--marke-hell); opacity: .55; }
.leer h3 { color: var(--text); margin: 12px 0 4px; }

/* ---------- Detailbereich */
.details { width: 360px; border-left: 1px solid var(--linie); background: var(--flaeche); display: flex; flex-direction: column; min-height: 0; }
.details-kopf { padding: 14px 16px 0; display: flex; gap: 10px; align-items: flex-start; }
.details-kopf h3 { margin: 0; font-size: 16px; word-break: break-word; flex: 1; }
.reiter { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--linie); }
.reiter button { border: 0; background: none; padding: 8px 10px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--leise); }
.reiter button.aktiv { color: var(--text); border-bottom-color: var(--marke-hell); font-weight: bold; }
.reiter .zahl { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--marke-hell); color: #fff; font-size: 11px; margin-left: 3px; }
.details-inhalt { flex: 1; overflow-y: auto; padding: 16px; }
.details .bild { width: 100%; max-height: 220px; object-fit: contain; border-radius: 6px; background: var(--flaeche-2); margin-bottom: 12px; }
dl.info { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0 0 16px; font-size: 13px; }
dl.info dt { color: var(--leise); }
dl.info dd { margin: 0; word-break: break-word; }
.abschnitt { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); display: flex; align-items: center; justify-content: space-between; }
.version { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.version .nr { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--flaeche-2); display: grid; place-items: center; font-weight: bold; font-size: 13px; }
.version.aktuell .nr { background: var(--marke); color: #fff; }
.version .text { flex: 1; min-width: 0; font-size: 13px; }
.version .aktionen { display: flex; gap: 2px; align-items: flex-start; }

.kommentar { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.kommentar.antwort { margin-left: 28px; border-bottom: 0; padding-bottom: 4px; }
.kommentar.erledigt > .k-text { opacity: .55; }
.k-kopf { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.k-kopf .avatar { width: 26px; height: 26px; font-size: 11px; border: 0; cursor: default; }
.k-kopf .autor { font-weight: bold; }
.k-text { margin: 4px 0 4px 34px; white-space: pre-wrap; word-break: break-word; }
.k-text .erwaehnung { color: var(--marke-hell); font-weight: bold; }
.k-aktionen { margin-left: 30px; display: flex; gap: 2px; }
.k-eingabe textarea { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--linie); border-radius: 6px; padding: 8px; background: var(--flaeche); }
.k-eingabe .zeile-knoepfe { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.badge { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--flaeche-2); color: var(--leise); }
.badge.ok { background: #e3f4ea; color: var(--ok); }
@media (prefers-color-scheme: dark) { .badge.ok { background: #1d3b2a; color: #8fe0b0; } }

.verlauf-eintrag { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--linie); }

/* ---------- Formulare & Dialoge */
.feld { display: block; margin-bottom: 12px; }
.feld > span { display: block; font-size: 13px; color: var(--leise); margin-bottom: 4px; }
.feld input, .feld select, .feld textarea, input.eingabe, select.eingabe { width: 100%; height: 36px; border: 1px solid var(--linie); border-radius: 6px; padding: 0 10px; background: var(--flaeche); }
.feld textarea { height: auto; min-height: 70px; padding: 8px 10px; }
.feld input:focus, .feld select:focus, .feld textarea:focus { border-color: var(--marke-hell); outline: none; }
.reihe { display: flex; gap: 10px; }
.reihe > * { flex: 1; }
.schalter { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 8px 0; }

.schleier { position: fixed; inset: 0; background: rgba(15, 20, 40, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog { background: var(--flaeche); border-radius: 10px; box-shadow: var(--schatten); width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.dialog.breit { width: min(860px, 100%); }
.dialog.vorschau-dialog { width: min(1100px, 100%); height: calc(100vh - 32px); }
.dialog h2 { margin: 0; font-size: 18px; padding: 18px 20px 8px; display: flex; align-items: center; gap: 10px; }
.dialog .koerper { padding: 8px 20px 12px; overflow-y: auto; flex: 1; }
.dialog .fuss { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.fehlertext { color: var(--gefahr); font-size: 13px; min-height: 18px; }
.vorschau-rahmen { flex: 1; display: grid; place-items: center; background: var(--flaeche-2); margin: 0 20px; border-radius: 6px; overflow: auto; min-height: 0; }
.vorschau-rahmen iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.vorschau-rahmen img { max-width: 100%; max-height: 100%; }
.vorschau-rahmen pre { align-self: stretch; justify-self: stretch; margin: 0; padding: 16px; white-space: pre-wrap; font: 13px/1.5 Menlo, Consolas, monospace; overflow: auto; }

.baum { max-height: 340px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 6px; padding: 6px; }
.baum-eintrag { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 4px; cursor: pointer; }
.baum-eintrag:hover { background: var(--hover); }
.baum-eintrag.gewaehlt { background: var(--auswahl); font-weight: bold; }
.baum-eintrag.gesperrt { opacity: .4; cursor: not-allowed; }
.baum-eintrag svg { width: 18px; height: 18px; flex: none; }

.kontextmenue { position: fixed; z-index: 60; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; box-shadow: var(--schatten); padding: 4px; min-width: 210px; }
.kontextmenue button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 12px; border-radius: 5px; cursor: pointer; text-align: left; }
.kontextmenue button:hover { background: var(--hover); }
.kontextmenue button svg { width: 16px; height: 16px; color: var(--leise); }
.kontextmenue hr { border: 0; border-top: 1px solid var(--linie); margin: 4px 0; }
.kontextmenue .gefahr { color: var(--gefahr); }

/* ---------- Hochladen */
.ablage-overlay { position: absolute; inset: 8px; border: 3px dashed var(--marke-hell); border-radius: 12px; background: color-mix(in srgb, var(--marke-hell) 12%, transparent); display: grid; place-items: center; font-size: 18px; font-weight: bold; color: var(--marke); pointer-events: none; z-index: 5; }
.uploads { position: fixed; right: 16px; bottom: 16px; width: 340px; background: var(--flaeche); border-radius: 10px; box-shadow: var(--schatten); z-index: 40; overflow: hidden; }
.uploads-kopf { padding: 10px 14px; background: var(--marke); color: #fff; display: flex; align-items: center; justify-content: space-between; }
.uploads-kopf button { background: none; border: 0; color: #fff; cursor: pointer; }
.upload-zeile { padding: 8px 14px; border-bottom: 1px solid var(--linie); font-size: 13px; }
.balken { height: 4px; border-radius: 2px; background: var(--flaeche-2); margin-top: 6px; overflow: hidden; }
.balken > div { height: 100%; background: var(--marke-hell); transition: width .2s; }

#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; align-items: center; }
.toast { background: #1d2233; color: #fff; padding: 10px 16px; border-radius: 6px; box-shadow: var(--schatten); max-width: 90vw; }
.toast.fehler { background: var(--gefahr); }

/* ---------- Anmeldung & Freigabe-Seite */
.anmeldung, body.freigabe { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--marke), var(--marke-hell)); padding: 16px; }
.anmeldung form, .freigabe-karte { background: var(--flaeche); padding: 32px; border-radius: 12px; width: min(400px, 100%); box-shadow: var(--schatten); }
.anmeldung .marke, .freigabe-karte .marke { color: var(--marke); margin-bottom: 24px; }
.anmeldung .logo, .freigabe-karte .logo { background: var(--marke); color: #fff; }
.anmeldung h1, .freigabe-karte h1 { font-size: 20px; margin: 0 0 16px; word-break: break-word; }
.anmeldung .knopf { width: 100%; justify-content: center; height: 40px; }
.freigabe-karte .knopf { margin-top: 12px; }

/* ---------- Administration */
.verwaltung { padding: 8px 24px 32px; overflow-y: auto; flex: 1; }
.verwaltung .reiter { padding: 0; margin-bottom: 16px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.karte h3 { margin: 0 0 12px; font-size: 16px; }
table.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tabelle th, table.tabelle td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.tabelle th { color: var(--leise); font-weight: normal; }
code, .code { font-family: Menlo, Consolas, monospace; font-size: 12px; background: var(--flaeche-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
pre.code { display: block; padding: 12px; white-space: pre-wrap; overflow-x: auto; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kennzahl { background: var(--flaeche-2); border-radius: 8px; padding: 12px 14px; }
.kennzahl b { display: block; font-size: 22px; color: var(--marke-hell); }
.status-ok { color: var(--ok); }
.status-fehler { color: var(--gefahr); }

/* ---------- Schmale Liste (richtet sich nach der Breite der Liste, nicht des Fensters) */
@container (max-width: 760px) { .col-info { display: none; } }
@container (max-width: 600px) { .col-von { display: none; } }
@container (max-width: 420px) { .col-datum, .col-groesse { display: none; } }

/* ---------- Mobil */
@media (max-width: 1100px) {
  .details { position: fixed; right: 0; top: 52px; bottom: 0; width: min(380px, 100%); z-index: 30; box-shadow: var(--schatten); }
}
@media (max-width: 680px) {
  .app { grid-template-columns: 1fr; }
  .seite { position: fixed; top: 52px; bottom: 0; left: 0; width: 260px; z-index: 35; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--schatten); }
  .seite.offen { transform: none; }
  .menuknopf { display: block; }
  .marke .titel { display: none; }
  .pfadzeile { font-size: 17px; padding: 12px 16px 6px; }
  .liste-rahmen { padding: 0 8px 24px; }
  .befehle { padding: 6px 8px; }
  .text-ausblenden { display: none; }
}

/* ---------- Volltextsuche & Texterkennung */
.namespalte { min-width: 0; flex: 1; }
.namezeile { display: flex; align-items: center; min-width: 0; }
.treffer { font-size: 12px; color: var(--leise); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
mark { background: #fde68a; color: #1d2233; border-radius: 2px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { mark { background: #8a6d14; color: #fff; } }
button.chip { cursor: pointer; font: inherit; font-size: 12px; }
.chip.an { background: var(--marke); border-color: var(--marke); color: #fff; }
.suchart { align-items: center; }
.marker.laeuft svg { animation: pulsieren 1.2s ease-in-out infinite; color: var(--marke-hell); }
@keyframes pulsieren { 50% { opacity: .25; } }
.drehen { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--linie); border-top-color: var(--marke-hell); border-radius: 50%; animation: drehen .8s linear infinite; vertical-align: -1px; }
@keyframes drehen { to { transform: rotate(360deg); } }
pre.volltext { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.5 Menlo, Consolas, monospace; background: var(--flaeche-2); border-radius: 6px; padding: 10px; margin: 0; max-height: 60vh; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .marker.laeuft svg, .drehen { animation: none; } }

/* ---------- Teilen */
.nav-zahl { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--marke-hell); color: #fff; font-size: 11px; text-align: center; line-height: 18px; }
a.chip { text-decoration: none; }
.alle-check.alle { background: var(--marke-hell); border-color: var(--marke-hell); color: #fff; }
.teilen .koerper { min-height: 360px; }
.teilen-neu { border: 1px solid var(--linie); border-radius: 8px; padding: 10px; }
.personenliste { max-height: 210px; overflow-y: auto; margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px; }
.person { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.person:hover { background: var(--hover); }
.person .avatar, .freigabe-zeile .avatar { width: 28px; height: 28px; font-size: 11px; border: 0; cursor: default; flex: none; }
.freigabe-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: 13px; }

/* ---------- Hochladen */
.uploads { width: 380px; max-width: calc(100vw - 32px); }
.uploads-kopf { gap: 8px; }
.uploads-kopf .u-titel { flex: 1; }
.uploads-kopf .u-kurz { font-size: 12px; opacity: .85; }
.uploads-kopf button { font-size: 14px; padding: 2px 6px; }
.u-gesamt { padding: 10px 14px; border-bottom: 1px solid var(--linie); }
.u-gesamt .u-info { margin-top: 6px; }
.u-aktionen { display: flex; gap: 6px; margin-top: 6px; }
.u-aktionen .knopf { border: 1px solid var(--linie); }
.balken.gross { height: 8px; border-radius: 4px; }
.balken.fehler > div { background: var(--gefahr); }
.uploads-liste { max-height: 300px; overflow-y: auto; }
.uploads.klein .uploads-liste, .uploads.klein .u-aktionen { display: none; }
.upload-zeile { padding: 7px 14px; }
.u-zeile { display: flex; align-items: center; gap: 8px; }
.u-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-status { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.upload-zeile .balken { margin-top: 4px; height: 3px; }
.upload-zeile.fertig .balken > div { background: var(--ok); }
.upload-zeile.fehler .u-status { color: var(--gefahr); }
.upload-zeile.fehler .balken > div { background: var(--gefahr); }
.upload-zeile.abgebrochen { opacity: .5; }
.hochladen-zeile { opacity: .75; }
.hochladen-zeile .balken { margin-top: 4px; height: 3px; max-width: 260px; }
.kachel.hochladen-zeile .balken { margin: 6px auto 0; }
@media (prefers-reduced-motion: reduce) { .balken > div { transition: none; } }

/* ---------- Sicherheit, Sicherung, Aufbewahrung */
.hinweis-warn { background: #fff4e0; border: 1px solid #f1d39b; color: #7a4b00; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
@media (prefers-color-scheme: dark) { .hinweis-warn { background: #3d2c10; border-color: #6b4c17; color: #ffd99a; } }
.sicherung-zustand { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sicherung-zustand > div { background: var(--flaeche-2); border-radius: 8px; padding: 10px 12px; }

/* ---------- Glocke */
.glocke { position: relative; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.glocke:hover { background: rgba(255,255,255,.12); }
.glocke-zahl { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: #e74c3c; color: #fff; font-size: 11px; font-weight: bold; line-height: 18px; padding: 0 4px; text-align: center; }
.glocke-panel { position: fixed; top: 56px; right: 12px; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten); z-index: 60; }
.glocke-kopf { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.glocke-kopf b { flex: 1; }
.glocke-liste { overflow-y: auto; }
.glocke-eintrag { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--linie); padding: 10px 12px; cursor: pointer; color: var(--text); }
.glocke-eintrag:hover { background: var(--hover); }
.glocke-eintrag.neu { background: color-mix(in srgb, var(--marke-hell) 9%, transparent); }
.glocke-eintrag.neu b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--marke-hell); margin-right: 6px; vertical-align: 1px; }
.glocke-icon svg { width: 18px; height: 18px; color: var(--marke-hell); }
.glocke-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.glocke-text .leise { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Suche mit Filtern, Metadaten */
.filterleiste { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 24px 10px; align-items: center; }
.filterleiste .eingabe { height: 32px; width: auto; min-width: 0; font-size: 13px; }
.filterleiste .weit { flex: 1 1 220px; }
.filterleiste .kurz { width: 90px; }
.filter-gruppe { display: inline-flex; gap: 4px; align-items: center; }
.meta-zeile { font-size: 12px; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schlagwort { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--text); }
.nav a { position: relative; }
.nav-weg { margin-left: auto; background: none; border: 0; color: var(--leise); cursor: pointer; padding: 2px; border-radius: 4px; opacity: 0; }
.nav a:hover .nav-weg { opacity: 1; }
.knopf.an svg { color: var(--marke-hell); }

/* ---------- Wiedervorlagen, Gruppen */
.wv-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: 13px; }
.wv-zeile.faellig b, tr.wv-faellig td:first-child b { color: var(--gefahr); }
.avatar.gruppe { background: var(--marke); }
@media (max-width: 680px) { .filterleiste { padding: 0 8px 8px; } .filterleiste .eingabe { flex: 1 1 140px; } }

/* ---------- Prüfung & Freigabe */
.pruefmarke { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 7px; border-radius: 8px; margin-right: 4px; background: var(--flaeche-2); color: var(--leise); border: 1px solid var(--linie); white-space: nowrap; }
.pruefmarke.ok { background: #e3f4ea; border-color: #bfe3cd; color: var(--ok); }
.pruefmarke.warten { background: #fdf3e1; border-color: #f2dcae; color: var(--warn); }
.pruefmarke.fehler { background: #fbe9e7; border-color: #f1c1bb; color: var(--gefahr); }
@media (prefers-color-scheme: dark) {
  .pruefmarke.ok { background: #1d3b2a; border-color: #2c5a40; color: #8fe0b0; }
  .pruefmarke.warten { background: #3d2f14; border-color: #5e4720; color: #ffd27f; }
  .pruefmarke.fehler { background: #4d2420; border-color: #6e322c; color: #ffc9c2; }
}
.pruef-offen { border: 1px solid var(--linie); border-left: 3px solid var(--warn); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; background: var(--flaeche-2); }
.pruef-notiz { margin-top: 4px; font-style: italic; }
.pruef-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pruef-knoepfe:empty { display: none; }
.abschnitt-titel { font-size: 14px; margin: 18px 16px 8px; color: var(--marke-hell); }
.tabelle img.mini { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--linie); }
.leer.klein-leer { padding: 20px; }
.leer.klein-leer svg { width: 32px; height: 32px; }
.details .bild.seite { cursor: zoom-in; object-fit: contain; border: 1px solid var(--linie); }

/* ---------- Posteingang */
.pe-rahmen { position: relative; }
.pe-liste { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 24px; }
.pe-karte { display: grid; grid-template-columns: 120px 1fr; gap: 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; }
.pe-bild { width: 120px; height: 160px; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche-2); display: grid; place-items: center; overflow: hidden; cursor: zoom-in; padding: 0; }
.pe-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pe-bild .typicon { width: 56px; height: 56px; }
.pe-haupt { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pe-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pe-kopf b { overflow-wrap: anywhere; }
.pe-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.pe-felder .feld { margin: 0; }
.pe-felder .feld.breit2 { grid-column: span 2; }
.pe-felder small { display: block; margin-top: 2px; }
.pe-knoepfe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.pe-knoepfe .abstand { flex: 1; }
@media (max-width: 700px) {
  .pe-karte { grid-template-columns: 1fr; }
  .pe-bild { width: 100%; height: 140px; }
  .pe-felder .feld.breit2 { grid-column: auto; }
}
.pruef-aktionen { text-align: right; }
.pruef-aktionen .pruef-knoepfe { justify-content: flex-end; margin-top: 0; }

/* ---------- Posteingang: Wege hinein */
.pe-wege { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 4px 16px 8px; }
.pe-ablage { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border: 2px dashed var(--linie); border-radius: var(--radius); background: var(--flaeche); cursor: pointer; color: var(--text); }
.pe-ablage:hover, .pe-ablage.ueber { border-color: var(--marke-hell); background: var(--hover); }
.pe-ablage > svg, .pe-laufwerk > svg { width: 28px; height: 28px; flex: 0 0 28px; color: var(--marke-hell); }
.pe-laufwerk { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); font-size: 13px; }
.pe-laufwerk > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pe-pfad { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pe-pfad code { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 4px; padding: 2px 6px; overflow-wrap: anywhere; }

/* ---------- Suchfelder (ersetzen Auswahllisten mit mehr als 3 Einträgen) */
input.suchfeld { width: 100%; height: 36px; border: 1px solid var(--linie); border-radius: 6px; padding: 0 30px 0 10px; background: var(--flaeche);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646b80' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; text-overflow: ellipsis; }
input.suchfeld:focus { border-color: var(--marke-hell); outline: none; }
input.suchfeld::placeholder { color: var(--leise); }
.suchfeld-liste { position: fixed; z-index: 200; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; box-shadow: var(--schatten); overflow-y: auto; padding: 4px; font-size: 13px; }
.suchfeld-option { padding: 7px 10px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.suchfeld-option:hover { background: var(--hover); }
.suchfeld-option.aktiv { background: var(--auswahl); }
.suchfeld-option.gewaehlt { font-weight: bold; color: var(--marke-hell); }
.suchfeld-option.leer { color: var(--leise); font-style: italic; }
.suchfeld-option mark { background: transparent; color: inherit; text-decoration: underline; text-decoration-color: var(--marke-hell); text-decoration-thickness: 2px; }
.suchfeld-gruppe { padding: 8px 10px 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); }
.suchfeld-hinweis { padding: 8px 10px; color: var(--leise); font-size: 12px; }

/* ---------- Mein Bereich · Team · Archiv */
.nav a.unter { padding-left: 30px; font-size: 13px; }
.nav a.unter svg { width: 15px; height: 15px; }
.nav h4:empty { margin: 8px 12px; padding: 0; border-top: 1px solid var(--linie); height: 0; }
.pruefmarke.archiv { background: #ece9f8; border-color: #d3cdee; color: #5a4b9a; }
@media (prefers-color-scheme: dark) { .pruefmarke.archiv { background: #2c2747; border-color: #433b6b; color: #cfc6ff; } }
.chip.archiv { background: #ece9f8; border-color: #d3cdee; color: #5a4b9a; }
@media (prefers-color-scheme: dark) { .chip.archiv { background: #2c2747; border-color: #433b6b; color: #cfc6ff; } }
.archiv-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.archiv-hinweis > svg { color: #7a68c8; }
.archiv-jahre { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.archiv-kasten { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d3cdee; background: #f4f2fc; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.archiv-kasten > svg { width: 20px; height: 20px; flex: 0 0 20px; color: #7a68c8; }
.archiv-kasten .knopf { margin-top: 6px; }
@media (prefers-color-scheme: dark) { .archiv-kasten { background: #232038; border-color: #433b6b; } }

/* ---------- Archiv-Ablage */
.ar-suche { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 16px 10px; }
.ar-suche .weit { flex: 1 1 280px; }
.ar-listen { padding: 0 0 24px; }
.ar-zeile { display: flex; gap: 12px; align-items: center; margin: 0 16px 8px; padding: 10px 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.ar-zeile.pruefen { border-left: 3px solid var(--warn); }
.ar-bild { width: 44px; height: 56px; flex: 0 0 44px; border: 1px solid var(--linie); border-radius: 4px; background: var(--flaeche-2); display: grid; place-items: center; overflow: hidden; padding: 0; cursor: zoom-in; }
.ar-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ar-bild .typicon { width: 26px; height: 26px; }
.ar-haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-haupt b, .ar-haupt a { overflow-wrap: anywhere; }
.ar-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ar-vorschlaege .ar-p { opacity: .75; font-weight: normal; margin-left: 2px; }
.ar-vorschlaege input.suchfeld, .ar-aktionen input.suchfeld { width: 190px; height: 30px; }
.ar-aktionen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ar-facetten { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
@media (max-width: 700px) { .ar-zeile { flex-wrap: wrap; } .ar-aktionen { justify-content: flex-start; } }
.rollen-wahl { display: flex; flex-wrap: wrap; gap: 4px 18px; }
