/* WBoost Ops Hub — obs.wboost.pro stylesheet
 * Standalone DESIGN.md-compliant UI: strict 15-HEX palette, local Inter (400/500/600) + Krona One (logo only),
 * tabular-nums discipline, numericCellWeight=400, boldSharePct<=18%, full-width responsive tables,
 * custom wb-select dropdowns, fixed chart tooltip bar, zero external CDN links.
 */

/* ── 1. Local Fonts (Inter 400/500/600 + Krona One 400) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-400.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/inter-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-500.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/static/fonts/inter-latin-500.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/static/fonts/inter-cyrillic-600.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/static/fonts/inter-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Krona One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/krona-one-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Krona One';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/static/fonts/krona-one-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 2. Design Tokens (DESIGN.md strict 15-HEX palette) ── */
:root {
  --wb-surface: #FFFFFF;
  --wb-canvas: #F9FAFB;
  --wb-surface-alt: #FBFCFD;
  --wb-surface-control: #F1F3F5;
  --wb-border-hex: #E6E9EF;
  --wb-divider: #CBD5E1;
  --wb-ink: #1E293B;
  --wb-ink-strong: #0F172A;
  --wb-ink-secondary: #475569;
  --wb-ink-muted: #526074;

  --wb-border-subtle: rgba(15, 23, 42, 0.08);
  --wb-border-control: rgba(15, 23, 42, 0.14);
  --wb-border-strong: rgba(15, 23, 42, 0.22);
  --wb-border-input-safe: rgba(15, 23, 42, 0.32);

  /* Brand yellow strictly on quota: logo B, Primary CTA, :focus-visible */
  --wb-brand: #F5C518;
  --wb-brand-hover: #D4A90F;
  --wb-brand-ink: #0F172A;
  --wb-brand-tint: rgba(245, 197, 24, 0.10);

  /* Semantics (soft tints strictly border: 0) */
  --wb-ok: #0F7A47;
  --wb-ok-soft: rgba(15, 122, 71, 0.08);
  --wb-danger: #C23B3B;
  --wb-danger-soft: rgba(194, 59, 59, 0.08);
  --wb-warn: #9A6206;
  --wb-warn-soft: rgba(154, 98, 6, 0.08);
  --wb-link: #2563EB;
  --wb-link-soft: rgba(37, 99, 235, 0.08);

  --wb-radius-xs: 4px;
  --wb-radius-sm: 6px;
  --wb-radius-md: 8px;
  --wb-radius-lg: 12px;

  --wb-top-h: 48px;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

/* ── 3. Reset & Base Typography ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--wb-ink-strong);
  background: var(--wb-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--wb-ink-strong);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--wb-brand);
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--wb-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

table, .wb-num, .tnum, [data-kpi-value] {
  font-variant-numeric: tabular-nums;
}

.obs-mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.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;
}

.is-hidden {
  display: none !important;
}

/* ── 4. Brand Logo (Krona One strictly here) ── */
.wb-logo {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Krona One', sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wb-ink-strong);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.wb-logo:hover {
  text-decoration: none;
}
.wb-logo .b {
  color: var(--wb-brand);
}
.wb-logo-sub {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--wb-border-control);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--wb-ink-muted);
}

/* ── 5. Topbar ── */
.obs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--wb-top-h);
  width: 100%;
  background: var(--wb-surface);
  border-bottom: 1px solid var(--wb-border-subtle);
  padding: 6px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.obs-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  min-width: 0;
}

.obs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.obs-nav-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--wb-radius-sm);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--wb-ink-secondary);
  white-space: nowrap;
  transition: background-color 140ms var(--ease-smooth-out), color 140ms var(--ease-smooth-out);
}
.obs-nav-link:hover {
  background: var(--wb-surface-control);
  color: var(--wb-ink-strong);
  text-decoration: none;
}
.obs-nav-link.is-active {
  background: var(--wb-surface-control);
  color: var(--wb-ink-strong);
  font-weight: 500;
}

.obs-topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.obs-topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.obs-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.obs-sync-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--wb-ink-muted);
  white-space: nowrap;
}

.obs-logout-form {
  display: inline-flex;
  margin: 0;
}

/* ── 6. Main Container (full-width w-full min-w-0) ── */
.obs-main {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 16px 20px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.obs-section {
  width: 100%;
  min-width: 0;
  scroll-margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.obs-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.obs-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--wb-ink-strong);
  line-height: 1.3;
}

.obs-section-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--wb-ink-muted);
}

/* ── 7. Cards & Banners ── */
.wb-card {
  width: 100%;
  min-width: 0;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
  padding: 16px;
  box-shadow: none;
}

.wb-card-flush {
  padding: 0;
}

.wb-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wb-border-subtle);
}

.wb-card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--wb-ink-strong);
}

/* Alert / Watchdog / Degraded banners — zero colored-border pill slop */
.obs-banner {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-radius: var(--wb-radius-md);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  font-size: 13px;
  font-weight: 400;
  color: var(--wb-ink-strong);
}
.obs-banner--danger {
  background: var(--wb-danger-soft);
  border: 0;
}
.obs-banner--warn {
  background: var(--wb-warn-soft);
  border: 0;
}
.obs-banner-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.obs-banner-title {
  font-weight: 500;
  color: var(--wb-ink-strong);
}
.obs-banner--danger .obs-banner-title {
  color: var(--wb-danger);
}
.obs-banner--warn .obs-banner-title {
  color: var(--wb-warn);
}

/* Source health strip */
.obs-sources-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--wb-ink-secondary);
}

/* ── 8. Buttons (.wb-btn) — flat neutral / outline / graphite primary ── */
.wb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--wb-radius-md);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease-smooth-out), border-color 140ms var(--ease-smooth-out), color 140ms var(--ease-smooth-out);
}
.wb-btn:disabled {
  background: var(--wb-border-hex);
  color: var(--wb-ink-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.wb-btn-sm {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--wb-radius-sm);
  font-size: 12px;
}

.wb-btn-primary {
  background: var(--wb-ink);
  color: var(--wb-brand);
}
.wb-btn-primary:hover {
  background: var(--wb-ink-strong);
  text-decoration: none;
}

.wb-btn-secondary {
  background: var(--wb-surface-control);
  color: var(--wb-ink-strong);
}
.wb-btn-secondary:hover {
  background: var(--wb-border-hex);
  text-decoration: none;
}

.wb-btn-outline {
  background: var(--wb-surface);
  color: var(--wb-ink-strong);
  border: 1px solid var(--wb-border-control);
}
.wb-btn-outline:hover {
  background: var(--wb-canvas);
  border-color: var(--wb-border-strong);
  text-decoration: none;
}

.wb-btn-ghost {
  background: transparent;
  color: var(--wb-ink-secondary);
}
.wb-btn-ghost:hover {
  background: var(--wb-surface-control);
  color: var(--wb-ink-strong);
  text-decoration: none;
}

.wb-ico {
  width: 14px;
  height: 14px;
  flex: none;
  display: inline-block;
}

/* ── 9. Status Dots & Flat Tags (0 colored borders) ── */
.wb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--wb-ink);
  white-space: nowrap;
}

.wb-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  flex: none;
  display: inline-block;
  background: var(--wb-divider);
}
.wb-dot--ok     { background: var(--wb-ok); }
.wb-dot--warn   { background: var(--wb-warn); }
.wb-dot--danger { background: var(--wb-danger); }
.wb-dot--link   { background: var(--wb-link); }
.wb-dot--muted  { background: var(--wb-divider); }

/* Flat borderless tag (never colored fill + colored border) */
.wb-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 0;
  border-radius: var(--wb-radius-xs);
  background: var(--wb-surface-control);
  color: var(--wb-ink);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
}
.wb-tag--ok     { background: var(--wb-ok-soft); color: var(--wb-ok); }
.wb-tag--warn   { background: var(--wb-warn-soft); color: var(--wb-warn); }
.wb-tag--danger { background: var(--wb-danger-soft); color: var(--wb-danger); }
.wb-tag--link   { background: var(--wb-link-soft); color: var(--wb-link); }

/* ── 10. KPI Strip (Section 1: System Pulse) ── */
.obs-kpi-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.obs-kpi {
  min-width: 0;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obs-kpi--btn {
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms var(--ease-smooth-out), border-color 140ms var(--ease-smooth-out);
}
.obs-kpi--btn:hover {
  background: var(--wb-surface-alt);
  border-color: var(--wb-border-control);
}

.obs-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.obs-kpi-label {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--wb-ink-muted);
}

.obs-kpi-val {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--wb-ink-strong);
  font-variant-numeric: tabular-nums;
}
.obs-kpi-val--ok     { color: var(--wb-ok); }
.obs-kpi-val--warn   { color: var(--wb-warn); }
.obs-kpi-val--danger { color: var(--wb-danger); }

.obs-kpi-meta {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--wb-ink-muted);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.obs-containers-panel {
  width: 100%;
  min-width: 0;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
  padding: 12px 16px;
}
.obs-containers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ── 11. Filters, Inputs, Segmented Control & Custom .wb-select ── */
.obs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.obs-seg {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--wb-surface-control);
  border-radius: var(--wb-radius-md);
}

.obs-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--wb-radius-sm);
  background: transparent;
  color: var(--wb-ink-secondary);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms var(--ease-smooth-out), color 140ms var(--ease-smooth-out);
}
.obs-seg-btn:hover {
  color: var(--wb-ink-strong);
}
.obs-seg-btn.is-active {
  background: var(--wb-surface);
  color: var(--wb-ink-strong);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.wb-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--wb-border-input-safe);
  border-radius: var(--wb-radius-md);
  background: var(--wb-surface);
  color: var(--wb-ink-strong);
  font-size: 12.5px;
  font-weight: 400;
  min-width: 0;
  transition: border-color 140ms var(--ease-smooth-out);
}
.wb-input::placeholder {
  color: var(--wb-ink-muted);
}
.wb-input:hover {
  border-color: var(--wb-border-strong);
}
.wb-input--grow {
  flex: 1 1 220px;
  max-width: 420px;
}
.wb-input--wide {
  flex: 1 1 260px;
}

/* Custom wb-select (zero visible native selects) */
.wb-select {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.wb-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  min-width: 132px;
  padding: 0 10px;
  border: 1px solid var(--wb-border-control);
  border-radius: var(--wb-radius-md);
  background: var(--wb-surface);
  color: var(--wb-ink-strong);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 140ms var(--ease-smooth-out), background-color 140ms var(--ease-smooth-out);
}
.wb-select-trigger:hover {
  background: var(--wb-canvas);
  border-color: var(--wb-border-strong);
}
.wb-select-trigger.is-open {
  border-color: var(--wb-ink);
}
.wb-select-chev {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--wb-ink-muted);
  transition: transform 160ms var(--ease-smooth-out);
}
.wb-select-trigger.is-open .wb-select-chev {
  transform: rotate(180deg);
}

.wb-select-menu {
  position: fixed;
  z-index: 90;
  display: none;
  flex-direction: column;
  min-width: 160px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(260px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 4px;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-control);
  border-radius: var(--wb-radius-md);
  box-shadow: 0 10px 28px -10px rgba(15, 23, 42, 0.20), 0 2px 6px rgba(15, 23, 42, 0.06);
}
.wb-select-menu.is-open {
  display: flex;
}

.wb-select-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--wb-radius-sm);
  background: transparent;
  color: var(--wb-ink-strong);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.wb-select-opt:hover,
.wb-select-opt.is-focused {
  background: var(--wb-canvas);
}
.wb-select-opt[aria-selected="true"] {
  background: var(--wb-surface-control);
  font-weight: 500;
}
.wb-select-chk {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0;
  color: var(--wb-ink-strong);
}
.wb-select-opt[aria-selected="true"] .wb-select-chk {
  opacity: 1;
}

/* ── 12. Tables (w-full min-w-0, horizontal dividers only, numeric weight 400) ── */
.wb-table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
}

.obs-scroll-box {
  max-height: 540px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.wb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--wb-ink);
  font-variant-numeric: tabular-nums;
}

.wb-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 36px;
  padding: 0 12px;
  background: var(--wb-canvas);
  color: var(--wb-ink-muted);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--wb-border-subtle);
  border-right: 0;
}

.wb-table thead th.is-num,
.wb-table tbody td.is-num {
  text-align: right;
  white-space: nowrap;
}

.wb-table tbody td {
  padding: 9px 12px;
  vertical-align: top;
  font-weight: 400;
  color: var(--wb-ink);
  border-bottom: 1px solid var(--wb-border-subtle);
  border-right: 0;
}

.wb-table tbody tr:last-child td {
  border-bottom: 0;
}

.wb-table tbody tr:hover td {
  background: var(--wb-canvas);
}

.obs-cell-title {
  color: var(--wb-ink-strong);
  font-weight: 400;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.obs-cell-sub {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--wb-ink-muted);
  overflow-wrap: anywhere;
}

.obs-nowrap {
  white-space: nowrap;
}

.obs-actions-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* Expandable detail row in Mini-Sentry */
.obs-detail-row td {
  background: var(--wb-surface-alt);
  padding: 12px 16px;
}
.obs-detail-row:hover td {
  background: var(--wb-surface-alt) !important;
}

.obs-sample-pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--wb-radius-md);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--wb-ink-strong);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 220px;
  overflow-y: auto;
}

.obs-occ-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.obs-occ-item {
  padding: 8px 10px;
  border-radius: var(--wb-radius-sm);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  font-size: 12px;
}

.obs-occ-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--wb-ink-muted);
  font-size: 11.5px;
}

.obs-occ-msg {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--wb-ink);
  overflow-wrap: anywhere;
}

/* ── 13. Inspector (Trace Timeline + Log Search) ── */
.obs-inspector-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.obs-trace-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  max-height: 540px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.obs-trace-step {
  display: grid;
  grid-template-columns: 148px 130px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 8px 10px;
  border-radius: var(--wb-radius-sm);
  background: var(--wb-canvas);
  border: 1px solid var(--wb-border-subtle);
  font-size: 12px;
}

.obs-log-line {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--wb-ink);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ── 14. Local SVG Charts with Fixed Tooltip Panel ── */
.obs-charts-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.obs-chart-card {
  min-width: 0;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Span odd trailing chart across full width on 2-col desktop so no orphan slot remains. */
@media (min-width: 1121px) {
  .obs-chart-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.obs-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.obs-chart-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--wb-ink-strong);
}

.obs-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--wb-ink-muted);
}

.obs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.obs-legend-swatch {
  width: 8px;
  height: 2px;
  border-radius: 1px;
  display: inline-block;
}

/* Fixed tooltip readout bar (never follows pointer: dx=0, dy=0) */
.obs-chart-readout {
  min-height: 26px;
  padding: 4px 10px;
  border-radius: var(--wb-radius-sm);
  background: var(--wb-canvas);
  border: 1px solid var(--wb-border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--wb-ink-secondary);
  font-variant-numeric: tabular-nums;
}

.obs-chart-readout-vals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--wb-ink-strong);
}

.obs-chart-svg-wrap {
  width: 100%;
  min-width: 0;
  position: relative;
}

.obs-chart-svg {
  display: block;
  width: 100%;
  height: 170px;
  overflow: visible;
}

/* ── 15. Alerts Split Layout ── */
.obs-alerts-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

/* ── 16. Empty / Loading / Toast States ── */
.wb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
  color: var(--wb-ink-muted);
  font-size: 12.5px;
}
.wb-empty-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--wb-ink-strong);
}

.obs-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: var(--wb-radius-md);
  background: var(--wb-ink);
  color: var(--wb-surface);
  font-size: 12.5px;
  font-weight: 400;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.30);
}
.obs-toast.is-open {
  display: flex;
}

/* ── 17. Login Page ── */
.obs-login-body {
  min-height: 100vh;
  background: var(--wb-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.obs-login-card {
  width: 100%;
  max-width: 380px;
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-subtle);
  border-radius: var(--wb-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.obs-login-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.obs-login-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--wb-ink-strong);
}

.obs-login-desc {
  margin: 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--wb-ink-muted);
}

.obs-login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--wb-radius-md);
  background: var(--wb-danger-soft);
  color: var(--wb-danger);
  font-size: 12.5px;
  font-weight: 400;
}

.obs-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.obs-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.obs-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--wb-ink-secondary);
}

.obs-login-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--wb-border-input-safe);
  border-radius: var(--wb-radius-md);
  background: var(--wb-surface);
  color: var(--wb-ink-strong);
  font-size: 13.5px;
  font-weight: 400;
}

.obs-login-submit {
  width: 100%;
  height: 38px;
  margin-top: 4px;
  font-size: 13.5px;
}

.obs-login-foot {
  font-size: 11.5px;
  color: var(--wb-ink-muted);
  border-top: 1px solid var(--wb-border-subtle);
  padding-top: 12px;
}

/* ── 18. Responsive Breakpoints (2560, 1440, 1280, 390) ── */
/* Keep 10 KPI cards in balanced 5x2 grid across 2560, 1440, and 1280 viewports. */
@media (max-width: 1120px) {
  .obs-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .obs-charts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .obs-trace-step {
    grid-template-columns: 120px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .obs-topbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .obs-main {
    padding: 12px 12px 32px;
    gap: 16px;
  }
  .wb-card {
    padding: 12px;
  }
  .obs-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .obs-kpi {
    padding: 10px 12px;
  }
  .obs-kpi-val {
    font-size: 17px;
  }
  .obs-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .obs-topbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .obs-topbar-meta {
    width: 100%;
    justify-content: space-between;
  }
  .obs-topbar-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .obs-topbar-actions > .wb-btn,
  .obs-topbar-actions > .obs-logout-form {
    flex: 1 1 0;
  }
  .obs-topbar-actions > .obs-logout-form > .wb-btn {
    width: 100%;
  }
  .wb-input--grow,
  .wb-input--wide {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
  .wb-select {
    flex: 1 1 calc(50% - 4px);
  }
  .wb-select-trigger {
    width: 100%;
    min-width: 0;
  }
  .obs-trace-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .obs-chart-card {
    padding: 12px;
  }

  /* Mobile card layout for VictoriaLogs search table: meta row + full-width message underneath */
  #logs-table thead {
    display: none;
  }
  #logs-table,
  #logs-table tbody {
    display: block;
    width: 100%;
  }
  #logs-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--wb-border-subtle);
  }
  #logs-table tbody tr:last-child {
    border-bottom: 0;
  }
  #logs-table tbody td {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent !important;
  }
  #logs-table tbody td.obs-log-msg-cell,
  #logs-table tbody td[colspan] {
    display: block;
    flex: 1 0 100%;
    width: 100%;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
