/* ============================================================
   GLOBAL + LAYOUT
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--font-mono); }
a { color: inherit; text-decoration: none; }

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  padding: 24px 16px;
  display: flex; flex-direction: column; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent); border-radius: 8px;
  display: grid; place-items: center;
  color: var(--accent-fg); font-weight: 700; font-size: 15px;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.015em; }
.brand-sub { font-size: 12px; color: var(--fg-muted); }

.tenant {
  margin: 0 6px; padding: 8px 0;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.tenant-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.tenant-info { flex: 1; min-width: 0; }
.tenant-name { font-size: 13px; font-weight: 600; }
.tenant-meta { font-size: 11.5px; color: var(--fg-muted); }
.tenant-chev { width: 14px; height: 14px; color: var(--fg-dim); }

.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label {
  font-size: 11px; color: var(--fg-muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  padding: 0 10px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--fg-muted); font-size: 14px; cursor: pointer; font-weight: 500;
  transition: color 0.1s, background 0.1s;
}
.nav-item:hover { color: var(--fg); background: var(--bg-soft); }
.nav-item.active { background: var(--tint); color: var(--accent); }
.nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--critical-bg); color: var(--critical);
  padding: 1px 7px; border-radius: 999px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  display: flex; align-items: center; gap: 10px;
  padding-left: 6px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-fg);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 12px; color: var(--fg-muted); }

/* ============================================================
   MAIN / TOPBAR
   ============================================================ */
.main {
  display: flex; flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--hair);
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 36px 0;
}
.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: var(--bg-soft); border-radius: 10px;
  color: var(--fg-muted); font-size: 13.5px; cursor: text;
}
.search kbd {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 6px;
  background: var(--bg); border-radius: 4px; color: var(--fg-dim);
}
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; color: var(--fg-muted);
  cursor: pointer; display: grid; place-items: center; border: none;
}
.icon-btn:hover { color: var(--fg); background: var(--bg-soft); }
.theme-btn {
  padding: 8px 12px; border-radius: 10px;
  background: transparent; color: var(--fg-muted); cursor: pointer;
  font: inherit; font-size: 13px;
  display: flex; align-items: center; gap: 6px; border: none;
}
.theme-btn:hover { color: var(--fg); background: var(--bg-soft); }
.theme-btn svg { width: 14px; height: 14px; }

/* ============================================================
   DEMO-DATA BANNER (auto-hides once real ingestion starts)
   ============================================================ */
.demo-banner {
  margin: 16px 36px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color: var(--fg);
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 12px;
  line-height: 1.5;
}
.demo-banner svg { width: 18px; height: 18px; color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.demo-banner-body { flex: 1; }
.demo-banner strong { color: var(--warn); font-weight: 700; margin-right: 4px; }
.demo-banner code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--surface); padding: 1px 6px; border-radius: 4px;
}
.demo-banner a { color: var(--accent); font-weight: 600; margin-left: 6px; white-space: nowrap; }
.demo-banner a:hover { text-decoration: underline; }

/* ============================================================
   CONTENT
   ============================================================ */
.content { padding: 28px 36px 56px; flex: 1; overflow: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.page-sub { color: var(--fg-muted); font-size: 14.5px; margin: 6px 0 0; }
.live-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg-muted); font-weight: 500;
}
.live-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 var(--good);
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--tint-strong); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* KPI strip (borderless, separated by vertical hairlines) */
.kpi-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-bottom: 40px;
}
.kpi { padding: 0 28px 0 0; border-right: 1px solid var(--hair); }
.kpi:last-child { border-right: none; padding-right: 0; }
.kpi:not(:first-child) { padding-left: 28px; }
.kpi-label { font-size: 13px; color: var(--fg-muted); font-weight: 500; margin-bottom: 8px; }
.kpi-value {
  font-size: 34px; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.1;
  font-feature-settings: 'tnum';
}
.kpi.signal .kpi-value { color: var(--critical); }
.kpi-meta { font-size: 12.5px; color: var(--fg-muted); margin-top: 10px; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--hair); }
.tab {
  padding: 10px 16px 12px;
  font-size: 14px; font-weight: 500;
  color: var(--fg-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: 7px;
  background: none; border-left: none; border-right: none; border-top: none;
  font-family: inherit;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count { font-size: 12px; color: var(--fg-dim); }
.tab.active .count { color: var(--accent); }

/* Filters */
.filters { display: flex; gap: 4px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; color: var(--fg-muted); cursor: pointer; font-weight: 500;
  background: transparent; border: none;
  font-family: inherit;
}
.chip:hover { background: var(--bg-soft); color: var(--fg); }
.chip.active { background: var(--tint); color: var(--accent); }
.chip strong { color: var(--fg); font-weight: 600; }

/* ============================================================
   SPLIT (events list + detail)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 420px; gap: 32px; align-items: start; }

.events { display: flex; flex-direction: column; }
.event {
  display: grid; grid-template-columns: 140px 1fr 110px 28px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--hair);
  cursor: pointer; align-items: center; gap: 16px;
  transition: background 0.15s, padding 0.15s;
  border-radius: 8px;
  margin: 0 -8px;
}
.event:hover { background: var(--bg-soft); }
.event.selected {
  background: var(--tint);
  padding-left: 16px;
  box-shadow: inset 3px 0 0 var(--accent);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.attn { color: var(--critical); background: var(--critical-bg); }
.pill.handled { color: var(--info); background: var(--info-bg); }
.pill.noise { color: var(--fg-muted); background: var(--bg-soft); }
.pill.pending { color: var(--fg-muted); background: var(--bg-soft); }

.event-main { min-width: 0; }
.event-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.source-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--fg-muted); letter-spacing: 0.04em; }
.event-host { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.event-summary { color: var(--fg-muted); font-size: 13.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-time { font-size: 13px; color: var(--fg-muted); text-align: right; font-feature-settings: 'tnum'; }
.event-time strong { color: var(--fg); font-weight: 600; display: block; font-family: var(--font-mono); font-size: 13px; }
.event-more { color: var(--fg-dim); width: 28px; text-align: center; cursor: pointer; border-radius: 6px; padding: 4px 0; }
.event-more:hover { background: var(--bg-soft); color: var(--fg); }

/* ============================================================
   DETAIL PANEL  (no border, tinted bg)
   ============================================================ */
.detail {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 28px;
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 26px;
}
.detail-head {
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 22px; border-bottom: 1px solid var(--hair);
}
.detail-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin: 4px 0; }
.detail-sub { font-size: 13px; color: var(--fg-muted); font-family: var(--font-mono); }
.detail-id { font-size: 12px; color: var(--fg-dim); margin-left: auto; font-family: var(--font-mono); }

.detail-section { display: flex; flex-direction: column; gap: 10px; }
.detail-label { font-size: 11px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.atlas-block {
  background: var(--tint);
  border-radius: 12px;
  padding: 16px 18px;
}
.atlas-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.atlas-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.atlas-name { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.atlas-role { font-size: 11.5px; color: var(--fg-muted); }
.atlas-meta { font-size: 11.5px; color: var(--fg-muted); margin-left: auto; }
.atlas-reason { font-size: 14px; line-height: 1.65; color: var(--fg); margin: 0; }

.fields { display: grid; grid-template-columns: 90px 1fr; gap: 10px 16px; font-size: 13px; }
.fields dt { color: var(--fg-muted); }
.fields dd { margin: 0; color: var(--fg); font-weight: 500; font-family: var(--font-mono); font-size: 12.5px; }

.actions { display: flex; gap: 8px; padding-top: 22px; border-top: 1px solid var(--hair); }
.btn {
  flex: 1; padding: 10px 14px; font: inherit; font-size: 13.5px; font-weight: 500;
  border-radius: 10px; cursor: pointer; background: var(--surface); color: var(--fg);
  border: 1px solid var(--hair);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { border-color: var(--hair-strong); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn.ghost:hover { background: var(--surface); color: var(--fg); }
.btn svg { width: 14px; height: 14px; }

/* Empty states */
.empty {
  background: var(--bg-soft); border-radius: 16px;
  padding: 48px 32px; text-align: center;
}
.empty-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.empty-body { color: var(--fg-muted); font-size: 14px; margin: 0; }
.empty code { font-family: var(--font-mono); background: var(--bg); padding: 1px 6px; border-radius: 4px; }


/* ============================================================
   AGENTS PAGE
   ============================================================ */
.btn-primary {
  background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent);
  padding: 10px 16px; font: inherit; font-size: 14px; font-weight: 600; border-radius: 10px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary svg { width: 14px; height: 14px; }

.agents-grid { display: flex; flex-direction: column; gap: 20px; }
.agent-row {
  background: var(--bg-soft); border-radius: 16px; padding: 24px 28px;
  display: grid; grid-template-columns: auto 1fr 280px; gap: 28px; align-items: start;
}
.agent-row.available { background: transparent; border: 1px dashed var(--hair-strong); }
.agent-portrait {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-fg); display: grid; place-items: center;
  font-size: 28px; font-weight: 700; position: relative;
}
.agent-portrait.vtam { background: linear-gradient(135deg, #6366f1, #4338ca); color: #fff; }
.agent-portrait.available {
  background: var(--bg); color: var(--fg-dim); border: 2px dashed var(--hair-strong);
}
.agent-status-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--good);
  border: 3px solid var(--bg-soft);
}
.agent-row.available .agent-status-dot { display: none; }

.agent-info-main {}
.agent-name-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.agent-name { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.agent-role-title { font-size: 14px; color: var(--fg-muted); font-weight: 500; }
.agent-status-text {
  font-size: 12px; font-weight: 600; color: var(--good);
  display: inline-flex; align-items: center; gap: 6px;
}
.agent-status-text::before { content: '●'; }
.agent-status-text.available { color: var(--fg-dim); }
.agent-status-text.available::before { content: '○'; }
.agent-desc {
  font-size: 14px; color: var(--fg); line-height: 1.6;
  margin: 12px 0 16px; max-width: 56ch;
}
.agent-meta-row { display: flex; gap: 28px; flex-wrap: wrap; }
.meta-cell {}
.meta-label {
  font-size: 11px; color: var(--fg-muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 4px;
}
.meta-value { font-size: 14px; color: var(--fg); font-weight: 600; font-feature-settings: 'tnum'; }
.meta-value.mono { font-family: var(--font-mono); font-size: 13px; }
.agent-integrations { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.int-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px;
  background: var(--bg); border-radius: 6px;
  color: var(--fg-muted); font-weight: 500;
}
.int-chip.connected { color: var(--good); }
.int-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.agent-actions { display: flex; flex-direction: column; gap: 8px; }
.agent-actions .btn { padding: 9px 14px; font-size: 13.5px; }
.agent-actions .btn.danger { color: var(--critical); }


/* ============================================================
   ATLAS ACTIVITY PAGE
   ============================================================ */
.agent-header { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.agent-identity { flex: 1; }
.agent-header .agent-name { font-size: 28px; }
.agent-tagline { font-size: 14px; color: var(--fg-muted); margin: 4px 0 0; max-width: 60ch; }
.agent-header .agent-status-dot { border-color: var(--bg); }
.header-actions { display: flex; gap: 8px; }

.range-toggle {
  display: inline-flex; padding: 3px; background: var(--bg-soft);
  border-radius: 999px; margin-bottom: 24px;
}
.range-btn {
  padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--fg-muted);
  cursor: pointer; border-radius: 999px; border: none; background: transparent;
  font-family: inherit;
}
.range-btn:hover { color: var(--fg); }
.range-btn.active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.kpi-strip.kpi-5 { grid-template-columns: repeat(5, 1fr); }

.chart-block {
  background: var(--bg-soft); border-radius: 16px;
  padding: 24px 28px; margin-bottom: 32px;
}
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--fg-muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend-attn { background: var(--critical); }
.legend-handled { background: var(--accent); opacity: 0.7; }
.legend-noise { background: var(--fg-dim); opacity: 0.5; }
.chart { width: 100%; height: 260px; }
.chart-axis-label { font-family: var(--font-mono); font-size: 10px; fill: var(--fg-dim); }
.chart-tick { stroke: var(--hair); stroke-width: 1; }
.chart-bar-attn { fill: var(--critical); }
.chart-bar-handled { fill: var(--accent); opacity: 0.7; }
.chart-bar-noise { fill: var(--fg-dim); opacity: 0.5; }

.section-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 18px; }
.feed-filters { display: flex; gap: 4px; margin-bottom: 16px; align-items: center; }
.feed-chip {
  padding: 6px 14px; border-radius: 8px; font-size: 13px;
  color: var(--fg-muted); cursor: pointer; font-weight: 500;
  background: transparent; border: none; font-family: inherit;
}
.feed-chip:hover { background: var(--bg-soft); color: var(--fg); }
.feed-chip.active { background: var(--tint); color: var(--accent); }

.feed { display: flex; flex-direction: column; }
.feed-entry {
  padding: 18px 4px; border-bottom: 1px solid var(--hair);
  display: grid; grid-template-columns: 80px 1fr 140px; gap: 16px; align-items: start;
}
.feed-time {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-muted); padding-top: 1px;
}
.feed-time strong { color: var(--fg); font-weight: 600; display: block; font-size: 13px; }
.feed-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.feed-host { font-family: var(--font-mono); font-size: 13px; color: var(--fg); font-weight: 500; }
.feed-source { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.feed-event { font-size: 14px; color: var(--fg); margin-bottom: 4px; font-weight: 500; }
.feed-reason { font-size: 13px; color: var(--fg-muted); line-height: 1.6; }
.feed-right { text-align: right; }
.confidence-label { font-size: 11px; color: var(--fg-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.confidence-value { font-size: 13px; font-weight: 600; }
.confidence-bar-vis { width: 90px; height: 4px; background: var(--bg-soft); border-radius: 2px; margin-top: 4px; margin-left: auto; overflow: hidden; }
.confidence-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; }


/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.subnav-section {
  font-size: 11px; color: var(--fg-muted); text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600;
  padding: 8px 10px 6px; margin-top: 12px;
}
.subnav-section:first-child { margin-top: 0; }
.subnav-item {
  padding: 8px 10px; border-radius: 8px;
  color: var(--fg-muted); font-size: 14px; cursor: pointer; font-weight: 500;
}
.subnav-item:hover { color: var(--fg); background: var(--bg-soft); }
.subnav-item.active { background: var(--tint); color: var(--accent); font-weight: 600; }
.section-block { display: flex; flex-direction: column; gap: 32px; }
.section-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.section-head p { color: var(--fg-muted); font-size: 14px; margin: 6px 0 0; max-width: 70ch; }

.tenant-card {
  padding: 24px; background: var(--bg-soft); border-radius: 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.tc-name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.tc-meta { color: var(--fg-muted); font-size: 13px; margin-top: 4px; }
.tc-id { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); margin-top: 8px; }

.int-list { display: flex; flex-direction: column; }
.int-row {
  padding: 20px 4px;
  display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center;
  border-bottom: 1px solid var(--hair);
}
.int-row:last-child { border-bottom: none; }
.int-logo {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: white; letter-spacing: -0.02em;
}
.logo-bd { background: linear-gradient(135deg, #ed1c24, #aa1a20); }
.logo-huntress { background: linear-gradient(135deg, #f47925, #d65613); }
.logo-tl { background: linear-gradient(135deg, #002d65, #001f47); }
.logo-cw { background: linear-gradient(135deg, #00b3e6, #007ea3); }
.logo-apriver { background: linear-gradient(135deg, #5a3e85, #3d2865); }
.logo-sa { background: linear-gradient(135deg, #1f8a3c, #136028); }
.logo-itg { background: linear-gradient(135deg, #4a3aab, #322679); }
.logo-zy { background: linear-gradient(135deg, #f15a29, #c64518); }
.int-info {}
.int-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.int-name { font-size: 15px; font-weight: 600; }
.int-status {
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.int-status::before { content: '●'; font-size: 8px; }
.int-status.connected { color: var(--good); background: var(--good-bg); }
.int-status.not-connected { color: var(--fg-muted); background: var(--bg-soft); }
.int-status.error { color: var(--critical); background: var(--critical-bg); }
.int-desc { font-size: 13px; color: var(--fg-muted); }
.int-meta { font-size: 12px; color: var(--fg-dim); margin-top: 4px; font-family: var(--font-mono); }
.int-actions { display: flex; gap: 8px; }

.field-row {
  padding: 20px 0;
  display: grid; grid-template-columns: 240px 1fr; gap: 32px;
  border-bottom: 1px solid var(--hair); align-items: start;
}
.field-row:last-child { border-bottom: none; }
.field-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field-help { font-size: 13px; color: var(--fg-muted); line-height: 1.55; }
.field-control { display: flex; flex-direction: column; gap: 10px; }
.input {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 10px;
  padding: 10px 14px; font: inherit; font-size: 14px; color: var(--fg); width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.input.mono { font-family: var(--font-mono); font-size: 13px; }

.toggle-switch { display: flex; align-items: center; gap: 12px; }
.switch {
  position: relative; width: 40px; height: 24px;
  background: var(--hair-strong); border-radius: 999px;
  cursor: pointer; transition: background 0.2s;
}
.switch.on { background: var(--accent); }
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: white; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch.on::after { transform: translateX(16px); }
.switch-label { font-size: 14px; }
.switch-help { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
