/* ARCMS Design System — unified Apple-style Dark Theme
 * Used by Thymeleaf-served pages (auth, dashboard, project-detail, error).
 * Matches the Vue editor's design tokens (editor/src/styles/main.css)
 * so the user has a single visual language across the entire product.
 */

:root {
  /* Apple System Dark Palette (SF Symbols / macOS Sequoia / iOS 18) */
  --color-bg: #0a0d12;
  --color-surface: rgba(28, 28, 30, 0.78);
  --color-surface-2: rgba(44, 44, 46, 0.86);
  --color-surface-3: rgba(58, 58, 60, 0.92);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-text: #f5f5f7;
  --color-text-strong: #ffffff;
  --color-muted: rgba(235, 235, 245, 0.6);
  --color-accent: #0a84ff;
  --color-accent-hover: #409cff;
  --color-accent-text: #ffffff;
  --color-success: #30d158;
  --color-warning: #ff9f0a;
  --color-danger: #ff453a;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);

  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
  font-size: 13px;
  color: var(--color-text);
  background:
    radial-gradient(circle at 30% 0%, rgba(10, 132, 255, 0.06), transparent 60%),
    radial-gradient(circle at 90% 100%, rgba(94, 100, 255, 0.05), transparent 50%),
    var(--color-bg);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

/* Buttons */
button, .btn {
  font: inherit;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 80ms ease, border-color 80ms ease, transform 60ms ease;
}
button:hover:not(:disabled), .btn:hover:not(:disabled) {
  background: var(--color-surface-3);
  border-color: var(--color-border-strong);
}
button:active:not(:disabled), .btn:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled, .btn:disabled { cursor: not-allowed; opacity: 0.4; }

button.primary, .btn.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(10, 132, 255, 0.4);
}
button.primary:hover:not(:disabled), .btn.primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

button.danger, .btn.danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}

/* Inputs */
input, select, textarea {
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  outline: none;
  transition: border-color 80ms ease, box-shadow 80ms ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.18);
}
input::placeholder, textarea::placeholder { color: var(--color-muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }
::-webkit-scrollbar-track { background: transparent; }

/* Layout: Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(20, 22, 28, 0.7);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar h1 { font-size: 16px; font-weight: 600; }
.topbar h1 a { color: var(--color-text-strong); }
.topbar nav { display: flex; gap: 16px; flex: 1; }
.topbar nav a { color: var(--color-muted); }
.topbar nav a:hover { color: var(--color-text); }
.topbar .user, .topbar .spacer { color: var(--color-muted); font-size: 12px; flex: 1; }
.topbar form { margin: 0; }
.topbar form button {
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  font-size: 12px;
}
.topbar .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 12px;
  font-size: 12px;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}
.topbar .user-chip .user-email { color: var(--color-text); }
.badge.role-badge {
  background: var(--color-surface-3);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Main */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

/* Breadcrumb über dem page-header (Tiefen-Navigation) */
.breadcrumb {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0 0 12px 0;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-text); }

/* Cards / Grid */
.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card,
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: inherit;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.project-card { display: block; }
.project-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.project-card h3 { margin-bottom: 8px; color: var(--color-text-strong); }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge.aktiv,
.badge.veroeffentlicht {
  background: rgba(48, 209, 88, 0.16);
  color: #6ee787;
  border-color: rgba(48, 209, 88, 0.25);
}
.badge.entwurf {
  background: rgba(255, 159, 10, 0.16);
  color: #ffb958;
  border-color: rgba(255, 159, 10, 0.25);
}
.badge.archiviert {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border-color: var(--color-border);
}

/* Chips (filter pills) */
.chips { margin-bottom: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 80ms ease, background 80ms ease;
}
.chip:hover { border-color: var(--color-border-strong); }
.chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-size: 11px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:hover { background: var(--color-surface-2); }
tbody tr:last-child td { border-bottom: none; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 16px;
}
.modal {
  background: rgba(28, 28, 30, 0.95);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  max-width: 95vw;
  width: min(440px, 95vw);
  padding: 24px;
}
.modal h3 { margin-bottom: 16px; color: var(--color-text-strong); }
.modal input { width: 100%; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Forms */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 12px; color: var(--color-muted); font-weight: 500; }

.error, .alert.error {
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff7e75;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
}

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

/* Spinner — apple-style ring */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spinner-rotate 0.9s linear infinite;
}
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Auth-card centered layout */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin-bottom: 4px; }
.auth-card .subtitle { color: var(--color-muted); margin-bottom: 24px; font-size: 13px; }

/* Utility */
.muted { color: var(--color-muted); }
.spacer { flex: 1; }

/* ============================================================
   UI-Redesign Primitive (Spec 2026-05-23)
   ============================================================ */

/* App-Shell — Sidebar + Main Grid */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app-shell > main {
  max-width: none;
  margin: 0;
  padding: 24px 32px 48px;
}

/* Sidebar */
.sidebar {
  background: rgba(14, 16, 22, 0.92);
  border-right: 1px solid var(--color-border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-brand img { display: block; }
.sidebar-brand .wordmark {
  font-weight: 600; color: var(--color-text-strong); font-size: 14px;
}
.sidebar-brand .workspace-name {
  font-size: 11px; color: var(--color-muted); margin-top: 2px;
}
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-muted); padding: 8px 10px 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--color-muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.sidebar-link:hover { color: var(--color-text); background: var(--color-surface); }
.sidebar-link.active {
  color: var(--color-text-strong);
  background: var(--color-surface);
  border-left-color: var(--color-accent);
}
.sidebar-footer {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
.sidebar-user {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px;
  font-size: 12px;
}
.sidebar-user .email { color: var(--color-text); }
.sidebar-user .role { color: var(--color-muted); font-size: 11px; }
.sidebar-footer form { margin: 0; }
.sidebar-footer button {
  width: 100%; text-align: left; padding: 8px 10px;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); font-size: 12px; color: var(--color-muted);
}
.sidebar-footer button:hover { background: var(--color-surface); color: var(--color-text); }

/* Slim Topbar */
.app-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(20, 22, 28, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky; top: 0; z-index: 30;
}
.app-topbar .breadcrumb { margin: 0; flex: 1; }
.app-topbar .actions { display: flex; gap: 10px; }

/* Hamburger (nur Mobile) */
.hamburger {
  display: none;
  background: transparent; border: 1px solid var(--color-border);
  width: 36px; height: 36px; border-radius: var(--radius-md);
  align-items: center; justify-content: center; padding: 0;
}
.hamburger svg { width: 18px; height: 18px; stroke: var(--color-text); }
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 40;
}
body.sidebar-open .sidebar-backdrop { display: block; }

@media (max-width: 1023px) {
  .app-shell { grid-template-columns: 64px 1fr; }
  .sidebar { padding: 14px 8px; }
  .sidebar .label-text,
  .sidebar .workspace-name,
  .sidebar-section-label,
  .sidebar-user,
  .sidebar-brand .wordmark { display: none; }
  .sidebar-link { justify-content: center; padding: 10px 0; }
  .sidebar-footer button { font-size: 0; padding: 8px; }
  .sidebar-footer button::before { content: "⎋"; font-size: 14px; }
}
@media (max-width: 767px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0;
    width: 260px; height: 100vh;
    padding: 20px 14px;
    transform: translateX(-100%);
    transition: transform 0.24s ease-out;
    z-index: 50;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar .label-text,
  .sidebar .workspace-name,
  .sidebar-section-label,
  .sidebar-user,
  .sidebar-brand .wordmark { display: revert; }
  .sidebar-link { justify-content: flex-start; padding: 8px 10px; }
  .sidebar-footer button { font-size: 12px; padding: 8px 10px; }
  .sidebar-footer button::before { content: ""; }
  .hamburger { display: inline-flex; }
  .app-shell > main { padding: 16px; }
  .app-topbar { padding: 12px 16px; }
}

/* Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.card.compact { padding: 14px; }
.card.muted { background: rgba(255,255,255,0.02); }
.card > h3:first-child, .card > .card-title { margin-top: 0; }
.card > .card-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }

/* Section */
.section { margin-top: 28px; }
.section:first-child { margin-top: 0; }
.section-title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

/* Data-List */
.data-list {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.data-list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--color-surface);
}
.data-list-row:hover { background: var(--color-surface-2); }
.data-list-row .primary-text { flex: 1; font-weight: 500; }
.data-list-row .muted { color: var(--color-muted); font-size: 12px; }
.data-list-row.row-disabled { opacity: 0.5; }
.data-list-row.row-current { background: rgba(10, 132, 255, 0.08); }

/* Empty-State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}
.empty-state .glyph {
  display: inline-block;
  width: 48px; height: 48px;
  line-height: 48px; font-size: 24px;
  border-radius: 50%;
  background: var(--color-surface);
  margin-bottom: 12px;
}
.empty-state .title { font-size: 14px; color: var(--color-text); margin: 0 0 6px; font-weight: 500; }
.empty-state .desc { font-size: 13px; margin: 0; }
.empty-state .cta { margin-top: 16px; }

/* KPI Tile */
.kpi-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.kpi-tile .kpi-label { font-size: 11px; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-tile .kpi-value { font-size: 24px; font-weight: 600; margin-top: 6px; color: var(--color-text-strong); }

/* Detail-Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
@media (max-width: 959px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* Alert */
.alert {
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.alert.error {
  background: rgba(255, 69, 58, 0.10);
  border-color: rgba(255, 69, 58, 0.30);
  color: #ff7e75;
}
.alert.success {
  background: rgba(48, 209, 88, 0.10);
  border-color: rgba(48, 209, 88, 0.30);
  color: #6cd683;
}
.alert.info {
  background: rgba(10, 132, 255, 0.10);
  border-color: rgba(10, 132, 255, 0.30);
  color: #5aaaff;
}

/* Secondary Button */
button.secondary, a.secondary {
  background: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
button.secondary:hover, a.secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

/* ====== Landing-Page Primitive ====== */
body.landing-page { padding: 0; }
.landing-topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 20px 48px;
  max-width: 1240px; margin: 0 auto;
}
.landing-topbar nav { display: flex; gap: 24px; flex: 1; margin-left: 24px; }
.landing-topbar nav a { color: var(--color-muted); font-size: 14px; }
.landing-topbar nav a:hover { color: var(--color-text); }
.landing-topbar .topbar-actions { display: flex; gap: 10px; align-items: center; }

/* Topbar-CTA „Anmelden" — kompakter Pill-Button mit Gradient + Glow */
.landing-topbar .topbar-actions .primary {
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 100%);
  border: 1px solid rgba(94, 224, 255, 0.5);
  box-shadow:
    0 6px 20px rgba(10, 132, 255, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}
.landing-topbar .topbar-actions .primary:hover {
  filter: brightness(1.10);
  transform: translateY(-1px);
  box-shadow:
    0 10px 28px rgba(10, 132, 255, 0.55),
    0 0 24px rgba(94, 224, 255, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.landing-topbar .topbar-actions .primary:active { transform: translateY(0); }

/* Hero- + Final-CTA: gleicher Pill-Gradient-Look, nur größer als der Topbar-Button.
   Greift auf <a class="primary"> im Hero (hero-ctas) und Final-CTA. */
body.landing-page .hero-ctas .primary,
body.landing-page .final-cta .ctas .primary {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 100%);
  border: 1px solid rgba(94, 224, 255, 0.55);
  color: #fff;
  box-shadow:
    0 10px 28px rgba(10, 132, 255, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}
body.landing-page .hero-ctas .primary:hover,
body.landing-page .final-cta .ctas .primary:hover {
  filter: brightness(1.10);
  transform: translateY(-2px);
  box-shadow:
    0 16px 38px rgba(10, 132, 255, 0.55),
    0 0 32px rgba(94, 224, 255, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
body.landing-page .hero-ctas .primary:active,
body.landing-page .final-cta .ctas .primary:active { transform: translateY(0); }

/* Secondary (Mehr erfahren) als Pendant: gleicher Pill, aber „outlined glass" */
body.landing-page .hero-ctas .secondary {
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--color-text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
body.landing-page .hero-ctas .secondary:hover {
  background: rgba(94, 224, 255, 0.08);
  border-color: rgba(94, 224, 255, 0.40);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  max-width: 1240px; margin: 0 auto;
  padding: 120px 48px 140px;
  min-height: 85vh;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: center;
}
.hero > * { position: relative; z-index: 1; }
.hero .hero-grid {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 75% 80% at 50% 55%, black 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 55%, black 25%, transparent 85%);
}
.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700; line-height: 1.05; letter-spacing: -1.5px;
  margin: 0 0 20px;
}
.hero h1 em { font-style: normal; color: var(--color-accent); }
.hero p.lead {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--color-muted); line-height: 1.5; margin: 0 0 32px;
  max-width: 520px;
}
.hero-ctas { display: flex; gap: 12px; margin-bottom: 24px; }
.hero-trust {
  font-size: 12px; color: var(--color-muted);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.hero-visual {
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  min-height: 100%;
}
.hero-visual svg { max-width: 100%; height: auto; }

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; padding: 72px 24px 80px; gap: 32px; min-height: 0; }
  .landing-topbar { padding: 16px 24px; }
}

.landing-section {
  max-width: 1240px; margin: 0 auto;
  padding: 80px 48px;
}
.landing-section h2 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700; letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.landing-section .section-lead {
  color: var(--color-muted); font-size: 16px; margin: 0 0 40px; max-width: 600px;
}
@media (max-width: 899px) {
  .landing-section { padding: 56px 24px; }
}

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.feature-card .glyph {
  font-size: 28px; line-height: 1;
  display: inline-block; padding: 10px;
  background: rgba(10, 132, 255, 0.10); border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; margin: 0 0 8px; }
.feature-card p { color: var(--color-muted); font-size: 14px; line-height: 1.55; margin: 0; }

.step-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.step-card .step-num {
  font-size: 36px; font-weight: 700; color: var(--color-accent); line-height: 1;
  margin-bottom: 12px;
}
.step-card h3 { font-size: 16px; margin: 0 0 6px; }
.step-card p { color: var(--color-muted); font-size: 13px; margin: 0; }

.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.persona-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.persona-card .name { font-size: 15px; font-weight: 600; color: var(--color-text-strong); }
.persona-card .role { font-size: 12px; color: var(--color-accent); margin-bottom: 8px; }
.persona-card p { font-size: 13px; color: var(--color-muted); line-height: 1.5; margin: 0; }

.usp-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
  padding: 40px 0;
}
.usp-item h4 { font-size: 16px; margin: 0 0 6px; color: var(--color-text-strong); }
.usp-item p { color: var(--color-muted); font-size: 13px; margin: 0; }

.final-cta { text-align: center; padding: 80px 24px; }
.final-cta h2 { font-size: clamp(28px, 3vw, 40px); margin: 0 0 24px; }
.final-cta .ctas { display: inline-flex; gap: 12px; }

.landing-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 48px 32px;
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
  color: var(--color-muted); font-size: 13px;
}
.landing-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text); margin: 0 0 12px; }
.landing-footer a { color: var(--color-muted); display: block; padding: 3px 0; }
.landing-footer a:hover { color: var(--color-text); }
.landing-footer .copyright {
  grid-column: 1 / -1; padding-top: 24px; margin-top: 8px;
  border-top: 1px solid var(--color-border); font-size: 11px;
  display: flex; justify-content: space-between;
}

@media (max-width: 899px) {
  .feature-grid, .step-row, .persona-grid, .usp-strip { grid-template-columns: 1fr; }
  .landing-footer { grid-template-columns: 1fr; padding: 32px 24px; }
}

/* Scroll-Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Auth-Split */
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh;
}
.auth-split .brand-panel {
  background:
    radial-gradient(at 30% 20%, rgba(10,132,255,0.18), transparent 50%),
    linear-gradient(160deg, rgba(10,132,255,0.10), transparent 60%),
    var(--color-bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px;
  border-right: 1px solid var(--color-border);
  animation: brand-fade-in 0.6s ease-out;
}
.auth-split .brand-panel .brand-mark { margin-bottom: 32px; }
.auth-split .brand-panel h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.5px;
  margin: 0 0 16px; max-width: 480px;
}
.auth-split .brand-panel p.brand-lead {
  color: var(--color-muted); font-size: 16px; line-height: 1.55; max-width: 480px; margin: 0 0 28px;
}
.auth-split .brand-panel .usp-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.auth-split .brand-panel .usp-bullets li {
  font-size: 13px; color: var(--color-text);
  display: flex; align-items: center; gap: 10px;
}
.auth-split .brand-panel .usp-bullets li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-accent); flex-shrink: 0;
}
.auth-split .form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.auth-split .form-panel .auth-card {
  background: transparent; border: none; padding: 0; box-shadow: none;
  width: 100%; max-width: 400px;
}
@keyframes brand-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 959px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-split .brand-panel {
    padding: 32px 24px; border-right: none;
    border-bottom: 1px solid var(--color-border);
    text-align: center; align-items: center;
  }
  .auth-split .brand-panel h2 { font-size: 24px; }
  .auth-split .brand-panel p.brand-lead { display: none; }
  .auth-split .brand-panel .usp-bullets { display: none; }
  .auth-split .form-panel { padding: 32px 24px; }
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  padding: 12px 14px;
  font-size: 14px;
}
.auth-card input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -1px;
  border-color: var(--color-accent);
}

/* 404-Page */
.not-found-shell {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.not-found-shell .brand { margin-bottom: 48px; }
.not-found-shell .code {
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 700; line-height: 1; letter-spacing: -4px;
  color: var(--color-text-strong);
  margin: 0;
}
.not-found-shell .code-accent { color: var(--color-accent); }
.not-found-shell h1 { font-size: 22px; margin: 24px 0 8px; }
.not-found-shell p { color: var(--color-muted); margin: 0 0 24px; }

/* ============================================================
   Landing-Page MODERN UPGRADE
   ============================================================ */

/* Ambient gradient mesh hinter der ganzen Landing */
body.landing-page { position: relative; overflow-x: hidden; }
body.landing-page::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(at 15% 10%, rgba(10, 132, 255, 0.20), transparent 45%),
    radial-gradient(at 85% 18%, rgba(155, 80, 255, 0.16), transparent 40%),
    radial-gradient(at 50% 75%, rgba(0, 220, 220, 0.10), transparent 55%);
}

/* Gradient-Text auf Akzent-Wörtern */
.hero h1 em.grad,
.stat-value, .grad-text {
  background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 50%, #b48cff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Pulsierende Waveform im Hero */
@keyframes wave-pulse {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1.0); }
}
.hero-visual svg .wave-bar {
  transform-origin: center;
  animation: wave-pulse 1.6s ease-in-out infinite;
}
.hero-visual svg .wave-bar.b1 { animation-delay: 0.00s; }
.hero-visual svg .wave-bar.b2 { animation-delay: 0.15s; }
.hero-visual svg .wave-bar.b3 { animation-delay: 0.30s; }
.hero-visual svg .wave-bar.b4 { animation-delay: 0.45s; }
.hero-visual svg .wave-bar.b5 { animation-delay: 0.60s; }
@media (prefers-reduced-motion: reduce) {
  .hero-visual svg .wave-bar { animation: none; }
}

/* Bento-Grid für Features */
.feature-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}
.feature-bento .feature-card { display: flex; flex-direction: column; }
.feature-bento .feature-card.lead {
  grid-row: 1 / 3;
  padding: 36px;
  background:
    linear-gradient(160deg, rgba(10,132,255,0.06), transparent 70%),
    var(--color-surface);
}
.feature-bento .feature-card.lead h3 { font-size: 24px; }
.feature-bento .feature-card.lead p { font-size: 15px; line-height: 1.6; }
.feature-bento .feature-card.lead .glyph { font-size: 36px; padding: 14px; }
@media (max-width: 899px) {
  .feature-bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .feature-bento .feature-card.lead { grid-row: auto; padding: 28px; }
}

/* Hover-Glow auf Cards */
.feature-card, .persona-card, .step-card {
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.feature-card:hover, .persona-card:hover, .step-card:hover {
  border-color: rgba(10, 132, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.20),
              0 12px 40px -10px rgba(10, 132, 255, 0.35);
  transform: translateY(-2px);
}

/* Stats-Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 48px 0;
}
.stat-item { text-align: center; }
.stat-item .stat-value {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1;
  margin-bottom: 10px;
  display: inline-block;
}
.stat-item .stat-label {
  font-size: 12px; color: var(--color-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
@media (max-width: 899px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 36px 0; }
}

/* Mockup-Strip */
.mockup-strip {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
}
.mockup-strip.mockup-strip-single {
  grid-template-columns: minmax(0, 1000px);
  justify-content: center;
}
.mockup {
  background: linear-gradient(180deg, rgba(28,28,30,0.92), rgba(20,22,28,0.96));
  border: 1px solid var(--color-border-strong);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 64px -16px rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
}
.mockup .frame-bar {
  display: flex; gap: 6px; margin-bottom: 12px; padding: 4px 0;
}
.mockup .frame-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-border-strong);
}
.mockup svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.mockup .mockup-caption {
  margin: 12px 4px 4px; font-size: 12px; color: var(--color-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
@media (max-width: 899px) {
  .mockup-strip { grid-template-columns: 1fr; }
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
  background: rgba(14, 16, 22, 0.45);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee-scroll 32s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-size: 14px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 48px;
}
.marquee-track span::after { content: "·"; opacity: 0.4; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Aurora-Underline auf landing-section h2 */
.landing-section h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.landing-section h2::after {
  content: "";
  position: absolute; left: 0; bottom: 0; height: 3px;
  width: 0;
  background: linear-gradient(90deg, #0a84ff, #5ee0ff, transparent);
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s;
}
.landing-section h2.reveal-in::after { width: 100%; }

/* Mouse-Parallax-Target */
.hero-visual { transition: transform 220ms ease-out; will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .hero-visual { transition: none !important; transform: none !important; }
}

/* ====== Landing-Page: SVG-Icons in .glyph + Avatar-Stage + Editor-Image ====== */
.feature-card .glyph {
  /* SVG-Icon-Container (Override des emoji-Styles) */
  width: 48px; height: 48px;
  padding: 10px;
  font-size: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-accent);
}
.feature-card .glyph svg { width: 100%; height: 100%; display: block; }
.feature-bento .feature-card.lead .glyph { width: 60px; height: 60px; padding: 12px; }

/* Avatar-Stage — model-viewer + Waveform-Overlay */
.avatar-stage {
  position: relative;
  width: 100%;
  max-width: 360px;          /* kompakter — Avatar dominiert die Spalte nicht */
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
}
.avatar-stage model-viewer {
  width: 100%; height: 100%;
  display: block;
  background-color: transparent;
  --poster-color: transparent;
}
.avatar-stage .speech-wave {
  position: absolute;
  left: -70%; top: 50%;
  width: 80%; height: 60px;
  transform: translateY(-50%);
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(10,132,255,0.55));
  /* Beide Enden weich ausfaden — Linie wirkt "feiner" am Anfang und Ende */
  mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 82%, transparent 100%);
}
.avatar-stage .speech-wave .wave-base {
  fill: none;
  stroke: rgba(10, 132, 255, 0.22);
  stroke-width: 2;
  stroke-linecap: round;
}
.avatar-stage .speech-wave .wave-flow {
  fill: none;
  stroke: url(#wave-grad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 60 380;
  animation: wave-travel 4.2s ease-in-out infinite;
}
@keyframes wave-travel {
  from { stroke-dashoffset: 440; }
  to   { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-stage .speech-wave .wave-flow { animation: none; stroke-dasharray: none; }
}

/* Editor-Screenshot im Mockup */
.mockup img.editor-shot {
  width: 100%; height: auto; display: block;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Phone-Placeholder Mockup-Caption */
.mockup .placeholder-pill {
  display: inline-block;
  font-size: 10px; padding: 2px 8px;
  background: rgba(255,159,10,0.18); color: #ffba49;
  border-radius: 999px; letter-spacing: 0.06em;
  margin-left: 8px; text-transform: uppercase;
}

/* ============================================================
   APP-WIDE POLISH — überträgt Landing-Magie auf alle Templates
   ohne Template-Umbau. Greift durch existierende Klassen.
   ============================================================ */

/* Ambient gradient mesh hinter allen Seiten (nicht nur Landing).
   Deckkraft niedriger als Landing — soll nicht vom Content ablenken. */
body:not(.landing-page)::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(at 12% 8%, rgba(10, 132, 255, 0.10), transparent 45%),
    radial-gradient(at 88% 14%, rgba(155, 80, 255, 0.08), transparent 40%),
    radial-gradient(at 50% 95%, rgba(0, 220, 220, 0.05), transparent 55%);
}

/* Gradient-Text auf den prominentesten Headings jeder authentifizierten Seite */
.page-header h2,
.auth-card h1,
.auth-split .brand-panel h2 {
  background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 50%, #b48cff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Cards + Project-Cards bekommen weichen Glow + farbigen Border-Wechsel beim Hover */
.card { position: relative; }
.card:hover {
  border-color: rgba(94, 224, 255, 0.40);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(94, 224, 255, 0.12),
    0 0 32px rgba(94, 224, 255, 0.10);
}
.project-card:hover {
  border-color: rgba(94, 224, 255, 0.50);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(94, 224, 255, 0.18),
    0 0 40px rgba(10, 132, 255, 0.18);
  transform: translateY(-3px);
}

/* Data-List-Rows in Mitglieder/Avatare/Versions/Audit — gleiche Glow-Logik in subtiler */
.data-list-row { transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
.data-list-row:hover {
  border-color: rgba(94, 224, 255, 0.30);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 18px rgba(10, 132, 255, 0.08);
}

/* Buttons primary — gleicher Gradient wie der Landing-CTA */
.primary,
button.primary,
a.primary {
  background: linear-gradient(135deg, #0a84ff 0%, #6ab8ff 100%);
  border: 1px solid rgba(94, 224, 255, 0.55);
  box-shadow: 0 6px 18px rgba(10, 132, 255, 0.32);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}
.primary:hover,
button.primary:hover,
a.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(10, 132, 255, 0.45);
}

/* Empty-State-Glyphs sehen aktuell wie nackte Emojis aus — wir geben ihnen
   eine runde, glasige Plate, sodass sie wie in Landing aussehen */
.empty-state .glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(10,132,255,0.18), rgba(180,140,255,0.16));
  border: 1px solid rgba(94, 224, 255, 0.25);
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.18);
  font-size: 28px;
  margin: 0 auto 16px;
}

/* Auth-Brand-Panel: subtile linke Aurora — kein Layout-Umbau nötig */
.auth-split .brand-panel {
  position: relative;
  overflow: hidden;
}
.auth-split .brand-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(at 20% 30%, rgba(10, 132, 255, 0.18), transparent 50%),
    radial-gradient(at 80% 80%, rgba(180, 140, 255, 0.16), transparent 50%);
}
.auth-split .brand-panel > * { position: relative; z-index: 1; }

/* Section-Titles bekommen aurora-line wie auf Landing — eleganter als nudeliges <h3> */
.section-title { position: relative; padding-bottom: 10px; margin-bottom: 18px; }
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 48px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #0a84ff, #b48cff);
}

/* App-Topbar darüber dunkler/glasiger machen, damit sie sich vom Mesh absetzt */
.app-topbar { backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }

/* ============================================================
   UTILITIES + ICON-INTEGRATION
   ============================================================ */

/* Block-Button (Full-Width Submit oder Anchor), Ersatz für inline width:100% etc. */
.btn-block {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

/* SVG-Icons in Toggle-Buttons (Dashboard view-toggle) und Mini-Buttons */
.view-toggle a .toggle-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  color: currentColor;
}
.view-toggle a .toggle-ico svg { width: 100%; height: 100%; }

/* SVG-Icons in primären Buttons (z.B. „+ Neues Projekt") */
.primary .btn-ico,
button.primary .btn-ico,
.btn .btn-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  color: currentColor;
}
.primary .btn-ico svg,
button.primary .btn-ico svg,
.btn .btn-ico svg { width: 100%; height: 100%; }

/* Glas-Plate enthält jetzt SVG statt Emoji → SVG-Styling */
.empty-state .glyph svg {
  width: 28px; height: 28px;
  color: rgba(94, 224, 255, 0.95);
}

/* audioStatus-Badges für TTS-Job-Anzeige in project-detail */
.badge.idle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  border-color: var(--color-border);
}
.badge.processing {
  background: rgba(10, 132, 255, 0.16);
  color: #6ab8ff;
  border-color: rgba(10, 132, 255, 0.25);
}
.badge.ready {
  background: rgba(48, 209, 88, 0.16);
  color: #6ee787;
  border-color: rgba(48, 209, 88, 0.25);
}
.badge.error {
  background: rgba(255, 69, 58, 0.18);
  color: #ff7e75;
  border-color: rgba(255, 69, 58, 0.30);
}

/* Gradient-Heading-Konflikt mit eingebetteten Spans: Badges + Meta-Spans
   im <h2> erben sonst `-webkit-text-fill-color: transparent` und werden unsichtbar. */
.page-header h2 .badge,
.page-header h2 .meta,
.page-header h2 small {
  -webkit-text-fill-color: initial;
  color: var(--color-muted);
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
}
.page-header h2 .badge {
  color: var(--color-text);
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  margin-left: 10px;
}
.page-header h2 .meta {
  font-weight: 400;
  font-size: 14px;
  margin-left: 12px;
}

/* Mini-Btn — zentral statt 3× dupliziert in Templates */
.mini-btn {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  transition: background 80ms ease, border-color 80ms ease, color 80ms ease;
}
.mini-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.mini-btn.danger:hover {
  background: rgba(255, 69, 58, 0.15);
  color: #ff7e75;
  border-color: rgba(255, 69, 58, 0.35);
}

/* Logout-Button bekommt SVG-Icon statt Pseudo-Element-ESC */
.sidebar-footer button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sidebar-footer button .logout-ico {
  width: 14px; height: 14px;
  display: inline-flex;
}
.sidebar-footer button .logout-ico svg { width: 100%; height: 100%; }

/* ============================================================
   DASHBOARD + PROJECT-DETAIL + VERSIONS — vorher inline in Templates
   ============================================================ */

.toolbar {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-box { flex: 1; min-width: 200px; }
.search-box input { width: 100%; }

.view-toggle {
  display: flex; gap: 2px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
}
.view-toggle a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-muted);
  display: inline-flex; align-items: center;
}
.view-toggle a.active {
  background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.30);
}

/* Project-Row (Listenansicht) */
.project-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--color-surface); color: inherit;
}
.project-row:hover { background: var(--color-surface-2); }
.project-row .name { flex: 1; font-weight: 500; }

/* Card-Actions: kompakte Aktions-Reihe in Project-Cards + ähnlich */
.card-actions { display: flex; gap: 6px; margin-top: 12px; }
.card-actions form { display: inline; }

/* Inline-Form: Mitglieder einladen u.ä. */
.form-inline {
  display: flex; gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-inline .form-row { margin: 0; }

/* Project-Detail: <h2> mit Badge daneben */
.h-with-badge {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}

/* Project-Detail: KPI-Detail-Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 899px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* Project-Detail: Scenes-Table-Actions */
.scene-actions { display: flex; gap: 6px; }

/* Comments — wiederverwendbar */
.comment-list { display: flex; flex-direction: column; gap: 0; }
.comment-item {
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  white-space: pre-wrap;
  font-size: 13px;
}
.comment-item:first-child { border-top: none; padding-top: 0; }
.comment-item .meta {
  font-size: 11px; color: var(--color-muted);
  margin-bottom: 4px;
}

/* Audit-Log: data-list-row Spalten-Breiten via Modifier statt inline */
.data-list-row .col-time { min-width: 170px; color: var(--color-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.data-list-row .col-actor { min-width: 180px; }
.data-list-row .col-action { font-weight: 500; }
.data-list-row .col-detail { flex: 2; color: var(--color-muted); font-size: 12px; }

/* Spacing-Utilities — ersetzen häufige Inline-Margins */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* Form-Defaults — textarea immer Full-Width und vertikal resizable */
textarea { width: 100%; resize: vertical; min-height: 80px; }

/* Versions-List: feste Spalten-Breiten */
.data-list-row .col-version {
  min-width: 60px;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.data-list-row.row-current {
  border-color: rgba(48, 209, 88, 0.35);
}

/* Inline-form Reset für form-Elemente in data-list-rows */
.data-list-row form { margin: 0; display: inline; }

/* ============================================================
   TOPBAR-BREADCRUMB-SLOT (Phase #12 — Topbar nicht mehr leer)
   ============================================================ */
.app-topbar .topbar-breadcrumb {
  flex: 1;
  font-size: 13px;
  color: var(--color-muted);
  display: flex; align-items: center; gap: 4px;
  letter-spacing: -0.01em;
}
.app-topbar .topbar-breadcrumb a {
  color: var(--color-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 120ms ease, color 120ms ease;
}
.app-topbar .topbar-breadcrumb a:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}
.app-topbar .topbar-breadcrumb span:not(.muted) {
  color: var(--color-text);
  font-weight: 500;
  padding: 4px 8px;
}

/* Wenn Breadcrumb fehlt, Topbar nicht als „leeres Band" stehen lassen */
.app-topbar:empty,
.app-topbar:has(> button.hamburger:only-child) {
  display: none;
}
@media (max-width: 1023px) {
  .app-topbar { display: flex; }  /* Hamburger braucht's auf Mobile immer */
}

/* ============================================================
   AVATAR-CHIPS (Phase #11 — Initial + Gradient-Background als
   Pre-Thumbnail in tenant/avatars.html. Statt model-viewer pro
   Zeile ein leichtes Chip mit deterministischem Cyan/Violett-Ton.)
   ============================================================ */
.avatar-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
}
/* 6 deterministische Töne entlang der Brand-Palette (Cyan → Violett) */
.avatar-chip[data-tone="0"] { background: linear-gradient(135deg, #0a84ff 0%, #5ee0ff 100%); }
.avatar-chip[data-tone="1"] { background: linear-gradient(135deg, #5ee0ff 0%, #6ab8ff 100%); }
.avatar-chip[data-tone="2"] { background: linear-gradient(135deg, #b48cff 0%, #5ee0ff 100%); }
.avatar-chip[data-tone="3"] { background: linear-gradient(135deg, #9b50ff 0%, #b48cff 100%); }
.avatar-chip[data-tone="4"] { background: linear-gradient(135deg, #0a84ff 0%, #9b50ff 100%); }
.avatar-chip[data-tone="5"] { background: linear-gradient(135deg, #00dcdc 0%, #5ee0ff 100%); }
