/* NB-Anfragen – Design. Firmenfarben: Schwarz, Rot, Orange, Gold (aus dem NB-Logo). */
:root {
  --akzent: #d62828; --akzent2: #f77f00; --akzent-txt: #fff; --gold: #fcbf49;
  --bg: #f4f4f2; --flaeche: #ffffff; --flaeche2: #f8f8f6; --linie: #e2e1dc; --text: #17171a; --text2: #5b5b63;
  --kopf: #111114; --kopf-txt: #fff;
  --blau: #1d63d6; --blau-bg: #e5eefc; --orange: #c25e00; --orange-bg: #fff0e0; --gelb: #8a6500; --gelb-bg: #fff6cf;
  --gruen: #18794e; --gruen-bg: #e2f5ea; --rot: #c62828; --rot-bg: #fde8e8; --grau: #5f6368; --grau-bg: #eceef0;
  --radius: 12px; --schatten: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --schrift: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  color-scheme: light;
}
:root[data-design="blau"] { --akzent: #0b4f9c; --akzent2: #1c7ed6; --kopf: #0b1f3a; }
:root[data-design="modern"] { --akzent: #222; --akzent2: #f77f00; --kopf: #2b2b30; }
:root[data-theme="dark"] {
  --bg: #0f0f12; --flaeche: #1a1a1f; --flaeche2: #222228; --linie: #33333b; --text: #ececf0; --text2: #a5a5b0;
  --kopf: #000; --blau: #8ab4ff; --blau-bg: #1b2a44; --orange: #ffb067; --orange-bg: #3a2614; --gelb: #f2cf5b; --gelb-bg: #3a3214;
  --gruen: #6fd49c; --gruen-bg: #133324; --rot: #ff8a80; --rot-bg: #3d1717; --grau: #b5b9c0; --grau-bg: #2a2c31;
  --schatten: 0 1px 2px rgba(0,0,0,.5); color-scheme: dark;
}
:root[data-theme="dark"][data-design="klassisch"] { --akzent: #e63939; }
:root[data-theme="dark"][data-design="modern"] { --akzent: #f77f00; --akzent-txt: #111; }
:root[data-theme="dark"][data-design="blau"] { --akzent: #2f7de1; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--schrift); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
[dir="rtl"] body { font-family: Tahoma, "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif; }
a { color: var(--akzent); }
img { max-width: 100%; }
h1 { font-size: 1.45rem; margin: 0 0 12px; } h2 { font-size: 1.15rem; margin: 0 0 10px; } h3 { font-size: 1rem; margin: 0 0 8px; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .skip:focus { width: auto; height: auto; clip: auto; inset-inline-start: 8px; top: 8px; z-index: 99; background: #fff; color: #111; padding: 8px; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Knöpfe & Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: normal; text-align: center; line-height: 1.2; }
.btn:hover { border-color: var(--text2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primaer { background: linear-gradient(135deg, var(--akzent), var(--akzent2)); color: var(--akzent-txt); border-color: transparent; }
.btn.gefahr { background: var(--rot-bg); color: var(--rot); border-color: transparent; }
.btn.klein { min-height: 34px; padding: 4px 10px; font-size: .9rem; }
.btn.gross { width: 100%; min-height: 50px; font-size: 1.05rem; }
.link { background: none; border: 0; color: var(--akzent); font: inherit; cursor: pointer; padding: 6px; text-decoration: underline; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.feld label { font-weight: 600; font-size: .92rem; }
.feld small { color: var(--text2); }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 100%; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(247,127,0,.55); outline: 3px solid color-mix(in srgb, var(--akzent2) 55%, transparent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--akzent); flex: none; }
.haken { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.pw { position: relative; } .pw input { padding-inline-end: 48px; }
.pw .auge { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 20px; width: 40px; height: 40px; cursor: pointer; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }

/* Gerüst */
#app { min-height: 100vh; }
.kopf { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--kopf); color: var(--kopf-txt); }
.marke { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; flex: none; }
.marke img { height: 40px; width: auto; background: #fff; border-radius: 8px; padding: 2px 6px; }
.logo-x { color: var(--gold); font-weight: 700; } .firma-name { font-weight: 700; }
.logo-kunde-klein { height: 34px; width: auto; max-width: 110px; object-fit: contain; vertical-align: middle; background: #fff; border-radius: 6px; padding: 2px; margin-inline-end: 8px; }
.kopf-suche { flex: 1; min-width: 0; } .kopf-suche input { min-height: 40px; background: #26262c; border-color: #3a3a42; color: #fff; }
.kopf-suche input::placeholder { color: #a9a9b3; }
.kopf-rechts { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.kopf .sprache { width: auto; min-height: 36px; padding: 4px 8px; background: #26262c; color: #fff; border-color: #3a3a42; }
.kopf .btn { background: #26262c; color: #fff; border-color: #3a3a42; }
.glocke { position: relative; font-size: 22px; text-decoration: none; padding: 4px; }
.glocke .zahl { position: absolute; top: -2px; inset-inline-end: -4px; background: var(--akzent2); color: #111; border-radius: 10px; font-size: 12px; font-weight: 700; padding: 0 5px; }
.nav { position: fixed; z-index: 25; background: var(--flaeche); border-color: var(--linie); }
.nav-p { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.nav-p.aktiv { background: rgba(214,40,40,.12); background: color-mix(in srgb, var(--akzent) 12%, transparent); color: var(--akzent); }
.nav-p .ico { font-size: 20px; width: 26px; text-align: center; }
main { padding: 16px; outline: none; max-width: 1200px; }
.netz { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; background: var(--gelb-bg); color: var(--gelb); text-align: center; padding: 8px 12px; font-weight: 600; }
@media (min-width: 900px) {
  .nav { top: 56px; bottom: 0; inset-inline-start: 0; width: 230px; border-inline-end: 1px solid var(--linie); padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
  main { margin-inline-start: 230px; padding: 22px 28px 60px; }
}
@media (max-width: 899px) {
  .nav { bottom: 0; inset-inline: 0; display: flex; overflow-x: auto; border-top: 1px solid var(--linie); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-p { flex: 1 0 auto; min-width: 68px; flex-direction: column; gap: 2px; padding: 6px 6px; font-size: 11px; text-align: center; }
  .nav-p .txt { max-width: 84px; line-height: 1.15; }
  main { padding: 12px 12px 110px; }
  .netz { bottom: 66px; }
  .kopf { flex-wrap: wrap; gap: 8px; padding-inline: 10px; }
  .kopf-suche { order: 3; flex-basis: 100%; }
  .marke img { height: 34px; }
}
@media (max-width: 420px) { .kopf .btn.klein { padding: 4px 8px; font-size: .85rem; } .kopf .sprache { max-width: 92px; } }

/* Karten, Listen */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; box-shadow: var(--schatten); margin-bottom: 14px; min-width: 0; }
.karte > h2:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.titelzeile h1 { margin: 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); box-shadow: var(--schatten); }
.kachel b { display: block; font-size: 1.8rem; line-height: 1.1; }
.kachel span { color: var(--text2); font-weight: 600; }
.liste { display: flex; flex-direction: column; gap: 8px; }
.zeile { display: flex; gap: 12px; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text); min-width: 0; }
.zeile:hover { border-color: var(--text2); }
.zeile .haupt { flex: 1 1 180px; min-width: 0; }
.zeile { flex-wrap: wrap; }
.zeile .titel { font-weight: 700; overflow-wrap: anywhere; }
.zeile .unter { color: var(--text2); font-size: .9rem; overflow-wrap: anywhere; }
.zeile.dringend { border-inline-start: 5px solid var(--rot); }
.nr { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.badge.blau { background: var(--blau-bg); color: var(--blau); } .badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.gelb { background: var(--gelb-bg); color: var(--gelb); } .badge.gruen { background: var(--gruen-bg); color: var(--gruen); }
.badge.rot { background: var(--rot-bg); color: var(--rot); } .badge.grau { background: var(--grau-bg); color: var(--grau); }
.leer { color: var(--text2); padding: 18px; text-align: center; border: 1px dashed var(--linie); border-radius: var(--radius); }
.laden { display: flex; align-items: center; gap: 10px; color: var(--text2); padding: 20px; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--linie); border-top-color: var(--akzent); border-radius: 50%; animation: dreh 0.8s linear infinite; display: inline-block; }
@keyframes dreh { to { transform: rotate(360deg); } }
.fehler { background: var(--rot-bg); color: var(--rot); padding: 14px; border-radius: var(--radius); }
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip.an { background: var(--text); color: var(--flaeche); border-color: var(--text); }
.tabelle-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .85rem; color: var(--text2); white-space: nowrap; }
td input, td select { min-height: 38px; padding: 6px 8px; }
.zahl-sp { text-align: end; direction: ltr; unicode-bidi: plaintext; white-space: nowrap; }
.reiter { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--linie); margin-bottom: 14px; scrollbar-width: thin; }
.reiter button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--text2); cursor: pointer; white-space: nowrap; min-height: 44px; }
.reiter button.an { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter .z { background: var(--akzent2); color: #111; border-radius: 9px; font-size: 11px; padding: 0 5px; margin-inline-start: 4px; }
.zwei { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { .zwei { grid-template-columns: minmax(0, 1fr); } }
.info-liste { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.info-liste dt { color: var(--text2); font-weight: 600; } .info-liste dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .info-liste { grid-template-columns: 1fr; } .info-liste dd { margin-bottom: 6px; } }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--flaeche2); border-radius: 10px; padding: 10px 12px; }
.text-block[dir="auto"] { unicode-bidi: plaintext; }

/* Nachrichtenverlauf */
.verlauf { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--flaeche2); border: 1px solid var(--linie); overflow-wrap: anywhere; }
.msg.ich { align-self: flex-end; background: rgba(247,127,0,.14); background: color-mix(in srgb, var(--akzent2) 14%, var(--flaeche)); }
.msg .wer { font-size: .8rem; color: var(--text2); font-weight: 600; margin-bottom: 2px; }
.msg .txt { white-space: pre-wrap; unicode-bidi: plaintext; }
.msg .ueb { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--linie); font-size: .92rem; color: var(--text2); white-space: pre-wrap; unicode-bidi: plaintext; }
.eingabe-zeile { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; } .eingabe-zeile textarea { min-height: 48px; }

/* Dateien */
.dateien { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.datei { border: 1px solid var(--linie); border-radius: 10px; padding: 8px; text-decoration: none; color: var(--text); font-size: .85rem; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 6px; background: var(--flaeche2); }
.datei img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; background: #fff; }
.datei .ico { font-size: 40px; text-align: center; }
.ablage { border: 2px dashed var(--linie); border-radius: var(--radius); padding: 16px; text-align: center; color: var(--text2); }
.ablage.drueber { border-color: var(--akzent); background: rgba(214,40,40,.06); background: color-mix(in srgb, var(--akzent) 6%, transparent); }

/* Dialog */
.dlg-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 12px; }
.dlg { background: var(--flaeche); color: var(--text); border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dlg.breit { max-width: 900px; }
.dlg-kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--linie); gap: 10px; }
.dlg-kopf h2 { margin: 0; overflow-wrap: anywhere; } .dlg-kopf .x { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--text2); width: 44px; height: 44px; flex: none; }
.dlg-inhalt { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dlg-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); }
@media (max-width: 600px) { .dlg-bg { align-items: flex-end; padding: 0; } .dlg { border-radius: 16px 16px 0 0; max-height: 92vh; } .dlg-fuss .btn { flex: 1 1 auto; } }
#toasts { position: fixed; z-index: 80; inset-inline: 0; top: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; padding: 0 12px; }
.toast { background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--schatten); max-width: 520px; transition: opacity .5s; overflow-wrap: anywhere; }
.toast.fehler { background: var(--rot); } .toast.weg { opacity: 0; }

/* Anmeldung */
.login-seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--akzent2) 18%, var(--bg)), var(--bg) 60%); }
.login { width: 100%; max-width: 420px; text-align: start; }
.login-logo { display: block; margin: 0 auto 10px; height: auto; background: #fff; border-radius: 12px; padding: 6px; }
.login h1 { text-align: center; }
.meldung { color: var(--rot); min-height: 1.2em; margin: 4px 0 10px; }
.sprachwahl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.erst { margin-top: 14px; color: var(--text2); } .erst summary { cursor: pointer; padding: 6px 0; }
.start-laden { min-height: 100vh; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; }

/* Briefkopf / Druck */
.briefkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 3px solid var(--akzent); padding-bottom: 10px; margin-bottom: 16px; }
.briefkopf img { height: 70px; }
.druck-seite { background: #fff; color: #111; padding: 24px; border-radius: 8px; }
@media print {
  .kopf, .nav, .netz, .kein-druck, #toasts { display: none !important; }
  main { margin: 0 !important; padding: 0 !important; max-width: none; }
  body { background: #fff; } .karte { box-shadow: none; border: 0; }
  .druck-seite { padding: 0; }
}
.abhak { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.stern { color: var(--gold); }
.klein-txt { font-size: .85rem; color: var(--text2); }
.hinweis { background: var(--blau-bg); color: var(--blau); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.warnung { background: var(--gelb-bg); color: var(--gelb); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.trenner { height: 1px; background: var(--linie); margin: 14px 0; }
.bewertung button { background: none; border: 0; font-size: 24px; cursor: pointer; padding: 2px; color: var(--linie); min-width: 32px; min-height: 36px; }
.bewertung button.an { color: var(--gold); }
.aufnahme { color: var(--rot); font-weight: 700; animation: blink 1s infinite; } @keyframes blink { 50% { opacity: .4; } }

/* Tabellen auf dem Handy als Karten */
@media (max-width: 640px) {
  table.stapel thead { display: none; }
  table.stapel, table.stapel tbody, table.stapel tfoot { display: block; }
  table.stapel tr { display: block; border: 1px solid var(--linie); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
  table.stapel td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: end; }
  table.stapel td::before { content: attr(data-label); color: var(--text2); font-weight: 600; text-align: start; flex: none; }
  table.stapel td.artikel { display: block; text-align: start; } table.stapel td.artikel::before { display: block; }
  table.stapel tr.summe { display: flex; justify-content: space-between; border-width: 2px; }
  table.stapel tr.summe td::before, table.stapel td.leer-sp { display: none; }
  table.stapel td.zahl-sp { white-space: normal; }
}
.druck-seite table.stapel td::before { color: #555; }
@media (max-width: 640px) {
  table.stapel.eingabe td { align-items: center; }
  table.stapel.eingabe td input { flex: 1; min-width: 0 !important; width: auto !important; }
  table.stapel.eingabe td::before { min-width: 92px; }
}
.info-liste dd input, .info-liste dd select { width: 100%; max-width: 100%; }
/* Geräte-Freigabe */
.warn-karte { border-inline-start: 5px solid var(--gelb); }
.geraet-zeile .knopfreihe { flex-wrap: wrap; }
.geraet-pruefung { text-align: center; }
.geraet-pruefung h1 { font-size: 1.35rem; }
.geraet-pruefung .laden { justify-content: center; }
.protokoll .zeile { padding: 8px 12px; }

/* Datei-Ansicht (Fotos, PDF, Excel) */
html.ans-offen, html.ans-offen body { overflow: hidden; }
.ansicht { position: fixed; inset: 0; z-index: 90; background: #111114; color: #f2f2f4; display: flex; flex-direction: column; outline: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.ans-kopf { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #1c1c21; border-bottom: 1px solid #2d2d35; flex: none; }
.ans-kopf .btn { min-height: 40px; white-space: nowrap; background: #2a2a31; color: #f2f2f4; border-color: #3a3a44; }
.ans-kopf .btn.primaer { background: var(--akzent); color: var(--akzent-txt); border-color: var(--akzent); }
.ans-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ans-titel { font-weight: 600; font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ans-zaehler { font-size: .8rem; color: #b5b5c0; }
.ans-inhalt { flex: 1 1 auto; min-height: 0; position: relative; display: flex; }
.ans-wrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ans-flaeche { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.ans-bildflaeche { overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.ans-bildflaeche.gezoomt { cursor: grab; }
.ans-bild { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; -webkit-user-drag: none; image-orientation: from-image; }
.ans-zoom { flex: none; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px; background: #1c1c21; border-top: 1px solid #2d2d35; flex-wrap: wrap; }
.ans-zoom .btn { min-width: 46px; background: #2a2a31; color: #f2f2f4; border-color: #3a3a44; font-size: 1.1rem; }
.ans-zoom .btn:disabled { opacity: .4; }
.ans-seite { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.ans-pdf { background: #3a3a40; padding: 8px; text-align: center; touch-action: pan-x pan-y; }
.ans-canvas { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.4); display: inline-block; }
.ans-tabelle { background: #fff; color: #17171a; }
.ans-reiter { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px; background: #1c1c21; }
.ans-reiter .btn { min-height: 34px; flex: none; background: #2a2a31; color: #f2f2f4; border-color: #3a3a44; }
.ans-reiter .btn.primaer { background: var(--akzent); color: var(--akzent-txt); }
.ans-tab { border-collapse: collapse; font-size: .9rem; }
.ans-tab th, .ans-tab td { border: 1px solid #d5d5d0; padding: 5px 8px; white-space: nowrap; text-align: start; }
.ans-tab thead th { position: sticky; top: 0; background: #ececea; z-index: 1; }
.ans-tab tbody th { position: sticky; left: 0; background: #f4f4f2; color: #66666e; font-weight: 500; }
.ans-text { margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; color: #17171a; min-height: 100%; font-size: .95rem; }
.ans-mitte { display: flex; align-items: center; justify-content: center; padding: 16px; }
.ans-sonst { text-align: center; max-width: 420px; }
.ans-sonst .ico { font-size: 64px; }
.ans-sonst .klein-txt { color: #b5b5c0; }
.ans-video { max-width: 100%; max-height: 100%; }
.ans-hinweis { color: #d5d5dc; text-align: center; padding: 24px 16px; margin: auto; }
.ans-pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(40,40,48,.7); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.ans-pfeil:disabled { opacity: .25; }
.ans-vor { inset-inline-start: 6px; } .ans-nach { inset-inline-end: 6px; }
@media (max-width: 600px) { .ans-kopf { flex-wrap: wrap; gap: 6px; } .ans-name { order: -1; flex-basis: 100%; } .ans-kopf .btn { flex: 1 1 auto; white-space: nowrap; font-size: .88rem; padding: 6px 8px; } .ans-pfeil { width: 36px; height: 52px; font-size: 1.6rem; } }
.datei-link { overflow-wrap: anywhere; }

/* Nach unten ziehen zum Aktualisieren */
html, body { overscroll-behavior-y: contain; }
.ptr { position: fixed; top: env(safe-area-inset-top); left: 50%; z-index: 200; pointer-events: none; transform: translate(-50%, -70px); opacity: 0; }
.ptr.sichtbar { opacity: 1; }
.ptr.weg { transition: transform .25s ease, opacity .25s ease; }
.ptr.laedt { transition: transform .2s ease; }
.ptr-kreis { width: 40px; height: 40px; border-radius: 50%; background: var(--flaeche); color: var(--akzent); border: 1px solid var(--linie); box-shadow: 0 2px 10px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.ptr-pfeil { display: inline-block; transition: transform .1s linear; line-height: 1; }
.ptr.bereit .ptr-kreis { background: var(--akzent); color: var(--akzent-txt); border-color: var(--akzent); }
.ptr .ptr-spinner { display: none; }
.ptr.laedt .ptr-pfeil { display: none; }
.ptr.laedt .ptr-spinner { display: inline-block; }
.aktual-knopf { gap: 6px; }
@media (hover: none) and (pointer: coarse) { .aktual-knopf { display: none; } }
@media (max-width: 900px) { .aktual-knopf .txt { display: none; } }
/* Sprachauswahl im Kopf: überall gleich (Safari zeichnete sie sonst hell mit weißer Schrift) */
.kopf .sprache { -webkit-appearance: none; appearance: none; background-color: #26262c; color: #fff; padding-inline-end: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
[dir="rtl"] .kopf .sprache { background-position: left 9px center; }
.kopf .sprache option { color: #17171a; background: #fff; }

/* Mehrfach-Auswahl (endgültig löschen) */
.wahl-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; position: sticky; top: 64px; z-index: 20; }
.wahl-zeile { display: flex; align-items: center; gap: 10px; }
.wahl-zeile > :last-child { flex: 1 1 auto; min-width: 0; }
.wahl-zeile input.wahl, .wahl-leiste input[type=checkbox] { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--akzent); }
.wahl-zeile.an > :last-child { outline: 2px solid var(--akzent); outline-offset: -2px; border-radius: 12px; }
.dlg .warn-karte { padding: 10px 12px; }
.dlg .warn-karte .haken input { width: 22px; height: 22px; min-height: 0; }
@media (max-width: 899px) { .wahl-leiste { position: static; } }
