/* Shared styles for the monitoring SaaS. Bootstrap 5.3 does the heavy lifting;
   this file only adds what the dashboard needs. */

[data-bs-theme="light"] body { background: #f5f6f8; }

/* Platform admin console gets a distinct nav so it is never mistaken for a
   tenant's own view. */
.navbar-admin { background-color: #4c1d95 !important; }

/* Server list -------------------------------------------------------------- */
.status-dot { width: .65rem; height: .65rem; border-radius: 50%; display: inline-block; flex: none; }
.status-online  { background: #198754; box-shadow: 0 0 0 3px rgba(25,135,84,.18); }
.status-offline { background: #dc3545; box-shadow: 0 0 0 3px rgba(220,53,69,.18); }
.status-maint   { background: #ffc107; box-shadow: 0 0 0 3px rgba(255,193,7,.18); }

.mini-bar { height: .55rem; }
.usage-lines small { line-height: 1.15; }
.usage-lines > div + div { margin-top: .15rem; }

.server-row:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
/* A server with a firing alert. Bootstrap ships .table-danger but no subtle
   table variant, so tint the cells with the theme's own subtle danger colour —
   readable in light and dark, and hover still wins over it. */
.server-row.table-danger-subtle > td { --bs-table-bg-type: var(--bs-danger-bg-subtle); }
.srv-val { font-variant-numeric: tabular-nums; }
.srv-metric-label { width: 2.4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.srv-metric-val { width: 3.4rem; font-variant-numeric: tabular-nums; }
.srv-actions .btn { padding: .15rem .45rem; font-size: .75rem; line-height: 1.2; }

.srv-empty {
  border: 1.5px dashed var(--bs-border-color);
  border-radius: .75rem;
  padding: 3.5rem 1rem;
  text-align: center;
}
.srv-empty-title { font-weight: 600; margin-bottom: .25rem; }

/* Install / update command blocks ----------------------------------------- */
pre.install-cmd {
  background: #1c1f23;
  color: #8be9fd;
  padding: .75rem;
  border-radius: .375rem;
  user-select: all;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 0;
}

/* Secret shown exactly once (API token, regenerated agent token). */
.secret-once {
  font-family: var(--bs-font-monospace);
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .375rem;
  padding: .5rem .75rem;
  user-select: all;
  word-break: break-all;
}

/* Server detail ------------------------------------------------------------ */
#serverModal .modal-dialog { max-width: 1100px; }
.sysinfo-grid > div { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pricing ------------------------------------------------------------------ */
.plan-card { height: 100%; }
.plan-card.plan-current { border-color: var(--bs-primary); border-width: 2px; }
.plan-price { font-size: 2.1rem; font-weight: 700; line-height: 1; }
.plan-features { list-style: none; padding-left: 0; margin-bottom: 0; }
.plan-features li { padding: .3rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.plan-features li:last-child { border-bottom: 0; }

/* Plan comparison table (pricing.php) — the first column stays put while the
   plan columns scroll on narrow screens. */
.compare-table th, .compare-table td { white-space: nowrap; vertical-align: middle; }
.compare-table tbody th[scope="row"] { font-weight: 500; }
.compare-table .plan-col-current { background: var(--bs-primary-bg-subtle); }

/* Marketing landing -------------------------------------------------------- */
.hero { padding: 4rem 0 3rem; }
.hero h1 { font-weight: 700; letter-spacing: -.02em; }

.feature-icon {
  width: 2.4rem; height: 2.4rem; border-radius: .6rem; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary); font-size: 1.15rem;
}
.step-num {
  width: 2rem; height: 2rem; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-primary); color: #fff; font-weight: 700;
}
.site-footer { border-top: 1px solid var(--bs-border-color); margin-top: 4rem; padding-top: 1.5rem; }

/* Signed-out auth pages (chrome 'auth': centred card, no app nav) ----------- */
.auth-wrap { max-width: 26rem; margin: 1.5rem auto 0; }
.auth-brand { font-weight: 700; font-size: 1.2rem; color: inherit; text-decoration: none; }
.auth-brand:hover { color: var(--bs-primary); }

@media (max-width: 575.98px) {
  .srv-add { width: 100%; }
  .srv-add .form-control { flex: 1; }
}
