/* =========================================================
   Grundstil der Dashboard-Familie für das Portal.
   Übernommen aus privat-dashboard public/styles.css (Tokens, Schrift, Buttons, Badges, Hinweise, Formulare, Tabellen)
   und public/shell.css (zweigeteilte Anmeldung). Werte bewusst unverändert, damit Portal, Privat und HVT gleich wirken.
   ========================================================= */
:root {
  color-scheme: light;
  --navy: #10263b;
  --navy-deep: #0b1c2d;
  --navy-soft: #1b3954;
  --mint: #84d2bc;
  --mint-deep: #26715e;
  --ink: #173046;
  --muted: #526575;
  --line: #e2e9ee;
  --line-control: #7f909d;
  --canvas: #f4f7f9;
  --white: #fff;
  --danger: #aa3541;
  --shadow: 0 7px 26px rgba(23, 48, 70, .045);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: var(--mint-deep); text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { color: var(--navy); font-size: clamp(25px, 2.4vw, 32px); font-weight: 730; line-height: 1.18; letter-spacing: -.035em; }
h2 { color: var(--navy); font-size: 19px; font-weight: 720; line-height: 1.3; letter-spacing: -.02em; }
h3 { color: var(--navy); font-size: 15px; font-weight: 700; line-height: 1.4; }
p { overflow-wrap: anywhere; }
small { font-size: 12px; }
::selection { color: var(--navy); background: #bceadb; }
:focus-visible { outline: 3px solid #26715e; outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }

.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border-radius: 12px; color: var(--navy); background: var(--mint); font-size: 21px; font-weight: 800; }
.brand strong { display: block; font-size: 20px; font-weight: 730; line-height: 1.1; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 4px; color: #9db2c2; font-size: 12px; }
.brand--light { color: var(--navy); }
.brand--light small { color: var(--muted); }
.brand--light .brand-mark { color: var(--mint); background: var(--navy); }

.eyebrow { display: block; margin-bottom: 9px; color: var(--mint-deep); font-size: 11px; font-weight: 800; line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; color: #526575; background: #edf2f5; font-size: 12px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.badge.mint { color: #276650; background: #e4f4ec; }
.badge.amber { color: #82591c; background: #fff2da; }
.badge.blue { color: #34678e; background: #e9f2fc; }
.badge.gray { color: #5b6b77; background: #edf2f5; }
.badge.red { color: #8f2a35; background: #fdecee; }

.card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: var(--shadow); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: #fff; text-align: center; text-decoration: none; font-size: 12px; font-weight: 650; line-height: 1.45; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.button.primary { color: var(--navy); background: var(--mint); box-shadow: 0 3px 7px #26715e12; }
.button.primary:hover { background: #9bddc9; }
.button.secondary { border-color: #d9e4ea; background: #fff; }
.button.secondary:hover { border-color: #b8cdd8; background: #f7fafb; }
.button.ghost { color: var(--muted); background: transparent; }
.button.ghost:hover { color: var(--navy); background: #edf3f6; }
.button.danger { border-color: #f0d3d6; color: var(--danger); background: #fff5f5; }
.button.danger:hover { background: #ffebec; }
.button.small { min-height: 33px; padding: 6px 10px; font-size: 12px; }

.notice { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #d9e7ed; border-radius: 9px; color: #3d6275; background: #edf5fa; font-size: 12px; line-height: 1.65; }
.notice.warning { border-color: #ecdcb9; color: #775a24; background: #fff8e9; }
.notice.success { border-color: #cce6de; color: #276650; background: #eef8f3; }
.notice strong { display: block; margin-bottom: 3px; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field label, .form-field > span { color: #334e61; font-size: 12px; font-weight: 650; }
.form-field small { color: var(--muted); font-size: 12px; line-height: 1.6; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; max-width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid var(--line-control); border-radius: 7px; color: var(--ink); background: #fff; font-size: 13px; line-height: 1.5; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; margin: 0; accent-color: var(--mint-deep); }
.text-muted { color: var(--muted); }
.stack { display: grid; gap: 18px; }
.inline-form { display: inline; margin: 0; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f8fafb; font-size: 12px; font-weight: 750; letter-spacing: .035em; white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid #edf1f4; vertical-align: middle; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }

/* ---------- Anmeldung (wie Privat shell.css): Desktop zweigeteilt, mobil einspaltig ---------- */
.login-body { min-height: 100vh; background: #fff; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 48px clamp(28px, 5vw, 82px); color: #dae7ef; background: var(--navy); }
.login-intro-copy { padding: 60px 0; }
.login-intro .eyebrow { color: var(--mint); letter-spacing: .12em; }
.login-intro h1 { margin: 20px 0 28px; color: #fff; font-size: clamp(38px, 4.5vw, 68px); font-weight: 700; line-height: 1.06; letter-spacing: -.045em; }
.login-intro p { max-width: 400px; color: #bacdd9; font-size: 16px; line-height: 1.8; }
.login-features { display: grid; gap: 20px; margin-top: 42px; color: #d7e9ee; font-size: 13px; }
.login-intro > small { color: #91a9b9; font-size: 12px; }
.login-content { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.login-card { width: 100%; max-width: 390px; }
.login-card h2 { margin: 22px 0 12px; font-size: 30px; letter-spacing: -.04em; }
.login-card > .text-muted { margin-bottom: 28px; font-size: 14px; }
.login-card .notice { margin: 16px 0; }
.login-card .stack { gap: 21px; }
.login-card button { justify-content: space-between; margin-top: 5px; }
.login-footnote { margin-top: 25px; color: #526575; font-size: 12px; line-height: 1.8; }

/* ---------- Einfache Seiten (Fehler, Hinweise) ---------- */
.plain-body { min-height: 100vh; }
.plain-layout { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 12vh 16px 40px; }
.plain-card { width: 100%; max-width: 560px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.plain-copy { display: grid; gap: 14px; justify-items: start; margin-top: 26px; }
.plain-copy h1 { font-size: 26px; }

@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 0; padding: 26px; }
  .login-intro-copy { padding: 30px 0 10px; }
  .login-intro h1 { font-size: 40px; }
  .login-intro p, .login-features, .login-intro > small { display: none; }
  .login-content { align-items: flex-start; padding: 35px 25px 50px; }
}
@media (max-width: 560px) {
  body { font-size: 13px; }
  .button { min-height: 43px; padding: 10px 13px; }
  .button.small { min-height: 36px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 45px; font-size: 16px; }
  .plain-layout { padding-top: 32px; }
  .plain-card { padding: 22px; }
  th { padding: 11px; }
  td { padding: 13px 11px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
