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

html {
  height: 100%;
  font-size: 16px;
}

body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font);
}

.portal-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  height: var(--topnav-h);
  padding: 0 28px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--c-ink);
}

.top-nav-brand img {
  height: 30px;
  width: auto;
  display: block;
}

.top-nav-brand-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-left: 14px;
  border-left: 1px solid var(--c-border);
  white-space: nowrap;
}

.top-nav-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  max-width: 360px;
  min-width: 120px;
  width: 100%;
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  color: var(--c-ink-mute);
  cursor: text;
  justify-self: center;
  transition: border-color 0.15s;
  white-space: nowrap;
}

.top-nav-search:hover {
  border-color: var(--c-border-strong);
}

.top-nav-search-placeholder {
  font-size: 13px;
}

.top-nav-search-kbd {
  margin-left: auto;
  font-size: 10.5px;
  font-family: var(--mono);
  padding: 2px 6px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-ink-mute);
}

.top-nav-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.top-nav-sep {
  width: 1px;
  height: 22px;
  background: var(--c-border);
}

.portal-footer {
  border-top: 1px solid var(--c-border);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--c-ink-mute);
  background: var(--c-surface);
  flex-shrink: 0;
}

.portal-footer a:hover {
  color: var(--c-ink);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  color: var(--c-ink-soft);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: opacity 0.15s;
  white-space: nowrap;
}

.status-badge:hover {
  opacity: 0.75;
}

.status-badge--loading {
  opacity: 0.5;
}

.status-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c-ink-mute);
}

.status-badge--operational .status-badge-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px #dcfce7;
}

.status-badge--degraded .status-badge-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px #fef3c7;
}

.status-badge--outage .status-badge-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px #fee2e2;
}

.status-badge--unknown .status-badge-dot {
  background: var(--c-ink-mute);
}

.status-badge-label {
  letter-spacing: 0.01em;
}

.role-btn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.api-content-panel {
  flex: 1;
  min-width: 0;
  
  padding: 32px 40px 80px;
}
