/* VOID-NET – Aufbau wie CopNet (Seitenleiste, Kopfzeile, Karten, Tabellen). Themes: light (Standard) / cyber */
:root {
  --acc: #1f6feb; --acc-rgb: 31, 111, 235;
  --bg: #f4f6f9; --card: #ffffff; --txt: #212529; --dim: #6c757d; --line: #dee2e6; --line2: #f1f3f5;
  --side: #343a40; --side-txt: #c2c7d0; --side-head: #6c757d; --side-hover: rgba(255,255,255,.08); --brand: #2d3238;
  --top: #ffffff; --in: #ffffff; --in-line: #ced4da;
  --ok: #28a745; --warn: #ffc107; --bad: #dc3545; --info: #17a2b8;
  --shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  --font: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --mono: 'Share Tech Mono', Consolas, monospace;
}
body[data-theme="cyber"] {
  --bg: #090b10; --card: #10141c; --txt: #d9e2ec; --dim: #7c8796; --line: #232a36; --line2: #161b24;
  --side: #06070b; --side-txt: #9aa6b5; --side-head: #4b5563; --side-hover: rgba(var(--acc-rgb), .1); --brand: #06070b;
  --top: #0c0f15; --in: #0b0e14; --in-line: #2a3240;
  --shadow: 0 0 0 1px #1b212c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; font-family: var(--font); font-size: 15px; color: var(--txt); background: transparent; overflow: hidden; }
body.web { background: var(--bg); }
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--acc); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.muted { color: var(--dim); }
svg.i { width: 1.05em; height: 1.05em; vertical-align: -0.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Gerät (ingame Tablet) */
#frame { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#device { position: relative; width: min(1400px, 86vw); height: min(860px, 86vh); border-radius: 26px; overflow: hidden; background: var(--bg);
  border: 14px solid #15181d; box-shadow: 0 0 0 2px #2a2f37, 0 30px 90px rgba(0,0,0,.75); animation: pop .3s ease-out; }
body.web #device { width: 100%; height: 100%; border: none; border-radius: 0; box-shadow: none; animation: none; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
#root { width: 100%; height: 100%; }

/* Grundgerüst */
.wrap { display: flex; height: 100%; }
.side { width: 250px; background: var(--side); color: var(--side-txt); display: flex; flex-direction: column; transition: width .2s; flex-shrink: 0; box-shadow: 0 14px 28px rgba(0,0,0,.25); z-index: 3; }
.wrap.mini .side { width: 64px; }
.brand { display: flex; align-items: center; gap: 10px; height: 57px; padding: 0 16px; background: var(--brand); border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; overflow: hidden; }
.brand .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .25); }
.brand .bt { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 21px; color: #fff; letter-spacing: 1px; }
.brand .bt small { display: block; font-size: 11px; font-weight: 600; color: var(--side-head); letter-spacing: 2px; margin-top: -4px; }
.upanel { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; overflow: hidden; }
.upanel .av { width: 34px; height: 34px; border-radius: 50%; background: #6c757d; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.upanel b { color: #fff; display: block; font-weight: 600; }
.upanel span { font-size: 12.5px; }
.menu { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.menu .hd { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--side-head); padding: 14px 10px 6px; white-space: nowrap; }
.menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 2px; border: none; border-radius: 4px; background: none; color: var(--side-txt); text-align: left; white-space: nowrap; overflow: hidden; }
.menu button:hover { background: var(--side-hover); color: #fff; }
.menu button.on { background: var(--acc); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.menu .cnt { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.wrap.mini .menu .hd, .wrap.mini .menu .l, .wrap.mini .upanel div, .wrap.mini .brand .bt, .wrap.mini .menu .cnt { display: none; }
.side-foot { font-size: 11.5px; color: var(--side-head); padding: 10px 16px; white-space: nowrap; overflow: hidden; }

.mainc { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 57px; background: var(--top); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; flex-shrink: 0; }
.topbar .tb { background: none; border: none; width: 38px; height: 38px; border-radius: 4px; color: var(--dim); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.topbar .tb:hover { background: var(--line2); color: var(--txt); }
.topbar .sp { flex: 1; }
.topbar .clock { font-family: var(--mono); color: var(--dim); padding: 0 8px; }
.topbar select { background: var(--in); border: 1px solid var(--in-line); border-radius: 4px; padding: 6px 8px; }
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.18); min-width: 210px; z-index: 20; padding: 6px 0; }
.dd-menu .hdr { padding: 8px 16px; color: var(--dim); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-menu button { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: none; text-align: left; padding: 8px 16px; }
.dd-menu button:hover { background: var(--line2); }
.userbtn { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 6px 10px; border-radius: 4px; }
.userbtn:hover { background: var(--line2); }
.userbtn .av { width: 28px; height: 28px; border-radius: 50%; background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

.content { flex: 1; overflow-y: auto; padding: 0 22px 30px; }
.content::-webkit-scrollbar, .modal-dialog::-webkit-scrollbar, .menu::-webkit-scrollbar { width: 7px; }
.content::-webkit-scrollbar-thumb, .modal-dialog::-webkit-scrollbar-thumb, .menu::-webkit-scrollbar-thumb { background: rgba(127,127,127,.35); border-radius: 4px; }
.chead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 14px; flex-wrap: wrap; }
.chead h1 { font-size: 26px; font-weight: 400; }
.crumbs { font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--acc); }

/* Raster */
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.col { flex: 1 1 320px; min-width: 0; }
.col-4 { flex: 0 1 360px; min-width: 280px; }
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }

/* Small-Box wie AdminLTE/CopNet */
.sbox { position: relative; border-radius: 4px; color: #fff; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.sbox .in { padding: 14px 16px 10px; position: relative; z-index: 1; }
.sbox h3 { font-size: 34px; font-weight: 700; line-height: 1.1; }
.sbox p { font-size: 15px; }
.sbox .ic { position: absolute; right: 14px; top: 12px; opacity: .22; }
.sbox .ic svg { width: 64px; height: 64px; stroke-width: 1.6; }
.sbox .ft { display: block; text-align: center; padding: 4px 0; background: rgba(0,0,0,.12); color: rgba(255,255,255,.9); font-size: 13.5px; border: none; width: 100%; margin-top: auto; }
.sbox .ft:hover { background: rgba(0,0,0,.18); color: #fff; }
.bg-acc { background: var(--acc); } .bg-ok { background: var(--ok); } .bg-warn { background: #e0a800; } .bg-bad { background: var(--bad); } .bg-info { background: var(--info); } .bg-dark { background: #4b545c; }
body[data-theme="cyber"] .sbox { background: var(--card) !important; border-left: 4px solid var(--c, var(--acc)); color: var(--txt); }
body[data-theme="cyber"] .sbox h3 { color: var(--c, var(--acc)); text-shadow: 0 0 12px rgba(var(--acc-rgb), .35); }
body[data-theme="cyber"] .sbox .ft { color: var(--dim); background: rgba(255,255,255,.02); }

/* Karten */
.card { background: var(--card); border-radius: 4px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.card.outline { border-top: 3px solid var(--acc); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 17px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 16px; }
.card-b.p0 { padding: 0; }
.card-f { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; overflow-x: auto; }
.tabs button { background: none; border: none; padding: 11px 14px; color: var(--dim); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--acc); border-color: var(--acc); font-weight: 600; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; font-size: 14px; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:nth-child(odd) { background: rgba(0,0,0,.025); }
body[data-theme="cyber"] .tbl tbody tr:nth-child(odd) { background: rgba(255,255,255,.015); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: rgba(var(--acc-rgb), .07); }
.tbl .num { font-family: var(--mono); color: var(--dim); }
.tbl .acts { text-align: right; white-space: nowrap; }
.tscroll { overflow-x: auto; }
.empty { padding: 18px 16px; color: var(--dim); text-align: center; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; font-size: 12px; font-weight: 700; border-radius: 4px; color: #fff; background: #6c757d; white-space: nowrap; line-height: 1.2; }
.badge.ok { background: var(--ok); } .badge.warn { background: var(--warn); color: #212529; } .badge.bad { background: var(--bad); } .badge.info { background: var(--info); } .badge.acc { background: var(--acc); }
.badge.out { background: none; color: var(--dim); border: 1px solid var(--line); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #adb5bd; margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(40,167,69,.2); }

/* Formulare */
.fg { margin-bottom: 13px; }
.fg > label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.fc { width: 100%; padding: 7px 11px; border: 1px solid var(--in-line); border-radius: 4px; background: var(--in); line-height: 1.5; outline: none; transition: border-color .15s, box-shadow .15s; }
.fc:focus { border-color: rgba(var(--acc-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .2); }
textarea.fc { min-height: 150px; resize: vertical; }
.ig { display: flex; }
.ig .fc { border-radius: 4px 0 0 4px; }
.ig .btn { border-radius: 0 4px 4px 0; }
.ig .pre { display: flex; align-items: center; padding: 0 11px; background: var(--line2); border: 1px solid var(--in-line); border-right: none; border-radius: 4px 0 0 4px; color: var(--dim); }
.ig .pre + .fc { border-radius: 0; }
.ig .pre + .fc:last-child { border-radius: 0 4px 4px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.chk { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; cursor: pointer; font-weight: 400 !important; }
.chk input { width: 16px; height: 16px; accent-color: var(--acc); }
.help { font-size: 13px; color: var(--dim); margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.filters .fc { width: auto; flex: 1 1 160px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 4px; border: 1px solid transparent; font-weight: 600; background: #6c757d; color: #fff; line-height: 1.4; white-space: nowrap; }
.btn:hover { filter: brightness(.92); }
.btn.pri { background: var(--acc); }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); } .btn.warn { background: var(--warn); color: #212529; } .btn.info { background: var(--info); }
.btn.lt { background: var(--line2); color: var(--txt); border-color: var(--line); }
.btn.sm { padding: 4px 9px; font-size: 13.5px; }
.btn.block { width: 100%; justify-content: center; padding: 9px; }
.btn:disabled { opacity: .55; cursor: default; }

/* Hinweise */
.alert { padding: 11px 15px; border-radius: 4px; margin-bottom: 14px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert.bad { background: rgba(220,53,69,.1); border-color: rgba(220,53,69,.35); color: var(--bad); }
.alert.warn { background: rgba(255,193,7,.12); border-color: rgba(255,193,7,.45); color: #946c00; }
.alert.info { background: rgba(23,162,184,.1); border-color: rgba(23,162,184,.35); color: #0f6674; }
.alert.ok { background: rgba(40,167,69,.1); border-color: rgba(40,167,69,.35); color: #1e7b34; }
body[data-theme="cyber"] .alert.warn { color: var(--warn); } body[data-theme="cyber"] .alert.info { color: #5ed1e2; } body[data-theme="cyber"] .alert.ok { color: #5ee07f; }

/* Person */
.prof { text-align: center; }
.prof .pic { width: 110px; height: 110px; border-radius: 50%; margin: 4px auto 10px; background: var(--line2) center / cover no-repeat; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--dim); font-weight: 700; }
.prof h2 { font-size: 21px; font-weight: 600; }
.plist { list-style: none; text-align: left; margin-top: 12px; }
.plist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.plist li b { font-weight: 600; }
.tree { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.tree b { color: var(--txt); font-weight: normal; }
.tree div { padding-left: 14px; }
.pre-text { white-space: pre-wrap; line-height: 1.55; background: var(--line2); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.dl dt { font-weight: 600; } .dl dd { min-width: 0; }
.total { font-weight: 700; margin-top: 8px; }

/* Anklagepunkte */
.chg { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; }
.chg .tbl td { padding: 6px 10px; }
.chg input { width: 60px; padding: 3px 6px; }
.chg tr.on { background: rgba(var(--acc-rgb), .1) !important; }

/* Personen-Auswahl */
.picker { position: relative; }
.picker .drop { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 0 0 4px 4px; box-shadow: 0 6px 16px rgba(0,0,0,.15); z-index: 30; max-height: 220px; overflow-y: auto; }
.picker .drop div { padding: 8px 12px; cursor: pointer; }
.picker .drop div:hover { background: rgba(var(--acc-rgb), .1); }

/* Modal */
.modal { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-dialog { width: min(780px, 100%); background: var(--card); border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.35); animation: pop .18s ease-out; }
.modal-dialog.sm { width: min(480px, 100%); }
.mh { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mh h4 { flex: 1; font-size: 19px; font-weight: 600; }
.mh .x { background: none; border: none; font-size: 22px; color: var(--dim); line-height: 1; }
.mb { padding: 18px; }
.mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.cred { font-family: var(--mono); font-size: 18px; background: var(--line2); border: 1px dashed var(--line); border-radius: 4px; padding: 12px 14px; margin: 10px 0; user-select: all; }

/* Toasts */
#toasts { position: absolute; right: 16px; top: 70px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; background: var(--card); border-left: 4px solid var(--ok); border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.2); padding: 11px 14px; animation: pop .2s ease-out; }
.toast.err { border-color: var(--bad); }

/* Login */
.login-page { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; overflow-y: auto; }
.login-box { width: 380px; max-width: 100%; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo b { font-family: 'Rajdhani', sans-serif; font-size: 40px; font-weight: 700; letter-spacing: 2px; color: var(--txt); }
.login-logo b span { color: var(--acc); }
.login-logo div { color: var(--dim); letter-spacing: 3px; font-size: 12px; text-transform: uppercase; }
.login-msg { text-align: center; color: var(--dim); margin-bottom: 16px; }
.login-foot { text-align: center; color: var(--dim); font-size: 13px; margin-top: 14px; }

body[data-theme="cyber"] .brand .bt, body[data-theme="cyber"] .login-logo b { text-shadow: 0 0 14px rgba(var(--acc-rgb), .45); }
body[data-theme="cyber"] .card.outline { box-shadow: var(--shadow), 0 -1px 12px rgba(var(--acc-rgb), .12); }

@media (max-width: 860px) {
  .side { position: absolute; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; }
  .wrap.open .side { transform: none; }
  .topbar .clock, .userbtn .nm { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .content { padding: 0 12px 24px; }
}
