/* ==========================================================================
   Retro Roleplay Portal – „Night City“ Design 2026
   Dunkel, Neon-Verlauf (Pink → Orange → Gold), Glasflächen, mobile-first.
   ========================================================================== */

:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --surface: rgba(20, 20, 30, .72);
  --surface-2: rgba(34, 34, 50, .78);
  --solid: #12121b;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f3f3f7;
  --muted: #9091a6;
  --dim: #5f6178;

  --pink: #ff2d75;
  --orange: #ff7a1a;
  --gold: #ffc23d;
  --cyan: #19e3ff;
  --violet: #8b5cff;
  --green: #22e39a;
  --red: #ff3b5c;
  --warn: #ffb020;
  --grad: linear-gradient(120deg, #ff2d75 0%, #ff6a3d 50%, #ffb000 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 45, 117, .16), rgba(255, 176, 0, .10));

  /* Alias-Namen aus älteren Modulen */
  --accent: var(--gold);
  --accent-2: #ffd77a;
  --in: var(--green);
  --out: var(--red);
  --adjust: var(--violet);
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --border: var(--line);

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(255, 45, 117, .35), 0 10px 30px rgba(255, 45, 117, .25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Hintergrund: Stadtlichter + Körnung + feines Raster */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(255, 45, 117, .20), transparent 60%),
    radial-gradient(700px 500px at 110% 0%, rgba(25, 227, 255, .10), transparent 60%),
    radial-gradient(900px 700px at 60% 120%, rgba(255, 122, 26, .14), transparent 60%),
    var(--bg);
}
.bg-fx::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  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 0%, transparent 75%);
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
code { background: rgba(255, 255, 255, .06); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
/* padding: breite Buchstaben (Bebas) ragen über die Box hinaus – sonst schneidet der Verlauf das letzte Zeichen ab */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .07em 0 .02em; margin: 0 -.03em 0 -.02em; }
h3 { margin: 0 0 12px; font: 400 22px/1.1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
h4 { margin: 16px 0 8px; font-size: 14px; }

.logo-mark {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font: 400 34px/1 var(--font-display); letter-spacing: .02em; color: #fff;
  background: var(--grad); box-shadow: 0 10px 40px rgba(255, 45, 117, .45);
}
.logo-mark.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; box-shadow: 0 6px 20px rgba(255, 45, 117, .35); }
.logo-mark.has-img { background: var(--solid); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 6px 20px rgba(255, 45, 117, .25); }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------ Login ------------------------------ */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(420px, 100%); text-align: center; padding: 40px 28px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 28px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.login-card .logo-mark { margin: 0 auto 18px; }
.login-card h1 { margin: 0 0 6px; font-size: 42px; line-height: 1; }
.login-error { background: rgba(255, 59, 92, .12); color: #ff8fa3; border-radius: 12px; padding: 10px 12px; }
.btn-discord { margin: 22px 0 14px; width: 100%; justify-content: center; background: #5865f2; border-color: #5865f2; color: #fff; padding: 14px 16px; font-size: 15px; }

/* Login als Vorstellung: links Slogan + Anmeldung, rechts 3D-Slideshow der Discord-Panels */
.login { overflow-x: hidden; padding: 24px 20px; }
.login-wrap { width: min(1280px, 100%); display: grid; grid-template-columns: minmax(320px, 540px) minmax(0, 1fr); gap: 44px; align-items: center; }
.login-hero { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }
.login-brand { display: flex; align-items: center; gap: 16px; color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1.25; }
.login-brand small { color: var(--muted); font-size: 11.5px; letter-spacing: .16em; font-weight: 700; }
.login-logo { width: 68px; height: 68px; border-radius: 18px; box-shadow: 0 12px 40px rgba(255, 45, 117, .45), 0 0 0 1px rgba(255, 255, 255, .1); }
.login-title { font-size: clamp(36px, 3.9vw, 56px); line-height: .95; margin: 0; letter-spacing: .02em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-lead { color: #c7c8d6; font-size: 15.5px; line-height: 1.55; margin: 0; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.login-points li {
  display: flex; gap: 12px; align-items: center; padding: 9px 14px; border-radius: 14px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.login-points li span { font-size: 18px; flex: none; }
.login-free {
  display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; text-align: left;
  background: var(--grad-soft); border: 1px solid rgba(255, 45, 117, .45); box-shadow: 0 0 30px rgba(255, 45, 117, .15);
}
.login-free > span { font-size: 24px; flex: none; }

/* Familienstatus (Einstellungen) */
.ft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft-opt { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 14px; cursor: pointer; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); color: var(--muted); font-size: 13px; font-weight: 500; }
.ft-opt b { color: var(--text); font-size: 15px; }
.ft-opt span b { font-size: inherit; }
.ft-opt.active { border-color: rgba(255, 45, 117, .6); background: var(--grad-soft); box-shadow: 0 0 0 1px rgba(255, 45, 117, .3); }
@media (max-width: 560px) { .ft-grid { grid-template-columns: 1fr; } }
.login-free > div { display: grid; gap: 3px; }
.login-free strong { font: 400 23px/1.05 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.login-free small { color: #d6d7e2; font-size: 13.5px; line-height: 1.45; }
.login .btn-discord, .login .btn-discord:hover { background: #5865f2; border-color: #5865f2; color: #fff; }
.login .btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.login-hero .btn-discord { margin: 2px 0 0; width: auto; align-self: flex-start; padding: 13px 24px; font-size: 15.5px; box-shadow: 0 12px 34px rgba(88, 101, 242, .4); }
.login-hero .btn-discord:hover { transform: translateY(-1px); }
.login-hero > .small { margin: 0; }

.showcase { position: relative; perspective: 1600px; display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.sc-glow {
  position: absolute; inset: 6% 12% 26%; pointer-events: none; filter: blur(34px);
  background: radial-gradient(closest-side, rgba(255, 45, 117, .38), rgba(255, 176, 0, .14) 60%, transparent);
  animation: sc-glow 8s ease-in-out infinite;
}
@keyframes sc-glow { 50% { opacity: .65; transform: scale(1.06); } }
.sc-stage {
  position: relative; width: 100%; height: 540px; perspective: 1600px;
  /* seitliche Bilder zum Rand hin ausblenden, damit sie nicht hinter den Text ragen (Perspektive liegt deshalb hier) */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.sc-slide {
  --d: 0; --a: 0; --shift: 46%; --tilt: -32deg; --depth: -230px;
  position: absolute; left: 50%; top: 48%; margin: 0; width: min(510px, 66%); cursor: pointer; z-index: calc(10 - var(--a));
  transform: translate(-50%, -50%) translateX(calc(var(--d) * var(--shift))) translateZ(calc(var(--a) * var(--depth))) rotateY(calc(var(--d) * var(--tilt))) scale(calc(1 - var(--a) * .07));
  transition: transform .95s cubic-bezier(.2, .75, .2, 1), opacity .95s, filter .95s;
}
.sc-slide img {
  display: block; width: 100%; height: auto; max-height: 470px; object-fit: cover; object-position: top; border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  -webkit-box-reflect: below 10px linear-gradient(transparent 80%, rgba(255, 255, 255, .13));
}
.sc-slide.is-near { opacity: .72; filter: brightness(.68) saturate(.85); }
.sc-slide.is-far { opacity: .28; filter: brightness(.45) saturate(.7); }
.sc-slide.is-hidden { opacity: 0; pointer-events: none; }
.sc-slide.is-active { animation: sc-float 6s ease-in-out infinite; cursor: default; }
.sc-slide.is-active img { box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 45, 117, .4), 0 0 70px rgba(255, 45, 117, .28); }
@keyframes sc-float { 50% { translate: 0 -10px; } }
/* Umschalter Discord / Portal */
.sc-tabs { position: relative; z-index: 3; display: inline-flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sc-tab { border: 0; background: none; color: var(--muted); font: 700 13.5px var(--font); padding: 8px 16px; border-radius: 99px; cursor: pointer; }
.sc-tab:hover { color: var(--text); }
.sc-tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(255, 45, 117, .35); }
/* Portal-Bilder sind breit (16:10) → breitere Slides */
.showcase.is-portal .sc-slide { width: min(720px, 92%); --shift: 38%; --tilt: -28deg; }
.showcase.is-portal .sc-slide img { max-height: none; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.sc-caption { text-align: center; max-width: 520px; min-height: 70px; display: grid; gap: 4px; position: relative; z-index: 2; }
.sc-caption b { font: 400 30px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
.sc-caption span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.sc-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 2; }
.sc-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .18); cursor: pointer; transition: width .3s, background .3s; }
.sc-dot.active { width: 26px; background: var(--grad); }

/* IC-Kontakt unten rechts (Mouse-over, am Handy antippen) */
.ic-contact { position: fixed; right: 18px; bottom: 18px; z-index: 50; outline: none; }
.ic-contact-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 99px; cursor: default;
  font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.ic-contact-card {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: 250px; padding: 14px 16px; border-radius: 16px;
  display: grid; gap: 3px; background: var(--solid); border: 1px solid rgba(255, 45, 117, .45);
  box-shadow: var(--shadow), 0 0 40px rgba(255, 45, 117, .2);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.ic-contact-card small { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ic-contact-card b { font: 400 26px/1.05 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.ic-contact-card span { color: #d6d7e2; font-size: 15px; font-weight: 600; }
.ic-contact-card p { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ic-contact:hover .ic-contact-card, .ic-contact:focus .ic-contact-card, .ic-contact:focus-within .ic-contact-card { opacity: 1; visibility: visible; transform: none; }
.ic-contact:hover .ic-contact-btn, .ic-contact:focus .ic-contact-btn { border-color: rgba(255, 45, 117, .55); }

/* Laptops & niedrige Fenster: alles enger, damit die Seite ohne Scrollen passt */
@media (min-width: 1021px) and (max-height: 900px) {
  .login { padding: 16px 20px; }
  .login-hero { gap: 11px; }
  .login-logo { width: 54px; height: 54px; border-radius: 15px; }
  .login-brand { font-size: 13.5px; }
  .login-title { font-size: clamp(34px, 3.3vw, 48px); }
  .login-lead { font-size: 14.5px; line-height: 1.5; }
  .login-points { gap: 6px; }
  .login-points li { padding: 7px 12px; font-size: 13.5px; }
  .login-free { padding: 10px 14px; }
  .login-free strong { font-size: 20px; }
  .login-free small { font-size: 13px; }
  .login-hero .btn-discord { padding: 11px 22px; }
  .sc-stage { height: 470px; }
  .sc-slide img { max-height: 420px; }
  .sc-caption { min-height: 60px; }
  .sc-caption b { font-size: 26px; }
}
@media (min-width: 1021px) and (max-height: 620px) {
  /* sehr niedrige Fenster: Nebenpunkte weglassen */
  .login-points li:nth-child(2), .login-points li:nth-child(4) { display: none; }
}
@media (min-width: 1021px) and (max-height: 720px) {
  .login-hero > .small { display: none; }
  .login-title { font-size: clamp(32px, 3vw, 42px); }
  .sc-stage { height: 400px; }
  .sc-slide img { max-height: 360px; }
}

@media (max-width: 1020px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; }
  .login-hero { align-items: center; text-align: center; max-width: 560px; margin: 0 auto; }
  .login-hero .btn-discord { align-self: center; }
  .login-points li { text-align: left; }
  .sc-stage { height: 430px; }
  .sc-slide { width: min(440px, 70vw); --shift: 40%; }
  .sc-slide img { max-height: 400px; }
}
@media (max-width: 560px) {
  .login { padding: 24px 14px; }
  .login-title { font-size: 44px; }
  .sc-stage { height: 360px; }
  .sc-slide { width: 76vw; --shift: 30%; --tilt: -24deg; --depth: -180px; }
  .sc-slide img { max-height: 330px; }
  .sc-slide.is-far { opacity: 0; }
  .sc-caption b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-slide { transition: opacity .3s; }
  .sc-slide.is-active, .sc-glow { animation: none; }
}
.btn-discord:hover { background: #4752c4; }

/* ------------------------------ Layout ----------------------------- */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px;
  display: flex; flex-direction: column;
  background: rgba(10, 10, 16, .78); border-right: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 6px 18px; }
.brand strong { display: block; font-size: 22px; line-height: 1; }
.brand-text { min-width: 0; flex: 1; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { position: relative; }

/* Serverstatus: pulsierender Punkt, Details beim Drüberfahren */
.live-wrap { position: static; display: inline-flex; padding: 8px; margin: -8px 0 -8px -8px; cursor: default; outline: none; flex: none; }
.live-dot { --dot: 34, 227, 154; width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--dot)); animation: live-pulse 2s ease-out infinite; }
.live-dot.off { --dot: 255, 59, 92; animation-duration: 1.1s; }
.live-dot.unknown { --dot: 95, 97, 120; animation: none; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--dot), .6); }
  70% { box-shadow: 0 0 0 9px rgba(var(--dot), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--dot), 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-tip {
  position: absolute; left: 6px; right: 6px; top: calc(100% - 8px); z-index: 40; padding: 10px 12px;
  background: var(--solid); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.6; color: var(--text); white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.live-wrap:hover .live-tip, .live-wrap:focus .live-tip { opacity: 1; visibility: visible; transform: none; }
.brand small { color: var(--muted); font-size: 12px; }
.sheet-close { display: none; margin-left: auto; }

.family-switch { position: relative; margin: 0 0 14px; }
/* In der Seitenleiste unten über dem Profil, Menü klappt nach oben auf */
#family-switch:not(:empty) { margin-top: auto; padding-top: 12px; }
#family-switch:not(:empty) + .user { margin-top: 0; }
#family-switch .family-switch { margin: 0 0 10px; }
#family-switch .family-menu { top: auto; bottom: calc(100% + 6px); }
.family-current {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer;
  background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px;
  color: var(--text); font: inherit;
}
.family-current:hover { border-color: rgba(255, 45, 117, .5); }
.family-current .name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.family-current .lvl { font-size: 11px; color: var(--muted); display: block; font-weight: 500; }
.family-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; padding: 6px;
  background: var(--solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  max-height: 340px; overflow: auto;
}
.family-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.family-menu a:hover { background: var(--surface-2); text-decoration: none; }
.guild-icon { width: 30px; height: 30px; border-radius: 10px; flex: none; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; font-weight: 800; object-fit: cover; }
.guild-icon.round { border-radius: 50%; }
.guild-icon.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }

nav#nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; padding: 16px 12px 6px; }
nav#nav a {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 600; min-height: 44px;
}
nav#nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
nav#nav a.active { color: var(--text); background: var(--grad-soft); box-shadow: inset 3px 0 0 var(--pink); }
nav#nav a span.ico { width: 22px; text-align: center; font-size: 17px; }
nav#nav a .count { margin-left: auto; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; }

.user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.user img, .user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.user .info { flex: 1; min-width: 0; }
.user .info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user .info small { color: var(--muted); }

main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 18px 32px; background: rgba(7, 7, 11, .72); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.title-wrap { flex: 1; min-width: 0; }
.eyebrow { color: var(--pink); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h1 { margin: 0; font-size: 34px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#topbar-actions:empty, #topbar-module:empty { display: none; }
.fam-pill { display: none; }
.view { padding: 26px 32px 60px; max-width: 1480px; }

.bottom-nav { display: none; }
.sheet-backdrop { display: none; }

/* ------------------------------ Bausteine -------------------------- */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 16px; }
.cols-2 { grid-template-columns: 2fr 1fr; }
.cols-2e { grid-template-columns: 1fr 1fr; }
/* Karten nebeneinander nicht auf gleiche Höhe ziehen – sonst verteilt sich der Inhalt kurzer Karten über die ganze Höhe */
.cols-2, .cols-2e { align-items: start; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

.card {
  position: relative; min-width: 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 40%);
}
.card h2 {
  margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card h2 a, .card h2 .sub { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }

.hero {
  overflow: hidden; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(255, 45, 117, .22), rgba(255, 122, 26, .12) 60%, rgba(25, 227, 255, .08)), var(--surface);
  border: 1px solid rgba(255, 45, 117, .25);
}
.hero h2.title { margin: 0; color: var(--text); font: 400 40px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }

.kpi { overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kpi .value { font: 400 38px/1.05 var(--font-display); letter-spacing: .03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--muted); font-size: 12.5px; }
.kpi::after { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; border-radius: 2px; background: var(--kpi-color, var(--grad)); opacity: .9; }
.kpi.in { --kpi-color: var(--green); }
.kpi.out { --kpi-color: var(--red); }
/* Breite Kacheln (z. B. Kassenbuch): ganze Zeile nutzen, Betrag in einer Zeile */
.kpis.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.wide .kpi .value { white-space: nowrap; font-size: clamp(24px, 2.3vw, 38px); }
.kpi.blue { --kpi-color: var(--cyan); }
.kpi.warn { --kpi-color: var(--warn); }

.module-card { display: flex; flex-direction: column; gap: 12px; }
.module-card .head { display: flex; gap: 14px; align-items: flex-start; }
.module-card .icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--grad-soft); border: 1px solid var(--line-2); }
.module-card .title { font-weight: 800; font-size: 16px; }
.module-card .desc { color: var(--muted); font-size: 13.5px; }
.module-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.module-card.off { opacity: .72; }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 190px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: 600 14px/1.2 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .12s, border-color .15s, box-shadow .15s, background .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .28); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(255, 45, 117, .3); }
.btn-primary:hover { box-shadow: var(--glow); }
.btn-danger { color: #ff8fa3; border-color: rgba(255, 59, 92, .35); }
.btn-success { color: #7ff2c2; border-color: rgba(34, 227, 154, .35); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 34px; padding: 5px 11px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--text); font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 10px; min-width: 36px; min-height: 36px; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* Formulare */
input, select, textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .35); color: var(--text); border: 1px solid var(--line-2); font: 15px var(--font);
}
input[type="color"] { padding: 4px; width: 64px; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--pink); }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 45, 117, .22); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form { display: grid; gap: 14px; align-content: start; }
/* Überschrift und Hinweise in Formular-Karten: Abstand kommt nur vom Grid, nicht doppelt */
.form > h2, .form > h3 { margin: 0; }
.form > p, .form > .hint { margin: 0; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
/* Hinweis direkt in einer Karte (ohne .form): Abstand zum folgenden Button/Inhalt */
.card:not(.form) > .hint:not(:last-child) { margin-bottom: 10px; }

.switch { position: relative; display: inline-flex; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 500; min-height: 36px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 46px; height: 26px; flex: none; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .track { background: var(--grad); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(20px); background: #fff; }
.switch input:disabled + .track { opacity: .5; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(255, 45, 117, .35); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar label:not(.grow):not(.check):not(.switch) { min-width: 140px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 500; min-height: 44px; }

.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); padding: 8px 14px; border-radius: 99px; cursor: pointer; font: 600 13.5px var(--font); min-height: 38px; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.chip .count { opacity: .75; margin-left: 6px; }

.seg { display: inline-flex; padding: 3px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); border-radius: 12px; overflow-x: auto; max-width: 100%; }
.seg button { flex: none; background: none; border: 0; color: var(--muted); padding: 8px 14px; border-radius: 9px; font: 600 13.5px var(--font); cursor: pointer; min-height: 36px; }
.seg button.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .07); color: var(--muted); }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; flex: none; }

.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > div { height: 100%; border-radius: 99px; background: var(--grad); }
.progress.ok > div { background: var(--green); }

/* Auswahl-Listen (Kanäle, Rollen) */
.pick-list { border: 1px solid var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, .3); max-height: 280px; overflow: auto; padding: 6px; }
.pick-list .group { color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 10px 8px 4px; }
.pick-list label { flex-direction: row; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; min-height: 40px; }
.pick-list label:hover { background: var(--surface-2); }
.pick-list label.disabled { opacity: .45; }
.pick-list .note { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.picker-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.picker-head > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* Rang-Editor / Listen-Editoren */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: grid; grid-template-columns: auto 1fr 1.2fr 96px auto; gap: 8px; align-items: center; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px 10px; }
.rank-row .role-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .pos { color: var(--pink); font: 400 22px/1 var(--font-display); width: 24px; text-align: center; }
.rank-row .moves { display: flex; gap: 2px; }
.editor-item { background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.editor-item .head { display: flex; align-items: center; gap: 8px; }
.or-sep { text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.and-sep { text-align: center; font: 400 20px/1 var(--font-display); letter-spacing: .1em; color: var(--pink); margin: 6px 0; }

/* Discord-Vorschau */
.dc-preview { background: #313338; border-radius: 14px; padding: 14px; color: #dbdee1; font-size: 14px; }
.dc-msg { display: flex; gap: 12px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); flex: none; display: grid; place-items: center; font: 400 18px var(--font-display); color: #fff; }
.dc-author { font-weight: 600; color: #f2f3f5; }
.dc-author .tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; margin-left: 4px; vertical-align: 1px; }
.dc-container { margin-top: 6px; background: #2b2d31; border: 1px solid #3f4147; border-left: 4px solid var(--dc-accent, #f0a92b); border-radius: 8px; padding: 14px 16px; max-width: 520px; }
.dc-container h1 { font-size: 22px; margin: 0; color: #f2f3f5; }
.dc-container h3 { font: 700 16px var(--font); text-transform: none; letter-spacing: 0; margin: 0 0 4px; color: #f2f3f5; }
.dc-container .sub { color: #949ba4; font-size: 12.5px; }
.dc-container .head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.dc-container .thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.dc-sep { border: 0; border-top: 1px solid #3f4147; margin: 10px 0; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-list { margin: 0; padding-left: 18px; }
.dc-btn { display: inline-block; background: #4e5058; color: #fff; border-radius: 4px; padding: 5px 12px; font-size: 13px; margin: 8px 6px 0 0; }
.dc-btn.primary { background: #5865f2; }

/* ------------------------------ Tabellen --------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card .table-wrap { border: 0; background: none; margin: 0 -8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; background: rgba(0, 0, 0, .25); position: sticky; top: 0; }
.card th { background: none; }
/* Lange Tabellen: eigener Scrollbereich, Kopfzeile bleibt stehen */
.table-wrap.sticky-head { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); overflow: auto; }
.table-wrap.sticky-head th { background: #15151f; z-index: 2; box-shadow: 0 1px 0 var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
tr.clickable { cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.in, .badge.ok, .badge.paid { background: rgba(34, 227, 154, .14); color: #7ff2c2; }
.badge.out, .badge.err, .badge.open { background: rgba(255, 59, 92, .14); color: #ff8fa3; }
.badge.adjust { background: rgba(139, 92, 255, .18); color: #c3adff; }
.badge.warn { background: rgba(255, 176, 32, .15); color: var(--warn); }
.badge.off, .badge.exempt { background: rgba(144, 145, 166, .16); color: #b8b9cc; }
.badge.brand { background: var(--grad); color: #fff; }
.qty-in { color: #7ff2c2; }
.qty-out { color: #ff8fa3; }
.qty-neg { color: #ff8fa3; font-weight: 800; }
.qty-low { color: var(--warn); font-weight: 800; }
.storage-tag { color: var(--muted); font-size: 12.5px; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; min-height: 44px; }
.list-row:last-child { border-bottom: 0; }
.list-row .main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.list-row { color: inherit; }
a.list-row:hover { text-decoration: none; background: rgba(255, 255, 255, .02); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; flex-wrap: wrap; }
.bar { height: 6px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > div { height: 100%; background: var(--grad); border-radius: 99px; }

.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 227, 154, .2), 0 0 12px var(--green); }
.status-dot.connecting { background: var(--warn); }
.status-dot.offline, .status-dot.disabled { background: var(--red); }
.status-dot.idle { background: var(--warn); }
.status-dot.dnd { background: var(--red); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.log { max-height: 380px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.log-entry { background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.log-entry pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 12px; color: var(--muted); max-height: 160px; overflow: auto; }

.notice { background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .3); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; color: #ffd48a; }
.notice.info { background: rgba(25, 227, 255, .06); border-color: rgba(25, 227, 255, .3); color: #a6f3ff; }
.notice.danger { background: rgba(255, 59, 92, .08); border-color: rgba(255, 59, 92, .35); color: #ff9fb1; }
.notice-top { margin: 14px 32px 0; }

/* Mitglieder-Kacheln */
.member { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member img, .member .ph { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.member .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* ------------------------------ Dialog ----------------------------- */
dialog {
  background: var(--solid); color: var(--text); border: 1px solid var(--line-2); border-radius: 24px; padding: 0;
  width: min(580px, calc(100vw - 24px)); box-shadow: var(--shadow);
}
dialog.wide { width: min(900px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-head h3 { margin: 0; overflow-wrap: anywhere; }
.modal-content { padding: 18px 20px; max-height: 70vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--safe-b)); z-index: 100;
  max-width: min(520px, calc(100vw - 24px)); padding: 12px 18px; border-radius: 14px;
  background: var(--solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600;
}
.toast.error { border-color: var(--red); }
.loading { color: var(--muted); padding: 48px; text-align: center; }
.loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .1); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ Tablet ----------------------------- */
@media (max-width: 1150px) {
  .cols-2, .cols-3, .cols-2e { grid-template-columns: 1fr; }
}

/* ------------------------------ Mobil ------------------------------ */
@media (max-width: 900px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: 1fr; }

  /* Seitenleiste wird zum Bottom-Sheet */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; height: auto; max-height: 86dvh;
    border-right: 0; border-top: 1px solid var(--line-2); border-radius: 26px 26px 0 0;
    padding: 10px 16px calc(18px + var(--safe-b)); background: rgba(14, 14, 22, .96);
    transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  .sidebar::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 2px auto 10px; }
  .sidebar.open { transform: none; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); }
  .sheet-close { display: inline-flex; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
  .sheet-backdrop[hidden] { display: none; }

  .topbar { padding: 12px 16px; gap: 10px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .topbar h1 { font-size: 28px; }
  .topbar-right .btn { min-height: 38px; padding: 7px 12px; }
  .topbar-right .btn .lbl { display: none; }
  .fam-pill {
    display: inline-flex; flex: none; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line-2);
    width: 42px; height: 42px; border-radius: 14px; background: var(--grad-soft); cursor: pointer; overflow: hidden;
  }
  .fam-pill img { width: 100%; height: 100%; object-fit: cover; }
  .fam-pill span { font-weight: 800; color: var(--text); }

  .view { padding: 16px 14px calc(var(--nav-h) + 28px + var(--safe-b)); }
  .notice-top { margin: 12px 14px 0; }
  .card { padding: 16px; border-radius: 18px; }
  .kpis, .kpis.wide { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi .value { font-size: 30px; }
  .kpis.wide .kpi .value { font-size: clamp(20px, 6vw, 30px); }
  .hero h2.title { font-size: 32px; }
  .form .row2 { grid-template-columns: 1fr; }
  .toolbar > * { flex: 1 1 140px; }
  .hide-sm { display: none !important; }
  .rank-row { grid-template-columns: auto 1fr auto; }
  .rank-row .rank-label, .rank-row .rank-emoji { grid-column: 2 / -1; }
  .modal-content { max-height: 64dvh; }
  dialog { margin-bottom: 0; border-radius: 24px 24px 0 0; width: 100vw; max-width: 100vw; }
  .toast { bottom: calc(var(--nav-h) + 18px + var(--safe-b)); }

  /* Untere Navigation */
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 30; height: var(--nav-h);
    padding: 6px; border-radius: 22px; background: rgba(16, 16, 26, .88); border: 1px solid var(--line-2);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  }
  .bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
    border: 0; background: none; color: var(--muted); font: 700 10.5px var(--font); border-radius: 16px; cursor: pointer; text-decoration: none;
  }
  .bottom-nav .ico { font-size: 20px; line-height: 1; }
  .bottom-nav .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .bottom-nav .active { color: #fff; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(255, 45, 117, .35); }
  .bottom-nav .dot { position: relative; }
  .bottom-nav .dot::after { content: ""; position: absolute; top: -2px; right: -6px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }

  /* Tabellen → Karten */
  .table-wrap { border: 0; background: none; overflow: visible; }
  .card .table-wrap { margin: 0; }
  .table-wrap.sticky-head { max-height: none; overflow: visible; }
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody { display: block; }
  table.stackable tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-bottom: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  }
  table.stackable td { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border: 0; text-align: right; grid-column: 1 / -1; min-width: 0; }
  table.stackable td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  table.stackable td[data-label=""]::before { display: none; }
  table.stackable td:first-child { font-size: 15px; justify-content: flex-start; text-align: left; }
  table.stackable td:first-child::before { display: none; }
  table.stackable td.num { white-space: normal; }
}

@media (max-width: 380px) {
  .kpis, .kpis.wide { grid-template-columns: 1fr; }
  .bottom-nav .lbl { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
