/* Sign-in page, Mein Konto, users and roles, dialogs of the main interface. Heights in dvh (the visible height of a phone, see
   frontend/styles.css); the sign-in page keeps at least the safe area of a phone as its margin (--safe-* of frontend/styles.css,
   viewport-fit=cover in index.html), so card, maker line and support link never lie under the camera or the home bar. */
body.signed-out{display:block}.signed-out>.sidebar,.signed-out>.sidebar-backdrop,.signed-out>.main-shell{display:none}body:not(.signed-out)>.login-shell{display:none}.login-shell{min-height:100dvh;display:grid;place-items:center;padding:max(30px,var(--safe-top)) max(30px,var(--safe-right)) max(30px,var(--safe-bottom)) max(30px,var(--safe-left));background:radial-gradient(ellipse at top right,var(--brand-soft),transparent 65%),var(--surface-2)}.login-card{background:var(--surface);border:1px solid var(--line);padding:44px;border-radius:18px;box-shadow:0 20px 70px #7e082410;width:min(100%,460px)}.login-card .brand{margin-bottom:45px}.login-card h1{font-size:27px}.help{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 18px}.form-stack{display:grid;gap:17px}.form-stack>label{display:grid;gap:8px;font-size:12px;font-weight:600;color:var(--ink-soft)}.form-stack input:not([type=checkbox]),select{width:100%;border:1px solid var(--line);border-radius:7px;background:var(--input-bg);padding:11px 12px;color:var(--ink);font:inherit;font-weight:400}.form-stack input[type=checkbox]{accent-color:var(--brand);width:16px;height:16px}.form-stack .checkbox-label,.checkbox-label{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:400}.form-stack .help{margin:0}.login-card>p.help:last-child{margin-top:25px;margin-bottom:0}.panel{background:var(--surface);padding:28px;border:1px solid var(--line);border-radius:12px;max-width:500px}.admin-tabs{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:22px}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.dialog-heading h2{margin:0}dialog{border:1px solid var(--line);border-radius:14px;width:min(580px,calc(100% - 32px));max-height:90dvh;padding:28px;color:var(--ink);box-shadow:0 25px 80px #57061933}dialog::backdrop{background:var(--backdrop);backdrop-filter:blur(3px)}fieldset{border:1px solid var(--line);border-radius:8px;padding:16px}legend{font-size:12px;font-weight:600;color:var(--ink-soft);padding:0 6px}.check-list{display:grid;gap:12px}.permission-row{display:grid;grid-template-columns:1fr 155px;align-items:center;gap:12px;font-size:12px;padding:8px 0}.permission-list .help{margin-bottom:8px}#user-error,#role-error,#password-message{font-size:12px;color:var(--err-text);line-height:1.6}@media(max-width:600px){.login-card{padding:28px}.permission-row{grid-template-columns:1fr}.admin-tabs{flex-wrap:wrap}.admin-tabs button:last-child{margin-left:0}}

.card-actions{display:flex;gap:10px;flex-wrap:wrap}.secondary.danger{color:var(--err-text)}.secondary:disabled{opacity:.5;cursor:not-allowed}.admin-tabs button[aria-pressed=true]{background:var(--brand-soft);border-color:#bf647a;color:var(--brand-text)}.user-avatar{width:72px;height:72px;object-fit:cover;border-radius:50%;border:1px solid var(--line)}.form-stack textarea{width:100%;resize:vertical;border:1px solid var(--line);border-radius:7px;padding:11px 12px;color:var(--ink);font:inherit;font-weight:400}
#provider-redirect{overflow-wrap:anywhere}

#connection-dialog{width:min(540px,calc(100% - 32px))}#connection-dialog::backdrop{background:var(--backdrop);backdrop-filter:blur(5px)}#connection-description,#connection-retry-status{font-size:14px;line-height:1.7}#connection-retry{white-space:normal}#connection-retry-status:empty{display:none}
/* Quiet hint while the connection check retries (frontend/connection.js); above the header, clear of the toast at the bottom, on an
   opaque ground because the dark warning colour is translucent. Below the strip of the safe area at the top of a phone. */
.connection-notice{position:fixed;top:calc(12px + var(--safe-top));left:50%;transform:translateX(-50%);z-index:60;max-width:calc(100% - 32px);padding:8px 16px;border:1px solid var(--warn-line);border-radius:999px;background:linear-gradient(var(--warn-bg),var(--warn-bg)),var(--surface);color:var(--warn-text);font-size:12px;line-height:1.5;box-shadow:var(--shadow-2);overflow-wrap:anywhere;text-align:center;pointer-events:none}

/* Language choice on the sign-in page, Mein Konto (language, sign-in in two steps, sessions) and Protokoll. */
.login-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.login-top .brand{margin-bottom:45px}
.language-choice{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:11px;color:var(--muted)}.language-choice select{width:auto;padding:7px 9px;font-size:12px}
.account-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:20px;align-items:start}.account-grid .panel{max-width:none;margin:0}
.mfa-qr{width:220px;max-width:100%;height:auto;image-rendering:pixelated;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.recovery-codes{columns:2;font-family:ui-monospace,Consolas,monospace;font-size:13px;margin:0;padding-left:22px;line-height:1.9}
.session-list{margin:0;padding-left:18px;font-size:12px;line-height:1.9;color:var(--ink-soft)}
.audit-toolbar{gap:14px;flex-wrap:wrap;justify-content:flex-start}.table-scroll{overflow-x:auto;max-width:100%}
.audit-table{width:100%;border-collapse:collapse;font-size:12px;background:var(--surface);border:1px solid var(--line);border-radius:10px}
.audit-table th{text-align:left;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--faint);font-weight:650;padding:9px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.audit-table td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}.audit-action{font-family:ui-monospace,Consolas,monospace;font-size:11px}
.audit-details{color:var(--muted);font-size:11px}.audit-warning{color:var(--err-text)}tr.audit-warning td{background:var(--err-bg)}
#audit-more{margin-top:14px}.audit-events-title{margin-top:36px}#audit-alert.ok{border-color:var(--ok-line);background:var(--ok-bg);color:var(--ok-text)}
@media(max-width:600px){.recovery-codes{columns:1}}
/* Phone: logo and maker line leave no room beside them (also not for the 16-px field), so the language choice stands on a line of its
   own below the logo – with its label as on the desktop, close to the logo and at the usual distance from the title. */
@media(max-width:600px){.login-top{row-gap:14px;margin-bottom:28px}.login-top .brand{margin-bottom:0}}
/* Mein Konto → Darstellung: two choices with a small picture of the theme each. */
.theme-choice{display:flex;flex-wrap:wrap;gap:12px;border:0;padding:0;margin:0}.theme-choice legend{padding:0;margin-bottom:8px}
.theme-option{position:relative;display:grid;justify-items:start;gap:8px;padding:10px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--surface);font-size:13px;font-weight:500;cursor:pointer}
.theme-option:has(input:checked){border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.theme-option input{position:absolute;left:0;top:0;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}.theme-option:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:3px}
.theme-preview{display:grid;grid-template-columns:22px 1fr;gap:6px;width:132px;height:72px;padding:8px;border-radius:9px;border:1px solid var(--line)}
.theme-preview i{border-radius:5px}.theme-preview b{border-radius:5px}
.theme-preview-light{background:#f3f3f4}.theme-preview-light i{background:#18181b}.theme-preview-light b{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.login-shell{align-content:center;gap:26px}.login-maker{display:flex;align-items:center;gap:12px;font-size:11px;letter-spacing:.04em;color:var(--muted)}.login-maker img{width:146px;height:auto}
/* „Support / Hilfe anfordern“ below the maker line (look in frontend/styles.css .support-link); a little closer to it than the card. */
.login-support{margin-top:-10px}
.theme-preview-dark{background:#0d0d0f}.theme-preview-dark i{background:#18181b;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}.theme-preview-dark b{background:#1c1c1f;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}

/* Mailserver des Unternehmens im Dialog „E-Mailanbieter einrichten“: Server, Port und Verschlüsselung in einer Zeile, auf dem Telefon untereinander. */
.server-row{display:grid;grid-template-columns:minmax(0,3fr) minmax(90px,1fr) minmax(0,2fr);gap:12px;align-items:end}
@media(max-width:600px){.server-row{grid-template-columns:1fr}}
