/* ReportHub – by G4S · Dark UI
   Nur Dunkelmodus. Lokale Schriften (Systemschriften), keine CDN. */

:root {
  color-scheme: dark;
  --bg: #0a0b1a;
  --bg-2: #0c0d20;
  --sidebar: #0d0e23;
  --surface: #12142c;
  --surface-2: #191b3a;
  --surface-3: #222548;
  --border: #232646;
  --border-2: #30335c;
  --text: #eceefb;
  --text-2: #c5c8e4;
  --muted: #8c90b4;
  --faint: #5f6390;
  --accent: #4f46fc;
  --accent-2: #6f68ff;
  --accent-soft: rgba(79, 70, 252, .14);
  --accent-ring: rgba(79, 70, 252, .45);
  --success: #22c55e; --success-soft: rgba(34, 197, 94, .13);
  --warning: #f5a524; --warning-soft: rgba(245, 165, 36, .14);
  --info: #4f8cff;    --info-soft: rgba(79, 140, 255, .14);
  --danger: #f04452;  --danger-soft: rgba(240, 68, 82, .14);
  --violet: #8b7cf6;  --violet-soft: rgba(139, 124, 246, .14);
  --r-lg: 18px; --r: 14px; --r-sm: 10px; --r-xs: 7px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --sidebar-w: 256px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
::selection { background: var(--accent-soft); color: #fff; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, .mono { font-family: var(--mono); font-size: .95em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- Icons */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic.lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- App-Layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, var(--accent-2), var(--accent) 60%, #3027c9); color: #fff;
  font-weight: 800; font-size: 18px; letter-spacing: -.04em; box-shadow: 0 8px 22px -8px rgba(79,70,252,.7);
}
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.brand-sub b { color: var(--text-2); font-weight: 700; }
.brand-sub b i { color: var(--accent); font-style: normal; }

.nav-group { margin-bottom: 18px; }
.nav-label { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 0 12px 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--muted);
  font-weight: 550; position: relative; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: #fff; }
.nav a.active .ic { color: var(--accent-2); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #2b2f58, #1a1d3a); color: var(--text); font-weight: 700; font-size: 13px; border: 1px solid var(--border-2);
}
.user-card .name { font-weight: 650; font-size: 13px; line-height: 1.2; }
.user-card .role { font-size: 11.5px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: rgba(10, 11, 26, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.topbar .crumbs { font-size: 12px; color: var(--muted); }
.topbar .crumbs a:hover { color: var(--text); }
.top-search { margin-left: auto; position: relative; width: min(340px, 34vw); }
.top-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.top-search input { padding-left: 38px; background: var(--surface); height: 40px; border-radius: 12px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-2); position: relative; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: #fff; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.menu-toggle { display: none; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.content.narrow { max-width: 980px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Karten */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-head h2, .card-head h3 { font-size: 15.5px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 16px 20px 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 550; }
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat-value { font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.stat-foot { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tone-accent { background: var(--accent-soft); color: var(--accent-2); }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warning { background: var(--warning-soft); color: var(--warning); }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.up { color: var(--success); } .down { color: var(--danger); }

/* Balkendiagramm (SVG/HTML) */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #353a6a, #262a4e); min-height: 3px; position: relative; transition: background .2s; }
.bar.hot { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 18px -8px rgba(79,70,252,.6); }
.bar-col:hover .bar { background: linear-gradient(180deg, #454b80, #30355e); }
.bar-col:hover .bar.hot { background: linear-gradient(180deg, #8a84ff, var(--accent-2)); }
.bar-val { font-size: 11px; color: var(--text-2); font-weight: 600; }
.bar-lbl { font-size: 10.5px; color: var(--faint); white-space: nowrap; }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.list-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint);
  font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 8px 10px; }
.table .t-strong { font-weight: 650; color: #fff; }
.table a.row-link { display: block; }
.table td .sub { font-size: 12px; color: var(--muted); }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); }
.badge-muted { background: var(--surface-2); color: var(--faint); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 650; font-family: var(--mono); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-3); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(79,70,252,.8); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.btn-success:hover { background: var(--success); color: #062b12; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text-2); cursor: pointer;
}
.btn-icon:hover { background: var(--surface-3); color: #fff; }
.btn-icon.sm { width: 26px; height: 22px; border-radius: 6px; }
.btn-icon.sm .ic { width: 14px; height: 14px; }
.btn-icon.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.btn-icon.danger:hover { background: var(--danger); color: #fff; }
.link { color: var(--accent-2); font-weight: 600; }
.link:hover { color: #9a95ff; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- Formulare */
label, .label { display: block; font-size: 12.5px; font-weight: 650; color: var(--text-2); margin-bottom: 7px; }
.req { color: var(--accent-2); }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.input { height: auto; min-height: 88px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238c90b4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: #3d4170; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #0b0c1e; }
.input:disabled { opacity: .7; cursor: not-allowed; }
.input-sm { height: 36px; font-size: 13.5px; border-radius: 9px; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group .input { flex: 1; min-width: 0; }
.help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field { margin-bottom: 0; min-width: 0; }
.field.has-error .input, .field.has-error .choice { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; font-weight: 600; }

.form-grid { display: flex; flex-wrap: wrap; gap: 18px 16px; padding: 4px 20px 22px; }
.form-grid .w-full { flex: 1 1 100%; }
.form-grid .w-half { flex: 1 1 calc(50% - 8px); }
.form-grid .w-third { flex: 1 1 calc(33.333% - 11px); }
.form-grid .w-fifth { flex: 1 1 calc(20% - 13px); min-width: 120px; }
.form-section { margin-bottom: 16px; overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 14px; font-weight: 700; font-size: 15px; }
.section-head > span { display: flex; align-items: center; gap: 10px; }
.section-head > span::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
details.form-section > summary { list-style: none; cursor: pointer; user-select: none; }
details.form-section > summary::-webkit-details-marker { display: none; }
details.form-section > summary:hover { background: var(--surface-2); }
details.form-section .chev { transition: transform .2s; color: var(--muted); }
details.form-section[open] .chev { transform: rotate(180deg); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 0 16px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; font-size: 14.5px; font-weight: 550; color: var(--text); }
.choice:hover { border-color: #3d4170; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; font-size: 14.5px; font-weight: 550; color: var(--text); min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c9ceda; transition: transform .18s, background .18s; }
.switch input:checked + .switch-ui { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px var(--accent-ring); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; cursor: pointer; color: var(--text); font-size: 13.5px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-stack { display: flex; flex-direction: column; gap: 16px; }

/* Repeater (Taetigkeiten) */
.repeater { width: 100%; }
.rep-head, .rep-row { display: flex; gap: 10px; align-items: flex-start; }
.rep-head { padding: 0 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.rep-row { padding: 10px; margin-bottom: 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); transition: box-shadow .15s, border-color .15s, opacity .15s; }
.rep-row.dragging { opacity: .45; }
.rep-row.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.rep-col { flex: 0 0 110px; min-width: 0; }
.rep-col.grow { flex: 1 1 auto; }
.rep-col.t-text:not(.grow) { flex: 0 0 220px; }
.rep-handle-col { flex: 0 0 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rep-del-col { flex: 0 0 40px; }
.rep-handle { cursor: grab; }
.rep-move { display: flex; gap: 2px; }
.rep-add { margin-top: 4px; }
.rep-head .rep-handle-col, .rep-head .rep-del-col { height: 1px; }

/* Verteiler */
.recip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.recip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; margin: 0; }
.recip:has(input:checked) { border-color: var(--accent); background: rgba(79,70,252,.07); }
.recip input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.recip input:disabled { opacity: .7; }
.recip .k { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.recip .n { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.recip .m { font-size: 11.5px; color: var(--muted); word-break: break-all; }

/* Lesemodus */
.ro-section { margin-bottom: 16px; }
.ro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 0 20px 14px; }
.ro-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ro-row.ro-full { grid-column: 1 / -1; display: block; border-bottom: 0; }
.ro-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding-top: 2px; }
.ro-value { font-weight: 550; }

.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }

/* ---------------------------------------------------------------- Filterleiste */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px; border-bottom: 1px solid var(--border); }
.filters .f { display: flex; flex-direction: column; min-width: 140px; flex: 1 1 140px; }
.filters .f.wide { flex: 2 1 220px; }
.filters label { font-size: 11px; margin-bottom: 5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 600; }
.chip:hover { color: #fff; border-color: var(--border-2); }
.chip.active { background: var(--accent-soft); border-color: transparent; color: #fff; }
.chip .n { font-size: 11px; color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: #fff; border-color: var(--accent); }

/* ---------------------------------------------------------------- Meldungen */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 550; }
.flash.success { border-color: rgba(34,197,94,.35); background: var(--success-soft); }
.flash.error { border-color: rgba(240,68,82,.4); background: var(--danger-soft); }
.flash.warning { border-color: rgba(245,165,36,.4); background: var(--warning-soft); }
.flash.info { border-color: rgba(79,140,255,.35); background: var(--info-soft); }
.flash .close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.info-box { padding: 12px 14px; border-radius: 12px; background: var(--info-soft); border: 1px solid rgba(79,140,255,.3); color: var(--text-2); font-size: 13.5px; }
.warn-box { padding: 12px 14px; border-radius: 12px; background: var(--warning-soft); border: 1px solid rgba(245,165,36,.35); font-size: 13.5px; }
.danger-box { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(240,68,82,.35); font-size: 13.5px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }

.toast-zone { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-weight: 600; animation: toastIn .2s ease-out; }
.toast.error { background: #3a1419; border-color: rgba(240,68,82,.5); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- Bearbeitungsleiste */
.sticky-actions {
  position: sticky; bottom: 0; z-index: 25; margin-top: 18px; padding: 14px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: rgba(18, 20, 44, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 -10px 30px -18px rgba(0,0,0,.8);
}
.save-state { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.save-state .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.save-state.saving .pulse { background: var(--warning); animation: pulse 1s infinite; }
.save-state.saved .pulse { background: var(--success); }
.save-state.error .pulse { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

/* Einsatzinformationen: Sticky-Button + Bottom Sheet */
.fab-info {
  position: fixed; right: 22px; bottom: 96px; z-index: 60; height: 54px; padding: 0 20px; border-radius: 99px; border: 0;
  background: linear-gradient(145deg, var(--accent-2), var(--accent)); color: #fff; font: inherit; font-weight: 750; font-size: 15px;
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; box-shadow: 0 14px 30px -10px rgba(79,70,252,.75);
}
.fab-info:hover { filter: brightness(1.08); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; opacity: 0; transition: opacity .2s; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 210; width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  transform: translate(-50%, 102%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  background: var(--surface); border: 1px solid var(--border-2); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.9);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grab { width: 44px; height: 5px; border-radius: 99px; background: var(--border-2); margin: 10px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px 14px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 16px 20px 28px; -webkit-overflow-scrolling: touch; }
.sheet-section { margin-bottom: 20px; }
.sheet-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 8px; }
.contact .grow .n { font-weight: 650; }
.contact .grow .f { font-size: 12px; color: var(--muted); }
.call-btn { height: 44px; padding: 0 14px; border-radius: 11px; background: var(--success-soft); color: var(--success); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.call-btn:hover { background: var(--success); color: #062b12; }
.secret { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 8px; }
.secret .val { font-family: var(--mono); font-size: 17px; letter-spacing: .12em; color: var(--text); }
.secret .val.masked { color: var(--faint); letter-spacing: .25em; }
.doc-card { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 10px; }
.doc-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.doc-card .body { font-size: 14px; color: var(--text-2); white-space: pre-wrap; margin-top: 10px; }
.doc-card details summary { cursor: pointer; color: var(--accent-2); font-weight: 650; font-size: 13px; margin-top: 8px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Fotos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo form { position: absolute; top: 6px; right: 6px; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 11.5px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.upload-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 18px; color: var(--muted); cursor: pointer; text-align: center; aspect-ratio: 4 / 3; margin: 0; }
.upload-drop:hover { border-color: var(--accent); color: var(--text); }
.upload-drop input { display: none; }

/* Timeline (Historie) */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-2); }
.tl-item.hot::before { border-color: var(--accent); background: var(--accent); }
.tl-title { font-weight: 650; font-size: 13.5px; }
.tl-sub { font-size: 12px; color: var(--muted); }

/* Typ-Kacheln (Neuer Bericht / Mobil) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; text-align: left; color: var(--text); font: inherit; transition: border-color .15s, transform .1s, background .15s; min-height: 140px; width: 100%;
}
.tile:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
.tile:active { transform: scale(.99); }
.tile .t-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.tile .t-ico .ic { width: 24px; height: 24px; }
.tile .t-name { font-weight: 700; font-size: 16px; }
.tile .t-desc { font-size: 12.5px; color: var(--muted); margin-top: -8px; }
.tile.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.site-results { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.site-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; }
.site-opt:hover, .site-opt.selected { border-color: var(--accent); background: rgba(79,70,252,.07); }
.site-opt .n { font-weight: 650; }
.site-opt .a { font-size: 12.5px; color: var(--muted); }

.steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 13px; }
.step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; color: var(--text-2); }
.step.active { color: #fff; border-color: var(--accent); }
.step.active b { background: var(--accent); color: #fff; }
.step.done b { background: var(--success); color: #062b12; }

/* Rechte-Matrix */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.matrix .mod td { background: var(--bg-2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.json-editor { font-family: var(--mono); font-size: 12.5px; min-height: 520px; line-height: 1.55; tab-size: 2; white-space: pre; }

/* ---------------------------------------------------------------- Login / Plain */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 15% 10%, rgba(79,70,252,.22), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(79,140,255,.10), transparent 60%), var(--bg-2);
  border-right: 1px solid var(--border);
}
.auth-art h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; max-width: 520px; }
.auth-art p { color: var(--muted); max-width: 460px; font-size: 15px; }
.auth-feats { display: grid; gap: 12px; max-width: 460px; }
.auth-feat { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: rgba(18,20,44,.7); border: 1px solid var(--border); }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(400px, 100%); }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.plain-wrap { min-height: 100vh; padding: 40px 20px; display: flex; justify-content: center; }
.plain-wrap > .card { width: min(760px, 100%); align-self: flex-start; }

/* ---------------------------------------------------------------- Mobile Bottom-Nav */
.bottom-nav { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 50px -20px rgba(0,0,0,.9); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .top-search { display: none; }
  .topbar .crumbs { display: none; }
  .content { padding: 18px 14px 110px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); }
  .ro-grid { grid-template-columns: minmax(0, 1fr); }
  .ro-row { grid-template-columns: 130px minmax(0, 1fr); }
  .page-head h1 { font-size: 21px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(13,14,35,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 650; }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: #fff; }
  .bottom-nav a.active .ic { color: var(--accent-2); }
  .bottom-nav a.new { color: #fff; }
  .bottom-nav a.new span.ico { width: 46px; height: 46px; margin-top: -20px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 22px -8px rgba(79,70,252,.8); border: 3px solid var(--bg); }
  .fab-info { bottom: calc(88px + env(safe-area-inset-bottom)); right: 14px; }
  .sticky-actions { bottom: calc(74px + env(safe-area-inset-bottom)); border-radius: 14px; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .table-cards thead { display: none; }
  .table-cards tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table-cards td { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border: 0; }
  .table-cards td::before { content: attr(data-label); color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
  .table-cards td.no-label::before { content: none; }
  .filters .f { flex: 1 1 calc(50% - 10px); min-width: 0; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-value { font-size: 24px; }
  .form-grid { padding: 4px 14px 18px; gap: 16px 12px; }
  .form-grid .w-half, .form-grid .w-third { flex: 1 1 100%; }
  .form-grid .w-fifth { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .section-head { padding: 14px; }
  .rep-head { display: none; }
  .rep-row { flex-wrap: wrap; position: relative; padding: 12px; }
  .rep-row .rep-col { flex: 1 1 calc(50% - 5px) !important; }
  .rep-row .rep-col.grow { flex: 1 1 100% !important; order: 3; }
  .rep-row .rep-col::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
  .rep-row .rep-handle-col { flex: 0 0 100%; flex-direction: row; justify-content: flex-start; order: -1; height: auto; }
  .rep-row .rep-del-col { position: absolute; right: 10px; top: 10px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { flex-direction: row; align-items: center; min-height: 0; padding: 16px; }
  .tile .t-desc { margin-top: 2px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .sticky-actions, .fab-info { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 640px) { .hide-sm { display: none; } .topbar .btn-primary { width: 40px; padding: 0; } }

/* Branding (Logo-Dateien aus dem ReportHub-Branding-Set) */
.brand { padding: 4px 6px 22px; }
.brand-logo { display: block; width: 100%; max-width: 200px; height: auto; }
.brand-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.auth-art { background: radial-gradient(900px 500px at 15% 10%, rgba(79,70,252,.25), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(111,104,255,.12), transparent 60%), var(--bg-2); }
.auth-banner { width: 100%; max-width: 620px; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); border: 1px solid var(--border); }
.sheet:not(.open) { visibility: hidden; transition: transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s linear .25s; }
.section-head > span:not(:first-child)::before { content: none; }
@media (max-width: 900px) { body:has(.sticky-actions) .fab-info { bottom: calc(170px + env(safe-area-inset-bottom)); height: 48px; padding: 0 16px; font-size: 14px; } }

/* =====================================================================
   ReportHub FX – Bewegung, Glas, Licht (nur Optik, keine Funktion)
   ===================================================================== */
:root { --glass: rgba(20, 22, 48, .62); --glass-2: rgba(28, 30, 62, .7); --glow: 0 0 0 1px rgba(111,104,255,.35), 0 18px 50px -18px rgba(79,70,252,.55); }

/* Animierter Aurora-Hintergrund */
body { background: var(--bg); overflow-x: hidden; }
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(80px); opacity: .85;
}
body::before { width: 62vmax; height: 62vmax; left: -18vmax; top: -24vmax;
  background: radial-gradient(circle at 40% 40%, rgba(79,70,252,.55), rgba(79,70,252,0) 62%); animation: aurora1 22s ease-in-out infinite alternate; }
body::after { width: 54vmax; height: 54vmax; right: -16vmax; bottom: -22vmax;
  background: radial-gradient(circle at 50% 50%, rgba(168,85,247,.38), rgba(59,130,246,.18) 45%, transparent 66%); animation: aurora2 26s ease-in-out infinite alternate; }
@keyframes aurora1 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(14vw, 10vh) scale(1.15); } 100% { transform: translate(4vw, 26vh) scale(.95); } }
@keyframes aurora2 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-12vw, -14vh) scale(1.1); } 100% { transform: translate(-22vw, -4vh) scale(1.2); } }
.app { position: relative; }
.main { background: linear-gradient(180deg, rgba(10,11,26,.25), rgba(10,11,26,.55)); }
.content { max-width: 1720px; }

/* feines Raster */
.main::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%); }
.content, .topbar { position: relative; z-index: 1; }

/* Glas-Karten mit Verlaufsrand und Cursor-Licht */
.card {
  position: relative; background: var(--glass); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.06); isolation: isolate;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(140deg, rgba(111,104,255,.55), rgba(255,255,255,.04) 35%, rgba(255,255,255,.02) 65%, rgba(168,85,247,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; transition: opacity .35s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(111,104,255,.16), transparent 45%); }
.card:hover::after { opacity: 1; }
.card:hover::before { opacity: 1; }
.card.stat:hover, a.card:hover, .tile:hover { transform: translateY(-4px); box-shadow: var(--glow); }

/* Kennzahlen */
.stat { overflow: hidden; }
.stat-value { background: linear-gradient(180deg, #fff 30%, #b9b5ff); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-value span.muted { -webkit-text-fill-color: var(--muted); }
.stat-ico { position: relative; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.stat-ico::after { content: ""; position: absolute; inset: -6px; border-radius: 16px; border: 1px solid currentColor; opacity: 0; animation: ring 3.2s ease-out infinite; }
.stat:nth-child(2) .stat-ico::after { animation-delay: .8s; } .stat:nth-child(3) .stat-ico::after { animation-delay: 1.6s; } .stat:nth-child(4) .stat-ico::after { animation-delay: 2.4s; }
@keyframes ring { 0% { transform: scale(.85); opacity: .5; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
.stat:hover .stat-ico { transform: rotate(-8deg) scale(1.1); }
.stat .spark { position: absolute; right: -10px; bottom: -14px; width: 150px; height: 70px; opacity: .35; pointer-events: none; }

/* Begruessung */
.hello { background: linear-gradient(90deg, #fff, #c9c5ff 40%, #8f88ff 70%, #fff); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 220% center; } }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out 1s 2; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: live 2s infinite; display: inline-block; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* Diagramm */
.chart-wrap { position: relative; }
.chart-grid { position: absolute; inset: 10px 0 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { border-top: 1px dashed rgba(255,255,255,.06); }
.bars { position: relative; height: 220px; }
.bar { transform-origin: bottom; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms + 200ms);
  background: linear-gradient(180deg, rgba(111,104,255,.55), rgba(79,70,252,.12)); border: 1px solid rgba(111,104,255,.25); border-bottom: 0; }
.bar.hot { background: linear-gradient(180deg, #8f88ff, var(--accent) 60%, rgba(79,70,252,.35)); box-shadow: 0 0 24px -4px rgba(111,104,255,.8); border-color: rgba(255,255,255,.25); }
.bar-col:hover .bar { background: linear-gradient(180deg, #a7a2ff, rgba(111,104,255,.35)); transform: scaleY(1.03); }
.bar-col .bar-val { opacity: 0; transform: translateY(6px); transition: .25s; }
.bar-col:hover .bar-val, .bar-col .bar-val.always { opacity: 1; transform: none; }
.bar-empty { height: 3px !important; background: rgba(255,255,255,.08); border: 0; box-shadow: none; }
@keyframes grow { from { transform: scaleY(0); opacity: .2; } to { transform: scaleY(1); opacity: 1; } }

/* Fortschrittsbalken mit Schimmer */
.progress > span { position: relative; overflow: hidden; animation: fill 1.2s cubic-bezier(.2,.8,.2,1) both .3s; transform-origin: left; background: linear-gradient(90deg, var(--accent), #a855f7); }
.progress > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: sheen 2.8s ease-in-out infinite 1.5s; }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes sheen { to { transform: translateX(100%); } }

/* Navigation */
.nav a { transition: background .2s, color .2s, padding-left .25s; }
.nav a:hover { padding-left: 16px; }
.nav a .ic { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.nav a:hover .ic { transform: scale(1.15); }
.nav a.active { background: linear-gradient(90deg, rgba(79,70,252,.32), rgba(79,70,252,.06)); box-shadow: inset 0 0 0 1px rgba(111,104,255,.25); }
.nav a.active::before { box-shadow: 0 0 14px 2px rgba(111,104,255,.9); }
.sidebar { background: linear-gradient(180deg, rgba(14,15,38,.92), rgba(10,11,28,.96)); backdrop-filter: blur(16px); }
.brand-logo { filter: drop-shadow(0 6px 18px rgba(79,70,252,.45)); transition: transform .4s; }
.brand:hover .brand-logo { transform: scale(1.03); }
.topbar { background: rgba(10, 11, 26, .55); }

/* Buttons mit Glanz und Ripple */
.btn { position: relative; overflow: hidden; transition: background .2s, border-color .2s, transform .15s, box-shadow .25s; }
.btn-primary { background: linear-gradient(135deg, #6f68ff, var(--accent) 55%, #3a30d8); border-color: transparent; }
.btn-primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: left .6s; }
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(111,104,255,.9); transform: translateY(-1px); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.35); animation: ripple .6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.icon-btn { transition: transform .2s, background .2s; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn .dot { animation: pop .5s cubic-bezier(.2,1.6,.4,1) both .6s; }
@keyframes pop { from { transform: scale(0); } }

/* Tabellen & Listen */
.table tbody tr { position: relative; }
.table tbody tr td:first-child { box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow .2s; }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
.list-item { transition: transform .2s, background .2s; border-radius: 10px; }
a.list-item:hover { transform: translateX(4px); }
.list-ico { transition: transform .3s; }
.list-item:hover .list-ico, tr:hover .list-ico { transform: scale(1.08) rotate(-4deg); }
.tile .t-ico { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.tile:hover .t-ico { transform: scale(1.1) rotate(-6deg); box-shadow: 0 10px 24px -8px rgba(111,104,255,.8); }
.input { background: rgba(10,11,28,.7); }
.input:focus { box-shadow: 0 0 0 3px rgba(79,70,252,.22), 0 0 24px -6px rgba(111,104,255,.7); }

/* Einblenden beim Scrollen (per JS) */
.fx-reveal { opacity: 0; transform: translateY(18px) scale(.985); }
.fx-in { animation: reveal .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.page-head { animation: reveal .6s cubic-bezier(.2,.8,.2,1) both; }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .fx-reveal { opacity: 1; transform: none; }
}
