/* ============================================================
   Karl-Transfer – eigene Oberfläche (auf dem Verbund-Framework main.css).
   Komponenten aus Karl-Rat übernommen (barrierearm: Kontrast ≥ 4,5:1, sichtbarer Fokus,
   Statusfarben nie allein bedeutungstragend). Kein Inline-CSS nötig (CSP).
   ============================================================ */
:root {
  --primary: #0b5c8a; --primary-2: #084669; --accent: #0b5c8a;
  --muted: #4b5866; --text: #15202b; --border: #c9d3de;
  --km-ok: #146c3c; --km-warn: #7a5200; --km-crit: #b42318;
  --km-ok-bg: #e3f4ea; --km-warn-bg: #fbf1da; --km-crit-bg: #fbe6e6;
  --np: #6b2d8f; --np-bg: #f3e8fa;
  --focus: #ffbf47;
}
/* ---------- Grundlagen Barrierearmut ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #000; color: #fff; padding: 10px 16px; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px #000;
}
main:focus { outline: none; }
.km [hidden] { display: none !important; }

/* ---------- Komponenten intern ---------- */
.km .page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.km .page-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.km h2 { font-size: 18px; margin: 0 0 10px; }
.km h3 { font-size: 16px; margin: 12px 0 6px; }
.km .badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12.5px; font-weight: 700; background: #e8edf3; color: #2b3846; border: 1px solid transparent; vertical-align: 1px; }
.km .b-ok { background: var(--km-ok-bg); color: var(--km-ok); border-color: #a9d8bd; }
.km .b-warn { background: var(--km-warn-bg); color: var(--km-warn); border-color: #e5c97e; }
.km .b-crit { background: var(--km-crit-bg); color: var(--km-crit); border-color: #efb4ae; }
.km .b-info { background: #e2ecf8; color: #0b4f9c; border-color: #b2c9e6; }
.km .b-np { background: var(--np-bg); color: var(--np); border-color: #d7b8ea; }
.km .tbl th { color: #2b3846; }
.km .tbl tr.dim td { color: var(--muted); }
.km .filter { max-width: 300px; margin: 0 0 8px; }
.km .tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 14px; }
.km .tabs a { padding: 8px 13px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; font-size: 14px; }
.km .tabs a.on, .km .tabs a[aria-current] { color: var(--primary); border-color: var(--primary); }
.km .dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 14px; font-size: 14px; margin: 0; } .km .dl dt { color: var(--muted); font-weight: 600; } .km .dl dd { margin: 0; }
@media (max-width: 640px) { .km .dl { grid-template-columns: 1fr; } }
.km .grid2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; } @media (max-width: 900px) { .km .grid2 { grid-template-columns: 1fr; } }
.km textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; min-height: 80px; }
.km .chk { display: flex; gap: 7px; align-items: center; color: var(--text); font-size: 14px; margin: 6px 0; }
.km .chk input { width: auto; }
.km .formrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; } .km .formrow > div { flex: 1 1 170px; }
.km .tbl-wrap { overflow-x: auto; }
.km .top { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: var(--surface); }
.km .top.np { border-left: 5px solid var(--np); }
.km .top .top-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.km .top .top-h h3 { margin: 0; }
.km .res { border-left: 4px solid var(--primary); background: var(--surface-2); padding: 8px 12px; margin: 8px 0; border-radius: 0 8px 8px 0; }
.km .part-h { margin: 18px 0 8px; padding: 6px 10px; border-radius: 8px; background: #e2ecf8; color: #0b3a73; font-size: 15px; }
.km .part-h.np { background: var(--np-bg); color: var(--np); }
.km .frist-ok { color: var(--km-ok); font-weight: 700; } .km .frist-bad { color: var(--km-crit); font-weight: 700; }
.km details > summary { cursor: pointer; }
.km .btn-danger { background: #fff; color: var(--km-crit); border: 1px solid #efb4ae; }
.km .btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.km .small { font-size: 13px; } .km .wrap { word-break: break-word; }
.km .pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 0; }
.km .pager a, .km .pager span { padding: 4px 10px; border: 1px solid var(--border); border-radius: 7px; text-decoration: none; color: inherit; }
.km .pager .on { background: var(--primary); color: #fff; border-color: var(--primary); }
.km .cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.km .cal .cd { min-height: 70px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; font-size: 12.5px; background: var(--surface); }
.km .cal .cd.out { background: transparent; border-style: dashed; }
.km .cal .cd .dn { font-weight: 700; color: var(--muted); }
.km .cal .cd a { display: block; margin-top: 2px; text-decoration: none; color: var(--primary); font-weight: 600; }
.km .cal .wd { font-weight: 700; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 700px) { .km .cal { display: none; } }

/* ---------- Druck (Einladung, Niederschrift) ---------- */
@media print {
  .sidebar, .topbar, .app-footer, .noprint, .doc-bar { display: none !important; }
  .content { margin: 0 !important; padding: 0 !important; } body { background: #fff !important; }
  .km .panel { box-shadow: none; break-inside: avoid; }
}

/* ---------- Anmeldung ---------- */
.login-body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #eef2f6; color: #15202b; display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-box { background: #fff; border: 1px solid #c9d3de; border-radius: 16px; padding: 26px 28px; width: 360px; max-width: calc(100% - 32px); }
.login-box h1 { margin: 0; font-size: 22px; } .login-box .sub { color: #4b5866; margin: 2px 0 18px; }
.login-box label { display: block; font-size: 14px; color: #3d4a58; margin: 10px 0 4px; }
.login-box input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #8a97a6; border-radius: 9px; font-size: 15px; }
.login-box .btn { display: inline-block; padding: 11px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; text-align: center; border: 1px solid #0b4f9c; background: #fff; color: #0b4f9c; cursor: pointer; margin-top: 12px; }
.login-box .btn-primary { background: #0b4f9c; color: #fff; } .login-box .block { display: block; width: 100%; box-sizing: border-box; }
.login-box details { margin-top: 18px; color: #4b5866; } .login-box .flash.err { background: #fbe6e6; color: #b42318; padding: 9px 12px; border-radius: 9px; }

/* ---------- gemeinsame Helfer ---------- */
.km .b-info { background: #e2eef7; color: #0b4a70; border-color: #b2cfe3; }
.km .hint { background: #f4f7fb; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 0 10px 10px 0; padding: 9px 12px; font-size: 13.5px; color: #2b3846; margin: 8px 0 12px; }
.km .inline { display: inline; } .km .nowrap { white-space: nowrap; } .km .r { text-align: right; }
.km .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.km .linkbox { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.km .linkbox input { flex: 1 1 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.km .meter { height: 10px; background: #e8edf3; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.km .meter > span { display: block; height: 100%; background: var(--primary); }
.km .meter.warn > span { background: #b45309; } .km .meter.crit > span { background: #b42318; }

/* ---------- Öffentliche Seiten ---------- */
body.pub { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #e3edf7 0%, #f5f8fb 60%); color: #15202b; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pub-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; }
.pub-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #0b3a5c; font-weight: 800; font-size: 20px; }
.pub-mark { width: 40px; height: 40px; border-radius: 12px; background: #0b5c8a; color: #fff; display: grid; place-items: center; font-size: 21px; }
.pub-nav a { color: #0b4f7c; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 9px; border: 1px solid #b9cde0; background: #fff; }
.pub-nav a:hover { background: #eef5fb; }
.pub-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 30px; box-sizing: border-box; }
.pub-main .panel { background: #fff; border: 1px solid #d3dde8; border-radius: 16px; box-shadow: 0 8px 28px rgba(31,59,92,.08); padding: 20px 22px; margin: 0 0 16px; }
.pub-main h1 { font-size: 24px; margin: 4px 0 6px; } .pub-main h2 { font-size: 18px; margin: 0 0 10px; }
.pub-main .lead { color: #3d4a58; margin: 0 0 14px; }
.pub-logo { text-align: center; margin: 0 0 12px; } .pub-logo img { max-width: 320px; max-height: 110px; }
.pub-foot { text-align: center; color: #4b5866; font-size: 13px; padding: 16px 12px 22px; } .pub-foot a { color: #0b4f7c; }
.pub-foot .small { margin-top: 6px; font-size: 12px; }
.pub .flash { padding: 10px 12px; border-radius: 10px; margin: 0 0 12px; font-size: 14.5px; }
.pub .flash.ok { background: #e3f4ea; color: #146c3c; } .pub .flash.err { background: #fbe6e6; color: #b42318; } .pub .flash.warn { background: #fbf1da; color: #7a5200; } .pub .flash.info { background: #e2eef7; color: #0b4a70; }
.pub label { display: block; font-size: 14px; color: #2b3846; margin: 10px 0 4px; font-weight: 600; }
.pub input[type=text], .pub input[type=email], .pub input[type=password], .pub input[type=number], .pub textarea, .pub select { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #8a97a6; border-radius: 9px; font: inherit; background: #fff; color: #15202b; }
.pub .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid #0b5c8a; background: #fff; color: #0b5c8a; cursor: pointer; font-size: 15px; }
.pub .btn-primary { background: #0b5c8a; color: #fff; } .pub .btn-primary:hover { background: #084669; }
.pub .btn[disabled] { opacity: .55; cursor: not-allowed; }
.pub .btn-sm { padding: 6px 10px; font-size: 13.5px; }
.pub .btn-danger { border-color: #b42318; color: #b42318; }
.pub .btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.pub .muted { color: #4b5866; } .pub .small { font-size: 13px; }
.pub .chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .pub .chk input { margin-top: 3px; width: auto; }
.drop { border: 2px dashed #7d9bb8; border-radius: 14px; background: #f6f9fc; padding: 26px 16px; text-align: center; cursor: pointer; }
.drop.over { background: #e6f0f9; border-color: #0b5c8a; }
.drop .big { font-size: 34px; } .drop p { margin: 6px 0; }
.files { list-style: none; padding: 0; margin: 12px 0 0; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid #e3e9f0; font-size: 14.5px; align-items: center; }
.files li .nm { word-break: break-all; } .files li .sz { color: #4b5866; white-space: nowrap; }
.files li button { border: 0; background: none; color: #b42318; cursor: pointer; font-size: 15px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } @media (max-width: 600px) { .opts { grid-template-columns: 1fr; } }
.prog { margin: 12px 0; } .prog .bar { height: 14px; background: #e3e9f0; border-radius: 8px; overflow: hidden; } .prog .bar span { display: block; height: 100%; width: 0; background: #0b5c8a; transition: width .3s; }
.prog .txt { font-size: 13.5px; color: #3d4a58; margin-top: 5px; }
.linkbox { display: flex; gap: 6px; flex-wrap: wrap; } .linkbox input { flex: 1 1 300px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.dl-list { list-style: none; padding: 0; margin: 0; } .dl-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e3e9f0; }
.dl-list .nm { word-break: break-all; font-weight: 600; } .dl-list .sz { color: #4b5866; font-size: 13.5px; }
.msgbox { white-space: pre-wrap; background: #f6f9fc; border-left: 4px solid #0b5c8a; padding: 10px 12px; border-radius: 0 10px 10px 0; margin: 0 0 12px; }
.facts { display: flex; gap: 14px; flex-wrap: wrap; color: #3d4a58; font-size: 14px; margin: 0 0 10px; }
.legal h2 { font-size: 17px; margin: 18px 0 6px; } .legal p, .legal li { line-height: 1.55; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.center { text-align: center; } .big-ico { font-size: 44px; }
.pub .skip-link { position: absolute; left: -9999px; } .pub .skip-link:focus { left: 8px; top: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 10; }
.pub a:focus-visible, .pub button:focus-visible, .pub input:focus-visible, .pub textarea:focus-visible, .pub select:focus-visible, .drop:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.logo-prev { max-width: 320px; max-height: 110px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; }
