/* ==========================================================================
   QHSE-Portal – Gestaltung
   Ruhige Flächen, klare Typografie (Inter, lokal), Linien-Icons (Lucide), hell und dunkel
   ========================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/vendor/inter/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/vendor/inter/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f9fafb; --text: #0f172a; --muted: #64748b; --line: #e5e7eb; --line-strong: #cbd5e1;
  --primary: #2563eb; --primary-2: #1d4ed8; --primary-soft: #eff4ff; --on-primary: #fff;
  --danger: #dc2626; --warn: #b45309; --ok: #047857;
  --red-bg: #fef2f2; --yellow-bg: #fffbeb; --green-bg: #ecfdf5; --grey-bg: #f1f5f9; --blue-bg: #eff6ff;
  --radius: 14px; --radius-sm: 10px; --side: 248px; --top: 60px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .04); --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 4px 16px -6px rgb(15 23 42 / .08);
  --shadow-lg: 0 12px 32px -12px rgb(15 23 42 / .25); --ring: 0 0 0 3px rgb(37 99 235 / .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --surface: #121a2b; --surface-2: #0f1626; --text: #e6eaf2; --muted: #93a1b8; --line: #222c40; --line-strong: #33405a;
    --primary: #4f8cff; --primary-2: #7aa7ff; --primary-soft: #16233f; --on-primary: #fff;
    --danger: #f87171; --warn: #fbbf24; --ok: #34d399;
    --red-bg: #2a1518; --yellow-bg: #2a2110; --green-bg: #0f2a22; --grey-bg: #1a2335; --blue-bg: #14213b;
    --shadow-sm: none; --shadow: 0 1px 0 rgb(255 255 255 / .02) inset, 0 6px 20px -10px rgb(0 0 0 / .6); --shadow-lg: 0 16px 40px -12px rgb(0 0 0 / .7);
    --ring: 0 0 0 3px rgb(79 140 255 / .3); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-feature-settings: 'cv11', 'ss01'; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .3rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.08rem; margin: 0 0 .85rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: .98rem; margin: 1rem 0 .5rem; font-weight: 650; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .mt { margin-top: 1rem; } .right { text-align: right; }
.pre { white-space: pre-wrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke-width: 1.9; vertical-align: -3px; }
.inline-ico svg.i { width: 16px; height: 16px; color: var(--muted); }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* Layout */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 30; display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); color: var(--text); }
.brand { color: var(--text); font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.who { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 500; font-size: .9rem; padding: .25rem .5rem .25rem .25rem; border-radius: 99px; }
.who:hover { background: var(--grey-bg); text-decoration: none; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); padding: .35rem; border-radius: 8px; cursor: pointer; }
.menu-btn svg.i { width: 22px; height: 22px; }
.sidebar { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line);
  padding: .9rem .7rem; overflow-y: auto; z-index: 25; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sidebar a, .navbtn { display: flex; gap: .7rem; align-items: center; padding: .48rem .7rem; border-radius: 9px; color: var(--text); font-size: .92rem; font-weight: 500;
  background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.sidebar a svg.i, .navbtn svg.i { color: var(--muted); }
.sidebar a:hover, .navbtn:hover { background: var(--grey-bg); text-decoration: none; }
.sidebar a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar a.active svg.i { color: var(--primary); }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 1rem .7rem .35rem; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.sidebar-foot .me { align-items: center; line-height: 1.25; }
.sidebar-foot .me .avatar { width: 34px; height: 34px; }
.main { margin-left: var(--side); padding: calc(var(--top) + 1.75rem) 2rem 3rem; max-width: calc(1360px + var(--side)); }
.main-plain { padding: 1rem; }
.nav-backdrop, .bottombar { display: none; }

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 .75rem; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgb(15 23 42 / .45); backdrop-filter: blur(2px); z-index: 20; }
  .main { margin-left: 0; padding: calc(var(--top) + 1rem) 1rem 96px; }
  .hide-sm { display: none; }
  .bottombar { display: flex; position: fixed; inset: auto 0 0 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; font-size: .7rem; font-weight: 500; color: var(--muted); }
  .bottombar a svg.i { width: 22px; height: 22px; }
  .bottombar a.active { color: var(--primary); }
  .bottombar a .fab { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -1.35rem; border-radius: 16px; background: var(--danger); color: #fff;
    box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--danger) 70%, transparent); }
  .bottombar a .fab svg.i { width: 24px; height: 24px; stroke-width: 2.4; }
  .bottombar a:hover { text-decoration: none; }
}

/* Komponenten */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem; margin-bottom: 1.5rem; }
.page-head .muted { font-size: .95rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.cards .card { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1rem 1.25rem; color: var(--text);
  display: block; box-shadow: var(--shadow); overflow: hidden; transition: transform .12s ease, box-shadow .12s ease; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-strong); }
a.kpi:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.kpi .n { font-size: 1.85rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: .82rem; margin-top: .15rem; overflow-wrap: anywhere; hyphens: auto; }
.kpi.red::before { background: var(--danger); } .kpi.yellow::before { background: var(--warn); } .kpi.green::before { background: var(--ok); }
.kpi.red .n { color: var(--danger); }

.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgb(37 99 235 / .25), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: var(--on-primary); }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 1px 2px rgb(220 38 38 / .3); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: transparent; color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 88%, #000); color: #fff; }
.btn-sm { padding: .34rem .7rem; font-size: .85rem; border-radius: 9px; }
.btn-sm svg.i { width: 16px; height: 16px; }
.btn-block { width: 100%; justify-content: center; padding: .85rem; font-size: 1.02rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-align: left; }

form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 550; font-size: .88rem; }
input, select, textarea { font: inherit; font-size: .95rem; font-weight: 400; padding: .58rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 100%; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=file] { padding: .45rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 150px; flex: 1; max-width: 280px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem .9rem; font-weight: 400; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .8rem; background: var(--surface-2); }

.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
.card.table-wrap > table th:first-child, .card.table-wrap > table td:first-child { padding-left: 1.25rem; }
.card.table-wrap > table th:last-child, .card.table-wrap > table td:last-child { padding-right: 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: color-mix(in srgb, var(--grey-bg) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
dl.props { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.5rem; margin: 0; }
dl.props dt { color: var(--muted); } dl.props dd { margin: 0; }
@media (max-width: 640px) { dl.props { grid-template-columns: 1fr; } dl.props dd { margin-bottom: .4rem; } }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--grey-bg); color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.badge.red, .st-neu, .st-offen, .st-gesperrt, .st-nicht_ok, .st-abweichung { background: var(--red-bg); color: var(--danger); }
.badge.yellow, .st-in_bearbeitung, .st-in_arbeit, .st-mangel, .st-pruefung, .st-entwurf, .st-nebenabweichung, .st-geplant { background: var(--yellow-bg); color: var(--warn); }
.badge.green, .st-ok, .st-abgeschlossen, .st-erledigt, .st-wirksam, .st-freigegeben, .st-positiv, .st-durchgefuehrt { background: var(--green-bg); color: var(--ok); }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .45rem; background: var(--muted); vertical-align: 1px; }
.dot.red { background: var(--danger); box-shadow: 0 0 0 3px var(--red-bg); } .dot.yellow { background: var(--warn); box-shadow: 0 0 0 3px var(--yellow-bg); } .dot.green { background: var(--ok); box-shadow: 0 0 0 3px var(--green-bg); }
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; font-size: .93rem; }
.flash-ok { background: var(--green-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-err { background: var(--red-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.list li > :last-child { flex-shrink: 0; }
.list li:last-child { border-bottom: 0; }

/* Prozesslandkarte */
.pmap { display: grid; gap: 1rem; }
.pmap .band { border-radius: var(--radius); padding: 1.1rem; border: 1px solid var(--line); }
.pmap .band h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.band.fuehrung { background: var(--yellow-bg); } .band.kern { background: var(--green-bg); } .band.unterstuetzung { background: var(--grey-bg); }
.pmap .procs { display: flex; flex-wrap: wrap; gap: .75rem; }
.proc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem 1rem; min-width: 190px; color: var(--text); box-shadow: var(--shadow-sm); }
.band.kern .proc { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-right: 1.8rem; }
.proc:hover { text-decoration: none; border-color: var(--primary); }

/* Risikomatrix */
.matrix { border-collapse: separate; border-spacing: 3px; width: auto; }
.matrix td, .matrix th { width: 46px; height: 38px; text-align: center; padding: 0; border: 0; border-radius: 6px; font-weight: 700; background: none; }
.matrix td.green { background: var(--green-bg); } .matrix td.yellow { background: var(--yellow-bg); } .matrix td.red { background: var(--red-bg); }

/* Schulungs-Quiz */
.quiz-q { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .75rem; background: var(--surface-2); }
.quiz-q.wrong { border-color: var(--danger); background: var(--red-bg); }
.quiz-q label { font-weight: 400; flex-direction: row; gap: .5rem; padding: .35rem 0; }
.course-content { font-size: 1.02rem; }
.video { position: relative; padding-top: 56.25%; margin: 1rem 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }

/* Matrix Schulungen */
.tmatrix th.rot { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; height: 160px; text-transform: none; vertical-align: bottom; }
.tmatrix td.c { text-align: center; font-size: .78rem; }
.tmatrix td.c.red { background: var(--red-bg); } .tmatrix td.c.yellow { background: var(--yellow-bg); } .tmatrix td.c.green { background: var(--green-bg); }

.login-box { max-width: 400px; margin: 10vh auto; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.big-actions a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1rem; text-align: center; color: var(--text); font-weight: 600;
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.big-actions a span { display: block; font-size: 1.75rem; margin-bottom: .25rem; }
.big-actions a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.big-actions a.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border-color: transparent; }

.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.type-pick label { min-width: 0; overflow-wrap: anywhere; hyphens: auto; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: .7rem; flex-direction: row; align-items: center; gap: .5rem; cursor: pointer; font-weight: 600; }
.type-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.photo { max-width: 100%; max-height: 380px; border-radius: 8px; border: 1px solid var(--line); }

@media print {
  .topbar, .sidebar, .bottombar, .no-print, .flash { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; color: #000; }
  .card { border: 0; padding: 0; }
}

/* GHS-Piktogramm (vereinfacht: rote Raute mit Nummer) */
.ghs { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin: .15rem .35rem .15rem .15rem; transform: rotate(45deg); border: 2px solid #c0392b; background: #fff; vertical-align: middle; }
.ghs b { transform: rotate(-45deg); font-size: .7rem; color: #000; }
.ghs.big { width: 2.2rem; height: 2.2rem; font-size: .85rem; }

/* Plattform-Verwaltung */
.ptop { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; background: var(--primary); color: #fff; padding: .7rem 1rem; margin: -1rem -1rem 1.25rem; }
.ptop .brand { color: #fff; }
.pwrap { max-width: 1200px; margin: 0 auto; }
.ptop .btn-primary { background: #fff; color: var(--primary); border-color: #fff; font-weight: 600; }

.tmatrix td.c.grey { background: var(--grey-bg); color: var(--muted); }
.badge.grey { background: var(--grey-bg); color: var(--muted); }
.tmatrix th.rot { height: 210px; max-width: 2.6rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .org-legend { display: none; } }

/* Formatierte Inhalte (Editor und Anzeige) */
.editor-wrap { background: var(--surface); border-radius: 8px; }
.editor-wrap .ql-toolbar { border-radius: 8px 8px 0 0; border-color: var(--line); background: var(--grey-bg); }
.editor-wrap .ql-container { border-radius: 0 0 8px 8px; border-color: var(--line); font: inherit; font-size: 1rem; }
.editor-wrap .ql-editor { min-height: inherit; }
.editor-wrap .ed-table, .editor-wrap .ed-row, .editor-wrap .ed-col, .editor-wrap .ed-del { width: auto !important; font-size: .8rem; font-weight: 700; color: #444; }
.editor-area { min-height: 320px; }
.rich { line-height: 1.6; }
.rich h1 { font-size: 1.45rem; margin: 1.4rem 0 .5rem; } .rich h2 { font-size: 1.2rem; margin: 1.2rem 0 .4rem; } .rich h3 { font-size: 1.05rem; margin: 1rem 0 .3rem; }
.rich img { max-width: 100%; border-radius: 6px; }
.rich table { border-collapse: collapse; margin: .8rem 0; width: auto; }
.rich td, .rich th { border: 1px solid var(--line); padding: .35rem .6rem; }
.rich blockquote { border-left: 4px solid var(--primary-2); margin: .8rem 0; padding: .3rem .9rem; background: var(--grey-bg); }
.rich .ql-align-center { text-align: center; } .rich .ql-align-right { text-align: right; } .rich .ql-align-justify { text-align: justify; }
.rich .ql-indent-1 { padding-left: 2em; } .rich .ql-indent-2 { padding-left: 4em; } .rich .ql-indent-3 { padding-left: 6em; }
.rich li[data-list="bullet"] { list-style-type: disc; } .rich ol li[data-list="bullet"] { list-style-type: disc; }
.rich ol:has(> li[data-list="bullet"]) { list-style-type: disc; }
.toc { font-size: .9rem; } .toc a { display: block; padding: .15rem 0; } .toc .l2 { padding-left: 1rem; } .toc .l3 { padding-left: 2rem; }
.st-ersetzt, .st-verworfen { background: var(--grey-bg); color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 1fr 240px; gap: 1.25rem; align-items: start; }
.doc-layout .toc { position: sticky; top: 76px; }
@media (max-width: 1100px) { .doc-layout { grid-template-columns: 1fr; } .doc-layout .toc { position: static; order: -1; } }
.diff { white-space: pre-wrap; line-height: 1.7; }
.diff ins { background: var(--green-bg); color: var(--ok); text-decoration: none; border-bottom: 2px solid var(--ok); }
.diff del { background: var(--red-bg); color: var(--danger); }
.workflow { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .85rem; margin: .4rem 0 .8rem; }
.workflow span { padding: .2rem .6rem; border-radius: 99px; background: var(--grey-bg); color: var(--muted); }
.workflow span.done { background: var(--green-bg); color: var(--ok); } .workflow span.now { background: var(--primary); color: var(--on-primary); }
.news-card { display: block; color: var(--text); }
.news-card:hover { text-decoration: none; border-color: var(--primary-2); }
.news-card.unread { border-left: 4px solid var(--warn); }
.news-important { border: 2px solid var(--danger); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; }
.news-list li > span:first-child { min-width: 0; flex-shrink: 1; overflow-wrap: anywhere; }

/* Prozesse: Landkarte, Editor, Diagramm */
.pmap-io { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.proc.draft { border-style: dashed; }
.proc-add { color: var(--muted); border-style: dashed; display: flex; align-items: center; justify-content: center; }
.diagram-wrap { overflow-x: auto; }
.diagram-wrap svg { max-width: none; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); }
.diagram-wrap svg a:hover rect, .diagram-wrap svg a:hover polygon, .diagram-wrap svg a:hover path { stroke-width: 2.6; }
.peditor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.ppreview { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 1150px) { .peditor { grid-template-columns: 1fr; } .ppreview { position: static; max-height: none; } }
.pstep { border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 8px; padding: .6rem .7rem; background: var(--surface); }
.pstep.st-start { border-left-color: var(--ok); } .pstep.st-end { border-left-color: var(--danger); } .pstep.st-decision { border-left-color: var(--warn); }
.pstep.st-doc { border-left-color: var(--muted); } .pstep.st-sub { border-left-color: var(--primary-2); }
.pstep-head { display: flex; gap: .4rem; align-items: center; }
.pstep-head select { width: 150px; flex: none; } .pstep-head input { flex: 1; min-width: 0; }
.pnr { font-weight: 700; min-width: 1.6rem; text-align: center; color: var(--muted); }
.pbtns { display: flex; gap: .15rem; } .pbtns button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: .3rem .5rem; cursor: pointer; color: var(--text); }
.pstep-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.pstep-row label { flex: 1; min-width: 150px; font-size: .8rem; }
.pstep details { margin-top: .4rem; } .pstep summary { color: var(--primary-2); }
.pinsert { display: block; margin: .25rem auto; border: 1px dashed var(--line); background: none; border-radius: 99px; padding: .1rem .8rem; font-size: .75rem; color: var(--muted); cursor: pointer; }
.pinsert:hover { color: var(--primary-2); border-color: var(--primary-2); }
.step-type { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.steps-table tr:target { background: var(--yellow-bg); }
@media (max-width: 640px) { .pstep-head { flex-wrap: wrap; } .pstep-head select { width: auto; } }
.aprog th.c, .aprog td.c { text-align: center; padding: .35rem .2rem; min-width: 2.6rem; }
.achip { display: inline-block; padding: .1rem .35rem; border-radius: 6px; font-size: .78rem; font-weight: 600; margin: 1px; background: var(--grey-bg); color: var(--text); }
.achip:hover { text-decoration: none; outline: 2px solid var(--primary-2); }
.achip.st-geplant { background: #e3eefa; color: var(--primary); } .achip.st-durchgefuehrt { background: var(--yellow-bg); color: var(--warn); } .achip.st-abgeschlossen { background: var(--green-bg); color: var(--ok); }
.aplus { display: inline-block; width: 1.6rem; color: var(--line); font-weight: 700; border-radius: 6px; }
.aprog tr:hover .aplus { color: var(--muted); } .aplus:hover { background: var(--grey-bg); color: var(--primary-2) !important; text-decoration: none; }
.ppreview .diagram-wrap svg { width: 100%; max-width: 100%; }

/* Dokumente: Ordnerbaum, Export-Menü, Rechte */
.doc-browser { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.folder-tree { padding: .5rem; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.folder-tree a { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .9rem; }
.folder-tree a:hover { background: var(--grey-bg); }
.folder-tree a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
@media (max-width: 900px) { .doc-browser { grid-template-columns: minmax(0, 1fr); } .folder-tree { position: static; max-height: 240px; } }
tr.group-row td { background: var(--surface-2); font-weight: 600; font-size: .8rem; color: var(--muted); letter-spacing: .01em; }
.nowrap { white-space: nowrap; }
details.menu { position: relative; }
details.menu > .menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 300px; padding: .4rem; display: flex; flex-direction: column; margin: 0; box-shadow: var(--shadow-lg); }
details.menu > .menu-list a { padding: .45rem .6rem; border-radius: 6px; text-decoration: none; color: var(--text); }
details.menu > .menu-list a:hover { background: var(--grey-bg); }
.access-box { border-top: 1px solid var(--line); padding-top: .75rem; }
.access-box details { margin: .3rem 0; }
.access-box .checks { max-height: 180px; }
@media (max-width: 640px) { details.menu > .menu-list { left: 0; right: auto; min-width: 260px; } }

/* Berechtigungsgruppen */
.perm-matrix th { vertical-align: top; min-width: 150px; text-transform: none; }
.perm-matrix th input { width: 100%; }
.perm-matrix td.c { text-align: center; }
.perm-matrix .new-col { background: var(--grey-bg); }
.perm-matrix td:first-child { white-space: nowrap; }
#zuordnung select { min-width: 150px; }

/* Organigramm: Baum von oben nach unten, Linien per CSS; Gesellschafts-Auswahl, Zoom */
.org-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .85rem; border: 1px solid var(--line); border-radius: 99px; font-size: .86rem; font-weight: 500;
  color: var(--text); background: var(--surface); text-decoration: none; box-shadow: var(--shadow-sm); }
.chip:hover { text-decoration: none; border-color: var(--line-strong); }
.chip .muted { font-size: .78rem; }
.chip.active { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.active .muted { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.zoom { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.zoom .btn { border: 0; border-radius: 0; box-shadow: none; min-width: 2.5rem; justify-content: center; background: none; }
.zoom .btn + .btn { border-left: 1px solid var(--line); }
.zoom .btn:hover { background: var(--grey-bg); }
.org-wrap { overflow: auto; padding: 1.75rem 1rem 1.5rem; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  background-color: var(--surface); background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 55%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.org { width: max-content; min-width: 100%; --c: var(--line-strong); }
.org ul { display: flex; justify-content: center; padding: 22px 0 0; margin: 0; position: relative; list-style: none; }
.org > ul { padding-top: 0; }
.org li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 7px 0; }
.org li::before, .org li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 1.5px solid var(--c); }
.org li::after { right: auto; left: 50%; border-left: 1.5px solid var(--c); }
.org li:only-child::before, .org li:only-child::after { display: none; }
.org li:only-child { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0 none; }
.org li:last-child::before { border-right: 1.5px solid var(--c); border-radius: 0 10px 0 0; }
.org li:first-child::after { border-radius: 10px 0 0 0; }
.org ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1.5px solid var(--c); }
.org > ul > li:only-child { padding-top: 0; }
.org ul.stack { flex-direction: column; align-items: center; }
.org ul.stack > li { padding: 12px 0 0; }
.org ul.stack > li::before { display: none; }
.org ul.stack > li::after { display: block; left: 50%; width: 0; height: 12px; border-top: 0; border-left: 1.5px solid var(--c); border-radius: 0; }
.org ul.wrap { flex-wrap: wrap; align-items: flex-start; gap: 18px 8px; max-width: 1480px; margin-top: 22px; padding: 18px 14px;
  border: 1.5px dashed var(--c); border-radius: 18px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.org ul.wrap::before { top: -24px; height: 22px; }
.org ul.wrap > li { padding-top: 0; }
.org ul.wrap > li::before, .org ul.wrap > li::after { display: none; }
.onode { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 196px; padding: .8rem .8rem .7rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-align: center; font-size: .82rem;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s; }
.onode::before { content: ''; position: absolute; left: 14px; right: 14px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rc, var(--line-strong)); }
.onode:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.otitle { font-weight: 650; font-size: .88rem; line-height: 1.3; letter-spacing: -.005em; }
.ounit { font-size: .72rem; color: var(--muted); }
.opeople { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin-top: .15rem; }
.oavatars { display: flex; }
.oav { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; margin-left: -6px; font-size: .68rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--rc, var(--primary)), color-mix(in srgb, var(--rc, var(--primary)) 55%, #000)); border: 2px solid var(--surface); }
.oav:first-child { margin-left: 0; }
.oav.more { background: var(--grey-bg); color: var(--muted); }
.onames { font-size: .76rem; color: var(--text); opacity: .85; line-height: 1.3; }
.ovacant { font-size: .74rem; color: var(--muted); font-style: italic; margin-top: .1rem; }
.orole { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-top: .1rem; }
.orole i { width: 7px; height: 7px; border-radius: 50%; background: var(--rc, var(--line-strong)); }
.onode.vacant { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.onode.vacant .otitle { color: var(--muted); }
.onode.staff { border-style: dashed; }
.onode.role-admin, .onode-mini.role-admin { --rc: #8b5cf6; } .onode.role-qhse, .onode-mini.role-qhse { --rc: #10b981; }
.onode.role-fuehrung, .onode-mini.role-fuehrung { --rc: #3b82f6; } .onode.role-mitarbeiter, .onode-mini.role-mitarbeiter { --rc: #94a3b8; }
.onode-mini { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin: 0 .3rem 0 .8rem; vertical-align: -1px; background: var(--rc); }
.org-legend { margin: -.5rem 0 1.25rem; }
.org-list { display: none; padding-left: 0; margin: 0; } .org-list ul { padding-left: 1.1rem; border-left: 1.5px solid var(--line); margin: .2rem 0 .2rem .4rem; }
.org-list li { list-style: none; padding: .3rem 0; }
@media (max-width: 900px) { .org { display: none; } .org-list { display: block; } .org-wrap { background-image: none; padding: 1rem; } .org-legend { display: none; } .org-toolbar .zoom { display: none; } }
@media print { .org-wrap { overflow: visible; background: none; } .org { display: block !important; zoom: 1 !important; } .org-list { display: none !important; } .onode { box-shadow: none; } }

/* Icons in Texten und Listen */
.li-ico { display: inline-flex; align-items: center; gap: .45rem; }
.li-ico svg.i { width: 16px; height: 16px; color: var(--muted); }
.h-ico { display: flex; align-items: center; gap: .5rem; } .h-ico svg.i { color: var(--primary); }
.badge svg.i { width: 13px; height: 13px; }
.btn svg.i { width: 16px; height: 16px; }
.big-actions a span svg.i { width: 30px; height: 30px; stroke-width: 1.7; color: var(--primary); }
.big-actions a.danger span svg.i { color: #fff; }
.result-ico svg.i { width: 64px; height: 64px; } .result-ico.ok { color: var(--ok); } .result-ico.no { color: var(--danger); }
.flash strong svg.i { vertical-align: -3px; }

/* Branding (Plattform-Verwaltung) */
.brand-row { display: flex; gap: .5rem; align-items: center; }
.brand-row input[type=color] { width: 3rem; height: 2.5rem; padding: .2rem; flex: none; cursor: pointer; }
.brand-preview { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.brand-preview img { max-height: 56px; max-width: 220px; border-radius: 8px; background: #fff; padding: .35rem .5rem; border: 1px solid var(--line); }
.swatch { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line); display: inline-block; }

/* Branding im Kundenportal */
.brand img.brand-logo { width: auto; height: 34px; max-width: 170px; object-fit: contain; border-radius: 6px; }
.brand-name { font-weight: 650; }
.login-head { text-align: center; margin-bottom: 1.25rem; }
.login-head .login-logo { max-height: 72px; max-width: 260px; object-fit: contain; margin-bottom: .5rem; }
.avatar { background: linear-gradient(135deg, var(--brand, var(--primary)), var(--brand-accent, #7c3aed)); }

/* Sprachumschalter */
.lang-switch { display: flex; align-items: center; gap: .3rem; color: var(--muted); margin: 0; }
.lang-switch .i { width: 1.05rem; height: 1.05rem; }
.lang-switch select { width: auto; border: 1px solid transparent; background: transparent; padding: .3rem 1.6rem .3rem .4rem; font-size: .85rem; color: var(--text); border-radius: 8px; min-height: 0; }
.lang-switch select:hover, .lang-switch select:focus { border-color: var(--line-strong); background: var(--surface); }
.login-lang { display: flex; justify-content: center; margin-top: 1rem; }
.nav-lang { display: none; padding: .25rem .5rem .5rem; }
.nav-lang .lang-switch select { flex: 1; width: 100%; }
@media (max-width: 900px) { .topbar .lang-switch { display: none; } .nav-lang { display: block; } }
/* Rechts-nach-links-Sprachen (z. B. Persisch) in Schulungsinhalten */
[dir="rtl"] { text-align: right; }
.lang-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.card-sub { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: .9rem 1rem; margin-bottom: 1rem; background: var(--surface-2); }
.card-sub h3 { margin: 0 0 .35rem; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.lang-pick { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; }
.lang-pick .check { font-size: .85rem; }
@media (max-width: 640px) { .topbar .btn-danger span { display: none; } .topbar .btn-danger { padding-inline: .55rem; } }

/* ---- Gefährdungsbeurteilung: Assistent ---- */
.wiz-steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1rem; counter-reset: none; }
.wiz-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.wiz-steps li span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--grey-bg); font-size: .8rem; flex: none; }
.wiz-steps li.active { border-color: var(--primary); color: var(--text); box-shadow: var(--ring); }
.wiz-steps li.active span, .wiz-steps li.done span { background: var(--primary); color: var(--on-primary); }
.wiz.js .wiz-step { display: none; }
.wiz.js .wiz-step.active { display: block; }
.wiz-nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .6rem; padding: .7rem 0; margin-top: 1rem; background: linear-gradient(to top, var(--bg) 75%, transparent); }
.wiz-nav .wiz-count { flex: 1; text-align: center; }
.wiz:not(.js) .wiz-nav [data-prev], .wiz:not(.js) .wiz-nav [data-next] { display: none; }
@media (max-width: 900px) { .wiz-nav { bottom: calc(64px + env(safe-area-inset-bottom)); } }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl span { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: .9rem .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; font-size: .88rem; cursor: pointer; min-height: 5.2rem; justify-content: center; }
.tpl span .i { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.tpl input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.tpl input:focus-visible + span { outline: 2px solid var(--primary); }
.ck-intro { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.ck-intro p { margin: 0; flex: 1 1 320px; }
.ck-group > summary { display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none; font-weight: 600; }
.ck-group > summary::-webkit-details-marker { display: none; }
.ck-group > summary .ck-gname { flex: 1; }
.ck-gico { width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.ck-group[open] > summary { margin-bottom: .75rem; }
.ck-item { border-top: 1px solid var(--line); padding: .8rem 0; }
.ck-item.typ .ck-q::after { content: '●'; color: var(--primary); font-size: .6rem; margin-left: .4rem; vertical-align: middle; }
.ck-item.missing { background: var(--red-bg); margin: 0 -.75rem; padding: .8rem .75rem; border-radius: var(--radius-sm); }
.ck-item.is-done { opacity: .75; }
.ck-q { font-weight: 500; margin-bottom: .5rem; }
.seg { display: grid; grid-template-columns: 1fr 1.4fr; gap: .4rem; max-width: 420px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .6rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .9rem; background: var(--surface); min-height: 44px; }
.seg-no input:checked + span { background: var(--grey-bg); border-color: var(--muted); color: var(--text); }
.seg-yes input:checked + span { background: var(--yellow-bg); border-color: var(--warn); color: var(--warn); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }
.wiz.js .ck-detail { display: none; }
.wiz.js .ck-item.yes .ck-detail, .ck-detail.open { display: block; }
.ck-detail { margin-top: .8rem; padding: .8rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.ck-sub { font-weight: 600; font-size: .85rem; margin: .2rem 0 .5rem; display: flex; align-items: center; gap: .35rem; }
.ck-measure { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line-strong); }
.ck-need { display: none; }
.ck-item.need .ck-need { display: inline-flex; }
.ck-residual { margin-top: .6rem; }
.ck-residual > summary { cursor: pointer; font-size: .85rem; color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0 .2rem; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: .32rem .7rem; font-size: .8rem; cursor: pointer; text-align: left; line-height: 1.3; }
.chip b { color: var(--primary); margin-right: .15rem; }
.chip:hover { border-color: var(--primary); }
.chip.used { background: var(--primary-soft); border-color: var(--primary); }
/* Antippbare Risikomatrix */
.rpick-grid { display: grid; grid-template-columns: minmax(70px, 1.3fr) repeat(5, minmax(40px, 1fr)); gap: 3px; max-width: 520px; }
.rpick-corner { display: flex; flex-direction: column; justify-content: flex-end; font-size: .62rem; color: var(--muted); line-height: 1.2; }
.rpick-sh, .rpick-ph { display: flex; flex-direction: column; justify-content: center; font-size: .66rem; color: var(--muted); line-height: 1.15; overflow: hidden; }
.rpick-sh { text-align: center; align-items: center; padding-bottom: 2px; }
.rpick-sh b, .rpick-ph b { color: var(--text); font-size: .8rem; }
.rpick-sh span { hyphens: auto; overflow-wrap: anywhere; }
.rpick-ph { padding-right: 4px; }
.rpick-cell { position: relative; display: grid; place-items: center; min-height: 42px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: .85rem; border: 2px solid transparent; }
.rpick-cell input { position: absolute; opacity: 0; pointer-events: none; }
.rpick-cell.green { background: var(--green-bg); color: var(--ok); }
.rpick-cell.yellow { background: var(--yellow-bg); color: var(--warn); }
.rpick-cell.red { background: var(--red-bg); color: var(--danger); }
.rpick-cell:has(input:checked) { border-color: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); transform: scale(1.04); }
.rpick-cell:has(input:focus-visible) { outline: 2px solid var(--primary); }
.rpick-out { margin-top: .5rem; line-height: 1.5; }
.risk-legend { display: grid; gap: .35rem; }
.danger { color: var(--danger); }
.ck-list-group { margin-bottom: .8rem; }
.ck-list-group h3 { font-size: .9rem; margin: .6rem 0 .3rem; display: flex; gap: .4rem; align-items: center; }
.ck-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; font-size: .88rem; }
.ck-list li { display: flex; gap: .5rem; align-items: flex-start; }
.ck-list li .i { flex: none; margin-top: .15rem; }
.ck-list li.ja .i { color: var(--warn); } .ck-list li.nein .i { color: var(--ok); }
.matrix-pair { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.ck-cols { columns: 2 340px; column-gap: 2rem; }
.ck-cols .ck-list-group { break-inside: avoid; }
.rr-edit > summary { cursor: pointer; color: var(--primary); list-style: none; }
.wiz-nav [hidden] { display: none !important; }
.wiz-nav .wiz-count { white-space: nowrap; }

/* ---- Schulung: Präsentation Folie für Folie ---- */
fieldset.form-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem 1rem; margin: 0; }
fieldset.form-group legend { font-weight: 600; padding: 0 .4rem; display: flex; align-items: center; gap: .4rem; }
.presenter { padding: .9rem; }
.presenter.is-full { background: #111; color: #eee; border-radius: 0; border: 0; margin: 0; padding: 0; overflow: hidden; }
.presenter.is-full .pres-inner { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom)); }
/* Gedrehte Ansicht (Handy hochkant, Folie quer): Inhalt um 90° im Uhrzeigersinn drehen */
.presenter.pres-rot .pres-inner { position: absolute; top: 0; left: 0; transform-origin: top left; transform: rotate(90deg) translateY(-100%);
  padding: calc(.35rem + env(safe-area-inset-right)) .6rem .35rem; }

.presenter.pres-full { position: fixed; inset: 0; z-index: 2000; width: 100vw; height: 100vh; height: 100dvh; }
.presenter:fullscreen { width: 100vw; height: 100vh; }
.presenter.is-full .pres-stage { flex: 1; min-height: 0; background: #111; }
.presenter.is-full .pres-stage canvas { box-shadow: none; }
.presenter.is-full .pres-head .small { color: #bbb; }
body.pres-lock { overflow: hidden; }
.pres-fs .fs-off { display: none; align-items: center; gap: .35rem; }
.presenter.is-full .pres-fs .fs-on { display: none; }
.presenter.is-full .pres-fs .fs-off { display: inline-flex; }
.pres-fs .fs-on { display: inline-flex; }
.pres-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pres-head .pres-page { font-weight: 700; }
.pres-head .small { flex: 1; }
.pres-bar { height: 6px; border-radius: 99px; background: var(--grey-bg); overflow: hidden; margin-bottom: .6rem; }
.pres-bar > span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s; }
.pres-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 240px; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; touch-action: pan-y; }
.pres-stage canvas { display: block; max-width: 100%; box-shadow: var(--shadow); background: #fff; }
.pres-loading { position: absolute; }
.presenter.ready .pres-loading { display: none; }
.pres-error { position: absolute; inset: auto 1rem; }
.pres-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; }
.pres-nav .btn { min-height: 46px; min-width: 7.5rem; justify-content: center; }
.pres-nav .btn:disabled { opacity: .55; cursor: not-allowed; }
.pres-wait { font-variant-numeric: tabular-nums; }
.quiz-locked { display: flex; align-items: center; gap: .9rem; color: var(--muted); }
.quiz-locked > .i { width: 1.6rem; height: 1.6rem; flex: none; }
.pres-wait[hidden] { display: none; }

/* Kompakte Vollbild-Ansicht (Handy quer bzw. gedreht): Knöpfe seitlich, Folie nutzt die volle Höhe */
.presenter.pres-compact .pres-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto auto minmax(0, 1fr); column-gap: .5rem; }
.presenter.pres-compact .pres-head { grid-row: 1; grid-column: 1 / -1; margin-bottom: .2rem; gap: .5rem; }
.presenter.pres-compact .pres-head .small { display: none; }
.presenter.pres-compact .pres-head .pres-page { flex: 1; font-size: .85rem; }
.presenter.pres-compact .pres-fs { padding: .2rem .55rem; min-height: 0; font-size: .8rem; }
.presenter.pres-compact .pres-bar { grid-row: 3; grid-column: 1 / -1; height: 4px; margin-bottom: .3rem; }
.presenter.pres-compact .pres-stage { grid-column: 2; grid-row: 4; }
.presenter.pres-compact .pres-tip { grid-row: 2; }
.presenter.pres-compact .pres-nav { display: contents; }
.presenter.pres-compact .pres-nav .btn { grid-row: 4; align-self: center; min-width: 0; width: 3rem; min-height: 6rem; padding: 0; }
.presenter.pres-compact .pres-nav .btn > span { display: none; }
.presenter.pres-compact [data-prev] { grid-column: 1; }
.presenter.pres-compact [data-next] { grid-column: 3; }
.presenter.pres-compact .pres-wait { grid-column: 2; grid-row: 4; align-self: end; justify-self: center; margin-bottom: .4rem; z-index: 1; opacity: .9; }

/* Zoom der Folie */
.pres-stage.zoomed { display: block; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.pres-stage.zoomed canvas { max-width: none; margin: 0 auto; }
.pres-zoom .z-out, .presenter.is-zoomed .pres-zoom .z-in { display: none; }
.presenter.is-zoomed .pres-zoom .z-out { display: inline-flex; }
.presenter.pres-compact .pres-zoom { padding: .2rem .55rem; min-height: 0; }
.pres-tip { display: flex; gap: .6rem; align-items: flex-start; grid-column: 1 / -1; background: #2a2f3a; color: #e5e7eb; border-radius: 8px; padding: .4rem .6rem; margin-bottom: .35rem; }
.pres-tip[hidden] { display: none; }
.pres-tip span { flex: 1; }
.pres-tip button { color: #e5e7eb; }

/* Dreh-Knopf: nur im Vollbild, Handy hochkant, Folie quer */
.pres-rotate { display: none; }
.presenter.can-rot .pres-rotate { display: inline-flex; align-items: center; gap: .35rem; }
.presenter.pres-rot .pres-rotate .rot-hint { display: none; }
.presenter.pres-compact .pres-rotate { padding: .2rem .55rem; min-height: 0; }
.presenter.is-full .pres-head .small { display: none; }
.presenter.is-full .pres-head .pres-page { flex: 1; }
@media (max-width: 480px) { .presenter.is-full .pres-fs .fs-off > span { display: none; } }
.presenter .pres-page { white-space: nowrap; }

/* ---- Unterschrift ---- */
.sign-box h2 { display: flex; align-items: center; gap: .45rem; }
.sign-qr { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.sign-qr img { border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.sign-qr > div { flex: 1 1 260px; }
.sign-qr .wait-dots::after { content: ''; display: inline-block; width: .5rem; height: .5rem; margin-left: .4rem; border-radius: 50%; background: var(--primary); animation: signpulse 1.2s infinite ease-in-out; vertical-align: middle; }
@keyframes signpulse { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.sign-canvas { position: relative; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.sign-canvas canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; border-radius: var(--radius-sm); }
.sign-line { position: absolute; left: 1rem; right: 1rem; bottom: 2.2rem; border-top: 1px solid #cbd5e1; padding-top: .2rem; font-size: .75rem; color: #94a3b8; pointer-events: none; }
.sign-img { display: block; max-width: 100%; width: 360px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-top: .75rem; }
.sign-mobile { max-width: 560px; margin: 1rem auto; }
.sign-mobile .sign-canvas canvas { height: 260px; }
@media (max-width: 640px) { .sign-qr img { width: 160px; height: 160px; } }
.sign-box [hidden] { display: none !important; }

/* ---- Besucher / Präsenz-Termine ---- */
.public-wrap { max-width: 620px; margin: 1rem auto 2rem; }
.public-wrap .login-head h1 { font-size: 1.45rem; }
.public-lang { display: flex; justify-content: center; margin-top: 1rem; }
.session-qr { text-align: center; }
.session-qr .actions-row { justify-content: center; }
.qr-big { width: 300px; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.sig-thumb { max-height: 38px; max-width: 160px; background: #fff; border: 1px solid var(--line); border-radius: 4px; display: block; }
.visitor-pass { text-align: center; border-top: 6px solid var(--ok); }
.visitor-pass.pending { border-top-color: var(--warn); }
.visitor-pass dl.props { text-align: left; max-width: 420px; margin: 1rem auto; }
.visitor-pass .sign-img { margin: .5rem auto 0; }
label[hidden] { display: none !important; }

/* Gebuchte Module */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.pkg { display: flex; gap: .55rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pkg.on .i { color: var(--ok); } .pkg.off { opacity: .6; } .pkg.off .i { color: var(--muted); }
.pkg .i { flex: none; margin-top: .15rem; }
.pkg-table tr.muted-row td { opacity: .55; }
.pkg-table input[type=checkbox] { width: 1.15rem; height: 1.15rem; }
.demo-banner { border: 2px solid var(--warn); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; }
.demo-banner form { margin: 0; }

/* ---- Hilfe ---- */
.help-btn { padding: .35rem .5rem; }
.help-btn svg.i { width: 1.15rem; height: 1.15rem; }
.help-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 60; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.help-drawer[hidden] { display: none; }
.help-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.help-drawer-body { overflow: auto; padding: 1rem; flex: 1; -webkit-overflow-scrolling: touch; }
.hp-tabs { display: flex; gap: .25rem; margin-bottom: .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .2rem; }
.hp-tabs button { flex: 1; display: flex; gap: .35rem; align-items: center; justify-content: center; border: 0; background: none; padding: .45rem .3rem; border-radius: 8px; font: inherit; font-size: .88rem; color: var(--muted); cursor: pointer; }
.hp-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.hp-tour { margin-bottom: 1rem; }
.hp-chat { display: flex; flex-direction: column; gap: .55rem; max-height: 52vh; overflow: auto; margin-bottom: .6rem; }
.hp-msg { padding: .55rem .75rem; border-radius: 12px; max-width: 92%; line-height: 1.45; font-size: .93rem; }
.hp-msg p { margin: .2rem 0; } .hp-msg ol, .hp-msg ul { margin: .25rem 0; padding-left: 1.2rem; }
.hp-msg.bot { background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; }
.hp-msg.me { background: var(--primary); color: var(--on-primary); align-self: flex-end; }
.hp-sources { margin-top: .45rem; display: flex; flex-direction: column; gap: .2rem; }
.hp-ask { display: flex; gap: .4rem; align-items: flex-end; }
.hp-ask textarea { flex: 1; resize: vertical; min-height: 2.6rem; }
.hp-contact { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.hp-contact-msg.ok { color: var(--ok); } .hp-contact-msg.err { color: var(--danger); }
.help-article h3, .help-article h4 { margin: 1.1rem 0 .4rem; }
.help-article li { margin: .2rem 0; }
.help-article code { background: var(--surface-2); padding: 0 .3rem; border-radius: 4px; }
.help-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1rem; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.help-video iframe, .help-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.help-video:has(> a) { aspect-ratio: auto; background: none; }
.help-search { display: flex; gap: .5rem; align-items: center; }
.help-search input { flex: 1; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; margin-top: 1rem; }
.help-tile { display: flex; gap: .75rem; align-items: center; color: var(--text); margin: 0; }
.help-tile:hover { text-decoration: none; border-color: var(--primary); }
.help-tile .badge { margin-left: .4rem; }
.help-ico { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; align-items: start; }
.help-toc { display: flex; flex-direction: column; gap: .1rem; position: sticky; top: calc(var(--top) + 1rem); }
.help-toc a { display: flex; gap: .5rem; align-items: center; padding: .3rem .4rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.help-toc a.active { background: var(--primary-soft); font-weight: 600; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; } }
.provider-card p { margin: .4rem 0; }
.tour-shade { position: fixed; inset: 0; z-index: 70; }
.tour-box { position: fixed; z-index: 71; border-radius: 10px; box-shadow: 0 0 0 9999px rgb(15 23 42 / .55), 0 0 0 3px var(--primary); pointer-events: none; transition: all .2s ease; }
.tour-tip { position: fixed; z-index: 72; background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .9rem 1rem; border: 1px solid var(--line); }
.tour-tip p { margin: .35rem 0 .7rem; }
.tour-nav { display: flex; justify-content: space-between; gap: .5rem; }
@media print { .help-drawer, .help-btn { display: none !important; } }
