/* Color palette matches newbizalert.com's brand tokens (primary royal blue
   #003087, kelly green #046a38 accent, light lavender #f2f3fd secondary
   surface, neutral grays for text/borders). Values pulled directly from that
   site's built CSS custom properties (--primary, --brand-kelly, --accent,
   --foreground, --border, --destructive, etc.), not eyeballed. All text/bg
   pairings below are verified >= 6.4:1 contrast (WCAG AA and, in most cases,
   AAA for normal text). This is a color/visual-identity change only - layout
   and structure are unchanged from the previous plain version. */
:root {
  --color-bg: #ffffff;
  --color-text: #1f2937;
  --color-text-muted: #4b5563;
  --color-border: #d1d5dc;
  --color-border-subtle: #e5e7eb;
  --color-primary: #003087;
  --color-primary-hover: #002466;
  --color-primary-foreground: #ffffff;
  --color-accent-bg: #f2f3fd;
  --color-secondary: #046a38;
  --color-destructive: #b0200c;
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
}

body {
  font-family: system-ui, sans-serif;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  color: var(--color-text);
  background: var(--color-bg);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
header h1 {
  color: var(--color-primary);
}
.machine-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--color-accent-bg);
}
.actions {
  border-top: 2px solid var(--color-secondary);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}
.actions button {
  margin: 0.25rem 0.25rem 0 0;
}
button {
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
button:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
th {
  color: var(--color-text-muted);
}
#unauthorized {
  color: var(--color-destructive);
  font-weight: bold;
}
.heartbeat-stale {
  color: var(--color-destructive);
  font-weight: bold;
}
#breadcrumbs button {
  border: none;
  background: none;
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25rem 0.25rem 0.25rem 0;
  border-radius: 0;
}
#breadcrumbs button:hover {
  background: none;
  color: var(--color-primary-hover);
}
.usage-line {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
#search-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--color-accent-bg);
}
#search-form {
  display: flex;
  gap: 0.5rem;
}
#search-input {
  flex: 1;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
#search-results {
  margin-top: 0.75rem;
}
.search-group {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.search-group-heading {
  font-weight: bold;
  word-break: break-all;
  margin-bottom: 0.25rem;
}
.search-version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.15rem 0;
}
.search-version-row button {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}
#tree-view {
  margin-top: 1rem;
}
.source-root {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.source-root-heading {
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
  word-break: break-all;
}
.source-versions button {
  margin: 0 0.4rem 0.4rem 0;
}
.version-incomplete {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}
