@import url("/fonts/archivo/500.css");
@import url("/fonts/archivo/700.css");
@import url("/fonts/ibm-plex-sans/400.css");
@import url("/fonts/ibm-plex-sans/500.css");
@import url("/fonts/ibm-plex-sans/600.css");
@import url("/fonts/ibm-plex-mono/400.css");

/* Layout: Kopfzeile mit Logo und Navigation, darunter Liste | Detail bzw. einspaltige Formulare */
:root {
  --bg: #f4f6f7; --surface: #ffffff; --sunken: #eaeef0; --line: #d6dcdf; --fg: #1f2523; --muted: #5d6865; --logo-ink: #292d2a;
  --accent: #0a76a6; --accent-fg: #ffffff; --accent-soft: #dff1fa; --green: #4d9a2a;
  --crit: #b3261e; --crit-soft: #fbe4e2; --high: #b45d00; --high-soft: #fdebd6; --mid: #2f5fa7; --mid-soft: #e0e9f7; --low: #5b6b73; --low-soft: #e6eaec;
  --ok: #2e7d4f; --ok-soft: #dcf0e3; --wait: #7a5aa6; --wait-soft: #ece4f6; --note: #8a6d00; --note-soft: #fdf5d8;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 6px;
  color-scheme: light;
}
/* Dunkel: nach Computer-Einstellung, ausser der Benutzer hat «hell» gewählt … */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121615; --surface: #1a201e; --sunken: #222a27; --line: #323c38; --fg: #e6ebe9; --muted: #9aa6a2; --logo-ink: #eef2f0;
    --accent: #4cc0ef; --accent-fg: #06222f; --accent-soft: #16323f; --green: #8fd36a;
    --crit: #ff8a80; --crit-soft: #3d1c1a; --high: #f2a55a; --high-soft: #3a2a17; --mid: #8fb3ec; --mid-soft: #1c2a42; --low: #93a6ae; --low-soft: #223137;
    --ok: #7fd3a0; --ok-soft: #173326; --wait: #c3a8ea; --wait-soft: #2b2240; --note: #e8c95a; --note-soft: #2f2a14;
    color-scheme: dark;
  }
}
/* … oder ausdrücklich per Schieber eingeschaltet */
:root[data-theme="dark"] {
    --bg: #121615; --surface: #1a201e; --sunken: #222a27; --line: #323c38; --fg: #e6ebe9; --muted: #9aa6a2; --logo-ink: #eef2f0;
    --accent: #4cc0ef; --accent-fg: #06222f; --accent-soft: #16323f; --green: #8fd36a;
    --crit: #ff8a80; --crit-soft: #3d1c1a; --high: #f2a55a; --high-soft: #3a2a17; --mid: #8fb3ec; --mid-soft: #1c2a42; --low: #93a6ae; --low-soft: #223137;
    --ok: #7fd3a0; --ok-soft: #173326; --wait: #c3a8ea; --wait-soft: #2b2240; --note: #e8c95a; --note-soft: #2f2a14;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body); padding-inline: 16px; padding-block: 0 48px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -.01em; font-weight: 700; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--f-mono); }

/* Kopfzeile */
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 18px 14px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logowrap { color: var(--logo-ink); display: flex; align-items: center; padding-right: 14px; border-right: 1px solid var(--line); }
.logo { height: 40px; width: auto; display: block; }
.brand .name { font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.brand .name small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: var(--muted); }
nav.main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
nav.main a, nav.main button { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: var(--r); font-size: 14px; background: none; border: 0; cursor: pointer; }
nav.main a:hover, nav.main button:hover { background: var(--sunken); color: var(--fg); }
nav.main a[aria-current="page"] { color: var(--fg); font-weight: 600; background: var(--sunken); }
nav.main .who { color: var(--muted); font-size: 13px; padding-inline: 8px 2px; }
nav.main form { margin: 0; }
@media (max-width: 560px) { .logo { height: 30px; } .logowrap { padding-right: 10px; } .brand .name small { display: none; } }

/* Bausteine */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.pad { padding: 20px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--r); cursor: pointer; font-weight: 500; font-size: 14px; text-decoration: none; color: var(--fg); line-height: 1.3; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--crit); border-color: var(--crit); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; font-weight: 400; }
.flash { padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); margin-bottom: 18px; }
.alert { padding: 10px 14px; border-radius: var(--r); background: var(--crit-soft); color: var(--crit); }
.invite { padding: 14px; border-radius: var(--r); background: var(--note-soft); margin-bottom: 18px; display: grid; gap: 8px; }
.invite code { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; background: var(--surface); padding: 6px 8px; border-radius: 4px; }

/* Formulare */
form.stack { display: grid; gap: 16px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
legend { font-family: var(--f-display); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; padding: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > label, .field > .label { font-size: 13.5px; font-weight: 500; }
.field input, .field select, .field textarea { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); width: 100%; }
.field textarea { min-height: 130px; resize: vertical; }
.req { color: var(--crit); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.prio-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.prio-pick label { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; cursor: pointer; display: grid; gap: 2px; font-size: 12.5px; color: var(--muted); }
.prio-pick label b { font-size: 14px; color: var(--fg); }
.prio-pick input { position: absolute; top: 8px; left: 8px; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.prio-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.prio-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.formfoot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.auth { max-width: 420px; margin: 6vh auto 0; }
.auth h1 { font-size: 24px; margin-bottom: 6px; }

/* Ticketliste */
.listhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.listhead h1 { font-size: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 380px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip:hover { border-color: var(--muted); }
.chip[aria-current="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.toolbar form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 300px; justify-content: flex-end; }
.toolbar input[type=search], .toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); min-width: 0; flex: 1 1 160px; max-width: 280px; }
.tlist { list-style: none; margin: 0; padding: 0; }
.trow { display: grid; grid-template-columns: 4px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 14px; text-decoration: none; color: inherit; align-items: center; }
.trow a:hover { background: var(--sunken); }
.trow .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); grid-column: 1; }
.trow .side { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .trow a { grid-template-columns: minmax(0, 1fr); } .trow .side { grid-column: 1; grid-row: auto; justify-items: start; text-align: left; display: flex; gap: 10px; flex-wrap: wrap; } }
.stripe { background: var(--low); }
.p-kritisch.stripe { background: var(--crit); } .p-hoch.stripe { background: var(--high); } .p-mittel.stripe { background: var(--mid); }
.nr { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.when { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--fg); font-family: var(--f-display); font-size: 17px; margin-bottom: 4px; }

.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.s-neu { background: var(--mid-soft); color: var(--mid); }
.s-bearbeitung { background: var(--high-soft); color: var(--high); }
.s-warten { background: var(--wait-soft); color: var(--wait); }
.s-geloest { background: var(--ok-soft); color: var(--ok); }
.s-geschlossen { background: var(--low-soft); color: var(--low); }
.prio { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.prio.p-kritisch { color: var(--crit); } .prio.p-hoch { color: var(--high); } .prio.p-mittel { color: var(--mid); } .prio.p-niedrig { color: var(--low); }

/* Ticketdetail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.back { font-size: 14px; text-decoration: none; display: inline-block; margin-bottom: 12px; }
.dhead { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dhead h1 { font-size: 24px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.desc { padding-block: 16px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { display: grid; gap: 1px; }
.facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.side-panel { display: grid; gap: 16px; }
.side-panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.side-panel form .field select { background: var(--surface); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.msg { display: grid; gap: 4px; max-width: 76ch; }
.msg .mh { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.msg .mh b { color: var(--fg); font-weight: 600; }
.msg .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.msg .mb { padding: 10px 12px; border-radius: var(--r); background: var(--sunken); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.staff .mb { background: var(--accent-soft); }
.msg.note .mb { background: var(--note-soft); border: 1px dashed var(--note); }
.msg.note .tag { color: var(--note); }
.msg.sys { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg.sys::before { content: ""; width: 18px; height: 1px; background: var(--line); }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px; font-size: 13px; text-decoration: none; color: var(--fg); background: var(--surface); max-width: 100%; }
.file img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.reply textarea { min-height: 110px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); resize: vertical; width: 100%; }
.reply.internal textarea { background: var(--note-soft); border-color: var(--note); }
.reply select { padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.filepick { font-size: 13px; color: var(--muted); }
.filepick input { font-size: 13px; max-width: 100%; }
.section-title { font-size: 15px; margin: 22px 0 12px; }

/* Verwaltung */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.muted-row td { color: var(--muted); }
details.edit summary { cursor: pointer; color: var(--accent); font-size: 13px; list-style: none; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] { margin-top: 6px; }
details.edit form { display: grid; gap: 10px; padding: 12px; background: var(--sunken); border-radius: var(--r); margin-top: 8px; min-width: 260px; }
details.edit .field input, details.edit .field select { background: var(--surface); }
.badge { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.badge.off { background: var(--crit-soft); color: var(--crit); }
.badge.pending { background: var(--note-soft); color: var(--note); }

@media (prefers-reduced-motion: no-preference) { .trow a, .btn, .chip { transition: background .12s, border-color .12s; } }
.side-panel p { margin: 0; }

/* Kostenhinweis beim Erfassen */
.costnote { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--note-soft); border: 1px solid var(--note); }
.costnote b { font-family: var(--f-display); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--note); }
.costnote p { margin: 0; max-width: 70ch; }
.costnote .check { align-items: flex-start; font-weight: 500; }
.costnote .check input { margin-top: 3px; flex: none; }

/* Fusszeile */
footer.site { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Pop-up für den Kostenhinweis */
dialog.modal { border: 0; border-radius: 10px; padding: 24px; width: min(520px, calc(100% - 32px)); background: var(--surface); color: var(--fg); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
dialog.modal[open] { display: grid; gap: 16px; }
dialog.modal h2 { font-size: 20px; }
dialog.modal .hint { margin: 0; }
dialog.modal .check { align-items: flex-start; font-weight: 500; }
dialog.modal .check input { margin-top: 3px; flex: none; }
dialog.modal::backdrop { background: rgb(15 22 25 / .55); }
@media (prefers-reduced-motion: no-preference) { dialog.modal[open] { animation: pop .15s ease-out; } }
@keyframes pop { from { transform: translateY(8px); } to { transform: none; } }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* Kopfzeile rechts: Sprache, Dunkelmodus, Navigation */
.topright { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.prefs { display: flex; align-items: center; gap: 14px; }
.prefs form { margin: 0; }
.langswitch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.langswitch button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.langswitch button:hover { color: var(--fg); }
.langswitch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--muted); font-size: 13px; }
.switch:hover { color: var(--fg); }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); flex: none; transition: background .15s, border-color .15s; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] .switch-track { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(16px); background: var(--accent-fg); }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-knob { transition: none; } }
@media (max-width: 720px) { .topright { align-items: flex-start; width: 100%; } .prefs { order: -1; } }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); text-decoration: underline; }

/* Häufige Fragen */
.faq .listhead { margin-bottom: 18px; }
.faq-search { display: flex; gap: 8px; margin-bottom: 22px; }
.faq-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.faq-group { margin-bottom: 26px; }
.faq-group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.faq-item summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; line-height: 1; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { color: var(--accent); }
.faq-answer { padding: 0 14px 12px; max-width: 70ch; }
.faq-answer p { margin: 0 0 6px; }
.faq-answer .faq-li { padding-left: 16px; position: relative; }
.faq-answer .faq-li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.faq-suggest { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--accent-soft); }
.faq-suggest b { font-size: 14px; }
.faq-suggest .faq-item { margin: 0; }
.faq-note { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); font-size: 14px; }

/* Hinweis Bearbeitungszeiten */
.hoursnote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--accent-soft); font-size: 14px; }
dialog .hoursnote { margin: 12px 0 0; }

/* FAQ: Kategorien-Übersicht und Kategorieseiten */
.faq-wide { max-width: 1080px; margin: 0 auto; }
.faq-wide > .listhead, .faq-wide > .faq-note, .faq-wide > .faq-search { max-width: none; }
.faq-cats-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 4px 0 12px; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.faq-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.faq-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(10, 60, 90, .12); transform: translateY(-2px); }
.faq-card-img { display: block; aspect-ratio: 16 / 9; background: #0b4f6c; }
.faq-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.faq-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.faq-card h3 { margin: 0; font-size: 18px; }
.faq-card h3 a { color: var(--fg); text-decoration: none; }
.faq-card h3 a:hover { color: var(--accent); }
.faq-card .hint { margin: 0; }
.faq-card-q { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.faq-card-q li { padding-left: 14px; position: relative; }
.faq-card-q li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.faq-card-q a { color: var(--fg); text-decoration: none; }
.faq-card-q a:hover { color: var(--accent); text-decoration: underline; }
.faq-card-more { margin-top: auto; padding-top: 4px; font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; }
.faq-card-more:hover { text-decoration: underline; }
.faq-results { margin-top: 4px; }
.faq-group h2 a { color: inherit; text-decoration: none; }
.faq-group h2 a:hover { color: var(--accent); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.faq-hero { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 24px; align-items: center; margin-bottom: 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.faq-hero img { width: 100%; height: auto; border-radius: 8px; display: block; }
.faq-hero h1 { margin: 0 0 6px; }
.faq-hero p { margin: 0 0 6px; }
.faq-cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.faq-cat-side { position: sticky; top: 16px; }
.faq-cat-side h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 0 0 8px; }
.faq-cat-side ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.faq-cat-side li a { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: var(--r); color: var(--fg); text-decoration: none; border: 1px solid transparent; }
.faq-cat-side li a:hover { background: var(--surface); border-color: var(--line); }
.faq-cat-side li a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); }
.faq-cat-side img { width: 64px; height: 36px; border-radius: 4px; object-fit: cover; flex: none; }
.faq-cat-side span { display: grid; font-size: 14px; font-weight: 600; line-height: 1.25; }
.faq-cat-side small { font-weight: 400; color: var(--muted); font-size: 12px; }
.faq-help { margin-top: 20px; padding: 16px; border-radius: 10px; background: var(--accent-soft); display: grid; gap: 6px; justify-items: start; }
.faq-help p { margin: 0 0 6px; }
@media (max-width: 820px) {
  .faq-cat-layout { grid-template-columns: 1fr; }
  .faq-cat-side { position: static; }
  .faq-hero { grid-template-columns: 1fr; gap: 12px; }
}

/* Kennzahlen über der Ticketliste */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(10, 60, 90, .1); }
.stat[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stat-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; flex: none; }
.stat-open .stat-ic { background: var(--accent-soft); color: var(--accent); }
.stat-crit .stat-ic { background: var(--crit-soft); color: var(--crit); }
.stat-ok .stat-ic { background: var(--ok-soft); color: var(--ok); }
.stat b { display: block; font-family: var(--f-display); font-size: 30px; line-height: 1.1; }
.stat small { display: block; font-size: 15px; color: var(--muted); }
.stat-crit:not([aria-current]) b { color: var(--fg); }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat-ic { width: 42px; height: 42px; }
  .stat b { font-size: 24px; }
}

/* Registrierung */
.auth-wide { max-width: 640px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.regs { border-color: var(--high); margin-bottom: 16px; }
.regs .reg { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 10px; }
.regs .reg:first-of-type { border-top: 0; }
.regs .reg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.regs .reg form { display: grid; gap: 10px; }
.regs .reg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.navbadge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--high); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* Archiv und Löschen */
.archive { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; background: var(--sunken); }
.archive summary { cursor: pointer; font-weight: 600; }
.archive[open] summary { margin-bottom: 8px; }
.archived-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--note-soft); border: 1px solid var(--note); }
.danger-zone { border-top: 1px solid var(--line); }
.danger-zone h2 { font-size: 16px; }
.btn.danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
:root[data-theme="dark"] .btn.danger { color: #1a0605; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger { color: #1a0605; } }

/* ---------- Kundenportal (Etappe 1) ---------- */
.sysstatus { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 16px 20px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sys-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; }
.sys-ok .sys-ic { background: var(--ok-soft); color: var(--ok); }
.sys-note .sys-ic { background: var(--note-soft); color: var(--note); }
.sys-high .sys-ic { background: var(--high-soft); color: var(--high); }
.sys-crit { border-color: var(--crit); }
.sys-crit .sys-ic { background: var(--crit-soft); color: var(--crit); }
.sys-text { flex: 1 1 280px; display: grid; gap: 2px; }
.sys-text strong { font-family: var(--f-display); font-size: 18px; }
.sys-text span { color: var(--muted); font-size: 14px; }
.sys-maint { padding: 8px 12px; border-radius: var(--r); background: var(--sunken); font-size: 14px; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-list a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--fg); }
.mini-list a:hover { border-color: var(--accent); }
.mini-title { font-weight: 600; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kv > * { display: grid; gap: 2px; padding: 12px 14px; background: var(--sunken); border-radius: var(--r); min-width: 0; }
.kv > * > span { font-size: 13px; color: var(--muted); }
.kv > .warn { background: var(--high-soft); }
.kv > .warn, .kv > .warn > span { color: var(--high); }
.kv.kv4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.kv b { font-weight: 600; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--logo-ink); color: var(--bg); font-family: var(--f-display); font-weight: 700; font-size: 18px; flex: none; }
.contact-lines { display: grid; gap: 4px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.activity .when { color: var(--muted); width: 110px; flex: none; }
@media (max-width: 560px) { .activity li { flex-direction: column; gap: 2px; } .activity .when { width: auto; } }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.group-title { font-size: 20px; margin: 32px 0 14px; }
.pbx-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.card-title { font-size: 18px; margin: 0; }
.panel.mt { margin-top: 20px; }
.field textarea.short { min-height: 80px; }

/* ---------- Kundenportal (Etappe 2) ---------- */
.s-eingegangen { background: var(--mid-soft); color: var(--mid); }
.s-erledigt { background: var(--ok-soft); color: var(--ok); }
.s-abgelehnt { background: var(--low-soft); color: var(--low); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 20px; }
.type-card { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--fg); }
.type-card:hover { border-color: var(--accent); }
.req-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .req-layout { grid-template-columns: minmax(0, 1fr); } }
.req-types { display: grid; gap: 8px; }
.req-types a { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--fg); }
.req-types a span { font-size: 13px; color: var(--muted); }
.req-types a:hover { border-color: var(--accent); }
.req-types a[aria-current="page"] { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px 13px; }
.req-facts { margin: 4px 0 8px; }
.doclist { list-style: none; margin: 0; padding: 0; }
.doclist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.doclist li:first-child { border-top: 0; }
.doclist li > a:not(.btn) { font-weight: 600; flex: 1 1 220px; }
.doclist .btn { margin-left: auto; }
.doc-ic { color: var(--accent); display: grid; }
.num-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.num-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; background: var(--sunken); border-radius: var(--r); }
.num-list li span { flex: 1 1 160px; }
.num-list form { margin: 0; }
.cards.mt { margin-top: 20px; }
.facts.req-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 20px; }
.report { width: 100%; min-height: 520px; font: 12.5px/1.5 var(--f-mono); padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--fg); white-space: pre; overflow: auto; }
.req-layout .field { align-content: start; }

/* Leistungen (ab 1.5) */
.svc-section { display: grid; gap: 14px; margin-bottom: 20px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; align-items: stretch; }
.svc-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--fg); }
.svc-card:hover { border-color: var(--accent); }
.svc-head { display: flex; align-items: center; gap: 12px; }
.svc-name { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.svc-name b { font-family: var(--f-display); font-size: 18px; }
.svc-name span { font-size: 13px; color: var(--muted); }
.svc-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; flex: none; }
.svc-telefonie { background: var(--accent-soft); color: var(--accent); }
.svc-usv { background: var(--high-soft); color: var(--high); }
.svc-nextcloud { background: var(--mid-soft); color: var(--mid); }
.svc-title { display: flex; align-items: center; gap: 12px; font-size: 22px; margin: 0; }
.svc-block { margin-bottom: 20px; scroll-margin-top: 16px; }
.svc-block .row a { font-size: 14px; }
.svc-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.svc-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; color: var(--fg); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.svc-tabs a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.meter { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.svc-block > .row { align-items: flex-start; }
.meter-track { fill: var(--sunken); }
.meter-fill { fill: var(--mid); }
.meter.full .meter-fill { fill: var(--high); }
.ups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.ups-card { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.ups-card h3 { margin: 0; font-size: 17px; font-weight: 600; font-family: var(--f-body); }
.ups-facts { display: grid; grid-template-columns: minmax(120px, 150px) minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.ups-facts dt { color: var(--muted); }
.ups-facts dd { margin: 0; overflow-wrap: anywhere; }
.warn-text { color: var(--high); font-weight: 600; }
.req-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 8px 2px 0; }
.req-group:first-child { margin-top: 0; }
.svc-checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.svc-list { display: flex; flex-wrap: wrap; gap: 4px; }
.w-soon { background: var(--high-soft); color: var(--high); }
.w-over { background: var(--crit-soft); color: var(--crit); }
.svc-panel { margin-bottom: 20px; }
