/* DaVisionMail: dunkel und futuristisch (Design-Richtung A vom 07.10.2026).
   Keine externen Schriften oder Bilder, keine Inline-Styles (CSP). Funktioniert ohne JavaScript. */
:root {
  --bg: #070b16;
  --bg2: #0d1426;
  --card: rgba(255, 255, 255, 0.05);
  --card-solid: #111a2f;
  --line: rgba(255, 255, 255, 0.10);
  --text: #e8edf7;
  --muted: #8b97b1;
  --accent: #46e6ff;
  --accent2: #8b5cf6;
  --grad: linear-gradient(135deg, #46e6ff 0%, #8b5cf6 100%);
  --ok: #3ee39b;
  --warn: #ffc65c;
  --err: #ff6b81;
  --input: rgba(255, 255, 255, 0.06);
  --input-line: rgba(255, 255, 255, 0.18);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glow: 0 0 0 1px rgba(70, 230, 255, 0.25), 0 0 30px rgba(70, 230, 255, 0.18);
  --radius: 16px;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-size: 16px; line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 246, 0.25), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(70, 230, 255, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.3rem 0 0.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 0.8rem; }
h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
p { margin: 0 0 0.8rem; }

/* --- Kopf, Reiter, Fuß ------------------------------------------------------------------------ */
.shell { max-width: 1080px; margin: 0 auto; padding: 1.4rem 1rem 3rem; }
.topbar { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; color: var(--text); text-decoration: none; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); box-shadow: var(--glow); display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: 0.02em; flex: none; }
.brand-name { font-weight: 700; letter-spacing: 0.02em; display: block; }
.brand-sub { color: var(--muted); font-size: 0.82rem; display: block; }
.who { color: var(--muted); font-size: 0.9rem; }
.topbar form { margin: 0; }
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0 0 1.4rem; padding: 0.35rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); width: fit-content; max-width: 100%; list-style: none; }
.tabs a { display: block; padding: 0.5rem 0.9rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: var(--grad); color: #fff; box-shadow: var(--glow); }
footer.bottom { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1rem; }
.narrow { max-width: 520px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.spaced { margin-top: 1rem; }

/* --- Karten, Hinweise, Status ----------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card.danger-zone { border-color: rgba(255, 107, 129, 0.35); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: var(--accent); font-weight: 700; }
.lead { color: var(--muted); font-size: 1.02rem; margin: 0 0 1.3rem; }
.muted { color: var(--muted); font-size: 0.92rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.86rem; }
.notice { border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: 0.94rem; border: 1px solid; }
.notice ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.notice.info { color: var(--text); border-color: rgba(70, 230, 255, 0.35); background: rgba(70, 230, 255, 0.08); }
.notice.ok { color: var(--ok); border-color: rgba(62, 227, 155, 0.4); background: rgba(62, 227, 155, 0.10); }
.notice.warn { color: var(--warn); border-color: rgba(255, 198, 92, 0.4); background: rgba(255, 198, 92, 0.10); }
.notice.error { color: var(--err); border-color: rgba(255, 107, 129, 0.45); background: rgba(255, 107, 129, 0.10); }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 99px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); background: rgba(62, 227, 155, 0.14); }
.status.ok::before { box-shadow: 0 0 10px var(--ok); }
.status.warn { color: var(--warn); background: rgba(255, 198, 92, 0.14); }
.status.error { color: var(--err); background: rgba(255, 107, 129, 0.14); }
.status.off { color: var(--muted); background: rgba(255, 255, 255, 0.06); }
.tag { font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0.15rem 0.6rem; white-space: nowrap; }

/* --- Formulare und Knöpfe --------------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: 0.92rem; margin: 1rem 0 0.35rem; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 12px; border: 1px solid var(--input-line);
  background: var(--input); color: var(--text); font-size: 1rem; font-family: inherit; outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
select option { background: var(--card-solid); color: var(--text); }
input[type=number] { max-width: 9rem; }
input.code { max-width: 12rem; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; padding: 0.6rem 0.5rem; }
input.code.small-code { max-width: 7.5rem; font-size: 1rem; letter-spacing: 0.15em; padding: 0.4rem 0.5rem; }
textarea { min-height: 6.5rem; resize: vertical; }
label.plain-label { margin: 0; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 0; border-radius: 12px;
  padding: 0.75rem 1.25rem; font-size: 1rem; font-weight: 600; cursor: pointer; color: #fff; background: var(--grad);
  box-shadow: var(--glow); text-decoration: none; font-family: inherit; margin-top: 1rem;
}
button:hover, .button:hover { filter: brightness(1.08); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button.secondary, .button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { border-color: var(--accent); }
button.danger { background: linear-gradient(135deg, #ff6b81, #f97316); box-shadow: 0 0 24px rgba(255, 107, 129, 0.25); }
button.small { padding: 0.35rem 0.75rem; font-size: 0.86rem; margin-top: 0; border-radius: 10px; }
button.link { background: none; box-shadow: none; color: var(--accent); padding: 0; margin: 0; font-weight: 500; font-size: 0.92rem; }
button[disabled] { opacity: 0.6; cursor: wait; }
.actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-top: 1.4rem; }
.actions button, .actions .button { margin-top: 0; }
.actions form { margin: 0; }
.inline-form { display: inline; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 14rem; }
.copy-row { display: flex; gap: 0.5rem; align-items: center; }
.copy-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92rem; }
.copy-row button { margin-top: 0; white-space: nowrap; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--bg2); border: 1px solid var(--line); padding: 0.55rem 0.8rem; border-radius: 10px; font-size: 0.95rem; }

/* Schalter: Checkbox, die wie ein Kippschalter aussieht (ohne JavaScript). */
input[type=checkbox].switch { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 99px; background: var(--input-line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background 0.2s; }
input[type=checkbox].switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
input[type=checkbox].switch:checked { background: var(--grad); box-shadow: var(--glow); }
input[type=checkbox].switch:checked::after { transform: translateX(22px); }
input[type=checkbox].switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.toggles { display: grid; gap: 0.75rem; }
.toggle { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.toggle.locked { cursor: default; opacity: 0.8; }
.toggle .t { flex: 1; }
.toggle .t b { display: block; }
.toggle .t span { color: var(--muted); font-size: 0.9rem; }
.toggle form { margin: 0; flex: none; }

/* --- Listen, Tabellen ------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.2rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.checks li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-size: 0.94rem; }
.checks .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; flex: none; }
.checks .ok .ic { background: var(--ok); color: #04130c; }
.checks .warn .ic { background: var(--warn); color: #241600; }
.checks .error .ic { background: var(--err); color: #2a0008; }
.checks .off .ic { background: var(--line); color: var(--muted); }
.checks .meta { margin-left: auto; color: var(--muted); font-size: 0.84rem; text-align: right; }
.codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.codes li { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.8rem; text-align: center; }
.codes code { font-size: 1.05rem; letter-spacing: 0.06em; }
.qr { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 14px; box-shadow: var(--shadow); }
.qr svg { width: 100%; height: 100%; display: block; }
.guide { border-radius: 14px; padding: 1rem 1.1rem; background: var(--bg2); border: 1px dashed var(--line); }
.guide ol, .guide ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.92rem; }
.guide li { margin-bottom: 0.4rem; }
.guide b, .guide strong { color: var(--text); }
.rules li, .steps-plain li { margin-bottom: 0.45rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
/* Grid-Kinder dürfen schmaler werden als ihr Inhalt, sonst läuft die Seite auf dem Handy über. */
.wizard > *, .grid2 > *, .cols > *, .tiles > * { min-width: 0; }
details.advanced { margin-top: 0.5rem; }
details.passwords { margin: 0.8rem 0; border: 1px solid var(--line); border-radius: 12px; padding: 0.3rem 0.9rem; }
details.passwords > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 0.4rem 0; }
details.passwords dl { margin: 0.2rem 0 0.6rem; }
details.passwords dt { font-weight: 600; margin-top: 0.6rem; }
details.passwords dd { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; }
details.advanced > summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; padding: 0.4rem 0; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::before { content: "▸ "; }
details.advanced[open] > summary::before { content: "▾ "; }

/* --- Assistent -------------------------------------------------------------------------------- */
.wizard { display: grid; grid-template-columns: 270px 1fr; gap: 1.5rem; align-items: start; }
.wizard-side { position: sticky; top: 1rem; }
progress { width: 100%; height: 6px; margin: 0.8rem 0 1.1rem; border: 1px solid var(--line); border-radius: 99px; background: var(--card); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--card); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--grad); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--grad); border-radius: 99px; }
ol.wizard-steps { list-style: none; margin: 0; padding: 0; }
.wizard-steps li > a, .wizard-steps li > span { display: flex; gap: 0.75rem; align-items: center; padding: 0.6rem 0.8rem; border-radius: 12px; color: var(--muted); font-size: 0.95rem; text-decoration: none; border: 1px solid transparent; }
.wizard-steps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line); background: var(--card); flex: none; }
.wizard-steps .done > * { color: var(--text); }
.wizard-steps .done .dot { background: var(--ok); color: #04130c; border-color: transparent; }
.wizard-steps a:hover { border-color: var(--line); }
.wizard-steps .current > * { color: var(--text); background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.wizard-steps .current .dot { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.wizard-steps .later .dot { opacity: 0.6; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.9rem; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel h2 { margin-top: 1.5rem; }

/* --- Übersicht -------------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); min-width: 0; }
.tile .lbl { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.tile .val { font-size: 1.3rem; font-weight: 700; margin-top: 0.3rem; }
.tile .sub { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.tile form { margin-top: 0.4rem; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.activity li:last-child { border-bottom: 0; }
.activity .time { color: var(--muted); width: 5.8rem; flex: none; font-variant-numeric: tabular-nums; }
.emergency form { margin: 0; }
.emergency button { width: 100%; margin-top: 0.6rem; }
.emergency h3 { margin-top: 1.1rem; }
.rights { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; }
.rights li { margin: 0.2rem 0; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin-top: 0.8rem; }
label.check input { width: auto; margin-top: 0.25rem; }
.secret-card { border-color: rgba(255, 196, 70, 0.45); }

@media (max-width: 860px) {
  .wizard, .grid2, .cols { grid-template-columns: 1fr; }
  .wizard-side { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; }
  ol.wizard-steps { display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .wizard-steps .lbl { display: none; }
  .wizard-steps .current .lbl { display: inline; }
  h1 { font-size: 1.5rem; }
  .panel { padding: 1.3rem 1.1rem; }
}
@media (max-width: 520px) {
  .tiles, .codes { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { margin-top: 0.4rem; }
  .brand-sub { display: none; }
  .copy-row { flex-wrap: wrap; }
}
