.fleet-chart {
  margin: 18px 0 0;
  padding: 18px 20px 16px;
  border: 1px solid #27384b;
  border-radius: 13px;
  background: #111d2e;
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #afc0d0;
  font-size: 11px;
}

.chart-legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-swatch { width: 8px; height: 8px; border-radius: 2px; }
.chart-swatch.cpu, .chart-bar.cpu { background: #63c5fa; }
.chart-swatch.memory, .chart-bar.memory { background: #5cdbb5; }
.chart-swatch.disk, .chart-bar.disk { background: #f4b66f; }

.chart-scroll { overflow-x: auto; }
.chart-canvas {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 170px 29px;
  column-gap: 7px;
  min-width: 0;
}

.chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: #8097ad;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.chart-plot { position: relative; }
.chart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #2a3d50;
}
.chart-gridline:first-child, .chart-gridline:last-of-type { border-color: #385069; }

.chart-groups, .chart-names {
  display: grid;
  grid-template-columns: repeat(var(--server-count), minmax(0, 1fr));
}
.chart-groups { position: absolute; inset: 0; }
.chart-group {
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
}
.chart-bar {
  flex: 0 1 19px;
  width: 26%;
  min-width: 5px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}
.chart-bar.missing {
  background: #526376;
  opacity: .55;
}
.chart-name {
  align-self: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: #b7c9db;
  font-size: 11px;
}

.server-name { color: #e9f0fa; text-decoration: none; }
.server-name::after { content: "↗"; margin-left: 7px; color: #70cfc3; font-size: 13px; }
.server-name:hover { color: #8ee8d4; text-decoration: underline; }
.server-name:focus-visible { outline: 2px solid #70cfc3; outline-offset: 3px; border-radius: 3px; }

@media (max-width: 600px) {
  .fleet-chart { padding: 14px 11px 12px; margin: 14px 0 0; }
  .chart-heading { margin-bottom: 15px; }
  .chart-heading h2 { font-size: 14px; }
  .chart-legend { gap: 8px; font-size: 10px; }
  .chart-canvas { grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: 148px 31px; column-gap: 5px; }
  .chart-axis { font-size: 9px; }
  .chart-group { gap: 2px; padding: 0 2px; }
  .chart-bar { min-width: 4px; border-radius: 3px 3px 0 0; }
  .chart-name { font-size: 9px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  .top-actions { gap: 9px; }
  .top-actions .clock { display: none; }
}

.form-notice { color: #8de0c4; font-size: 12px; margin-top: 8px; }

.password-dialog {
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 27px;
  border: 1px solid #38516a;
  border-radius: 16px;
  background: #111e30;
  color: #e9f0fa;
  box-shadow: 0 30px 80px #0009;
}
.password-dialog::backdrop { background: #050b15c9; }
.password-dialog h2 { margin: 0 0 7px; font-size: 23px; }
.password-dialog p { margin: 0 0 22px; color: #9cb1c5; font-size: 13px; line-height: 1.5; }
.password-dialog label { display: block; margin: 14px 0 6px; color: #b6c8db; font-size: 12px; font-weight: 650; }
.password-dialog input { display: block; width: 100%; padding: 12px 13px; border: 1px solid #3a5067; border-radius: 9px; background: #0a1525; color: #fff; }
.password-dialog input:focus { outline: 2px solid #5ed9bd; outline-offset: 1px; }
.password-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.password-actions .primary-button { width: auto; margin: 0; display: inline-block; }
.password-actions .refresh-button { padding: 13px 15px; }

/* "Keep me signed in": beats the generic .login-card label/input rules in app.css */
.login-card .remember { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; font-weight: 500; cursor: pointer; }
.login-card .remember input { display: inline-block; width: 18px; height: 18px; flex: none; margin: 0; padding: 0; accent-color: #54cdbc; }

/* Supercheck jobs + monitors, between the server resources chart and the server cards.
   When the list is hidden, the server heading keeps the gap the list would have left. */
.checks.hidden + .section-heading { margin-top: 34px; }
.checks { margin: 18px 0 34px; padding: 18px 20px 8px; border: 1px solid #27384b; border-radius: 13px; background: #111d2e; }
.checks .chart-heading { margin-bottom: 8px; }
.checks-link { color: #7be0c2; font-size: 12px; text-decoration: none; white-space: nowrap; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #22344a; }
.check-list > .check-row:first-child { border-top: 0; }
.check-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check-name { color: #ebf3fa; font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-detail { color: #8ca1b4; font-size: 12px; line-height: 1.4; }
.check-badge { flex: none; border-radius: 99px; padding: 6px 10px; font-size: 11px; font-weight: 750; white-space: nowrap; background: #1c3940; color: #7be0c2; }
.check-badge.bad { background: #492c35; color: #ffa2a2; }
.check-badge.running { background: #263a57; color: #a9c8f7; }
.check-badge.idle { background: #26313f; color: #a7b8cb; }
.checks .empty-message { margin: 4px 0 12px; }
@media (max-width: 600px) {
  .checks { padding: 14px 13px 4px; margin: 14px 0 28px; }
  .checks.hidden + .section-heading { margin-top: 28px; }
  .checks .chart-heading h2 { font-size: 14px; }
}
