:root {
  color-scheme: dark;
  --bg: #070c16;
  --surface: #0d1527;
  --surface-2: #111b31;
  --surface-3: #16213a;
  --border: #243252;
  --text: #e7ecf8;
  --muted: #95a2c4;
  --accent: #7bdcff;
  --good: #67d59d;
  --warn: #f0c96b;
  --bad: #ff7b7b;
  --critical: #ff5e7a;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(123, 220, 255, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(157, 140, 255, 0.11), transparent 26%),
    linear-gradient(180deg, #08101d 0%, var(--bg) 100%);
  color: var(--text);
}

@media (min-width: 921px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 1px);
  min-height: calc(100vh - 1px);
  flex: 0 0 280px;
  padding: 24px 18px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(36, 50, 82, 0.7);
  background: rgba(7, 12, 22, 0.96);
  overflow: hidden;
}

.sidebar-compact {
  justify-content: flex-start;
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.main-content {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  text-align: left;
}

.nav-group-toggle:hover {
  background: rgba(123, 220, 255, 0.08);
  border-color: rgba(123, 220, 255, 0.16);
}

.nav-group-toggle.is-active,
.nav-group-children a.is-active {
  background: rgba(123, 220, 255, 0.14);
  border-color: rgba(123, 220, 255, 0.28);
}

.nav-caret {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-group-children {
  display: grid;
  gap: 8px;
  padding-left: 14px;
}

.nav-group-children a,
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(123, 220, 255, 0.08);
  border-color: rgba(123, 220, 255, 0.16);
  text-decoration: none;
}

.nav-group.is-open .nav-group-toggle {
  border-color: rgba(123, 220, 255, 0.16);
}

.nav-group.is-open .nav-group-toggle .nav-caret {
  transform: rotate(180deg);
}

.nav-group .nav-group-children {
  display: none;
}

.nav-group.is-open .nav-group-children {
  display: grid;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-collapse-toggle {
  position: absolute;
  right: -14px;
  top: 24px;
  z-index: 3;
  width: 28px;
  height: 52px;
  padding: 0;
  border-radius: 0 14px 14px 0;
  border-left: 0;
  background: rgba(13, 21, 39, 0.98);
  border-color: rgba(36, 50, 82, 0.95);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(123, 220, 255, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar {
  flex: 0 0 auto;
  min-height: 10px;
  padding: 6px 32px 0;
}

.page-global-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 32px 8px;
}

.report-issue-trigger {
  font-size: 0.82rem;
  padding: 8px 12px;
}

.report-issue-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(36, 50, 82, 0.9);
  border-radius: 18px;
  background: rgba(10, 15, 28, 0.98);
  color: var(--text);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.report-issue-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.report-issue-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.report-issue-form textarea,
.report-issue-form input,
.report-issue-form select {
  width: 100%;
}

.report-issue-close {
  min-width: 34px;
  height: 34px;
  padding: 0;
}

.settings-inline-toggle,
.settings-checkbox-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-checkbox-toggle {
  color: var(--text);
  font-size: 0.92rem;
}

.settings-checkbox-toggle input {
  width: 16px;
  height: 16px;
}

.issue-report-description {
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
}

.issue-report-metadata {
  white-space: pre-wrap;
  word-break: break-word;
}

.issue-report-status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.issue-report-notes {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.issue-report-note {
  padding: 14px;
  border: 1px solid rgba(36, 50, 82, 0.85);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.issue-report-note-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.issue-report-note p {
  margin: 0;
  white-space: pre-wrap;
}

.issue-report-note-form {
  display: grid;
  gap: 12px;
}

.content-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  overflow-x: hidden;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 32px 32px;
}

.sidebar-nav::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-nav:hover,
.sidebar-nav:focus-within,
.main-content:hover,
.main-content:focus-within {
  scrollbar-width: thin;
}

.sidebar-nav:hover::-webkit-scrollbar,
.sidebar-nav:focus-within::-webkit-scrollbar,
.main-content:hover::-webkit-scrollbar,
.main-content:focus-within::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb,
.sidebar-nav:focus-within::-webkit-scrollbar-thumb,
.main-content:hover::-webkit-scrollbar-thumb,
.main-content:focus-within::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.34);
  border-radius: 999px;
}

.sidebar-nav:hover::-webkit-scrollbar-track,
.sidebar-nav:focus-within::-webkit-scrollbar-track,
.main-content:hover::-webkit-scrollbar-track,
.main-content:focus-within::-webkit-scrollbar-track {
  background: transparent;
}

.main-content {
  scrollbar-gutter: stable;
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
}

.main-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.main-content:hover,
.main-content:focus-within {
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 220, 255, 0.34) transparent;
}

.main-content:hover::-webkit-scrollbar,
.main-content:focus-within::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.main-content:hover::-webkit-scrollbar-thumb,
.main-content:focus-within::-webkit-scrollbar-thumb {
  background: rgba(123, 220, 255, 0.34);
  border-radius: 999px;
}

.main-content:hover::-webkit-scrollbar-track,
.main-content:focus-within::-webkit-scrollbar-track {
  background: transparent;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 0;
  min-height: 52px;
}

.compact-page-header {
  min-height: 44px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.compact-page-header h1 {
  font-size: clamp(1.25rem, 1.8vw, 1.8rem);
}

.compact-page-header .page-subtitle {
  margin-top: 3px;
  font-size: 0.88rem;
}

.compact-page-header .header-actions {
  align-self: center;
}

.page-header h1,
h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  line-height: 1.1;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  max-width: 64ch;
  font-size: 0.92rem;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.page-back-link:hover {
  color: var(--text);
  text-decoration: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumb a {
  color: var(--accent);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(36, 50, 82, 0.95);
  background: rgba(17, 27, 49, 0.7);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1;
}

.filter-tab:hover {
  border-color: rgba(123, 220, 255, 0.36);
  background: rgba(123, 220, 255, 0.08);
  text-decoration: none;
}

.filter-tab.is-active {
  border-color: rgba(123, 220, 255, 0.56);
  background: rgba(123, 220, 255, 0.14);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-page {
  overflow: auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background:
    radial-gradient(circle at top left, rgba(123, 220, 255, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(157, 140, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #08101d 0%, var(--bg) 100%);
}

.auth-brand-panel {
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-card {
  width: min(100%, 820px);
  padding: clamp(26px, 3vw, 34px);
  border: 1px solid rgba(36, 50, 82, 0.8);
  border-radius: 30px;
  background: rgba(13, 21, 39, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-brand-copy h1 {
  max-width: 5.5ch;
  margin: 0;
  font-size: clamp(2.4rem, 4.4vw, 4.2rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.auth-brand-subtitle {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: none;
}

.auth-feature-card,
.auth-card {
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: rgba(13, 21, 39, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}

.auth-feature-card {
  padding: 16px;
  border-radius: 20px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: rgba(123, 220, 255, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-feature-card h2,
.auth-card-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.15;
}

.auth-feature-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.auth-form-panel {
  padding: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 64px) clamp(24px, 4vw, 56px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(100%, 500px);
  border-radius: 30px;
  padding: 30px;
}

.auth-card-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-card-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.auth-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 123, 0.22);
  background: rgba(255, 123, 123, 0.1);
  color: #ffd3d3;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(36, 50, 82, 0.9);
  background: rgba(7, 12, 22, 0.95);
  color: var(--text);
  font: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(123, 220, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.1);
}

.auth-submit {
  margin-top: 6px;
  padding: 14px 18px;
  border: 1px solid rgba(123, 220, 255, 0.25);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.22), rgba(123, 220, 255, 0.12));
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-submit:hover {
  border-color: rgba(123, 220, 255, 0.45);
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.28), rgba(123, 220, 255, 0.16));
}

.auth-card-heading .auth-eyebrow {
  margin-bottom: 4px;
}

@media (max-width: 1024px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding-bottom: 0;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

.dashboard-hero {
  min-height: 56px;
  margin-bottom: 12px;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(103, 213, 157, 0.18);
  border-radius: 16px;
  background: rgba(103, 213, 157, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 6px rgba(103, 213, 157, 0.12);
}

.status-label {
  font-weight: 700;
}

.status-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.metric-grid-tight {
  margin-bottom: 0;
}

.metric-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-grid-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.incident-detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  align-items: start;
}

.incident-main-column,
.incident-sidebar {
  min-width: 0;
}

.incident-description {
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--text-muted);
}

.incident-metadata-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-list {
  display: grid;
  gap: 14px;
  padding-left: 6px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

.timeline-body {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.timeline-head span,
.timeline-details {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.timeline-details {
  margin-top: 8px;
  white-space: pre-wrap;
}

.note-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.note-card-body {
  white-space: pre-wrap;
  line-height: 1.6;
}

.note-card-meta {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.metric-grid-tight {
  gap: 10px;
}

.compact-card {
  margin-bottom: 12px;
}

.compact-table-wrap {
  overflow-x: auto;
}

.table-compact th,
.table-compact td {
  padding: 9px 10px;
  font-size: 0.84rem;
}

.table-compact th {
  font-size: 0.72rem;
}

.discovered-table {
  table-layout: fixed;
  min-width: 1120px;
}

.discovered-table .col-name {
  width: 18%;
}

.discovered-table .col-actions {
  width: 32%;
}

.truncate-cell {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions-cell {
  vertical-align: top;
}

.inline-actions {
  display: grid;
  gap: 6px;
}

.compact-inline-form {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(88px, 1fr) auto;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.compact-select,
.small-button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.compact-select {
  min-width: 0;
  max-width: 140px;
}

/* Discovery page compact mode */
.discovered-compact-table .page-header {
  min-height: 40px;
  margin-bottom: 8px;
}

.discovered-compact-table .page-header h1 {
  font-size: 1.2rem;
}

.discovered-compact-table .page-subtitle {
  font-size: 0.84rem;
}

.discovered-compact-table .card {
  padding: 12px;
}

.discovered-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.discovered-toolbar-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, max-content));
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.discovered-toolbar .metric-card {
  min-height: 72px;
  padding: 10px 12px;
}

.metric-card-compact {
  min-width: 0;
}

.metric-card-compact span {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.metric-card-compact strong {
  font-size: 0.94rem;
}

.discovered-sync-form {
  flex: 0 0 auto;
}

.discovered-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.75fr);
  gap: 12px;
  align-items: start;
  overflow: visible;
}

.discovered-layout.is-single-column {
  grid-template-columns: 1fr;
}

.discovered-main-panel {
  min-width: 0;
  overflow: visible;
}

.discovered-side-panel {
  min-width: 0;
}

.discovered-side-panel.is-empty {
  max-width: none;
  width: 100%;
  justify-self: stretch;
  grid-column: 1 / -1;
}

.discovered-layout.is-single-column .discovered-main-panel {
  width: 100%;
}

.discovered-layout.is-single-column .discovered-side-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.discovered-side-panel.is-empty .stack {
  gap: 8px;
}

.discovered-side-panel.is-empty .activity-row-compact {
  padding: 8px 0;
}

.discovered-side-panel.is-empty .activity-title {
  font-size: 0.88rem;
}

.discovered-compact-table .section-head {
  margin-bottom: 8px;
}

.discovered-compact-table .section-head h2 {
  font-size: 0.95rem;
}

.discovered-compact-table .metric-card {
  padding: 12px;
}

.discovered-compact-table .metric-card span {
  font-size: 0.68rem;
}

.discovered-compact-table .metric-card strong {
  font-size: 1rem;
}

.discovered-compact-table .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
}

.discovered-compact-table .table-responsive .table {
  min-width: 1100px;
  width: 100%;
}

.discovered-pending-list {
  gap: 10px;
}

.discovered-device-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 50, 82, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: visible;
}

.discovered-device-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.discovered-device-main {
  min-width: 0;
  flex: 1 1 auto;
}

.discovered-device-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.discovered-device-name {
  font-weight: 800;
  min-width: 0;
}

.discovered-status-badge {
  flex: 0 0 auto;
  min-width: auto;
}

.discovered-device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.discovered-device-meta span {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovered-device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding-top: 2px;
}

.discovered-device-actions .inline-form {
  flex: 0 1 auto;
}

.discovered-device-actions .compact-inline-form {
  width: auto;
}

.discovered-compact-table .table-compact th,
.discovered-compact-table .table-compact td {
  padding: 7px 8px;
  font-size: 0.78rem;
}

.discovered-compact-table .badge {
  min-width: 52px;
  padding: 3px 7px;
  font-size: 0.64rem;
}

.discovered-compact-table .small-button,
.discovered-compact-table .compact-select {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 0.72rem;
}

.discovered-compact-table .compact-select {
  max-width: 108px;
}

.discovered-compact-table .inline-actions {
  gap: 4px;
}

.discovered-compact-table .compact-inline-form {
  grid-template-columns: minmax(72px, 1fr) minmax(72px, 1fr) auto;
  gap: 4px;
  align-items: center;
  width: max-content;
}

.discovered-compact-table .compact-inline-form-approval {
  grid-template-columns: minmax(72px, 1fr) minmax(72px, 1fr) auto;
}

.discovered-compact-table .compact-inline-form-link {
  grid-template-columns: minmax(88px, 1fr) auto;
}

.discovered-compact-table .truncate-cell {
  max-width: 0;
}

.discovered-compact-table .empty-state {
  padding: 8px 0;
  font-size: 0.86rem;
}

.source-detail-compact .page-header {
  min-height: 40px;
  margin-bottom: 8px;
}

.source-detail-compact .page-header h1 {
  font-size: 1.18rem;
}

.source-detail-compact .page-subtitle {
  font-size: 0.84rem;
}

.source-detail-compact .metric-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.source-detail-compact .source-overview-panel,
.source-detail-compact .source-health-panel {
  margin-bottom: 12px;
}

.source-detail-compact .overview-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-detail-compact .overview-metric {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 50, 82, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.source-detail-compact .overview-metric span,
.source-detail-compact .source-health-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-detail-compact .overview-metric strong,
.source-detail-compact .source-health-grid dd {
  font-size: 0.88rem;
  min-width: 0;
}

.source-detail-compact .source-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.source-detail-compact .source-health-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 50, 82, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.source-detail-compact .source-health-grid dd {
  margin: 0;
}

.source-detail-compact .source-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.source-detail-compact .source-detail-columns > .card {
  min-width: 0;
}

.source-detail-compact .metric-card {
  min-height: 72px;
  padding: 12px;
}

.source-detail-compact .metric-card span {
  font-size: 0.68rem;
}

.source-detail-compact .metric-card strong {
  font-size: 0.98rem;
}

.source-detail-compact .metric-card small {
  font-size: 0.68rem;
}

.source-detail-compact .compact-card {
  padding: 12px;
}

.source-detail-compact .section-head {
  margin-bottom: 8px;
}

.source-detail-compact .section-head h2 {
  font-size: 0.95rem;
}

.source-detail-compact .detail-list-compact {
  gap: 6px;
}

.source-detail-compact .detail-list-compact div {
  gap: 2px;
  padding: 8px 0;
}

.source-detail-compact .detail-list-compact dt {
  font-size: 0.7rem;
}

.source-detail-compact .detail-list-compact dd {
  font-size: 0.84rem;
}

.source-detail-compact .source-detail-grid {
  gap: 12px;
  margin-bottom: 12px;
}

.source-detail-compact .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
}

.source-detail-compact .source-log-table,
.source-detail-compact .source-event-table {
  min-width: 920px;
  width: 100%;
  table-layout: fixed;
}

.source-detail-compact .source-log-table .col-time,
.source-detail-compact .source-event-table .col-time,
.source-detail-compact .col-time-cell {
  width: 170px;
  max-width: 170px;
}

.source-detail-compact .source-log-table .col-severity,
.source-detail-compact .source-event-table .col-severity,
.source-detail-compact .col-severity-cell {
  width: 96px;
  max-width: 96px;
}

.source-detail-compact .source-log-table .col-severity-cell,
.source-detail-compact .source-event-table .col-severity-cell {
  overflow: hidden;
}

.source-detail-compact .source-log-table .col-time,
.source-detail-compact .source-event-table .col-time {
  white-space: nowrap;
}

.source-detail-compact .source-log-table td:nth-child(3),
.source-detail-compact .source-event-table td:nth-child(4) {
  width: auto;
}

.source-detail-compact .source-log-table td:nth-child(3),
.source-detail-compact .source-event-table td:nth-child(4),
.source-detail-compact .source-log-table th:nth-child(3),
.source-detail-compact .source-event-table th:nth-child(4) {
  min-width: 0;
}

.source-detail-compact .table-compact th,
.source-detail-compact .table-compact td {
  padding: 7px 8px;
  font-size: 0.76rem;
}

.source-detail-compact .badge {
  min-width: 54px;
  padding: 3px 6px;
  font-size: 0.64rem;
}

.card,
.panel,
table {
  background: linear-gradient(180deg, rgba(17, 27, 49, 0.98), rgba(13, 21, 39, 0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.card,
.panel {
  padding: 18px;
}

.button-secondary {
  padding-inline: 14px;
  min-height: 42px;
}

.dashboard-panel-large {
  min-height: 100%;
}

.source-detail-compact .source-overview-panel {
  grid-column: 1 / -1;
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-list-scroll {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.metric-grid.compact .metric-card {
  min-height: 84px;
  padding: 12px;
  gap: 6px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-grid.compact .metric-card span {
  font-size: 0.75rem;
}

.metric-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.metric-grid.compact .metric-card strong {
  font-size: 1.4rem;
}

.metric-card small {
  color: var(--muted);
}

.metric-grid.compact .metric-card small {
  font-size: 0.75rem;
  line-height: 1.3;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(123, 220, 255, 0.9), transparent);
  opacity: 0.9;
}

.metric-online::before { background: linear-gradient(90deg, transparent, rgba(103, 213, 157, 0.95), transparent); }
.metric-warning::before { background: linear-gradient(90deg, transparent, rgba(240, 201, 107, 0.95), transparent); }
.metric-info::before { background: linear-gradient(90deg, transparent, rgba(123, 220, 255, 0.95), transparent); }
.metric-critical::before { background: linear-gradient(90deg, transparent, rgba(255, 94, 122, 0.95), transparent); }
.metric-neutral::before { background: linear-gradient(90deg, transparent, rgba(149, 162, 196, 0.95), transparent); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.settings-panel-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 1080px) {
  .settings-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-card {
  padding: 16px 16px 14px;
}

.settings-flash {
  margin-bottom: 14px;
  padding: 12px 16px;
}

.settings-flash .settings-helper {
  padding: 0;
}

.settings-flash-success {
  border-color: rgba(103, 213, 157, 0.3);
}

.settings-flash-error {
  border-color: rgba(255, 123, 123, 0.3);
}

.settings-section-head {
  margin-bottom: 10px;
}

.settings-section-head h2 {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.settings-card-body {
  display: grid;
  gap: 12px;
}

.settings-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-actions .button,
.settings-actions .ghost {
  min-width: 0;
}

.settings-inline-action {
  margin: 0;
}

.settings-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(36, 50, 82, 0.7);
}

.settings-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  list-style: none;
}

.settings-details summary::-webkit-details-marker {
  display: none;
}

.settings-details-secondary summary {
  color: var(--muted);
  font-weight: 600;
}

.settings-details-secondary .settings-helper {
  margin-top: 10px;
}

.settings-grid {
  margin-top: 12px;
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.settings-grid input {
  width: 100%;
}

.settings-source-health-form {
  margin-top: 8px;
}

.settings-threshold-grid {
  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (min-width: 700px) {
  .settings-threshold-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .settings-threshold-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.settings-threshold-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-threshold-field span {
  color: var(--text);
  font-weight: 700;
}

.settings-threshold-input {
  display: grid;
  gap: 4px;
}

.settings-threshold-input input {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
}

.settings-threshold-input small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1;
}

.settings-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.timer-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timer-card-header h2 {
  margin: 0;
}

.timer-card-title-wrap {
  min-width: 0;
}

.timer-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.timer-card-header .settings-helper {
  margin: 4px 0 0;
}

.timer-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.timer-card-controls,
.timer-card-runtime {
  display: grid;
  gap: 12px;
}

.timer-card-controls {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.timer-card-runtime {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.timer-card-runtime-subtle {
  background: rgba(255, 255, 255, 0.01);
  padding: 2px 0 0;
}

.timer-card-field,
.timer-card-runtime-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-card-field span,
.timer-card-runtime-item span,
.timer-card-section-title {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.timer-card-field strong,
.timer-card-runtime-item strong {
  min-width: 0;
  font-weight: 700;
  line-height: 1.35;
}

.timer-card-runtime-item {
  padding: 12px 12px 11px;
  border: 1px solid rgba(36, 50, 82, 0.7);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.timer-card-runtime-item strong {
  font-size: 1rem;
  word-break: break-word;
}

.timer-card-section-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timer-card-health {
  padding-top: 2px;
  border-top: 1px solid rgba(36, 50, 82, 0.45);
}

.timer-overdue-badge {
  display: inline-flex;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.14);
  color: #ffcf7a;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.timer-status-badge {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timer-status-badge.is-success {
  background: rgba(103, 213, 157, 0.12);
  color: #a3e8c0;
  border-color: rgba(103, 213, 157, 0.18);
}

.timer-status-badge.is-running {
  background: rgba(123, 220, 255, 0.12);
  color: #aee7ff;
  border-color: rgba(123, 220, 255, 0.18);
}

.timer-status-badge.is-failed {
  background: rgba(255, 123, 123, 0.12);
  color: #ffb2b2;
  border-color: rgba(255, 123, 123, 0.18);
}

.timer-status-badge.is-disabled {
  background: rgba(149, 162, 196, 0.12);
  color: var(--muted);
  border-color: rgba(149, 162, 196, 0.18);
}

.timer-status-badge.is-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.settings-save-button {
  min-height: 42px;
}

.list-loading,
.list-error {
  padding: 14px 0;
  color: var(--muted);
}

.list-error {
  color: #ffb2b2;
}

.log-message-preview {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.log-message-preview:hover {
  text-decoration: underline;
}

.pager-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.pagination-link:hover {
  text-decoration: none;
  border-color: rgba(123, 220, 255, 0.3);
  background: rgba(123, 220, 255, 0.08);
}

.pagination-link.is-current {
  background: rgba(123, 220, 255, 0.18);
  border-color: rgba(123, 220, 255, 0.38);
  color: var(--text);
}

.pagination-link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.settings-threshold-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  padding-left: 18px;
  margin: 10px 0 0;
}

.settings-threshold-list li {
  color: var(--text);
}

.stack {
  display: grid;
  gap: 10px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  color: var(--text);
  min-width: 0;
}

.activity-row:hover {
  text-decoration: none;
  background: rgba(123, 220, 255, 0.06);
  border-color: rgba(123, 220, 255, 0.16);
}

.activity-row-compact {
  align-items: flex-start;
}

.activity-row-dashboard {
  align-items: flex-start;
}

.activity-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.activity-row-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  flex-shrink: 0;
  min-width: 0;
}

.activity-title {
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.activity-meta {
  color: var(--muted);
  text-align: right;
  font-size: 0.92rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-meta .badge {
  margin-left: 8px;
}

.activity-title,
.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  color: var(--text);
}

.rank-row:hover {
  text-decoration: none;
  background: rgba(123, 220, 255, 0.06);
  border-color: rgba(123, 220, 255, 0.16);
}

.rank-copy {
  min-width: 0;
}

.rank-title {
  font-weight: 700;
}

.rank-meta {
  margin-top: 8px;
}

.rank-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.rank-side strong {
  font-size: 1.1rem;
}

.meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(123, 220, 255, 0.9), rgba(157, 140, 255, 0.95));
}

.health-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.health-summary-compacted {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.health-summary div {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: rgba(255, 255, 255, 0.02);
}

.health-summary span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.health-summary strong {
  font-size: 1.8rem;
}

.source-health-issues {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.source-health-issues-heading {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(17, 27, 49, 0.9);
}

.list-filter-bar {
  margin-bottom: 14px;
}

.data-source-filter-panel {
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(160px, 1fr)) auto;
  align-items: end;
}

@media (max-width: 1200px) {
  .data-source-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .data-source-filter-panel {
    grid-template-columns: 1fr;
  }
}

.data-source-filter-panel .settings-threshold-field {
  margin: 0;
}

.data-source-filter-panel .settings-threshold-field input,
.data-source-filter-panel .settings-threshold-field select {
  width: 100%;
}

.data-source-filter-panel .settings-form-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.definition-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: 10px 24px;
  align-items: start;
}

.definition-grid.compact,
.definition-grid-compact {
  gap: 8px 18px;
}

.definition-grid > div {
  display: contents;
}

.definition-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.definition-grid strong {
  min-width: 0;
  font-weight: 700;
  line-height: 1.35;
}

.definition-grid .badge {
  display: inline-flex;
}

.lifecycle-status {
  margin-bottom: 12px;
}

.workflow-stack {
  display: grid;
  gap: 12px;
}

.workflow-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.workflow-card-inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.workflow-card-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.workflow-fields {
  display: grid;
  gap: 10px;
}

.workflow-fields textarea {
  min-height: 92px;
}

.workflow-fields input {
  min-height: 40px;
}

.workflow-card button {
  justify-self: start;
}

.filter-bar input,
.filter-bar button,
.form input,
.form textarea,
.form button {
  min-height: 44px;
}

.search-input {
  grid-column: span 2;
}

input,
textarea,
button {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
}

textarea { min-height: 120px; resize: vertical; }

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--accent), #61bde5);
  color: #06101c;
  font-weight: 800;
  border: none;
  box-shadow: 0 10px 26px rgba(123, 220, 255, 0.2);
}

.button:hover,
button:hover {
  text-decoration: none;
  filter: brightness(1.03);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
  min-width: 920px;
}

.table-panel {
  margin-bottom: 18px;
}

.table-panel .table-responsive {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(17, 27, 49, 0.82);
}

.table-panel .table-responsive .table {
  min-width: 100%;
}

.table-panel .table {
  margin: 0;
}

.list-pager {
  margin-top: 0;
  margin-bottom: 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(36, 50, 82, 0.9);
  vertical-align: top;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table tr:last-child td { border-bottom: none; }

.table-hover tr.clickable-row { cursor: pointer; }

.table-hover tr.clickable-row:hover td {
  background: rgba(123, 220, 255, 0.05);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-neutral { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: rgba(255, 255, 255, 0.08); }
.badge-muted { background: rgba(149, 162, 196, 0.12); color: var(--muted); border-color: rgba(149, 162, 196, 0.18); }
.badge-info { background: rgba(123, 220, 255, 0.12); color: #aee7ff; border-color: rgba(123, 220, 255, 0.18); }
.badge-warning { background: rgba(240, 201, 107, 0.12); color: #f8dd93; border-color: rgba(240, 201, 107, 0.18); }
.badge-error { background: rgba(255, 123, 123, 0.12); color: #ffaaaa; border-color: rgba(255, 123, 123, 0.18); }
.badge-critical { background: rgba(255, 94, 122, 0.14); color: #ffafbf; border-color: rgba(255, 94, 122, 0.22); }
.badge-online { background: rgba(103, 213, 157, 0.12); color: #a3e8c0; border-color: rgba(103, 213, 157, 0.2); }
.badge-offline { background: rgba(255, 123, 123, 0.12); color: #ffb2b2; border-color: rgba(255, 123, 123, 0.18); }
.finding-badge-critical,
.finding-severity-critical td { background: rgba(255, 94, 122, 0.08); }
.finding-badge-critical { color: #ffafbf; border-color: rgba(255, 94, 122, 0.22); }
.finding-badge-high,
.finding-severity-high td { background: rgba(245, 158, 11, 0.08); }
.finding-badge-high { color: #fbbf24; border-color: rgba(245, 158, 11, 0.22); }
.finding-badge-medium,
.finding-severity-medium td { background: rgba(240, 201, 107, 0.08); }
.finding-badge-medium { color: #f8dd93; border-color: rgba(240, 201, 107, 0.22); }
.finding-badge-low,
.finding-severity-low td { background: rgba(123, 220, 255, 0.06); }
.finding-badge-low { color: #aee7ff; border-color: rgba(123, 220, 255, 0.18); }
.finding-badge-info,
.finding-severity-info td { background: rgba(123, 220, 255, 0.05); }
.finding-badge-info { color: #aee7ff; border-color: rgba(123, 220, 255, 0.16); }
.finding-row td { transition: background 0.15s ease; }
.finding-row:hover td { background: rgba(123, 220, 255, 0.05); }
.findings-summary-grid { margin-bottom: 18px; }
.findings-filter-bar { margin-bottom: 18px; }
.finding-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.finding-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.finding-chip:hover {
  text-decoration: none;
  border-color: rgba(123, 220, 255, 0.35);
  background: rgba(123, 220, 255, 0.08);
}
.finding-chip.is-active {
  background: rgba(123, 220, 255, 0.16);
  border-color: rgba(123, 220, 255, 0.38);
}
.env-banner {
  position: relative;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px 12px;
  padding: 12px 18px;
  min-height: 0;
  line-height: 1.35;
  color: #fff7ed;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}
.env-banner strong,
.env-banner span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}
.env-banner p {
  margin: 0;
  max-width: 1200px;
  font-weight: 800;
  line-height: 1.35;
}
.env-banner-development {
  background: linear-gradient(90deg, #8b1d2c, #f59e0b);
}
.env-banner-staging {
  background: linear-gradient(90deg, #c2410c, #f59e0b);
}
.env-banner-debug {
  background: linear-gradient(90deg, #991b1b, #dc2626);
}
.dev-tools-env-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dev-tools-env-grid strong {
  word-break: break-word;
}
.badge-success { background: rgba(103, 213, 157, 0.14); color: #a3e8c0; border-color: rgba(103, 213, 157, 0.2); }
.app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  min-height: 66px;
  padding: 16px 22px 20px;
  color: #d7c8ff;
  font-size: 0.82rem;
  line-height: 1.4;
  border-top: 1px solid rgba(163, 136, 255, 0.34);
  background: linear-gradient(180deg, rgba(42, 28, 72, 0.08), rgba(28, 18, 48, 0.24));
  flex: 0 0 auto;
  min-width: 0;
  overflow-x: hidden;
}
.app-footer span {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}
.dev-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dev-tools-grid form {
  display: contents;
}
.dev-tools-grid button {
  width: 100%;
}
.dev-tools-layout {
  display: grid;
  gap: 16px;
}
.dev-tools-panel {
  border-color: rgba(163, 136, 255, 0.18);
}
.dev-tools-panel-emphasis {
  background: linear-gradient(180deg, rgba(163, 136, 255, 0.08), rgba(255, 255, 255, 0.03));
}
.dev-tools-panel-full .dev-tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sidebar,
.app-footer {
  box-shadow: inset 0 1px 0 rgba(163, 136, 255, 0.08);
}
.sidebar .nav-group[data-group="admin"] .nav-group-toggle {
  border-left: 3px solid rgba(163, 136, 255, 0.55);
}
.sidebar .nav-group[data-group="admin"] .nav-group-children a[href="/admin/dev-tools"] {
  background: rgba(163, 136, 255, 0.08);
}
.sidebar .nav-group[data-group="admin"] .nav-group-children a[href="/admin/dev-tools"]:hover {
  background: rgba(163, 136, 255, 0.14);
  border-color: rgba(163, 136, 255, 0.24);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(36, 50, 82, 0.7);
}

.detail-list div:last-child { border-bottom: none; }

.detail-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.subtle-head {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.json-block {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: #09111f;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-state {
  color: var(--muted);
  padding: 12px 0;
}

.rf-history-card {
  min-height: 420px;
}

.rf-history-grid {
  display: grid;
  gap: 16px;
}

.rf-history-chart {
  min-height: 170px;
  display: grid;
  gap: 6px;
}

.rf-history-svg {
  display: block;
  min-height: 160px;
  width: 100%;
  overflow: visible;
  background: rgba(13, 18, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.list-empty-state {
  padding: 14px 0 6px;
}

.center {
  max-width: 420px;
  margin: 72px auto;
}

.list {
  padding-left: 18px;
}

.topology-node {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.topology-root {
  display: grid;
  gap: 4px;
}

.topology-children {
  display: grid;
  gap: 10px;
  padding-left: 24px;
  border-left: 1px solid rgba(36, 50, 82, 0.8);
}

.topology-children-nested {
  margin-top: 8px;
}

.topology-child {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 50, 82, 0.7);
  background: rgba(17, 27, 49, 0.6);
}

.topology-editor-card {
  overflow: hidden;
}

.topology-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.topology-shell.topology-fullscreen-active {
  min-height: calc(100vh - 24px);
}

.topology-shell.topology-fullscreen-active .topology-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.app-shell.topology-fullscreen-active {
  grid-template-columns: 1fr;
}

.app-shell.topology-fullscreen-active .sidebar,
.app-shell.topology-fullscreen-active .topbar,
.app-shell.topology-fullscreen-active .app-footer,
.app-shell.topology-fullscreen-active .page-global-actions,
.app-shell.topology-fullscreen-active .topology-page-header {
  display: none;
}

.app-shell.topology-fullscreen-active .content-wrap {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.topology-shell.topology-fullscreen-active {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.topology-shell.topology-fullscreen-active .topology-main {
  flex: 1 1 auto;
  min-height: 0;
}

.topology-shell.topology-fullscreen-active .topology-editor-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.topology-shell.topology-fullscreen-active .topology-workspace-shell {
  flex: 1 1 auto;
  height: var(--topology-workspace-height, calc(100vh - 250px));
  min-height: 0;
}

.topology-shell.topology-fullscreen-active .topology-viewport {
  min-height: 0;
}

.topology-toolbar-left,
.topology-toolbar-middle,
.topology-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topology-toolbar-left {
  flex: 0 0 auto;
  white-space: nowrap;
}

.topology-toolbar-middle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.topology-toolbar-right {
  flex: 1 1 auto;
  justify-content: flex-end;
  white-space: nowrap;
}

.topology-toolbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(36, 50, 82, 0.9);
}

.topology-segmented {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(36, 50, 82, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.topology-segmented .topology-mode-btn {
  border: 0;
  border-right: 1px solid rgba(36, 50, 82, 0.8);
  border-radius: 0;
  min-height: 34px;
  padding: 8px 12px;
}

.topology-segmented .topology-mode-btn:last-child {
  border-right: 0;
}

.topology-link-select {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(36, 50, 82, 0.9);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.topology-toolbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.topology-toolbar-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.topology-zoom-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
}

.toolbar-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topology-mode-btn.is-active,
.topology-segmented .topology-mode-btn.is-active {
  border-color: rgba(123, 220, 255, 0.45);
  background: rgba(123, 220, 255, 0.14);
}

.topology-selection-panel {
  margin-bottom: 16px;
}

.topology-selection-body {
  display: grid;
  gap: 12px;
}

.topology-selection-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.topology-selection-title {
  font-weight: 800;
  font-size: 1rem;
  max-width: 52ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topology-selection-meta,
.topology-selection-mini {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.topology-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.topology-selection-panel .topology-selection-actions .ghost {
  min-height: 34px;
  padding: 8px 12px;
}

@media (min-width: 1100px) {
  .topology-toolbar {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1099px) {
  .topology-toolbar-right {
    flex-wrap: wrap;
  }
  .topology-toolbar-stats {
    justify-content: flex-start;
  }
}

.topology-page-header {
  margin-bottom: 12px;
}

.topology-shell {
  display: flex;
  align-items: stretch;
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 180px);
}

.topology-sidebar {
  position: relative;
  display: flex;
  flex: 0 0 260px;
  max-width: 260px;
  min-width: 260px;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 14px 14px;
  overflow: hidden;
  transition: flex-basis 180ms ease, max-width 180ms ease, min-width 180ms ease, padding 180ms ease, opacity 180ms ease;
}

.topology-search {
  width: 100%;
}

.topology-available-list {
  min-height: 0;
  overflow: auto;
  gap: 8px;
}

.topology-workspace-shell {
  width: 100%;
  height: calc(100vh - 250px);
  min-height: 680px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  background: #09111f;
}

.topology-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.topology-viewport:active {
  cursor: grabbing;
}

.topology-viewport[data-mode="move"] {
  cursor: move;
}

.topology-viewport[data-mode="link"] {
  cursor: crosshair;
}

.topology-world {
  position: relative;
  width: 2200px;
  height: 1400px;
  transform-origin: 0 0;
}

.topology-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 14px;
}

.topology-sidebar.is-collapsed {
  flex-basis: 34px;
  max-width: 34px;
  min-width: 34px;
  padding: 12px 4px;
  overflow: visible;
}

.topology-sidebar.is-collapsed .section-head,
.topology-sidebar.is-collapsed .topology-search,
.topology-sidebar.is-collapsed .topology-available-list {
  display: none;
}

.topology-sidebar-handle {
  position: absolute;
  right: -14px;
  top: 50%;
  display: none;
  z-index: 10;
  width: 28px;
  min-width: 28px;
  height: 96px;
  padding: 0 2px;
  border-radius: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.topology-sidebar-handle.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topology-editor {
  position: relative;
  width: 2200px;
  height: 1400px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(123, 220, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(157, 140, 255, 0.08), transparent 24%),
    rgba(9, 17, 31, 0.92);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  overflow: hidden;
}

.topology-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

.topology-link-handles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.topology-link {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.topology-link-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: pointer;
}

.topology-link-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 999px;
  border: 2px solid rgba(123, 220, 255, 0.48);
  background: rgba(123, 220, 255, 0.18);
  color: transparent;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0.75;
  z-index: 4;
  box-shadow: 0 0 0 2px rgba(7, 12, 22, 0.86);
}

.topology-link-handle:hover {
  background: rgba(123, 220, 255, 0.42);
  opacity: 1;
}

.topology-link-handle.is-selected {
  background: #ffffff;
  border-color: #f0c96b;
  box-shadow: 0 0 0 4px rgba(240, 201, 107, 0.22);
  opacity: 1;
}

.topology-shell.is-readonly .topology-sidebar {
  display: none;
}

.topology-shell.is-readonly .topology-main {
  width: 100%;
}

.topology-link-ethernet {
  stroke: #7bdcff;
  stroke-width: 2.5;
}

.topology-link-fiber {
  stroke: #9d8cff;
  stroke-width: 4;
}

.topology-link-ptp {
  stroke: #67d59d;
  stroke-width: 2.5;
  stroke-dasharray: 10 8;
}

.topology-link-dependency {
  stroke: #f0c96b;
  stroke-width: 2.2;
  stroke-dasharray: 3 7;
}

.topology-link-other {
  stroke: rgba(231, 236, 248, 0.68);
  stroke-width: 2;
  stroke-dasharray: 2 10;
}

.topology-link.is-selected {
  stroke: #ffffff;
  stroke-width: 4.5;
}

.topology-nodes {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.topology-node-card {
  position: absolute;
  width: 118px;
  height: 46px;
  padding: 5px 8px 4px;
  border-radius: 12px;
  border: 1px solid rgba(123, 220, 255, 0.18);
  background: linear-gradient(180deg, rgba(17, 27, 49, 0.98), rgba(13, 21, 39, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  cursor: grab;
  user-select: none;
}

.topology-node-card:active {
  cursor: grabbing;
}

.topology-node-card-selected {
  border-color: rgba(240, 201, 107, 0.6);
  box-shadow: 0 0 0 1px rgba(240, 201, 107, 0.3), 0 16px 36px rgba(0, 0, 0, 0.3);
}

.topology-node-card-connecting {
  border-color: rgba(103, 213, 157, 0.7);
  box-shadow: 0 0 0 1px rgba(103, 213, 157, 0.25), 0 16px 36px rgba(0, 0, 0, 0.3);
}

.topology-node-card-compact {
  overflow: visible;
}

.topology-node-card-compact .topology-node-actions,
.topology-node-card-compact .topology-node-badges {
  display: none;
}

.topology-node-title {
  font-weight: 800;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topology-node-meta {
  color: var(--muted);
  font-size: 0.63rem;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topology-node-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.topology-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(36, 50, 82, 0.9);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.topology-node-footer {
  display: grid;
  gap: 4px;
}

.topology-node-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topology-node-mini {
  color: var(--muted);
  font-size: 0.58rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topology-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(36, 50, 82, 0.9);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.topology-node-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1px;
}

.topology-node-status-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(9, 15, 28, 0.95);
  pointer-events: none;
}

.topology-node-online { background: var(--good); }
.topology-node-impacted { background: var(--warn); }
.topology-node-warning { background: var(--warn); }
.topology-node-offline { background: var(--bad); }
.topology-node-unknown { background: rgba(231, 236, 248, 0.55); }

.topology-node-status-badge.topology-node-online { box-shadow: 0 0 0 2px rgba(16, 28, 27, 0.95), 0 0 10px rgba(103, 213, 157, 0.35); }
.topology-node-status-badge.topology-node-impacted { box-shadow: 0 0 0 2px rgba(26, 22, 8, 0.95), 0 0 10px rgba(240, 201, 107, 0.28); }
.topology-node-status-badge.topology-node-warning { box-shadow: 0 0 0 2px rgba(26, 22, 8, 0.95), 0 0 10px rgba(240, 201, 107, 0.28); }
.topology-node-status-badge.topology-node-offline { box-shadow: 0 0 0 2px rgba(31, 13, 15, 0.95), 0 0 10px rgba(255, 91, 100, 0.28); }
.topology-node-status-badge.topology-node-unknown { box-shadow: 0 0 0 2px rgba(18, 22, 31, 0.95), 0 0 10px rgba(231, 236, 248, 0.12); }

.topology-node-connector {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 999px;
  border: 2px solid rgba(123, 220, 255, 0.85);
  background: #08101d;
  box-shadow: 0 0 0 2px rgba(8, 16, 29, 1);
}

.topology-node-connector-left { left: -7px; }
.topology-node-connector-right { right: -7px; }

.topology-node-connector-left,
.topology-node-connector-right {
  cursor: pointer;
}

.available-device-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 50, 82, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.available-device-main {
  min-width: 0;
}

.available-device-row .activity-meta {
  text-align: left;
}

.available-device-row .activity-title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.available-device-row .activity-meta,
.available-device-row .topology-node-mini {
  font-size: 0.72rem;
}

.topology-add-to-map {
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topology-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36, 50, 82, 0.9);
  background: rgba(13, 21, 39, 0.98);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.topology-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.topology-toast[data-kind="error"] { border-color: rgba(255, 123, 123, 0.4); }
.topology-toast[data-kind="success"] { border-color: rgba(103, 213, 157, 0.4); }

.app-shell.is-nav-hidden {
  grid-template-columns: 1fr;
}

.app-shell.is-nav-hidden .sidebar {
  display: none;
}

.app-shell.is-nav-hidden .content-wrap {
  max-width: none;
}

.app-shell.is-nav-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.is-nav-collapsed .sidebar {
  padding: 18px 10px 18px 8px;
  gap: 16px;
}

.app-shell.is-nav-collapsed .brand {
  justify-content: center;
}

.app-shell.is-nav-collapsed .brand .nav-label {
  display: none;
}

.app-shell.is-nav-collapsed .nav-group-toggle,
.app-shell.is-nav-collapsed .nav-group-children a {
  justify-content: center;
  padding: 12px 0;
}

.app-shell.is-nav-collapsed .nav-group-toggle .nav-label,
.app-shell.is-nav-collapsed .nav-group-children a .nav-label {
  display: none;
}

.app-shell.is-nav-collapsed .nav-caret {
  display: none;
}

.app-shell.is-nav-collapsed .nav-group {
  position: relative;
}

.app-shell.is-nav-collapsed .nav-group:hover .nav-group-children,
.app-shell.is-nav-collapsed .nav-group:focus-within .nav-group-children {
  display: grid;
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  width: 200px;
  padding: 10px;
  background: rgba(7, 12, 22, 0.98);
  border: 1px solid rgba(36, 50, 82, 0.9);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  z-index: 50;
}

.app-shell.is-nav-collapsed .nav-group:hover .nav-group-children a,
.app-shell.is-nav-collapsed .nav-group:focus-within .nav-group-children a {
  justify-content: flex-start;
  padding: 12px 14px;
}

.app-shell.is-nav-collapsed .sidebar-footer button {
  width: 100%;
  padding-inline: 0;
}

.app-shell.is-nav-collapsed .sidebar-collapse-toggle {
  right: -14px;
  top: 24px;
  width: 28px;
}

.sidebar, .main-content, .content-wrap { min-width: 0; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid,
  .dashboard-grid-secondary,
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  html, body {
    height: auto;
    overflow: visible;
  }
  body {
    display: block;
  }
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(36, 50, 82, 0.7);
    overflow: visible;
  }
  .main-content {
    height: auto;
    overflow: visible;
    min-height: auto;
  }
  .content-wrap { padding: 16px 18px 24px; }
  .topbar { padding: 18px 18px 0; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-input { grid-column: auto; }
  .table-responsive .table { min-width: 720px; }
  .metric-grid-two { grid-template-columns: 1fr; }
  .metric-grid.compact { grid-template-columns: 1fr; }
  .incident-detail-grid { grid-template-columns: 1fr; }
  .source-detail-compact .overview-metric-grid,
  .source-detail-compact .source-health-grid,
  .source-detail-compact .source-detail-columns {
    grid-template-columns: 1fr;
  }
  .health-summary { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 1fr; }
  .topology-shell { flex-direction: column; }
  .topology-workspace-shell { height: 64vh; min-height: 520px; }
}

.app-footer {
  align-items: center !important;
  line-height: 1.4 !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

.app-footer span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.4 !important;
  padding: 0 !important;
  margin: 0 !important;
}
