:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-alt: #eef2ea;
  --line: #d9dfd4;
  --text: #1f2923;
  --muted: #617064;
  --accent: #1f7a68;
  --accent-dark: #14564a;
  --danger: #a23a3a;
  --desktop-sidebar-width: 292px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-authenticated nav[aria-label="Hauptnavigation"] {
  display: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.logout-form {
  display: block;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.intro,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.intro {
  align-items: start;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 46px;
  line-height: 1.04;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.grid,
.stats,
.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.auth-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.panel,
.auth-panel,
.stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(31, 41, 35, 0.06);
}

.auth-panel {
  padding: 24px;
}

.auth-panel h2 {
  margin-bottom: 18px;
}

.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface-alt);
  color: var(--text);
}

.button-secondary:hover {
  background: #e1e8dc;
}

.stats {
  margin-bottom: 18px;
}

.dashboard-space-shell {
  position: relative;
  min-height: clamp(620px, calc(100vh - 164px), 900px);
  margin: -12px -16px 0;
  padding: 32px 16px 22px;
  border: 1px solid rgba(139, 225, 255, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 80% 12%, rgba(84, 210, 224, 0.22), transparent 34%),
    radial-gradient(circle at 12% 72%, rgba(163, 118, 255, 0.18), transparent 34%),
    linear-gradient(140deg, #05121f 0%, #091727 48%, #120c22 100%);
  box-shadow: 0 28px 80px rgba(3, 11, 23, 0.34);
  overflow: hidden;
  isolation: isolate;
}

.dashboard-space-shell::before,
.dashboard-space-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dashboard-space-shell::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 78px 78px;
  -webkit-mask-image: radial-gradient(circle at 50% 32%, black 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 32%, black 0%, transparent 74%);
}

.dashboard-space-shell::after {
  background:
    radial-gradient(circle at 50% 44%, transparent 0%, transparent 48%, rgba(1, 5, 14, 0.58) 100%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.08) 0%, rgba(3, 8, 20, 0.42) 100%);
}

.particle-space-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cube-3d-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #020711;
  overflow: hidden;
  contain: layout paint size;
}

.cube-3d-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0%, transparent 45%, rgba(2, 7, 17, 0.34) 100%),
    linear-gradient(180deg, rgba(2, 7, 17, 0) 0%, rgba(2, 7, 17, 0.24) 100%);
}

.cube-3d-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.cube-3d-css-renderer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

.cube-3d-html-face {
  width: 720px !important;
  height: 720px !important;
  max-width: none;
  padding: 0 !important;
  contain: layout paint style;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  cursor: grab;
  filter:
    drop-shadow(0 22px 24px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 12px rgba(112, 255, 221, 0.08));
}

.cube-3d-html-face.is-active-cube-face {
  filter:
    drop-shadow(0 26px 30px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 14px rgba(112, 255, 221, 0.13));
}

.cube-3d-generated-face {
  color: var(--text);
}

.cube-3d-html-face:not(.is-active-cube-face),
.cube-3d-html-face:not(.is-active-cube-face) .magic-cube-tile,
.dashboard-space-shell.is-cube-rotating .cube-3d-html-face,
.dashboard-space-shell.is-cube-rotating .magic-cube-tile {
  pointer-events: none;
}

.dashboard-space-shell.is-cube-dragging,
.dashboard-space-shell.is-cube-dragging .cube-3d-html-face {
  cursor: grabbing;
}

.dashboard-space-shell.is-cube-dragging .magic-cube-tile {
  pointer-events: none;
}

.cube-3d-html-face.cube-scene-container {
  display: block;
  place-items: unset;
  perspective: none;
}

.cube-3d-html-face::before,
.cube-3d-html-face::after,
.cube-3d-html-face .cube-scene-stage::before,
.cube-3d-html-face .cube-scene-stage::after {
  display: none;
}

.cube-3d-html-face .cube-scene-stage,
.cube-3d-html-face .magic-cube-board,
.cube-3d-html-face .magic-cube-board > .magic-cube-menu {
  width: 100%;
  height: 100%;
}

.cube-3d-html-face .cube-scene-stage {
  transform: none;
}

.dashboard-space-shell .cube-3d-html-face .magic-cube-board {
  border-radius: 14px;
  overflow: hidden;
}

.cube-3d-html-face .magic-cube-board > .magic-cube-menu {
  min-height: 720px !important;
}

.cube-3d-html-face .magic-cube-face {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.cube-3d-html-face .magic-cube-face > .magic-cube-tile {
  min-height: 0 !important;
}

.dashboard-space-shell.has-css3d-face .dashboard-space-content {
  pointer-events: none;
}

.cube-3d-scene-fallback {
  background:
    radial-gradient(circle at 50% 42%, rgba(16, 74, 82, 0.18), transparent 34%),
    #020711;
}

.dashboard-space-shell.is-cube-3d-fallback .cube-3d-scene {
  pointer-events: none;
}

.dashboard-space-shell.is-cube-3d-fallback .dashboard-space-content {
  pointer-events: auto;
}

.dashboard-space-shell.is-cube-3d-fallback .cube-scene-container {
  min-height: auto;
  padding: 8px 0 32px;
  perspective: none;
}

.dashboard-space-shell.is-cube-3d-fallback .cube-scene-stage {
  width: min(100%, 980px);
  transform: none;
}

.dashboard-space-shell.is-cube-3d-fallback .cube-scene-stage::before,
.dashboard-space-shell.is-cube-3d-fallback .cube-scene-stage::after,
.dashboard-space-shell.is-cube-3d-fallback .cube-scene-container::before,
.dashboard-space-shell.is-cube-3d-fallback .cube-scene-container::after {
  display: none;
}

.dashboard-space-shell.is-cube-3d-fallback .magic-cube-board {
  padding: 16px;
  border: 1px solid rgba(178, 255, 241, 0.18);
  border-radius: 10px;
  background: rgba(4, 14, 25, 0.84);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.dashboard-space-shell.is-cube-3d-fallback .magic-cube-board::before,
.dashboard-space-shell.is-cube-3d-fallback .magic-cube-board::after {
  display: none;
}

.dashboard-space-shell.is-cube-3d-fallback .magic-cube-board > .magic-cube-menu {
  min-height: auto;
  overflow: visible;
  perspective: none;
}

.dashboard-space-content {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.dashboard-main {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.dashboard-main .dashboard-space-shell {
  min-height: calc(100vh - 72px);
  width: 100vw;
  margin: 0;
  padding: 36px clamp(18px, 4vw, 64px) 64px;
  border: 0;
  border-radius: 0;
}

body.cube-fullscreen {
  overflow: hidden;
}

body.cube-fullscreen .dashboard-space-shell {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

body.cube-fullscreen .dashboard-space-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  margin: 0;
}

.dashboard-space-shell .page-head {
  margin-bottom: 22px;
  color: #f7fbff;
}

.dashboard-space-shell .eyebrow {
  color: rgba(170, 231, 225, 0.84);
}

.dashboard-space-shell h1 {
  color: #ffffff;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.36);
}

.dashboard-space-shell .magic-cube-section {
  margin-bottom: 0;
}

.dashboard-space-shell.is-cube-booting:not(.is-cube-3d-fallback) .magic-cube-section {
  visibility: hidden;
  opacity: 0;
}

.cube-scene-container {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(520px, calc(100svh - 210px), 720px);
  padding: 8px 0 52px;
  perspective: 1050px;
  perspective-origin: 50% 48%;
  transform-style: preserve-3d;
}

.cube-scene-container::before,
.cube-scene-container::after {
  content: "";
  position: absolute;
  left: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.cube-scene-container::before {
  bottom: 22px;
  width: min(540px, 58%);
  height: 42px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.46) 0%, rgba(17, 58, 69, 0.18) 48%, transparent 76%);
  filter: blur(10px);
  opacity: 0.7;
}

.cube-scene-container::after {
  bottom: 48px;
  width: min(430px, 48%);
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(122, 255, 201, 0.34), transparent);
  opacity: 0.5;
}

.cube-scene-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition: transform 220ms ease;
}

.cube-scene-stage::before,
.cube-scene-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.cube-scene-stage::before {
  top: 8px;
  right: -7px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(126, 244, 225, 0.42), transparent);
  box-shadow: 0 0 10px rgba(126, 244, 225, 0.16);
}

.cube-scene-stage::after {
  right: 6px;
  bottom: -7px;
  left: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 244, 225, 0.38), transparent);
  box-shadow: 0 0 10px rgba(126, 244, 225, 0.12);
}

.dashboard-space-shell .magic-cube-board {
  position: relative;
  padding: 0;
  transform-style: preserve-3d;
  border: 0;
  background: transparent;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(126, 244, 225, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
}

.dashboard-space-shell .magic-cube-board::before,
.dashboard-space-shell .magic-cube-board::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  pointer-events: none;
}

.dashboard-space-shell .magic-cube-board::before {
  z-index: 0;
  border: 1px solid rgba(178, 255, 241, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(20, 118, 120, 0.1);
}

.dashboard-space-shell .magic-cube-board::after {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(122, 255, 201, 0.17), transparent 9%, transparent 91%, rgba(125, 228, 255, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 10%, transparent 90%, rgba(122, 255, 201, 0.12));
  opacity: 0.14;
  mix-blend-mode: screen;
}

.dashboard-space-shell .magic-cube-board > .magic-cube-menu {
  z-index: 1;
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile {
  border-color: rgba(166, 239, 239, 0.32);
  background:
    linear-gradient(150deg, rgba(18, 40, 55, 0.96) 0%, rgba(6, 17, 31, 0.98) 100%);
  color: #f8fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48),
    inset 10px 0 24px rgba(122, 255, 221, 0.035),
    0 10px 18px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile::before,
.dashboard-space-shell .magic-cube-face > .magic-cube-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 34%),
    radial-gradient(circle at 18% 16%, rgba(137, 255, 230, 0.14), transparent 32%);
  opacity: 0.58;
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 0 18px rgba(98, 214, 220, 0.055);
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile:hover {
  transform: translateY(-2px) translateZ(8px);
  border-color: rgba(158, 255, 238, 0.52);
  background:
    linear-gradient(150deg, rgba(22, 52, 66, 0.98) 0%, rgba(7, 22, 37, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    inset 10px 0 24px rgba(122, 255, 221, 0.05),
    0 14px 22px rgba(0, 0, 0, 0.28);
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile.is-active {
  border-color: rgba(148, 255, 234, 0.58);
  background:
    linear-gradient(150deg, rgba(24, 72, 72, 0.98) 0%, rgba(8, 29, 41, 0.98) 100%);
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile[data-enabled="false"] {
  color: rgba(222, 231, 232, 0.62);
  opacity: 0.6;
  filter: saturate(0.48);
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile[data-enabled="false"]:hover {
  border-color: rgba(158, 224, 232, 0.24);
  background:
    linear-gradient(150deg, rgba(18, 40, 55, 0.96) 0%, rgba(6, 17, 31, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48),
    inset 10px 0 24px rgba(122, 255, 221, 0.035),
    0 10px 18px rgba(0, 0, 0, 0.24);
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile-empty {
  border-color: rgba(147, 229, 255, 0.12);
  background: rgba(8, 18, 29, 0.7);
}

.dashboard-space-shell .magic-cube-icon {
  border-color: rgba(145, 255, 232, 0.34);
  background:
    linear-gradient(180deg, rgba(122, 255, 221, 0.15), rgba(65, 138, 160, 0.1));
  color: #c8fff5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(34, 117, 121, 0.1);
}

.dashboard-space-shell .magic-cube-description {
  color: rgba(229, 239, 237, 0.72);
}

.dashboard-space-shell .magic-cube-tile-content {
  position: relative;
  z-index: 1;
}

.magic-cube-section {
  margin-bottom: 22px;
}

.magic-cube-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.magic-cube-head h2 {
  margin-bottom: 0;
}

.magic-cube-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.magic-cube-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.magic-cube-action:hover {
  border-color: rgba(31, 122, 104, 0.42);
  background: var(--surface-alt);
}

.magic-cube-action:focus-visible,
.magic-cube-page-button:focus-visible,
.magic-cube-face > .magic-cube-tile:focus-visible {
  outline: 3px solid rgba(122, 255, 221, 0.52);
  outline-offset: 3px;
}

.magic-cube-board {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(31, 41, 35, 0.06);
}

.magic-cube-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.magic-cube-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.magic-cube-page-button:hover {
  border-color: rgba(31, 122, 104, 0.42);
  color: var(--text);
}

.magic-cube-page-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.magic-cube-board > .magic-cube-menu {
  --cube-depth: 520px;
  position: relative;
  min-height: 532px;
  width: 100%;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: center;
  touch-action: pan-y;
}

.magic-cube-cube {
  position: absolute;
  inset: 0;
  transform: translateZ(calc(var(--cube-depth) * -1));
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.22, 0.74, 0.24, 1);
  will-change: transform;
}

.magic-cube-face {
  position: absolute;
  inset: 0;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(168px, 1fr));
  gap: 14px;
  backface-visibility: hidden;
  transform: translateZ(var(--cube-depth));
  transform-style: preserve-3d;
}

.magic-cube-menu.is-animating .magic-cube-tile {
  pointer-events: none;
}

.magic-cube-menu-fallback {
  overflow: visible;
  perspective: none;
}

.magic-cube-menu-fallback > .magic-cube-cube {
  position: static;
  transform: none !important;
  transition: none;
}

.magic-cube-menu-fallback .magic-cube-face {
  position: static;
  transform: none !important;
  backface-visibility: visible;
}

.magic-cube-face > .magic-cube-tile {
  position: relative;
  display: flex !important;
  min-width: 0;
  min-height: 168px;
  height: 100%;
  contain: layout paint;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(31, 41, 35, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.magic-cube-face > .magic-cube-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 104, 0.42);
  background: #fbfcfa;
  box-shadow: 0 18px 42px rgba(31, 41, 35, 0.1);
  text-decoration: none;
}

.dashboard-space-shell .magic-cube-face > .magic-cube-tile:focus-visible {
  border-color: rgba(158, 255, 238, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 0 0 4px rgba(122, 255, 221, 0.16),
    0 14px 22px rgba(0, 0, 0, 0.28);
}

.magic-cube-face > .magic-cube-tile.is-active {
  border-color: rgba(31, 122, 104, 0.32);
  background: linear-gradient(135deg, #ffffff 0%, #eef7f4 100%);
}

.magic-cube-face > .magic-cube-tile[data-enabled="false"] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.64;
}

.magic-cube-face > .magic-cube-tile[data-enabled="false"]:hover {
  transform: none;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(31, 41, 35, 0.06);
}

.magic-cube-face > .magic-cube-tile-empty {
  border-style: dashed;
  background: rgba(238, 242, 234, 0.46);
  box-shadow: none;
}

.magic-cube-face > .magic-cube-tile-empty .magic-cube-icon {
  background: transparent;
  color: var(--muted);
}

.magic-cube-tile-content {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  width: 100%;
}

.magic-cube-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(31, 122, 104, 0.22);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 850;
}

.magic-cube-title {
  display: block;
  min-width: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.magic-cube-description {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .particle-space-canvas {
    opacity: 0.62;
  }

  .magic-cube-cube,
  .magic-cube-face > .magic-cube-tile {
    transition: none;
  }

  .magic-cube-menu {
    overflow: visible;
    perspective: none;
  }

  .magic-cube-cube,
  .magic-cube-face {
    position: static;
    transform: none !important;
  }
}

@supports not (transform-style: preserve-3d) {
  .magic-cube-menu {
    overflow: visible;
    perspective: none;
  }

  .magic-cube-cube,
  .magic-cube-face {
    position: static;
    transform: none !important;
  }
}

.stats article {
  padding: 22px;
}

.stats span {
  display: block;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.stats p {
  margin: 8px 0 0;
  color: var(--muted);
}

.panel {
  padding: 24px;
  overflow-x: auto;
}

.panel.narrow {
  max-width: 760px;
}

.member-form-panel {
  max-width: 1040px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin-bottom: 0;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(162, 58, 58, 0.35);
  border-radius: 7px;
  background: rgba(162, 58, 58, 0.08);
  color: var(--danger);
  font-weight: 700;
}

form {
  display: grid;
  gap: 20px;
}

.tabs {
  display: grid;
  gap: 18px;
}

.tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.tab-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.tab-panel {
  display: none;
}

#tab-stammdaten:checked ~ .tab-list label[for="tab-stammdaten"],
#tab-zusatz:checked ~ .tab-list label[for="tab-zusatz"],
#tab-sparten:checked ~ .tab-list label[for="tab-sparten"],
#tab-beitraege:checked ~ .tab-list label[for="tab-beitraege"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(31, 41, 35, 0.08);
}

#tab-stammdaten:checked ~ .tab-panel-stammdaten,
#tab-zusatz:checked ~ .tab-panel-zusatz,
#tab-sparten:checked ~ .tab-panel-sparten,
#tab-beitraege:checked ~ .tab-panel-beitraege {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 8px 11px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 122, 104, 0.18);
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 18px;
}

.settings-panel {
  margin-bottom: 18px;
}

.settings-list {
  display: grid;
  gap: 22px;
}

.settings-row {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-row-head h3 {
  margin: 0;
  font-size: 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.inline-form-wide {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(150px, 180px) auto;
}

.compact-table {
  min-width: 560px;
}

.choice-list,
.empty-state {
  display: grid;
  gap: 14px;
}

.choice-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.desktop-sidebar {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-toggle span + span {
  margin-top: 5px;
}

.mobile-menu-layer[hidden] {
  display: none;
}

.mobile-menu-layer {
  display: none;
}

.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.mobile-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-head strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.sidebar-head {
  display: grid;
  gap: 4px;
  padding: 0 10px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-head strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.sidebar-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-menu {
  display: grid;
  gap: 10px;
}

.app-menu-group {
  display: grid;
  gap: 6px;
}

.app-menu-group-title {
  margin: 0;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-menu-category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.app-menu-category-button::after {
  content: "+";
  flex: 0 0 auto;
  color: currentColor;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.app-menu-category-button:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.app-menu-category-button.is-active {
  background: rgba(31, 122, 104, 0.12);
  color: var(--accent-dark);
}

.app-menu-group.is-open .app-menu-category-button::after {
  content: "-";
}

.app-menu-list {
  display: grid;
  gap: 4px;
}

.app-menu-list[hidden] {
  display: none;
}

.app-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text);
}

.app-menu-item:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.app-menu-item.is-active {
  background: var(--accent);
  color: #ffffff;
}

.app-menu-item[data-enabled="false"] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.58;
}

.app-menu-item[data-enabled="false"]:hover {
  background: transparent;
}

.app-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}

.app-menu-item.is-active .app-menu-icon {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.app-menu-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-menu-item-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.app-menu-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.app-menu-item.is-active .app-menu-description {
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 960px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .topbar nav[aria-label="Hauptnavigation"] {
    display: none;
  }

  .authenticated-layout {
    min-height: calc(100vh - 72px);
    margin-left: 292px;
  }

  .desktop-sidebar {
    position: fixed;
    top: 72px;
    bottom: 0;
    left: 0;
    z-index: 15;
    display: flex;
    width: var(--desktop-sidebar-width);
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px 28px;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    overflow-y: auto;
  }

  .authenticated-content {
    width: min(1120px, calc(100% - 64px));
  }

  .authenticated-content.dashboard-main {
    width: 100vw;
    margin-left: calc(var(--desktop-sidebar-width) * -1);
  }

  .dashboard-main .dashboard-space-shell {
    padding-left: calc(var(--desktop-sidebar-width) + clamp(18px, 4vw, 64px));
  }
}

@media (max-width: 959px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
  }

  .mobile-menu-toggle {
    display: inline-grid;
    margin-left: auto;
  }

  .mobile-menu-layer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
  }

  .mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 41, 35, 0.45);
  }

  .mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: min(390px, 92vw);
    max-width: 100%;
    height: 100%;
    align-content: start;
    gap: 18px;
    padding: 22px 16px 28px;
    border-left: 1px solid var(--line);
    background: var(--surface);
    box-shadow: -16px 0 42px rgba(31, 41, 35, 0.18);
    overflow-y: auto;
  }

  .dashboard-main .dashboard-space-shell {
    min-height: calc(100svh - 72px);
    padding: 26px 12px 22px;
  }

  .cube-scene-container {
    min-height: clamp(500px, calc(100svh - 150px), 680px);
    padding: 6px 0 42px;
    perspective: 900px;
  }

  .cube-scene-stage {
    transform: none;
  }

  .cube-scene-stage::before {
    right: -5px;
    width: 1px;
    transform: none;
  }

  .cube-scene-stage::after {
    right: 5px;
    bottom: -5px;
    left: 5px;
    height: 1px;
    transform: none;
  }

  .magic-cube-board > .magic-cube-menu {
    min-height: 896px;
  }

  .magic-cube-face {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(168px, 1fr));
  }

  .cube-3d-html-face {
    filter:
      drop-shadow(0 18px 20px rgba(0, 0, 0, 0.32))
      drop-shadow(0 0 8px rgba(112, 255, 221, 0.08));
  }
}

@media (max-width: 720px) {
  .topbar,
  .topbar-user,
  .page-head,
  .card,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 18px;
  }

  .topbar.topbar-authenticated {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
  }

  .topbar.topbar-authenticated .brand {
    min-width: 0;
  }

  .topbar.topbar-authenticated .mobile-menu-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .topbar.topbar-authenticated .topbar-user {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    justify-content: space-between;
  }

  nav {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .button,
  nav a {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .tab-list {
    flex-direction: column;
  }

  .inline-form,
  .inline-form-wide,
  .choice-row {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-main .dashboard-space-shell {
    margin: 0;
    min-height: calc(100svh - 70px);
    padding: 24px 10px 26px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .dashboard-space-shell .page-head {
    margin-bottom: 18px;
  }

  .cube-scene-container {
    min-height: clamp(430px, calc(100svh - 170px), 620px);
    padding-bottom: 38px;
    perspective: none;
  }

  .cube-scene-stage {
    transform: none;
  }

  .cube-scene-stage::before,
  .cube-scene-stage::after {
    display: none;
  }

  .cube-scene-container::before {
    bottom: 14px;
    width: 82%;
    height: 46px;
    filter: blur(8px);
    opacity: 0.48;
  }

  .cube-3d-html-face,
  .cube-3d-html-face.is-active-cube-face {
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.34));
  }

  .magic-cube-board {
    padding: 12px;
  }

  .magic-cube-board > .magic-cube-menu {
    min-height: 1284px;
  }

  .magic-cube-face {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(9, minmax(132px, 1fr));
    gap: 12px;
  }

  .magic-cube-head {
    align-items: stretch;
    flex-direction: column;
  }

  .magic-cube-page-actions {
    justify-content: flex-start;
  }

  .magic-cube-page-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .magic-cube-face > .magic-cube-tile {
    min-height: 132px;
  }

  .dashboard-space-shell .magic-cube-face > .magic-cube-tile {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(0, 0, 0, 0.44),
      0 8px 14px rgba(0, 0, 0, 0.22);
  }

  .dashboard-space-shell .magic-cube-face > .magic-cube-tile::before {
    opacity: 0.42;
  }

  h1 {
    font-size: 34px;
  }
}
