:root {
    --bg: #0d0e12; --bg2: #15171d; --bg3: #1d2028; --line: #2a2e38;
    --text: #e3e5ea; --muted: #8d93a1; --accent: #e0564a; --accent2: #f0b232; --ok: #4fbf74; --blue: #6c9cf0;
    --radius: 12px; font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(400px, 100%); background: var(--bg2); border: 1px solid var(--line); border-left: 10px solid var(--accent);
    border-radius: 24px 12px 12px 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.brand { font-weight: 800; letter-spacing: .2em; font-size: 13px; color: var(--accent); }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.err { color: #ff7b6e; font-size: 14px; min-height: 1em; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; outline: none; text-transform: none; letter-spacing: 0; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; min-height: 70px; line-height: 1.45; width: 100%; }

.btn { border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 700; background: var(--bg3); color: var(--text); white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #08101e; }
.btn.red { background: var(--accent); color: #180605; }
.btn.amber { background: var(--accent2); color: #1c1302; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* Rahmen */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
nav.side .brand { padding: 0 10px 14px; }
nav.side button { text-align: left; border: none; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
nav.side button.on, nav.side button:hover { background: var(--bg3); color: var(--text); }
nav.side .who { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
nav.side .who b { color: var(--text); display: block; }
main { padding: 26px 30px 60px; max-width: 1200px; width: 100%; }
h2 { margin: 0 0 16px; font-size: 22px; }
h3 { margin: 22px 0 10px; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Listen */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg3); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg3); color: var(--muted); }
.badge.open { background: rgba(224,86,74,.15); color: #ff8a7d; }
.badge.closed { background: rgba(79,191,116,.15); color: var(--ok); }
.tag { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 6px; font-size: 12px; background: rgba(108,156,240,.15); color: #a9c4ff; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, monospace; font-size: 13px; }

/* Akte */
.case-head { display: flex; gap: 16px; align-items: flex-start; border-left: 10px solid var(--accent); border-radius: 24px 12px 12px 24px; }
.case-head h2 { margin: 0; }
.case-head .meta { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.6; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.note .by { color: var(--muted); font-size: 12px; margin-bottom: 4px; display: flex; gap: 8px; }
.note .txt { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.img { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.img .pic { background: #000; min-height: 160px; max-height: 320px; display: grid; place-items: center; overflow: hidden; }
.img .pic img { max-width: 100%; max-height: 320px; display: block; cursor: zoom-in; }
.img .blocked { padding: 24px 16px; text-align: center; color: #ffb3aa; background: repeating-linear-gradient(45deg, #2a1212 0 12px, #231010 12px 24px); width: 100%; }
.img .blocked b { display: block; font-size: 16px; margin-bottom: 6px; color: #ff8a7d; }
.img .body { padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links a { padding: 3px 9px; border-radius: 999px; background: var(--bg3); text-decoration: none; font-size: 12px; font-weight: 600; }
.src { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; background: var(--bg3); }
.src .u { word-break: break-all; }
.match { padding: 6px 8px; border-radius: 8px; background: rgba(240,178,50,.12); color: #ffd27a; cursor: pointer; }
.warnbox { padding: 12px 14px; border-radius: 10px; background: rgba(224,86,74,.12); border: 1px solid rgba(224,86,74,.35); color: #ffb3aa; line-height: 1.5; }
.okbox { padding: 12px 14px; border-radius: 10px; background: rgba(79,191,116,.12); border: 1px solid rgba(79,191,116,.35); color: #a6e8bd; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 50; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; z-index: 60; }
.toast.bad { border-color: var(--accent); color: #ffb3aa; }

@media (max-width: 800px) {
    .shell { grid-template-columns: 1fr; }
    nav.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
    nav.side .who { margin: 0; border: none; }
    .grid2 { grid-template-columns: 1fr; }
    main { padding: 18px; }
}
