/* index.css – Login-Bildschirm, abgestimmt auf das dunkle Webdesign
   (vgl. styles/style.css: --bg-dark var(--bg-dark), --nav-bg var(--nav-bg),
    --primary-color #007bff, Segoe UI). */

:root {
    --primary-color: #007bff;
    --bg-dark: #1a1d21;
    --card-bg: #2a2e35;
    --field-bg: #1f232b;
    --border: #3f4458;
    --card-border: rgba(255, 255, 255, 0.06);
    --placeholder: rgba(255, 255, 255, 0.35);
    --text-light: #f8f9fa;
    --text-muted: #a0a0a0;
    --transition: all 0.3s ease;
    color-scheme: dark;
}

/* Helles Farbschema (gesetzt von js/theme.js; Umschalter im Header der
   inneren Seiten — die Login-Seite folgt der gespeicherten Wahl). */
html[data-theme="light"] {
    --bg-dark: #eef1f5;
    --card-bg: #ffffff;
    --field-bg: #f5f7fa;
    --border: #c9ced8;
    --card-border: rgba(0, 0, 0, 0.08);
    --placeholder: rgba(0, 0, 0, 0.35);
    --text-light: #1d2129;
    --text-muted: #5a6270;
    color-scheme: light;
}

html {
    background-color: var(--bg-dark);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background-color: var(--bg-dark);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-light);
}

/* ── Karte ──────────────────────────────────────────────────────────── */
.modal-content {
    width: 100%;
    max-width: 380px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: login-appear 0.35s ease;
}

@keyframes login-appear {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ───────────────────────────────────────────────────────────── */
.imgcontainer {
    text-align: center;
    margin: 0;
    padding: 32px 32px 8px;
    position: relative;
}

img.avatar {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

.container {
    padding: 20px 32px 32px;
}

/* ── Beschriftungen & Felder ───────────────────────────────────────── */
label {
    display: block;
    text-align: left;
    margin: 14px 0 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type='password'],
input[type='text'] {
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;
    background-color: var(--field-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: var(--transition);
}

input[type='password']::placeholder,
input[type='text']::placeholder {
    color: var(--placeholder);
}

input[type='password']:focus,
input[type='text']:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Passwort-Sichtbarkeit (Auge im Feld) → styles/pw-eye.css,
   gemeinsam mit passwort.php gepflegt. */

/* ── Feststelltaste-Warnung ────────────────────────────────────────── */
.capslock-warning {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(240, 173, 78, 0.5);
    background-color: rgba(240, 173, 78, 0.12);
    color: #f0ad4e;
    font-size: 0.82rem;
    text-align: left;
}

/* ── Schaltfläche ──────────────────────────────────────────────────── */
button {
    width: 100%;
    margin-top: 22px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background-color: #1a87ff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

button:active {
    transform: translateY(1px);
}

/* ── TOTP-Eingabe ──────────────────────────────────────────────────── */
.totp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0 4px;
}

.totp-digit {
    width: 44px;
    height: 54px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    background-color: var(--field-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    caret-color: transparent;
    transition: var(--transition);
}

.totp-digit:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.totp-digit.filled {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.10);
}

/* ── Anmelden mit Passkey ──────────────────────────────────────────────
   Gleiche Größe wie der Hauptknopf, aber zurückhaltend: Er steht daneben,
   nicht darüber — wer keinen Passkey hat, soll den gewohnten Weg zuerst
   sehen. Ein feiner Strich darüber trennt beide Wege. */
.passkey-knopf {
    margin-top: 14px;
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-light);
    font-weight: 500;
}

.passkey-knopf:hover {
    background-color: rgba(255, 255, 255, .06);
    border-color: var(--primary-color);
    box-shadow: none;
}

/* ── Fehlermeldung ─────────────────────────────────────────────────── */
.error-popup {
    text-align: center;
    background: #c0392b;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1rem;
    margin: 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-popup--visible {
    opacity: 1;
}

/* ── Link unten rechts ─────────────────────────────────────────────── */
.site-link {
    position: fixed;
    right: 18px;
    bottom: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.site-link:hover {
    color: var(--primary-color);
}

/* Zweiter Verweis in derselben Zeile, aber in der anderen Ecke: Rechts steht
   www.go-sys.de, links das Impressum. Übereinander gestapelt lägen beide im
   Zwei-Faktor-Schritt unter dem „Abbrechen" der Karte. */
.site-link--links {
    right: auto;
    left: 18px;
}

/* Impressum und Datenschutz stehen als Paar in der linken unteren Ecke —
   beides Pflichtangaben, die vor der Anmeldung erreichbar sein müssen. */
.site-links {
    position: fixed;
    left: 18px;
    bottom: 14px;
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
}

.site-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.site-links a:hover { color: var(--primary-color); }

/* ── Impressum (impressum.php) ──────────────────────────────────────────
   Dieselbe Karte wie die Anmeldung, nur etwas breiter: 380 px sind für ein
   Formular richtig, reißen aber „Umsatzsteueridentifikationsnummer" in drei
   Zeilen. */
.modal-content--text { max-width: 460px; }

.impressum-titel {
    margin: 0 0 18px;
    font-size: 1.25rem;
    font-weight: 600;
}

.impressum-abschnitt {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Die Angaben in Blöcken: Anschrift, Kontakt, Vertretung, Register, Steuer.
   Jeder Block ist eine Einheit, deshalb Abstand zwischen den Blöcken und
   nicht zwischen den Zeilen. */
.impressum-block {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.impressum-block:last-child { margin-bottom: 0; }

.impressum-block a {
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.impressum-block a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ── Datenschutz (datenschutz.php) ──────────────────────────────────────
   Dieselbe Karte, aber ein langer Text: breiter, und der Rand oben statt
   mittig. body zentriert senkrecht (align-items: center) — ist das Kind höher
   als der Bildschirm, schneidet das oben ab, ohne dass man hochrollen kann. */
body.doc-seite { align-items: flex-start; }

.modal-content--doc { max-width: 760px; }

.ds-abschnitt {
    margin: 28px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--card-border);
    font-size: 1.05rem;
    font-weight: 600;
}

.ds-unter {
    margin: 18px 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Die fett ausgezeichneten Zwischenzeilen der Vorlage („Wie erfassen wir Ihre
   Daten?"): keine Überschrift, aber auch kein Fließtext. */
.ds-zwischen {
    margin: 14px 0 4px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ds-block {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.65;
    /* Die Vorlage nennt lange Adressen im Text; ohne Umbruchpunkt schieben sie
       die Karte auf schmalen Schirmen über den Rand. */
    overflow-wrap: anywhere;
}

.ds-liste {
    margin: 0 0 12px;
    padding-left: 22px;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* „Stand: 11. September 2026" unter der Überschrift — gehört zum Text, ist
   aber keine Aussage über Daten. */
.ds-stand {
    margin: -10px 0 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Die Tabelle der Speicherfristen. Sie darf auf schmalen Schirmen seitlich
   rollen, statt die Karte auseinanderzuziehen — deshalb display:block am
   Element selbst und nicht ein Rahmen darum. */
.ds-tabelle {
    display: block;
    overflow-x: auto;
    width: 100%;
    margin: 0 0 14px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ds-tabelle th,
.ds-tabelle td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--card-border);
}

.ds-tabelle th {
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.ds-tabelle tr:last-child td { border-bottom: none; }
