/* Login, Konto und Benutzerverwaltung von DITASI – gleiches Design wie die App: Inter, Glas, hell und dunkel.
   Ohne gewählte Erscheinung gilt die des Systems; eine Wahl aus dem Tool setzt seiten.js als data-erscheinung. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(schrift/inter-latin-opsz-normal.woff2) format('woff2-variations'), url(schrift/inter-latin-opsz-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(schrift/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --bg: #0b0c0f;
  --panel: rgba(28, 30, 35, 0.72);
  --panel-solid: #17181c;
  --hi: rgba(255, 255, 255, 0.1);
  --hi-hover: rgba(255, 255, 255, 0.16);
  --feld: rgba(0, 0, 0, 0.3);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --red: #d9261e;
  --red-text: #ff5a4f;
  --blue: #0a84ff;
  --ok: #4cd480;
  --gelb-text: #ffd60a;
  --schatten: 0 30px 80px rgba(0, 0, 0, 0.55);
  --luftbild: saturate(.85) brightness(.55);
  --schleier: rgba(11, 12, 15, .25), rgba(11, 12, 15, .9);
  --logo-hell: none;
  --logo-dunkel: block;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: var(--body);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-erscheinung="dunkel"]) {
    --bg: #f5f5f7; --panel: rgba(255, 255, 255, 0.78); --panel-solid: #ffffff; --hi: rgba(0, 0, 0, 0.055); --hi-hover: rgba(0, 0, 0, 0.09); --feld: rgba(0, 0, 0, 0.04);
    --line: rgba(0, 0, 0, 0.1); --text: #1d1d1f; --muted: #6e6e73; --red-text: #c41f17; --ok: #1d7a3a; --gelb-text: #8a6100;
    --schatten: 0 1px 2px rgba(10, 20, 40, 0.08), 0 30px 70px rgba(10, 20, 40, 0.22); --luftbild: saturate(.9) brightness(1.05); --schleier: rgba(245, 245, 247, .2), rgba(245, 245, 247, .88);
    --logo-hell: block; --logo-dunkel: none; color-scheme: light;
  }
}
:root[data-erscheinung="hell"] {
    --bg: #f5f5f7; --panel: rgba(255, 255, 255, 0.78); --panel-solid: #ffffff; --hi: rgba(0, 0, 0, 0.055); --hi-hover: rgba(0, 0, 0, 0.09); --feld: rgba(0, 0, 0, 0.04);
    --line: rgba(0, 0, 0, 0.1); --text: #1d1d1f; --muted: #6e6e73; --red-text: #c41f17; --ok: #1d7a3a; --gelb-text: #8a6100;
    --schatten: 0 1px 2px rgba(10, 20, 40, 0.08), 0 30px 70px rgba(10, 20, 40, 0.22); --luftbild: saturate(.9) brightness(1.05); --schleier: rgba(245, 245, 247, .2), rgba(245, 245, 247, .88);
    --logo-hell: block; --logo-dunkel: none; color-scheme: light;
}
.logo.nur-hell { display: var(--logo-hell) !important; }
.logo.nur-dunkel { display: var(--logo-dunkel) !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--body); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Anmeldeseiten: Luftbild im Hintergrund, Karte mittig ---------- */
body.anmeldung { isolation: isolate; background: transparent; display: grid; min-height: 100vh; grid-template-rows: 1fr auto; place-items: center; padding: 24px 16px; position: relative; overflow-x: hidden; }
body.anmeldung::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background: url(hintergrund.jpg) center/cover no-repeat;
  filter: var(--luftbild);
  transform: scale(1.03);
}
/* Raster wie das Logo: Punkte über dem Luftbild */
body.anmeldung::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 50% 40%, var(--schleier) 75%);
}
.karte-box { width: min(410px, 100%); padding: 32px 30px 26px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--schatten); position: relative; overflow: hidden; }
.karte-box .logo { display: block; height: 34px; width: auto; margin: 0 0 24px; }
.karte-box h1 { margin: 0 0 4px; font: 700 30px/1.1 var(--display); letter-spacing: -0.03em; }
.karte-box .unter { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.feld { display: block; margin-bottom: 14px; }
.feld span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.feld input, .feld select { width: 100%; height: 44px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line); background: var(--feld); color: var(--text); font: 400 16px var(--body); outline: none; transition: border-color .15s, box-shadow .15s; }
.feld input:focus, .feld select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10,132,255,.25); }
.kennwort-zeile { position: relative; }
.kennwort-zeile input { padding-right: 76px; }
.zeigen { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--hi); color: var(--muted); font-size: 12.5px; }
.zeigen:hover { color: var(--text); }
.merken { display: flex; align-items: center; gap: 9px; margin: 4px 0 20px; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.merken input { width: 18px; height: 18px; accent-color: var(--red); }
.knopf { width: 100%; height: 48px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font: 600 17px var(--body); box-shadow: 0 8px 24px rgba(217,38,30,.3); transition: background .15s, transform .1s; }
.knopf:hover { background: #c21f18; }
.knopf:active { transform: scale(.98); }
.knopf:disabled { opacity: .6; cursor: progress; }
.meldung { min-height: 20px; margin: 12px 0 0; font-size: 14px; color: var(--red-text); }
.meldung.ok { color: var(--ok); }
.wege { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.wege a { flex: 1 1 auto; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; border: 0; background: var(--hi); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.wege a:hover { background: var(--hi-hover); }
.wege a[hidden] { display: none; }
.wege a.abmelden { color: var(--red-text); }
.wege a.abmelden:hover { background: rgba(226,35,26,.18); border-color: rgba(226,35,26,.5); }
.fuss a:hover { color: var(--text); }
.hinweis { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.fuss { margin-top: 22px; color: var(--muted); font-size: 12.5px; text-align: center; }
.fuss a { color: var(--muted); }
.fuss.vertrauen { margin-top: 18px; margin-bottom: -14px; }
.karte-box .text { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.karte-box .klein { margin: -4px 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.karte-box .klein a { color: var(--muted); }
.code-feld { font-family: var(--mono) !important; letter-spacing: .12em; }
.demo-punkte { margin: -8px 0 20px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.karte-box .meldung a { color: inherit; }
.zurueck-zeile { margin: 10px 0 0; text-align: center; font-size: 13.5px; }
.zurueck-zeile a { color: var(--muted); }

/* ---------- Zwei-Faktor-Anmeldung im Konto ---------- */
.zweit { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.zweit h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 650 18px var(--display); letter-spacing: -0.01em; }
.zweit .text { color: var(--muted); }
.zweit .text b { color: var(--text); }
.leise-knopf { background: var(--hi) !important; color: var(--text) !important; box-shadow: none !important; }
.leise-knopf:hover { background: var(--hi-hover) !important; }
.vergessen { margin-top: 12px; }
td .mail-feld { min-width: 190px; }
.qr { display: block; width: 200px; height: 200px; margin: 0 auto 12px; border-radius: 12px; background: #fff; padding: 6px; }
.zweit code { font: 500 13px var(--mono); color: var(--text); letter-spacing: .04em; word-break: break-all; }
.ersatz { list-style: none; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--feld); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font: 500 14.5px var(--mono); letter-spacing: .03em; }
.knopf-reihe { display: flex; gap: 8px; margin: 0 0 14px; }
.knopf-reihe button { flex: 1; height: 38px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--hi); font-size: 14px; font-weight: 600; }
.knopf-reihe button:hover { background: var(--hi-hover); }
.knopf-reihe button.gefahr { color: var(--red-text); }
.knopf-reihe button.gefahr:hover { background: rgba(226,35,26,.18); }

/* ---------- Benutzerverwaltung ---------- */
body.verwaltung { padding: 0 0 40px; }
.kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); }
.kopf .logo { height: 26px; width: auto; }
.kopf .titel { font: 600 17px var(--display); letter-spacing: -0.01em; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }
.kopf nav { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.kopf nav .wer { color: var(--muted); }
.kopf nav a, .kopf nav button { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 0; background: var(--hi); color: var(--text); text-decoration: none; font-size: 14px; }
.kopf nav a.haupt { background: var(--red); color: #fff; font-weight: 600; }
main.inhalt { width: min(1100px, calc(100% - 32px)); margin: 28px auto 0; display: grid; gap: 20px; }
.tafel { padding: 22px 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel-solid); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -18px rgba(0,0,0,.18); }
.tafel h2 { margin: 0 0 4px; font: 650 22px var(--display); letter-spacing: -0.02em; }
.tafel .unter { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.neu-form { display: grid; grid-template-columns: 1fr 1.1fr 1.5fr .7fr auto; gap: 12px; align-items: end; }
.neu-form .feld { margin: 0; }
.neu-form .knopf { width: auto; padding: 0 24px; height: 44px; font-size: 16px; }
.link-ausgabe { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(60,207,116,.4); background: rgba(60,207,116,.08); }
.link-ausgabe.offen { display: block; }
.link-ausgabe p { margin: 0 0 8px; font-size: 14px; }
.link-zeile { display: flex; gap: 8px; }
.link-zeile input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--feld); color: var(--text); font: 500 12.5px var(--mono); }
.link-zeile button { height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--hi); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; padding: 8px 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.kenn { font: 500 13.5px var(--mono); }
td .name-feld { width: 100%; min-width: 120px; height: 32px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; }
td .name-feld:hover, td .name-feld:focus { border-color: var(--line); background: var(--feld); outline: none; }
td select { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--feld); color: var(--text); font: inherit; padding: 0 6px; }
.marke { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.marke.aktiv { background: rgba(60,207,116,.14); color: var(--ok); }
.marke.gesperrt { background: rgba(226,35,26,.16); color: var(--red-text); }
.marke.offen { background: rgba(255,214,0,.16); color: var(--gelb-text); }
.aktionen { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.aktionen button { height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--hi); font-size: 13px; white-space: nowrap; }
.aktionen button:hover { background: var(--hi-hover); }
.aktionen button.gefahr:hover { background: rgba(226,35,26,.25); border-color: rgba(226,35,26,.6); }
.zeit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ich { color: var(--muted); font-size: 12px; margin-left: 6px; }
.mandant-name { color: var(--muted); font-weight: 500; margin-left: 6px; }
.mandant-form { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.einheit-form { grid-template-columns: 110px minmax(200px, 2fr) minmax(170px, 1fr) auto; }
.tafel { min-width: 0; }
.tabelle-rahmen { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tabelle-rahmen table { min-width: 900px; }
td .org-feld { min-width: 190px; }
.funkruf-felder { display: flex; gap: 6px; }
.funkruf-felder .name-feld { min-width: 0; }
.funkruf-felder .name-feld:first-child { width: 160px; }
.funkruf-felder .kurz-feld:first-child { width: 64px; }
td .zahl-feld { width: 72px; min-width: 0; }
td .kurz-feld { width: 64px; min-width: 0; }
td .ort-feld { width: 150px; min-width: 0; }
td .klein { display: block; color: var(--muted); font-size: 12px; }
.fremd-hinweis { margin: 0; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(255,214,0,.4); background: rgba(255,214,0,.08); color: var(--gelb-text); font-size: 14px; }
.fremd-hinweis a { color: inherit; }
.mandant-wahl { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .neu-form { grid-template-columns: 1fr; }
  .kopf { flex-wrap: wrap; padding: 10px 16px; }
  .kopf .titel { display: none; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 4px 0; }
  .aktionen { justify-content: flex-start; }
}
td.dauer { font-family: var(--mono); white-space: nowrap; }
td.jetzt { color: var(--ok, #3ccf74); font-weight: 600; }
.summe { margin-top: 12px; }
