/* ==========================================================================
   Website-Manager – Oberfläche
   Ein einziges Stylesheet, keine externen Schriften oder Bibliotheken.
   ========================================================================== */

:root {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-contrast: #ffffff;

  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --orange: #d97706;
  --orange-soft: #fef3c7;
  --grey: #64748b;
  --grey-soft: #f1f5f9;
  --blue: #0284c7;
  --blue-soft: #e0f2fe;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e5eaf1;
  --border-strong: #cbd5e1;
  --text: #172033;
  --text-muted: #667085;
  --text-faint: #98a2b3;

  --sidebar-bg: #ffffff;
  --sidebar-text: #5d6b82;
  --sidebar-text-strong: #172033;
  --sidebar-active: #edf4ff;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px rgba(15, 23, 42, .07);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, .18);

  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;

  --sidebar-width: 244px;
  --topbar-height: 62px;
}

[data-theme="dark"] {
  --brand: #818cf8;
  --brand-strong: #a5b4fc;
  --brand-soft: #1e243c;
  --brand-contrast: #0b1020;

  --green: #4ade80;
  --green-soft: #14301f;
  --red: #f87171;
  --red-soft: #3a1a1a;
  --orange: #fbbf24;
  --orange-soft: #392a10;
  --grey: #94a3b8;
  --grey-soft: #1e2637;
  --blue: #38bdf8;
  --blue-soft: #0e2b3d;

  --bg: #0b1020;
  --surface: #131a2b;
  --surface-2: #161e32;
  --surface-3: #1c2540;
  --border: #263047;
  --border-strong: #35405c;
  --text: #e8ecf6;
  --text-muted: #97a3bd;
  --text-faint: #6c7896;

  --sidebar-bg: #080c18;
  --sidebar-text: #b8c2d9;
  --sidebar-text-strong: #ffffff;
  --sidebar-active: #1b2338;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

/* Standardgröße für alle Symbole.
   :where() sorgt dafür, dass jede Klassenregel weiter unten Vorrang hat. */
svg:where([aria-hidden="true"]) { width: 18px; height: 18px; flex-shrink: 0; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; }

code, pre, .mono { font-family: var(--mono); font-size: .85em; }

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

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  transition: transform .22s ease;
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 30px rgba(15, 23, 42, .025);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
  color: var(--sidebar-text-strong);
  font-weight: 680;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sidebar__logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #2563eb, #38bdf8);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: .92rem;
  flex-shrink: 0;
}

.sidebar__nav { padding: 6px 12px; flex: 1; overflow-y: auto; }

.sidebar__section {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  padding: 16px 10px 6px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 520;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: .9rem;
  font-family: inherit;
  transition: background .13s, color .13s;
}
.nav-item:hover { background: var(--sidebar-active); color: var(--sidebar-text-strong); text-decoration: none; }
.nav-item.is-active { background: var(--sidebar-active); color: var(--sidebar-text-strong); }
.nav-item.is-active .nav-item__icon { color: var(--brand); }
.nav-item__icon { width: 18px; height: 18px; flex-shrink: 0; color: #7f8aa8; }
.nav-item__badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.sidebar__footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  font-size: .74rem;
  color: var(--text-faint);
}
.sidebar__status { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar__search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.topbar__search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint); pointer-events: none;
}
.topbar__search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
}
.topbar__search input:focus { outline: 2px solid var(--brand); outline-offset: -1px; background: var(--surface); }

.topbar__spacer { flex: 1; }

.icon-button {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
  transition: background .13s, color .13s;
}
.icon-button:hover { background: var(--surface-3); color: var(--text); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button__dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--surface);
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .8rem;
  cursor: pointer;
  border: none;
}

.content { padding: 24px 26px 60px; flex: 1; }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head__text { flex: 1; min-width: 220px; }
.page-head__sub { color: var(--text-muted); font-size: .88rem; margin-top: 3px; }
.page-head__actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-weight: 560;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .13s, border-color .13s, transform .06s, box-shadow .13s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover:not(:disabled) { background: var(--brand-strong); border-color: var(--brand-strong); }

.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover:not(:disabled) { filter: brightness(.93); background: var(--red); }

.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-3); }

.btn--sm { padding: 5px 11px; font-size: .8rem; }
.btn--block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s, box-shadow .16s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card__head h2 { flex: 1; min-width: 140px; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

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

.stat {
  background: var(--surface);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  text-align: left;
  font-family: inherit;
  width: 100%;
  display: block;
  color: inherit;
}
.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.stat:hover * { text-decoration: none; }
.stat__label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-weight: 650;
  display: flex; align-items: center; gap: 6px;
}
.stat__value { font-size: 2.15rem; font-weight: 700; line-height: 1.15; margin-top: 6px; letter-spacing: -0.03em; }
.stat__hint { font-size: .78rem; color: var(--text-faint); margin-top: 2px; }
.stat__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat--green .stat__bar { background: var(--green); }
.stat--green .stat__value { color: var(--green); }
.stat--red .stat__bar { background: var(--red); }
.stat--red .stat__value { color: var(--red); }
.stat--orange .stat__bar { background: var(--orange); }
.stat--orange .stat__value { color: var(--orange); }
.stat--brand .stat__bar { background: var(--brand); }
.stat--grey .stat__bar { background: var(--grey); }

/* -------------------------------------------------------------- Meter */

.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter__fill { height: 100%; border-radius: 999px; background: var(--brand); transition: width .3s; }
.meter__fill--warn { background: var(--orange); }
.meter__fill--danger { background: var(--red); }

.metric-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.metric-row + .metric-row { margin-top: 16px; }
.metric-row__label { color: var(--text-muted); font-size: .84rem; }
.metric-row__value { font-weight: 640; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Tabelle */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
table.data th {
  text-align: left;
  padding: 10px 14px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr { cursor: pointer; transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-3); }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 620; }
.cell-muted { color: var(--text-muted); font-size: .82rem; }
.cell-num { font-variant-numeric: tabular-nums; text-align: right; }
.cell-nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ Status */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status--green { color: var(--green); background: var(--green-soft); }
.status--red { color: var(--red); background: var(--red-soft); }
.status--orange { color: var(--orange); background: var(--orange-soft); }
.status--grey { color: var(--grey); background: var(--grey-soft); }
.status--blue { color: var(--blue); background: var(--blue-soft); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill--static { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.pill--php { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill--node { background: var(--green-soft); color: var(--green); border-color: transparent; }

/* -------------------------------------------------------------- Filter */

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); }
.search-box input {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .88rem;
}
.search-box input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 570;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }

.view-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button {
  border: none; background: var(--surface); color: var(--text-muted);
  padding: 7px 11px; cursor: pointer; display: grid; place-items: center;
}
.view-toggle button.is-active { background: var(--brand); color: var(--brand-contrast); }
.view-toggle svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------- Kartenansicht */

.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}
.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.site-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.site-card__name { font-weight: 660; font-size: .98rem; }
.site-card__domain { color: var(--text-muted); font-size: .82rem; word-break: break-all; }
.site-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.site-card__actions { display: flex; gap: 7px; margin-top: 8px; }

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

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

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: .84rem; font-weight: 620; color: var(--text); }
.field__hint { font-size: .78rem; color: var(--text-muted); }
.field__error { font-size: .78rem; color: var(--red); font-weight: 560; }

input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="email"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
input:disabled, select:disabled { background: var(--surface-3); color: var(--text-muted); }

.checkbox { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .875rem; }
.checkbox input { width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--brand); }

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .14s, background .14s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone__icon { width: 34px; height: 34px; color: var(--brand); margin-bottom: 6px; }
.dropzone__title { font-weight: 620; }
.dropzone__hint { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }
.dropzone__file {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-weight: 600;
}
.dropzone__file svg { width: 20px; height: 20px; }
.dropzone__icon { width: 34px; height: 34px; }

/* --------------------------------------------------------------- Modal */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--border);
  animation: modal-in .16s ease-out;
}
.modal--wide { max-width: 1080px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.modal__head h2 { flex: 1; }
.modal__body { padding: 22px; }
.modal__foot {
  padding: 15px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap;
}

/* --------------------------------------------------------------- Toast */

.toast-stack {
  position: fixed;
  right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 40px));
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: toast-in .18s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast--success { border-left-color: var(--green); }
.toast--error { border-left-color: var(--red); }
.toast--warning { border-left-color: var(--orange); }
.toast__title { font-weight: 640; font-size: .88rem; }
.toast__text { font-size: .82rem; color: var(--text-muted); margin-top: 2px; word-break: break-word; }
.toast__close { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }

/* -------------------------------------------------------------- Sonstiges */

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty__icon { width: 42px; height: 42px; color: var(--text-faint); margin-bottom: 10px; }
.empty__title { font-weight: 640; color: var(--text); margin-bottom: 4px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 44px; color: var(--text-muted); }

.logbox {
  background: #0b1020;
  color: #d7dcea;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--border);
}

.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 9px 16px; font-size: .875rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 560; word-break: break-word; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 15px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 570;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }

.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.step:last-child { border-bottom: none; }
.step__icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.step__name { font-weight: 600; min-width: 160px; }
.step__msg { color: var(--text-muted); flex: 1; word-break: break-word; }

/* Online-Diagnose: Was ist zu tun, wenn ein Schritt fehlschlaegt */
.step__action {
  margin-top: 5px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .82rem;
  line-height: 1.45;
}
.step--fail .step__name { color: var(--red); }
.step--warn .step__name { color: var(--orange); }
.step__body { flex: 1; min-width: 0; }
.diagnose-verdict {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  margin-bottom: 14px; font-weight: 600;
}
.diagnose-verdict--online { background: var(--green-soft); color: var(--green); }
.diagnose-verdict--warn { background: var(--orange-soft); color: var(--orange); }
.diagnose-verdict--fail { background: var(--red-soft); color: var(--red); }

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .86rem;
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--info { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.alert--warn { background: var(--orange-soft); color: var(--orange); }
.alert--error { background: var(--red-soft); color: var(--red); }
.alert--success { background: var(--green-soft); color: var(--green); }
.alert__body { flex: 1; }
.alert__title { font-weight: 660; margin-bottom: 2px; }

.pagination { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 16px; font-size: .84rem; color: var(--text-muted); }

.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb button { background: none; border: none; color: var(--brand); cursor: pointer; font-family: inherit; font-size: inherit; padding: 0; }
.breadcrumb button:hover { text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }

.sparkline { display: flex; align-items: flex-end; justify-content: flex-start; gap: 3px; height: 40px; }
.sparkline__bar { flex: 1; max-width: 10px; border-radius: 2px 2px 0 0; background: var(--green); min-height: 4px; }
.sparkline__bar--bad { background: var(--red); }
.sparkline__bar--warn { background: var(--orange); }
.sparkline__bar--none { background: var(--surface-3); }

.dns-record {
  font-family: var(--mono);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .82rem;
  display: grid;
  grid-template-columns: 70px 90px 1fr;
  gap: 8px;
}

.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .86rem; }
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface-3); }
.file-row__name { flex: 1; word-break: break-all; }
.file-row svg { width: 17px; height: 17px; color: var(--text-faint); flex-shrink: 0; }

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(150deg, #131a2b 0%, #1e2949 45%, #312e81 100%);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.login-card__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card__brand .sidebar__logo { width: 42px; height: 42px; font-size: 1.05rem; }
.login-card__title { font-size: 1.2rem; font-weight: 700; }
.login-card__sub { color: var(--text-muted); font-size: .85rem; }

/* ------------------------------------------------------------- Reaktiv */

.sidebar__close { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: none; }
  .sidebar__close { display: grid; }
  .main { margin-left: 0; }
  .content { padding: 18px 14px 60px; }
  .topbar { padding: 0 14px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}

@media (min-width: 961px) {
  .menu-toggle { display: none; }
}

.scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 35;
}
@media (min-width: 961px) { .scrim { display: none; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }


/* ---------------------------------------------------- Server-Gesundheit 2.1 */
.server-health {
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--brand-soft) 42%, var(--surface)) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.server-health--healthy { border-color: color-mix(in srgb, var(--green) 25%, var(--border)); }
.server-health--warning { border-color: color-mix(in srgb, var(--orange) 34%, var(--border)); }
.server-health--critical { border-color: color-mix(in srgb, var(--red) 38%, var(--border)); }
.server-health__main { display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.health-orb {
  width:92px; height:92px; border-radius:50%; display:grid; place-content:center; text-align:center;
  background: var(--surface); border: 7px solid color-mix(in srgb, var(--green) 42%, var(--surface-3));
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
}
.server-health--warning .health-orb { border-color: color-mix(in srgb, var(--orange) 52%, var(--surface-3)); }
.server-health--critical .health-orb { border-color: color-mix(in srgb, var(--red) 52%, var(--surface-3)); }
.health-orb__score { font-size:1.65rem; line-height:1; font-weight:780; letter-spacing:-.04em; }
.health-orb__label { margin-top:4px; color:var(--text-muted); font-size:.72rem; }
.server-health__copy { flex:1; min-width:240px; }
.server-health__eyebrow { color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; font-size:.72rem; font-weight:720; }
.server-health__title { margin:7px 0; }
.server-health__summary { max-width:680px; color:var(--text-muted); }
.server-health__load { width:220px; min-width:190px; padding:14px 16px; background:var(--surface); border:1px solid var(--border); border-radius:14px; }
.server-health__load-value { font-size:1.65rem; font-weight:760; letter-spacing:-.04em; }
.server-health__load-label { color:var(--text-muted); font-size:.78rem; }
.server-health__metrics { margin-top:18px; display:grid; grid-template-columns:repeat(6,minmax(90px,1fr)); border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface); }
.server-health__metric { padding:11px 13px; display:flex; flex-direction:column; gap:2px; border-right:1px solid var(--border); }
.server-health__metric:last-child { border-right:0; }
.server-health__metric span { color:var(--text-muted); font-size:.72rem; }
.server-health__metric strong { font-size:.95rem; }
.health-issues { margin-top:14px; display:grid; gap:7px; }
.health-issue { display:flex; gap:9px; padding:9px 11px; border-radius:10px; font-size:.82rem; background:var(--surface); border:1px solid var(--border); }
.health-issue--warning { border-left:3px solid var(--orange); }
.health-issue--critical { border-left:3px solid var(--red); }
.health-ok { margin-top:14px; color:var(--green); font-weight:620; font-size:.84rem; }

/* ---------------------------------------------------- Auto-Subdomains 2.1 */
.subdomain-card { overflow:hidden; }
.subdomain-card__title { flex:1; display:flex; align-items:center; gap:12px; }
.subdomain-card__icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--brand-soft); color:var(--brand); }
.subdomain-preview { padding:13px 14px; border-radius:12px; background:var(--brand-soft); color:var(--brand-strong); font-weight:650; margin-bottom:14px; word-break:break-word; }
.mini-kv { display:grid; grid-template-columns:minmax(120px,180px) 1fr; gap:8px 16px; }
.mini-kv__label { color:var(--text-muted); }
.mini-kv__value { font-weight:560; word-break:break-word; }

/* --------------------------------------------------------- Feinpolitur 2.1 */
.login-screen { background: radial-gradient(circle at 25% 15%, #eaf2ff 0, transparent 38%), var(--bg); }
.login-card { border:1px solid var(--border); box-shadow:0 26px 70px rgba(15,23,42,.12); }
input, select, textarea { border-radius:10px; }
.modal__panel { border-radius:20px; }
.page-head h1 { font-size:1.65rem; letter-spacing:-.035em; }

@media (max-width: 900px) {
  .server-health__metrics { grid-template-columns:repeat(3,1fr); }
  .server-health__metric:nth-child(3) { border-right:0; }
  .server-health__load { width:100%; }
}
@media (max-width: 560px) {
  .server-health { padding:16px; }
  .server-health__metrics { grid-template-columns:repeat(2,1fr); }
  .server-health__metric:nth-child(odd) { border-right:1px solid var(--border); }
  .server-health__metric:nth-child(even) { border-right:0; }
  .mini-kv { grid-template-columns:1fr; gap:3px; }
  .mini-kv__value { margin-bottom:7px; }
}

/* ========================================================================
   2.2.2 – Runtime-Auswahl & Kundenprofil
   ======================================================================== */
.runtime-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.runtime-mode-card {
  appearance: none;
  width: 100%;
  min-height: 138px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.runtime-mode-card:hover { border-color: #a9b9d6; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.runtime-mode-card.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 15%, transparent); }
.runtime-mode-card__top { display:flex; align-items:center; gap:8px; font-size:.95rem; margin-bottom:8px; }
.runtime-mode-card__top svg { color: var(--brand); }
.runtime-mode-card__text { color:var(--text-muted); font-size:.8rem; line-height:1.45; min-height:52px; }
.runtime-mode-card__check { margin-top:10px; font-size:.76rem; font-weight:700; color:var(--brand); }
.runtime-detect-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

.customer-detail { display:flex; flex-direction:column; gap:18px; }
.customer-hero {
  display:flex; align-items:center; gap:16px;
  padding:20px;
  background: linear-gradient(135deg, var(--brand-soft), var(--surface));
  border:1px solid var(--border);
  border-radius:16px;
}
.customer-avatar {
  width:58px; height:58px; border-radius:15px;
  display:grid; place-items:center;
  background:var(--brand); color:#fff; font-size:1.15rem; font-weight:800; letter-spacing:.02em;
  box-shadow:0 8px 20px color-mix(in srgb, var(--brand) 22%, transparent);
  flex:0 0 auto;
}
.customer-hero__main { min-width:0; }
.customer-eyebrow { text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); font-size:.68rem; font-weight:750; }
.customer-hero__title { margin-top:2px; font-size:1.35rem; }
.customer-hero__sub { color:var(--text-muted); margin-top:2px; }
.customer-hero__badges { display:flex; gap:7px; flex-wrap:wrap; margin-top:9px; }
.customer-state,.pill-soft { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; font-size:.72rem; font-weight:700; background:var(--grey-soft); color:var(--grey); }
.customer-state.is-active { background:var(--green-soft); color:var(--green); }
.customer-state.is-inactive { background:var(--red-soft); color:var(--red); }
.customer-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.customer-stat { padding:14px 15px; border:1px solid var(--border); border-radius:13px; background:var(--surface); }
.customer-stat__value { font-size:1.16rem; font-weight:760; color:var(--text); }
.customer-stat__label { margin-top:2px; font-size:.78rem; font-weight:650; }
.customer-stat__hint { margin-top:2px; color:var(--text-muted); font-size:.7rem; }
.customer-detail-grid { display:grid; grid-template-columns:1.25fr .75fr; gap:14px; }
.customer-section { border:1px solid var(--border); background:var(--surface); border-radius:15px; padding:17px; }
.customer-section__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.customer-section__sub { font-size:.76rem; color:var(--text-muted); margin-top:2px; }
.customer-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.customer-info-item { display:flex; align-items:flex-start; gap:10px; padding:11px; border-radius:11px; background:var(--surface-2); border:1px solid var(--border); min-width:0; }
.customer-info-item__icon { width:31px; height:31px; border-radius:9px; display:grid; place-items:center; background:var(--brand-soft); color:var(--brand); flex:0 0 auto; }
.customer-info-item__icon svg { width:15px; height:15px; }
.customer-info-item__body { min-width:0; }
.customer-info-item__label { font-size:.68rem; color:var(--text-muted); font-weight:650; }
.customer-info-item__value { display:block; margin-top:2px; color:var(--text); font-size:.84rem; font-weight:620; line-height:1.45; overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.customer-notes { min-height:104px; padding:12px; border-radius:11px; background:var(--surface-2); border:1px solid var(--border); white-space:pre-wrap; line-height:1.55; }
.customer-notes.is-empty { color:var(--text-muted); font-style:italic; }
.customer-site-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.customer-site-card { appearance:none; width:100%; padding:14px; border:1px solid var(--border); border-radius:13px; background:var(--surface); color:var(--text); text-align:left; font:inherit; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .15s; }
.customer-site-card:hover { border-color:#a9b9d6; box-shadow:var(--shadow-sm); transform:translateY(-1px); }
.customer-site-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.customer-site-card__name { font-weight:720; }
.customer-site-card__domain { color:var(--text-muted); font-size:.76rem; margin-top:2px; overflow-wrap:anywhere; word-break:break-word; white-space:normal; max-width:100%; }
.customer-site-card__dot { width:9px; height:9px; border-radius:50%; background:var(--grey); margin-top:5px; flex:0 0 auto; }
.customer-site-card__dot.is-online { background:var(--green); box-shadow:0 0 0 4px var(--green-soft); }
.customer-site-card__dot.is-disabled { background:var(--red); }
.customer-site-card__meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:12px; color:var(--text-muted); font-size:.72rem; }
.customer-site-card__open { display:flex; align-items:center; justify-content:space-between; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); color:var(--brand); font-size:.75rem; font-weight:700; }
.customer-site-card__open svg { width:15px; height:15px; }

@media (max-width: 760px) {
  .runtime-mode-grid { grid-template-columns:1fr; }
  .customer-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-detail-grid { grid-template-columns:1fr; }
  .customer-info-grid { grid-template-columns:1fr; }
  .customer-site-grid { grid-template-columns:1fr; }
}
.edit-section-title {
  margin-top: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .form-grid--2 { grid-template-columns: 1fr; } }
