/* ==========================================================================
   NetDash v3 identity (2026-11). Loaded after modern.css so it wins over both
   earlier passes. IBM Plex (self-hosted, SIL OFL - see fonts/IBM-Plex-LICENSE.txt),
   a neutral blue accent, sentence-case labels in the body font, and a lifted
   grey dark mode instead of near-black.
   ========================================================================== */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --nd-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --nd-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --tblr-font-sans-serif: var(--nd-sans);
  --tblr-body-font-family: var(--nd-sans);
  --tblr-font-monospace: var(--nd-mono);

  --nd-accent: #3b7ddd;
  --nd-accent-hover: #5591e6;
  --nd-ink: #ffffff;
  --nd-radius: 6px;
  --nd-up: #3fb27f;
  --nd-down: #e5534b;
  --nd-warn: #d69a2d;
  --nd-hosting: #6aa5e8;
  --tblr-primary: #3b7ddd;
  --tblr-primary-rgb: 59, 125, 221;
  --tblr-primary-fg: #ffffff;
  --tblr-primary-darken: #2f68bd;
  --tblr-primary-lt: rgba(59, 125, 221, 0.12);
  --tblr-primary-lt-rgb: 59, 125, 221;
  --tblr-link-color: #3b7ddd;
  --tblr-link-color-rgb: 59, 125, 221;
  --tblr-link-hover-color: #5591e6;
  --tblr-success: #3fb27f;
  --tblr-success-rgb: 63, 178, 127;
  --tblr-green: #3fb27f;
  --tblr-green-rgb: 63, 178, 127;
  --tblr-danger: #e5534b;
  --tblr-danger-rgb: 229, 83, 75;
  --tblr-red: #e5534b;
  --tblr-red-rgb: 229, 83, 75;
  --tblr-warning: #d69a2d;
  --tblr-warning-rgb: 214, 154, 45;
  --tblr-yellow: #d69a2d;
  --tblr-orange: #d9822b;
  --tblr-azure: #6aa5e8;
  --tblr-blue: #3b7ddd;
  --tblr-border-radius: 6px;
  --tblr-border-radius-sm: 4px;
  --tblr-border-radius-lg: 8px;
  --tblr-border-radius-xl: 10px;
  --tblr-border-radius-xxl: 12px;
}
[data-bs-theme="dark"] {
  --tblr-body-bg: #1f2329;
  --tblr-bg-surface: #262b32;
  --tblr-bg-surface-secondary: #2c323a;
  --tblr-bg-surface-tertiary: #323942;
  --tblr-bg-forms: #22272d;
  --tblr-body-color: #e6e9ed;
  --tblr-secondary-color: #9ba5b1;
  --tblr-muted: #9ba5b1;
  --tblr-border-color: #39414b;
  --tblr-border-color-translucent: rgba(255, 255, 255, 0.09);
  --tblr-card-bg: #262b32;
  --nd-side-bg: #1b1f24;
  --nd-line-strong: #4a535e;
}
[data-bs-theme="light"] {
  --tblr-body-bg: #f5f6f8;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #f0f2f5;
  --tblr-bg-surface-tertiary: #e8ebef;
  --tblr-bg-forms: #ffffff;
  --tblr-body-color: #1d2228;
  --tblr-secondary-color: #5f6b78;
  --tblr-muted: #5f6b78;
  --tblr-border-color: #dde1e6;
  --tblr-border-color-translucent: rgba(0, 0, 0, 0.08);
  --tblr-card-bg: #ffffff;
  --nd-side-bg: #eef1f4;
  --nd-line-strong: #c4cbd3;
}

body { font-family: var(--nd-sans); font-size: 0.9rem; line-height: 1.5; letter-spacing: 0; }
::selection { background: rgba(59, 125, 221, 0.35); color: inherit; }
h1, h2, h3, h4, .card-title { font-weight: 600; letter-spacing: -0.005em; }
.page-title { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.01em; }
.page-pretitle {
  font: 500 0.8rem/1.2 var(--nd-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--tblr-secondary-color);
  margin-bottom: 0.35rem;
}
.nd-side-label, .nd-palette-group {
  font: 600 0.75rem/1.3 var(--nd-sans);
  text-transform: none;
  letter-spacing: 0;
  color: var(--tblr-secondary-color);
  opacity: 1;
}
.table thead th, .card-table thead th, .subheader, .nd-metric-label, .nd-state {
  font-family: var(--nd-sans);
  text-transform: none;
  letter-spacing: 0;
}
.table thead th, .card-table thead th { font-size: 0.78rem; font-weight: 600; }
.nd-search kbd, .nd-side-clock { font-family: var(--nd-sans); }

.btn { border-radius: var(--nd-radius); font-weight: 500; }
.btn-primary {
  --tblr-btn-bg: #3b7ddd; --tblr-btn-border-color: #3b7ddd; --tblr-btn-color: #fff;
  --tblr-btn-hover-bg: #2f6fd0; --tblr-btn-hover-border-color: #2f6fd0; --tblr-btn-hover-color: #fff;
  --tblr-btn-active-bg: #2a62b8; --tblr-btn-active-border-color: #2a62b8; --tblr-btn-active-color: #fff;
  --tblr-btn-disabled-bg: #3b7ddd; --tblr-btn-disabled-border-color: #3b7ddd; --tblr-btn-disabled-color: #fff;
}
.btn-danger { --tblr-btn-color: #fff; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #d1443c; --tblr-btn-hover-border-color: #d1443c; }
.btn-warning { --tblr-btn-color: #1d2228; }
.form-control:focus, .form-select:focus { border-color: var(--nd-accent); box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.2); }
.form-label { font-size: 0.82rem; font-weight: 500; }

.badge {
  border-radius: 4px;
  font: 500 0.74rem/1.5 var(--nd-sans);
  padding: 0.12rem 0.5rem;
  background: color-mix(in srgb, currentColor 12%, transparent) !important;
  border: 0;
}
.badge.bg-primary-lt, .badge.bg-blue-lt { color: var(--nd-accent) !important; }
.badge.bg-orange-lt, .badge.bg-yellow-lt, .badge.bg-warning-lt { color: var(--nd-warn) !important; }
.badge.bg-azure-lt, .badge.bg-cyan-lt { color: var(--nd-hosting) !important; }
.card { border-radius: 8px; }
.card-header { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.nd-avatar { background: var(--nd-accent); color: #fff; border-radius: 50%; }
.nd-side-link { border-radius: var(--nd-radius); border-left: 0; }
.nd-side-link.active { background: var(--tblr-primary-lt); color: var(--nd-accent); font-weight: 600; }
.nd-brand-text .nd-brand-accent { color: var(--nd-accent); }
code, pre, kbd, .font-monospace, .text-monospace { font-family: var(--nd-mono); }
pre { border-radius: var(--nd-radius); }

/* ---- BIRD section ---------------------------------------------------------- */
.nd-pending-bar { position: sticky; top: 0; z-index: 1020; margin: 0 0 1rem; }
.nd-diff { font: 0.8rem/1.45 var(--nd-mono); margin: 0; max-height: 28rem; overflow: auto; background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color); border-radius: var(--nd-radius); }
.nd-diff div { white-space: pre; padding: 0 0.6rem; }
.nd-diff .add { background: rgba(63, 178, 127, 0.16); }
.nd-diff .del { background: rgba(229, 83, 75, 0.16); }
.nd-diff .ln { display: inline-block; width: 3.2rem; color: var(--tblr-secondary-color); user-select: none; }
.nd-code { font: 0.82rem/1.5 var(--nd-mono); tab-size: 4; white-space: pre; }
textarea.nd-code { min-height: 32rem; }
.nd-health { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0.05em; background: var(--tblr-secondary-color); }
.nd-health.up { background: var(--nd-up); }
.nd-health.down { background: var(--nd-down); }
.nd-health.connecting { background: var(--nd-warn); }
.nd-kv { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: 0.3rem 1rem; margin: 0; }
.nd-kv dt { font-weight: 500; color: var(--tblr-secondary-color); }
.nd-kv dd { margin: 0; overflow-wrap: anywhere; }
.nd-out { font: 0.8rem/1.45 var(--nd-mono); white-space: pre-wrap; max-height: 30rem; overflow: auto; background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color); border-radius: var(--nd-radius); padding: 0.6rem 0.75rem; margin: 0; }
.nd-meter { height: 0.4rem; border-radius: 3px; background: var(--tblr-bg-surface-tertiary); overflow: hidden; min-width: 4rem; }
.nd-meter > span { display: block; height: 100%; background: var(--nd-accent); }
.nd-meter > span.warn { background: var(--nd-warn); }
.nd-meter > span.bad { background: var(--nd-down); }
.nd-finding { border-left: 3px solid var(--tblr-border-color); padding: 0.6rem 0.9rem; margin-bottom: 0.6rem; background: var(--tblr-bg-surface-secondary); border-radius: 0 var(--nd-radius) var(--nd-radius) 0; }
.nd-finding.danger { border-left-color: var(--nd-down); }
.nd-finding.warning { border-left-color: var(--nd-warn); }
.nd-finding.info { border-left-color: var(--nd-accent); }

/* ---- Inbox ------------------------------------------------------------------ */
.nd-mail-row { cursor: pointer; }
.nd-mail-row.unread .nd-mail-subject { font-weight: 600; }
.nd-mail-body { font: 0.86rem/1.55 var(--nd-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.nd-mail-frame { width: 100%; min-height: 32rem; border: 1px solid var(--tblr-border-color); border-radius: var(--nd-radius); background: #fff; }
.nd-tag { display: inline-block; padding: 0 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 500; background: color-mix(in srgb, currentColor 15%, transparent); }
