/* FIN-Check – Grundlagen (öffentliche Seite + Verwaltung) */
:root {
  --ink: #0c1626;
  --ink-2: #2b3a52;
  --muted: #63718a;
  --line: #e1e7ef;
  --line-2: #cfd8e4;
  --bg: #f4f6fa;
  --card: #ffffff;
  --brand: #1446c8;
  --brand-2: #0d2f8f;
  --brand-soft: #eaf0ff;
  --ok: #157a3c;
  --ok-bg: #eaf8ef;
  --ok-line: #b6e5c6;
  --warn: #a35400;
  --warn-bg: #fff6e8;
  --warn-line: #f6d39c;
  --danger: #b4231c;
  --danger-bg: #fff0ef;
  --danger-line: #f5bdb9;
  --info: #1c4fd1;
  --info-bg: #eef3ff;
  --info-line: #c4d4fb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(12, 22, 38, .06), 0 4px 14px rgba(12, 22, 38, .06);
  --shadow-lg: 0 18px 50px rgba(8, 18, 40, .22);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Icons */
svg.i { width: 18px; height: 18px; flex: none; }
svg.i-sm { width: 15px; height: 15px; flex: none; }
svg.i-lg { width: 24px; height: 24px; flex: none; }
svg.i-xl { width: 34px; height: 34px; flex: none; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 42px; padding: .55em 1.1em;
  border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn:focus-visible { outline: 3px solid rgba(20, 70, 200, .35); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-light:hover { background: #f3f6fb; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(12, 22, 38, .06); color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #8f1913; color: #fff; }
.btn-sm { min-height: 34px; padding: .35em .75em; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: .7em 1.4em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Formulare */
.field { margin-bottom: 1.1rem; }
.field > label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: .6em .8em; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2.2em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363718a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7em center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 70, 200, .16); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input-mono { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.hint { font-size: .84rem; color: var(--muted); margin-top: .3rem; }
.error { font-size: .86rem; color: var(--danger); margin-top: .3rem; font-weight: 500; }
.check { display: flex; gap: .6em; align-items: flex-start; font-size: .94rem; }
.check input { width: 18px; height: 18px; margin-top: .15em; flex: none; accent-color: var(--brand); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 3em; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { color: var(--ink); background: #f1f4f9; }

/* Meldungen */
.alert { display: flex; gap: .7em; align-items: flex-start; padding: .85em 1em; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 1.1rem; font-size: .95rem; }
.alert svg { margin-top: .12em; }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #0f5a2c; }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: #7a3f00; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: #8a1a14; }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: #163d9e; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert ul { margin: .3em 0 0; padding-left: 1.2em; }

/* Markierungen */
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .18em .6em; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .01em; white-space: nowrap; border: 1px solid transparent; }
.b-red { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.b-amber { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-blue { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.b-grey { background: #f1f4f8; color: #4a5872; border-color: var(--line); }
.b-dark { background: var(--ink); color: #fff; }

/* Code-Felder (Einmal-Passwort, Wiederherstellungscodes) */
.secret-box { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .06em; background: #0c1626; color: #e9f0ff; padding: .8em 1em;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: space-between; gap: 1em; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .9rem; font-family: var(--mono); font-size: 1.02rem;
  background: #f6f8fc; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 1rem; margin: 0 0 1rem; list-style: none; }
.copy-btn.copied { background: var(--ok); color: #fff; border-color: var(--ok); }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
