@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #061722;
  --side: #081d2b;
  --surface: #0c2535;
  --surface-2: #102e42;
  --surface-3: #15384f;
  --line: rgba(243, 239, 231, 0.075);
  --line-strong: rgba(243, 239, 231, 0.13);
  --text: #f3efe7;
  --text-2: #a9bcc8;
  --text-3: #7591a2;
  --accent: #32a2c1;
  --accent-soft: rgba(50, 162, 193, 0.16);
  --ok: #3ccf8e;
  --warn: #f2b24c;
  --down: #f0605a;
  --idle: #5f7b8c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px -12px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(50, 162, 193, 0.35); color: var(--text); }
input, button { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 0.92em; letter-spacing: -0.01em; }
.muted { color: var(--text-3); }
.t-down { color: var(--down); }
.t-warn { color: var(--warn); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }

/* ---------- Shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  padding: 16px 16px 16px 0;
  background: var(--side);
}
.side {
  position: sticky; top: 16px;
  display: flex; flex-direction: column; gap: 14px;
  height: calc(100vh - 32px);
  padding: 0 14px 0 16px;
}
.team {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.team img { border-radius: 10px; }
.team div { display: grid; line-height: 1.25; }
.team span { color: var(--text-3); font-size: 12px; }
.team strong { font-weight: 560; font-size: 15px; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.search:focus-within { border-color: var(--accent); background: var(--surface-2); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 12px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: rgba(243, 239, 231, 0.04); color: var(--text); }
.nav a.is-active { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.nav a.is-active .i { color: var(--accent); }
.nav .i-ext { width: 14px; height: 14px; margin-left: auto; opacity: 0; transition: opacity .2s; }
.nav a:hover .i-ext { opacity: .7; }
.side-group { margin-top: 8px; }
.side-label { margin: 0 0 6px; padding: 0 12px; color: var(--text-3); font-size: 12.5px; }

.side-user {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px 4px 10px;
  border-top: 1px solid var(--line);
}
.avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.who { display: grid; line-height: 1.2; flex: 1; }
.who strong { font-weight: 550; }
.who span { color: var(--text-3); font-size: 12px; }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 8px; background: none; color: var(--text-3);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.main {
  min-width: 0;
  padding: 26px 32px 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* ---------- Kopf ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.crumb-home { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 8px; }
.crumb-home .i { width: 16px; height: 16px; }
.i-sep { width: 14px; height: 14px; color: var(--text-3); }
.crumb-current { padding: 4px 10px; background: var(--surface-2); border-radius: 7px; color: var(--text); }

.page-head { margin: 26px 0 18px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.summary { margin: 10px 0 0; color: var(--text-2); }
.summary strong { color: var(--text); font-weight: 560; font-variant-numeric: tabular-nums; }
.dot-sep { display: inline-block; width: 3px; height: 3px; margin: 0 10px; vertical-align: middle; border-radius: 50%; background: var(--text-3); }

/* ---------- Vitals ---------- */
.vitals {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.vital {
  position: relative;
  display: grid; align-content: start; gap: 4px;
  min-height: 96px; padding: 14px 16px 12px;
}
.vital + .vital { border-left: 1px solid var(--line); }
.v-label { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 12.5px; }
.v-label .i { width: 15px; height: 15px; }
.v-value { font-size: 19px; font-weight: 560; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-of { color: var(--text-3); font-weight: 450; font-size: 14px; }
.v-note { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 26px; margin-top: 2px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.meter { display: block; height: 6px; margin-top: 10px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .6s var(--ease); }
.meter-lg { height: 8px; margin: 8px 0 2px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: 11px; }
.tabs button {
  height: 34px; padding: 0 14px;
  border: 0; border-radius: 8px; background: none; color: var(--text-3);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected='true'] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.toolbar-sep { width: 1px; height: 26px; margin: 0 6px; background: var(--line-strong); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 10px;
  font-weight: 500;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost[aria-pressed='true'] { background: rgba(240, 96, 90, 0.14); border-color: rgba(240, 96, 90, 0.35); color: var(--text); }
.btn-ghost[aria-pressed='true'] .i { color: var(--down); }
.btn .i { width: 17px; height: 17px; }
.is-busy .i { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--accent); color: #04141e; font-weight: 600; }
.btn-primary:hover { background: #45b3d1; }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-block { width: 100%; height: 46px; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { padding: 12px 10px 10px; background: rgba(12, 37, 53, 0.55); border: 1px solid var(--line); border-radius: 16px; }
.col-head { display: flex; align-items: center; gap: 9px; padding: 2px 6px 12px; }
.col-head h2 { margin: 0; font-size: 14.5px; font-weight: 550; }
.col-bar { width: 3px; height: 16px; border-radius: 3px; background: var(--idle); }
.bar-ok { background: var(--ok); } .bar-warn { background: var(--warn); } .bar-down { background: var(--down); }
.count { padding: 1px 7px; background: var(--surface-3); border-radius: 6px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.cards { display: grid; gap: 10px; }

.card {
  position: relative;
  display: grid; gap: 10px;
  padding: 0 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
a.card:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
a.card:hover .i-ext { opacity: .8; }
.card.lvl-down { border-color: rgba(240, 96, 90, 0.4); }
.card.lvl-warn { border-color: rgba(242, 178, 76, 0.35); }

/* Signatur: die Statusleiste ist der Verlauf der letzten Checks */
.trail { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin: 0 -14px; height: 3px; }
.seg { display: block; background: var(--surface-3); }
.seg-ok { background: var(--ok); } .seg-warn { background: var(--warn); } .seg-down { background: var(--down); } .seg-idle { background: var(--idle); }
.seg-none { background: rgba(243, 239, 231, 0.05); }
.lvl-ok .seg-ok { opacity: .55; }
.lvl-ok .seg-ok:last-child { opacity: 1; }

.card-meta { padding: 9px 0 9px; margin: 0 -14px; padding-inline: 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 550; letter-spacing: -0.01em; }
.card-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-ico { color: var(--text-3); width: 17px; height: 17px; }
.card .i-ext { width: 14px; height: 14px; margin-left: auto; opacity: 0; color: var(--text-3); transition: opacity .2s; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.chip { background: var(--surface-3); color: var(--text-2); }
.status { background: rgba(243, 239, 231, 0.06); color: var(--text); }
.pip { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.st-ok .pip { background: var(--ok); box-shadow: 0 0 0 3px rgba(60, 207, 142, 0.16); }
.st-warn { background: rgba(242, 178, 76, 0.13); } .st-warn .pip { background: var(--warn); }
.st-down { background: rgba(240, 96, 90, 0.15); } .st-down .pip { background: var(--down); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 96, 90, .5); } 100% { box-shadow: 0 0 0 7px rgba(240, 96, 90, 0); } }
.card-foot { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-foot > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.card-foot .i { width: 13px; height: 13px; }
.foot-end { margin-left: auto; }
.card-detail { margin: -2px 0 0; padding: 7px 10px; background: rgba(240, 96, 90, 0.08); border-radius: 8px; color: #f6b3ae; font-size: 12.5px; }
.lvl-warn .card-detail { background: rgba(242, 178, 76, 0.08); color: #f6d39a; }
.empty { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 22px 0; color: var(--text-3); font-size: 13px; }
.empty .i { color: var(--ok); width: 16px; height: 16px; }

/* ---------- Liste ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { color: var(--text-3); font-weight: 500; font-size: 12.5px; background: rgba(16, 46, 66, 0.5); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: rgba(243, 239, 231, 0.025); }
.table tbody th { font-weight: 550; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.row-host { display: block; margin-top: 2px; color: var(--text-3); font-weight: 400; font-size: 12px; }
.row-detail { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.num { text-align: right !important; white-space: nowrap; }

/* ---------- Server ---------- */
.server { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.panel { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.panel h2 .i { width: 16px; height: 16px; }
.big { margin: 0; font-size: 24px; font-weight: 560; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.panel-note { margin: 8px 0 0; color: var(--text-3); font-size: 12.5px; }
.span-2 { grid-column: span 2; } .span-4 { grid-column: 1 / -1; }
.chart { display: block; width: 100%; height: 120px; }
.chart polyline { fill: none; stroke: var(--accent); stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.chart .area { fill: rgba(50, 162, 193, 0.1); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--text-3); font-size: 11.5px; }
.containers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.containers li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.containers .status { height: auto; padding: 0; background: none; }
.containers .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ---------- Login ---------- */
.login-body {
  display: grid; place-items: center; min-height: 100vh; padding: 24px 16px;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(50, 162, 193, 0.14), transparent 60%),
    var(--bg);
}
.login {
  width: min(400px, 100%);
  padding: 30px 30px 24px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand img { border-radius: 14px; }
.login-brand div { display: grid; line-height: 1.25; }
.login-team { color: var(--text-3); font-size: 12.5px; }
.login-brand strong { font-size: 16px; font-weight: 560; }
.login h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.025em; }
.login-lead { margin: 6px 0 22px; color: var(--text-2); }
.login-error {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 18px; padding: 10px 12px;
  background: rgba(240, 96, 90, 0.1); border: 1px solid rgba(240, 96, 90, 0.35); border-radius: 10px;
  color: #f8c6c2; font-size: 13.5px;
}
.login-error .i { color: var(--down); width: 17px; height: 17px; margin-top: 1px; }
.login-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span:first-child { color: var(--text-2); font-size: 13px; font-weight: 500; }
.input {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 6px 0 13px;
  background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 11px;
  color: var(--text-3);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text-2); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); caret-color: var(--accent); }
.input input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px var(--bg) inset; caret-color: var(--accent); }
.reveal { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--text-3); }
.reveal:hover { background: var(--surface-2); color: var(--text); }
.reveal .i-hide, .reveal[aria-pressed='true'] .i-show { display: none; }
.reveal[aria-pressed='true'] .i-hide { display: block; }
.login-form .btn-primary { margin-top: 6px; }
.login-foot { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vital:nth-child(4) { border-left: 0; }
  .vital:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 0; background: var(--bg); }
  .side { position: static; height: auto; padding: 14px 16px 0; }
  .side-group, .side-user .who span { display: none; }
  .side .nav:not(.nav-links) { display: none; }
  .side-user { position: absolute; top: 18px; right: 16px; margin: 0; padding: 0; border: 0; }
  .side-user .who { display: none; }
  .team { margin-right: 92px; }
  .main { padding: 18px 16px 40px; border: 0; border-radius: 0; }
  .page-head { margin-top: 18px; }
  .page-head h1 { font-size: 26px; }
  .board, .server { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vital:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .vital:nth-child(-n + 2) { border-top: 0; }
  .vital:nth-child(even) { border-left: 1px solid var(--line); }
  .vital:last-child { grid-column: 1 / -1; border-left: 0; }
  .toolbar-sep { display: none; }
  .toolbar .btn span { display: none; }
  .toolbar .btn { width: 40px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
