/* ==========================================================================
   DASHBOARD V3 - "MIDNIGHT AURORA"
   Wird NACH style.css und den Inline-Styles der base.html geladen und
   ueberschreibt nur Werte/Optik - keine Vorlage muss dafuer umgebaut werden.
   Bausteine: Design-Tokens, Aurora-Hintergrund, Glas-Karten mit Maus-Spotlight,
   Feder-Animationen (CSS linear()), Scroll-/View-Transitions als Zusatz,
   Seitenleiste fuer Server-Seiten, Befehlspalette, Mobile-Dock.
   Alles Bewegte respektiert "Bewegung reduzieren" (siehe ganz unten).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --bg: #0A0B12;
  --bg-grid: transparent;
  --card: #12141F;
  --card-hover: #171A2A;
  --border: rgba(255, 255, 255, .08);
  --border-hover: rgba(255, 255, 255, .17);
  --text: #EEF0F8;
  --muted: #9BA3BA;

  --accent: #8B7CFF;
  --accent-purple: #5B8CFF;
  --accent2: #5BE3A1;
  --cyan: #4FD1E5;
  --success: #2FB57A;
  --danger: #FF5C7A;
  --warning: #FFC857;
  --info: #6C8CFF;
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
  --glow-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 75%, transparent);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Feder-Kurve (aus CSS linear()) - fuer Schalter, Pop-ups, Dock */
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1 100%);

  --glass: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .022));
  --glass-bg: rgba(18, 20, 33, .62);
  --glass-strong: rgba(22, 24, 40, .9);
  --input-bg: rgba(8, 9, 16, .62);
  --input-bg-focus: rgba(12, 13, 24, .9);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-md: 0 18px 44px -26px rgba(0, 0, 0, .85);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
  --scrim: rgba(5, 6, 12, .62);

  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

body.theme-light {
  --bg: #F3F4FA;
  --card: #FFFFFF;
  --card-hover: #F6F7FD;
  --border: rgba(20, 23, 42, .1);
  --border-hover: rgba(20, 23, 42, .2);
  --text: #14172A;
  --muted: #5B6280;
  --accent: #6D5CF0;
  --accent-purple: #3F6FF5;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .72));
  --glass-bg: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .94);
  --input-bg: #FFFFFF;
  --input-bg-focus: #FFFFFF;
  --hi: inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow-md: 0 18px 40px -24px rgba(40, 44, 90, .35);
  --shadow-lg: 0 30px 70px -26px rgba(40, 44, 90, .4);
  --scrim: rgba(30, 34, 70, .35);
  color-scheme: light;
}

/* ---------- 2. Grundflaeche + Aurora ---------- */
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image: none;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; }

.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .34; will-change: transform;
  animation: aurora-drift 28s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 600px; height: 600px; left: -160px; top: -200px; background: #6C4BFF; }
.aurora i:nth-child(2) { width: 540px; height: 540px; right: -140px; top: 18vh; background: #12A9C9; animation-delay: -9s; }
.aurora i:nth-child(3) { width: 480px; height: 480px; left: 36%; bottom: -260px; background: #C2449B; opacity: .2; animation-delay: -17s; }
@keyframes aurora-drift { to { transform: translate3d(110px, 70px, 0) scale(1.18); } }
body.theme-light .aurora i { opacity: .2; }
body.theme-light .aurora i:nth-child(3) { opacity: .12; }

.wrap { position: relative; z-index: 1; max-width: 1480px !important; }
body.has-shell .wrap { max-width: 1680px !important; }

h1, h2 { font-family: var(--font-display); letter-spacing: -.02em; }
h1 { font-weight: 700; }
a { transition: color .2s; }

/* ---------- 3. Karten (Glas + Spotlight) ---------- */
.card {
  background: var(--glass), var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--hi), var(--shadow-md);
  transition: transform .55s var(--ease), border-color .3s, background-color .3s, box-shadow .4s;
  animation: cardIn .7s var(--ease) backwards;
}
.card::before {
  content: ''; position: absolute; inset: 0; top: 0; left: 0; right: 0; height: auto; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 17%, transparent), transparent 62%);
  opacity: 0; transition: opacity .45s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 42%, var(--border-hover)); background: var(--glass), var(--glass-bg); }
.card:hover::before { opacity: 1; }
.card:has(form):hover, .card:has(table):hover, .card:has(textarea):hover, .card[data-flat]:hover { transform: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@supports (animation-delay: calc(sibling-index() * 1ms)) {
  .grid .card, .module-grid .card, .stat-grid .card, .shell-main > .card { animation-delay: calc(min(sibling-index(), 12) * 55ms); }
}
.card h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; font-size: .78rem; }
.card .value { font-family: var(--font-mono); font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Scroll-getriebenes Einblenden (nur wo unterstuetzt) */
@supports (animation-timeline: view()) {
  .shell-main > .card, .shell-main > section, .wrap > .card {
    animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 28%;
  }
  @keyframes reveal { from { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(5px); } }
}

/* Animierte Randlinie (Premium-/Hero-Karten): class="rim" */
.rim { position: relative; }
.rim::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 58%, var(--accent), var(--cyan), transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rim-spin 7s linear infinite;
}
@keyframes rim-spin { to { --ang: 360deg; } }

/* ---------- 4. Buttons ---------- */
.btn {
  border-radius: var(--radius-sm); border: 1px solid transparent; color: #0B0C14; font-weight: 600; letter-spacing: .005em;
  background: var(--accent-gradient); box-shadow: var(--glow-shadow);
  transition: transform .45s var(--spring), box-shadow .3s, background .25s, border-color .25s, filter .25s;
}
.btn:hover { transform: translateY(-2px); color: #0B0C14 !important; filter: brightness(1.08) saturate(1.05); box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--accent) 85%, transparent); border-color: rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .1s; }
.btn.secondary { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--border); box-shadow: none; filter: none; }
.btn.secondary:hover { background: rgba(255, 255, 255, .11); border-color: var(--border-hover); color: var(--text) !important; box-shadow: none; filter: none; }
.btn.green { background: linear-gradient(135deg, #5BE3A1, #2FB57A); color: #06210F; border-color: transparent; box-shadow: 0 10px 28px -14px rgba(91, 227, 161, .8); }
.btn.green:hover { color: #06210F !important; }
.btn.danger { background: rgba(255, 92, 122, .12); border-color: rgba(255, 92, 122, .35); color: #FF8DA3; box-shadow: none; filter: none; }
.btn.danger:hover { background: rgba(255, 92, 122, .24); color: #fff !important; box-shadow: 0 12px 28px -14px rgba(255, 92, 122, .8); }
body.theme-light .btn.secondary { background: rgba(20, 23, 42, .05); }
body.theme-light .btn.secondary:hover { background: rgba(20, 23, 42, .09); }

/* ---------- 5. Formulare ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  background: var(--input-bg); border-radius: var(--radius-sm); border-color: var(--border);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus, select:focus, textarea:focus {
  background: var(--input-bg-focus); border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
body.theme-light input, body.theme-light select, body.theme-light textarea { background: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.toggle { background: var(--glass), var(--glass-bg); border-radius: var(--radius-sm); transition: border-color .25s, background-color .25s, transform .4s var(--spring); }
.toggle:hover { transform: translateY(-1px); }
.toggle input[type="checkbox"] { width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.toggle input[type="checkbox"]::before { top: 3px; left: 3px; width: 18px; height: 18px; transition: transform .55s var(--spring); }
.toggle input[type="checkbox"]:checked { background: var(--accent-gradient); }
.toggle input[type="checkbox"]:checked::before { transform: translateX(18px); }

/* ---------- 6. Tabellen, Badges ---------- */
table { border-collapse: separate; border-spacing: 0; }
th { font-family: var(--font-display); font-size: .72rem; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.badge { border-radius: 99px; padding: .28rem .75rem; }
.badge.ok { background: rgba(91, 227, 161, .14); color: var(--accent2); border-color: rgba(91, 227, 161, .3); }

::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border: 2px solid transparent; background-clip: padding-box; }

/* ---------- 7. Obere Leiste ---------- */
.elite-header {
  background: var(--glass), var(--glass-bg); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-color: var(--border); box-shadow: var(--hi), 0 18px 44px -22px rgba(0, 0, 0, .75);
  view-transition-name: gl-header;
}
.logo-text { background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--accent) 70%, var(--text))); -webkit-background-clip: text; background-clip: text; font-family: var(--font-display); }
.nav-link { transition: color .2s, background .3s, transform .4s var(--spring); }
.nav-link:hover { transform: translateY(-1px); }
.nav-link.active { color: #0B0C14; background: var(--accent-gradient); box-shadow: var(--glow-shadow); }
.nav-more-menu, .notif-panel, .quicknav-panel {
  background: var(--glass-strong); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 18px; box-shadow: var(--shadow-lg);
}
.nav-more-menu.open { animation: pop .45s var(--spring) both; transform-origin: top left; }
.notif-panel:not([hidden]), .quicknav-panel:not([hidden]) { animation: pop .45s var(--spring) both; transform-origin: top right; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
.nav-icon-btn { transition: transform .4s var(--spring), background .2s, color .2s; }
.nav-icon-btn:hover { transform: translateY(-2px) scale(1.06); }

/* ---------- 8. Seitenleiste (Server-Seiten) ---------- */
.shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 1.4rem; }
.shell-main { min-width: 0; }
.quicknav-bar { display: none !important; }
.side {
  position: sticky; top: 6.2rem; max-height: calc(100vh - 7.4rem); overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--glass), var(--glass-bg); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--hi), var(--shadow-md); view-transition-name: gl-side; scrollbar-width: thin;
}
.side-back { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600; transition: background .2s, color .2s, transform .4s var(--spring); }
.side-back:hover { background: rgba(255, 255, 255, .06); color: var(--text); transform: translateX(-2px); }
.side-search { position: relative; display: block; margin: 8px 0 6px; }
.side-search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.side-search input { width: 100%; padding: .65rem .9rem .65rem 2.2rem !important; border-radius: 12px !important; font-size: .85rem !important; }
.side-h { margin: 14px 10px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7E86A0; }
.side-toggle { display: flex; align-items: center; gap: 6px; width: calc(100% - 20px); background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; border-radius: 8px; padding: 5px 0; margin-top: 12px; }
.side-toggle:hover { color: var(--text); }
.side-toggle > span:first-child { flex: 1; }
.side-n { font-size: .62rem; font-weight: 700; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 1px 7px; letter-spacing: 0; }
.side-chev { transition: transform .2s; }
.side-g.collapsed .side-chev { transform: rotate(-90deg); }
.side-g.collapsed:not(.searching) .side-i { display: none; }
.side-i {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; border-radius: 11px;
  color: var(--muted); text-decoration: none; font-size: .87rem; font-weight: 500; transition: background .2s, color .2s, transform .4s var(--spring);
}
.side-i:hover { background: rgba(255, 255, 255, .06); color: var(--text); transform: translateX(3px); }
.side-i.on { color: var(--text); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent) 3%, transparent)); }
.side-i.on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.side-ic { width: 22px; text-align: center; font-size: 1rem; flex: none; }
.side-i em { margin-left: auto; font-style: normal; font-size: .6rem; font-weight: 800; color: #1a1400; background: linear-gradient(135deg, #FFD700, #F7931A); padding: 1px 6px; border-radius: 5px; }
.is-hidden { display: none !important; }
.dock, .side-scrim { display: none; }

@media (max-width: 980px) {
  .shell { display: block; }
  .side {
    position: fixed; z-index: 2600; left: 12px; top: 12px; bottom: 92px; width: min(88vw, 330px); max-height: none;
    transform: translateX(-120%); transition: transform .6s var(--spring); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); background: var(--glass-strong);
  }
  body.side-open .side { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 2500; background: var(--scrim); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .35s; }
  body.side-open .side-scrim { opacity: 1; pointer-events: auto; }
  body.has-shell { padding-bottom: 96px; }
  .dock {
    display: flex; position: fixed; z-index: 2700; left: 12px; right: 12px; bottom: 12px; gap: 4px; padding: 6px; border-radius: 24px;
    background: var(--glass-strong); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .dock a, .dock button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border: 0; border-radius: 18px;
    background: transparent; color: var(--muted); font: inherit; font-size: .68rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .3s, color .2s, transform .45s var(--spring);
  }
  .dock a:active, .dock button:active { transform: scale(.93); }
  .dock .on, body.side-open .dock #dock-modules { color: var(--text); background: color-mix(in srgb, var(--accent) 24%, transparent); }
  .dock span.ic { font-size: 1.2rem; line-height: 1; }
}

/* ---------- 9. Befehlspalette (Strg + K) ---------- */
#cmdk-overlay { background: var(--scrim); backdrop-filter: blur(8px) saturate(1.1); -webkit-backdrop-filter: blur(8px) saturate(1.1); padding-top: 11vh; }
#cmdk-box {
  max-width: 660px; border-radius: 26px; background: var(--glass-strong); backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--border-hover); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: cmdk-pop .6s var(--spring) both;
}
@keyframes cmdk-pop { from { opacity: 0; transform: translateY(-16px) scale(.95); filter: blur(8px); } }
.cmdk-top { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.cmdk-top svg { color: var(--muted); flex: none; }
#cmdk-input, #cmdk-input:hover, #cmdk-input:focus { border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0; padding: 1.15rem 0; font-size: 1.05rem; flex: 1; width: auto; }
.cmdk-kbd, #cmdk-hint kbd { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); border: 1px solid var(--border-hover); border-radius: 6px; padding: 2px 6px; background: rgba(255, 255, 255, .04); }
#cmdk-results { padding: 6px 10px 10px; max-height: 52vh; }
.cmdk-g { margin: 12px 12px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7E86A0; }
.cmdk-item { gap: 12px; padding: .6rem .75rem; border-radius: 13px; border: 1px solid transparent; color: var(--text); transition: background .15s, transform .35s var(--spring); }
.cmdk-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: center; flex: none; font-size: .95rem; }
.cmdk-item.active, .cmdk-item:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent) 5%, transparent)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); }
.cmdk-item.active { transform: translateX(3px); }
.cmdk-item mark { background: transparent; color: var(--cyan); font-weight: 700; }
#cmdk-hint { padding: .7rem 1.2rem; }
#cmdk-empty { padding: 2.4rem 1rem; }

/* ---------- 10. Kleinkram ---------- */
.hint-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); animation: live-pulse 2s ease-out infinite; display: inline-block; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(91, 227, 161, .6); } 100% { box-shadow: 0 0 0 10px rgba(91, 227, 161, 0); } }
#mira-toggle-btn { transition: transform .5s var(--spring); }
footer { background: transparent !important; border-top-color: var(--border) !important; }

/* Server-Uebersicht: Willkommens-Karte + Modul-Filter */
.hello { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; padding: 1.8rem 2rem !important; margin-bottom: 1.4rem; }
.hello > div:first-child { flex: 1 1 380px; min-width: 0; }
.hello > div:last-child { flex: 0 1 560px; justify-content: flex-end; }
.hello h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; }
.hello h1 span { color: var(--muted); font-weight: 600; }
.hello p { margin: .5rem 0 0; }
.mod-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 1.2rem 0 0; }
.mod-tools input[type="search"] { min-width: 260px; flex: 1 1 260px; max-width: 420px; }
.chips { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); flex-wrap: wrap; }
.chips button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 13px; border-radius: 10px; cursor: pointer; transition: background .25s, color .2s, transform .4s var(--spring); }
.chips button:hover { color: var(--text); }
.chips button.on { color: var(--text); background: color-mix(in srgb, var(--accent) 28%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent) inset; }
.module-grid .card { padding: 1.35rem; }
.module-grid .card .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.module-grid .card .dot.on { background: var(--accent2); box-shadow: 0 0 12px var(--accent2); }
.module-grid .card .dot.off { background: #55596b; }
.module-grid .card.is-filtered { display: none !important; }

/* ---------- 11. Seitenwechsel (View Transitions, wo verfuegbar) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } }
html.vt .page-transition { animation: none; opacity: 1; transform: none; }
html.vt .page-transition-out { opacity: 1 !important; transform: none !important; }
::view-transition-group(gl-header), ::view-transition-group(gl-side) { animation-duration: .25s; }

/* ---------- 12. Leichtere Variante auf kleinen/schwachen Geraeten ---------- */
@media (max-width: 760px) {
  .aurora i { filter: blur(70px); }
  .card, .elite-header, .side { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .card:hover { transform: none; }
  .hello { padding: 1.4rem !important; }
  .hello > div:last-child { justify-content: flex-start; flex-basis: 100%; }
}

/* ---------- 13. Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora i, .rim::after, .live-dot { animation: none !important; }
  .card, .side, .dock { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  html { scroll-behavior: auto; }
}
