/* Shipyard pages.css — page-specific tweaks.
 * Most styling lives in components.css; this file is for layout/positioning
 * adjustments that only apply to specific routes. Kept intentionally small
 * in Phase 1; Phases 2–4 expand it per-page.
 */

/* ----- Login ----- */
.login {
  max-width: 24rem;
  margin: var(--s-7) auto;
  border-top: 3px solid var(--accent);
}
.login form { display: flex; flex-direction: column; gap: var(--s-3); }
.login button { width: 100%; margin-top: var(--s-2); }

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.login-logo {
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(0 2px 10px rgba(37, 99, 235, 0.45));
}
.login-wordmark {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.login h1 {
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: center;
  margin: 0 0 var(--s-1);
}
.login > p.hint { text-align: center; margin-top: 0; }

/* ----- Dashboard ----- */
p.actions { margin: var(--s-4) 0; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.page-header h1 { margin: 0; }
.page-header p.actions { margin: 0; }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-3) var(--s-4);
  box-shadow: var(--shadow-sm);
}
.kpi-value {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.1;
  color: var(--fg);
}
.kpi-value.kpi-ok    { color: var(--success); }
.kpi-value.kpi-error { color: var(--danger); }
.kpi-value.kpi-muted { color: var(--fg-muted); }
.kpi-label {
  margin-top: var(--s-1);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}

.dashboard-filters {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.dashboard-filters input[type="search"] {
  flex: 1 1 16rem;
  max-width: 24rem;
}
.chips { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.chip {
  padding: var(--s-1) var(--s-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg-muted);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { background: var(--surface-alt); color: var(--fg); }
.chip.active {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}

.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { padding: var(--s-1) var(--s-2); }

/* Grouped inline action buttons/forms inside a table cell. */
.inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.inline-actions form { margin: 0; }
.vm-test-result:not(:empty) { margin-top: var(--s-2); white-space: normal; }

/* ============================================================
   Remote Hosts (VMs) list — card layout
   ============================================================ */
.vm-list {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
}

.vm-card {
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.vm-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.vm-card-default { border-left: 3px solid var(--accent); }

.vm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.vm-identity { display: flex; align-items: flex-start; gap: var(--s-3); min-width: 0; }
.vm-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--fg-muted);
}
.vm-title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.vm-title strong { font-size: var(--text-base); }
.vm-id { margin-top: 0.15rem; }

.vm-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vm-actions form { margin: 0; }

/* Key/value details grid for connection info. */
.vm-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--s-3) var(--s-5);
  margin: var(--s-4) 0 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.vm-meta-item { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.vm-meta-item dt {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.vm-meta-item dd { margin: 0; min-width: 0; }
.vm-meta-item dd code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  font-size: var(--text-sm);
  white-space: nowrap;
  vertical-align: bottom;
}
.vm-service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--s-1, 0.25rem) var(--s-3);
}
.vm-service-list li { display: flex; align-items: center; gap: var(--s-2); }

/* Monitor-agent controls on each VM card. */
.vm-monitor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}
.vm-monitor-status { display: flex; align-items: center; gap: var(--s-2); }
.vm-monitor-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.vm-monitor-actions form { margin: 0; }
.badge-muted { opacity: 0.8; }

/* Test-connection result sits full-width below the card body. */
.vm-card .vm-test-result:not(:empty) { margin-top: var(--s-4); }
.vm-card .vm-test-result .alert { margin: 0; }
.mt-1 { margin-top: var(--s-1); }
.svc-name { display: flex; align-items: center; gap: var(--s-2); }
.svc-name > div { display: flex; flex-direction: column; }
.svc-name a { font-weight: 500; }
.svc-favicon { flex-shrink: 0; border-radius: var(--radius-sm); width: 36px; height: 36px; object-fit: cover; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ----- Tunnel page ----- */
dl.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-2) var(--s-4);
  margin: 0;
}
dl.kv dt { color: var(--fg-muted); font-size: var(--text-sm); }
dl.kv dd { margin: 0; }

/* ----- Service detail ----- */
.detail-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) {
  .detail-grid {
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    grid-auto-flow: row dense;
  }
  /* Left column stacks naturally: metadata, owners, then each .jobs card.
     The sticky rail lives in column 2 and spans every row.            */
  .detail-grid > .metadata,
  .detail-grid > .owners-card,
  .detail-grid > .external-settings-card,
  .detail-grid > .jobs {
    grid-column: 1;
    min-width: 0; /* allow the column to shrink so wide tables don't push out */
  }
  .detail-grid > .sticky-rail {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    position: sticky;
    top: calc(var(--nav-h) + var(--s-3));
    /* Prevent the rail from growing taller than the viewport, which would
       cause it to overlap left-column content when scrolling.          */
    max-height: calc(100vh - var(--nav-h) - var(--s-6));
    overflow-y: auto;
  }
}
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.action-buttons form { display: block; }
.action-buttons .btn,
.action-buttons .btn-primary,
.action-buttons .btn-danger,
.action-buttons button[type="submit"] {
  width: 100%;
  text-align: center;
}
.action-buttons h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0;
}
.action-buttons .btn-row {
  display: flex;
  flex-direction: row;
  gap: var(--s-2);
  width: 100%;
}
.action-buttons .btn-row > * {
  flex: 1 1 0;
  min-width: 0;
}
.action-buttons .btn-row form { width: 100%; }
.danger-heading {
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.sticky-rail hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s-3) 0;
}

/* ----- Deploy form ----- */
.deploy-form { display: flex; flex-direction: column; gap: var(--s-4); }
.deploy-form section.card h2 { margin-top: 0; }
.grid-2 {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}
@media (min-width: 36rem) {
  .grid-2 { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
}
.form-footer {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  padding-top: var(--s-2);
}

.creds-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--s-2);
}

/* ----- Env editor ----- */
.env-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 2fr) auto;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
}
.env-row input { width: 100%; }
[data-env-remove] { font-size: var(--text-lg); line-height: 1; }

/* ----- Audit ----- */
.audit-table td code { font-size: var(--text-xs); }
.audit-row.audit-error { background: color-mix(in srgb, var(--danger-bg) 35%, transparent); }
.pager {
  margin-top: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.pager [aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

/* ----- Admin: user detail ----- */
.user-detail-header .user-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin: var(--s-2) 0 0;
}
.user-detail-email {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.user-detail-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-top: var(--s-5);
}
@media (min-width: 48rem) {
  .user-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.user-detail-grid > .card { display: flex; flex-direction: column; }
.user-detail-grid > .card > :last-child { margin-top: auto; }
/* Neutralise the global `section + section` top margin so grid cards align. */
.user-detail-grid > section + section { margin-top: 0; }

/* Recent-activity audit table. */
.audit-table-wrap {
  margin-top: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
table.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  background: var(--surface);
}
table.audit-table th {
  padding: var(--s-2) var(--s-3);
  text-align: left;
  background: var(--surface-alt);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
table.audit-table td {
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.audit-table tbody tr:last-child td { border-bottom: 0; }
table.audit-table tbody tr:hover { background: var(--surface-alt); }
table.audit-table td code {
  font-size: var(--text-xs);
  background: var(--surface-alt);
  padding: 0.1rem var(--s-1);
  border-radius: var(--radius-sm);
}
.audit-time { white-space: nowrap; color: var(--fg-muted); }
.audit-actor { color: var(--fg-muted); }

dl.kv.kv-compact { gap: var(--s-1) var(--s-3); margin-bottom: var(--s-4); }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
}

.checkbox-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-4);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--s-2) var(--s-4);
}
.checkbox-list li { margin: 0; }
.checkbox-list label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  cursor: pointer;
  padding: var(--s-1) 0;
  font-size: var(--text-sm);
}
.checkbox-list label.checkbox input { accent-color: var(--accent); }

.danger-zone {
  border-color: var(--danger);
  border-top: 3px solid var(--danger);
}
.danger-zone .danger-heading { margin-top: 0; }

.audit-footer { margin-top: var(--s-3); }
.table-scroll { overflow-x: auto; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-4);
}
.filter-bar__group {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 10rem;
}
.filter-bar__group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-bar__group select {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-sm);
  min-width: 10rem;
}
.filter-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: 1px; /* align with select bottom border */
}

/* ----- Log viewer (jobs + service logs) ----- */
.log-viewer { padding: 0; overflow: hidden; }
.log-toolbar {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: wrap;
  padding: var(--s-2) var(--s-3);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.log-toolbar-top { border-bottom: 1px solid var(--border); }
.log-toolbar-group { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.log-toolbar-spacer { flex: 1 1 auto; }
.log-toolbar .btn {
  padding: var(--s-1) var(--s-3);
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}
.log-toolbar .btn svg { display: block; }
.log-toolbar .btn.active {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.log-toolbar .log-filter { flex: 0 1 24rem; max-width: 24rem; padding: var(--s-1) var(--s-2); width: auto; }
.log-toolbar .log-history-size {
  flex: 0 0 auto;
  width: auto;
  padding: var(--s-1) var(--s-2);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
}
.log-toolbar select, .log-toolbar input { width: auto; }
.log-toolbar .btn, .log-toolbar .log-status-pill { flex: 0 0 auto; }
.log-toolbar .log-status,
.log-toolbar .log-count { font-size: var(--text-xs); }

.log-status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.15rem var(--s-2);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
}
.log-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--surface-alt);
}
.log-status-dot.ok    { background: var(--success); animation: log-pulse 2s ease-in-out infinite; }
.log-status-dot.warn  { background: var(--warning); }
.log-status-dot.error { background: var(--danger); }
.log-status-dot.muted { background: var(--gray-400); }
@keyframes log-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.5); }
  50%      { box-shadow: 0 0 0 4px rgba(4, 120, 87, 0); }
}

.log-pane {
  margin: 0;
  padding: var(--s-3);
  min-height: 22rem;
  max-height: calc(100vh - 22rem);
  overflow: auto;
  background: var(--gray-900);
  color: #e5e7eb;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-color: var(--gray-600) transparent;
}
.log-pane.log-nowrap { white-space: pre; word-break: normal; }
@media (prefers-color-scheme: dark) {
  .log-pane { background: #0b0b0e; }
}

/* Log line syntax highlighting. Lines are wrapped in <span class="log-line
log-level-X"> by the shared viewer; each carries its own colour so the eye
can triage at a glance. */
.log-pane .log-line { display: block; }
.log-pane .log-line-error    { color: #fca5a5; }
.log-pane .log-line-warn     { color: #fcd34d; }
.log-pane .log-line-info     { color: #93c5fd; }
.log-pane .log-line-debug    { color: #9ca3af; }
.log-pane .log-line-success  { color: #86efac; }
.log-pane .log-line-trace    { color: #f9a8d4; font-style: italic; }
.log-pane .log-line-systemd  { color: #c4b5fd; }
.log-pane .log-line-meta     { color: #6b7280; font-style: italic; }
.log-pane .log-line-error    { font-weight: 600; }
.log-pane .log-line-warn     { font-weight: 500; }

.log-footnote {
  margin: 0;
  padding: var(--s-2) var(--s-3);
  font-size: var(--text-xs);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.log-footnote kbd {
  display: inline-block;
  padding: 0 var(--s-1);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  color: var(--fg);
  margin: 0 0.1rem;
}

/* ----- Logout form (inline in nav) ----- */
.logout-form { margin: 0; }
.logout-form button {
  padding: var(--s-1) var(--s-3);
  font-size: var(--text-sm);
}

/* ----- Reports (cross-scope) ----- */
.reports-filters { padding: var(--s-3) var(--s-4); }
.reports-filter-form { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; }
.reports-filter-form .filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
.filter-field { display: flex; flex-direction: column; gap: var(--s-1); flex: 1 1 12rem; min-width: 10rem; }
.filter-field input,
.filter-field select { width: 100%; }
.filter-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  font-weight: 600;
}
.reports-filter-form .filter-row > .filter-label { flex: 0 0 auto; }
.reports-filter-form .chip-failed.active { background: var(--danger);  border-color: var(--danger);  }
.reports-filter-form .chip-ok.active     { background: var(--success); border-color: var(--success); }
.reports-filter-form .chip-cancelled.active,
.reports-filter-form .chip-running.active { background: var(--fg-muted); border-color: var(--fg-muted); }

.reports-truncated-note { margin: var(--s-3) 0; font-size: var(--text-sm); }

.reports-group { padding: 0; }
.reports-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}
.reports-group-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.reports-group-stats {
  display: flex;
  gap: var(--s-4);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.reports-group-stats .kpi-ok    { color: var(--success); font-weight: 600; }
.reports-group-stats .kpi-error { color: var(--danger);  font-weight: 600; }

table.reports-table { border: 0; border-radius: 0; }
table.reports-table th { background: transparent; }

/* Icon-only action button used in dense tables. */
.btn-icon {
  padding: var(--s-1) var(--s-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-icon svg { display: block; }

/* Wrap the History table in a horizontal scroll container so it never
   blows out the grid column under the sticky Actions rail. */
.reports-card { overflow-x: auto; }

/* ----- Service detail: History (per-service reports) card ----- */
.reports-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.reports-card-header h2 { margin: 0; }
.reports-card-substats { margin: var(--s-1) 0 0; font-size: var(--text-sm); }
.reports-card-substats .kpi-ok    { color: var(--success); font-weight: 600; }
.reports-card-substats .kpi-error { color: var(--danger);  font-weight: 600; }
.reports-card-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.reports-card-empty   { margin: 0; }

/* ----- Service detail: Reachability (health-check) card ----- */
.health-check-card { margin-bottom: var(--s-4); }
.health-check-card .health-overall {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.health-check-card .health-table { width: 100%; }
.health-check-card .health-table td,
.health-check-card .health-table th { vertical-align: top; }
.health-check-card .health-table .small { font-size: var(--text-sm); }
.health-check-card .health-detail {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--text-sm);
  word-break: break-word;
}
.health-check-card .htmx-indicator { opacity: 0; transition: opacity .15s; }
.health-check-card .htmx-request .htmx-indicator,
.health-check-card .htmx-indicator.htmx-request { opacity: 1; }

/* ============================================================
   Settings page
   ============================================================ */

/* Keep the settings form comfortably readable rather than full-width. */
.settings-form { max-width: 60rem; }

/* ============================================================
   Add / Edit Remote Host page
   ============================================================ */

/* Constrain the whole page to one width so the header, intro card and
   form all share the same left/right edges. */
.vms-form-page { max-width: 60rem; }
.vms-form-page .settings-form { max-width: none; }

/* Intro card reads as a guided walkthrough with an accent spine. */
.vms-intro-card {
  border-left: 3px solid var(--accent);
}

.vms-intro-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.vms-intro-header h2 { margin: 0; }
.vms-intro-lead { margin: var(--s-1) 0 0; max-width: 46rem; }

.vms-intro-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--accent);
}

/* Numbered provisioning steps. */
.vms-steps {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
}
.vms-steps > li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.vms-steps > li strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--fg);
}
.vms-steps > li p { margin: var(--s-1) 0 0; font-size: var(--text-sm); }

.vms-step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 720px) {
  .vms-intro-header { flex-direction: column; }
}

/* Host-mode selector: two clearly selectable option cards. */
.mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
.mode-option {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.mode-option:hover { border-color: var(--accent); }
.mode-option input[type="radio"] {
  width: auto;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.mode-option-body { display: flex; flex-direction: column; gap: 0.1rem; }
.mode-option-title { font-weight: 600; font-size: var(--text-sm); color: var(--fg); }
.mode-option-desc { font-size: var(--text-xs); color: var(--fg-muted); }

/* Highlight the selected card. */
.mode-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--brand-50);
  box-shadow: 0 0 0 1px var(--accent);
}
.mode-option:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

/* Dark-mode tints: the light --brand-50 token is too bright on dark surfaces. */
@media (prefers-color-scheme: dark) {
  .vms-intro-icon { background: rgba(96, 165, 250, 0.15); }
  .mode-option:has(input:checked) { background: rgba(96, 165, 250, 0.12); }
}

/* Card heading carries an inline "restart" badge — align it on the baseline. */
.settings-form section.card > h2 {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* Grid of label/control rows, separated by hairline dividers. */
.settings-grid {
  display: flex;
  flex-direction: column;
  margin-top: var(--s-4);
  border-top: 1px solid var(--border);
}

/* One setting: description on the left, control on the right. */
.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: var(--s-3) var(--s-5);
  align-items: center;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.settings-grid .settings-row:last-child { border-bottom: 0; padding-bottom: 0; }

.settings-label { align-self: center; }
.settings-label label {
  display: inline-block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--fg);
  margin-bottom: var(--s-1);
}
.settings-label .hint { margin: 0; }

.settings-control input,
.settings-control select { width: 100%; }

/* Sub-section headers within a card (e.g. "Reverse SSH Tunnel"). */
.settings-subheader {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin: var(--s-5) 0 0;
  padding-bottom: var(--s-2);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}
.settings-subheader + .settings-grid { border-top: 0; margin-top: 0; }

/* SSH public-key display and connectivity-test panels read as sub-cards. */
.settings-pubkey-block,
.settings-ssh-test-block {
  margin-top: var(--s-5);
  padding: var(--s-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.settings-pubkey-block .settings-subheader,
.settings-ssh-test-block .settings-subheader {
  margin-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

/* Per-role SSH connectivity-test result rows. */
.ssh-test-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.ssh-test-result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.ssh-test-role {
  white-space: nowrap;
}

.settings-pubkey-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.settings-pubkey-pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: var(--s-3);
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.settings-pubkey-wrapper .btn-secondary { flex-shrink: 0; }

/* Submit bar reads as a distinct surface at the foot of the form. */
.settings-submit {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-errors { margin: 0; padding-left: var(--s-5); }

/* Collapsible settings sections (accordion). Only one open at a time. */
.settings-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.settings-form > .settings-accordion + .settings-accordion { margin-top: var(--s-4); }

.settings-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  list-style: none;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--fg);
  user-select: none;
  transition: background 0.12s ease;
}
.settings-accordion-summary::-webkit-details-marker { display: none; }
.settings-accordion-summary::marker { content: ""; }
.settings-accordion-summary:hover { background: var(--surface-alt); }
.settings-accordion-summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.settings-accordion[open] > .settings-accordion-summary {
  border-bottom: 1px solid var(--border);
}

.settings-accordion-title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.settings-accordion-chevron {
  flex-shrink: 0;
  color: var(--fg-muted);
  transition: transform 0.18s ease;
}
.settings-accordion[open] > .settings-accordion-summary .settings-accordion-chevron {
  transform: rotate(180deg);
}

.settings-accordion-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.settings-accordion-body > p:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .settings-accordion-chevron { transition: none; }
}

@media (max-width: 720px) {
  .settings-row {
    grid-template-columns: 1fr;
    gap: var(--s-2);
    align-items: stretch;
  }
  .settings-pubkey-wrapper { flex-direction: column; }
  .settings-pubkey-wrapper .btn-secondary { align-self: flex-start; }
}

/* ---------------------------------------------------------------------------
   Resource monitoring dashboard (/monitoring)
   --------------------------------------------------------------------------- */
.mon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
}

.mon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.mon-card-head { margin: 0; }
.mon-card-title {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.mon-card-title h2 {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.2;
}
.mon-sub { margin-left: var(--s-1); }

.mon-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--gray-400);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px transparent;
}
.mon-dot.is-up {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}
.mon-dot.is-down {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

.mon-body {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  transition: opacity 200ms ease;
}
.mon-body.is-muted { opacity: 0.35; }

/* Circular CPU gauge */
.mon-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  flex: 0 0 auto;
}
.mon-gauge { width: 96px; height: 96px; }
.mon-gauge-svg { width: 100%; height: 100%; display: block; }
.mon-gauge-track {
  fill: none;
  stroke: var(--surface-alt);
  stroke-width: 9;
}
.mon-gauge-arc {
  fill: none;
  stroke: var(--brand-500);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms cubic-bezier(0.22, 1, 0.36, 1),
              stroke 300ms ease;
}
.mon-gauge-arc.is-ok   { stroke: var(--success); }
.mon-gauge-arc.is-warn { stroke: var(--warning); }
.mon-gauge-arc.is-crit { stroke: var(--danger); }
.mon-gauge-text {
  font-size: 22px;
  font-weight: 600;
  fill: var(--fg);
}
.mon-gauge-label {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Memory / disk / swap bars */
.mon-bars {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 0;
}
.mon-bar-row { display: flex; flex-direction: column; gap: 3px; }
.mon-bar-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.mon-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.mon-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--brand-500);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1),
              background 300ms ease;
}
.mon-bar-fill.is-ok   { background: var(--success); }
.mon-bar-fill.is-warn { background: var(--warning); }
.mon-bar-fill.is-crit { background: var(--danger); }

/* Sparkline + meta */
.mon-spark {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  border-top: 1px solid var(--border);
  padding-top: var(--s-3);
}
.mon-spark-canvas { flex: 1 1 auto; height: 24px; min-width: 0; }
.mon-spark-svg { width: 100%; height: 100%; display: block; }
.mon-spark-line {
  fill: none;
  stroke: var(--brand-500);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.mon-meta {
  display: flex;
  gap: var(--s-3);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  white-space: nowrap;
}
.mon-meta b { color: var(--fg); font-weight: 600; }

.mon-error {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--danger);
}

/* Per-GPU usage rows (nvidia-smi) */
.mon-gpu-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  border-top: 1px solid var(--border);
  padding-top: var(--s-3);
}
.mon-gpu-row { display: flex; flex-direction: column; gap: 3px; }
.mon-gpu-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg-muted);
}

.mono { font-variant-numeric: tabular-nums; }

/* ---- Resource history page ------------------------------------------- */
.mon-history-controls {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.mon-range-presets { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.mon-range-custom {
  display: flex;
  align-items: flex-end;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin: 0;
}
.mon-range-custom label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.mon-range-custom input {
  font-size: var(--text-sm);
  padding: 0.3rem 0.4rem;
}
.mon-history-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-left: auto;
}
.mon-auto {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

.mon-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: var(--s-4);
}
.mon-chart-card {
  margin: 0;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mon-chart-card-wide {
  grid-column: 1 / -1;
}
.mon-chart-card figcaption {
  font-weight: 600;
  margin-bottom: var(--s-2);
}
.mon-chart { position: relative; }
.mon-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.mon-grid-line { stroke: var(--border); stroke-width: 1; stroke-opacity: 0.6; }
.mon-axis-label {
  fill: var(--fg-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.mon-hover-line { stroke: var(--fg-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.mon-tip {
  position: absolute;
  z-index: 5;
  min-width: 8rem;
  padding: 0.4rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  font-size: var(--text-xs);
  pointer-events: none;
}
.mon-tip-t { font-weight: 600; margin-bottom: 0.25rem; color: var(--fg); }
.mon-tip-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.mon-legend {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-2);
  font-size: var(--text-xs);
  color: var(--fg-muted);
}
.mon-chart-card-wide .mon-legend {
  max-height: 6.5rem;
  overflow-y: auto;
}
.mon-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.mon-legend-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}

/* ---- Live Resources: usage-over-time trend charts -------------------- */
.mon-trends {
  margin-top: var(--s-6);
}
.mon-trends-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.mon-trends-head h2 { margin: 0; }
.mon-trends-controls {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.mon-trends-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

/* ---- Outbound traffic explorer -------------------------------------- */
.traffic-explorer {
  display: grid;
  gap: var(--s-4);
}
.traffic-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) repeat(2, minmax(11rem, 1fr)) minmax(7rem, 0.7fr) minmax(6rem, 0.5fr) minmax(13rem, 1.4fr);
  align-items: end;
  gap: var(--s-3);
  padding-block: var(--s-4);
  border-block: 1px solid var(--border);
}
.traffic-filters .filter-field {
  display: grid;
  gap: var(--s-1);
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.traffic-filters input,
.traffic-filters select { width: 100%; min-width: 0; }
.traffic-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.traffic-result-head p { margin: 0; }
.traffic-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.traffic-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.traffic-table { min-width: 70rem; margin: 0; }
.traffic-table th:last-child,
.traffic-table td:last-child { text-align: right; white-space: nowrap; }
.traffic-warnings {
  padding: var(--s-3);
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
}
.traffic-warnings p { margin: 0; }
.traffic-warnings p + p { margin-top: var(--s-1); }
.traffic-page-size {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.traffic-page-size select { width: auto; }
.traffic-groups { display: grid; gap: var(--s-5); }
.traffic-server-group {
  display: grid;
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.traffic-server-group:first-child { border-top: 0; padding-top: 0; }
.traffic-server-title { margin: 0; font-size: var(--text-lg); }
.traffic-subgroup { display: grid; gap: var(--s-2); }
.traffic-subgroup-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.traffic-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-3);
}
.traffic-pager span { margin-right: auto; }

.traffic-ignore-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-1) var(--s-3);
  margin: var(--s-3) 0;
  font-size: var(--text-sm);
}
.traffic-ignore-summary dt { color: var(--fg-muted); font-weight: 600; }
.traffic-ignore-summary dd { margin: 0; }
.traffic-ignore-warning {
  color: var(--danger);
  font-size: var(--text-sm);
}

@media (max-width: 1100px) {
  .traffic-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .traffic-filters { grid-template-columns: 1fr; }
  .traffic-result-head { align-items: flex-start; flex-direction: column; }
  .traffic-ignore-summary { grid-template-columns: 1fr; }
}

/* ----- Network Firewall Rules ----- */
.card-network-status { border-left: 4px solid var(--brand); }

.network-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-4);
  padding: var(--s-2) 0;
}

.network-form .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.network-form label {
  font-weight: 600;
  color: var(--fg);
}

.network-form input,
.network-form select {
  padding: var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--fg);
}

.network-form input:focus,
.network-form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.network-form small {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-top: -0.5rem;
}

.network-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.error-message {
  color: var(--danger);
  font-size: var(--text-sm);
  margin-top: -0.5rem;
}

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

.network-rules-table th,
.network-rules-table td {
  padding: var(--s-2);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.network-rules-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}

.network-rules-table tbody tr:hover {
  background: var(--bg-secondary);
}

.network-rules-table code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: var(--text-sm);
}

.network-rules-table .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-secondary { background: rgba(107, 114, 128, 0.1); color: #6b7280; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: var(--text-lg);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.btn-icon.btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.network-countdown-timer {
  text-align: center;
  padding: var(--s-4);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin: var(--s-4) 0;
}

.network-countdown-timer span {
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: var(--brand);
  line-height: 1;
}

.network-countdown-timer small {
  display: block;
  color: var(--fg-muted);
  margin-top: var(--s-2);
  font-size: var(--text-sm);
}

.network-auto-rollback-warning {
  border-left: 4px solid var(--danger);
  background: rgba(239, 68, 68, 0.05);
  padding: var(--s-3);
  border-radius: var(--radius);
  margin-top: var(--s-3);
}

.loading { color: var(--fg-muted); font-style: italic; }
.empty-state { color: var(--fg-muted); text-align: center; padding: var(--s-4); }

@media (max-width: 768px) {
  .network-form { grid-template-columns: 1fr; }
  .network-rules-table { font-size: var(--text-sm); }
  .network-rules-table th,
  .network-rules-table td { padding: var(--s-1); }
  .network-countdown-timer span { font-size: 2rem; }
}
