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

:root {
  --brand: #4f46e5;
  --brand-strong: #4338ca;
  --brand-soft: #eef2ff;
  --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: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --sidebar-bg: #131a2b;
  --sidebar-text: #b8c2d9;
  --sidebar-text-strong: #ffffff;
  --sidebar-active: #232d47;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, .18);

  --radius: 12px;
  --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-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;
}

.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, #6366f1, #22d3ee);
  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: #6b7695;
  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: #818cf8; }
.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 rgba(255, 255, 255, .07);
  font-size: .74rem;
  color: #6b7695;
}
.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: var(--surface);
  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);
}
.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: 860px; }
@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); }
