/* Zinke OS Dashboard v1 – Farben und Schriften aus www.zinke-immo.de; Schriften lokal (OFL), keine externen Server */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #16233f; --navy-dark: #0e1729; --navy-soft: #2a3c60;
  --gold: #c9a04e; --gold-light: #e3c887; --gold-dark: #a9803a; --gold-text: #7a5a1f; --gold-tint: #f6edd6;
  --cream: #faf7f0; --white: #fff; --ink: #26303f; --ink-soft: #5b6472; --border: #e7e1d3;
  --ok: #1f6b40; --ok-tint: #e3f1e8; --err: #a63a28; --err-tint: #f8e4df; --gray-tint: #eceae3;
  --radius: 16px;
  --shadow: 0 10px 30px -18px rgba(14, 23, 41, .28);
  --head: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--head); color: var(--navy); font-weight: 600; margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--navy); }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 2px; border-radius: 6px; }
.sidebar :focus-visible, .hero :focus-visible, .chatcard :focus-visible { outline-color: var(--gold-light); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; }
.loading { color: var(--ink-soft); padding: 24px 0; }

/* ---------- Gerüst ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--navy-dark) 264px, var(--cream) 264px); }
.sidebar { background: var(--navy-dark); color: #fff; padding: 28px 18px 24px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; }
.side-top { display: block; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; padding: 0 6px; }
.brand-logo { background: #fff; border-radius: 12px; padding: 4px 6px; flex: none; }
.brand-logo img { display: block; height: 38px; width: auto; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-family: var(--head); font-weight: 600; font-size: 1.55rem; letter-spacing: .14em; }
.brand-text span { font-size: .54rem; letter-spacing: .07em; white-space: nowrap; text-transform: uppercase; color: var(--gold-light); margin-top: 3px; }
.menu-btn { display: none; }
.nav-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 20px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: rgba(255,255,255,.88); text-decoration: none; font-weight: 500; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { background: rgba(255,255,255,.1); border-left-color: var(--gold); color: #fff; }
.nav .label { flex: 1; }
.nav .count { background: var(--gold); color: var(--navy-dark); font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 0 9px; min-width: 24px; text-align: center; }
.nav .soon { font-size: .68rem; letter-spacing: .04em; color: var(--gold-light); border: 1px solid rgba(227,200,135,.5); border-radius: 999px; padding: 0 8px; }
.hermes-box { margin-top: auto; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); border-radius: 12px; padding: 14px 16px; font-size: .85rem; color: rgba(255,255,255,.85); }
.hermes-box strong { display: block; font-family: var(--head); color: var(--gold-light); font-size: 1.05rem; margin-bottom: 2px; }

.content { padding: 28px 40px 56px; min-width: 0; }
.statusline { display: flex; justify-content: flex-end; align-items: center; gap: 14px; max-width: 1240px; margin: 0 auto 16px; font-size: .82rem; color: var(--ink-soft); min-height: 28px; }
.pill-badge { background: var(--gold-tint); color: var(--gold-text); border: 1px solid var(--gold); border-radius: 999px; padding: 3px 14px; font-weight: 600; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
main { max-width: 1240px; margin: 0 auto; }
main:focus { outline: none; }
main h1.page-title { font-size: 2rem; margin-bottom: 6px; }
main h1.page-title:focus { outline: none; }
.page-sub { color: var(--ink-soft); margin-bottom: 28px; max-width: 70ch; }
.stack { display: grid; gap: 24px; }

/* ---------- Karten ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; min-width: 0; }
.card > h2, .card-head h2 { font-size: 1.25rem; }
.card > h2::after, .card-head h2::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin-top: 8px; }
.card > h2 { margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.card-head .aside { color: var(--ink-soft); font-size: .8rem; }
.card-note { color: var(--ink-soft); font-size: .85rem; margin-top: 16px; }
.msg-card { border: 1px dashed var(--gold-dark); background: var(--gold-tint); color: #5b430f; border-radius: 12px; padding: 12px 16px; font-size: .9rem; }
.msg-card.err { border-color: var(--err); background: var(--err-tint); color: #7d2a1c; }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-soft); }
.empty b { display: block; font-family: var(--head); color: var(--navy); font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.empty .ico { display: block; font-size: 1.6rem; color: var(--gold); margin-bottom: 6px; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(120% 140% at 90% 0%, var(--navy-soft), var(--navy) 55%, var(--navy-dark)); color: #fff; border-radius: var(--radius); padding: 36px 40px 40px; box-shadow: var(--shadow); }
.hero h1 { font-family: var(--head); color: #fff; font-size: 2.3rem; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero .date { color: rgba(255,255,255,.8); margin: 6px 0 26px; }
.quick { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.quick .gated { display: grid; gap: 6px; max-width: 220px; }
.hero .btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.hero .btn-ghost:hover, .hero .btn-ghost[aria-pressed="true"] { background: #fff; color: var(--navy); }
.hero .folgt { color: rgba(255,255,255,.82); }
.hero .folgt b { color: var(--gold-light); }
.hero .btn.is-disabled { background: transparent; color: rgba(255,255,255,.75); border: 1px dashed rgba(255,255,255,.5); }
.cmd { display: flex; gap: 10px; margin-top: 24px; max-width: 820px; flex-wrap: wrap; }
.cmd input { flex: 1; min-width: 220px; border: 0; border-radius: 999px; padding: 13px 22px; background: #fff; color: var(--ink); }
.cmd input[readonly] { background: rgba(255,255,255,.88); }
.cmd .gated { display: grid; gap: 6px; }
.qform { margin-top: 20px; padding: 22px; max-width: 820px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); display: grid; gap: 14px; }
.qform[hidden] { display: none; }
.qform label { display: grid; gap: 6px; font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.9); }
.qform input, .qform textarea { border: 0; border-radius: 10px; padding: 10px 14px; background: #fff; color: var(--ink); }
.qform textarea { min-height: 76px; resize: vertical; }
.qform .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons, Badges ---------- */
.btn { cursor: pointer; font-weight: 600; border-radius: 999px; padding: 10px 22px; border: 1px solid transparent; background: linear-gradient(120deg, var(--gold-light), var(--gold) 60%, var(--gold-dark)); color: var(--navy-dark); transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; display: inline-block; line-height: 1.4; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -14px rgba(169,128,58,.8); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--cream); box-shadow: none; }
.btn.is-disabled, .btn.is-disabled:hover { cursor: not-allowed; background: var(--gray-tint); color: var(--ink-soft); border: 1px dashed #b9b3a3; box-shadow: none; transform: none; }
.gated { display: inline-grid; gap: 6px; vertical-align: top; }
.folgt { font-size: .76rem; color: var(--ink-soft); line-height: 1.35; }
.folgt b { color: var(--gold-text); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.btn-row { display: flex; gap: 14px 12px; flex-wrap: wrap; align-items: flex-start; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; border: 1px solid transparent; white-space: nowrap; line-height: 1.5; }
.b-err { background: var(--err-tint); color: #8a2c1b; border-color: #e6bdb3; }
.b-gold { background: var(--gold-tint); color: #6b4e14; border-color: #e3cf9c; }
.b-gray { background: var(--gray-tint); color: #4a5361; border-color: #d9d4c4; }
.b-ok { background: var(--ok-tint); color: #17542f; border-color: #b9dac6; }
.b-navy { background: #e4e8f1; color: var(--navy); border-color: #c7cfe0; }
.chip { display: inline-block; font-size: .72rem; color: var(--ink-soft); border: 1px solid var(--border); background: var(--cream); border-radius: 8px; padding: 1px 9px; white-space: nowrap; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.kpi { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: grid; gap: 4px; align-content: start; }
.kpi .num { font-family: var(--head); font-size: 2.3rem; font-weight: 600; color: var(--navy); line-height: 1.1; font-variant-numeric: lining-nums; }
.kpi .lbl { font-weight: 500; }
.kpi .extra { font-size: .82rem; color: var(--err); font-weight: 500; min-height: 1.3em; }
.kpi .extra.muted { color: var(--ink-soft); }
.kpi .src { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; }
.kpi.off { border-left-color: #cfc9b6; background: #fdfcf9; }
.kpi.off .num { color: #8a909b; }

/* ---------- Listen ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
.bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "sys mid chat"; gap: 24px; align-items: start; margin-top: 24px; }
.bottom > .a-sys { grid-area: sys; } .bottom > .a-mid { grid-area: mid; display: flex; flex-direction: column; gap: 24px; min-width: 0; } .bottom > .a-chat { grid-area: chat; }
.list > li { padding: 16px 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.item { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.item-main { min-width: 0; display: grid; gap: 5px; }
.item-title { font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
a.item-title { text-decoration: none; }
a.item-title:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.item-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--ink-soft); }
.item-desc { font-size: .88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.item-side { display: grid; gap: 6px; justify-items: end; flex: none; }
select, .field { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 12px; }
.field { width: 100%; max-width: 380px; }
select { max-width: 100%; }

.systems { display: grid; gap: 10px; }
.sys { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--cream); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 4px rgba(31,107,64,.14); }
.dot.warn { background: var(--gold); box-shadow: 0 0 0 4px rgba(201,160,78,.25); }
.dot.err { background: var(--err); box-shadow: 0 0 0 4px rgba(166,58,40,.14); }
.sys .name { flex: 1; font-weight: 500; }
.sys .st { font-size: .8rem; color: var(--ink-soft); }
.events > li { padding: 14px 0; border-top: 1px solid var(--border); }
.events > li:first-child { border-top: 0; padding-top: 0; }
.ev-msg { overflow-wrap: anywhere; }
.lv-erfolg .ev-msg { color: var(--ok); } .lv-warnung .ev-msg { color: var(--gold-text); } .lv-fehler .ev-msg { color: var(--err); }
.ev-meta { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.big-num { font-family: var(--head); font-size: 2.6rem; color: var(--navy); line-height: 1; }

/* ---------- Hermes-Karte ---------- */
.chatcard { background: var(--navy); border-color: var(--navy); color: #fff; display: flex; flex-direction: column; min-height: 420px; }
.chatcard > h2 { color: var(--gold-light); }
.chatcard > h2::after { background: var(--gold); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: 420px; overflow-y: auto; margin-bottom: 16px; }
.chat-log .hint { color: rgba(255,255,255,.82); font-size: .9rem; }
.bubble { padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; max-width: 94%; }
.bubble.user { background: rgba(255,255,255,.12); align-self: flex-end; }
.bubble.assistant { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); align-self: flex-start; }
.bubble.error { background: var(--err-tint); color: #7d2a1c; align-self: flex-start; }
.chatcard form { display: flex; gap: 8px; flex-wrap: wrap; }
.chatcard input { flex: 1; min-width: 150px; border: 0; border-radius: 10px; padding: 10px 14px; background: #fff; color: var(--ink); }
.chatcard input[readonly] { background: rgba(255,255,255,.85); }
.chatcard .folgt { color: rgba(255,255,255,.85); margin-top: 10px; }
.chatcard .folgt b { color: var(--gold-light); }
.chatcard .btn.is-disabled { background: transparent; color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.5); }

/* ---------- Vorgänge, Objekte ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; text-decoration: none; color: var(--ink-soft); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.tabs .soon { margin-left: 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.fchip { cursor: pointer; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 16px; font-weight: 500; font-size: .85rem; color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.fchip:hover { border-color: var(--gold); }
.card .page-title { font-size: 1.6rem; margin-bottom: 14px; }
.back { display: inline-block; margin-bottom: 18px; color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--navy); text-decoration: underline; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 14px 0 22px; }
.facts div { display: grid; gap: 1px; font-size: .9rem; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline { position: relative; display: grid; gap: 22px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl { position: relative; background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.tl::before { content: ""; position: absolute; left: -27px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gold-dark); }
.tl.internal { background: var(--gold-tint); border-color: #e3cf9c; }
.tl-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.tl-time { margin-left: auto; font-size: .78rem; color: var(--ink-soft); }
.tl-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.prop { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.prop:hover { border-color: var(--gold); }
.prop .name { font-family: var(--head); font-size: 1.25rem; color: var(--navy); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 600; padding: 0 12px 10px 0; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--border); }
tbody th { text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--ink); font-weight: 600; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--border); }
tr:last-child td, tr:last-child th { border-bottom: 0; }
.page-title + .stack { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
.num-r { text-align: right; font-variant-numeric: tabular-nums; }
.ph-list { display: grid; gap: 8px; margin: 0 0 22px 18px; list-style: disc; color: var(--ink-soft); max-width: 70ch; }
.ph-miss { margin-bottom: 22px; }

/* ---------- Mobil ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "sys mid" "chat chat"; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--cream); }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; padding: 12px 16px; gap: 0; }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .brand-logo img { height: 30px; }
  .brand-text strong { font-size: 1.25rem; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 8px 16px; font-weight: 500; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; background: #fff; border-radius: 2px; position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; } .menu-icon::after { top: 5px; }
  .nav-wrap { display: none; padding-top: 14px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav-wrap.open { display: flex; }
  .content { padding: 20px 16px 48px; }
  .statusline { justify-content: space-between; }
  .hero { padding: 26px 22px 28px; }
  .hero h1 { font-size: 1.7rem; }
  .card { padding: 22px 20px; }
  .bottom { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sys" "mid" "chat"; }
  .quick .gated { max-width: none; width: 100%; }
  .quick .btn { width: 100%; }
  .search { width: 100%; }
  .field { max-width: none; }
  .item { flex-wrap: wrap; }
  .item-side { justify-items: start; }
}
@media (max-width: 560px) {
  .kpis { gap: 12px; }
  .kpi { padding: 16px 16px; }
  .kpi .num { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Anmeldung und Einladung ---------- */
.auth-body { min-height: 100vh; background: radial-gradient(1200px 600px at 20% -10%, var(--navy-soft), transparent 60%), var(--navy-dark); color: #fff; }
.auth-wrap { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 32px 18px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-logo { background: #fff; border-radius: 12px; padding: 4px 6px; }
.auth-brand .brand-logo img { display: block; height: 42px; width: auto; }
.auth-brand .brand-text { display: grid; line-height: 1.2; }
.auth-brand .brand-text strong { font-family: var(--head); letter-spacing: .22em; font-size: 1.15rem; }
.auth-brand .brand-text span { font-size: .78rem; color: rgba(255,255,255,.75); }
.auth-card { width: min(440px, 100%); background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); padding: 36px 36px 30px; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card h1::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin-top: 10px; }
.auth-sub { color: var(--ink-soft); margin: 14px 0 22px; }
.auth-card form { display: grid; gap: 8px; }
.auth-card label { font-weight: 500; font-size: .88rem; margin-top: 8px; }
.auth-card .field { max-width: none; padding: 11px 14px; }
.auth-hint { color: var(--ink-soft); font-weight: 400; font-size: .78rem; margin-left: 6px; }
.auth-msg { background: var(--err-tint); border: 1px solid #e6bdb3; color: #7d2a1c; border-radius: 10px; padding: 10px 14px; font-size: .88rem; margin-top: 8px; }
.auth-btn { margin-top: 14px; padding: 12px 22px; }
.auth-btn:disabled { opacity: .6; cursor: wait; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--ink-soft); }
@media (max-width: 560px) { .auth-card { padding: 28px 22px 24px; } }

/* ---------- Kopfzeile: Benutzer ---------- */
.statusline .userbox { display: flex; align-items: center; gap: 10px; margin-left: 6px; padding-left: 16px; border-left: 1px solid var(--border); }
.statusline .userbox .who { color: var(--navy); font-weight: 600; }
.statusline .userbox .role { font-size: .72rem; }
.btn-small { padding: 5px 16px; font-size: .82rem; }

/* ---------- Benutzerverwaltung, Protokoll ---------- */
.linkbox { background: var(--gold-tint); border: 1px solid var(--gold); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; margin-bottom: 22px; }
.linkbox .copyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.linkbox input { flex: 1 1 320px; max-width: none; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.linkbox p { font-size: .85rem; color: #5b430f; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 18px; align-items: end; margin-bottom: 8px; }
.form-grid label { display: grid; gap: 4px; font-size: .85rem; font-weight: 500; }
.form-grid .field, .form-grid select { max-width: none; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
td.act { text-align: right; white-space: nowrap; }
.proto-filter { display: flex; gap: 14px 18px; flex-wrap: wrap; align-items: end; margin-bottom: 22px; }
.proto-filter label { display: grid; gap: 4px; font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.audit > li { padding: 12px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 18px; }
.audit > li:first-child { border-top: 0; padding-top: 0; }
.audit .when { font-size: .8rem; color: var(--ink-soft); }
.audit .what { overflow-wrap: anywhere; }
.audit .what b { color: var(--navy); font-weight: 600; }
.audit .why { font-size: .82rem; color: var(--ink-soft); margin-top: 2px; }
.by { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
@media (max-width: 640px) { .audit > li { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

dialog#udlg { border: 1px solid var(--border); border-radius: 14px; padding: 24px 26px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(14,31,64,.25); color: var(--text, inherit); }
dialog#udlg::backdrop { background: rgba(14,31,64,.45); }
dialog#udlg h2 { margin: 0 0 14px; }
dialog#udlg form { display: grid; gap: 12px; }
.dx-pick { display: grid; gap: 4px; font-size: .85rem; font-weight: 500; }
.dx-pick select { max-width: none; }
#ulist { margin-top: 16px; }
