/* Farben aus dem Bunny-Maskottchen: Türkis, Creme, Rosa, Tinte */
:root {
  --bg: #f4f1ea;
  --bg-glow: rgb(91 176 180 / 22%);
  --surface: rgb(255 255 255 / 82%);
  --surface-solid: #ffffff;
  --surface-2: #eef3f2;
  --border: rgb(43 36 48 / 9%);
  --border-strong: rgb(43 36 48 / 16%);
  --text: #231e28;
  --muted: #6b6672;
  --accent: #23797d;
  --accent-strong: #1b6265;
  --accent-soft: #dcefef;
  --accent-text: #ffffff;
  --blush: #f29c9c;
  --blush-soft: #fde8e6;
  --cream: #f6eedd;
  --ok: #1f8a5b;
  --ok-soft: #dcf3e7;
  --warn-bg: #fff3d6;
  --warn-text: #7a5300;
  --danger: #c23b3b;
  --hero-from: #5bb0b4;
  --hero-to: #3a8f94;
  --shadow-sm: 0 1px 2px rgb(35 30 40 / 5%);
  --shadow: 0 1px 2px rgb(35 30 40 / 4%), 0 8px 24px -8px rgb(35 30 40 / 12%);
  --shadow-lg: 0 24px 60px -20px rgb(35 30 40 / 30%);
  --radius: 18px;
  --radius-sm: 11px;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1416;
    --bg-glow: rgb(91 176 180 / 14%);
    --surface: rgb(24 33 36 / 78%);
    --surface-solid: #172023;
    --surface-2: #1f2b2e;
    --border: rgb(255 255 255 / 7%);
    --border-strong: rgb(255 255 255 / 13%);
    --text: #ecf1f0;
    --muted: #93a19f;
    --accent: #6cc7c9;
    --accent-strong: #8fd8d9;
    --accent-soft: rgb(108 199 201 / 14%);
    --accent-text: #0b2a2c;
    --blush: #f4a9a9;
    --blush-soft: rgb(242 156 156 / 14%);
    --ok: #5fd39e;
    --ok-soft: rgb(95 211 158 / 13%);
    --warn-bg: rgb(243 196 90 / 12%);
    --warn-text: #f3d38a;
    --danger: #f27272;
    --hero-from: #2f7f84;
    --hero-to: #1b4f53;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgb(255 255 255 / 3%) inset, 0 8px 24px -10px rgb(0 0 0 / 50%);
    --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at -10% -10%, var(--bg-glow), transparent 60%),
    radial-gradient(700px 500px at 110% 0%, rgb(242 156 156 / 10%), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-feature-settings: 'cv11', 'ss01';
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

code {
  font-family: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

img {
  display: block;
}

/* ---------- Layout ---------- */

.shell {
  --sidebar-width: 252px;
  min-height: 100vh;
  /* Platz links für die feste Seitenleiste */
  padding: 12px 12px 12px calc(var(--sidebar-width) + 20px);
}

.sidebar {
  /* Fest am Bildschirmrand: scrollt nie mit, ist immer ganz zu sehen */
  position: fixed;
  top: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  width: var(--sidebar-width);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px 12px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 4px 12px -4px rgb(35 79 83 / 45%);
}

.brand-name {
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.nav-section {
  padding: 8px 12px 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
}

.user img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.user svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.user .btn {
  flex: none;
}

.user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
}

main {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 20px clamp(16px, 2.5vw, 40px) 72px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2 {
  margin: 36px 0 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .shell {
    padding: 8px;
  }

  .sidebar {
    position: sticky;
    top: 8px;
    bottom: auto;
    left: auto;
    z-index: 5;
    width: auto;
    overflow: visible;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 8px;
    border-radius: 18px;
  }

  .brand {
    padding: 0 6px 0 0;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand-text,
  .nav-section,
  .nav-link span,
  .user-name {
    display: none;
  }

  .nav-link {
    padding: 9px;
  }

  .user {
    margin: 0 0 0 auto;
    padding: 4px;
    gap: 4px;
    background: transparent;
  }

  .user img {
    width: 30px;
    height: 30px;
  }

  main {
    padding: 24px 8px 64px;
  }
}

/* ---------- Components ---------- */

.card {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
  box-shadow: 0 6px 16px -6px rgb(35 121 125 / 60%);
}

.btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.08);
}

.btn-ghost {
  padding: 7px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-solid);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

:is(.btn, .nav-link, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 14.5px;
}

.banner svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- Overview ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 200px;
  padding: 28px clamp(20px, 4vw, 36px);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -80px -140px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgb(255 255 255 / 9%);
}

.hero-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.hero-greeting {
  margin: 0 0 14px;
  color: rgb(255 255 255 / 82%);
  font-weight: 500;
}

.hero-bot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-bot img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 55%);
}

.hero-tag {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero .pill {
  margin-top: 4px;
  background: rgb(255 255 255 / 18%);
  color: #fff;
}

.hero .pill.ok::before {
  background: #7ef0b8;
  box-shadow: 0 0 0 3px rgb(126 240 184 / 25%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero .btn {
  background: #fff;
  border-color: transparent;
  color: #1b4f53;
}

.hero .btn:hover {
  background: var(--cream);
}

.hero .btn-glass {
  background: rgb(255 255 255 / 14%);
  border-color: rgb(255 255 255 / 22%);
  color: #fff;
}

.hero .btn-glass:hover {
  background: rgb(255 255 255 / 22%);
}

.hero-mascot {
  position: relative;
  z-index: 1;
  width: 170px;
  height: 170px;
  margin: -12px -8px -40px 0;
  flex: none;
  object-fit: cover;
  border-radius: 28px;
  transform: rotate(4deg);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / 45%);
}

@media (max-width: 620px) {
  .hero-mascot {
    display: none;
  }
}

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

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat:nth-child(even) .stat-icon {
  background: var(--blush-soft);
  color: #c4615f;
}

@media (prefers-color-scheme: dark) {
  .stat:nth-child(even) .stat-icon {
    color: var(--blush);
  }
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stat-value {
  white-space: nowrap;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

/* ---------- Commands ---------- */

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-wrap .input {
  padding-left: 40px;
}

.cmd-list {
  display: grid;
  gap: 12px;
}

.cmd {
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cmd:hover {
  border-color: var(--border-strong);
}

.cmd-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.cmd-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 17px/1 ui-monospace, Menlo, monospace;
}

.cmd-main {
  flex: 1;
  min-width: 0;
}

.cmd-name {
  font-weight: 650;
  font-size: 15px;
}

.cmd-desc {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.cmd.disabled .cmd-icon {
  background: var(--surface-2);
  color: var(--muted);
}

.cmd.disabled .cmd-main {
  opacity: 0.55;
}

.cmd details {
  border-top: 1px solid var(--border);
}

.cmd summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.cmd summary::-webkit-details-marker {
  display: none;
}

.cmd summary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}

.cmd details[open] summary svg {
  transform: rotate(90deg);
}

.cmd summary:hover {
  color: var(--text);
}

.cmd .form {
  padding: 6px 18px 18px;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Forms ---------- */

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

.form.card {
  max-width: 640px;
  padding: 26px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  font-weight: 600;
  font-size: 14px;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.field.inline {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:hover {
  border-color: var(--muted);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

select.input {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

textarea.input {
  min-height: 96px;
  resize: vertical;
}

.color-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-row input[type='color'] {
  width: 46px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  cursor: pointer;
}

.color-row input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.color-row input[type='color']::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.color-row .input {
  max-width: 150px;
  font-family: ui-monospace, Menlo, monospace;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background 0.2s;
  pointer-events: none;
}

.switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.6, 1);
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Toasts ---------- */

#toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #231e28;
  color: #f4f1ea;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  animation: toast-in 0.25s cubic-bezier(0.3, 1.3, 0.6, 1);
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #6cc7c9;
}

.toast.error {
  background: var(--danger);
  color: #fff;
}

.toast.error::before {
  background: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

/* ---------- Loading ---------- */

.loading {
  display: grid;
  gap: 14px;
}

.skeleton {
  height: 84px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton.tall {
  height: 200px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.view-enter {
  animation: view-in 0.25s ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

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

/* ---------- Dropdown ---------- */

.dropdown {
  position: relative;
  min-width: 0;
}

.dropdown-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dropdown-button:hover {
  border-color: var(--muted);
}

.dropdown-button:focus-visible,
.dropdown.open .dropdown-button {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}

.dropdown-button > svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}

.dropdown-button > svg:last-child {
  margin-left: auto;
  transition: transform 0.2s;
}

.dropdown.open .dropdown-button > svg:last-child {
  transform: rotate(180deg);
}

.dropdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dropdown-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: 100%;
  max-height: 280px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  list-style: none;
  /* Geschlossen gar nicht im Layout – sonst entstehen Scrollbars (z. B. in der Seitenleiste) */
  display: none;
  transform-origin: top;
}

.dropdown.up .dropdown-menu {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom;
}

.dropdown.end .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown.open .dropdown-menu {
  display: grid;
  animation: dropdown-in 0.14s ease-out;
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.dropdown-menu:focus {
  outline: none;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 14.5px;
  white-space: nowrap;
  cursor: pointer;
}

.dropdown-option.active {
  background: var(--surface-2);
}

.dropdown-option[aria-selected='true'] {
  color: var(--accent);
  font-weight: 650;
}

.dropdown-option-label {
  flex: 1;
}

.dropdown-option > svg {
  width: 16px;
  height: 16px;
  flex: none;
  visibility: hidden;
}

.dropdown-option[aria-selected='true'] > svg {
  visibility: visible;
}

/* Sprachauswahl in der Seitenleiste und auf der Login-Seite */
.dropdown.lang .dropdown-button {
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 550;
}

.dropdown.lang .dropdown-button:hover {
  color: var(--text);
}

.dropdown.lang .dropdown-menu {
  min-width: max(100%, 160px);
}

.sidebar .lang {
  margin-top: auto;
}

.sidebar .lang + .user {
  margin-top: 8px;
}



@media (max-width: 820px) {
  .sidebar .lang {
    margin: 0 0 0 auto;
  }

  .sidebar .lang + .user {
    margin: 0;
  }

  /* Auf dem Handy nur Globus + Sprachkürzel */
  .sidebar .lang .dropdown-button {
    padding: 7px 9px;
    gap: 6px;
  }

  .sidebar .lang .dropdown-label-text,
  .sidebar .lang .dropdown-button > svg:last-child {
    display: none;
  }
}

/* ---------- Owner ---------- */

.user-info {
  flex: 1;
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: 2px;
  padding: 1px 8px 1px 6px;
  border-radius: 99px;
  background: linear-gradient(135deg, #ffe6a8, #f6c96b);
  color: #6b4a00;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user .owner-badge svg {
  width: 12px;
  height: 12px;
}

.hero-greeting.owner {
  color: #fff;
  font-size: 17px;
  font-weight: 650;
}

@media (max-width: 820px) {
  .user-info {
    display: none;
  }
}

/* ---------- Dashboard-Raster ---------- */

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

.span-12 {
  grid-column: 1 / -1;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

@media (max-width: 1280px) {
  .span-4,
  .span-5,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }

  .span-3 {
    grid-column: span 6;
  }
}

@media (max-width: 560px) {
  .dash {
    gap: 12px;
  }

  .dash .stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }
}

.dash .hero {
  min-height: 230px;
}

.dash .stat {
  padding: 20px;
}

/* ---------- Panels ---------- */

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 22px;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 15.5px;
}

.panel-count {
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.panel-empty {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 120px;
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.rows {
  display: grid;
  margin: 0 -10px;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
}

.row:hover {
  background: var(--surface-2);
}

.row.more {
  color: var(--muted);
  font-size: 13.5px;
}

.row.more:hover {
  background: none;
}

.row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  font-size: 13.5px;
  text-overflow: ellipsis;
}

.row-meta {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.guild-icon,
.row-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  object-fit: cover;
}

.row-avatar {
  border-radius: 50%;
}

.cmd-chip {
  flex: none;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

/* Bot-Status */
.presence-body {
  flex: 1;
}

.presence-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 4px rgb(35 165 90 / 18%);
}

.status-dot.idle {
  background: #f0b232;
  box-shadow: 0 0 0 4px rgb(240 178 50 / 18%);
}

.status-dot.dnd {
  background: #f23f43;
  box-shadow: 0 0 0 4px rgb(242 63 67 / 18%);
}

.status-dot.invisible {
  background: #80848e;
  box-shadow: 0 0 0 4px rgb(128 132 142 / 18%);
}

.presence-activity {
  margin: 6px 0 18px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Kennzahlen-Liste */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.facts div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}

.facts dt {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Schnellschalter */
.quick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-solid);
  font-weight: 650;
}

/* ---------- Server-Auswahl ---------- */

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.server {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.server:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.server-banner {
  position: relative;
  height: 84px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
}

.server-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.3);
  opacity: 0.75;
  transform: scale(1.4);
}

.server.missing .server-banner {
  filter: grayscale(0.7);
  opacity: 0.6;
}

.server-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 18px 18px;
  text-align: center;
}

.server-icon {
  margin: -34px 0 8px;
  padding: 4px;
  border-radius: 22px;
  background: var(--surface-solid);
}

.server-icon .guild-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 18px;
}

.server-icon.large {
  margin: 0;
}

.server-icon.large .guild-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  font-size: 22px;
}

.server-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-state {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}

.server-state.on {
  color: var(--ok);
}

.server-body .btn {
  width: 100%;
  margin-top: auto;
}

.server-empty {
  grid-column: 1 / -1;
}

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

/* ---------- Server-Seite ---------- */

.guild-head {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.guild-head-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  opacity: 0.35;
}

.guild-head-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px) saturate(1.4);
  transform: scale(1.5);
}

.guild-head-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px clamp(18px, 3vw, 32px);
}

.guild-head-text {
  flex: 1;
  min-width: 200px;
}

.guild-head-text h1 {
  overflow-wrap: anywhere;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.guild-activity {
  align-self: start;
}

.cmd-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pill.locked {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.pill.locked svg {
  width: 13px;
  height: 13px;
}

.pill.custom {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 620px) {
  .cmd-head {
    flex-wrap: wrap;
  }

  .cmd-badges {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding-left: 54px;
  }
}

/* ---------- Module ---------- */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.side-column .section-head {
  margin-bottom: -2px;
}

.module .form {
  gap: 16px;
}

.module-desc {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.field.inline > div:first-child {
  display: grid;
  gap: 2px;
}

.side-column > .panel {
  align-self: stretch;
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.page-head + .tabs,
.banner + .tabs,
div:empty + .tabs {
  margin-bottom: 16px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 14px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.tab[aria-current='page'] {
  background: var(--accent);
  color: var(--accent-text);
}

.tab svg {
  width: 17px;
  height: 17px;
}

.tab-count {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.tab[aria-current='page'] .tab-count {
  background: rgb(255 255 255 / 25%);
  color: inherit;
}

/* ---------- Kategorie-Karten ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.category-card > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.category-text {
  flex: 1;
  min-width: 0;
}

.category-name {
  font-weight: 700;
  font-size: 16px;
}

.category-meta {
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Formular-Gruppen ---------- */

.form-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.field[hidden] {
  display: none;
}

.color-clear svg {
  width: 16px;
  height: 16px;
}

/* ---------- Umgebung & Bot-Wechsler ---------- */

.env-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.env-badge.live {
  background: var(--ok-soft);
  color: var(--ok);
}

.env-badge.test {
  background: rgb(240 178 50 / 18%);
  color: #c98a0b;
}

@media (prefers-color-scheme: dark) {
  .env-badge.test {
    color: #f0b232;
  }
}

/* Test-Umgebung: orangefarbene Linie oben an der Seitenleiste, damit man es nie verwechselt */
body[data-env='test'] .sidebar {
  border-top: 3px solid #f0b232;
}

.brand-wrap {
  position: relative;
  margin-bottom: 16px;
}

.brand-switch {
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-switch:hover,
.brand-wrap.open .brand-switch {
  border-color: var(--border);
  background: var(--surface-2);
}

.brand-switch > svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
}

.brand-text {
  display: grid;
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
}

.brand-wrap.open .switch-menu {
  display: grid;
  animation: dropdown-in 0.14s ease-out;
}

.switch-title {
  padding: 6px 8px 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

a.switch-item:hover {
  background: var(--surface-2);
}

.switch-item.current {
  background: var(--accent-soft);
}

.switch-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.switch-name {
  display: grid;
  flex: 1;
  min-width: 0;
  font-weight: 650;
  font-size: 14px;
}

.switch-name small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.switch-name small.online {
  color: var(--ok);
}

.switch-loading {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .brand-wrap {
    margin: 0 4px 0 0;
  }

  .brand-switch {
    padding: 2px;
  }

  .brand-switch > svg {
    display: none;
  }

  .switch-menu {
    right: auto;
    width: 260px;
  }
}

.switch-item.offline {
  cursor: default;
}

.switch-item.offline img {
  filter: grayscale(1);
  opacity: 0.55;
}

.switch-item.offline .switch-name {
  color: var(--muted);
}

.switch-item.offline small code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 11.5px;
}

/* ---------- Bots starten/stoppen ---------- */

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.bot-card-ctl {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.bot-card-ctl.down,
.bot-card-ctl.offline {
  border-style: dashed;
}

.bot-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bot-head img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.bot-card-ctl.down .bot-head img,
.bot-card-ctl.offline .bot-head img {
  filter: grayscale(1);
  opacity: 0.6;
}

.bot-title {
  display: grid;
  flex: 1;
  min-width: 0;
}

.bot-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
}

.bot-here {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.bot-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.bot-state::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.bot-state.online {
  background: var(--ok-soft);
  color: var(--ok);
}

.bot-state.starting,
.bot-state.stopping {
  background: var(--warn-bg);
  color: var(--warn-text);
}

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

.bot-note.error {
  color: var(--danger);
}

.bot-note code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
}

.bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bot-actions:empty {
  display: none;
}

.btn-danger {
  border-color: transparent;
  background: rgb(242 63 67 / 14%);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgb(242 63 67 / 22%);
}

.btn-danger.armed {
  background: var(--danger);
  color: #fff;
}

/* Offenes Dropdown liegt immer über den Karten darunter */
.card:has(.dropdown.open) {
  position: relative;
  z-index: 30;
}

/* Handy: obere Leiste schlank halten */
@media (max-width: 820px) {
  .sidebar .brand-text {
    display: none;
  }
}

.pill.nsfw {
  background: rgb(242 63 67 / 14%);
  color: var(--danger);
  font-weight: 750;
}

/* =====================================================================
   Login-Seite: Bühne links, Login-Panel rechts
   ===================================================================== */

.login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 560px);
  min-height: 100vh;
}

/* ---------- Bühne ---------- */

.login-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(28px, 5vh, 72px) clamp(32px, 6vw, 96px);
  background: linear-gradient(155deg, #63b9bc 0%, #3f9499 45%, #2a7277 100%);
  color: #fff;
  isolation: isolate;
}

.stage-blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: blob-drift 18s ease-in-out infinite alternate;
}

.stage-blob.one {
  top: -10%;
  left: -8%;
  width: 46vw;
  height: 46vw;
  max-width: 720px;
  max-height: 720px;
  background: rgb(255 255 255 / 35%);
}

.stage-blob.two {
  right: -12%;
  bottom: -20%;
  width: 40vw;
  height: 40vw;
  max-width: 640px;
  max-height: 640px;
  background: rgb(242 156 156 / 45%);
  animation-duration: 22s;
}

.stage-blob.three {
  top: 30%;
  right: 25%;
  width: 22vw;
  height: 22vw;
  max-width: 360px;
  max-height: 360px;
  background: rgb(246 238 221 / 30%);
  animation-duration: 26s;
}

@keyframes blob-drift {
  to {
    transform: translate(6%, 8%) scale(1.08);
  }
}

.stage-float {
  position: absolute;
  z-index: -1;
  font-size: 26px;
  opacity: 0.35;
  animation: float-up 14s ease-in-out infinite;
}

.stage-float.f1 { top: 14%; left: 54%; animation-delay: -2s; }
.stage-float.f2 { top: 72%; left: 8%; font-size: 20px; animation-delay: -6s; }
.stage-float.f3 { top: 22%; left: 86%; font-size: 18px; animation-delay: -4s; }
.stage-float.f4 { top: 84%; left: 62%; font-size: 22px; animation-delay: -9s; }
.stage-float.f5 { top: 48%; left: 4%; font-size: 16px; animation-delay: -1s; }

@keyframes float-up {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-18px) rotate(8deg);
  }
}

.stage-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vw, 140px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.stage-content {
  position: relative;
  flex: 0 1 600px;
  min-width: 0;
}

.stage-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 99px;
  background: rgb(255 255 255 / 12%);
  backdrop-filter: blur(10px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stage-brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.stage-title {
  margin: 26px 0 0;
  font-size: clamp(32px, 3.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.stage-text {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgb(255 255 255 / 86%);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
}

.stage-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.stage-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 14px;
  background: rgb(255 255 255 / 11%);
  backdrop-filter: blur(10px);
  font-size: 14.5px;
  font-weight: 600;
}

.feature-emoji {
  font-size: 18px;
}

.stage-mascot {
  flex: none;
  width: clamp(200px, 20vw, 380px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 6px solid rgb(255 255 255 / 85%);
  border-radius: 42px;
  box-shadow: 0 40px 80px -30px rgb(10 50 52 / 70%);
  animation: mascot-float 6s ease-in-out infinite;
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0) rotate(4deg);
  }
  50% {
    transform: translateY(-14px) rotate(1deg);
  }
}

/* Maskottchen nur, wenn genug Platz neben dem Text ist (Panel nimmt rechts ~560 px) */
@media (max-width: 1799px) {
  .stage-mascot {
    display: none;
  }
}

/* ---------- Discord-Vorschau ---------- */

.dc-message {
  display: flex;
  gap: 14px;
  max-width: 460px;
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background: #313338;
  box-shadow: 0 30px 60px -28px rgb(10 40 42 / 75%);
  color: #dbdee1;
  font-size: 14.5px;
  transform: rotate(-1.2deg);
}

.dc-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
}

.dc-body {
  flex: 1;
  min-width: 0;
}

.dc-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-name {
  color: #fff;
  font-weight: 650;
}

.dc-bot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 16px;
  padding: 0 5px 0 3px;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Discord-Häkchen im „APP“-Abzeichen */
.dc-bot svg {
  width: 11px;
  height: 11px;
  stroke-width: 3.2;
}

.dc-time {
  color: #949ba4;
  font-size: 12px;
}

.dc-embed {
  margin-top: 6px;
  padding: 10px 14px 12px;
  border-left: 4px solid #6bd0cb;
  border-radius: 6px;
  background: #2b2d31;
}

.dc-embed p {
  margin: 0;
}

.dc-mention {
  padding: 0 3px;
  border-radius: 4px;
  background: rgb(88 101 242 / 30%);
  color: #c9cdfb;
  font-weight: 550;
}

.dc-sub {
  margin-top: 4px !important;
  color: #949ba4;
  font-size: 12.5px;
}

.dc-image {
  width: 100%;
  max-width: 170px;
  margin-top: 10px;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dc-footer {
  margin-top: 8px !important;
  color: #949ba4;
  font-size: 11.5px;
}

.dc-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 14px;
  border-radius: 6px;
  background: #4e5058;
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
}

/* ---------- Login-Panel ---------- */

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 64px);
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
}

.panel-inner {
  width: 100%;
  max-width: 380px;
}

.panel-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow: 0 12px 28px -12px rgb(35 79 83 / 55%);
}

.login-panel h2 {
  margin: 22px 0 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel-text {
  margin: 8px 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.login-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--blush-soft);
  color: var(--text);
  font-size: 14px;
}

.btn-discord {
  width: 100%;
  padding: 14px 18px;
  border-color: transparent;
  border-radius: 14px;
  background: #5865f2;
  color: #fff;
  font-size: 15.5px;
  box-shadow: 0 14px 30px -12px rgb(88 101 242 / 75%);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-discord:hover {
  background: #4f5bdc;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -12px rgb(88 101 242 / 85%);
}

.btn-discord svg {
  width: 22px;
  height: 22px;
}

.panel-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-note svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.panel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.panel-copy {
  color: var(--muted);
  font-size: 12.5px;
}

.panel-bottom .lang .dropdown-menu {
  min-width: max(100%, 170px);
}

/* ---------- Tablet & Handy: untereinander ---------- */

@media (max-width: 999px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-stage {
    padding: 40px 20px 48px;
  }

  .login-panel {
    border-left: 0;
    padding: 36px 20px 48px;
  }
}

@media (max-width: 700px) {
  /* Handy: Vorschau weglassen, damit der Login schneller erreichbar ist */
  .dc-message {
    display: none;
  }

  .stage-features {
    gap: 8px;
    margin-top: 20px;
  }

  .stage-features li {
    padding: 9px 10px;
    font-size: 13px;
  }

  .stage-title {
    margin-top: 18px;
  }

  .login-stage {
    padding-bottom: 32px;
  }

  .login-panel {
    padding-top: 28px;
  }
}

/* =====================================================================
   Premium (Shop folgt)
   ===================================================================== */

.pill.premium {
  background: linear-gradient(135deg, #ffe6a8, #f6c96b);
  color: #6b4a00;
  font-weight: 750;
}

.premium-hint {
  color: #c98a0b;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
}

.premium-hint:hover {
  text-decoration: underline;
}

.premium-hint[hidden] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .premium-hint {
    color: #f0c75e;
  }
}

/* Listen-Feld (eigene GIFs) */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.list-rows {
  display: grid;
  gap: 8px;
}

.list-rows:empty {
  display: none;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-row .input {
  font-size: 13.5px;
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 7px 12px;
  font-size: 13.5px;
}

/* Premium-Seite */
.premium-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 24px;
  background:
    radial-gradient(600px 300px at 90% -20%, rgb(255 230 168 / 45%), transparent 60%),
    linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.premium-hero h1 {
  margin-top: 10px;
  font-size: clamp(30px, 3.4vw, 44px);
}

.premium-hero .subtitle {
  color: rgb(255 255 255 / 85%);
  font-size: 16px;
}

.premium-crown {
  font-size: 40px;
}

.soon-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgb(255 255 255 / 20%);
  border: 1px solid rgb(255 255 255 / 35%);
  font-size: 13px;
  font-weight: 700;
}

.premium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .premium-grid {
    grid-template-columns: 1fr;
  }
}

.premium-table-card {
  padding: 8px 6px;
  overflow-x: auto;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
}

.premium-table th,
.premium-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.premium-table tbody tr:last-child th,
.premium-table tbody tr:last-child td {
  border-bottom: 0;
}

.premium-table thead th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.premium-table tbody th {
  font-weight: 600;
}

.premium-table td {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.premium-col {
  color: #c98a0b;
}

@media (prefers-color-scheme: dark) {
  .premium-col {
    color: #f0c75e;
  }
}

.premium-buy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.premium-plan {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.premium-price {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-premium {
  margin-top: 6px;
  padding: 13px 18px;
  border-color: transparent;
  background: linear-gradient(135deg, #f6c96b, #e8a33c);
  color: #4a3300;
}

.btn-premium:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.premium-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Eigene Commands */
.custom-list {
  display: grid;
  gap: 12px;
}

.custom-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.custom-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-slash {
  color: var(--accent);
  font: 700 20px/1 ui-monospace, Menlo, monospace;
}

.custom-head .input {
  flex: 1;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 650;
}

.custom-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 24px;
}

.custom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.custom-actions .btn-primary {
  margin-left: auto;
}

.dirty-note {
  color: var(--warn-text);
  font-size: 13.5px;
  font-weight: 600;
}

.dirty-note[hidden] {
  display: none;
}

.server-body .pill.premium {
  margin: -8px 0 10px;
}

/* Nutzungsanzeige (z. B. eigene Commands „2 / 3“) */
.status-big {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.status-big span {
  color: var(--muted);
  font-size: 22px;
  font-weight: 650;
}

.progress {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.3s;
}

.status-sub {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
