@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/inter-latin-opsz-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "InterV"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/inter-latin-ext-opsz-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113; }

:root {
  --bg: #f4f5f7; --card: #fff; --ink: #14161a; --ink-2: #3a3f47; --muted: #6b7079; --line: #e3e6ea;
  --accent: #1f3550; --accent-soft: #e9eef4;
  --good: #1f7a4d; --good-soft: #e3f3ea; --warn: #9a6400; --warn-soft: #fbf0d9; --bad: #a3312a; --bad-soft: #f8e4e2;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "InterV", "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* Gerüst */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100%; }
.side { background: var(--accent); color: #fff; padding: 22px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 650; font-size: 16px; padding: 0 10px 18px; letter-spacing: -.01em; }
.brand span { display: block; font-weight: 400; font-size: 12px; opacity: .7; margin-top: 2px; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 8px; color: #fff; text-decoration: none; opacity: .78; }
.nav:hover { opacity: 1; background: rgba(255,255,255,.08); }
.nav.on { opacity: 1; background: rgba(255,255,255,.16); font-weight: 600; }
.count { background: #fff; color: var(--accent); font-size: 11.5px; font-weight: 650; border-radius: 99px; padding: 1px 8px; }
.side .grow { flex: 1; }
.side button { background: none; border: 0; color: #fff; opacity: .6; text-align: left; padding: 9px 10px; cursor: pointer; border-radius: 8px; }
.side button:hover { opacity: 1; background: rgba(255,255,255,.08); }
main { padding: 28px 32px 60px; max-width: 1240px; width: 100%; }

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.grid { display: grid; gap: 16px; }
.tiles { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
a.tile { display: block; text-decoration: none; color: inherit; }
a.tile:hover { border-color: #c5cad1; }
.tile .n { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.tile .l { color: var(--muted); margin-top: 4px; }
.cols2 { grid-template-columns: 1.4fr 1fr; align-items: start; }
.empty { color: var(--muted); padding: 18px 0 6px; }

.chip { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 550; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.grey { background: #eceef1; color: var(--ink-2); }
.fit { display: inline-grid; place-items: center; min-width: 38px; height: 26px; border-radius: 7px; font-weight: 650; font-size: 13px; background: #eceef1; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fit.hi { background: var(--good-soft); color: var(--good); }
.fit.mid { background: var(--accent-soft); color: var(--accent); }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 550; }
.btn:hover { border-color: #c5cad1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 13px; cursor: pointer; }
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafbfc; }
td .t { font-weight: 600; }
.tablewrap { overflow-x: auto; }

.row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .t { font-weight: 600; }
.dots { letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.dots i { color: #cfd4da; font-style: normal; }

/* Dialog */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 24px 70px rgba(15,25,40,.3); }
dialog::backdrop { background: rgba(20,28,40,.45); }
.dlg-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.dlg-head h2 { font-size: 18px; margin: 0 0 4px; }
.dlg-body { padding: 18px 24px; overflow: auto; max-height: calc(100vh - 250px); }
.dlg-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0 0 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.pre { white-space: pre-wrap; background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 6px 0 16px; }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
input.in, textarea.in { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
textarea.in { min-height: 260px; resize: vertical; line-height: 1.5; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(380px, 100%); }
.login-btns { margin-top: 12px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9px; z-index: 50; max-width: calc(100vw - 32px); }
#toast.bad { background: var(--bad); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .brand { width: 100%; padding-bottom: 8px; }
  .side .grow { display: none; }
  main { padding: 18px 14px 50px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cols2 { grid-template-columns: 1fr; }
}
