/* RemarK Ops — consola comercial dark */
:root {
  --bg: #09090b;
  --bg-elevated: #111113;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.35);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.12);
  --na: #52525b;
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --sidebar-w: 260px;
  --scrollbar-size: 8px;
  --scrollbar-thumb: var(--border-light);
  --scrollbar-thumb-hover: var(--text-muted);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

html, body, * {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-corner { background: transparent; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-secondary); }
.small { font-size: 0.78rem; }
.mono { font-family: var(--font-mono); font-size: 0.85em; }
.hidden { display: none !important; }

/* Login */
.login-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem; position: relative; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(99, 102, 241, 0.06), transparent),
    var(--bg);
}
.login-panel {
  position: relative; width: min(420px, 100%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.login-brand strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.login-brand span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.login-panel h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login-panel label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin: 1rem 0 0.35rem; }
.login-panel input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.65rem 0.85rem; color: var(--text); font-size: 0.95rem;
}
.login-panel input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.login-panel code { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-family: var(--font-mono); }
.err { color: var(--bad); font-size: 0.85rem; margin-top: 0.75rem; }

.logo-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #000;
}
.logo-mark.sm { width: 32px; height: 32px; font-size: 0.9rem; border-radius: 8px; }

/* Shell layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-elevated); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.sidebar-head { display: flex; align-items: center; gap: 0.65rem; padding: 1.1rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-title strong { display: block; font-size: 0.95rem; }
.sidebar-title span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sidebar-nav { flex: 1; min-height: 0; padding: 0.75rem 0.65rem; overflow-y: auto; }
.nav-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 0.85rem 0.65rem 0.35rem;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 0.6rem;
  background: transparent; border: none; border-radius: var(--radius);
  padding: 0.55rem 0.65rem; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; text-align: left; transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.is-on { background: var(--accent-dim); color: var(--accent); }
.nav-item.is-on svg { opacity: 1; }
.inst-select {
  width: calc(100% - 1.3rem); margin: 0.25rem 0.65rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 0.65rem; color: var(--text); font-weight: 600; font-size: 0.85rem;
}
.sidebar-foot {
  padding: 0.85rem 1rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.link-ext { font-size: 0.78rem; font-weight: 600; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10;
}
.topbar-left h2 { font-size: 1.05rem; margin-bottom: 0.1rem; }
.topbar-left p { font-size: 0.78rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.mobile-menu { display: none; }

.live-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--ok-bg); border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.78rem; font-weight: 600; color: var(--ok);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.3rem 0.65rem; font-size: 0.75rem; font-weight: 600;
}
.muted-chip { color: var(--text-muted); }

.page { padding: 1.25rem; flex: 1; }
.view { display: none; }
.view.is-on { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: none; border-radius: var(--radius); padding: 0.55rem 1rem;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: var(--font);
}
.btn-lg { padding: 0.75rem 1.25rem; width: 100%; margin-top: 0.5rem; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.78rem; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-light); background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-icon { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.65rem; color: var(--text); cursor: pointer; }

/* Hero banner */
.hero-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-bottom: 0.5rem;
}
.hero-banner.state-ok { border-color: rgba(52, 211, 153, 0.3); }
.hero-banner.state-bad { border-color: rgba(248, 113, 113, 0.35); background: linear-gradient(135deg, rgba(248,113,113,0.06), var(--surface)); }
.hero-banner.state-maint { border-color: rgba(251, 191, 36, 0.35); }
.hero-status { display: flex; align-items: center; gap: 0.85rem; flex: 1; min-width: 200px; }
.hero-status h3 { font-size: 1.15rem; }
.status-ring {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: var(--ok); box-shadow: 0 0 12px var(--ok);
}
.status-ring.bad { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.status-ring.warn { background: var(--warn); box-shadow: 0 0 12px var(--warn); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta-chip {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.35rem 0.65rem; font-size: 0.75rem;
}
.meta-chip span { color: var(--text-muted); margin-right: 0.25rem; }
.meta-chip.warn-chip { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); }
.diag-panel { margin-bottom: 1rem; border-color: rgba(251, 191, 36, 0.35); }
.diag-panel h3 { font-size: 0.9rem; margin-bottom: 0.6rem; color: var(--warn); }
.diag-list { margin: 0; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.88rem; }
.diag-list li { margin: 0.35rem 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.maint-note { margin-bottom: 1rem; padding-left: 0.25rem; }

/* Sections */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.section-title { margin: 1.75rem 0 0.85rem; font-size: 1.1rem; }

/* KPI grid */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem; margin-bottom: 1.25rem;
}
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 0.95rem 1rem; transition: border-color 0.15s;
}
.kpi:hover { border-color: var(--border-light); }
.kpi span { display: block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.25rem; }
.kpi b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.kpi.ok b { color: var(--ok); }
.kpi.bad b { color: var(--bad); }
.kpi.warn b { color: var(--warn); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.filter-btn.is-on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }

/* Fleet cards */
.fleet-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem; cursor: pointer; text-align: left; width: 100%;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.fleet-card:hover { transform: translateY(-2px); border-color: var(--border-light); box-shadow: var(--shadow); }
.fleet-card.ok { border-left: 3px solid var(--ok); }
.fleet-card.degraded, .fleet-card.stale { border-left: 3px solid var(--warn); }
.fleet-card.down { border-left: 3px solid var(--bad); }
.fleet-card.maintenance { border-left: 3px solid var(--warn); opacity: 0.92; }
.fleet-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.fleet-card-head h3 { font-size: 1rem; }
.fleet-card-line { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.4; }
.node-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3rem; }
.node-pill {
  text-align: center; font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  padding: 0.35rem 0.15rem; border-radius: 6px; background: var(--bg); color: var(--text-muted);
}
.node-pill.ok { background: var(--ok-bg); color: var(--ok); }
.node-pill.bad { background: var(--bad-bg); color: var(--bad); }
.node-pill.warn { background: var(--warn-bg); color: var(--warn); }
.fleet-card-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem;
  padding-top: 0.65rem; border-top: 1px solid var(--border); font-size: 0.72rem; color: var(--text-muted);
}

/* Feed panel */
.feed-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem; max-height: 520px; overflow-y: auto;
}
.feed-panel h3 { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--text-secondary); }
.feed-list { list-style: none; }
.feed-item {
  padding: 0.65rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.feed-item:last-child { border-bottom: none; }
.feed-time { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.feed-msg { margin-top: 0.2rem; color: var(--text-secondary); }

/* Badges */
.badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem; border-radius: 999px;
}
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-na { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* Panels & tables */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem; margin-bottom: 1rem;
}
.panel h3 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.85rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
tr:hover td { background: var(--surface-hover); }
.scroll-x { overflow-x: auto; }

/* Topology */
.topo-map { display: grid; gap: 1rem; justify-items: center; padding: 0.5rem 0; }
.topo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem; }
.node {
  min-width: 88px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.55rem 0.65rem; text-align: center; font-weight: 700; font-size: 0.78rem;
}
.node.ok { background: var(--ok-bg); border-color: rgba(52,211,153,0.3); color: var(--ok); }
.node.bad { background: var(--bad-bg); border-color: rgba(248,113,113,0.3); color: var(--bad); }
.node.warn { background: var(--warn-bg); border-color: rgba(251,191,36,0.3); color: var(--warn); }
.node.na { opacity: 0.45; }
.edge {
  border: 0; background: var(--bg); cursor: pointer; border-radius: 8px;
  padding: 0.3rem 0.45rem; min-width: 58px; display: flex; flex-direction: column; gap: 3px;
}
.edge i { height: 6px; border-radius: 99px; background: var(--na); display: block; }
.edge i.ok { background: var(--ok); }
.edge i.bad { background: var(--bad); }
.edge i.warn { background: var(--warn); }
.edge small { font-size: 0.62rem; color: var(--text-muted); }

/* Matrix */
.matrix { border-collapse: separate; border-spacing: 5px; }
.cell {
  width: 100%; min-height: 68px; border: 1px solid var(--border); background: var(--bg);
  border-radius: var(--radius); cursor: pointer; padding: 0.4rem;
  display: flex; flex-direction: column; gap: 0.25rem; color: var(--text);
}
.cell .pair { display: flex; gap: 3px; height: 10px; }
.cell .pair i { flex: 1; border-radius: 99px; background: var(--na); }
.cell .pair i.ok { background: var(--ok); }
.cell .pair i.bad { background: var(--bad); }
.cell .pair i.warn { background: var(--warn); }
.cell.na { opacity: 0.35; cursor: default; }
.cell small { font-size: 0.65rem; color: var(--text-muted); }

/* Path track */
.path-track { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin-bottom: 1rem; }
.station {
  flex: 1 1 150px; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
}
.station.ok { border-color: rgba(52,211,153,0.35); background: var(--ok-bg); }
.station.bad { border-color: rgba(248,113,113,0.35); background: var(--bad-bg); }
.station.warn { border-color: rgba(251,191,36,0.35); background: var(--warn-bg); }
.station .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #000;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 800; margin-bottom: 0.45rem;
}
.rail { width: 16px; align-self: center; height: 3px; background: var(--border); flex: 0 0 16px; border-radius: 99px; }
.rail.ok { background: var(--ok); }
.rail.bad { background: var(--bad); }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.65rem; }
.card-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem;
}
.card-item .ext { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }

/* Trunks */
.trunk {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.65rem; align-items: center;
  margin-bottom: 0.65rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
}
.trunk-arrow { font-weight: 800; color: var(--accent); text-align: center; }
@media (max-width: 640px) { .trunk { grid-template-columns: 1fr; } }

/* Observability levels */
.obs-instance { margin-bottom: 1.5rem; }
.obs-instance-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.progress-bar { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 0.35rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #6366f1); border-radius: 99px; }
.level-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.level-row:last-child { border-bottom: none; }

/* Catalog */
.form-panel { margin-bottom: 1.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.3rem; }
.field-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; margin-top: 0.35rem; }
.field-hint code { background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.form-section { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0.5rem 0 0; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.catalog-intro h3 { margin-bottom: 0.5rem; }
.catalog-intro .req-list { list-style: none; margin-top: 0.75rem; display: grid; gap: 0.45rem; }
.catalog-intro .req-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.form-group input, .form-group select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.55rem 0.7rem; color: var(--text);
}
.form-group.full, .form-check.full, .form-actions.full { grid-column: 1 / -1; }
.form-check label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; cursor: pointer; }
.catalog-list { display: grid; gap: 0.5rem; }
.catalog-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

/* Timeline */
.timeline { list-style: none; }
.timeline li {
  display: flex; gap: 0.85rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem;
}
.timeline-time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); min-width: 130px; }
.timeline-body { flex: 1; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  display: grid; place-items: center; z-index: 100; padding: 1rem;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; width: min(400px, 100%); box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 0.35rem; }
.modal label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin: 0.85rem 0 0.3rem; }
.modal input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.55rem 0.7rem; color: var(--text);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }
.modal-wide { width: min(560px, 100%); }
.agent-card { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.agent-card:hover, .agent-card:focus { border-color: var(--accent); outline: none; transform: translateY(-1px); }
.agent-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.35rem; }
.agent-name { min-height: 1.2em; }
.tiny { font-size: 0.68rem; opacity: 0.75; }
.detail-grid { display: grid; grid-template-columns: 9rem 1fr; gap: 0.45rem 1rem; font-size: 0.85rem; margin-top: 0.75rem; }
.detail-grid dt { color: var(--text-muted); font-weight: 600; }
.detail-grid dd { margin: 0; color: var(--text-secondary); }
.detail-list { margin: 0; padding-left: 1.1rem; }
.setup-steps { margin: 0.5rem 0 0; padding-left: 1.2rem; line-height: 1.45; }
.setup-steps li { margin-bottom: 0.35rem; }

/* Troncales */
.trunk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.trunk-group { margin-bottom: 1rem; }
.trunk-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1rem; border-left: 3px solid var(--border);
}
.trunk-card.ok { border-left-color: var(--ok); }
.trunk-card.bad { border-left-color: var(--bad, #b42318); }
.trunk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.catalog-details { margin-top: 1rem; padding: 0.75rem 1rem; }
.warn-box { background: rgba(180, 83, 9, 0.12); border: 1px solid rgba(180, 83, 9, 0.35); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.85rem; }
.alert-panel { margin-bottom: 1rem; font-size: 0.85rem; }
.alert-panel.ok { border-color: var(--ok); }
.alert-panel.warn { border-color: #b45309; background: rgba(180, 83, 9, 0.08); }

/* Eventos */
.event-feed { display: flex; flex-direction: column; gap: 0.5rem; }
.event-day { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 1rem 0 0.35rem; }
.event-card {
  display: flex; gap: 0.85rem; padding: 0.85rem 1rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); border-left: 3px solid var(--border);
}
.event-card.sev-bad { border-left-color: #b42318; }
.event-card.sev-warn { border-left-color: #b45309; }
.event-card.sev-info { border-left-color: var(--accent); }
.event-icon { font-size: 1.1rem; opacity: 0.85; min-width: 1.5rem; padding-top: 0.1rem; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; font-size: 0.78rem; }
.event-msg { margin: 0; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.45; }
.event-time { color: var(--text-muted); }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.75rem 1.1rem; font-size: 0.85rem; font-weight: 600; box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%);
    transition: transform 0.25s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: block; }
  .hero-actions { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .node-strip { grid-template-columns: repeat(3, 1fr); }
}
