.sidebar nav { gap: 6px; }
.nav-label {
  display: block;
  padding: 18px 14px 6px;
  color: #61787d;
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.sidebar nav button {
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 7px;
  position: relative;
}
.sidebar nav button span { width: auto; }
.sidebar nav button .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.035);
  font-size: .86rem;
}
.sidebar nav button small {
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 99px;
  background: #27434a;
  color: #c9d8d9;
  text-align: center;
  font-size: .58rem;
}
.sidebar nav button.active::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.sidebar nav button.active .nav-icon {
  color: var(--accent);
  background: rgba(49,211,154,.09);
}
.topbar { height: 86px; background: rgba(243,245,243,.94); backdrop-filter: blur(16px); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { margin-left: 0; }
.agent-state-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.agent-state-chip i { width: 8px; height: 8px; border-radius: 50%; background: #a8b3b1; }
.agent-state-chip.active { color: #117653; background: #ecfaf5; border-color: #c9eadf; }
.agent-state-chip.active i { background: var(--accent-dark); box-shadow: 0 0 0 4px rgba(49,211,154,.12); }
.agent-state-chip.warning { color: #9c5a12; background: #fff8ec; border-color: #f1dbb7; }
.agent-state-chip.warning i { background: var(--warning); }
.page { padding-top: 34px; max-width: 1500px; }
.page.active { animation: page-in .18s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.integration-card-head { display: flex; gap: 13px; align-items: center; }
.integration-card-head p { margin: 4px 0 0; }
.field-help { display: block; margin-top: -9px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.connection-health { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #f8faf9; }
.connection-health > span { width: 9px; height: 9px; border-radius: 50%; background: #aab7b4; margin-top: 4px; flex: none; }
.connection-health strong, .connection-health small { display: block; }
.connection-health strong { font-size: .77rem; }
.connection-health small { font-size: .68rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.connection-health.valid { background: #effaf6; border-color: #cceade; }
.connection-health.valid > span { background: var(--accent-dark); }
.connection-health.valid strong { color: #136e52; }
.connection-health.invalid { background: #fff3f1; border-color: #f1d2cd; }
.connection-health.invalid > span { background: var(--danger); }
.connection-health.invalid strong { color: #a43c34; }
.connection-health.pending { background: #fff9ee; border-color: #f0dfbf; }
.connection-health.pending > span { background: var(--warning); }
.connection-health.pending strong { color: #93601c; }
.system-alert { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; border: 1px solid #efd6ae; background: #fff8eb; border-radius: 16px; padding: 16px 18px; box-shadow: 0 8px 28px rgba(116,76,16,.05); }
.system-alert strong { color: #86520f; }
.system-alert p { margin: 4px 0 0; color: #7b6b55; font-size: .78rem; }
.sidebar-backdrop { display: none; }
@media (max-width: 760px) {
  .sidebar-backdrop { position: fixed; inset: 0; border: 0; background: rgba(5,18,23,.5); z-index: 15; display: block; }
  .agent-state-chip > span { display: none; }
  .system-alert { align-items: flex-start; flex-direction: column; }
  .system-alert .button { width: 100%; }
}
