@import url("normalize.css");
@import url("fonts.css");

:root {
  color-scheme: dark;
  --primary-bg-color: rgba(19, 26, 37, 1);
  --secondary-bg-color: rgb(28, 37, 51);
  --surface-muted-bg: #20232b;
  --surface-overlay-bg: #1f2933;
  --surface-chip-bg: #303642;
  --surface-accent-bg: #1c2128;
  --modal-bg-color: #101821;

  --text-color: #ffffff;
  --text-inverse-color: #ffffff;
  --text-empty-color: #bbb;
  --text-chip-color: #e0e0e0;
  --text-meta-color: #b0b0b0;
  --text-label-color: #9ea4b3;
  --text-note-color: #9aa0ae;
  --text-hint-color: #8a8f9f;
  --text-value-color: #e0e5f5;
  --text-meta-strong-color: #c9cfdd;
  --text-success-soft: #e8f5e9;
  --text-neutral-soft: #fafafa;

  --ui-rgb: 255, 255, 255;
  --border-color: rgb(48, 61, 83);
  --border-subtle-color: #2a323c;

  --button-bg-color: rgb(40, 63, 100);
  --button-hover-bg-color: rgb(55, 87, 139);
  --button-ghost-hover-bg-color: rgba(255, 255, 255, 0.08);
  --switch-track-bg: #2b3442;
  --switch-track-checked-bg: #2f8f5b;
  --loader-card-bg: rgba(24, 32, 44, 0.92);
  --loader-card-border-color: rgba(255, 255, 255, 0.08);
  --loader-card-inset-color: rgba(255, 255, 255, 0.03);
  --loader-spinner-track-color: rgba(255, 255, 255, 0.22);
  --loader-spinner-head-color: rgba(255, 255, 255, 0.92);

  --alert-error-bg: #3b1a1a;
  --alert-error-text: #f6bcbc;
  --alert-success-bg: #12361a;
  --alert-success-text: #baf6c4;

  --online-color: #3bd671;
  --offline-color: #df484a;
  --partial-color: #f18c2a;
  --unknown-color: #6b7280;
  --sylatex-blue: #005baa;
}

:root[data-theme="light"] {
  color-scheme: light;
  --primary-bg-color: #edf2f8;
  --secondary-bg-color: #ffffff;
  --surface-muted-bg: #eef3f9;
  --surface-overlay-bg: #e7edf6;
  --surface-chip-bg: #dde6f2;
  --surface-accent-bg: #e2eaf5;
  --modal-bg-color: #ffffff;

  --text-color: #182333;
  --text-inverse-color: #ffffff;
  --text-empty-color: #5a6577;
  --text-chip-color: #263244;
  --text-meta-color: #465266;
  --text-label-color: #4f5d72;
  --text-note-color: #4b586c;
  --text-hint-color: #5b677c;
  --text-value-color: #1f2a3a;
  --text-meta-strong-color: #2c394d;
  --text-success-soft: #0f5132;
  --text-neutral-soft: #263244;

  --ui-rgb: 17, 24, 39;
  --border-color: #c9d4e3;
  --border-subtle-color: #d5deeb;

  --button-bg-color: #1f5ea8;
  --button-hover-bg-color: #2a6db8;
  --button-ghost-hover-bg-color: rgba(31, 94, 168, 0.14);
  --switch-track-bg: #bcc8da;
  --switch-track-checked-bg: #2f8f5b;
  --loader-card-bg: rgba(255, 255, 255, 0.96);
  --loader-card-border-color: rgba(17, 24, 39, 0.1);
  --loader-card-inset-color: rgba(17, 24, 39, 0.03);
  --loader-spinner-track-color: rgba(31, 94, 168, 0.24);
  --loader-spinner-head-color: rgba(31, 94, 168, 0.9);

  --alert-error-bg: #fde8e8;
  --alert-error-text: #9b1c1c;
  --alert-success-bg: #e8f7ee;
  --alert-success-text: #0f5132;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    color-scheme: light;
    --primary-bg-color: #edf2f8;
    --secondary-bg-color: #ffffff;
    --surface-muted-bg: #eef3f9;
    --surface-overlay-bg: #e7edf6;
    --surface-chip-bg: #dde6f2;
    --surface-accent-bg: #e2eaf5;
    --modal-bg-color: #ffffff;

    --text-color: #182333;
    --text-inverse-color: #ffffff;
    --text-empty-color: #5a6577;
    --text-chip-color: #263244;
    --text-meta-color: #465266;
    --text-label-color: #4f5d72;
    --text-note-color: #4b586c;
    --text-hint-color: #5b677c;
    --text-value-color: #1f2a3a;
    --text-meta-strong-color: #2c394d;
    --text-success-soft: #0f5132;
    --text-neutral-soft: #263244;

    --ui-rgb: 17, 24, 39;
    --border-color: #c9d4e3;
    --border-subtle-color: #d5deeb;

    --button-bg-color: #1f5ea8;
    --button-hover-bg-color: #2a6db8;
    --button-ghost-hover-bg-color: rgba(31, 94, 168, 0.14);
    --switch-track-bg: #bcc8da;
    --switch-track-checked-bg: #2f8f5b;
    --loader-card-bg: rgba(255, 255, 255, 0.96);
    --loader-card-border-color: rgba(17, 24, 39, 0.1);
    --loader-card-inset-color: rgba(17, 24, 39, 0.03);
    --loader-spinner-track-color: rgba(31, 94, 168, 0.24);
    --loader-spinner-head-color: rgba(31, 94, 168, 0.9);

    --alert-error-bg: #fde8e8;
    --alert-error-text: #9b1c1c;
    --alert-success-bg: #e8f7ee;
    --alert-success-text: #0f5132;
  }
}

body {
  background-color: var(--primary-bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 19px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.monitors_title,
[class*="__title"] {
  font-family: var(--font-headline);
}

html,
body {
  height: 100%;
}

.body__wrapper {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.body__nav {
  flex: 0 0 15%; /* 15% der Breite */
  overflow: hidden; /* Sidebar teilt Header/Content/Footer selbst auf */
  background-color: var(--secondary-bg-color);
}

/* Hauptinhalt */
.body__main {
  flex: 1; /* nimmt restliche Breite ein */
  overflow-y: auto;
  padding: 2em;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: inherit;
  text-decoration: none;
}

/* ================================
   Global Dark Scrollbars (WebKit)
   ================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(var(--ui-rgb), 0.05);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(var(--ui-rgb), 0.25);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(var(--ui-rgb), 0.4);
}

/* ================================
   Firefox Dark Scrollbars
   ================================ */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ui-rgb), 0.35) rgba(var(--ui-rgb), 0.08);
}

/* ------------------------------------------------------
   Dashboard hidden until hydrated
------------------------------------------------------ */
body.page-dashboard .dashboard__monitors,
body.page-dashboard .dashboard__status {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

body.page-dashboard.dashboard__hydrated .dashboard__monitors,
body.page-dashboard.dashboard__hydrated .dashboard__status {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------
   Loader Overlay (does NOT block navigation / menu)
   - Uses pointer-events:none so UI (incl. mobile menu) stays clickable
   - On mobile we keep it in the top area to avoid covering the bottom-left menu
------------------------------------------------------ */
.dashboard__loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;
  padding: 24px;

  /* background: rgba(10, 16, 24, 0.58); */
  /* backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */

  transition:
    opacity 220ms ease,
    transform 220ms ease;

  /* key change: do not block clicks */
  pointer-events: none;
}

/* keep the card interactive-looking, but still non-blocking */
.dashboard__loader__card {
  width: min(560px, calc(100vw - 48px));
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px;
  border-radius: 14px;

  background: var(--loader-card-bg);
  border: 1px solid var(--loader-card-border-color);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 2px 0 var(--loader-card-inset-color) inset;
}

.dashboard__spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;

  border: 2px solid var(--loader-spinner-track-color);
  border-top-color: var(--loader-spinner-head-color);

  animation: dashspin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

.dashboard__loader__text {
  min-width: 0;
}

.dashboard__loader__title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.dashboard__loader__subtitle {
  opacity: 0.78;
  font-size: 0.95rem;
  margin-top: 4px;
  line-height: 1.35;
}

/* .dashboard__loader__card::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(var(--ui-rgb), 0.08),
    rgba(var(--ui-rgb), 0.26),
    rgba(var(--ui-rgb), 0.08)
  );
  background-size: 200% 100%;
  animation: dashshimmer 1.2s ease-in-out infinite;
  opacity: 0.55;
}

@keyframes dashshimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
} */

/* Hide loader once hydrated */
body.dashboard__hydrated .dashboard__loader {
  opacity: 0;
  transform: translateY(-6px);
}

/* ------------------------------------------------------
   Mobile: keep loader in top area and away from bottom-left menu button
------------------------------------------------------ */
@media (max-width: 640px) {
  .dashboard__loader {
    /* instead of center, pin it to top so it never covers the menu area */
    place-items: start center;
    padding: 16px 16px 96px; /* bottom padding leaves room for floating controls */
  }

  .dashboard__loader__card {
    width: 100%;
    border-radius: 14px;
  }
}

.icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;

  /* optisch wie Text ausrichten */
  display: inline-block;
  vertical-align: -0.125em;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
  cursor: pointer;
}

.tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: var(--text-inverse-color);
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -60px;
  font-size: 0.85em;
}

.tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.nav__wrapper {
  height: 100%;
  min-height: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 1.12rem;
}

.nav__header,
.nav__footer {
  flex: 0 0 auto;
}

.nav__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.1rem;
}

.nav__head {
  border: none;
  border-bottom: 1px solid rgba(var(--ui-rgb), 0.14);
  border-radius: 0;
  background: transparent;
  outline: none;
}

.nav__head:focus-visible {
  box-shadow: 0 0 0 2px rgba(var(--ui-rgb), 0.35);
}

.head__wrapper {
  font-size: 2.25rem;
  font-weight: 300;
  text-align: left;
  cursor: pointer;
  padding: 0.15rem 0.15rem 0.65rem;
  letter-spacing: 0.01em;
}

.uptime_dot {
  font-weight: bold;
}

.nav-groups__actions {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.btn_nav_add {
  min-height: 3.4rem;
  padding: 0.42rem 0.2rem;
  background-color: rgba(var(--ui-rgb), 0.04);
  border-radius: 0.45rem;
  border: 1px solid rgba(var(--ui-rgb), 0.12);
  color: var(--text-color);
  cursor: pointer;
  font-size: 1.04em;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
  text-align: center;
}

.btn_nav_add__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn_nav_add__label {
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.btn_nav_add .icon {
  width: 1.52rem;
  height: 1.52rem;
}

.btn_nav_add--alert {
  color: var(--offline-color);
}

.nav-search {
  margin-top: 0.7rem;
  border: none;
  border-radius: 0;
  padding: 0.1rem 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.nav-search__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.nav-search__input {
  width: 100%;
  margin-top: 0;
  padding: 0.68rem 0.7rem;
  font-size: 1rem;
}

.nav-search__filter-toggle {
  border: 1px solid rgba(var(--ui-rgb), 0.18);
  border-radius: 0.45rem;
  background: rgba(var(--ui-rgb), 0.04);
  color: var(--text-color);
  min-height: 2.4rem;
  padding: 0 0.72rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-search__filter-toggle:hover {
  background: rgba(var(--ui-rgb), 0.1);
}

.nav-search__filters {
  display: flex;
  gap: 0.36rem;
  flex-wrap: wrap;
}

.nav-search__filters[hidden] {
  display: none !important;
}

.nav-filter-chip {
  border: 1px solid rgba(var(--ui-rgb), 0.15);
  border-radius: 999px;
  background: rgba(var(--ui-rgb), 0.05);
  color: rgba(var(--ui-rgb), 0.8);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.62rem;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}

.nav-filter-chip.is-active {
  background: rgba(var(--ui-rgb), 0.16);
  border-color: rgba(var(--ui-rgb), 0.26);
  color: var(--text-color);
}

.logo__link {
  display: inline-flex;
  width: min(120px, 44vw);
  justify-content: flex-start;
  text-decoration: none;
}

.logo {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}

.logo--light {
  display: none;
}

:root[data-theme="light"] .logo--dark,
:root[data-theme-resolved="light"] .logo--dark {
  display: none;
}

:root[data-theme="light"] .logo--light,
:root[data-theme-resolved="light"] .logo--light {
  display: block;
}

.nav-groups {
  margin-top: 0.25rem;
  overflow-x: hidden;
  --nav-indent-step: 0.82rem;
  --nav-row-min-h: 2.1rem;
  --nav-row-y: 0.34rem;
  --nav-row-x: 0.5rem;
  --nav-row-base-left: 0.56rem;
}

.nav-groups__item {
  border-bottom: 1px solid rgba(var(--ui-rgb), 0.08);
}

.nav-groups__item:last-child {
  border-bottom: none;
}

.nav-group__name {
  font-weight: 620;
  font-size: 0.98rem;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-groups__list,
.nav-groups__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.nav-group__row {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
}

.nav-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  padding: var(--nav-row-y) var(--nav-row-x) var(--nav-row-y)
    calc(
      var(--nav-row-base-left) + (var(--nav-depth, 0) * var(--nav-indent-step))
    );
  cursor: pointer;
  text-align: left;
  color: var(--text-color);
  position: relative;
  border-radius: 0.44rem;
  min-height: var(--nav-row-min-h);
  min-width: 0;
  box-sizing: border-box;
}

.nav-group__toggle:hover {
  text-decoration: none;
  background: rgba(var(--ui-rgb), 0.06);
}

.nav-group__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--ui-rgb), 0.32);
}

.nav-group__chevron {
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.6;
  transition: transform 140ms ease;
  flex: 0 0 auto;
}

.nav-group__toggle.is-open .nav-group__chevron {
  transform: rotate(45deg);
}

.nav-group__tree-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-group__edit-btn,
.nav-group__add-sub-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: rgba(var(--ui-rgb), 0.75);
  padding: 0.22rem 0.3rem;
  border-radius: 0.35rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    background-color 120ms ease;
}

.nav-group__row:hover .nav-group__edit-btn,
.nav-group__row:hover .nav-group__add-sub-btn,
.nav-group__row:focus-within .nav-group__edit-btn,
.nav-group__row:focus-within .nav-group__add-sub-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

@media (hover: none) {
  .nav-group__edit-btn,
  .nav-group__add-sub-btn {
    opacity: 0.68;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}

.nav-groups__sublist {
  padding-left: 0;
}

.nav-groups__item--sub .nav-group__row {
  opacity: 0.95;
}

.nav-monitors,
.nav-groups__sublist {
  display: none;
}

.nav-groups__item.is-open > .nav-monitors,
.nav-groups__item.is-open > .nav-groups__sublist,
.nav-groups__item.is-search-open > .nav-monitors,
.nav-groups__item.is-search-open > .nav-groups__sublist {
  display: block;
}

.nav-groups__item.is-filtered-out,
.nav-monitor.is-filtered-out {
  display: none !important;
}

.nav-groups__item.is-search-match > .nav-group__row .nav-group__toggle,
.nav-monitor.is-search-match > a {
  background: rgba(241, 140, 42, 0.14);
}

.nav-group__color {
  position: absolute;
  width: 3px;
  height: 100%;
  left: 0;
  top: 0;
}

.btn--danger {
  background-color: #dc2626;
  color: var(--text-inverse-color);
}
.btn--danger:hover {
  background-color: #b91c1c;
}

.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-group__color--all-online {
  background-color: var(--online-color);
}

.nav-group__color--mixed {
  background-color: var(--offline-color);
}

.nav-group__color--all-offline {
  background-color: var(--offline-color);
}

.nav-group__color--unknown {
  background-color: var(--unknown-color);
  opacity: 0.4;
}

.nav-monitors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  overflow-x: hidden;
}

.nav-monitors.is-open {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-monitor a {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  padding: var(--nav-row-y) var(--nav-row-x) var(--nav-row-y)
    calc(
      calc(var(--nav-row-base-left) + 0.4rem) +
        (var(--nav-depth, 0) * var(--nav-indent-step))
    );
  text-decoration: none;
  position: relative;
  border-radius: 0.4rem;
  font-size: 0.95rem;
  transition: background-color 120ms ease;
  min-width: 0;
  min-height: var(--nav-row-min-h);
  box-sizing: border-box;
}

.nav-monitor a:hover {
  background: rgba(var(--ui-rgb), 0.06);
}

.nav-monitor__status-indicator {
  position: absolute;
  width: 3px;
  height: 100%;
  left: 0;
  top: 0;
  flex-shrink: 0;
  background-color: var(--unknown-color);
}

.nav-monitor--disabled {
  opacity: 0.55;
}

.nav-monitor--disabled .nav-monitor__status-indicator {
  filter: grayscale();
}

.nav-monitor__badge {
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid rgba(var(--ui-rgb), 0.18);
  background: rgba(var(--ui-rgb), 0.06);
  color: rgba(var(--ui-rgb), 0.75);
  vertical-align: middle;
}

.nav-monitor__badge--disabled {
  color: rgba(var(--ui-rgb), 0.65);
}

.nav-monitor__badge--maintenance {
  color: rgba(var(--ui-rgb), 0.9);
  border-color: rgba(241, 140, 42, 0.45);
  background: rgba(241, 140, 42, 0.14);
}

.nav-monitor--status-online .nav-monitor__status-indicator,
.nav-monitor--status-up .nav-monitor__status-indicator {
  background-color: var(--online-color);
}

.nav-monitor--status-offline .nav-monitor__status-indicator,
.nav-monitor--status-down .nav-monitor__status-indicator {
  background-color: var(--offline-color);
}

.nav-monitor--status-partial .nav-monitor__status-indicator {
  background-color: var(--partial-color);
}

.nav-monitor--status-unknown .nav-monitor__status-indicator {
  background-color: var(--unknown-color);
}

.nav-monitor.is-active a {
  font-weight: 700;
  background: rgba(var(--ui-rgb), 0.11);
}

.nav__footer {
  border-top: 1px solid rgba(var(--ui-rgb), 0.1);
  padding-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
}

.nav-user-card {
  border: 1px solid rgba(var(--ui-rgb), 0.12);
  border-radius: 0.65rem;
  padding: 0.48rem;
  background: rgba(var(--ui-rgb), 0.03);
}

.nav-user-card__identity {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.nav-user-card__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.73rem;
  font-weight: 700;
  background: var(--online-color);
  color: #111111;
}

.nav-user-card__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-user-card__name {
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-card__username {
  font-size: 0.84rem;
  color: rgba(var(--ui-rgb), 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-card__actions {
  margin-top: 0.34rem;
  padding-left: 2.55rem;
  font-size: 0.88rem;
}

.nav-footer__legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem 0.55rem;
  font-size: 0.78rem;
}

.nav-footer__brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.55rem;
}

.nav-footer__meta {
  display: grid;
  grid-template-rows: auto auto;
  align-content: end;
  min-height: 0;
  gap: 0.16rem;
  align-self: end;
}

.nav-footer__brand .logo__link {
  align-self: end;
  line-height: 0;
}

.nav-footer__copyright {
  font-size: 0.74rem;
  line-height: 1;
  color: rgba(var(--ui-rgb), 0.65);
}

.nav__user-row--guest {
  font-size: 0.82rem;
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.main__dashboard {
  display: flex;
  gap: 2em;
}

.dashboard__monitors {
  flex: 1;
  order: 1;
}

.dashboard__status {
  flex: 0 0 20%;
  order: 2;
}

.dashboard__wrapper {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.status__wrapper {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.status__card {
  background: var(--secondary-bg-color);
  padding: 1em;
  border-radius: 0.75em;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.status__title {
  font-size: 1.2em;
  font-weight: bold;
}

.status__updown {
  display: flex;
  flex-direction: row;
  gap: 1.25em;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.updown__number {
  font-size: 2em;
  font-weight: bold;
}

.updown__description {
  font-size: 0.75em;
  opacity: 0.5;
}

/* Grid-Layout */
.last24h__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 24px;
  margin-top: 12px;
}

/* Einzelne Kennzahl */
.last24h__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Zeitraum Ã¼ber volle Breite */
.last24h__item--full {
  grid-column: 1 / -1;
}

/* Label */
.last24h__label {
  font-size: 0.85rem;
  color: rgba(var(--ui-rgb), 0.55);
  letter-spacing: 0.02em;
}

/* Werte */
.last24h__value {
  color: var(--text-color);
  line-height: 1.2;
  word-break: break-word;
}

.last24h__value--big {
  font-size: 1.6rem;
  font-weight: 600;
}

.last24h__value--small {
  font-size: 0.85rem;
  color: rgba(var(--ui-rgb), 0.75);
}

.monitors_title,
h1 {
  font-size: 1.5em;
  font-weight: bold;
}

.monitors__listview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
}

.monitors__listview > p {
  grid-column: 1 / -1;
}

@media (min-width: 1400px) {
  .monitors__listview--responsive {
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  }
}

.list__item {
  width: 100%;
  background-color: var(--secondary-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.list__item__wrapper {
  display: flex;
  flex-direction: row;
  padding: 0.75em;
  gap: 1em;
  align-items: stretch;
  justify-content: center; /* horizontal zentrieren */
  position: relative;
  min-width: 0;
}

.item__name__title--disabled {
  opacity: 0.5;
}

/* .list__item__indicator {
  align-self: center;
} */

/* .list__item__indicator:before {
  content: "\2B24";
  color: #3bd671;
} */

/* Status-Indikator je Monitor */
.list__item__indicator {
  position: absolute;
  width: 3px;
  height: 100%;
  border-bottom-left-radius: 0.25em;
  border-top-left-radius: 0.25em;
  display: inline-block;
  left: 0;
  top: 0;
  flex-shrink: 0;
  background-color: var(--unknown-color);
}

.list__item__name {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.item__name__group {
  font-size: 0.66em;
  line-height: 1.25;
  letter-spacing: 0.02em;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25em;
}

.item__name__title {
  font-weight: bold;
}

.item__name__title a {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item__name__detials {
  opacity: 0.5;
  font-size: 0.75em;
}

.list__item__statusbar {
  display: flex;
  flex: 0 0 auto;
  min-height: 100%;
  margin-left: auto;
  width: auto;
}

.item__statusbar__wrapper {
  display: flex;
  width: auto;
  min-width: 0;
  justify-content: flex-end;
}

.statusbar__overall {
  text-align: right; /* rechtsbÃ¼ndig wie im Screenshot */
  opacity: 0.5;
  font-size: 0.75em;
  align-self: center;
}

.statusbar__bars {
  display: flex;
  gap: 0.25em;
  align-items: stretch;
}

.statusbar__bar {
  flex: 1; /* sorgt fÃ¼r volle HÃ¶he */
  width: 4px;
  border-radius: 2px;
}

.auth_wrapper {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.auth_wrapper--narrow {
  width: min(560px, 100%);
  margin: 0 auto;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  max-width: 100%;
}

.auth-form .input_button {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-card__links {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(var(--ui-rgb), 0.82);
}

.card {
  background: var(--secondary-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.25em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
}

.theme-preference {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-preference__hint {
  font-size: 0.9rem;
  color: rgba(var(--ui-rgb), 0.72);
}

.theme-preference__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.theme-preference__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25em;
  background: rgba(var(--ui-rgb), 0.03);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.theme-preference__option input[type="radio"] {
  width: auto;
  margin: 0;
}

.theme-preference__current {
  font-size: 0.85rem;
  color: rgba(var(--ui-rgb), 0.68);
}

input,
textarea,
select {
  width: 20em;
  padding: 0.5em;
  background-color: var(--secondary-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  margin-top: 0.5em;
}

.input_button {
  padding: 1em 5em;
  background-color: var(--button-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  color: var(--text-inverse-color);
  cursor: pointer;
  font-weight: bold;
}

.button_delete {
  background-color: var(--offline-color);
}

button:hover {
  background-color: var(--button-hover-bg-color);
}

.btn_nav_add:hover,
.nav-group__edit-btn:hover,
.nav-group__add-sub-btn:hover {
  background-color: var(--button-ghost-hover-bg-color);
}

.button_delete:hover {
  background-color: #d55457;
}

.account-h2 {
  margin-bottom: 1em;
}

.push-settings__intro,
.push-settings__hint {
  color: rgba(var(--ui-rgb), 0.72);
}

.push-settings__status {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25em;
  background: rgba(var(--ui-rgb), 0.04);
}

.push-settings__status[data-kind="success"] {
  border-color: var(--online-color);
}

.push-settings__status[data-kind="warning"],
.push-settings__status[data-kind="error"] {
  border-color: var(--offline-color);
}

.push-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.push-settings__actions .input_button {
  padding: 0.8rem 1.25rem;
}

.push-settings__actions .input_button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.push-settings__preferences {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.push-settings__preferences label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.push-settings__preferences input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.push-settings__devices h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.push-settings__devices ul {
  margin: 0;
  padding-left: 1.25rem;
}

.push-settings__devices li span {
  display: block;
  margin-top: 0.15rem;
  color: rgba(var(--ui-rgb), 0.68);
  font-size: 0.85rem;
}

.push-settings__security-note {
  margin: 1rem 0 0;
  color: rgba(var(--ui-rgb), 0.68);
  font-size: 0.85rem;
}

.nav__user {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nav__user-username {
  opacity: 0.65;
}

/* === Modal Overlay === */
.modal {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  display: none; /* per default unsichtbar */
  align-items: center; /* Zentrierung (mit flex) */
  justify-content: center;
  z-index: 1000;
}

.modal.is-open {
  display: flex; /* jetzt wird der Flex-Container sichtbar */
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative;
  z-index: 1001;
  width: min(600px, 90vw);
  max-height: 90vh;
  overflow: hidden;
  background: var(--modal-bg-color); /* an dein Theme anpassen */
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.input_group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.modal__close:hover {
  background: none;
}

/* Form / Buttons grob */
.form-row {
  margin-bottom: 0.75rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.25rem;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row textarea {
  width: 100%;
  box-sizing: border-box;
}

.form-row--actions button {
  width: 100%;
  box-sizing: border-box;
}

.group-share-section {
  margin-top: 1rem;
}

.group-share-entry__controls {
  --group-share-control-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-auto-rows: var(--group-share-control-height);
  gap: 12px;
  align-items: stretch;
}

.group-share-entry__controls input[type="text"] {
  min-height: var(--group-share-control-height);
  height: var(--group-share-control-height);
  margin: 0;
}

.group-share-permission {
  min-width: 170px;
  min-height: var(--group-share-control-height);
  height: var(--group-share-control-height);
  padding: 0 1rem;
  border-radius: 0.25em;
  border: 1px solid transparent;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  align-self: stretch;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.group-share-permission:hover {
  transform: translateY(-1px);
}

.group-share-permission--readonly {
  background: rgba(223, 72, 74, 0.18);
  border-color: rgba(223, 72, 74, 0.45);
  color: #ffb4b5;
}

.group-share-permission--edit {
  background: rgba(59, 214, 113, 0.18);
  border-color: rgba(59, 214, 113, 0.45);
  color: #b9f3cc;
}

.group-share-section__divider {
  opacity: 0.25;
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.group-share-section__actions {
  margin-top: 0.25rem;
}

.group-share-section__list-row {
  margin-top: 0.75rem;
}

.group-share {
  margin-top: 0.5rem;
  border: 1px solid rgba(var(--ui-rgb), 0.12);
  border-radius: 0.5rem;
  background: rgba(var(--ui-rgb), 0.02);
  overflow: hidden;
}

.group-share__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid rgba(var(--ui-rgb), 0.1);
}

.group-share__item:last-child {
  border-bottom: 0;
}

.group-share__details {
  min-width: 0;
}

.group-share__identity {
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.group-share__meta {
  margin-top: 0.15rem;
  font-size: 0.87rem;
  opacity: 0.78;
}

.group-share__hint {
  opacity: 0.75;
  margin-top: 0.5rem;
}

.group-share__remove {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  padding: 0.42rem 0.72rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(223, 72, 74, 0.52);
  background: rgba(223, 72, 74, 0.16);
  color: #ffb2b2;
  cursor: pointer;
}

.group-share__remove:hover {
  background: rgba(223, 72, 74, 0.28);
  border-color: rgba(223, 72, 74, 0.72);
}

.group-share__remove:focus-visible {
  outline: 2px solid rgba(223, 72, 74, 0.65);
  outline-offset: 2px;
}

:root[data-theme="light"] .group-share__remove {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
}

:root[data-theme="light"] .group-share__remove:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.48);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"])
    .group-share__remove {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.35);
  }

  :root:not([data-theme="dark"]):not([data-theme="light"])
    .group-share__remove:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.48);
  }
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 26px;
  background: var(--switch-track-bg);
  transition: 0.2s;
}
.switch__slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--text-inverse-color);
  transition: 0.2s;
}
.switch input:checked + .switch__slider {
  background: var(--switch-track-checked-bg);
}
.switch input:checked + .switch__slider:before {
  transform: translateX(20px);
}

/* Alerts */
.alert {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.alert--error {
  background: var(--alert-error-bg);
  color: var(--alert-error-text);
}

.alert--success {
  background: var(--alert-success-bg);
  color: var(--alert-success-text);
}

.monitor__data__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* grid-template-rows: repeat(3, 1fr); */
  grid-column-gap: 1em;
  grid-row-gap: 1em;
}

.monitor__data__status {
  grid-area: 1 / 1 / 2 / 2;
}
.monitor__data__lastcheck {
  grid-area: 1 / 2 / 2 / 3;
}
.monitor__data__statusbar {
  grid-area: 1 / 3 / 2 / 4;
}
.monitor__data__lastdays {
  grid-area: 2 / 1 / 3 / 4;
}
.monitor__data__incidents {
  grid-area: 3 / 1 / 4 / 4;
}

.monitor__data__statusbar .statusbar__bars {
  display: flex;
  gap: 0.5em;
  width: 100%;
  font-size: 1em !important;
}

.monitor__data__statusbar .statusbar__bar {
  flex: 1 1 0;
  width: 6px;
  height: 3em;
  border-radius: 999px;
  /* max-width: 14px; */
}

.bar_online {
  background-color: #3bd671;
}

.bar_offline {
  background-color: #df484a;
}

.bar_partial {
  background-color: #f18c2a;
}

.bar_empty {
  background-color: #4b5563; /* grau / "keine Daten" */
  opacity: 0.5;
}

.monitor__data__grid__item {
  background: var(--secondary-bg-color);
  padding: 2em;
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.monitor__data__status .monitor__data__grid__item__content,
.monitor__data__lastcheck .monitor__data__grid__item__content {
  font-size: 3em;
  font-weight: bold;
}

.monitor__data__grid__item__description {
  font-size: 0.85em;
  opacity: 0.5;
}

.status_online,
.status_online::before {
  color: #3bd671;
  text-shadow: rgba(59, 214, 113, 0.5) 0px 0px 22px;
  /* background: #3bd671; */
}

.status_offline,
.status_offline::before {
  color: #df484a;
  /* background: #df484a; */
}

.status_unknown,
.status_unknown::before {
  color: var(--unknown-color);
  /* background: var(--unknown-color); */
}

.status_partial,
.status_partial::before,
.status_warn {
  color: #f18c2a;
  /* background: #f18c2a; */
}

.table_component {
  width: 100%;
  border-radius: 0.75em;
  overflow: hidden;
}

.table_component table {
  /* border: 1px solid #dededf; */
  height: 100%;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  border-spacing: 1px;
  text-align: left;
}

.table_component th {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--secondary-bg-color);
  /* color: #000000; */
  padding: 1em;
}

.table_component td {
  border-top: 1px solid var(--border-color);
  background-color: var(--secondary-bg-color);
  padding: 1em;
}

.incident_status_open {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background-color: #df484a; /* rot */
  color: var(--text-inverse-color);
  font-size: 0.9rem;
}

.incident_status_resolved {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background-color: #3bd671; /* grÃ¼n */
  color: #000;
  font-size: 0.9rem;
}

.monitor__info {
  margin-bottom: 1em;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.monitor__info__details {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.monitor__info__name {
  font-size: 2em;
  font-weight: bold;
}

.monitor__info__meta {
  font-size: 0.85em;
  opacity: 0.5;
}

.monitor__info__actions__wrapper {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
}

.status_disabled {
  opacity: 0.6;
  filter: grayscale(1);
}

.badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  vertical-align: middle;
}

.badge--disabled {
  background: rgba(var(--ui-rgb), 0.08);
  border: 1px solid rgba(var(--ui-rgb), 0.18);
  color: rgba(var(--ui-rgb), 0.75);
}

.btn_monitor_edit {
  font-size: 1.75em;
  padding: 0.25em;
  background-color: transparent;
  border: 2px solid var(--secondary-bg-color);
  color: var(--text-color);
  border-radius: 0.25em;
  cursor: pointer;
  max-height: 2em;
}

.monitor__data__lastdays_wrapper {
  display: flex;
  flex-direction: row;
}

.monitor__data__lastdays_item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.monitor__data__lastdays_item__value {
  font-size: 2em;
  font-weight: bold;
}

.monitor__data__lastdays_item__details {
  font-size: 0.85em;
  opacity: 0.5;
}

/* ---------------------------------
   Globale Notifications (Toasts)
--------------------------------- */

.notifications {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background: var(--surface-overlay-bg);
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.notification--visible {
  opacity: 1;
  transform: translateY(0);
}

.notification--success {
  border-left: 4px solid var(--online-color);
}

.notification--error {
  border-left: 4px solid var(--offline-color);
}

.notification--info {
  border-left: 4px solid #3b82f6;
}

.notification--warning {
  border-left: 4px solid var(--partial-color);
}

.notification__message {
  flex: 1;
}

.notification__close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.8;
}

.notification__close:hover {
  opacity: 1;
}

.workers__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.workers__empty {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background-color: var(--surface-muted-bg);
  color: var(--text-empty-color);
}

.worker-card {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  background-color: var(--secondary-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
}

.worker-card__left {
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}

.status-dot {
  position: absolute;
  left: 0;
  width: 6px;
  height: 100%;
  border-bottom-left-radius: 0.25em;
  border-top-left-radius: 0.25em;
  display: inline-block;
}

/* Farben an deine Status-Badges angelehnt */
.status-dot.status-online,
.list__item__indicator.status_online {
  background-color: var(--online-color);
}
.status-dot.status-warn {
  background-color: var(--partial-color);
}
.status-dot.status-offline,
.list__item__indicator.status_offline {
  background-color: var(--offline-color);
}
.status-dot.status-unknown {
  background-color: var(--unknown-color);
}

.worker-card__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.worker-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.worker-card__name {
  font-weight: 600;
  font-size: 1.5rem;
}

.worker-role-badge {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--surface-chip-bg);
  color: var(--text-chip-color);
}

.status-badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-badge.status-online {
  background-color: var(--online-color);
  color: var(--text-success-soft);
}
.status-badge.status-warn {
  background-color: var(--partial-color);
  color: #212121;
}
.status-badge.status-offline {
  background-color: var(--offline-color);
  color: #000;
}
.status-badge.status-unknown {
  background-color: var(--unknown-color);
  color: var(--text-neutral-soft);
}
.status-badge.status-disabled {
  background-color: var(--surface-chip-bg);
  color: var(--text-meta-color);
}

.worker-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-meta-color);
}

.worker-card__meta .meta-item {
  white-space: nowrap;
}

.worker-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.metric {
  min-width: 150px;
  flex: 1 1 150px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background-color: var(--primary-bg-color);
}

.metric__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-label-color);
  margin-bottom: 0.1rem;
}

.metric__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-value-color);
}

.metric__hint {
  font-size: 0.75rem;
  color: var(--text-hint-color);
}

/* Legende & Fehler wie gehabt */
.workers__legend {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.workers__error {
  color: var(--offline-color);
  margin-bottom: 0.5rem;
}

/* ============================================
   Cluster-Ãœbersicht oben Ã¼ber den Worker-Cards
   ============================================ */

.workers__cluster {
  margin-bottom: 1.5rem;
}

/* Optional: Wenn du den Text noch nicht in Card-Form hast,
   kannst du spÃ¤ter deine HTML-Ausgabe an die .cluster-card
   Struktur anpassen. FÃ¼r jetzt funktioniert das Styling auch
   als Wrapper. */
.cluster-card {
  background-color: var(--secondary-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  padding: 0.9rem 1.1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cluster-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.cluster-card__item {
  flex: 1 1 160px;
  min-width: 0;
}

.cluster-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-label-color);
  margin-bottom: 0.1rem;
}

.cluster-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-value-color);
}

.cluster-hint {
  font-size: 0.75rem;
  color: var(--text-hint-color);
}

/* Auto-Scaling Hinweis */
.cluster-card__reco {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  line-height: 1.3;
}

.cluster-reco-ok {
  background-color: var(--online-color);
  color: #000;
}

.cluster-reco-inc {
  background-color: var(--partial-color);
  color: #212121;
}

.cluster-reco-dec {
  background-color: #283593;
  color: #e8eaf6;
}

.cluster-reco-reason {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

#workers-cluster:not(:empty):not(:has(.cluster-card)) {
  border-radius: 10px;
  background-color: var(--surface-accent-bg);
  border: 1px solid var(--border-subtle-color);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  white-space: pre-line; /* ZeilenumbrÃ¼che aus JS-Template erhalten */
}

/* Mini-Linecharts in den Metrics */
.metric .sparkline {
  width: 100%;
  height: 24px;
  margin-top: 4px;
  display: block;
  opacity: 0.85;
}

.legend-note {
  font-size: 0.8rem;
  color: var(--text-label-color);
}

/* Auto-Scaling Badges */
.autoscale-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-right: 6px;
  color: var(--text-inverse-color);
  vertical-align: middle;
}

/* Farben */
.autoscale-inc {
  background-color: var(--partial-color);
  color: #212121;
}

.autoscale-dec {
  background-color: #283593;
  color: #e8eaf6;
}

.autoscale-ok {
  background-color: var(--online-color);
  color: #000;
}

/* Dezente EinrÃ¼ckung fÃ¼r untergeordnete Abschnitte */
.legend-indent {
  margin-left: 18px;
  margin-top: 4px;
  margin-bottom: 6px;
}

/* Hinweistext */
.legend-note {
  font-size: 0.75rem;
  color: var(--text-note-color);
  display: block;
  margin-top: 4px;
}

/* ============================================
   System-Worker (Notify / Reaper / Scheduler)
   ============================================ */

.system-workers {
  margin-bottom: 1.5rem;
}

.system-workers__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.system-workers__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Card-Stil analog Worker-Cards / cluster-card */
.system-card {
  display: flex;
  background-color: var(--secondary-bg-color);
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Links: Status-Leiste (wie bei Worker-Cards) */
.system-card__left {
  width: 6px;
  background: var(--online-color);
}

/* wir steuern die Farbe Ã¼ber status-level */
.system-card.status-warn .system-card__left {
  background: var(--partial-color);
}

.system-card.status-offline .system-card__left {
  background: var(--offline-color);
}

.system-card.status-unknown .system-card__left {
  background: #6b7280;
}

.system-card.status-disabled .system-card__left {
  background: var(--unknown-color);
}

/* Main content */
.system-card__main {
  flex: 1;
  padding: 0.9rem 1.1rem;
}

/* Header (Name + Role + Statusbadge) */
.system-card__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.system-card__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-right: auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta-Zeile: nutzt bereits vorhandene .meta-item */
.system-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-label-color);
  margin-bottom: 0.75rem;
}

.system-card__meta .meta-item strong {
  color: var(--text-meta-strong-color);
  font-weight: 600;
}

/* Metrics: nutzt vorhandene .metric Boxen */
.system-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .system-card__metrics {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .system-card__metrics {
    grid-template-columns: 1fr;
  }
}

.agent-host-section-gap {
  margin-top: 16px;
}

.agent-host-row-between {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-host-muted {
  opacity: 0.7;
  font-weight: 500;
}

.agent-host-header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.agent-host-meta-actions {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.agent-host-back-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-hosts-open-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-hosts-workers-metric .metric__value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.agent-hosts-workers-main {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.agent-hosts-workers-sub {
  font-size: 0.9rem;
  color: var(--text-label-color);
  font-weight: 600;
}

.agent-hosts-workers--ok .agent-hosts-workers-main {
  color: var(--online-color);
}

.agent-hosts-workers--warn .agent-hosts-workers-main {
  color: var(--partial-color);
}

.agent-hosts-list-metrics {
  grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.agent-worker-create-form {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.agent-worker-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.agent-worker-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.agent-worker-field input[type="text"],
.agent-worker-field input[type="number"],
.agent-worker-field select {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
}

.agent-worker-switch-row {
  margin: 0;
}

.agent-host-worker-actions {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.agent-host-worker-actions .metric {
  min-width: 0;
}

.agent-command-pair {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.agent-command-log-row {
  grid-template-columns: 1fr;
}

.agent-command-payload,
.agent-command-result,
.agent-command-log {
  min-width: 0;
}

.agent-command-pre {
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

.agent-command-pre--log {
  max-height: 260px;
}

@media (max-width: 1200px) {
  .agent-hosts-list-metrics {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .agent-host-meta-actions {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .agent-host-worker-actions {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .agent-command-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .agent-hosts-list-metrics,
  .agent-host-meta-actions,
  .agent-host-worker-actions,
  .agent-worker-create-grid,
  .agent-command-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .agent-hosts-list-metrics {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

.nav-toggle {
  display: none;
}

.mobile-nav-bar {
  display: none;
}

body {
  padding-bottom: 0;
}

body.nav-open {
  overflow: hidden;
}

.modal__dialog .form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

.modal__dialog .modal__form-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-bottom: 0.1rem;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.modal__dialog .form-row {
  display: grid;
  min-width: 0;
}

.modal__dialog .form-row input,
.modal__dialog .form-row select,
.modal__dialog .form-row textarea {
  width: 100%;
}

.modal__dialog .form-row input[type="text"],
.modal__dialog .form-row input[type="number"],
.modal__dialog .form-row select {
  min-height: 3.1rem;
  height: 3.1rem;
  box-sizing: border-box;
}

.modal__dialog .form-row label {
  font-size: 0.92rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.modal__dialog .form-row label small,
.modal__dialog .form-row small {
  font-size: 0.78rem;
  line-height: 1.3;
}

/* default: volle Breite */
.modal__dialog .modal__form-body .form-row {
  grid-column: 1 / -1;
}

/* half: eine Spalte */
.modal__dialog .modal__form-body .form-row--half {
  grid-column: span 1;
}

.modal__dialog .modal__form-body > .group-share-section {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.modal__dialog .form-row--actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 12px 0 0.1rem;
  box-sizing: border-box;
  flex: 0 0 auto;
  background:
    linear-gradient(
      180deg,
      rgba(16, 24, 33, 0) 0%,
      var(--modal-bg-color) 18px,
      var(--modal-bg-color) 100%
    );
  border-top: 1px solid rgba(var(--ui-rgb), 0.12);
}

.modal__dialog .form-row--actions-split {
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
}

.modal__dialog .form-row--actions .input_button {
  width: 100%;
  margin: 0;
  min-width: 0;
  padding: 0.82rem 0.9rem;
  font-size: 0.96rem;
  line-height: 1.2;
}

.modal__dialog .form-row--actions .button_delete {
  min-width: 0;
  padding-inline: 0.55rem;
  font-size: 0.88rem;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 700px) {
  .modal__dialog {
    width: min(600px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    padding: 1.1rem;
  }

  .modal__dialog .modal__form-body {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .modal__dialog .modal__form-body .form-row,
  .modal__dialog .modal__form-body .form-row--half,
  .modal__dialog .modal__form-body > .group-share-section {
    grid-column: 1 / -1;
  }

  .modal__dialog .form-row--actions-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal__dialog .form-row--actions .input_button,
  .modal__dialog .form-row--actions .button_delete {
    min-height: 3.1rem;
    height: auto;
    white-space: normal;
    word-break: normal;
  }
}

.form-row--switch {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 6px;
  align-items: center;
}

/* Label "Aktiv" â†’ volle Breite */
.form-row--switch > label:first-of-type {
  grid-column: 1 / -1;
}

/* Switch links unten */
.form-row--switch .switch {
  grid-column: 1 / 2;
}

/* ErklÃ¤rung rechts unten */
.form-row--switch small {
  grid-column: 2 / 3;
  font-size: 0.85rem;
  line-height: 1.3;
  opacity: 0.85;
}

.admin__page {
  padding: 18px;
}
.admin__header {
  margin-bottom: 14px;
}
.admin__title {
  font-size: 20px;
  margin: 0;
}
.admin__subtitle {
  opacity: 0.7;
  margin-top: 2px;
  font-size: 13px;
}

.admin__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.kpi {
  background: rgba(var(--ui-rgb), 0.03);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
  border-radius: 10px;
  padding: 12px;
}

.kpi__label {
  font-size: 12px;
  opacity: 0.7;
}
.kpi__value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}
.kpi__muted {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 500;
}
.kpi__meta {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
}

.admin__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin__card {
  background: rgba(var(--ui-rgb), 0.03);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
  border-radius: 10px;
  padding: 12px;
}

.admin__cardTitle {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 10px;
}

.admin__table .trow {
  display: grid;
  grid-template-columns: 100px 1.2fr 170px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(var(--ui-rgb), 0.06);
  font-size: 12px;
}

.admin__table .thead {
  border-top: 0;
  opacity: 0.65;
  font-size: 11px;
  padding-top: 0;
}

.btn-admin-users {
  font-size: 0.75em;
}

.btn-small {
  padding: 1em 2em;
}

.admin-user-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
}

.admin-user-actions .metric {
  min-width: 0; /* wichtig: verhindert Overflow in Grid */
}

/* Account-Zeile oben: je 2 Spalten breit */
.admin-action--email {
  grid-column: span 2;
}
.admin-action--roles {
  grid-column: span 2;
}

/* Form helpers */
.admin-action__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-action__form--row {
  flex-wrap: nowrap;
}
.admin-action__form--col {
  flex-direction: column;
  align-items: stretch;
}

/* Responsive */
@media (max-width: 1200px) {
  .admin-user-actions {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .admin-action--email,
  .admin-action--roles {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .admin-user-actions {
    grid-template-columns: 1fr;
  }
  .admin-action--email,
  .admin-action--roles {
    grid-column: auto;
  }
  .admin-action__form--row {
    flex-wrap: wrap;
  }
}

.admin-users-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-users-header .input_button {
  flex: 0 0 auto;
}

.admin-users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-users-filter,
.admin-users-registration {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--secondary-bg-color);
}

.admin-users-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) minmax(130px, 180px) auto auto;
  gap: 10px;
  align-items: end;
}

.admin-users-filter label,
.admin-users-filter input,
.admin-users-filter select {
  width: 100%;
}

.admin-users-filter__reset {
  align-self: center;
  color: var(--text-meta-color);
  font-size: 0.82rem;
  text-decoration: none;
}

.admin-users-filter__reset:hover {
  color: var(--text-color);
}

.admin-users-registration {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-users-registration > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-users-link-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--text-meta-strong-color);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-users-list__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-users-list__heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-users-list__heading span {
  color: var(--text-meta-color);
  font-size: 0.8rem;
}

.admin-users-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--secondary-bg-color);
}

.admin-users-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-users-table th,
.admin-users-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-subtle-color);
  text-align: left;
  vertical-align: middle;
}

.admin-users-table th {
  color: var(--text-label-color);
  background: rgba(var(--ui-rgb), 0.025);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.admin-users-table tbody tr:hover {
  background: rgba(var(--ui-rgb), 0.025);
}

.admin-users-table tbody tr.is-blocked {
  background: rgba(223, 72, 74, 0.035);
}

.admin-users-table__actions-heading {
  text-align: right !important;
}

.admin-user-identity {
  display: flex;
  min-width: 210px;
  flex-direction: column;
  gap: 3px;
}

.admin-user-identity strong {
  color: var(--text-color);
  font-size: 1rem;
}

.admin-user-identity span,
.admin-user-identity small,
.admin-users-muted,
.admin-users-cell-note {
  color: var(--text-meta-color);
}

.admin-user-role-list {
  display: flex;
  max-width: 220px;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-user-role-badge {
  border: 1px solid transparent;
  font-size: 0.8rem;
}

.admin-user-role-badge--admin {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.14);
  color: #f7b955;
}

.admin-user-role-badge--moderator {
  border-color: rgba(168, 85, 247, 0.34);
  background: rgba(168, 85, 247, 0.14);
  color: #c9a7ff;
}

.admin-user-role-badge--readonly {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: #7dc4ff;
}

.admin-user-role-badge--user {
  border-color: rgba(16, 185, 129, 0.34);
  background: rgba(16, 185, 129, 0.14);
  color: #67dda0;
}

:root[data-theme="light"] .admin-user-role-badge--admin {
  color: #8a5200;
}

:root[data-theme="light"] .admin-user-role-badge--moderator {
  color: #7131a8;
}

:root[data-theme="light"] .admin-user-role-badge--readonly {
  color: #155fa8;
}

:root[data-theme="light"] .admin-user-role-badge--user {
  color: #08764e;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) .admin-user-role-badge--admin {
    color: #8a5200;
  }

  :root:not([data-theme="dark"]):not([data-theme="light"]) .admin-user-role-badge--moderator {
    color: #7131a8;
  }

  :root:not([data-theme="dark"]):not([data-theme="light"]) .admin-user-role-badge--readonly {
    color: #155fa8;
  }

  :root:not([data-theme="dark"]):not([data-theme="light"]) .admin-user-role-badge--user {
    color: #08764e;
  }
}

.admin-users-cell-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-user-subscription,
.admin-user-monitor-usage {
  display: flex;
  min-width: 145px;
  flex-direction: column;
  gap: 5px;
}

.admin-user-subscription strong,
.admin-user-monitor-usage strong {
  color: var(--text-color);
  font-size: 0.9rem;
}

.admin-user-subscription__meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-user-subscription__meta small,
.admin-user-monitor-usage small {
  color: var(--text-meta-color);
  font-size: 0.76rem;
}

.admin-user-billing-status {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(var(--ui-rgb), 0.08);
  color: var(--text-meta-strong-color);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-user-billing-status.is-active {
  background: rgba(59, 214, 113, 0.14);
  color: #55db83;
}

.admin-user-billing-status.is-trialing {
  background: rgba(59, 130, 246, 0.14);
  color: #7dc4ff;
}

.admin-user-billing-status.is-problem,
.admin-user-billing-status.is-canceled {
  background: rgba(223, 72, 74, 0.14);
  color: #ef7779;
}

.admin-user-monitor-usage__track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(var(--ui-rgb), 0.09);
}

.admin-user-monitor-usage__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3bd671;
}

.admin-user-monitor-usage.is-near-limit .admin-user-monitor-usage__track span,
.admin-user-monitor-usage.is-at-limit .admin-user-monitor-usage__track span {
  background: #f18c2a;
}

.admin-user-monitor-usage.is-over-limit strong {
  color: #ef7779;
}

.admin-user-monitor-usage.is-over-limit .admin-user-monitor-usage__track span {
  background: #df484a;
}

.admin-users-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.admin-users-action {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: transparent;
  color: var(--text-meta-strong-color);
  font-size: 0.7rem;
  font-weight: 650;
  cursor: pointer;
}

.admin-users-action:hover {
  border-color: var(--button-hover-bg-color);
  background: var(--button-ghost-hover-bg-color);
  color: var(--text-color);
}

.admin-users-action--primary {
  border-color: var(--button-bg-color);
  background: var(--button-bg-color);
  color: var(--text-inverse-color);
}

.admin-users-action--primary:hover {
  background: var(--button-hover-bg-color);
  color: var(--text-inverse-color);
}

.admin-users-action--danger {
  border-color: rgba(223, 72, 74, 0.45);
  color: var(--offline-color);
}

.admin-users-action--icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.admin-users-action--icon svg {
  width: 18px;
  height: 18px;
}

.admin-users-empty {
  display: flex;
  padding: 32px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--secondary-bg-color);
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.admin-users-empty span {
  color: var(--text-meta-color);
}

body.has-open-modal {
  overflow: hidden;
}

.admin-user-modal__dialog {
  width: min(760px, 94vw);
  padding: 0;
  gap: 0;
}

.admin-user-modal__header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border-subtle-color);
}

.admin-user-modal__header h2,
.admin-user-modal__header p {
  margin: 0;
}

.admin-user-modal__header h2 {
  margin-top: 5px;
  font-size: 1.35rem;
}

.admin-user-modal__header p {
  margin-top: 5px;
  color: var(--text-meta-color);
  font-size: 0.82rem;
}

.admin-user-modal__dialog > form,
.admin-user-modal__scroll > form {
  padding: 20px 24px 24px;
}

.admin-user-modal__scroll {
  overflow-y: auto;
}

.admin-user-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-user-modal__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.admin-user-modal__field--wide {
  grid-column: 1 / -1;
}

.admin-user-modal__field > span {
  color: var(--text-label-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-user-modal__field input,
.admin-user-modal__field select {
  width: 100%;
  box-sizing: border-box;
}

.admin-user-modal__field select[multiple] {
  min-height: 112px;
}

.admin-user-modal__field small {
  color: var(--text-hint-color);
  font-size: 0.7rem;
}

.admin-user-modal__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  gap: 10px;
}

.admin-user-modal__switch-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border-subtle-color);
  border-radius: 7px;
  background: rgba(var(--ui-rgb), 0.02);
  cursor: pointer;
}

.admin-user-modal__switch-option > span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.admin-user-modal__switch-option strong {
  color: var(--text-meta-strong-color);
  font-size: 0.82rem;
}

.admin-user-modal__switch-option small {
  color: var(--text-hint-color);
  font-size: 0.68rem;
}

.admin-user-modal__switch-option .switch {
  flex: 0 0 46px;
}

.admin-user-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.admin-user-modal__security {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-subtle-color);
  background: rgba(var(--ui-rgb), 0.02);
}

.admin-user-modal__security h3,
.admin-user-modal__security p {
  margin: 0;
}

.admin-user-modal__security h3 {
  font-size: 0.9rem;
}

.admin-user-modal__security p {
  margin-top: 3px;
  color: var(--text-meta-color);
  font-size: 0.72rem;
}

.admin-user-modal__security-actions {
  display: flex;
  gap: 7px;
}

@media (max-width: 1100px) {
  .admin-users-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-users-registration {
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .admin-users-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-users-filter {
    grid-template-columns: 1fr 1fr;
  }

  .admin-users-filter__search {
    grid-column: 1 / -1;
  }

  .admin-user-modal__grid {
    grid-template-columns: 1fr;
  }

  .admin-user-modal__field--wide {
    grid-column: auto;
  }

  .admin-user-modal__options {
    grid-template-columns: 1fr;
  }

  .admin-user-modal__security {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .admin-users-filter {
    grid-template-columns: 1fr;
  }

  .admin-users-filter__search {
    grid-column: auto;
  }

  .admin-users-registration,
  .admin-user-modal__security-actions,
  .admin-user-modal__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-modal__security-actions .admin-users-action,
  .admin-user-modal__footer button {
    width: 100%;
  }
}

.admin-net-delete .metric__value {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

input[type="text"] {
  min-height: 40px;
}

/* Bearbeiten-Form: Inputs links untereinander, Button rechts */
.admin-net-edit-form {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name btn"
    "desc btn";
  gap: 10px;
  align-items: start;
}

.admin-net-edit-form__name {
  grid-area: name;
  width: 100%;
  min-width: 0;
}
.admin-net-edit-form__desc {
  grid-area: desc;
  width: 100%;
  min-width: 0;
}
.admin-net-edit-form__btn {
  grid-area: btn;
  white-space: nowrap;
}

/* Optional: damit Inputs in Cards nicht zu breit werden */
.system-card .metric__value input[type="text"],
.system-card .metric__value input[type="email"] {
  max-width: 100%;
}

.user-details-input {
  width: auto;
}

/* --------------------------------------------------
   Monitor Detail: Loading Indicator (Last Check box)
-------------------------------------------------- */

.monitor__data__grid__item__content {
  position: relative; /* wichtig fÃ¼r Overlay */
}

.monitor__loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.monitor__loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.monitor__spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: monitorSpin 0.8s linear infinite;
}

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

.monitor__loading-text {
  font-size: 13px;
  opacity: 0.85;
}

/* optional: Refresh-Button Feedback */
#btn-monitor-refresh.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ------------------------------------------------------
   Dashboard Right Column â€“ Visual Polish
------------------------------------------------------ */

.dashboard__status .status__wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.status__card {
  border-radius: 0.25em;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.status__title {
  font-size: 22px;
  /* font-weight: 800; */
  letter-spacing: 0.2px;
  margin-bottom: 14px;
}

.status__card .muted {
  color: rgba(var(--ui-rgb), 0.68);
}

/* ------------------------------
   Action Required
------------------------------ */

.action__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action__empty {
  color: rgba(var(--ui-rgb), 0.7);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 0.25em;
  background: rgba(var(--ui-rgb), 0.03);
  border: 1px dashed rgba(var(--ui-rgb), 0.08);
}

.action__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 0.25em;
  text-decoration: none;
  color: inherit;
  background: rgba(var(--ui-rgb), 0.02);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.action__item:hover {
  transform: translateY(-1px);
  background: rgba(var(--ui-rgb), 0.035);
  border-color: rgba(var(--ui-rgb), 0.1);
}

.action__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(var(--ui-rgb), 0.06);
}

/* nutzt deine bestehenden status_* Klassen.
   Optional: wenn du willst, kannst du die Farben hier "verstÃ¤rken": */
.action__dot.status_offline {
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}
.action__dot.status_online {
  box-shadow: 0 0 0 3px rgba(0, 255, 120, 0.1);
}
.action__dot.status_unknown {
  box-shadow: 0 0 0 3px rgba(255, 200, 0, 0.1);
}
.action__dot.status_disabled {
  box-shadow: 0 0 0 3px rgba(160, 160, 160, 0.12);
}

.action__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.action__name {
  font-weight: 750;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action__since {
  font-size: 13px;
  color: rgba(var(--ui-rgb), 0.7);
}

/* ------------------------------
   Aktueller Status (Zahlen sauber ausrichten)
------------------------------ */

.status__updown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}

.status__updown > div {
  border-radius: 0.25em;
  padding: 12px 12px 10px;
  background: rgba(var(--ui-rgb), 0.02);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
  text-align: center;
}

.updown__number {
  font-size: 40px;
  /* font-weight: 850; */
  letter-spacing: -0.5px;
  line-height: 1;
}

.updown__description {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(var(--ui-rgb), 0.7);
}

/* ------------------------------
   Letzten 24 Stunden (Grid besser lesbar)
------------------------------ */

.last24h__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.last24h__item {
  border-radius: 0.25em;
  padding: 12px 12px 10px;
  background: rgba(var(--ui-rgb), 0.02);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
}

.last24h__item--full {
  grid-column: 1 / -1;
}

.last24h__label {
  font-size: 13px;
  color: rgba(var(--ui-rgb), 0.7);
}

.last24h__value--big {
  margin-top: 8px;
  font-size: 32px;
  /* font-weight: 850; */
  letter-spacing: -0.4px;
  line-height: 1;
}

.last24h__value--small {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(var(--ui-rgb), 0.78);
}

/* ------------------------------
   Plattform-Health (nicht als Textliste, sondern als Kacheln)
------------------------------ */

.platform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.platform__item {
  border-radius: 0.25em;
  padding: 12px 12px 10px;
  background: rgba(var(--ui-rgb), 0.02);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
}

.platform__item--full {
  grid-column: 1 / -1;
}

.platform__label {
  font-size: 13px;
  color: rgba(var(--ui-rgb), 0.7);
}

.platform__value {
  margin-top: 8px;
  font-size: 22px;
  /* font-weight: 850; */
  letter-spacing: -0.2px;
}

/* Optional: "Wert" als Badge-like feel, wenn du willst */
.platform__value.is-bad {
  color: rgba(255, 120, 120, 0.95);
}
.platform__value.is-warn {
  color: rgba(255, 210, 120, 0.95);
}
.platform__value.is-ok {
  color: rgba(120, 255, 180, 0.95);
}

/* ------------------------------
   Letzte Ereignisse (kompakte Timeline-List)
------------------------------ */

.events__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.events__empty {
  color: rgba(var(--ui-rgb), 0.7);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 0.25em;
  background: rgba(var(--ui-rgb), 0.03);
  border: 1px dashed rgba(var(--ui-rgb), 0.08);
}

.events__item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.25em;
  padding: 12px 12px 10px;
  background: rgba(var(--ui-rgb), 0.02);
  border: 1px solid rgba(var(--ui-rgb), 0.06);
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
  position: relative;
  overflow: hidden;
}

.events__item:hover {
  transform: translateY(-1px);
  background: rgba(var(--ui-rgb), 0.035);
  border-color: rgba(var(--ui-rgb), 0.1);
}

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

.events__name {
  /* font-weight: 750; */
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.events__time {
  font-size: 12px;
  color: rgba(var(--ui-rgb), 0.62);
  flex: 0 0 auto;
}

.events__row2 {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(var(--ui-rgb), 0.74);
}

/* Level markers (left accent bar) */
.events__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(var(--ui-rgb), 0.12);
}

.events__item--down::before {
  background: rgba(255, 90, 90, 0.85);
}
.events__item--up::before {
  background: rgba(90, 255, 160, 0.85);
}
.events__item--info::before {
  background: rgba(255, 210, 120, 0.8);
}

/* -----------------------------------
   Desktop / Large Screens
   â‰¥ 1280px
----------------------------------- */
@media (min-width: 1280px) {
  .body__nav {
    flex: 0 0 20%;
    overflow: hidden;
    background-color: var(--secondary-bg-color);
  }
}

/* -----------------------------------
   Laptop / Small Desktop
   1024px â€“ 1279px
----------------------------------- */
@media (max-width: 1279px) {
  .body__main {
    padding: 1em;
    padding-bottom: calc(1em + 84px + env(safe-area-inset-bottom, 0px));
  }

  .body__nav {
    position: fixed;
    top: 0;
    left: -84%; /* versteckt */
    width: 84%; /* etwas schmaler, damit Close-Button frei bleibt */
    max-width: 90vw;
    height: 100vh;
    z-index: 1000;
    flex: none;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .nav__wrapper {
    height: 100vh;
    padding: 0.9rem;
    padding-bottom: calc(0.9rem + 84px + env(safe-area-inset-bottom, 0px));
  }

  .nav-groups__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-footer__brand {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .nav-footer__meta {
    gap: 0.38rem;
  }

  .nav-footer__legal {
    order: 1;
  }

  .nav-footer__copyright {
    order: 2;
  }

  .nav-footer__brand .logo__link {
    order: 3;
    width: min(170px, 58vw);
    align-self: flex-start;
    margin-top: 0.15rem;
  }

  .nav-group__edit-btn,
  .nav-group__add-sub-btn {
    opacity: 0.45;
  }

  .body__nav.is-open {
    left: 0;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
  }

  .body__main {
    transition: filter 0.3s ease;
  }

  .body__nav.is-open ~ .body__main {
    filter: blur(10px);
    pointer-events: none; /* verhindert Klicks hinterm MenÃ¼ */
    user-select: none;
  }

  .body__content {
    margin-left: 0;
  }

  .mobile-nav-bar {
    position: fixed;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(860px, calc(100vw - 18px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: var(--button-bg-color);
    background: color-mix(in srgb, var(--button-bg-color) 70%, #0a1320 30%);
    border: 1px solid rgba(var(--ui-rgb), 0.16);
    overflow: hidden;
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.35),
      0 1px 0 rgba(var(--ui-rgb), 0.06) inset;
    z-index: 900;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .mobile-nav-bar__btn {
    flex: 1 1 0;
    min-height: 3.25rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-inverse-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
      background-color 140ms ease,
      transform 140ms ease,
      color 140ms ease;
    touch-action: manipulation;
    position: relative;
  }

  .mobile-nav-bar__btn + .mobile-nav-bar__btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24%;
    width: 1px;
    height: 52%;
    background: rgba(var(--ui-rgb), 0.2);
    pointer-events: none;
  }

  .mobile-nav-bar__btn:hover {
    background: rgba(var(--ui-rgb), 0.09);
  }

  .mobile-nav-bar__btn.btn_nav_add--alert {
    color: var(--offline-color);
  }

  .mobile-nav-bar__btn:active {
    transform: scale(0.96);
  }

  .mobile-nav-bar__btn .icon {
    font-size: 1.28rem;
  }

  .mobile-nav-bar__btn--toggle {
    order: 99;
    margin-left: auto;
    flex: 0 0 3.3rem;
    max-width: 3.3rem;
    background: rgba(var(--ui-rgb), 0.13);
    border: 1px solid rgba(var(--ui-rgb), 0.24);
  }

  .mobile-nav-bar__btn--toggle:hover {
    background: rgba(var(--ui-rgb), 0.2);
  }

  .mobile-nav-toggle__icon {
    width: 1.32rem;
    height: 1.32rem;
    position: relative;
    display: inline-block;
  }

  .mobile-nav-toggle__line {
    position: absolute;
    left: 50%;
    width: 100%;
    height: 2.2px;
    border-radius: 99px;
    background: currentColor;
    transform: translateX(-50%);
    transition:
      transform 220ms ease,
      opacity 170ms ease;
  }

  .mobile-nav-toggle__line--top {
    top: 0.2rem;
  }

  .mobile-nav-toggle__line--mid {
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .mobile-nav-toggle__line--bot {
    bottom: 0.2rem;
  }

  .nav-toggle.is-open .mobile-nav-toggle__line--top {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-toggle.is-open .mobile-nav-toggle__line--mid {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.2);
  }

  .nav-toggle.is-open .mobile-nav-toggle__line--bot {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .nav-toggle {
    display: inline-flex;
    position: static;
    box-shadow: none;
  }

  .nav-toggle:active {
    transform: scale(0.96);
  }

  .main__dashboard {
    flex-direction: column;
  }

  .dashboard__status {
    order: 1;
  }

  .dashboard__monitors {
    order: 2;
  }

  .body__wrapper {
    height: auto;
  }
}

/* -----------------------------------
   Tablet Landscape
   768px â€“ 1023px
----------------------------------- */
@media (max-width: 1023px) {
}

/* -----------------------------------
   Tablet Portrait / Large Phones
   600px â€“ 767px
----------------------------------- */
@media (max-width: 767px) {
  .theme-preference__options {
    grid-template-columns: 1fr;
  }

  .list__item__name {
    flex: 1 1 auto;
    min-width: 0;
  }

  .item__name__group,
  .item__name__title a,
  .item__name__detials {
    max-width: 100%;
  }

  .monitor__data__grid {
    grid-template-columns: 1fr;
    grid-row-gap: 1em;
    grid-column-gap: 0;
  }

  .monitor__data__status {
    grid-area: auto;
  }

  .monitor__data__lastcheck {
    grid-area: auto;
  }

  .monitor__data__statusbar {
    grid-area: auto;
  }

  .monitor__data__lastdays {
    grid-area: auto;
  }

  .monitor__data__incidents {
    grid-area: auto;
    overflow: hidden;
  }
  .monitor__data__lastdays_wrapper {
    flex-direction: column;
    gap: 2em;
  }

  .table_component {
    overflow-x: scroll;
  }
}

/* -----------------------------------
   Smartphones
   â‰¤ 599px
----------------------------------- */
@media (max-width: 599px) {
  body {
    font-size: 16px;
  }

  .list__item {
    max-width: 100%;
    overflow: hidden;
  }

  .monitors__listview .list__item__wrapper {
    padding: 14px 14px;
    gap: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(108px, 40vw);
    align-items: stretch;
  }

  /* Name-Spalte wird flexibel (kein fixed width auf mobile) */
  .list__item__name {
    flex: 1 1 auto;
    min-width: 0;
  }

  .item__name__title a {
    font-size: 1.05rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .item__name__group {
    font-size: 0.72rem;
    margin-bottom: 2px;
    max-width: 100%;
  }

  .item__name__detials {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* Statusbar rechts kompakt */
  .list__item__statusbar {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    align-self: stretch;
  }

  .list__item__statusbar .item__statusbar__wrapper {
    width: 100%;
    min-width: 0;
    height: 100%;
    align-items: stretch;
  }

  .list__item__statusbar .statusbar__bars {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    height: 100%;
    min-height: 56px;
    /* gap: 1px; */
    align-items: stretch;
  }

  .list__item__statusbar .statusbar__bar {
    width: auto;
    min-width: 0;
    height: 100%;
    border-radius: 2px;
  }

  /* Overall-Uptime auf mobile ausblenden, um Overflow zu vermeiden */
  .list__item__statusbar .statusbar__overall {
    display: none;
  }

  /* Actions reservieren wir auf mobile nicht */
  .list__item__actions {
    display: none;
  }

  .monitor__data__grid__item__content {
    overflow: hidden;
  }

  .auth_wrapper {
    width: 100%;
  }

  input,
  textarea,
  select {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.75em;
  }

  .input_button {
    width: 100%;
    font-size: 1.1rem;
    padding: 1em;
  }
}

.page-maintenance .maintenance-shell {
  min-height: calc(100vh - 84px);
  display: grid;
  align-items: center;
  justify-items: center;
}

.maintenance-panel {
  width: min(900px, 100%);
}

.maintenance-alert {
  margin-top: 1rem;
}

.admin-maintenance-card {
  width: min(820px, 100%);
}

.admin-maintenance-form {
  gap: 1.1rem;
}

.admin-maintenance-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-maintenance-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-maintenance-field > span {
  display: block;
}

.admin-maintenance-field input[type="text"],
.admin-maintenance-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

.admin-maintenance-field textarea {
  min-height: 180px;
  resize: vertical;
}

.pricing-plan__cta.is-disabled {
  pointer-events: none;
  opacity: 0.65;
  cursor: not-allowed;
}

/* Privacy Analytics */
.analytics-admin {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-admin__header,
.analytics-panel__header,
.analytics-admin__periods,
.analytics-chart__legend {
  display: flex;
  align-items: center;
}

.analytics-admin__header,
.analytics-panel__header {
  justify-content: space-between;
  gap: 1rem;
}

.analytics-admin__periods {
  gap: 0.4rem;
  flex-wrap: wrap;
}

.analytics-admin__period {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border-color, #d8dde6);
  border-radius: 0.45rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.8rem;
}

.analytics-admin__period:hover,
.analytics-admin__period.is-active {
  border-color: #2979ff;
  background: rgba(41, 121, 255, 0.12);
}

.analytics-panel {
  padding: 1rem;
  border: 1px solid var(--border-color, #d8dde6);
  border-radius: 0.75rem;
  background: var(--card-background, rgba(255, 255, 255, 0.04));
}

.analytics-panel h2,
.analytics-panel p {
  margin: 0;
}

.analytics-panel h2 {
  font-size: 1rem;
}

.analytics-panel__header p {
  margin-top: 0.2rem;
  opacity: 0.7;
  font-size: 0.78rem;
}

.analytics-chart {
  position: relative;
  min-height: 260px;
  margin-top: 1rem;
}

.analytics-chart svg {
  display: block;
  width: 100%;
  height: 260px;
  overflow: visible;
}

.analytics-chart__axis {
  stroke: currentColor;
  opacity: 0.2;
}

.analytics-chart__line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.analytics-chart__line.is-pageviews,
.analytics-chart__legend i.is-pageviews {
  stroke: #2979ff;
  background: #2979ff;
}

.analytics-chart__line.is-visitors,
.analytics-chart__legend i.is-visitors {
  stroke: #20b486;
  background: #20b486;
}

.analytics-chart__legend {
  gap: 0.9rem;
  font-size: 0.75rem;
}

.analytics-chart__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.analytics-chart__legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.analytics-chart__scale {
  display: flex;
  justify-content: space-between;
  margin: -0.6rem 1.75rem 0;
  opacity: 0.65;
  font-size: 0.72rem;
}

.analytics-admin__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
}

.analytics-table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #d8dde6);
  text-align: right;
}

.analytics-table th:first-child,
.analytics-table td:first-child {
  text-align: left;
}

.analytics-table th {
  opacity: 0.65;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analytics-empty {
  padding: 1.4rem 0 0.4rem;
  opacity: 0.7;
}

.analytics-privacy ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
}

.analytics-privacy li {
  margin: 0.45rem 0;
  line-height: 1.4;
}

.analytics-privacy__retention,
.analytics-privacy__since {
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-color, #d8dde6);
  opacity: 0.7;
  font-size: 0.75rem;
  line-height: 1.5;
}

.analytics-privacy__since {
  margin-top: 0.7rem !important;
}

@media (max-width: 900px) {
  .analytics-admin__header,
  .analytics-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-admin__grid {
    grid-template-columns: 1fr;
  }

  .analytics-chart__legend {
    flex-wrap: wrap;
  }
}

/* SMTP-Profil-, Failover- und Notfallverwaltung */
.smtp-admin {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.smtp-admin__header { order: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.smtp-admin__overview { order: 1; }
.smtp-admin__warnings { order: 2; }
.smtp-admin__section[aria-labelledby="smtpProfilesTitle"] { order: 3; }
.smtp-admin__columns { order: 4; }
.smtp-admin__section[aria-labelledby="smtpDeliveryTitle"] { order: 5; }
.smtp-admin__audit { order: 6; }

.smtp-admin__header-actions,
.smtp-admin__actions,
.smtp-admin__order-actions,
.smtp-admin__recipient-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.smtp-admin__header-actions .input_button,
.smtp-admin__header-actions .admin-users-action,
.smtp-admin__test-form .input_button,
.smtp-admin__daily-test .admin-users-action,
.smtp-admin__notify-button,
.smtp-admin__section-heading > .admin-users-action,
.smtp-admin__recipient-meta .admin-users-action {
  width: auto;
  min-width: 118px;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1.2;
}

.smtp-admin__header-actions .input_button {
  min-width: 150px;
}

.smtp-admin__test-form .input_button {
  min-width: 160px;
}

.smtp-admin__overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.smtp-admin-stat,
.smtp-admin__section,
.smtp-admin__audit {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--secondary-bg-color);
}

.smtp-admin-stat {
  display: flex;
  min-width: 0;
  padding: 14px;
  flex-direction: column;
  gap: 5px;
}

.smtp-admin-stat > span,
.smtp-admin__test-form label > span {
  color: var(--text-label-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.smtp-admin-stat strong { overflow: hidden; color: var(--text-color); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.smtp-admin-stat strong.is-ok { color: var(--online-color); }
.smtp-admin-stat strong.is-error { color: var(--offline-color); }
.smtp-admin-stat small { color: var(--text-meta-color); font-size: 0.75rem; line-height: 1.35; }

.smtp-admin__warnings { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid rgba(241, 140, 42, 0.42); border-radius: 8px; background: rgba(241, 140, 42, 0.08); color: var(--text-meta-strong-color); font-size: 0.82rem; }
.smtp-admin__warnings strong { color: #f18c2a; }

.smtp-admin__section { min-width: 0; padding: 15px; }
.smtp-admin__section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.smtp-admin__section-heading h2,
.smtp-admin__section-heading p { margin: 0; }
.smtp-admin__section-heading h2 { font-size: 1.03rem; }
.smtp-admin__section-heading p,
.smtp-admin__section-heading > span { margin-top: 3px; color: var(--text-meta-color); font-size: 0.76rem; }

.smtp-admin-table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle-color); border-radius: 7px; }
.smtp-admin-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 0.82rem; }
.smtp-admin-table--profiles { min-width: 1080px; }
.smtp-admin-table th,
.smtp-admin-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-subtle-color); text-align: left; vertical-align: middle; }
.smtp-admin-table th { background: rgba(var(--ui-rgb), 0.025); color: var(--text-label-color); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.smtp-admin-table tbody tr:last-child td { border-bottom: 0; }
.smtp-admin-table tbody tr:hover { background: rgba(var(--ui-rgb), 0.025); }
.smtp-admin-table tbody tr.is-disabled { opacity: 0.58; }
.smtp-admin-table .is-actions { text-align: right; }

.smtp-admin__identity,
.smtp-admin__role-order { display: flex; min-width: 145px; flex-direction: column; gap: 4px; }
.smtp-admin__identity strong { color: var(--text-color); font-size: 0.9rem; }
.smtp-admin__identity span,
.smtp-admin__identity small,
.smtp-admin__cell-note { color: var(--text-meta-color); }
.smtp-admin__cell-note { display: block; margin-top: 4px; font-size: 0.71rem; white-space: nowrap; }

.smtp-role-badge { display: inline-flex; width: fit-content; padding: 3px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.02em; text-transform: uppercase; }
.smtp-role-badge--standard,
.smtp-role-badge--normal { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.13); color: #7dc4ff; }
.smtp-role-badge--backup { border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.13); color: #c9a7ff; }
.smtp-role-badge--emergency { border-color: rgba(223, 72, 74, 0.4); background: rgba(223, 72, 74, 0.13); color: #ef7779; }

.smtp-admin__order-actions form,
.smtp-admin__actions form { margin: 0; }
.smtp-admin__order-actions button { width: 27px; height: 25px; padding: 0; border: 1px solid var(--border-color); border-radius: 4px; background: transparent; color: var(--text-meta-strong-color); cursor: pointer; }
.smtp-admin__order-actions button:hover { background: var(--button-ghost-hover-bg-color); color: var(--text-color); }
.smtp-admin__actions { justify-content: flex-end; white-space: nowrap; }
.smtp-admin__error-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smtp-admin__table-empty { padding: 24px !important; color: var(--text-meta-color); text-align: center !important; }

.smtp-admin__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.smtp-admin__recipient-list { display: grid; gap: 7px; }
.smtp-admin__recipient { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--border-subtle-color); border-radius: 6px; background: rgba(var(--ui-rgb), 0.02); }
.smtp-admin__recipient > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.smtp-admin__recipient strong { font-size: 0.84rem; }
.smtp-admin__recipient span { color: var(--text-meta-color); font-size: 0.72rem; }
.smtp-admin__compact-empty { padding: 22px; color: var(--text-meta-color); text-align: center; }

.smtp-admin__test-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; }
.smtp-admin__test-form label { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.smtp-admin__test-form input { width: 100%; box-sizing: border-box; }
.smtp-admin__daily-test { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid var(--border-subtle-color); border-radius: 6px; }
.smtp-admin__daily-test > div { display: flex; flex-direction: column; gap: 3px; }
.smtp-admin__daily-test strong { font-size: 0.82rem; }
.smtp-admin__daily-test span { color: var(--text-meta-color); font-size: 0.7rem; }
.smtp-admin__notify-button { width: 100%; margin-top: 10px; }

.smtp-admin__audit { overflow: hidden; }
.smtp-admin__audit summary { padding: 12px 15px; color: var(--text-meta-strong-color); font-size: 0.79rem; font-weight: 650; cursor: pointer; }
.smtp-admin__audit[open] summary { border-bottom: 1px solid var(--border-subtle-color); }
.smtp-admin__audit .smtp-admin-table-wrap { border: 0; border-radius: 0; }

.smtp-admin-modal { order: 10; }
.smtp-admin-modal__dialog--small { width: min(520px, 94vw); }
.smtp-admin__settings-grid { margin-top: 16px; }
.smtp-admin-modal .admin-user-modal__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.smtp-admin-modal .admin-user-modal__scroll { max-height: calc(90vh - 90px); }
.smtp-admin-modal [hidden] { display: none !important; }

@media (max-width: 1150px) {
  .smtp-admin__overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smtp-admin__columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .smtp-admin__header { align-items: stretch; flex-direction: column; }
  .smtp-admin__header-actions { align-items: stretch; flex-direction: column; }
  .smtp-admin__overview { grid-template-columns: 1fr; }
  .smtp-admin__section-heading { align-items: flex-start; flex-direction: column; }
  .smtp-admin__test-form { grid-template-columns: 1fr; }
  .smtp-admin__daily-test,
  .smtp-admin__recipient { align-items: stretch; flex-direction: column; }
  .smtp-admin__recipient-meta { justify-content: space-between; }
  .smtp-admin-modal .admin-user-modal__options { grid-template-columns: 1fr; }
}
