:root {
  --bg: #090c11;
  --card: #0d1119;
  --card-2: #11151d;
  --line: #171c26;
  --text: #c5cad3;
  --text-strong: #d3d7de;
  --muted: #6f7f9e;
  --green: #4cd880;
  --green-dark: #0a2a17;
  --yellow: #f5c542;
  --red: #f0605d;
  --none: #232a38;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1800px; margin: 0 auto; padding: 0 clamp(16px, 6.2vw, 91px) 60px clamp(16px, 5.15vw, 76px); }

/* Kopf */
.brand { display: flex; align-items: center; gap: 18px; padding: 20px 0 0; height: 82px; }
.brand img { height: 42px; width: auto; display: block; }
.brand span { font-size: 30px; font-weight: 300; color: #b9bec8; letter-spacing: .2px; }

/* Gesamtstatus */
.banner {
  margin-top: 12px; background: var(--card); border-radius: var(--radius);
  padding: 0 24px; height: 85px; display: flex; align-items: center; gap: 12px;
  font-size: 24px; font-weight: 700; color: var(--text-strong);
}
.banner svg { width: 25px; height: 25px; flex: none; }

/* Abschnitte */
.section { margin-top: 37px; }
.banner + .section { margin-top: 29px; }
.section-head { display: flex; align-items: center; justify-content: space-between; height: 54px; margin-bottom: 11px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 300; color: var(--text-strong); }
.card {
  background: var(--card); border-radius: var(--radius); padding: 25px 25px 0; display: flow-root;
}
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) 608px; column-gap: 20px;
  margin-bottom: 32px;
}
.row:last-child { margin-bottom: 24px; }
.row .name { display: flex; align-items: flex-start; gap: 6px; font-size: 16px; color: var(--text); min-width: 0; }
.row .name .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 0; }
.pill {
  flex: none; min-width: 62px; height: 20px; border-radius: 10px; padding: 0 12px; margin-right: 2px;
  background: var(--green); color: #04210f; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.pill.yellow { background: var(--yellow); color: #2a1d00; }
.pill.red { background: var(--red); color: #2c0605; }
.pill.none { background: var(--none); color: #8b97b0; }
.bars { display: flex; justify-content: space-between; height: 16px; width: 600px; margin-top: 3px; }
.bars i { display: block; width: 4px; height: 16px; border-radius: 2px; background: var(--green); }
.bars i.degraded { background: var(--yellow); }
.bars i.down { background: var(--red); }
.bars i.none { background: var(--none); }
.axis { display: flex; justify-content: space-between; width: 608px; padding-right: 0; font-size: 11px; color: var(--muted); margin-top: 7px; }
.axis span:last-child { margin-right: 0; }
.empty { padding: 4px 0 24px; color: var(--muted); }

/* Sortier-Dropdown */
.sort { position: relative; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px 0 7px;
  background: #11151d; border: 0; border-radius: 10px; cursor: pointer; color: #4c566a;
}
.sort-btn svg { width: 11px; height: 11px; display: block; }
.sort-btn .on { color: var(--green); }
.sort-btn .dir-desc svg { transform: rotate(180deg); }
.sort-btn .caret { width: 8px; height: 8px; color: #c5cad3; margin-left: 1px; }
.sort-menu {
  display: none; position: absolute; right: 0; top: 28px; z-index: 20; min-width: 146px;
  background: #0f131b; border: 1px solid #151a24; border-radius: 10px; padding: 6px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.sort.open .sort-menu { display: block; }
.sort-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  background: none; border: 0; color: #c5cad3; font: inherit; font-size: 15px; text-align: left;
  padding: 6px 16px; cursor: pointer;
}
.sort-menu button:hover { background: #151a24; }
.sort-menu .arrow { color: var(--green); width: 12px; height: 12px; visibility: hidden; }
.sort-menu button.active .arrow { visibility: visible; }
.sort-menu button.active .arrow.desc { transform: rotate(180deg); }

/* Meldungen */
.ann { background: var(--card); border-radius: var(--radius); padding: 20px 25px; margin-top: 14px; border-left: 4px solid var(--red); }
.ann.yellow { border-left-color: var(--yellow); }
.ann.green { border-left-color: var(--green); }
.ann h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.badge { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 10px; background: var(--red); color: #2c0605; }
.badge.yellow { background: var(--yellow); color: #2a1d00; }
.badge.green { background: var(--green); color: #04210f; }
.ann .when { color: var(--muted); font-size: 12px; margin-top: 8px; }
.msgs { margin-top: 12px; border-top: 1px solid var(--line); }
.msg { padding: 10px 0 0; }
.msg .when { margin: 0 0 2px; }
.msg div:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }

.footer { margin-top: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.footer a { color: #55627f; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; row-gap: 10px; }
  .bars, .axis { width: 100%; max-width: 608px; }
  .row .name .t { white-space: normal; }
}
@media (max-width: 640px) {
  .banner { font-size: 19px; height: 72px; padding: 0 16px; }
  .card { padding: 18px 16px 4px; }
  .bars i { width: 3px; }
  .brand span { font-size: 24px; }
}
