/* ── Design Tokens — light content theme ────────────────────────────── */
:root {
  --bg-canvas:      #f4f5f4;
  --bg-sidebar:     #0c1f14;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-elevated:    #f0f2f1;
  --bg-hover:       #eaedeb;

  --border-dim:     #eaedeb;
  --border:         #dde3df;
  --border-bright:  #c4cfc7;

  --text-primary:   #111c15;
  --text-secondary: #52695c;
  --text-muted:     #8ea090;

  --accent:         #1a6b3c;
  --accent-dim:     rgba(26, 107, 60, 0.08);
  --accent-hover:   #155530;

  --ok:             #16a34a;
  --ok-bg:          rgba(22, 163, 74, 0.08);
  --ok-border:      rgba(22, 163, 74, 0.20);
  --warn:           #d97706;
  --warn-bg:        rgba(217, 119, 6, 0.08);
  --warn-border:    rgba(217, 119, 6, 0.20);
  --crit:           #dc2626;
  --crit-bg:        rgba(220, 38, 38, 0.08);
  --crit-border:    rgba(220, 38, 38, 0.20);
  --dim:            #6b8478;
  --dim-bg:         rgba(107, 132, 120, 0.08);
  --dim-border:     rgba(107, 132, 120, 0.20);

  --sidebar-w:      240px;
  --topbar-h:       56px;
  --r-sm:           6px;
  --r-md:           8px;
  --r-lg:           12px;

  --shadow-card:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-float:   0 8px 30px rgba(0,0,0,0.12);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', ui-monospace, monospace;
}

/* ── Sidebar token overrides — dark forest green ────────────────────── */
.sidebar {
  --text-primary:   #ddeae0;
  --text-secondary: #7aaa8a;
  --text-muted:     #4e7a5e;
  --bg-elevated:    #142a1c;
  --bg-hover:       #1c3826;
  --border-dim:     #132a1a;
  --border:         #1c3826;
  --border-bright:  #254d34;
  --accent:         #4aba74;
  --accent-dim:     rgba(74, 186, 116, 0.12);
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* ── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar         { width: 4px; height: 4px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: var(--border-bright); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  transition: transform 0.22s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Brand ──────────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}

.brand-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-sub {
  display: block;
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-top: 1px;
}

/* ── Nav ────────────────────────────────────────────────────────────── */
.nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-group-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 10px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 12px;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: background 0.12s, color 0.12s;
  border-left: 2px solid transparent;
  margin-left: -2px;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.12s;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item:hover svg { opacity: 0.85; }

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.nav-item.active svg { opacity: 1; }

/* ── Sidebar Footer ─────────────────────────────────────────────────── */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-dim);
  flex-shrink: 0;
}

.sys-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.ok   { background: var(--ok);   box-shadow: 0 0 5px rgba(22,163,74,0.6); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 5px rgba(217,119,6,0.6); }
.status-dot.crit { background: var(--crit); box-shadow: 0 0 5px rgba(220,38,38,0.6); }
.status-dot.dim  { background: var(--dim); }

/* ── Layout ─────────────────────────────────────────────────────────── */
.layout {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.topbar-title { flex: 1; min-width: 0; }

.topbar-title h1 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.topbar-title .page-sub {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

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

/* ── Status Pill ────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
  letter-spacing: 0.02em;
}

.status-pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill.ok   {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.status-pill.ok .dot { background: var(--ok); }

.status-pill.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.status-pill.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-border); }
.status-pill.dim  { background: transparent; color: var(--text-muted); border-color: var(--border); }

/* ── Content ────────────────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 20px 40px 40px;
  width: 100%;
  max-width: 1440px;
}

/* ── Dashboard Hero ─────────────────────────────────────────────────── */
.dash-hero {
  padding: 0;
  margin-bottom: 0;
}

.dash-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.dash-hero-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1;
}

.dash-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 22px;
}

.dash-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Dashboard Section ──────────────────────────────────────────────── */
.dash-section {
  margin-bottom: 24px;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ── Module Grid ────────────────────────────────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Module Cards ───────────────────────────────────────────────────── */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.module-card:hover {
  border-color: rgba(26, 107, 60, 0.35);
  box-shadow: 0 4px 16px rgba(26, 107, 60, 0.08), 0 1px 3px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.module-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.module-card:hover .module-icon {
  background: rgba(26, 107, 60, 0.07);
  border-color: rgba(26, 107, 60, 0.22);
  color: var(--accent);
}

.module-card-body { flex: 1; min-width: 0; }

.module-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.module-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.module-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
  align-self: center;
  margin-left: 4px;
}

.module-card:hover .module-card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ── Stat Cards ─────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border-bright);
}

.stat-card.ok::before   { background: var(--ok); }
.stat-card.warn::before { background: var(--warn); }
.stat-card.crit::before { background: var(--crit); }

.stat-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

.stat-value.ok   { color: var(--ok); }
.stat-value.warn { color: var(--warn); }
.stat-value.crit { color: var(--crit); }

.stat-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ── Panels ─────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-dim);
}

.panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
}

.panel-title svg { color: var(--text-muted); }

.panel-body { padding: 20px; }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr { border-bottom: 1px solid var(--border); }

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-elevated); }

.td-mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-ok,
.badge-healthy,
.badge-active,
.badge-running,
.badge-online    { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok-border); }

.badge-warn,
.badge-warning,
.badge-issues,
.badge-new       { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }

.badge-crit,
.badge-critical,
.badge-error     { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-border); }

.badge-inactive,
.badge-stopped,
.badge-off,
.badge-archive,
.badge-muted,
.badge-unknown,
.badge-not_configured { background: var(--dim-bg); color: var(--dim); border-color: var(--dim-border); }

/* ── Empty State ────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state svg { opacity: 0.35; }
.empty-state p { font-size: 13px; }

.empty-state.ok { color: var(--ok); }
.empty-state.ok svg { opacity: 0.5; }
.empty-state.ok p { opacity: 0.9; }

/* ── Filter Select ──────────────────────────────────────────────────── */
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12.5px;
  padding: 4px 28px 4px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238ea090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  outline: none;
  transition: border-color 0.12s, color 0.12s;
  box-shadow: var(--shadow-card);
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── Table Group Header ─────────────────────────────────────────────── */
tr.group-header td {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 7px 16px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

tr.group-header:first-child td { border-top: none; }

/* ── Table Link ─────────────────────────────────────────────────────── */
.table-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.12s;
}

.table-link:hover { color: var(--accent); }

/* ── Breadcrumb ─────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.12s;
}

.breadcrumb-back:hover { opacity: 0.75; }

/* ── Detail Grid ────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* ── KV Table ───────────────────────────────────────────────────────── */
.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.kv-table tr { border-bottom: 1px solid var(--border-dim); }
.kv-table tr:last-child { border-bottom: none; }

.kv-table td {
  padding: 9px 0;
  vertical-align: middle;
  border-bottom: none;
}

.kv-table td:first-child {
  color: var(--text-muted);
  width: 42%;
  font-size: 12px;
}

.kv-table tbody tr:hover td { background: transparent; }

/* ── Metric Bar ─────────────────────────────────────────────────────── */
.metric-bar {
  height: 3px;
  background: var(--border-bright);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.metric-bar-fill          { height: 100%; border-radius: 2px; background: var(--ok); }
.metric-bar-fill.warn     { background: var(--warn); }
.metric-bar-fill.crit     { background: var(--crit); }

/* ── Reachability ───────────────────────────────────────────────────── */
.reach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-dim);
}

.reach-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.reach-icon.ok   { background: var(--ok-bg);   color: var(--ok); }
.reach-icon.crit { background: var(--crit-bg); color: var(--crit); }

/* ── Stub Page ──────────────────────────────────────────────────────── */
.stub-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.stub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 52px 48px;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.stub-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--accent-dim);
  border: 1px solid rgba(26, 107, 60, 0.18);
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  color: var(--accent);
}

.stub-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.stub-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Monitoring Filter Bar ──────────────────────────────────────────── */
.mon-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
}

.filter-tab {
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font);
  border: none;
  border-radius: calc(var(--r-sm) - 2px);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.filter-tab:hover { color: var(--text-primary); }

.filter-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Search ─────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  font-family: var(--font);
  width: 220px;
  outline: none;
  transition: border-color 0.12s, width 0.2s;
  box-shadow: var(--shadow-card);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--accent);
  width: 260px;
}

.search-input--icon { padding-left: 30px; }

/* ── Monitoring view switcher + source filter bar ───────────────────── */
.mon-view-bar { margin-bottom: 20px; }
.mon-src-bar  { padding: 12px 20px; border-bottom: 1px solid var(--border-dim); }

/* ── Monitoring no-results ──────────────────────────────────────────── */
.mon-no-results {
  padding: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-dim);
}

/* ── Chip Grid ──────────────────────────────────────────────────────── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--mono);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  box-shadow: var(--shadow-card);
}

.chip:hover {
  border-color: rgba(26, 107, 60, 0.4);
  color: var(--accent);
  background: var(--accent-dim);
}

.chip-ok {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: var(--ok);
}

.chip-ok:hover {
  border-color: var(--ok);
  filter: brightness(0.95);
}

/* ── Button Link ────────────────────────────────────────────────────── */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.12s;
}

.btn-link:hover { opacity: 0.75; }

/* ── Sidebar overlay (mobile) ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
}

.sidebar-overlay.visible { display: block; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-float); }
  .layout { margin-left: 0; }
  .menu-toggle { display: flex; }
  .content { padding: 16px 20px 32px; }
  .detail-grid { grid-template-columns: 1fr; }
  .reach-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stat-grid         { grid-template-columns: 1fr 1fr; }
  .topbar            { padding: 0 16px; }
  .content           { padding: 14px 16px 28px; }
}
