/* ==========================================================================
   Adminbereich – dunkles Design
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2-variations");
  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;
}

:root {
  color-scheme: dark;

  --bg: #0b111b;
  --surface: #121a27;
  --surface-2: #182233;
  --surface-3: #1f2b40;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #e9edf5;
  --text-2: #aab4c5;
  --muted: #7d889b;

  --accent: #34d399;
  --accent-strong: #5fe0b1;
  --accent-ink: #04261b;
  --accent-soft: rgba(52, 211, 153, 0.12);

  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --info: #6ea8fe;
  --info-soft: rgba(110, 168, 254, 0.13);

  /* Diagrammfarben (gegen --surface geprüft) */
  --series-1: #3987e5;
  --series-2: #d95926;
  --grid: #1f2a3c;
  --axis: #2e3c53;
  --delta-up: #0ca30c;
  --delta-down: #e66767;

  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 252px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.05rem;
}

h3 {
  font-size: 0.95rem;
}

p {
  margin: 0 0 0.9em;
}

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

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

img,
svg {
  display: block;
  max-width: 100%;
}

.icon {
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: rgba(52, 211, 153, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.text-2 {
  color: var(--text-2);
}

.nowrap {
  white-space: nowrap;
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ==========================================================================
   Grundlayout
   ========================================================================== */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  background: #0d1420;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 20px;
  color: var(--text);
}

.sidebar__brand:hover {
  color: var(--text);
  text-decoration: none;
}

.sidebar__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.9rem;
}

.sidebar__name {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.sidebar__name strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__name span {
  font-size: 0.72rem;
  color: var(--muted);
}

.sidebar__label {
  margin: 14px 10px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9rem;
}

.side-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.side-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.side-nav__badge {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.sidebar__foot {
  margin-top: auto;
  padding-top: 16px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.user-card__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  font-weight: 700;
  font-size: 0.78rem;
}

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

.user-card__text strong {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card__text span {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  min-width: 0;
  padding: 26px clamp(16px, 3vw, 36px) 56px;
}

.main__inner {
  max-width: 1320px;
  margin-inline: auto;
}

.mobile-bar {
  display: none;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: none;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55);
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -26px calc(-1 * clamp(16px, 3vw, 36px)) 20px;
    padding: 10px 16px;
    background: rgba(11, 17, 27, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
  }
}

/* ==========================================================================
   Seitenkopf, Karten, Raster
   ========================================================================== */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 22px;
}

.page-head p {
  margin: 4px 0 0;
  color: var(--text-2);
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card + .card {
  margin-top: 18px;
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card__head p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.card__body {
  padding: 20px;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.cols > .card + .card {
  margin-top: 0;
}

.cols--wide {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.cols--form {
  grid-template-columns: minmax(0, 1fr) 340px;
}

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

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.stack > .card + .card {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .cols,
  .cols--wide,
  .cols--3,
  .cols--form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.section-gap {
  margin-top: 18px;
}

/* ==========================================================================
   Schaltflächen
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.btn:hover {
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

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

.btn-danger {
  background: transparent;
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .card__foot .btn,
  .form-actions .btn {
    white-space: normal;
  }
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

/* ==========================================================================
   Formulare
   ========================================================================== */

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.field__hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.field__error {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0e1521;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.12s, box-shadow 0.12s;
}

textarea.input {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

textarea.input--tall {
  min-height: 300px;
}

textarea.input--mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.84rem;
}

select.input {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237d889b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.input::placeholder {
  color: #5b6679;
}

.input:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.input.is-invalid {
  border-color: var(--danger);
}

.input[type="file"] {
  padding: 7px;
  color: var(--text-2);
}

.input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

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

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

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-all {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid,
  .form-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2 {
    grid-column: auto;
  }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.check small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.filters .field {
  flex: 0 1 190px;
}

.filters .field--grow {
  flex: 1 1 240px;
}

/* ==========================================================================
   Hinweise, Badges, Tabs
   ========================================================================== */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #b9f3dc;
  font-weight: 600;
}

.flash--error {
  border-color: rgba(248, 113, 113, 0.4);
  background: var(--danger-soft);
  color: #fecaca;
}

.flash--warn {
  border-color: rgba(251, 191, 36, 0.4);
  background: var(--warning-soft);
  color: #fde68a;
}

.flash p {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--plain::before {
  display: none;
}

.badge--green {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge--blue {
  background: var(--info-soft);
  color: var(--info);
}

.badge--amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--red {
  background: var(--danger-soft);
  color: var(--danger);
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}

.tabs a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.tabs a.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.tabs__count {
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
}

.tabs a.is-active .tabs__count {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ==========================================================================
   Tabellen
   ========================================================================== */

.table-wrap {
  /* relativ, damit unsichtbare Hilfstexte (.sr-only) in der Tabelle mit abgeschnitten werden */
  position: relative;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

.table th:first-child,
.table td:first-child {
  padding-left: 20px;
}

.table th:last-child,
.table td:last-child {
  padding-right: 20px;
}

.table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

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

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.table .num {
  text-align: right;
}

.table__title {
  display: block;
  font-weight: 600;
  color: var(--text);
}

a.table__title:hover {
  color: var(--accent-strong);
}

.table__sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.table__actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.thumb {
  width: 60px;
  height: 44px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-3);
}

.thumb--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.unread td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.unread .table__title {
  font-weight: 800;
}

.star {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.star:hover {
  background: var(--surface-3);
  color: var(--warning);
}

.star.is-on {
  color: var(--warning);
}

.star.is-on svg {
  fill: currentColor;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.84rem;
}

.pagination a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.pagination .is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pagination .is-gap {
  border-color: transparent;
}

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-2);
}

.empty .icon {
  margin: 0 auto 12px;
  color: var(--muted);
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1rem;
}

/* ==========================================================================
   Kennzahlen & Diagramme
   ========================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  min-width: 0;
}

a.stat:hover {
  border-color: var(--border-strong);
  color: inherit;
  text-decoration: none;
}

.stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}

.stat__label .icon {
  color: var(--muted);
}

.stat__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.stat__value {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.stat__meta {
  display: block;
  min-height: 20px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
  font-weight: 700;
  color: var(--text-2);
  vertical-align: bottom;
}

.delta--up {
  color: var(--delta-up);
}

.delta--down {
  color: var(--delta-down);
}

.spark {
  flex: none;
  width: 92px;
  height: 32px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--delta-up);
  box-shadow: 0 0 0 3px rgba(12, 163, 12, 0.22);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.segmented a {
  padding: 6px 13px;
  border-radius: 7px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}

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

.segmented a.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-2);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend__key {
  width: 16px;
  height: 0;
  border-top: 2px solid var(--series-1);
  border-radius: 2px;
}

.legend__key--2 {
  border-top-color: var(--series-2);
}

.chart {
  position: relative;
  min-height: 260px;
}

.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.chart__tip {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  min-width: 150px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #0a1019;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  pointer-events: none;
}

.chart__tip-title {
  margin-bottom: 5px;
  color: var(--text-2);
  font-weight: 600;
}

.chart__tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.chart__tip-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.chart__tip-row span:last-child {
  color: var(--text-2);
}

.chart-table {
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.chart-table > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 2px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.chart-table > summary::-webkit-details-marker {
  display: none;
}

.chart-table > summary:hover {
  color: var(--text);
}

.chart-table[open] > summary {
  margin-bottom: 8px;
}

.chart-table .table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.chart-table .table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
}

/* Rangliste mit Balken */

.bar-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  padding: 8px 8px;
  border-radius: 8px;
}

.bar-list li:hover {
  background: rgba(255, 255, 255, 0.03);
}

.bar-list__label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text);
}

a.bar-list__label:hover {
  color: var(--accent-strong);
}

.bar-list__value {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.bar-list__value small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.bar-list__track {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 0 4px 4px 0;
  background: rgba(57, 135, 229, 0.14);
}

.bar-list__bar {
  height: 100%;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--series-1);
}

/* ==========================================================================
   Dashboard-Bausteine
   ========================================================================== */

.todo {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}

.todo a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.todo .icon:first-child {
  color: var(--warning);
}

.todo .icon:last-child {
  margin-left: auto;
  color: var(--muted);
}

.feed {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed li + li {
  border-top: 1px solid var(--border);
}

.feed a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: inherit;
}

.feed a:hover {
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.feed__main {
  flex: 1;
  min-width: 0;
}

.feed__main strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed__main span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed__time {
  flex: none;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ==========================================================================
   Produktformular
   ========================================================================== */

.row-editor {
  display: grid;
  gap: 8px;
}

.row-editor__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.4fr) 34px;
  gap: 8px;
  align-items: center;
}

.row-editor__row--3 {
  grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1.6fr) 34px;
}

.row-editor__row--4 {
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 110px 34px;
}

.row-editor__row--1 {
  grid-template-columns: 28px minmax(0, 1fr) 34px;
}

.row-editor__row.is-dragging {
  opacity: 0.4;
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: grab;
}

.drag-handle:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .row-editor__row,
  .row-editor__row--3,
  .row-editor__row--4 {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
  }

  .row-editor__row > .input:nth-of-type(n + 2) {
    grid-column: 2;
  }
}

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

.image-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  cursor: grab;
}

.image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.image-tile.is-dragging {
  opacity: 0.35;
}

.image-tile__cover {
  position: absolute;
  left: 6px;
  top: 6px;
  display: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 800;
}

.image-tile:first-child .image-tile__cover {
  display: block;
}

.image-tile__remove {
  position: absolute;
  right: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(10, 16, 25, 0.82);
  color: #fff;
  cursor: pointer;
}

.image-tile__remove:hover {
  background: var(--danger);
}

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

.image-tile:has(input:checked) img {
  opacity: 0.25;
  filter: grayscale(1);
}

.image-tile:has(input:checked)::after {
  content: "wird gelöscht";
  position: absolute;
  inset: auto 0 0 0;
  padding: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.image-tile:has(input:checked) .image-tile__remove {
  background: var(--danger);
}

.image-tile--new {
  cursor: default;
  border-style: dashed;
  border-color: rgba(52, 211, 153, 0.5);
}

.image-tile--new::after {
  content: "neu";
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--info);
  color: #06162e;
  font-size: 0.68rem;
  font-weight: 800;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 22px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--text-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone strong {
  color: var(--text);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone small {
  color: var(--muted);
}

.price-preview {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.84rem;
  color: var(--text-2);
}

.price-preview strong {
  color: var(--text);
}

.sticky-side {
  position: sticky;
  top: 18px;
}

@media (max-width: 1100px) {
  .sticky-side {
    position: static;
  }
}

.meta-list {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
}

.meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  color: var(--text-2);
  text-align: right;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Anfragen
   ========================================================================== */

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.message-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.item-card + .item-card {
  margin-top: 8px;
}

.item-card img {
  flex: none;
  width: 76px;
  height: 56px;
  border-radius: 7px;
  object-fit: cover;
}

.item-card__main {
  flex: 1;
  min-width: 0;
}

.item-card__main strong {
  display: block;
}

.item-card__main span {
  font-size: 0.8rem;
  color: var(--muted);
}

.thread {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thread__item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--series-1);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.thread__item--note {
  border-left-color: var(--warning);
}

.thread__item--error {
  border-left-color: var(--danger);
}

.thread__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.thread__head strong {
  color: var(--text);
}

.thread__subject {
  margin-bottom: 6px;
  font-weight: 700;
}

.thread__body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-2);
}

.thread__error {
  margin-top: 8px;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.status-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-switch .btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* ==========================================================================
   Anmeldung
   ========================================================================== */

.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(900px 480px at 50% -10%, rgba(52, 211, 153, 0.13), transparent 62%), var(--bg);
}

.auth__card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.auth__card h1 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.auth__card form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth__foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.82rem;
}

.swatch-input {
  display: flex;
  gap: 8px;
}

.swatch-input__color {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0e1521;
  cursor: pointer;
}

.logo-preview {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
}

.logo-preview img {
  max-height: 48px;
  width: auto;
}

.hero-preview {
  max-width: 320px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82em;
}

/* ==========================================================================
   PDF-Katalog
   ========================================================================== */

.design-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1280px) {
  .design-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.design-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}

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

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

.design-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.design-card:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.design-card__preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 14px 0;
  background: #0e1521;
}

.design-card__preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
  object-fit: cover;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.design-card__body {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}

.design-card__body strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.design-card:has(input:checked) .design-card__body strong::after {
  content: "Ausgewählt";
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 800;
}

.design-card__body span {
  font-size: 0.82rem;
  color: var(--text-2);
}

.design-card__body small {
  font-size: 0.74rem;
  color: var(--muted);
}

.choice-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0e1521;
}

.choice-tabs label {
  flex: 1 1 auto;
  cursor: pointer;
}

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

.choice-tabs span {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.86rem;
  text-align: center;
}

.choice-tabs span small {
  color: var(--muted);
  font-weight: 600;
}

.choice-tabs label:hover span {
  color: var(--text);
}

.choice-tabs input:checked + span {
  background: var(--surface-3);
  color: var(--text);
}

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

.tree {
  display: grid;
  gap: 12px;
}

.tree__group {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  min-width: 0;
}

.tree__section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.tree__section input,
.pick input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.tree__section small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.tree__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 16px;
  margin-top: 10px;
  padding-left: 28px;
}

.tree__items .check {
  font-size: 0.86rem;
}

.picker-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pick-list {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.pick-list__group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 12px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.pick:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pick:has(input:checked) {
  background: var(--accent-soft);
}

.pick img,
.pick__ph {
  flex: none;
  width: 54px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-3);
}

.pick__ph {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.pick__main {
  flex: 1;
  min-width: 0;
}

.pick__main strong {
  display: block;
  overflow: hidden;
  font-size: 0.86rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pick__main small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pick__price {
  flex: none;
  color: var(--text-2);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pick__price {
    display: none;
  }
}

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

@media (max-width: 760px) {
  .layout-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

.layout-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
}

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

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

.layout-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.layout-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.layout-option__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-2);
}

.layout-option:has(input:checked) .layout-option__icon {
  background: var(--accent);
  color: var(--accent-ink);
}

.layout-option strong {
  display: block;
  font-size: 0.9rem;
}

.layout-option small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.catalog-summary dd {
  color: var(--text);
  font-weight: 600;
}

.catalog-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.45;
}

.catalog-status.is-error {
  background: var(--danger-soft);
  color: #fecaca;
}

.catalog-status.is-ok {
  background: var(--accent-soft);
  color: #b9f3dc;
}

.spinner {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.datasheet-form {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
}

.datasheet-form .input {
  width: auto;
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
  font-size: 0.82rem;
  background-position: right 9px center;
}

.datasheet-form .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }

  .spinner {
    animation-duration: 2.4s;
  }
}

/* ==========================================================================
   Einrichtungsassistent (/install.php)
   ========================================================================== */

.install {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 18px 64px;
}

.install .card + .card {
  margin-top: 0;
}

.install__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install__head strong {
  display: block;
  font-size: 1rem;
}

.install__head span {
  font-size: 0.8rem;
  color: var(--muted);
}

.install__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
}

.install__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  list-style: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.install__steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.install__steps .is-current {
  color: var(--text);
}

.install__steps .is-done {
  color: var(--accent-strong);
}

.install__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 0.74rem;
  font-weight: 800;
}

.install__steps .is-current .install__num {
  background: var(--accent);
  color: var(--accent-ink);
}

.install__steps .is-done .install__num {
  background: var(--accent-soft);
}

.install__intro h1,
.install__done h1 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.install__intro p {
  margin: 0;
}

.install__key {
  max-width: 280px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.syscheck {
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.syscheck__item {
  display: grid;
  grid-template-columns: 26px 170px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 20px;
  font-size: 0.88rem;
}

.syscheck__item + .syscheck__item {
  border-top: 1px solid var(--border);
}

.syscheck__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.syscheck__label {
  font-weight: 600;
}

.syscheck__detail {
  color: var(--text-2);
}

.syscheck__item--ok .syscheck__icon {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.syscheck__item--warn .syscheck__icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.syscheck__item--error .syscheck__icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.syscheck__item--error .syscheck__detail {
  color: #fecaca;
}

.syscheck__item--info .syscheck__icon {
  background: var(--info-soft);
  color: var(--info);
}

@media (max-width: 600px) {
  .syscheck__item {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .syscheck__detail {
    grid-column: 2;
  }
}

.install__optional > summary {
  list-style: none;
  cursor: pointer;
  border-bottom: 0;
}

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

.install__optional[open] > summary {
  border-bottom: 1px solid var(--border);
}

.install__optional[open] > summary .icon {
  transform: rotate(180deg);
}

.install__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install__submit p {
  margin: 0;
}

.install__submit .btn {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 0.95rem;
}

.install__done {
  padding: 36px 24px;
  text-align: center;
}

.install__done p {
  max-width: 560px;
  margin: 0 auto 22px;
}

.install__success {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Katalogart (Gesamt-, Container-, Forstwirtschaft-Katalog) */
.catalog-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

@media (max-width: 900px) {
  .catalog-types {
    grid-template-columns: minmax(0, 1fr);
  }
}

.catalog-type {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}

.catalog-type:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  text-decoration: none;
}

.catalog-type.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.catalog-type:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.catalog-type__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text-2);
}

.catalog-type.is-active .catalog-type__icon {
  background: var(--accent);
  color: var(--accent-ink);
}

.catalog-type__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-type__body strong {
  font-size: 0.95rem;
}

.catalog-type__body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Zusatzoptionen der Fachkataloge */
.option-rows {
  display: grid;
  gap: 10px;
}

.option-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
}

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

.option-row input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.option-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.option-row strong {
  font-size: 0.9rem;
}

.option-row small {
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.seg-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0e1521;
}

.seg-radio label {
  flex: 1 1 auto;
  cursor: pointer;
}

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

.seg-radio span {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.seg-radio label:hover span {
  color: var(--text);
}

.seg-radio input:checked + span {
  background: var(--surface-3);
  color: var(--text);
}

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

.is-inactive {
  opacity: 0.45;
  pointer-events: none;
}
