/* NexusDoc-Vorlage — Komponenten als reines CSS, ohne Tailwind.
 * Liest nur die Tokens aus tokens.json (als CSS-Variablen). Hell und Dunkel
 * schalten über data-theme="hell" | "dunkel" am <html>; Dunkel ist Vorgabe.
 * Klassen beginnen mit nd-. */
/* ── Schriften: Geist und Geist Mono ───────────────────────────────────────
 * Variable Schriften (Gewicht 100–900, SIL Open Font License 1.1), ausgeliefert von
 * neofee.network unter /design/v1/fonts/. Kein Google-Zugriff beim Seitenaufruf. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-vietnamese.woff2') format('woff2');
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-symbols.woff2') format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-vietnamese.woff2') format('woff2');
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://neofee.network/design/v1/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Grundlage ─────────────────────────────────────────────── */
.nd-body,
.nd-preview {
  background-color: var(--bg);
  /* kaum sichtbarer Indigo-Schein oben, wie in NexusDoc */
  background-image: radial-gradient(
    80rem 40rem at 50% -12rem,
    color-mix(in oklab, var(--blue-500) 10%, transparent),
    transparent 70%
  );
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-theme='hell'] .nd-body,
[data-theme='hell'] .nd-preview {
  background-image: radial-gradient(
    80rem 40rem at 50% -12rem,
    color-mix(in oklab, var(--blue-500) 7%, transparent),
    transparent 70%
  );
}
.nd-preview {
  padding: var(--space-6);
  min-height: 100%;
  box-sizing: border-box;
}
.nd-preview *,
.nd-body * {
  box-sizing: border-box;
}
.nd-preview h1,
.nd-preview h2,
.nd-preview h3,
.nd-preview p,
.nd-body h1,
.nd-body h2,
.nd-body h3,
.nd-body p {
  margin: 0;
}
.nd-body h1,
.nd-body h2,
.nd-body h3,
.nd-preview h1,
.nd-preview h2,
.nd-preview h3 {
  letter-spacing: -0.011em;
  text-wrap: balance;
}
.nd-body :focus-visible,
.nd-preview :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.nd-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}
.nd-num {
  font-variant-numeric: tabular-nums;
}
.nd-muted {
  color: var(--text-muted);
}
.nd-faint {
  color: var(--text-faint);
}
.nd-link {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.nd-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.nd-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.nd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* ── Knöpfe ────────────────────────────────────────────────── */
.nd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1_5);
  padding: 8px var(--space-3_5);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font: 500 14px/20px var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition:
    background-color 150ms,
    border-color 150ms,
    color 150ms,
    box-shadow 150ms,
    transform 150ms;
}
.nd-btn svg,
.nd-search svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nd-btn:active {
  transform: translateY(1px) scale(0.99);
}
.nd-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.nd-btn--primary {
  background-image: linear-gradient(to bottom, var(--accent), var(--accent-deep));
  color: var(--on-accent);
  box-shadow: var(--shadow-primary);
}
.nd-btn--primary:hover {
  background-image: linear-gradient(to bottom, var(--accent-hover), var(--accent-deep-hover));
}
.nd-btn--secondary {
  background: var(--surface);
  border-color: var(--line-control);
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
}
[data-theme='dunkel'] .nd-btn--secondary,
[data-theme='dunkel'] .nd-input {
  box-shadow: none;
}
.nd-btn--secondary:hover {
  border-color: var(--line-control-hover);
  background: var(--surface-hover);
  color: var(--text-strong);
}
.nd-btn--danger {
  background: var(--surface);
  border-color: var(--danger-line);
  color: var(--danger-text);
}
.nd-btn--danger:hover {
  background: var(--danger-hover);
}
.nd-btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.nd-btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
}
/* Anmeldeknopf: nur auf der Anmeldeseite */
.nd-btn--cta {
  width: 100%;
  padding: 12px var(--space-4);
  border-radius: var(--radius-xl);
  border: 0;
  font-weight: 700;
  color: #fff;
  background-image: linear-gradient(to right, var(--cta-from), var(--cta-to));
  box-shadow: var(--shadow-cta);
}
.nd-btn--cta:hover {
  background-image: linear-gradient(to right, var(--cta-hover-from), var(--cta-hover-to));
  box-shadow: var(--shadow-cta-hover);
}
.nd-btn--cta:active {
  transform: scale(0.98);
}
.nd-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-control);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}
.nd-icon-btn:hover {
  border-color: var(--line-control-hover);
  background: var(--surface-hover);
  color: var(--text-strong);
}
.nd-icon-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Felder ────────────────────────────────────────────────── */
.nd-field {
  display: block;
}
.nd-label {
  display: block;
  margin-bottom: var(--space-1_5);
  font-weight: 500;
  color: var(--text-body);
}
.nd-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-control);
  background: var(--surface-inset);
  color: var(--text-strong);
  font: 400 14px/20px var(--font-sans);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition:
    border-color 150ms,
    box-shadow 150ms;
}
.nd-input::placeholder {
  color: var(--zinc-400);
}
.nd-input:hover {
  border-color: var(--line-control-hover);
}
.nd-input:focus {
  border-color: var(--active-line);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--focus) 15%, transparent);
}
textarea.nd-input {
  min-height: 76px;
  resize: vertical;
}
.nd-hint {
  display: block;
  margin-top: var(--space-1_5);
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-error-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--danger-text);
}
@media (max-width: 639px) {
  .nd-input {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ── Karten und Panels ─────────────────────────────────────── */
.nd-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.nd-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nd-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line-soft);
}
.nd-panel-title {
  font: 600 16px/24px var(--font-sans);
  color: var(--text-strong);
}
.nd-panel-note {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
  text-wrap: pretty;
}
.nd-panel-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}
.nd-panel-link:hover {
  color: var(--link-hover);
}
.nd-panel-body {
  padding: var(--space-5);
}

/* ── Kennzahl-Kachel ───────────────────────────────────────── */
.nd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
}
.nd-stat {
  display: block;
  padding: var(--space-4);
  text-decoration: none;
  transition:
    border-color 150ms,
    box-shadow 150ms,
    transform 150ms;
}
a.nd-stat:hover {
  transform: translateY(-2px);
  border-color: var(--active-line);
  box-shadow: var(--shadow-md);
}
.nd-stat-value {
  font: 600 26.4px/32px var(--font-sans);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}
.nd-stat-label {
  margin-top: 4px;
  font: 500 11px/16px var(--font-sans);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Seitenkopf, Abschnitt, Pfad ───────────────────────────── */
.nd-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-8);
}
.nd-page-title {
  font: 600 24px/32px var(--font-sans);
  letter-spacing: -0.011em;
  color: var(--text-strong);
}
@media (min-width: 640px) {
  .nd-page-title {
    font-size: 28px;
    line-height: 36px;
  }
}
.nd-page-subtitle {
  margin-top: var(--space-1_5);
  color: var(--text-muted);
}
.nd-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
}
.nd-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 600 14px/20px var(--font-sans);
  color: var(--text-strong);
}
.nd-section-hint {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-count {
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--badge-neutral-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--badge-neutral-ring);
}
.nd-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: var(--space-4);
}
.nd-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nd-breadcrumbs a:hover {
  color: var(--text-strong);
}
.nd-breadcrumbs .nd-sep {
  color: var(--zinc-300);
}
[data-theme='dunkel'] .nd-breadcrumbs .nd-sep {
  color: var(--zinc-700);
}
.nd-breadcrumbs [aria-current] {
  font-weight: 500;
  color: var(--text-strong);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.nd-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.nd-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: -1px;
  padding: 10px var(--space-3_5);
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.nd-tab:hover {
  border-bottom-color: var(--line-control);
  background: var(--surface-hover);
  color: var(--text-strong);
}
.nd-tab[aria-current='page'] {
  border-bottom-color: var(--tab-line);
  font-weight: 500;
  color: var(--text-strong);
  background: transparent;
}
.nd-tab-count {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--badge-neutral-bg);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.nd-tab[aria-current='page'] .nd-tab-count {
  background: var(--active-bg);
  color: var(--active-text);
}

/* ── Plaketten und Chips ───────────────────────────────────── */
.nd-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1_5);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font: 500 12px/16px var(--font-sans);
  white-space: nowrap;
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  box-shadow: inset 0 0 0 1px var(--badge-neutral-ring);
}
.nd-badge--blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  box-shadow: inset 0 0 0 1px var(--badge-blue-ring);
}
.nd-badge--green {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  box-shadow: inset 0 0 0 1px var(--badge-green-ring);
}
.nd-badge--amber {
  background: var(--badge-amber-bg);
  color: var(--badge-amber-text);
  box-shadow: inset 0 0 0 1px var(--badge-amber-ring);
}
.nd-badge--red {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
  box-shadow: inset 0 0 0 1px var(--badge-red-ring);
}
.nd-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.nd-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1_5);
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--line-control);
  color: var(--text-muted);
  font: 500 12px/16px var(--font-sans);
  text-decoration: none;
  transition:
    border-color 150ms,
    color 150ms;
}
.nd-chip:hover {
  border-color: var(--line-control-hover);
  color: var(--text-strong);
}
.nd-chip[aria-current='true'] {
  border-color: var(--active-border);
  background: var(--active-bg);
  color: var(--active-text);
}
.nd-chip .nd-chip-count {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Tabelle ───────────────────────────────────────────────── */
.nd-table-wrap {
  overflow-x: auto;
}
.nd-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.nd-table thead {
  background: var(--surface-subtle);
}
.nd-table th {
  padding: 12px var(--space-5);
  font: 600 11px/16px var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.nd-table td {
  padding: 10px var(--space-5);
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-body);
  vertical-align: middle;
}
.nd-table tbody tr {
  transition: background-color 120ms;
}
.nd-table tbody tr:hover {
  background: color-mix(in oklab, var(--blue-50) 55%, transparent);
}
[data-theme='dunkel'] .nd-table tbody tr:hover {
  background: color-mix(in oklab, var(--zinc-800) 50%, transparent);
}
.nd-table tbody tr:last-child td {
  border-bottom: 0;
}
.nd-table .nd-strong {
  font-weight: 500;
  color: var(--text-strong);
}
.nd-table .nd-sub {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-faint);
}
.nd-table .nd-overdue {
  color: var(--danger-text);
}
.nd-table .nd-empty-cell {
  color: var(--zinc-300);
}
[data-theme='dunkel'] .nd-table .nd-empty-cell {
  color: var(--zinc-600);
}
.nd-glyph {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--badge-neutral-bg);
  color: var(--text-muted);
}

/* ── Listen ────────────────────────────────────────────────── */
.nd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nd-list > li + li {
  border-top: 1px solid var(--line-soft);
}
.nd-list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3_5) var(--space-5);
  color: inherit;
  text-decoration: none;
  transition: background-color 150ms;
}
a.nd-list-row:hover {
  background: var(--surface-hover);
}
.nd-list-main {
  min-width: 0;
  flex: 1;
}
.nd-list-title {
  font-weight: 500;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nd-list-meta {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nd-list-end {
  flex-shrink: 0;
  text-align: right;
}
.nd-list-date {
  margin-top: 4px;
  font-size: 11px;
  line-height: 16px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.nd-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-4) var(--space-6);
  margin: 0;
}
.nd-details dt {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-details dd {
  margin: 2px 0 0;
  font-weight: 500;
  color: var(--text-strong);
}
.nd-details dd.nd-none {
  color: var(--text-faint);
  font-weight: 400;
}

/* ── Balken ────────────────────────────────────────────────── */
.nd-meter {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--track);
  overflow: hidden;
}
.nd-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--load-ok);
}
.nd-meter[data-level='warn'] > span {
  background: var(--load-warn);
}
.nd-meter[data-level='crit'] > span {
  background: var(--load-crit);
}
.nd-load {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: var(--space-3);
}
.nd-load-label {
  text-align: right;
  font-size: 12px;
  line-height: 14px;
  color: var(--text-body);
}
.nd-load-label small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}
.nd-load .nd-meter {
  height: 16px;
  border-radius: 3px;
}
.nd-score {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.nd-score-value {
  font: 600 36px/40px var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--load-warn);
  font-variant-numeric: tabular-nums;
}

/* ── Leerzustand und Meldung ───────────────────────────────── */
.nd-empty {
  padding: var(--space-14) var(--space-6);
  text-align: center;
  border: 1px dashed var(--line-control);
  border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}
.nd-empty-title {
  font-weight: 500;
  color: var(--text-body);
}
.nd-empty-hint {
  max-width: 65ch;
  margin: var(--space-1_5) auto 0;
  color: var(--text-muted);
  text-wrap: pretty;
}
.nd-empty-action {
  margin-top: var(--space-5);
  display: flex;
  justify-content: center;
}
.nd-empty--inline {
  padding: var(--space-4);
  text-align: left;
  border-style: solid;
  border-color: var(--line);
}
.nd-alert {
  padding: 12px var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--alert-err-line);
  background: var(--alert-err-bg);
  color: var(--alert-err-text);
  font-weight: 500;
}

/* ── Kopfzeile und Seitenleiste ────────────────────────────── */
.nd-shell {
  display: flex;
  min-height: 100%;
}
.nd-sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--glass-sidebar);
  backdrop-filter: blur(24px);
}
.nd-sidebar-brand {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--line);
}
.nd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-strong);
  text-decoration: none;
  font: 700 18px/28px var(--font-sans);
  letter-spacing: -0.025em;
}
.nd-brand img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.35));
}
.nd-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-3);
}
.nd-nav-group {
  margin: 0 0 var(--space-1_5);
  padding: 0 var(--space-3);
  font: 600 11px/16px var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--zinc-400);
}
[data-theme='dunkel'] .nd-nav-group {
  color: var(--zinc-500);
}
.nd-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nd-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-decoration: none;
  transition:
    background-color 150ms,
    color 150ms;
}
.nd-nav-link:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
}
.nd-nav-link[aria-current='page'] {
  border-left-color: var(--active-line);
  background: var(--active-bg);
  color: var(--active-text);
  font-weight: 500;
}
.nd-nav-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.nd-nav-count {
  margin-left: auto;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--count-bg);
  color: var(--count-text);
  font: 600 11px/16px var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.nd-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.nd-sidebar-user:hover {
  background: var(--surface-hover);
}
.nd-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background-image: linear-gradient(to bottom right, var(--blue-500), var(--blue-700));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(65, 82, 221, 0.25);
}
.nd-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.nd-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: var(--header-height);
  padding: 0 var(--space-6);
  border-bottom: 1px solid var(--line);
  background: var(--glass-header);
  backdrop-filter: blur(24px);
}
.nd-header-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.nd-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 32px;
  padding: 0 6px 0 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-control);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
}
.nd-search kbd {
  padding: 0 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-control);
  font: 400 10px/16px var(--font-sans);
  color: var(--text-faint);
}
.nd-bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--bell-dot);
  color: #fff;
  font: 600 10px/16px var(--font-sans);
  text-align: center;
}
.nd-main {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}
@media (max-width: 1023px) {
  .nd-sidebar {
    display: none;
  }
}
@media (max-width: 639px) {
  .nd-header {
    padding: 0 var(--space-4);
  }
  .nd-main {
    padding: var(--space-6) var(--space-4);
  }
  .nd-search span {
    display: none;
  }
}

/* ── Dialog ────────────────────────────────────────────────── */
.nd-dialog {
  width: min(var(--dialog-width), calc(100vw - 2rem));
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow-lg);
}
.nd-dialog-head {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
}
.nd-dialog-title {
  font: 600 16px/24px var(--font-sans);
}
.nd-dialog-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}
.nd-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}
.nd-backdrop {
  background: rgba(11, 15, 22, 0.5);
  backdrop-filter: blur(4px);
}

/* ── Anmeldung ─────────────────────────────────────────────── */
.nd-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-8) var(--space-4);
  background: var(--bg);
}
.nd-login::before,
.nd-login::after {
  content: '';
  position: absolute;
  width: 50vw;
  height: 50vw;
  min-width: 320px;
  min-height: 320px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.nd-login::before {
  top: -20%;
  left: -10%;
  background: var(--orb-cyan);
}
.nd-login::after {
  right: -10%;
  bottom: -20%;
  background: var(--orb-blue);
}
.nd-login-col {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--login-width);
}
.nd-login-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: 40px;
}
.nd-login-mark img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.5));
}
.nd-login-mark span {
  font: 800 36px/40px var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-strong);
}
.nd-login-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--line);
  background: var(--glass-card);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-login);
}
.nd-login-card .nd-input {
  padding: 12px var(--space-4);
  border-radius: var(--radius-xl);
}
.nd-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.nd-divider::before,
.nd-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line-control);
}

/* ── Netzplan und Schrank ──────────────────────────────────── */
.nd-canvas {
  position: relative;
  background: var(--surface-subtle);
  background-image: radial-gradient(
    color-mix(in oklab, var(--zinc-400) 35%, transparent) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}
.nd-node {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: 112px;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-control);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
}
[data-theme='dunkel'] .nd-node {
  box-shadow: var(--shadow-lg);
}
.nd-node svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nd-node b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 12px/16px var(--font-sans);
  color: var(--text-strong);
}
.nd-node small {
  display: block;
  font-size: 10px;
  line-height: 14px;
  color: var(--text-muted);
}
.nd-node--firewall,
.nd-node--router {
  border-color: color-mix(in oklab, var(--role-switch) 70%, transparent);
  color: var(--link);
}
.nd-node--switch {
  border-color: var(--active-border);
  color: var(--active-text);
}
.nd-node.is-selected {
  box-shadow:
    0 0 0 2px var(--blue-500),
    var(--shadow-md);
}
.nd-rack {
  padding: 10px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.nd-rack-inner {
  display: grid;
  gap: 4px;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}
.nd-unit {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: var(--space-2);
}
.nd-unit-no {
  font: 400 10px/16px var(--font-mono);
  color: var(--text-faint);
  text-align: right;
}
.nd-unit-dev {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 26px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rc, var(--zinc-400));
  background: var(--rb, var(--surface));
  color: var(--text-strong);
  font: 600 12px/16px var(--font-sans);
}
.nd-unit-dev .nd-unit-ports {
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  font-size: 10px;
  color: var(--text-body);
}
.nd-unit-free {
  height: 26px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
}
.nd-unit-dev[data-role='switch'] {
  --rc: var(--role-switch);
  --rb: var(--role-switch-bg);
}
.nd-unit-dev[data-role='router'] {
  --rc: var(--role-router);
  --rb: var(--role-router-bg);
}
.nd-unit-dev[data-role='firewall'] {
  --rc: var(--role-firewall);
  --rb: var(--role-firewall-bg);
}
.nd-unit-dev[data-role='server'] {
  --rc: var(--role-server);
  --rb: var(--role-server-bg);
}
.nd-unit-dev[data-role='ap'] {
  --rc: var(--role-ap);
  --rb: var(--role-ap-bg);
}
.nd-unit-dev[data-role='storage'] {
  --rc: var(--role-storage);
  --rb: var(--role-storage-bg);
}
.nd-unit-dev[data-role='patch'] {
  --rc: var(--role-patch);
  --rb: var(--role-patch-bg);
}
.nd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-4);
  font-size: 12px;
  color: var(--text-muted);
}
.nd-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1_5);
}
.nd-legend i {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--c);
}

/* ── Umschalter Hell/Dunkel ────────────────────────────────── */
.nd-theme-toggle .nd-moon {
  display: none;
}
[data-theme='dunkel'] .nd-theme-toggle .nd-moon {
  display: block;
}
[data-theme='dunkel'] .nd-theme-toggle .nd-sun {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nd-body *,
  .nd-preview * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Menüs, Suche, Schubfach ───────────────────────────────── */
.nd-menu {
  width: 16rem;
  overflow: hidden;
  padding: var(--space-1_5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-control);
  background: var(--menu-bg);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
}
.nd-menu-head {
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}
.nd-menu-head b {
  display: block;
  font-weight: 600;
  color: var(--text-strong);
}
.nd-menu-head small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-menu-item {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: none;
}
.nd-menu-item small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--text-muted);
}
.nd-menu-item:hover {
  background: var(--surface-hover);
}
.nd-menu-item[aria-current='page'] {
  background: var(--active-bg);
  color: var(--active-text);
}
.nd-menu-item--danger:hover {
  background: var(--danger-hover);
  color: var(--danger-text);
}
.nd-menu-sep {
  margin: var(--space-1) 0;
  border-top: 1px solid var(--line-soft);
}
.nd-menu-group {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font: 600 11px/16px var(--font-sans);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nd-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--timeline-dot);
}
.nd-dot--red {
  background: var(--load-crit);
}
.nd-dot--amber {
  background: var(--load-warn);
}
.nd-palette {
  width: min(38rem, calc(100vw - 2rem));
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-control);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.nd-palette-input {
  padding: var(--space-3);
}
.nd-palette-group {
  padding: var(--space-3) var(--space-4) 4px;
  font: 500 12px/16px var(--font-sans);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.nd-palette-hit {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-4);
  border-left: 2px solid transparent;
  color: var(--text-strong);
  text-decoration: none;
}
.nd-palette-hit b {
  font-weight: 500;
}
.nd-palette-hit small {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-palette-hit[aria-selected='true'] {
  border-left-color: var(--blue-500);
  background: var(--active-bg);
}
.nd-drawer {
  position: relative;
}
.nd-drawer-scrim {
  background: var(--drawer-scrim);
  backdrop-filter: blur(4px);
}
.nd-drawer-panel {
  padding: var(--space-2) var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* ── Monogramm, Tags, Verlauf, Kontakt, Seiten ─────────────── */
.nd-mono-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  font: 600 14px/1 var(--font-sans);
  background: var(--tint-blue-bg);
  color: var(--tint-blue-text);
}
.nd-mono-badge--sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  font-size: 12px;
}
.nd-mono-badge--lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  font-size: 16px;
}
.nd-mono-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.nd-mono-badge.has-logo {
  border: 1px solid var(--line-control);
  background: var(--surface-inset);
}
[data-tint='blue'] {
  --tb: var(--tint-blue-bg);
  --tt: var(--tint-blue-text);
}
[data-tint='emerald'] {
  --tb: var(--tint-emerald-bg);
  --tt: var(--tint-emerald-text);
}
[data-tint='amber'] {
  --tb: var(--tint-amber-bg);
  --tt: var(--tint-amber-text);
}
[data-tint='violet'] {
  --tb: var(--tint-violet-bg);
  --tt: var(--tint-violet-text);
}
[data-tint='rose'] {
  --tb: var(--tint-rose-bg);
  --tt: var(--tint-rose-text);
}
[data-tint='teal'] {
  --tb: var(--tint-teal-bg);
  --tt: var(--tint-teal-text);
}
[data-tint='cyan'] {
  --tb: var(--tint-cyan-bg);
  --tt: var(--tint-cyan-text);
}
.nd-mono-badge[data-tint] {
  background: var(--tb);
  color: var(--tt);
}
.nd-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font: 500 12px/16px var(--font-sans);
  color: #fff;
  background: var(--tag, var(--zinc-500));
  box-shadow: var(--shadow-xs);
}
.nd-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.nd-timeline li {
  position: relative;
  padding-left: var(--space-5);
}
.nd-timeline li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -4.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--timeline-dot);
  box-shadow: 0 0 0 4px var(--surface);
}
.nd-timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
}
.nd-timeline-head b {
  font-weight: 600;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.nd-timeline-head span {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-timeline p {
  margin-top: 4px;
  color: var(--text-body);
  white-space: pre-wrap;
}
.nd-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.nd-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}
.nd-contact-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.nd-contact-top b {
  display: block;
  font-weight: 600;
  color: var(--text-strong);
}
.nd-contact-top small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.nd-contact dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.nd-contact dl div {
  display: flex;
  gap: var(--space-2);
}
.nd-contact dt {
  width: 56px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.nd-contact dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nd-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.nd-pager p {
  color: var(--text-muted);
}

/* ── neofee: Werkzeug-Kachel, Dienst-Kopf, Anmelde-Hinweis ─── */
.nd-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.nd-tool {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 150ms,
    box-shadow 150ms,
    transform 150ms;
}
.nd-tool:hover,
.nd-tool:focus-visible {
  transform: translateY(-2px);
  border-color: var(--active-line);
  box-shadow: var(--shadow-md);
}
.nd-tool-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nd-tool-name {
  font: 600 16px/24px var(--font-sans);
  color: var(--text-strong);
}
.nd-tool-desc {
  color: var(--text-muted);
  text-wrap: pretty;
}
.nd-tool-host {
  margin-top: var(--space-2);
  font: 400 12px/16px var(--font-mono);
  color: var(--text-muted);
}
.nd-service-home {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}
.nd-service-home:hover {
  color: var(--text-strong);
}
.nd-service-home img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.35));
}
.nd-service-sep {
  color: var(--zinc-300);
}
[data-theme='dunkel'] .nd-service-sep {
  color: var(--zinc-700);
}
.nd-service-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 16px/24px var(--font-sans);
  letter-spacing: -0.011em;
  color: var(--text-strong);
  white-space: nowrap;
}
.nd-notice {
  text-align: center;
}
.nd-notice .nd-mono-badge {
  margin: 0 auto;
}
.nd-notice h1 {
  font: 600 20px/28px var(--font-sans);
  color: var(--text-strong);
}
.nd-notice p {
  color: var(--text-muted);
  text-wrap: pretty;
}
