/* reBuilder Design-System: ein Satz Tokens und Bausteine für Hub und Kundenportal.
   Hell/Dunkel über [data-theme] am <html>. Abgeleitet aus dem Design-Canvas (Oktober 2026). */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600&family=JetBrains+Mono:wght@500&display=swap");

:root {
  --bg: #F3F4F7; --surface: #FFFFFF; --surface-2: #F6F7FA; --subtle: #EEF0F4; --border: #E2E4EA; --input-border: #D9DCE4; --input-bg: #FFFFFF;
  --ink: #14151A; --text-2: #3D414D; --muted: #5D6272; --muted-2: #9499A8;
  --accent: #2F5FD1; --accent-dark: #1E44A3; --accent-tint: #E8EEFC; --link-hover: #1E44A3;
  --side: #151B2B; --side-text: #A9ADBA; --side-text-2: #C3C7D2; --side-muted: #9499A8; --side-line: rgba(255,255,255,.07);
  --ok: #1D9E75; --ok-tint: #E1F5EE; --ok-text: #085041; --ok-text-2: #0F7A58;
  --warn: #BA7517; --warn-tint: #FAEEDA; --warn-text: #633806; --warn-text-2: #8A5510;
  --danger: #C23A3A; --danger-tint: #FCEBEB; --danger-text: #791F1F; --danger-text-2: #B02F2F;
  --purple: #5A50C9; --purple-tint: #EFEDFB; --info: #378ADD; --info-tint: #E6F1FB; --info-text: #0C447C;
  --chart-soft: #C9D7F6; --bar-track: #EEF0F4; --dots: #C9D0DE;
  --sans: Manrope, system-ui, sans-serif; --display: Fraunces, Georgia, serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-card: 0 14px 30px -18px rgba(20,21,26,.35); --shadow-pop: 0 24px 48px -20px rgba(20,21,26,.35); --r: 18px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E121C; --surface: #171C29; --surface-2: #1C2231; --subtle: #222839; --border: #262D3D; --input-border: #2E3547; --input-bg: #121726;
  --ink: #E8EAF0; --text-2: #C3C7D2; --muted: #9AA1B2; --muted-2: #6B7288;
  --accent-tint: #1A2547; --accent-dark: #8EA9F0; --link-hover: #9DB6F5;
  --side: #0A0D15; --side-line: rgba(255,255,255,.07);
  --ok-tint: #0F2E25; --ok-text: #5FD3A8; --ok-text-2: #4CC79A;
  --warn-tint: #33260F; --warn-text: #F0B65A; --warn-text-2: #F0B65A;
  --danger-tint: #3A1515; --danger-text: #F09595; --danger-text-2: #F09595;
  --purple-tint: #1F1C3A; --info-tint: #0F2238; --info-text: #85B7EB;
  --chart-soft: #2A3A66; --bar-track: #222839; --dots: #252C3D;
  --shadow-card: 0 14px 30px -18px rgba(0,0,0,.6); --shadow-pop: 0 24px 48px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); } a:hover { color: var(--link-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
.mono { font-family: var(--mono); font-weight: 500; }
.display { font-family: var(--display); font-weight: 500; }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); } .small { font-size: 12px; } .xs { font-size: 11px; }
.b { font-weight: 700; } .xb { font-weight: 800; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Animationen ---------- */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(29,158,117,.55); } 70% { box-shadow: 0 0 0 8px rgba(29,158,117,0); } 100% { box-shadow: 0 0 0 0 rgba(29,158,117,0); } }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(194,58,58,.55); } 70% { box-shadow: 0 0 0 10px rgba(194,58,58,0); } 100% { box-shadow: 0 0 0 0 rgba(194,58,58,0); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes grow { from { width: 0; } }
@keyframes up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@keyframes blob { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,20px) scale(1.12); } }
@keyframes ring { from { stroke-dasharray: 0 452; } }
@keyframes march { to { stroke-dashoffset: -20; } }
.live { animation: pulse 2s infinite; } .alarm { animation: pulseRed 1.6s infinite; }
.pop { animation: pop .25s cubic-bezier(.2,.8,.2,1) both; }
.spin { animation: spin 1.2s linear infinite; transform-origin: center; }
.bars > * { transform-origin: bottom; animation: up .8s cubic-bezier(.2,.8,.2,1) both; }
.bar > i { animation: grow 1.2s ease-out both; }
.blob { animation: blob 9s ease-in-out infinite; }
.working { background-image: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.5), rgba(255,255,255,0)); background-size: 200px 100%; background-repeat: no-repeat; animation: shimmer 1.6s linear infinite; }
.dots { background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 18px 18px; }
/* Bei automatischer Aktualisierung derselben Ansicht keine Einblend-Animationen wiederholen. */
.quiet .card, .quiet .row, .quiet .pop, .quiet .bars > *, .quiet .bar > i:not(.working), .quiet .ring,
.quiet [style*="animation:rise"], .quiet [style*="animation: rise"] { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .live, .alarm, .pop, .spin, .bars > *, .bar > i, .blob, .working, .card { animation: none !important; } }

/* ---------- Shell: Sidebar + Inhalt ---------- */
.shell { min-height: 100vh; display: flex; background: var(--bg); }
.side { width: 248px; flex-shrink: 0; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; position: sticky; top: 0; height: 100vh; transition: width .18s ease; }
.side-brand { display: flex; align-items: center; gap: 12px; height: 64px; margin: 0 -12px 14px; padding: 0 20px; border-bottom: 1px solid var(--side-line); color: #FFFFFF; font-weight: 800; font-size: 16px; }
.side-brand .logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; font-weight: 800; }
.side-brand .logo.light { background: #FFFFFF; color: var(--side); }
.side-brand .sub { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--side-muted); }
.side-brand .sub.sans { font-family: var(--sans); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav .group { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--side-muted); padding: 0 12px 6px; }
.nav .group + .group, .nav a + .group { padding-top: 18px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--side-text-2); font-weight: 600; transition: background .15s ease, color .15s ease; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }
.nav a.on { background: var(--accent); color: #FFFFFF; font-weight: 700; }
.nav a .badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #FFFFFF; }
.nav a .badge.warn { background: var(--warn); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--side-line); }
.side-foot .help { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.side-foot .help b { color: #FFFFFF; }
.side-foot button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-radius: 10px; border: 0; background: rgba(255,255,255,.04); color: var(--side-text); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.side-foot button:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }
.shell.collapsed .side { width: 72px; padding: 0 10px 12px; }
.shell.collapsed .side-brand { padding: 0 20px; } .shell.collapsed .side-brand > div, .shell.collapsed .nav .group, .shell.collapsed .nav a .label, .shell.collapsed .nav a .badge, .shell.collapsed .side-foot .help, .shell.collapsed .side-foot .label { display: none; }
.shell.collapsed .nav a { justify-content: center; padding: 0; }
.shell.collapsed .side-foot button svg { transform: rotate(180deg); }
.content { flex: 1 1 auto; min-width: 0; padding: 28px 36px 44px; display: flex; flex-direction: column; gap: 22px; }
.top { margin: -28px -36px 0; height: 64px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20; }
.top-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--subtle); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.top-title { font-size: 18px; font-weight: 800; white-space: nowrap; }
.top .vline { width: 1px; height: 24px; background: var(--border); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.tb { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: background .15s ease; }
.tb:hover, .tb.on { background: var(--subtle); }
.tb .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.tb .dot.accent { background: var(--accent); }
.account { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 10px 0 6px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; transition: background .15s ease; }
.account:hover, .account.on { background: var(--subtle); }
.account .who { display: flex; flex-direction: column; line-height: 1.25; } .account .who b { font-size: 14px; } .account .who span { font-size: 11px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #2A2E3A; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; position: relative; }
.avatar.blue { background: var(--accent-tint); color: var(--accent); }
.avatar.sq { border-radius: 10px; font-weight: 800; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ok-tint); color: var(--ok-text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.warn { background: var(--warn-tint); color: var(--warn-text-2); font-weight: 800; }
.status-pill.danger { background: var(--danger-tint); color: var(--danger-text-2); }
.status-pill .d { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head .kicker { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); } .crumbs a { text-decoration: none; font-weight: 600; } .crumbs b { color: var(--ink); }

/* ---------- Segmente, Chips, Pills, Buttons ---------- */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(20,21,26,.1); font-weight: 700; color: var(--ink); }
.seg.sm button { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s ease; }
.chip:hover { background: var(--subtle); } .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.chip .d { width: 8px; height: 8px; border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--subtle); color: var(--text-2); white-space: nowrap; }
.pill.ok { background: var(--ok-tint); color: var(--ok-text); } .pill.warn { background: var(--warn-tint); color: var(--warn-text); }
.pill.danger { background: var(--danger-tint); color: var(--danger-text); } .pill.info { background: var(--accent-tint); color: var(--accent-dark); }
.pill.purple { background: var(--purple-tint); color: var(--purple); } .pill.blue { background: var(--info-tint); color: var(--info-text); }
.btn { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: background .15s ease, transform .08s ease; text-decoration: none; }
.btn:hover { background: var(--subtle); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; } .btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #FFFFFF; }
[data-theme="dark"] .btn-primary:hover { background: #3E6FE0; border-color: #3E6FE0; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); } .btn-dark:hover { opacity: .9; background: var(--ink); }
.btn-danger { color: var(--danger-text-2); } .btn-danger.solid { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.btn-ok { background: var(--ok-tint); border-color: #A7DCC8; color: var(--ok-text); }
.btn-lg { height: 44px; padding: 0 18px; border-radius: 12px; font-size: 14px; } .btn-xl { height: 52px; padding: 0 24px; border-radius: 14px; font-size: 15px; font-weight: 800; }
.btn-sm { height: 36px; padding: 0 12px; } .btn-xs { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 40px; padding: 0; } .btn-icon.btn-sm { width: 36px; } .btn-icon.btn-xs { width: 32px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: 13px; text-decoration: none; }

/* ---------- Karten, KPIs, Zeilen ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: rise .5s ease both; transition: transform .2s ease, box-shadow .2s ease; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.card.r22 { border-radius: 22px; } .card.p18 { padding: 18px; } .card.flat { animation: none; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .card-head h2 { font-size: 17px; font-weight: 800; } .card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tile { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--subtle); color: var(--text-2); }
.tile.lg { width: 38px; height: 38px; border-radius: 11px; } .tile.xl { width: 40px; height: 40px; border-radius: 12px; } .tile.xxl { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; font-weight: 800; }
.tile.ok { background: var(--ok-tint); color: var(--ok-text-2); } .tile.warn { background: var(--warn-tint); color: var(--warn-text-2); } .tile.danger { background: var(--danger-tint); color: var(--danger-text-2); }
.tile.accent { background: var(--accent-tint); color: var(--accent); } .tile.purple { background: var(--purple-tint); color: var(--purple); } .tile.info { background: var(--info-tint); color: var(--info-text); }
.tile.solid { background: var(--accent); color: #FFFFFF; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } .kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 18px; gap: 12px; } .kpi .k-head { display: flex; align-items: center; justify-content: space-between; } .kpi .k-trend { font-size: 12px; font-weight: 700; }
.kpi .k-val { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; } .kpi .k-val small { color: var(--muted-2); font-weight: 600; font-size: 22px; }
.kpi .k-label { font-size: 13px; color: var(--muted); } .kpi .k-foot { height: 36px; display: flex; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--muted); }
.kpi.inline { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; } .kpi.inline .k-val { font-size: 24px; }
.row { display: grid; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 12px; transition: background .15s ease; }
.row:hover { background: var(--surface-2); } .row.alert { background: #FFF5F5; box-shadow: inset 3px 0 0 var(--danger); } [data-theme="dark"] .row.alert { background: #2A1414; }
.row.warn { background: #FFFBF3; box-shadow: inset 3px 0 0 var(--warn); } [data-theme="dark"] .row.warn { background: #2A2010; }
.thead { display: grid; gap: 12px; padding: 12px 14px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.scroll { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cols { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; } .cols > .main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; } .cols > .aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.bar { height: 6px; background: var(--bar-track); border-radius: 3px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.bar.h8 { height: 8px; border-radius: 4px; } .bar.h4 { height: 4px; } .bar > i.warn { background: var(--warn); } .bar > i.accent { background: var(--accent); } .bar > i.gray { background: var(--muted-2); } .bar > i.danger { background: var(--danger); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 14px; bottom: 14px; width: 2px; background: var(--subtle); }
.timeline .ev { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.timeline .ev .tile { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); }
.banner { position: relative; overflow: hidden; background: #2A1414; color: #FFFFFF; border-radius: var(--r); padding: 18px 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.banner .glow { position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--danger); opacity: .35; filter: blur(50px); }
.banner > * { position: relative; }
.hero { position: relative; overflow: hidden; background: var(--side); color: #FFFFFF; border-radius: 22px; padding: 32px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero .glow { position: absolute; border-radius: 50%; filter: blur(70px); } .hero > * { position: relative; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 34px; line-height: 1.12; } .hero p { color: #C3C7D2; font-size: 15px; line-height: 1.55; margin: 0; }
.steps { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.steps .st { display: inline-flex; align-items: center; gap: 6px; } .steps .st.done { color: var(--ok-text-2); } .steps .st.cur { color: var(--ink); font-weight: 800; } .steps .st.bad { color: var(--danger-text-2); }
.steps .n { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--input-border); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.steps .done .n { background: var(--ok); border-color: var(--ok); color: #FFFFFF; } .steps .cur .n { background: var(--accent); border-color: var(--accent); color: #FFFFFF; } .steps .bad .n { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.steps .ln { flex: 1; min-width: 16px; height: 3px; border-radius: 2px; background: var(--subtle); overflow: hidden; } .steps .ln.done { background: var(--ok); } .steps .ln > i { display: block; height: 100%; background: var(--accent); }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px; } .note.ok { background: var(--ok-tint); color: var(--ok-text); } .note.warn { background: var(--warn-tint); color: var(--warn-text); } .note.danger { background: var(--danger-tint); color: var(--danger-text); } .note.info { background: var(--accent-tint); color: var(--accent-dark); }
.quote { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.msg { display: flex; gap: 12px; } .msg .bubble { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--accent-tint); font-size: 14px; max-width: 620px; } .msg .bubble .who { font-size: 12px; font-weight: 800; color: var(--accent-dark); }
.msg.me { flex-direction: row-reverse; } .msg.me .bubble { border-radius: 14px 4px 14px 14px; background: var(--subtle); } .msg.me .bubble .who { color: var(--text-2); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: -2px; }
.field .wrap { position: relative; display: flex; align-items: center; }
.field .wrap > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; transition: color .15s ease; }
.field .wrap:focus-within > svg { color: var(--accent); }
.field .wrap > .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--muted); pointer-events: none; }
.inp { flex: 0 0 auto; min-width: 0; width: 100%; height: 46px; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(20,21,26,.04); font-variant-numeric: tabular-nums; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.field .wrap > .inp { flex: 1 1 auto; }
.inp::placeholder { color: var(--muted-2); font-weight: 400; }
.inp:hover { border-color: var(--muted-2); }
.inp:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,95,209,.14); }
.inp:disabled { background: var(--surface-2); color: var(--muted); border-style: dashed; cursor: not-allowed; box-shadow: none; }
.inp.icon { padding-left: 42px; } .inp.has-suffix { padding-right: 78px; }
.inp.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(194,58,58,.12); }
textarea.inp { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.5; font-weight: 400; }
.inp.sm { height: 40px; font-size: 14px; border-radius: 10px; }
select.inp { appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D6272' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
[data-theme="dark"] .inp { box-shadow: none; }
[data-theme="dark"] .inp:focus { box-shadow: 0 0 0 4px rgba(94,134,232,.22); }
[data-theme="dark"] select.inp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA1B2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
/* Statusbox mit integriertem Online-Punkt (z. B. Kürzel der Webseite) */
.status-tile { position: relative; }
.status-tile .sdot { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--surface); background: var(--muted-2); }
.status-tile .sdot.on { background: var(--ok); animation: pulse 2s infinite; } .status-tile .sdot.off { background: var(--danger); }
/* Schalter: Knopf gleitet mit leichtem Nachfedern, beim Drücken wird er kurz breiter. */
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; background: var(--input-border); cursor: pointer; flex-shrink: 0; transition: background-color .25s ease, box-shadow .2s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transform: translateX(0); transition: transform .32s cubic-bezier(.34,1.45,.55,1), width .18s ease; }
.switch:active::after { width: 25px; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch[aria-checked="true"]:active::after { transform: translateX(13px); }
.switch:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(47,95,209,.22); }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; } .toggle-row .t { display: flex; flex-direction: column; flex: 1; } .toggle-row .t b { font-size: 14px; font-weight: 600; } .toggle-row .t span { font-size: 12px; color: var(--muted); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--subtle); color: var(--muted); }
.strength { display: flex; gap: 4px; } .strength i { flex: 1; height: 5px; border-radius: 3px; background: var(--subtle); } .strength i.on { background: var(--ok); } .strength i.weak { background: var(--danger); } .strength i.mid { background: var(--warn); }

/* ---------- Menü, Dialog, Toast ---------- */
.menu { position: absolute; top: 56px; right: 0; width: 290px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 8px; display: flex; flex-direction: column; gap: 4px; animation: rise .2s ease both; z-index: 30; }
.menu.wide { width: 420px; padding: 0; overflow: hidden; } .menu .sep { height: 1px; background: var(--subtle); margin: 4px 0; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; border: 0; background: transparent; cursor: pointer; width: 100%; text-align: left; }
.menu-item:hover { background: var(--subtle); } .menu-item.danger { color: var(--danger-text-2); font-weight: 700; }
.menu .pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
/* Modal: Hintergrund klar abgedunkelt, Dialog als angehobene Fläche mit Rand, damit er sich in hell und dunkel absetzt. */
:root { --overlay-bg: rgba(21,27,43,.48); --dialog-bg: var(--surface); --dialog-border: var(--border); --dialog-shadow: 0 40px 90px -30px rgba(20,21,26,.65), 0 0 0 1px rgba(20,21,26,.04); }
[data-theme="dark"] { --overlay-bg: rgba(3,5,10,.74); --dialog-bg: #1F2536; --dialog-border: #353D53; --dialog-shadow: 0 40px 100px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06); }
.overlay { position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(6px) saturate(.9); -webkit-backdrop-filter: blur(6px) saturate(.9); display: flex; justify-content: center; align-items: flex-start; padding: 110px 16px 16px; z-index: 100; animation: overlayIn .18s ease both; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.dialog { width: 640px; max-width: 100%; background: var(--dialog-bg); border: 1px solid var(--dialog-border); border-radius: 20px; box-shadow: var(--dialog-shadow); overflow: hidden; display: flex; flex-direction: column; animation: dialogIn .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
[data-theme="dark"] .dialog .inp { background: #161B28; }
@media (prefers-reduced-motion: reduce) { .overlay, .dialog { animation: none; } }
.dialog.form { padding: 24px; gap: 14px; width: 520px; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--side); color: #FFFFFF; padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-pop); z-index: 200; display: flex; align-items: center; gap: 10px; animation: rise .25s ease both; }
.toast.danger { background: var(--danger); }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s ease; } .notif:hover { background: var(--subtle); } .notif.unread { background: #F6F8FE; } [data-theme="dark"] .notif.unread { background: #141B30; }
.notif .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .notif .t b { font-size: 14px; } .notif .t span { font-size: 12px; color: var(--muted); }
.login-split { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--surface); }
.login-split .art { flex: 1.15 1 460px; background-color: #EEF1F7; padding: 40px 48px; display: flex; flex-direction: column; gap: 32px; border-right: 1px solid var(--border); } [data-theme="dark"] .login-split .art { background-color: #121726; }
.login-split .art h1 { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.1; color: var(--side); } [data-theme="dark"] .login-split .art h1 { color: var(--ink); }
.login-split .form { flex: 1 1 400px; display: flex; align-items: center; justify-content: center; padding: 48px 40px; }
.login-split form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; animation: rise .6s ease both; }
.browser { background: var(--surface); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 30px 60px -36px rgba(21,27,43,.45); overflow: hidden; }
.browser .chrome { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); } .browser .chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--input-border); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

@media (max-width: 860px) {
  .shell { flex-direction: column; } .side { width: auto !important; height: auto; position: static; min-height: 0; padding: 0 12px 10px; }
  .side .nav { flex-direction: row; flex-wrap: wrap; } .nav .group { display: none; } .side-foot { display: none; }
  .content { padding: 20px 16px 32px; } .top { margin: -20px -16px 0; padding: 0 12px; } .top .seg, .hide-sm { display: none !important; }
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .menu { right: 8px; width: calc(100vw - 16px); } .menu.wide { width: calc(100vw - 16px); }
  .hero { padding: 24px; } .hero h1 { font-size: 26px; }
}

/* ---------- Tooltip (UI.js: data-tip) ---------- */
/* Hell: dunkler Tooltip wie die Toasts. Dunkel: angehobene dunkle Fläche mit Rand, kein greller weißer Kasten. */
:root { --tip-bg: #151B2B; --tip-fg: #FFFFFF; --tip-sub: #B9BFCC; --tip-border: transparent; --tip-shadow: 0 14px 30px -12px rgba(10, 14, 24, .55); }
[data-theme="dark"] { --tip-bg: #262D3F; --tip-fg: #E8EAF0; --tip-sub: #9AA1B2; --tip-border: #343C51; --tip-shadow: 0 16px 34px -12px rgba(0, 0, 0, .75); }
.ui-tip { position: fixed; z-index: 2000; left: 0; top: 0; max-width: 260px; display: flex; flex-direction: column; gap: 2px; padding: 8px 11px; border-radius: 10px; background: var(--tip-bg); color: var(--tip-fg); border: 1px solid var(--tip-border); font: 500 12px/1.4 var(--font, Manrope, system-ui, sans-serif); box-shadow: var(--tip-shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.ui-tip.show { opacity: 1; transform: none; }
.ui-tip.below { transform: translateY(-4px); }
.ui-tip.below.show { transform: none; }
.ui-tip b { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12.5px; }
.ui-tip span { color: var(--tip-sub); }
.ui-tip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--muted-2); }
.ui-tip .dot.ok { background: var(--ok); } .ui-tip .dot.danger { background: var(--danger); } .ui-tip .dot.warn { background: var(--warn); }
/* Pfeil: gleiche Fläche, im Dunkelmodus mit Rand an den beiden Außenkanten */
.ui-tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--tip-bg); border-right: 1px solid var(--tip-border); border-bottom: 1px solid var(--tip-border); border-radius: 0 0 2px 0; transform: rotate(45deg); }
.ui-tip.below::after { bottom: auto; top: -6px; border: 0; border-left: 1px solid var(--tip-border); border-top: 1px solid var(--tip-border); border-radius: 2px 0 0 0; }
@media (prefers-reduced-motion: reduce) { .ui-tip { transition: none; } }

/* Kebab-Menü an einem Knopf (Webseiten-Ansicht) */
.menu.kebab { top: calc(100% + 8px); right: 0; width: 240px; padding: 6px; }
.menu.kebab .menu-item { height: 38px; }
.btn-icon.on { background: var(--subtle); }

/* ---------- Auswahlfeld (UI.js ersetzt select.inp) ---------- */
.ui-select { position: relative; display: block; width: 100%; min-width: 0; }
.field .wrap > .ui-select { flex: 1 1 auto; }
.ui-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.ui-select-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; background-image: none !important; padding-right: 12px; }
.ui-select-btn .v { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ui-select-btn .v b { font-weight: 600; flex-shrink: 0; }
.ui-select-btn .v span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.ui-select-btn .v span::before { content: "· "; }
.ui-select-btn > svg { flex-shrink: 0; color: var(--muted); transition: transform .2s ease; }
.ui-select.open .ui-select-btn { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,95,209,.12); }
.ui-select.open .ui-select-btn > svg { transform: rotate(180deg); }
.ui-select-list { position: fixed; z-index: 2100; display: flex; flex-direction: column; gap: 2px; padding: 6px; max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(20,21,26,.45); animation: selIn .16s cubic-bezier(.2,.8,.2,1) both; }
.ui-select-list.up { animation-name: selInUp; }
@keyframes selIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes selInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ui-select-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.ui-select-list button .v { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ui-select-list button .v b { font-size: 14px; font-weight: 700; }
.ui-select-list button .v span { font-size: 12.5px; color: var(--muted); }
.ui-select-list button:hover, .ui-select-list button:focus-visible { background: var(--subtle); outline: 0; }
.ui-select-list button.on { background: var(--accent-tint); }
.ui-select-list button.on .v b, .ui-select-list button.on > svg { color: var(--accent-dark, var(--accent)); }
.ui-select-list button:disabled { opacity: .45; cursor: default; }
[data-theme="dark"] .ui-select-list { background: #252C3E; border-color: #353D53; box-shadow: 0 24px 60px -18px rgba(0,0,0,.85); }
[data-theme="dark"] .ui-select-list button:hover, [data-theme="dark"] .ui-select-list button:focus-visible { background: #2E3649; }
[data-theme="dark"] .ui-select-list button.on { background: rgba(47,95,209,.22); }
[data-theme="dark"] .ui-select-list button.on .v b, [data-theme="dark"] .ui-select-list button.on > svg { color: #8FB0F5; }
@media (prefers-reduced-motion: reduce) { .ui-select-list, .ui-select-btn > svg { animation: none; transition: none; } }
/* Offenes Menü: umgebende Karte nach vorne holen, sonst liegen animierte Karten darunter darüber */
.card:has(> * .menu), .card:has(> .menu), section:has(.menu.kebab) { position: relative; z-index: 40; }
