:root {
  /* Approved Navy Palette */
  --obs-navy: #121a3a;
  --obs-purple: #5b4c8b;
  --obs-mauve: #d5c5d5;
  --obs-ice: #effafa;
  --obs-teal: #98cfd0;

  /* Derived surfaces and fields */
  --obs-void: var(--obs-navy);
  --obs-panel: #18264a;
  --obs-deep: #22355b;
  --obs-field: #0e1734;
  --obs-elevated: #2b3e68;

  /* Semantic theme aliases */
  --obs-surface: var(--obs-panel);
  --obs-surface-raised: var(--obs-deep);
  --obs-surface-inset: var(--obs-field);
  --obs-text: var(--obs-mauve);
  --obs-text-strong: var(--obs-ice);
  --obs-muted: #b7c1ce;
  --obs-accent: var(--obs-purple);
  --obs-accent-hover: color-mix(in srgb, var(--obs-purple) 82%, var(--obs-teal));
  --obs-accent-soft: color-mix(in srgb, var(--obs-purple) 42%, transparent);
  --obs-border: color-mix(in srgb, var(--obs-teal) 52%, var(--obs-purple));
  --obs-line: var(--obs-border);
  --obs-selected: color-mix(in srgb, var(--obs-purple) 68%, var(--obs-navy));
  --obs-focus-ring: color-mix(in srgb, var(--obs-teal) 86%, var(--obs-ice));
  --obs-shadow: color-mix(in srgb, var(--obs-void) 76%, transparent);
  --obs-overlay: color-mix(in srgb, var(--obs-void) 82%, transparent);

  /* Compatibility aliases for existing component names */
  --obs-amethyst: var(--obs-accent);
  --obs-amethyst-glow: var(--obs-accent-hover);
  --obs-amethyst-light: var(--obs-teal);
  --obs-amethyst-soft: var(--obs-accent-soft);
  --obs-mist: var(--obs-text);
  --obs-mist-soft: color-mix(in srgb, var(--obs-mauve) 78%, var(--obs-ice));
  --obs-mist-bright: var(--obs-text-strong);
  --obs-subtle: var(--obs-muted);
  --obs-subtle-dim: color-mix(in srgb, var(--obs-muted) 68%, var(--obs-navy));

  /* Security states remain hue-independent and accessible */
  --obs-success-bg: #1a3d2a;
  --obs-success-text: #86efac;
  --obs-success-strong: #34d399;
  --obs-success-border: color-mix(in srgb, var(--obs-success-text) 42%, transparent);
  --obs-warn-bg: #3d2a10;
  --obs-warn-text: #fcd34d;
  --obs-warn-strong: #f59e0b;
  --obs-warn-border: color-mix(in srgb, var(--obs-warn-text) 42%, transparent);
  --obs-severity-high: #fb923c;
  --obs-danger-bg: #3d1020;
  --obs-danger-text: #fca5a5;
  --obs-danger-strong: #ef4444;
  --obs-danger-solid: #b91c1c;
  --obs-danger-border: color-mix(in srgb, var(--obs-danger-text) 45%, transparent);
  --obs-info-bg: color-mix(in srgb, var(--obs-teal) 18%, var(--obs-navy));
  --obs-info-text: #bae6fd;
  --obs-info-strong: #60a5fa;
  --obs-disabled-bg: color-mix(in srgb, var(--obs-field) 76%, var(--obs-mauve));
  --obs-disabled-text: color-mix(in srgb, var(--obs-muted) 76%, var(--obs-ice));
  --obs-disabled-border: color-mix(in srgb, var(--obs-border) 72%, var(--obs-muted));
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--obs-void);
  color: var(--obs-mist);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.35;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.85rem 1rem 1.2rem;
  box-sizing: border-box;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.top-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: -0.85rem -1rem 0.85rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--obs-border);
  background:
    linear-gradient(180deg, var(--obs-elevated), var(--obs-panel));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--obs-shadow) 42%, transparent);
  backdrop-filter: blur(10px);
  flex-wrap: nowrap;
}

.top-header-brand {
  flex: 0 0 auto;
  min-width: 0;
}

.top-header-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.top-header-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--obs-teal) 25%, transparent);
}

.top-header-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.top-header-wordmark {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--obs-mist-bright);
}

.top-header-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--obs-subtle);
  white-space: nowrap;
}

.top-header-brand h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.top-header-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  justify-content: space-between;
  min-width: 0;
  flex-wrap: nowrap;
}

.top-header-utilities {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.top-header-org {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin: 0;
  min-width: 0;
}

.top-header-org-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--obs-subtle-dim);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.top-header-right .hint {
  display: inline;
  margin: 0;
  white-space: nowrap;
}

#tenant-select {
  width: auto;
  min-width: 180px;
  max-width: 240px;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border-color: var(--obs-border);
  background: var(--obs-field);
  font-size: 0.8rem;
}

.main-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: nowrap;
  margin-bottom: 0;
  align-items: center;
  min-width: 0;
}

.main-nav > a,
.nav-group summary {
  color: var(--obs-subtle);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.main-nav > a:hover,
.nav-group summary:hover {
  color: var(--obs-mist-bright);
  background: color-mix(in srgb, var(--obs-accent) 42%, transparent);
  border-color: color-mix(in srgb, var(--obs-teal) 44%, var(--obs-purple));
}

.main-nav > a.active {
  background: var(--obs-selected);
  border-color: color-mix(in srgb, var(--obs-teal) 58%, var(--obs-purple));
  color: var(--obs-mist-bright);
}

.nav-group {
  position: relative;
}

.nav-group summary {
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.nav-group summary::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.08rem) rotate(45deg);
  opacity: 0.7;
}

.nav-group[open] summary {
  color: var(--obs-mist-bright);
  background: var(--obs-selected);
  border-color: color-mix(in srgb, var(--obs-teal) 58%, var(--obs-purple));
}

.nav-group-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 1200;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem;
  border: 1px solid var(--obs-border);
  border-radius: 10px;
  background: var(--obs-elevated);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--obs-void) 45%, transparent);
}

.nav-group-menu a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 7px;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--obs-mist);
  background: transparent;
  text-decoration: none;
}

.nav-group-menu a:hover,
.nav-group-menu a.active {
  background: var(--obs-selected);
  color: var(--obs-mist-bright);
}

.column-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 0.45rem 0 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--obs-border);
  border-radius: 6px;
  background: var(--obs-panel);
}

.column-picker label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--obs-mist);
}

.column-picker input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.subtitle {
  color: var(--obs-subtle);
  margin-top: 0.1rem;
  margin-bottom: 0;
  font-size: 0.78rem;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: transparent;
  color: var(--obs-subtle);
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  white-space: nowrap;
  margin-left: 0;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.session-badge:hover {
  color: var(--obs-mist-bright);
  background: color-mix(in srgb, var(--obs-accent) 10%, transparent);
  filter: none;
}

#logout-btn,
.top-header-logout {
  margin-left: 0;
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--obs-border) 95%, transparent);
  background: transparent;
  color: var(--obs-mist);
  font-size: 0.78rem;
  font-weight: 500;
}

#logout-btn:hover,
.top-header-logout:hover {
  background: color-mix(in srgb, var(--obs-danger-strong) 12%, transparent);
  border-color: color-mix(in srgb, var(--obs-danger-text) 35%, transparent);
  color: var(--obs-danger-text);
}

.card {
  background: linear-gradient(160deg, var(--obs-deep), var(--obs-panel));
  border: 1px solid var(--obs-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--obs-shadow) 24%, transparent);
}

.card > h2,
.card .row.spread > h2,
.card .section-head h2 {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* Shared page section pattern: title + hint left, actions right */
.section-head,
.card > .row.spread:first-child {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.section-head > div:first-child,
.card > .row.spread:first-child > div:first-child:not(.row) {
  min-width: 0;
  flex: 1 1 auto;
}

.section-head .hint,
.card > h2 + .hint,
.card > .row.spread:first-child + .hint,
.card > .section-head + .hint {
  margin: 0.15rem 0 0;
  max-width: 54rem;
  color: var(--obs-subtle);
}

.section-head-actions,
.card > .row.spread:first-child > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
}

.inset-panel {
  margin: 0.35rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: var(--obs-field);
}

.inset-panel > h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--obs-mist-bright);
}

.field {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: var(--obs-subtle);
}

.field input,
.field select,
.field textarea {
  margin-top: 0.2rem;
}

.check-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--obs-mist);
  cursor: pointer;
}

.check-label input[type="checkbox"],
label.row > input[type="checkbox"],
label > input[type="checkbox"] {
  width: auto;
  min-width: 0.95rem;
  margin: 0.12rem 0 0;
  flex: 0 0 auto;
}

.row > input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.btn-secondary,
button.btn-secondary {
  background: transparent;
  color: var(--obs-mist);
  border: 1px solid var(--obs-border);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  background: color-mix(in srgb, var(--obs-accent) 18%, transparent);
  border-color: var(--obs-amethyst);
}

.table-scroll,
.um-table-scroll,
.defender-status-table-scroll,
.defender-alerts-table-scroll,
.firewall-rules-table-scroll,
.unified-audit-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  margin-top: 0.45rem;
}

.table-scroll > table,
.um-table-scroll > table,
.defender-status-table-scroll > table,
.defender-alerts-table-scroll > table,
.firewall-rules-table-scroll > table,
.unified-audit-table-scroll > table,
.card > table {
  margin-top: 0;
}

.table-scroll th,
.um-table-scroll th,
.defender-status-table-scroll th,
.defender-alerts-table-scroll th,
.firewall-rules-table-scroll th,
.unified-audit-table-scroll th,
.card > table > thead > tr > th {
  background: var(--obs-elevated);
  color: var(--obs-mist-bright);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: var(--obs-teal);
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.toolbar-row > input,
.toolbar-row > select,
.toolbar-row > label {
  flex: 1 1 11rem;
  max-width: 18rem;
  margin: 0;
}

.toolbar-row > button {
  flex: 0 0 auto;
}

.page-hint {
  margin: -0.25rem 0 0.85rem;
  color: var(--obs-subtle);
  max-width: 54rem;
}

.dns-filter-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.dns-collapsible-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--obs-mist-bright);
}

.dns-collapsible-body > .hint:first-child {
  margin-top: 0;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--obs-border);
  background: color-mix(in srgb, var(--obs-accent) 32%, var(--obs-panel));
  color: var(--obs-mist);
  font-size: 0.8rem;
}

.summary-pill strong {
  color: var(--obs-mist-bright);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.grid .card {
  margin-bottom: 0;
  height: 100%;
}

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

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.38rem 0.45rem;
  box-sizing: border-box;
  background: var(--obs-field);
  color: var(--obs-mist);
  border: 1px solid var(--obs-border);
  border-radius: 6px;
  font-size: 0.86rem;
}

select {
  color-scheme: dark;
}

input[type="checkbox"],
input[type="radio"],
progress {
  accent-color: var(--obs-teal);
}

textarea {
  font-family: Consolas, monospace;
  resize: vertical;
}

button {
  padding: 0.38rem 0.72rem;
  background: var(--obs-amethyst);
  color: var(--obs-ice);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.2;
}

button:hover {
  background: var(--obs-amethyst-glow);
}

.row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.row input {
  flex: 1;
}

.table-toolbar {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.table-filter-field {
  display: block;
  margin-bottom: 0;
  flex: 1 1 220px;
  max-width: 320px;
}

.table-filter-field .hint {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
}

.table-filter-search,
.table-filter-field select {
  width: 100%;
  min-width: 220px;
  margin-top: 0;
}

.table-toolbar > button {
  flex: 0 0 auto;
  align-self: flex-end;
}

.containment-builder {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.containment-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.containment-choice input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.containment-hint {
  margin: 0;
}

.containment-exclude-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
}

#ringfencing-save-endpoints {
  min-height: 170px;
}

.containment-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

#ringfencing-profiles-body tr {
  cursor: pointer;
}

#ringfencing-profiles-body tr.selected {
  background: var(--obs-selected);
}

.containment-profile-row-actions {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--obs-border);
  flex-wrap: wrap;
}

.containment-toolbar-row button,
.containment-actions-row button,
.containment-profile-actions button {
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 0;
}

.containment-toolbar-row,
.containment-actions-row {
  flex-wrap: wrap;
  align-items: center;
}

.containment-toolbar-row select {
  flex: 1 1 320px;
  min-width: 260px;
}

.containment-actions-row select {
  flex: 1 1 240px;
  min-width: 200px;
}

.containment-compact-btn {
  white-space: nowrap;
  min-width: 0;
}

.spread {
  justify-content: space-between;
}

#deploy-script-toolbar {
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

#deploy-script-copy-status {
  min-height: 1rem;
}

pre,
.output {
  background: var(--obs-field);
  padding: 0.5rem;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
}

.output.muted {
  margin-top: 0.5rem;
  color: var(--obs-subtle);
  font-size: 0.78rem;
}

.status {
  min-height: 1rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
}

.status.error {
  color: var(--obs-danger-text);
}

.hint {
  color: var(--obs-subtle);
  font-size: 0.8rem;
}

#observed-filter {
  width: auto;
  min-width: 120px;
}

#observed-endpoint-filter {
  width: auto;
  min-width: 150px;
}

#observed-file-filter {
  width: auto;
  min-width: 190px;
}

#observed-date-from,
#observed-date-to {
  width: auto;
  min-width: 130px;
}

#observed-category-filter {
  width: auto;
  min-width: 160px;
}

.audit-disposition.allowed {
  color: var(--obs-success-text);
}

.audit-disposition.policy {
  color: var(--obs-amethyst-light);
}

.audit-disposition.other {
  color: var(--obs-subtle);
}

.audit-category-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--obs-deep);
  color: var(--obs-mist);
}

.audit-category-badge.warn {
  background: var(--obs-warn-bg);
  color: var(--obs-warn-text);
}

.audit-category-badge.ok {
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

.unified-audit-filters {
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin: 0.65rem 0;
}

.unified-audit-toolbar {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.unified-audit-heading {
  display: block;
  text-align: left;
}

.unified-audit-primary-actions {
  justify-content: flex-start;
  margin-top: 0.55rem;
}

.unified-audit-page .summary-pill {
  border-color: currentColor;
  font-weight: 600;
}

.unified-audit-page .summary-success {
  color: var(--obs-success-text);
  background: var(--obs-success-bg);
}

.unified-audit-page .summary-danger {
  color: var(--obs-danger-text);
  background: var(--obs-danger-bg);
}

.unified-audit-page .summary-observed {
  color: #7dd3fc;
  background: rgba(3, 105, 161, 0.28);
}

.unified-audit-page .summary-neutral {
  color: var(--obs-mist-soft);
  background: color-mix(in srgb, var(--obs-accent) 20%, transparent);
}

.unified-audit-page .summary-category-app {
  color: var(--obs-warn-text);
  background: rgba(146, 64, 14, 0.3);
}

.unified-audit-page .summary-category-defender {
  color: var(--obs-teal);
  background: color-mix(in srgb, var(--obs-accent) 28%, transparent);
}

.unified-audit-page .summary-category-request {
  color: #67e8f9;
  background: rgba(14, 116, 144, 0.27);
}

.unified-audit-page .summary-category-firewall {
  color: #fdba74;
  background: rgba(154, 52, 18, 0.28);
}

.unified-audit-page .summary-category-containment {
  color: #f0abfc;
  background: rgba(134, 25, 143, 0.28);
}

.unified-audit-page .summary-category-policy {
  color: var(--obs-teal);
  background: color-mix(in srgb, var(--obs-accent) 30%, transparent);
}

.unified-audit-page .summary-category-vulnerability {
  color: #fda4af;
  background: rgba(159, 18, 57, 0.28);
}

.unified-audit-page .summary-category-network {
  color: #5eead4;
  background: rgba(15, 118, 110, 0.28);
}

.unified-audit-page .summary-category-system {
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.32);
}

.unified-audit-page .summary-pill strong {
  color: inherit;
}

.audit-default-window {
  padding: 0.25rem 0.45rem;
  border-left: 2px solid var(--obs-info-strong);
  color: var(--obs-info-text);
}

.unified-audit-health-card {
  margin: 0.85rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: var(--obs-panel);
}

.unified-audit-health-card summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--obs-mist-bright);
}

.unified-audit-alerts-card {
  border-left: 3px solid var(--obs-accent);
}

.unified-audit-health-toolbar {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.unified-audit-alerts-panel {
  margin-top: 0.65rem;
}

.unified-audit-alerts-panel h4 {
  margin: 0 0 0.45rem;
}

.unified-audit-alert-form {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.alert-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.alert-rules-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--obs-deep);
}

.ingestion-status-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--obs-deep);
}

.ingestion-health-row.status-stale .ingestion-status-badge,
.ingestion-health-row.status-telemetry_gap .ingestion-status-badge,
.ingestion-health-row.status-policy_failed .ingestion-status-badge {
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

.ingestion-health-row.status-healthy .ingestion-status-badge {
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

.compact-table th,
.compact-table td {
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
}

.unified-audit-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--obs-deep);
  border-radius: 8px;
}

.observed-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.6rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--obs-accent-hover);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-accent) 24%, transparent);
}

.observed-selection-actions {
  display: inline-flex;
  gap: 0.45rem;
}

.observed-selection-bar button.danger {
  border-color: var(--obs-danger-strong);
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

.audit-pagination {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: var(--obs-deep);
}

.audit-pagination label,
.audit-pagination #observed-page-meta {
  color: var(--obs-mist-soft);
}

.audit-pagination select {
  color-scheme: dark;
  color: var(--obs-mist-bright);
  background: var(--obs-field);
  border-color: var(--obs-border);
}

#policy-scope {
  width: auto;
  min-width: 220px;
}

#policy-endpoint {
  min-width: 260px;
}

#policy-group {
  min-width: 220px;
}

#permit-scope-select,
#permit-group-select {
  min-width: 220px;
}

#permit-request-file {
  word-break: break-all;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--obs-border);
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  color: var(--obs-mist);
  background: var(--obs-void);
  font-size: 0.74rem;
}

.scope-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1.2;
  border: 1px solid var(--obs-border);
}

.scope-badge.endpoint {
  background: var(--obs-amethyst-glow);
  color: var(--obs-mist-soft);
  border-color: var(--obs-amethyst-glow);
}

.scope-badge.isolated {
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
  border-color: var(--obs-danger-strong);
}

.agent-upgrade-btn,
.agent-upgrade-cancel-btn {
  margin-left: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 999px;
}

.endpoint-online-status {
  font-weight: 600;
}

.endpoint-online-status.online {
  color: var(--obs-success-text);
}

.endpoint-online-status.offline {
  color: var(--obs-danger-text);
}

.defender-health {
  font-weight: 600;
}

.defender-health.healthy {
  color: var(--obs-success-text);
}

.defender-health.warning {
  color: var(--obs-warn-text);
}

.defender-health.critical {
  color: var(--obs-danger-text);
}

.defender-health.unknown {
  color: var(--obs-subtle);
}

.defender-health-link {
  background: transparent;
  border: 1px solid var(--obs-border);
  border-radius: 999px;
  padding: 0.12rem 0.46rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.defender-health-link:hover {
  border-color: var(--obs-subtle);
}

.vulnerability-exposure {
  font-weight: 600;
}

.vulnerability-exposure.low {
  color: var(--obs-success-text);
}

.vulnerability-exposure.medium {
  color: var(--obs-warn-text);
}

.vulnerability-exposure.high {
  color: var(--obs-severity-high);
}

.vulnerability-exposure.critical {
  color: var(--obs-danger-text);
}

.vuln-callout {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-accent) 8%, transparent);
  font-size: 0.92rem;
  line-height: 1.45;
}

.vuln-callout.compact {
  margin: 0.5rem 0;
  padding: 0.55rem 0.75rem;
}

.vuln-callout p {
  margin: 0.35rem 0;
}

.vuln-scan-ok {
  color: var(--obs-success-text);
}

.vuln-scan-warn {
  color: var(--obs-warn-text);
}

.vuln-scan-error {
  color: var(--obs-danger-text);
}

.vulnerability-detail-modal-content {
  max-width: min(96vw, 1100px);
}

.vulnerability-update-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-info-strong) 8%, transparent);
}

.vulnerability-update-progress progress {
  width: min(12rem, 35%);
  accent-color: var(--obs-info-strong);
}

.vulnerability-job-status {
  display: inline-block;
  font-weight: 600;
}

.vulnerability-job-status.queued,
.vulnerability-job-status.installing {
  color: var(--obs-info-strong);
}

.vulnerability-job-status.completed {
  color: var(--obs-success-text);
}

.vulnerability-job-status.restart,
.vulnerability-job-status.skipped {
  color: var(--obs-warn-text);
}

.vulnerability-job-status.failed,
.vulnerability-job-status.cancelled {
  color: var(--obs-danger-text);
}

.vulnerability-job-detail summary {
  cursor: help;
}

.vulnerability-job-detail code {
  display: block;
  max-width: 28rem;
  margin-top: 0.35rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--obs-subtle);
  font-weight: 400;
}

.vuln-kb-list code {
  font-size: 0.85rem;
}

button.linkish {
  background: none;
  border: none;
  color: var(--obs-teal);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.network-device-status {
  font-weight: 600;
}

.network-device-status.managed {
  color: var(--obs-success-text);
}

.network-device-status.unknown {
  color: var(--obs-danger-text);
}

.network-device-status.stale {
  color: var(--obs-subtle);
}

.defender-remediation-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.defender-remediation-list li {
  margin-bottom: 0.65rem;
}

.defender-policy-layout {
  margin-top: 0.35rem;
}

.defender-policy-accordion summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--obs-mist);
  margin-bottom: 0.45rem;
}

.defender-policy-accordion[open] summary {
  margin-bottom: 0.6rem;
}

.defender-policy-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--obs-deep);
  padding-bottom: 0.35rem;
}

.defender-policy-tab {
  background: var(--obs-panel);
  border: 1px solid var(--obs-border);
  border-radius: 6px 6px 0 0;
  color: var(--obs-mist);
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.defender-policy-tab.active {
  background: var(--obs-amethyst-glow);
  border-color: var(--obs-amethyst-glow);
  color: var(--obs-ice);
}

.defender-policy-panel-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}

.defender-agent-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.defender-agent-toolbar select {
  flex: 1;
  min-width: 200px;
}

.defender-policy-actions {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--obs-deep);
}

.defender-policy-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.defender-policy-group {
  border: 1px solid var(--obs-deep);
  border-radius: 8px;
  background: var(--obs-panel);
  overflow: hidden;
}

.defender-policy-group summary {
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--obs-mist);
  list-style: none;
  user-select: none;
}

.defender-policy-group summary::-webkit-details-marker {
  display: none;
}

.defender-policy-group summary::before {
  content: "▸ ";
  color: var(--obs-subtle);
}

.defender-policy-group[open] summary::before {
  content: "▾ ";
}

.defender-policy-group-body {
  padding: 0.45rem 0.6rem 0.55rem;
  border-top: 1px solid var(--obs-deep);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.defender-exclusions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

.defender-policy-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.defender-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.defender-field--inline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 76px;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--obs-deep);
  border-radius: 6px;
  background: var(--obs-void);
}

.defender-field-label {
  font-size: 0.78rem;
  color: var(--obs-mist);
  padding-right: 0.2rem;
  line-height: 1.2;
}

.defender-field--inline .defender-field-label {
  margin: 0;
  width: 100%;
}

.defender-field-control select,
.defender-field-control input[type="time"] {
  width: 100%;
  max-width: 220px;
}

.defender-field--inline .defender-field-control {
  width: 100%;
  min-width: 0;
}

.defender-field--inline .defender-field-control select,
.defender-field--inline .defender-field-control input[type="time"] {
  max-width: none;
  margin-top: 0;
}

.defender-field--block {
  grid-column: 1 / -1;
}

.defender-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.defender-toggle-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--obs-amethyst);
  margin: 0;
}

#defender-policy-management input,
#defender-policy-management select,
#defender-policy-management textarea {
  margin-top: 0;
}

.defender-exclusion-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.defender-exclusion-add input {
  flex: 1;
  min-width: 220px;
}

.defender-exclusion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.defender-exclusion-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid var(--obs-deep);
  border-radius: 6px;
  background: var(--obs-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.defender-exclusion-add button {
  white-space: nowrap;
}

.defender-policy-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--obs-subtle);
}

.defender-asr-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--obs-deep);
  border-radius: 6px;
}

.defender-asr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.defender-asr-table th,
.defender-asr-table td {
  border-bottom: 1px solid var(--obs-deep);
  padding: 0.35rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}

.defender-asr-table select {
  width: 100%;
  min-width: 110px;
}

.defender-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.55rem;
}

.defender-policy-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--obs-mist);
}

.defender-policy-grid select,
.defender-policy-grid input[type="time"] {
  width: 100%;
}

.defender-firewall-profiles {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.defender-firewall-profile {
  border: 1px solid var(--obs-deep);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: var(--obs-deep);
}

.defender-firewall-profile legend {
  font-size: 0.8rem;
  padding: 0 0.2rem;
}

.dns-filter-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0.65rem 0 1rem;
}

.dns-filter-category-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.dns-filter-category-item small {
  display: block;
  color: var(--obs-subtle);
  margin-top: 0.1rem;
}

.dns-filter-rules-table input[type="text"] {
  min-width: 10rem;
}

.dns-approved-table {
  width: 100%;
  margin: 0.75rem 0;
}

.dns-approved-table input[type="text"] {
  width: 100%;
  min-width: 12rem;
}

.dns-approved-table td:last-child {
  width: 6rem;
  white-space: nowrap;
}

#dns-block-events-table .dns-block-event-add-btn,
#dns-block-events-table .dns-block-event-remove-btn {
  min-width: 4.5rem;
  padding: 0.28rem 0.55rem;
}

#dns-block-events-table .dns-block-event-add-btn:disabled,
#dns-block-events-table .dns-block-event-remove-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

#dns-block-events-table .dns-block-event-remove-btn {
  background: var(--obs-subtle-dim);
}

#dns-block-events-table .dns-block-event-remove-btn:hover:not(:disabled) {
  background: var(--obs-subtle);
}

.nav-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--obs-warn-strong);
  color: var(--obs-void);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.dns-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
}

.dns-stat-card {
  border: 1px solid var(--obs-deep);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--obs-void);
}

a.dns-stat-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.dns-stat-card:hover {
  border-color: var(--obs-mist);
}

.dns-stat-label {
  display: block;
  color: var(--obs-subtle);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.dns-stat-card strong {
  font-size: 1.35rem;
  color: var(--obs-mist);
}

.dns-unified-endpoint-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

.dns-unified-endpoint-toolbar select {
  min-width: 16rem;
}

.dns-effective-preview {
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin: 0.5rem 0;
  background: var(--obs-deep);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dns-effective-preview dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
}

.dns-effective-preview dt {
  color: var(--obs-subtle);
  margin: 0;
}

.dns-effective-preview dd {
  margin: 0;
}

.dns-sync-hint {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.dns-filter-collapsible {
  margin-bottom: 0.75rem;
}

.dns-filter-collapsible > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.15rem 0;
}

.dns-filter-collapsible > summary::-webkit-details-marker {
  display: none;
}

.dns-filter-collapsible > summary::before {
  content: "▸";
  color: var(--obs-subtle);
  font-size: 0.85rem;
}

.dns-filter-collapsible[open] > summary::before {
  content: "▾";
}

.dns-collapsible-body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--obs-deep);
}

.dns-operations-section + .dns-operations-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--obs-deep);
}

.dns-pending-strip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--obs-warn-text);
}

.dns-category-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  margin: 0.35rem 0 0.55rem;
}

.dns-category-toolbar input[type="search"] {
  min-width: 12rem;
}

.dns-filter-category-item.inherited {
  opacity: 0.92;
}

.dns-filter-category-item.inherited span small.inherited-tag {
  color: var(--obs-subtle);
}

.dns-reason-chip {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.dns-reason-chip.category {
  background: var(--obs-amethyst-soft);
  color: var(--obs-amethyst-light);
}

.dns-reason-chip.rule {
  background: var(--obs-warn-bg);
  color: var(--obs-warn-text);
}

.dns-reason-chip.default {
  background: var(--obs-deep);
  color: var(--obs-mist);
}

.dns-status-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dns-status-badge.ok {
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

.dns-status-badge.warn {
  background: var(--obs-warn-bg);
  color: var(--obs-warn-text);
}

.dns-status-badge.bad {
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

.dns-status-badge.neutral {
  background: var(--obs-deep);
  color: var(--obs-subtle);
}

#dns-filter-status-table tbody tr.dns-status-row-clickable {
  cursor: pointer;
}

#dns-filter-status-table tbody tr.dns-status-row-clickable:hover {
  background: color-mix(in srgb, var(--obs-muted) 8%, transparent);
}

#dns-filter-status-table tbody tr.dns-status-row-focused {
  outline: 1px solid var(--obs-subtle-dim);
  background: color-mix(in srgb, var(--obs-muted) 6%, transparent);
}

.dns-approved-duplicate-warning {
  display: block;
  margin-top: 0.2rem;
  color: var(--obs-warn-text);
  font-size: 0.75rem;
}

#dns-block-events-table .dns-block-event-status-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

#dns-block-events-table .dns-block-event-status-badge.allowed {
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

#dns-block-events-table .dns-block-event-status-badge.blocked {
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

.scope-badge.tenant {
  background: var(--obs-void);
  color: var(--obs-mist);
}

.audit-disposition.learned {
  color: var(--obs-success-text);
  font-weight: 600;
}

.audit-disposition.denied {
  color: var(--obs-danger-text);
  font-weight: 600;
}

.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.pagination-row .row {
  gap: 0.5rem;
}

.pagination-row select,
.audit-pagination select {
  background: var(--obs-field);
  border-color: var(--obs-teal);
}

#observed-page-size,
#observed-page-select,
#learned-page-size {
  width: auto;
  min-width: 72px;
}

#observed-prev-page:disabled,
#observed-next-page:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.45rem;
  table-layout: fixed;
}

th,
td {
  text-align: left;
  padding: 0.35rem 0.35rem;
  border-bottom: 1px solid var(--obs-border);
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.76rem;
}

:where(tbody tr:hover) > td {
  background: color-mix(in srgb, var(--obs-teal) 14%, var(--obs-panel));
}

.resizable-col {
  position: relative;
}

.col-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}

.col-resize-handle:hover {
  background: color-mix(in srgb, var(--obs-muted) 22%, transparent);
}

.audit-message-cell {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.observed-main-row {
  cursor: pointer;
}

.observed-main-row:hover td {
  background: color-mix(in srgb, var(--obs-accent) 8%, transparent);
}

.device-selectable-row {
  cursor: pointer;
}

.device-selectable-row:hover td {
  background: color-mix(in srgb, var(--obs-accent) 14%, transparent);
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.audit-detail-full {
  grid-column: 1 / -1;
}

.audit-detail-grid strong {
  color: var(--obs-mist);
}

.audit-time-value {
  color: var(--obs-amethyst-light);
  font-weight: 600;
}

.audit-endpoint-value {
  color: var(--obs-warn-text);
  font-weight: 700;
}

.audit-file-value {
  color: var(--obs-teal);
  font-size: 0.98rem;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--obs-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1.5rem;
  box-sizing: border-box;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  width: min(920px, 94vw);
  height: min(82vh, 860px);
  max-height: 92vh;
  overflow: auto;
  background: linear-gradient(160deg, var(--obs-elevated), var(--obs-panel));
  border: 1px solid color-mix(in srgb, var(--obs-teal) 68%, var(--obs-purple));
  border-radius: 10px;
  padding: 1rem 1.15rem;
  box-shadow: 0 20px 60px var(--obs-shadow);
}

.device-restart-modal-card {
  width: min(620px, 94vw);
  height: auto;
}

.device-restart-modal-card textarea {
  width: 100%;
  margin-top: 0.35rem;
  box-sizing: border-box;
}

.device-restart-force-warning {
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--obs-danger-strong);
  border-radius: 8px;
  color: var(--obs-danger-text);
  background: color-mix(in srgb, var(--obs-danger-bg) 75%, transparent);
  font-weight: 600;
}

.device-restart-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1rem;
}

.device-restart-modal-actions #device-restart-safe-btn {
  order: 3;
}

.modal-overlay-fullpage {
  align-items: stretch;
  justify-content: stretch;
  padding: 0.45rem;
}

.modal-card-fullpage {
  width: 100%;
  max-width: none;
  height: calc(100vh - 0.9rem);
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

#defender-endpoint-findings-table th:nth-child(1),
#defender-endpoint-findings-table td:nth-child(1),
#defender-scan-detail-findings-table th:nth-child(1),
#defender-scan-detail-findings-table td:nth-child(1) {
  width: 12%;
}

#defender-endpoint-findings-table th:nth-child(2),
#defender-endpoint-findings-table td:nth-child(2),
#defender-scan-detail-findings-table th:nth-child(2),
#defender-scan-detail-findings-table td:nth-child(2) {
  width: 12%;
}

#defender-endpoint-findings-table th:nth-child(3),
#defender-endpoint-findings-table td:nth-child(3),
#defender-scan-detail-findings-table th:nth-child(3),
#defender-scan-detail-findings-table td:nth-child(3) {
  width: 46%;
}

#defender-endpoint-findings-table th:nth-child(4),
#defender-endpoint-findings-table td:nth-child(4),
#defender-scan-detail-findings-table th:nth-child(4),
#defender-scan-detail-findings-table td:nth-child(4) {
  width: 10%;
}

#defender-endpoint-findings-table th:nth-child(5),
#defender-endpoint-findings-table td:nth-child(5),
#defender-scan-detail-findings-table th:nth-child(5),
#defender-scan-detail-findings-table td:nth-child(5) {
  width: 20%;
}

#defender-endpoint-findings-table td:nth-child(3),
#defender-endpoint-findings-table td:nth-child(3) code,
#defender-scan-detail-findings-table td:nth-child(3),
#defender-scan-detail-findings-table td:nth-child(3) code,
#defender-endpoint-quarantine-table td:nth-child(3),
#defender-endpoint-events-table td:nth-child(3),
#defender-endpoint-tasks-table td:nth-child(6) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}

#defender-endpoint-quarantine-table th:nth-child(1),
#defender-endpoint-quarantine-table td:nth-child(1) {
  width: 14%;
}

#defender-endpoint-quarantine-table th:nth-child(2),
#defender-endpoint-quarantine-table td:nth-child(2) {
  width: 16%;
}

#defender-endpoint-quarantine-table th:nth-child(3),
#defender-endpoint-quarantine-table td:nth-child(3) {
  width: 42%;
}

#defender-endpoint-quarantine-table th:nth-child(4),
#defender-endpoint-quarantine-table td:nth-child(4) {
  width: 10%;
}

#defender-endpoint-quarantine-table th:nth-child(5),
#defender-endpoint-quarantine-table td:nth-child(5) {
  width: 18%;
}

#defender-endpoint-events-table th:nth-child(1),
#defender-endpoint-events-table td:nth-child(1) {
  width: 12%;
}

#defender-endpoint-events-table th:nth-child(2),
#defender-endpoint-events-table td:nth-child(2) {
  width: 12%;
}

#defender-endpoint-events-table th:nth-child(3),
#defender-endpoint-events-table td:nth-child(3) {
  width: 28%;
}

#defender-endpoint-events-table th:nth-child(4),
#defender-endpoint-events-table td:nth-child(4) {
  width: 8%;
}

#defender-endpoint-events-table th:nth-child(5),
#defender-endpoint-events-table td:nth-child(5) {
  width: 10%;
}

#defender-endpoint-events-table th:nth-child(6),
#defender-endpoint-events-table td:nth-child(6) {
  width: 30%;
}

#defender-endpoint-tasks-table th:nth-child(1),
#defender-endpoint-tasks-table td:nth-child(1) {
  width: 14%;
}

#defender-endpoint-tasks-table th:nth-child(2),
#defender-endpoint-tasks-table td:nth-child(2) {
  width: 10%;
}

#defender-endpoint-tasks-table th:nth-child(3),
#defender-endpoint-tasks-table td:nth-child(3) {
  width: 10%;
}

#defender-endpoint-tasks-table th:nth-child(4),
#defender-endpoint-tasks-table td:nth-child(4) {
  width: 8%;
}

#defender-endpoint-tasks-table th:nth-child(5),
#defender-endpoint-tasks-table td:nth-child(5) {
  width: 8%;
}

#defender-endpoint-tasks-table th:nth-child(6),
#defender-endpoint-tasks-table td:nth-child(6) {
  width: 50%;
}

.device-action-menu-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--obs-mist);
  padding: 0.15rem 0.35rem 0.35rem;
}

.device-action-protection-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.35rem 0.45rem;
  border-bottom: 1px solid var(--obs-deep);
  margin-bottom: 0.25rem;
}

.device-action-protection-label {
  font-size: 0.74rem;
  color: var(--obs-mist);
}

.device-action-protection-row button {
  font-size: 0.74rem;
}

.device-action-menu-status {
  font-size: 0.76rem;
  padding: 0.35rem 0.45rem;
  margin: 0 0.25rem 0.35rem;
  border-radius: 6px;
  background: var(--obs-deep);
  border: 1px solid var(--obs-deep);
  color: var(--obs-mist);
}

.device-action-menu-status.pending {
  color: var(--obs-warn-text);
}

.device-action-menu-status.success {
  color: var(--obs-success-text);
}

.device-action-menu-status.error {
  color: var(--obs-danger-text);
}

.device-action-menu-divider {
  height: 1px;
  background: var(--obs-deep);
  margin: 0.35rem 0.25rem;
}

.device-action-menu {
  position: fixed;
  z-index: 1400;
  background: var(--obs-elevated);
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 220px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--obs-void) 45%, transparent);
}

.device-action-menu.hidden {
  display: none !important;
}

.device-action-menu button {
  width: 100%;
  text-align: left;
  background: var(--obs-deep);
  border: 1px solid var(--obs-border);
}

.device-action-menu button:hover {
  background: var(--obs-amethyst-glow);
}

.device-action-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.device-action-menu button:disabled:hover {
  background: var(--obs-deep);
}

.device-action-menu button.device-action-danger {
  color: var(--obs-danger-text);
  border-color: var(--obs-danger-bg);
}

.device-action-menu button.device-action-danger:hover {
  background: var(--obs-danger-solid);
  color: var(--obs-danger-text);
}

.modal-content {
  margin-top: 0.7rem;
}

.defender-scan-task-row {
  cursor: pointer;
}

.defender-scan-task-row:hover td {
  background: color-mix(in srgb, var(--obs-accent) 18%, transparent);
}

#observed-detail-title {
  margin: 0;
  font-size: 1rem;
}

#observed-detail-close-btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.86rem;
}

code {
  font-size: 0.74rem;
}

#accounts-table th:nth-child(1),
#accounts-table td:nth-child(1) {
  width: 34%;
}

#accounts-table th:nth-child(2),
#accounts-table td:nth-child(2) {
  width: 16%;
}

#accounts-table th:nth-child(3),
#accounts-table td:nth-child(3) {
  width: 10%;
}

#accounts-table th:nth-child(4),
#accounts-table td:nth-child(4) {
  width: 24%;
}

#accounts-table th:nth-child(5),
#accounts-table td:nth-child(5) {
  width: 16%;
}

#observed-table th:nth-child(1),
#observed-table td:nth-child(1) {
  width: 4%;
}

#observed-table th:nth-child(2),
#observed-table td:nth-child(2) {
  width: 13%;
}

#observed-table th:nth-child(3),
#observed-table td:nth-child(3) {
  width: 14%;
}

#observed-table th:nth-child(4),
#observed-table td:nth-child(4) {
  width: 11%;
}

#observed-table th:nth-child(5),
#observed-table td:nth-child(5) {
  width: 18%;
}

#observed-table th:nth-child(6),
#observed-table td:nth-child(6) {
  width: 17%;
}

#observed-table th:nth-child(7),
#observed-table td:nth-child(7) {
  width: 23%;
}

#observed-table th,
#observed-table td {
  padding: 0.18rem 0.2rem;
  font-size: 0.67rem;
  line-height: 1.2;
}

#observed-table code {
  font-size: 0.66rem;
}

.risk-flag {
  display: inline-block;
  margin: 0.06rem 0.14rem 0.06rem 0;
  padding: 0.04rem 0.3rem;
  border: 1px solid var(--obs-warn-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--obs-warn-strong) 12%, transparent);
  color: var(--obs-warn-text);
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.risk-empty {
  color: var(--obs-subtle);
}

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

@media (max-width: 850px) {
  .container {
    padding: 0.75rem;
  }

  .top-header {
    align-items: flex-start;
    flex-wrap: wrap;
    margin: -0.75rem -0.75rem 0.75rem;
    padding: 0.7rem 0.85rem;
    gap: 0.75rem;
  }

  .top-header-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .nav-group-menu {
    position: static;
    margin-top: 0.28rem;
    min-width: 160px;
    box-shadow: none;
  }

  .top-header-utilities {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .top-header-org {
    flex: 1 1 180px;
  }

  #tenant-select {
    max-width: none;
    width: 100%;
  }

  .session-badge {
    margin-left: 0;
    max-width: none;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

/* Defender threat action buttons — keep single-line in table cells */
#defender-endpoint-findings-table td.row,
#defender-endpoint-quarantine-table td.row,
#defender-scan-detail-findings-table td.row {
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}

#defender-endpoint-findings-table td.row button,
#defender-endpoint-quarantine-table td.row button,
#defender-scan-detail-findings-table td.row button {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.15;
}

#defender-endpoint-findings-table td.row button.defender-finding-quarantine-btn,
#defender-endpoint-findings-table td.row button.defender-scan-finding-quarantine-btn,
#defender-scan-detail-findings-table td.row button.defender-finding-quarantine-btn,
#defender-scan-detail-findings-table td.row button.defender-scan-finding-quarantine-btn {
  min-width: 6.75rem;
}

#defender-endpoint-findings-table td.row button.defender-finding-allow-btn,
#defender-endpoint-findings-table td.row button.defender-scan-finding-allow-btn,
#defender-scan-detail-findings-table td.row button.defender-finding-allow-btn,
#defender-scan-detail-findings-table td.row button.defender-scan-finding-allow-btn,
#defender-endpoint-quarantine-table td.row button.defender-threat-allow-btn {
  min-width: 5.5rem;
}

#defender-endpoint-quarantine-table td.row button.defender-threat-restore-btn {
  min-width: 5.25rem;
}

.firewall-rules-table input,
.firewall-rules-table select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.firewall-rules-table td {
  vertical-align: middle;
}

.firewall-policy-editor h4 {
  margin: 0.85rem 0 0.35rem;
}

.firewall-overview .dns-summary-stats {
  margin-top: 0.5rem;
}

.firewall-rules-table-scroll {
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid var(--obs-deep);
  border-radius: 8px;
}

#firewall-status-table {
  width: 100%;
  border-collapse: collapse;
}

#firewall-status-table th,
#firewall-status-table td {
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
  white-space: nowrap;
}

#firewall-status-table td.fw-managed-rules-cell {
  white-space: normal;
  min-width: 10rem;
  max-width: 18rem;
}

#firewall-status-table .fw-row-focus-hint {
  width: 1.25rem;
  color: var(--obs-subtle);
  text-align: center;
}

#firewall-status-table tbody tr.fw-status-row-clickable {
  cursor: pointer;
}

#firewall-status-table tbody tr.fw-status-row-clickable:hover {
  background: color-mix(in srgb, var(--obs-muted) 8%, transparent);
}

#firewall-status-table tbody tr.fw-status-row-focused {
  outline: 1px solid var(--obs-subtle-dim);
  background: color-mix(in srgb, var(--obs-muted) 6%, transparent);
}

#firewall-status-table tbody tr.fw-status-row-focused .fw-row-focus-hint {
  color: var(--obs-amethyst-light);
}

.fw-profile-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.fw-rule-chip {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.fw-rule-chip.allow {
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

.fw-rule-chip.block {
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

.fw-rule-chip.direction {
  background: var(--obs-deep);
  color: var(--obs-mist);
}

.fw-rule-templates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.35rem 0 0.65rem;
}

.fw-rule-template-btn {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}

.fw-rules-empty {
  margin: 0.35rem 0 0.65rem;
}

.fw-managed-rule-name {
  display: inline-block;
  margin-right: 0.25rem;
  font-size: 0.78rem;
}

.fw-managed-rules-toggle {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
}

.fw-effective-rules {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
  color: var(--obs-mist);
}

.fw-effective-rules li {
  margin: 0.2rem 0;
}

.defender-firewall-profile.inherited {
  opacity: 0.92;
  border-style: dashed;
}

.defender-firewall-profile legend small.inherited-tag {
  color: var(--obs-subtle);
  font-weight: 500;
  font-size: 0.72rem;
  margin-left: 0.35rem;
}

@media (max-width: 1100px) {
  .firewall-rules-table .fw-rule-optional-col {
    display: none;
  }
}

.defender-overview .dns-summary-stats {
  margin-top: 0.5rem;
}

.defender-status-table-scroll,
.defender-alerts-table-scroll {
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid var(--obs-deep);
  border-radius: 8px;
}

#defender-status-table {
  width: 100%;
  border-collapse: collapse;
}

#defender-status-table th,
#defender-status-table td {
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
  white-space: nowrap;
}

#defender-status-table .defender-row-focus-hint {
  width: 1.25rem;
  color: var(--obs-subtle);
  text-align: center;
}

#defender-status-table tbody tr.defender-status-row-clickable {
  cursor: pointer;
}

#defender-status-table tbody tr.defender-status-row-clickable:hover {
  background: color-mix(in srgb, var(--obs-muted) 8%, transparent);
}

#defender-status-table tbody tr.defender-status-row-focused {
  outline: 1px solid var(--obs-subtle-dim);
  background: color-mix(in srgb, var(--obs-muted) 6%, transparent);
}

#defender-status-table tbody tr.defender-status-row-focused .defender-row-focus-hint {
  color: var(--obs-amethyst-light);
}

.defender-endpoint-details-btn {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
}

.defender-policy-toolbar {
  margin: 0.5rem 0 0.75rem;
  gap: 0.65rem;
}

#defender-policy-search {
  min-width: 14rem;
  flex: 1 1 14rem;
}

.defender-policy-presets {
  flex-wrap: wrap;
  align-items: center;
}

.defender-preset-btn {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}

.defender-field.inherited {
  opacity: 0.92;
}

.defender-field-label small.inherited-tag {
  color: var(--obs-subtle);
  font-weight: 500;
  font-size: 0.72rem;
  margin-left: 0.35rem;
}

.defender-field-help {
  margin: 0.15rem 0 0.35rem;
}

#defender-alerts-table tbody tr.defender-alert-row-clickable {
  cursor: pointer;
}

#defender-alerts-table tbody tr.defender-alert-row-clickable:hover {
  background: color-mix(in srgb, var(--obs-muted) 8%, transparent);
}

.defender-alert-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.defender-alert-action-btn,
.defender-alert-menu-btn {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
}

.defender-endpoint-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.defender-endpoint-detail-grid {
  margin-top: 0.25rem;
}

.defender-endpoint-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
  border-bottom: 1px solid var(--obs-deep);
  padding-bottom: 0.35rem;
}

.defender-endpoint-modal-tab {
  background: transparent;
  border: 1px solid var(--obs-border);
  border-radius: 6px;
  color: var(--obs-mist);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.defender-endpoint-modal-tab.active {
  background: var(--obs-deep);
  border-color: var(--obs-subtle-dim);
  color: var(--obs-mist-bright);
}

.defender-endpoint-modal-panel {
  margin-top: 0.5rem;
}

.defender-endpoint-modal-actions {
  margin: 0.5rem 0;
}

/* Shared theme enhancements */
.top-header-brand h1,
.top-header-wordmark {
  color: var(--obs-mist-bright);
  letter-spacing: 0.14em;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--obs-focus-ring);
  outline-offset: 2px;
  border-color: var(--obs-focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--obs-focus-ring) 24%, transparent);
}

th {
  background: var(--obs-elevated);
  color: var(--obs-mist-bright);
  font-weight: 600;
  border-bottom-color: var(--obs-teal);
}

.summary-pill {
  border: 1px solid var(--obs-border);
  background: color-mix(in srgb, var(--obs-accent) 32%, var(--obs-panel));
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.main-nav > a:hover,
.nav-group summary:hover {
  border-color: color-mix(in srgb, var(--obs-teal) 44%, var(--obs-purple));
  color: var(--obs-mist-bright);
}

.defender-policy-accordion[open] > summary,
.dns-filter-collapsible[open] > summary,
details[data-policies-collapsible][open] > summary {
  color: var(--obs-mist-bright);
  background: color-mix(in srgb, var(--obs-accent) 26%, var(--obs-panel));
  box-shadow: inset 3px 0 0 var(--obs-teal);
}

.nav-group-menu {
  box-shadow: 0 8px 24px var(--obs-shadow);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--obs-field);
}

::-webkit-scrollbar-thumb {
  background: var(--obs-border);
  border-radius: 5px;
  border: 2px solid var(--obs-field);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--obs-teal);
}

.remote-shell-modal-card {
  width: min(960px, 96vw);
  height: min(720px, 92vh);
  display: flex;
  flex-direction: column;
}

.remote-shell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remote-shell-actions button {
  white-space: nowrap;
}

.remote-shell-console {
  flex: 1;
  min-height: 420px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  background: var(--obs-field);
  color: var(--obs-mist);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  cursor: text;
  caret-color: transparent;
}

.remote-shell-console:focus-visible {
  outline: 2px solid var(--obs-amethyst-glow);
  outline-offset: 2px;
}

.remote-shell-output {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

.remote-shell-output::selection {
  background: color-mix(in srgb, var(--obs-accent) 35%, transparent);
}

.remote-shell-caret {
  display: inline-block;
  width: 0;
  height: 1.05em;
  border-left: 2px solid var(--obs-mist);
  vertical-align: -0.15em;
  pointer-events: none;
  animation: remote-shell-caret-blink 1s steps(1, end) infinite;
}

@keyframes remote-shell-caret-blink {
  0%, 52% { opacity: 1; }
  53%, 100% { opacity: 0; }
}

.remote-control-modal-card {
  width: min(99vw, 1920px);
  height: min(98vh, 1080px);
  max-height: 98vh;
  padding: 0.45rem 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.remote-control-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-height: 2rem;
  padding: 0.15rem 0;
}

.remote-control-topbar-title {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
}

.remote-control-topbar-title strong {
  font-size: 0.95rem;
  font-weight: 600;
  flex-shrink: 0;
}

.remote-control-topbar-title .hint {
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remote-control-topbar-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 0;
}

.remote-control-topbar-controls button {
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.remote-control-toolbar-label {
  font-size: 0.78rem;
  color: var(--obs-muted);
  white-space: nowrap;
}

.remote-control-topbar-controls select {
  min-width: 72px;
  max-width: 110px;
  padding: 0.25rem 0.35rem;
  font-size: 0.82rem;
}

#remote-control-scale-select {
  min-width: 68px;
  max-width: 80px;
}

.remote-control-viewport[data-scale-mode="actual"] {
  overflow: auto;
  display: block;
  text-align: center;
  cursor: default;
}

.remote-control-viewport[data-scale-mode="actual"] .remote-control-canvas {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  vertical-align: top;
  cursor: crosshair;
}

.remote-control-stream-info {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(28vw, 320px);
}

.remote-control-status {
  margin: 0;
  padding: 0.15rem 0.25rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.remote-control-status.hidden {
  display: none;
}

.remote-control-files-panel {
  margin: 0.35rem 0 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--obs-border);
  border-radius: 0.45rem;
  background: var(--obs-panel);
}

.rc-files-modal {
  width: min(1120px, 96vw);
  height: min(78vh, 740px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rc-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.rc-files-header h3 {
  margin: 0;
  font-size: 1rem;
}

.rc-files-status {
  margin: 0 0 0.45rem;
  min-height: 1.1rem;
}

.rc-files-transfers {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 8.5rem;
  margin-bottom: 0.45rem;
  overflow: auto;
}

.rc-files-transfer {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1.6fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--obs-line);
  border-radius: 0.3rem;
  font-size: 0.7rem;
}

.rc-files-transfer-name,
.rc-files-transfer-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-files-transfer progress {
  width: 100%;
  height: 0.45rem;
}

.rc-files-transfer-actions {
  display: flex;
  gap: 0.25rem;
}

.rc-files-transfer-actions button {
  padding: 0.12rem 0.4rem;
  font-size: 0.68rem;
}

.rc-files-dual-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
}

.rc-files-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--obs-border);
  border-radius: 0.45rem;
  background: var(--obs-panel);
  overflow: hidden;
}

.rc-files-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--obs-border);
  background: color-mix(in srgb, var(--obs-ice) 2%, transparent);
}

.rc-files-pane-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--obs-mist-bright);
}

.rc-files-toolbar {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.rc-files-toolbar button {
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
}

.rc-files-path {
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
  color: var(--obs-mist);
  border-bottom: 1px solid var(--obs-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-files-list {
  flex: 1;
  overflow: auto;
  min-height: 220px;
}

.rc-files-list.rc-files-drop-target {
  outline: 2px dashed var(--obs-amethyst-glow);
  outline-offset: -4px;
}

.rc-files-row {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.45rem;
  cursor: pointer;
  font-size: 0.76rem;
}

.rc-files-row:hover {
  background: color-mix(in srgb, var(--obs-ice) 4%, transparent);
}

.rc-files-row.selected {
  background: var(--obs-amethyst-soft);
}

.rc-files-row-icon {
  opacity: 0.85;
}

.rc-files-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-files-row-size {
  font-size: 0.68rem;
  color: var(--obs-mist);
  font-variant-numeric: tabular-nums;
}

.rc-files-row-loading,
.rc-files-row-empty {
  padding: 0.65rem 0.45rem;
  font-size: 0.74rem;
  color: var(--obs-mist);
}

.rc-files-transfer-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
}

.rc-files-transfer-col button {
  min-width: 2.4rem;
  padding: 0.35rem 0.55rem;
  font-size: 1rem;
  line-height: 1;
}

.rc-files-row-parent {
  color: var(--obs-mist-bright);
  font-style: italic;
}

.rc-files-row-parent .rc-files-row-name {
  font-weight: 600;
}

.remote-control-files-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.remote-control-files-tab {
  padding: 0.18rem 0.55rem;
  font-size: 0.76rem;
  border-radius: 999px;
  border: 1px solid var(--obs-border);
  background: var(--obs-field);
  color: var(--obs-mist);
  cursor: pointer;
}

.remote-control-files-tab.active {
  border-color: var(--obs-amethyst-glow);
  background: var(--obs-amethyst-soft);
  color: var(--obs-mist-bright);
}

.remote-control-files-pane {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.remote-control-files-pane.hidden {
  display: none;
}

.remote-control-files-pane input[type="file"],
.remote-control-files-pane input[type="text"] {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
}

.remote-control-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 18vw);
  gap: 0.65rem;
}

.remote-control-viewport {
  position: relative;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background: var(--obs-void);
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  cursor: crosshair;
}

.remote-control-runtime-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--obs-void) 62%, transparent);
  color: var(--obs-mist-bright);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(1px);
}

.remote-control-runtime-overlay.hidden,
.runtime-restricted-hidden {
  display: none !important;
}

.remote-control-transitioning .remote-control-canvas,
.remote-control-paused .remote-control-canvas {
  opacity: 0.78;
}

.remote-control-modal-card:fullscreen,
.remote-control-modal-card:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

.remote-control-modal-card:fullscreen .remote-control-body,
.remote-control-modal-card:-webkit-full-screen .remote-control-body {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 14vw);
}

.remote-control-modal-card:fullscreen .remote-control-viewport,
.remote-control-modal-card:-webkit-full-screen .remote-control-viewport {
  min-height: 0;
  border-radius: 6px;
}

.remote-control-modal-card:fullscreen .remote-control-chat-panel,
.remote-control-modal-card:-webkit-full-screen .remote-control-chat-panel {
  font-size: 0.82rem;
}

.remote-control-modal-card:fullscreen .remote-control-chat-header,
.remote-control-modal-card:-webkit-full-screen .remote-control-chat-header {
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
}

.remote-control-modal-card:fullscreen .remote-control-chat-form,
.remote-control-modal-card:-webkit-full-screen .remote-control-chat-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

.remote-control-modal-card:fullscreen .remote-control-chat-form button,
.remote-control-modal-card:-webkit-full-screen .remote-control-chat-form button {
  width: 100%;
}

.remote-control-latency {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--obs-void) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--obs-ice) 12%, transparent);
  pointer-events: none;
  user-select: none;
}

.remote-control-latency[data-level="good"] {
  color: var(--obs-success-text);
}

.remote-control-latency[data-level="ok"] {
  color: var(--obs-warn-text);
}

.remote-control-latency[data-level="bad"] {
  color: var(--obs-danger-text);
}

.remote-control-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--obs-panel) 98%, transparent), color-mix(in srgb, var(--obs-void) 98%, transparent));
}

.remote-control-chat-header {
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  color: var(--obs-amethyst-glow);
  border-bottom: 1px solid var(--obs-border);
}

.remote-control-chat-log {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.remote-control-chat-message {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
}

.remote-control-chat-message.operator {
  align-items: flex-end;
}

.remote-control-chat-message.endpoint {
  align-items: flex-start;
}

.remote-control-chat-message.system {
  align-items: center;
}

.remote-control-chat-meta {
  font-size: 0.72rem;
  color: var(--obs-muted);
  letter-spacing: 0.01em;
}

.remote-control-chat-bubble {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  word-break: break-word;
  line-height: 1.35;
  max-width: 95%;
}

.remote-control-chat-message.operator .remote-control-chat-bubble {
  background: color-mix(in srgb, var(--obs-accent) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--obs-teal) 35%, transparent);
  color: var(--obs-ice);
}

.remote-control-chat-message.endpoint .remote-control-chat-bubble {
  background: color-mix(in srgb, var(--obs-field) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--obs-teal) 25%, transparent);
  color: var(--obs-ice);
}

.remote-control-chat-message.system .remote-control-chat-bubble {
  background: color-mix(in srgb, var(--obs-ice) 4%, transparent);
  border: 1px dashed color-mix(in srgb, var(--obs-ice) 8%, transparent);
  color: var(--obs-muted);
  font-size: 0.8rem;
}

.remote-control-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--obs-border);
}

.remote-control-chat-form input {
  min-width: 0;
}

.remote-control-viewport:focus-visible {
  outline: 2px solid var(--obs-amethyst-glow);
  outline-offset: 2px;
}

#remote-control-modal.secure-desktop-active #remote-control-paste-btn,
#remote-control-modal.secure-desktop-active #remote-control-files-btn,
#remote-control-modal.secure-desktop-active #remote-control-apply-stream-btn,
#remote-control-modal.secure-desktop-active #remote-control-monitor-btn,
#remote-control-modal.secure-desktop-active #remote-control-quality-select,
#remote-control-modal.secure-desktop-active .remote-control-toolbar-label[for="remote-control-quality-select"],
#remote-control-modal.secure-desktop-active .remote-control-chat-panel {
  display: none !important;
}

#remote-control-modal.secure-desktop-active #remote-control-cad-btn {
  display: inline-flex !important;
}

#remote-control-cad-btn.hidden {
  display: none !important;
}

.remote-control-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--obs-void);
}

.dashboard-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.dash-modules-loading {
  grid-column: 1 / -1;
  margin: 0.25rem 0;
}

.dash-module-card {
  border: 1px solid var(--obs-border);
  border-radius: 0.55rem;
  background: linear-gradient(160deg, var(--obs-panel) 0%, var(--obs-deep) 100%);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 220px;
}

.dash-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-module-header h3 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--obs-mist-soft);
}

.dash-module-link {
  font-size: 0.72rem;
  color: var(--obs-amethyst-light);
  text-decoration: none;
  border: 1px solid var(--obs-border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.dash-module-link:hover {
  border-color: var(--obs-amethyst-glow);
  color: var(--obs-mist-bright);
}

.dash-module-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  flex: 1;
}

.dash-module-stats {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.dash-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: var(--obs-subtle);
}

.dash-stat-row strong {
  color: var(--obs-mist);
  font-weight: 600;
}

.dash-stat-row.warn strong {
  color: var(--obs-warn-text);
}

.dash-stat-row.bad strong {
  color: var(--obs-danger-text);
}

.dash-stat-row.ok strong {
  color: var(--obs-success-text);
}

.dash-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.dash-donut {
  width: var(--dash-size, 88px);
  height: var(--dash-size, 88px);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.dash-donut-empty {
  background: var(--obs-field);
  border: 1px dashed var(--obs-border);
}

.dash-donut-hole {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--obs-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--obs-mist-soft);
}

.dash-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.7rem;
  color: var(--obs-subtle);
  width: 100%;
}

.dash-legend li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dash-legend strong {
  margin-left: auto;
  color: var(--obs-mist);
}

.dash-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.dash-bars {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  width: 100%;
}

.dash-bar-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr 1.6rem;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.7rem;
}

.dash-bar-label {
  color: var(--obs-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: var(--obs-field);
  border: 1px solid var(--obs-border);
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.35s ease;
}

.dash-bar-value {
  text-align: right;
  color: var(--obs-mist);
  font-weight: 600;
}

.dash-module-chart-wide {
  grid-column: 1 / -1;
}

.dash-module-body.chart-only {
  grid-template-columns: 1fr;
}

.dash-module-card.has-pending {
  border-color: var(--obs-warn-bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--obs-warn-text) 14%, transparent);
}

.dash-request-endpoints {
  margin-top: 0.45rem;
  width: 100%;
}

.dash-request-endpoints .dash-bar-row {
  grid-template-columns: 3.6rem 1fr 1.4rem;
}

.dash-request-breakdown-title {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
}

.dash-request-empty {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .dash-module-body {
    grid-template-columns: 1fr;
  }

  .dash-donut-wrap {
    flex-direction: row;
    align-items: flex-start;
  }
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}

.tab-btn {
  border: 1px solid var(--obs-border);
  background: var(--obs-deep);
  color: inherit;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--obs-teal);
  background: var(--obs-selected);
  color: var(--obs-mist-bright);
}

.device-info-panel,
.wu-panel {
  margin-top: 0.5rem;
}

.device-info-page-card {
  font-size: 0.78rem;
}

.device-info-page-card #device-info-title {
  margin-bottom: 0.15rem;
  font-size: 1.05rem;
  line-height: 1.2;
}

.device-info-page-card #device-info-subtitle {
  margin: 0;
  font-size: 0.68rem;
}

.device-info-page-card .tab-bar {
  gap: 0.3rem;
  margin: 0.55rem 0 0.65rem;
}

.device-info-page-card .tab-btn {
  padding: 0.26rem 0.55rem;
  font-size: 0.68rem;
}

.device-info-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.45rem;
  margin: 0.45rem 0 0.7rem;
}

.device-info-stat-card {
  min-width: 0;
  padding: 0.48rem 0.55rem;
  border: 1px solid var(--obs-deep);
  border-radius: 6px;
  background: var(--obs-void);
}

.device-info-stat-label {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--obs-subtle);
  font-size: 0.64rem;
  line-height: 1.2;
}

.device-info-stat-card strong {
  display: block;
  color: var(--obs-mist);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.device-info-panel {
  font-size: 0.76rem;
  line-height: 1.4;
}

.device-info-panel h3 {
  margin: 0.65rem 0 0.3rem;
  font-size: 0.86rem;
}

.device-info-panel p,
.device-info-panel ul {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.device-info-panel table {
  font-size: 0.72rem;
}

.device-info-panel th,
.device-info-panel td {
  padding: 0.36rem 0.45rem;
}

.device-info-panel input,
.device-info-panel select,
.device-info-panel button {
  font-size: 0.72rem;
}

.device-updates-toolbar {
  margin: 0.75rem 0 1rem;
  align-items: center;
}

.device-updates-table th:first-child,
.device-updates-table td:first-child {
  width: 2.25rem;
  text-align: center;
}

.device-updates-table .update-pending-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  background: color-mix(in srgb, var(--obs-warn-text) 18%, transparent);
  color: var(--obs-warn-text);
}

.software-scan-summary p {
  margin: 0.25rem 0;
}

.software-job-outcome {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  vertical-align: middle;
}

.software-job-outcome.ok {
  color: var(--obs-success-text);
}

.software-job-outcome.failed {
  color: var(--obs-danger-text);
}

.device-updates-table .update-type-security {
  color: var(--obs-danger-text);
}

.device-updates-table .update-type-critical {
  color: var(--obs-danger-strong);
  font-weight: 600;
}

.subtle-card {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--obs-ice) 8%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-ice) 2%, transparent);
}

.wu-profile-card,
.wu-block-card {
  border: 1px solid color-mix(in srgb, var(--obs-ice) 8%, transparent);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
}

.wu-profile-card.disabled {
  opacity: 0.65;
}

.wu-policy-modal-card {
  width: min(920px, 96vw);
  height: auto;
  max-height: 92vh;
  overflow-y: auto;
}

.wu-policy-modal-card h3 {
  margin-bottom: 0.15rem;
}

.wu-policy-modal-card fieldset {
  margin: 0.8rem 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--obs-ice) 10%, transparent);
  border-radius: 8px;
}

.wu-policy-modal-card legend {
  padding: 0 0.35rem;
  color: var(--obs-mist);
  font-weight: 600;
}

.wu-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.65rem;
}

.wu-policy-grid label,
.wu-policy-modal-card > label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wu-policy-grid .wu-check {
  flex-direction: row;
  align-items: center;
  align-self: end;
  min-height: 2.4rem;
}

.wu-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0.35rem 0;
}

.wu-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.wu-days label {
  min-width: 3.8rem;
}

.wu-policy-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.6rem 0 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--obs-accent) 35%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--obs-accent) 8%, transparent);
}

.wu-policy-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem 0.8rem;
  margin: 0.65rem 0;
}

.wu-policy-meta div {
  min-width: 0;
}

.wu-policy-meta dt {
  color: var(--obs-subtle);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.wu-policy-meta dd {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
}

.wu-priority-badge,
.wu-state-badge {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--obs-ice) 12%, transparent);
  border-radius: 999px;
  color: var(--obs-subtle);
  font-size: 0.72rem;
}

.wu-state-badge.enabled {
  border-color: color-mix(in srgb, var(--obs-success-text) 40%, transparent);
  color: var(--obs-success-text);
}

.wu-conflict {
  color: var(--obs-warn-text);
}

.wu-card-actions {
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.wu-legacy-settings summary {
  cursor: pointer;
  font-weight: 600;
}

.wu-legacy-settings[open] summary {
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .wu-policy-modal-card .row.spread {
    align-items: flex-start;
  }

  .wu-policy-grid {
    grid-template-columns: 1fr;
  }
}

.warn-text {
  color: var(--obs-warn-text);
}

.device-reboot-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--obs-warn-text) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-warn-text) 12%, transparent);
  color: var(--obs-warn-text);
}

.device-reboot-banner button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.device-reboot-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.device-reboot-actions button {
  white-space: nowrap;
}

.device-reboot-actions .ghost-btn {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--obs-ice) 25%, transparent);
  color: inherit;
}

.device-reboot-actions .danger-btn {
  background: color-mix(in srgb, var(--obs-danger-strong) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--obs-danger-strong) 60%, transparent);
  color: var(--obs-danger-text);
}

.device-reboot-actions .danger-btn:hover {
  background: color-mix(in srgb, var(--obs-danger-strong) 30%, transparent);
}

#organisations-table .danger-btn {
  background: color-mix(in srgb, var(--obs-danger-strong) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--obs-danger-strong) 60%, transparent);
  color: var(--obs-danger-text);
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
}

#organisations-table .danger-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--obs-danger-strong) 30%, transparent);
}

#organisations-table .danger-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.device-reboot-banner-progress {
  border-color: color-mix(in srgb, var(--obs-info-strong) 50%, transparent);
  background: color-mix(in srgb, var(--obs-info-strong) 12%, transparent);
  color: var(--obs-info-text);
}

.device-reboot-banner-done {
  border-color: color-mix(in srgb, var(--obs-success-strong) 50%, transparent);
  background: color-mix(in srgb, var(--obs-success-strong) 12%, transparent);
  color: var(--obs-success-text);
}

.device-reboot-banner-failed {
  border-color: color-mix(in srgb, var(--obs-danger-strong) 55%, transparent);
  background: color-mix(in srgb, var(--obs-danger-strong) 12%, transparent);
  color: var(--obs-danger-text);
}

.device-reboot-state {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  max-width: 100%;
  margin-left: 0.3rem;
  padding: 0.1rem 0.42rem;
  border: 1px solid var(--obs-border);
  border-radius: 999px;
  background: var(--obs-field);
  color: var(--obs-mist);
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.endpoint-column-policy_status {
  width: 16rem;
  min-width: 12rem;
  max-width: 18rem;
  overflow: hidden;
}

.policy-status-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-status-text.failed,
.policy-status-btn.failed {
  color: var(--obs-danger-text);
}

.policy-status-text.applied,
.policy-status-btn.applied {
  color: var(--obs-success-text);
}

.policy-status-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  width: 100%;
  min-width: 0;
  max-width: 18rem;
  padding: 0.22rem 0.4rem;
  text-align: left;
  background: var(--obs-deep);
  border: 1px solid var(--obs-border);
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
  font-size: 0.76rem;
}

.policy-status-btn:hover {
  background: var(--obs-amethyst-glow);
}

.policy-status-summary {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.policy-status-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--obs-subtle);
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.policy-status-modal-card {
  width: min(720px, 94vw);
  height: auto;
  max-height: 88vh;
}

.policy-status-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.85rem;
  margin: 0 0 0.75rem;
}

.policy-status-meta div {
  display: contents;
}

.policy-status-meta dt {
  color: var(--obs-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.policy-status-meta dd {
  margin: 0;
}

.policy-status-detail {
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: var(--obs-field);
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.4;
  max-height: 58vh;
  overflow: auto;
}

.endpoint-column-hostname {
  max-width: 14rem;
  overflow: hidden;
}

.endpoint-column-hostname .device-reboot-state {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0.22rem 0 0;
  overflow: hidden;
}

.endpoint-column-hostname .device-reboot-state > span:not(.device-reboot-state-dot) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-reboot-state-dot {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.device-reboot-state-message {
  max-width: 22rem;
  overflow: hidden;
  color: var(--obs-subtle);
  text-overflow: ellipsis;
}

.device-reboot-state-queued,
.device-reboot-state-waiting,
.device-reboot-state-postponed,
.device-reboot-state-scheduled {
  border-color: color-mix(in srgb, var(--obs-warn-text) 42%, transparent);
  color: var(--obs-warn-text);
}

.device-reboot-state-rebooting,
.device-reboot-state-starting {
  border-color: color-mix(in srgb, var(--obs-info-strong) 48%, transparent);
  color: var(--obs-info-text);
}

.device-reboot-state-rebooting .device-reboot-state-dot,
.device-reboot-state-starting .device-reboot-state-dot {
  animation: reboot-blink 1s ease-in-out infinite;
}

.device-reboot-state-online,
.device-reboot-state-complete {
  border-color: color-mix(in srgb, var(--obs-success-text) 45%, transparent);
  color: var(--obs-success-text);
}

.device-reboot-state-failed {
  border-color: color-mix(in srgb, var(--obs-danger-text) 50%, transparent);
  color: var(--obs-danger-text);
}

.device-reboot-telemetry {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.reboot-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  flex: 0 0 auto;
}

.reboot-dot-online {
  background: var(--obs-success-strong);
  box-shadow: 0 0 0 color-mix(in srgb, var(--obs-success-strong) 60%, transparent);
  animation: reboot-pulse 1.8s infinite;
}

.reboot-dot-offline {
  background: var(--obs-warn-strong);
  animation: reboot-blink 1s steps(2, start) infinite;
}

@keyframes reboot-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--obs-success-strong) 50%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes reboot-blink {
  0% { opacity: 1; }
  50% { opacity: 0.25; }
  100% { opacity: 1; }
}

.um-permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

.um-perm-module {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--obs-ice) 8%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-void) 15%, transparent);
}

.um-perm-module > strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--obs-subtle);
  font-weight: 600;
}

.um-perm-module label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  cursor: pointer;
}

.um-perm-module input[type="checkbox"] {
  width: auto;
  min-width: 0.95rem;
  margin: 0.1rem 0 0;
  flex: 0 0 auto;
}

.um-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.um-page .section-head {
  align-items: flex-start;
  margin-bottom: 0.55rem;
  gap: 0.75rem;
}

.um-check,
.um-page .check-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--obs-mist);
  cursor: pointer;
}

.um-check input[type="checkbox"],
.um-page .check-label input[type="checkbox"] {
  width: auto;
  min-width: 0.95rem;
  margin: 0.12rem 0 0;
  flex: 0 0 auto;
}

.um-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  align-items: end;
}

.um-field {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: var(--obs-subtle);
}

.um-field input,
.um-field select {
  margin-top: 0.2rem;
}

.um-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--obs-mist);
  cursor: pointer;
}

.um-check input[type="checkbox"] {
  width: auto;
  min-width: 0.95rem;
  margin: 0.12rem 0 0;
  flex: 0 0 auto;
}

.um-create-invite {
  grid-column: 1 / span 3;
  align-self: center;
}

.um-create-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.um-table-scroll {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--obs-border) 55%, transparent);
  border-radius: 8px;
}

.um-users-table,
.um-audit-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
}

.um-users-table th,
.um-users-table td,
.um-audit-table th,
.um-audit-table td {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: normal;
}

.um-users-table th {
  background: var(--obs-elevated);
  color: var(--obs-mist-bright);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: var(--obs-teal);
}

.um-create-tenants-wrap {
  grid-column: 1 / -1;
}

.um-tenant-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.35rem 0.65rem;
  margin-top: 0.35rem;
  max-height: 9.5rem;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--obs-border) 75%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--obs-void) 35%, transparent);
}

.um-tenant-picker .check-label {
  font-size: 0.8rem;
}

.um-users-table .um-tenant-picker {
  max-height: 7.5rem;
  margin-top: 0;
  padding: 0.4rem 0.5rem;
}

.um-users-table th:nth-child(1),
.um-users-table td:nth-child(1) {
  width: 18%;
}

.um-users-table th:nth-child(2),
.um-users-table td:nth-child(2) {
  width: 11%;
}

.um-users-table th:nth-child(3),
.um-users-table td:nth-child(3) {
  width: 12%;
}

.um-users-table th:nth-child(4),
.um-users-table td:nth-child(4) {
  width: 22%;
}

.um-users-table th.um-col-active,
.um-users-table td.um-col-active {
  width: 4.5rem;
  text-align: center;
}

.um-users-table th:nth-child(6),
.um-users-table td:nth-child(6) {
  width: 14%;
}

.um-users-table th:nth-child(7),
.um-users-table td:nth-child(7) {
  width: 18%;
}

.um-users-table .um-email {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.um-users-table .um-row-role {
  width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
}

.um-users-table .um-col-active .um-check {
  justify-content: center;
}

.um-users-table .um-last-login {
  color: var(--obs-subtle);
  font-size: 0.76rem;
  line-height: 1.3;
}

.um-users-table .um-last-login .um-ip {
  display: block;
  color: var(--obs-subtle-dim);
}

.um-actions .um-save-btn,
.um-actions .um-invite-btn,
.um-actions .um-reset-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
}

.um-actions .um-invite-btn,
.um-actions .um-reset-btn {
  background: transparent;
  color: var(--obs-mist);
  border: 1px solid var(--obs-border);
}

.um-actions .um-invite-btn:hover,
.um-actions .um-reset-btn:hover {
  background: color-mix(in srgb, var(--obs-accent) 18%, transparent);
  border-color: var(--obs-amethyst);
}

.um-role-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
}

.um-role-select-field {
  min-width: 11rem;
}

.um-audit-toolbar {
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.um-audit-toolbar input,
.um-audit-toolbar select {
  flex: 1 1 12rem;
  max-width: 18rem;
  margin: 0;
}

.um-audit-table th {
  background: var(--obs-elevated);
  color: var(--obs-mist-bright);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 1100px) {
  .um-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .um-create-invite {
    grid-column: 1 / -1;
  }

  .um-create-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .um-create-form {
    grid-template-columns: 1fr;
  }

  .um-page .um-section-head {
    flex-direction: column;
  }
}


.platform-restore-theater {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--obs-accent) 28%, transparent), transparent 40%),
    color-mix(in srgb, var(--obs-void) 88%, transparent);
  backdrop-filter: blur(8px);
}

.platform-restore-theater.hidden {
  display: none;
}

.platform-restore-theater-card {
  width: min(720px, 100%);
  padding: 1.5rem 1.35rem 1.25rem;
  border: 1px solid var(--obs-border);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--obs-deep) 96%, transparent), color-mix(in srgb, var(--obs-field) 98%, transparent));
  box-shadow: 0 24px 80px color-mix(in srgb, var(--obs-void) 45%, transparent);
  text-align: center;
}

.platform-restore-orb {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0.2rem auto 1rem;
}

.platform-restore-ring,
.platform-restore-ring-2,
.platform-restore-core {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
}

.platform-restore-ring {
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-top-color: var(--obs-amethyst-light);
  border-right-color: color-mix(in srgb, var(--obs-teal) 35%, transparent);
  animation: platform-restore-spin 1.4s linear infinite;
}

.platform-restore-ring-2 {
  width: 72%;
  height: 72%;
  border: 2px solid transparent;
  border-bottom-color: var(--obs-amethyst);
  border-left-color: color-mix(in srgb, var(--obs-accent) 35%, transparent);
  animation: platform-restore-spin 2.2s linear infinite reverse;
}

.platform-restore-core {
  width: 28%;
  height: 28%;
  background: radial-gradient(circle, var(--obs-mist-bright), var(--obs-amethyst));
  box-shadow: 0 0 24px color-mix(in srgb, var(--obs-accent) 75%, transparent);
  animation: platform-restore-pulse 1.6s ease-in-out infinite;
}

.platform-restore-theater.is-complete .platform-restore-ring,
.platform-restore-theater.is-complete .platform-restore-ring-2 {
  animation: none;
  border-color: color-mix(in srgb, var(--obs-success-text) 55%, transparent);
}

.platform-restore-theater.is-failed .platform-restore-core {
  background: radial-gradient(circle, var(--obs-danger-text), var(--obs-danger-strong));
  box-shadow: 0 0 24px color-mix(in srgb, var(--obs-danger-strong) 55%, transparent);
}

.platform-restore-theater.is-failed .platform-restore-ring,
.platform-restore-theater.is-failed .platform-restore-ring-2 {
  animation: none;
  border-color: color-mix(in srgb, var(--obs-danger-text) 55%, transparent);
}

.platform-restore-progress-track {
  height: 8px;
  margin: 0.85rem 0 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--obs-border) 80%, transparent);
  overflow: hidden;
}

.platform-restore-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--obs-accent-hover), var(--obs-teal), var(--obs-accent));
  background-size: 200% 100%;
  transition: width 0.45s ease;
  animation: platform-restore-shimmer 1.8s linear infinite;
}

.platform-restore-percent {
  margin: 0 0 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--obs-amethyst-light);
  letter-spacing: 0.04em;
}

.platform-restore-phases {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.platform-restore-phases li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  color: var(--obs-subtle);
  background: color-mix(in srgb, var(--obs-void) 18%, transparent);
  font-size: 0.92rem;
}

.platform-restore-phases li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--obs-subtle-dim);
  flex: 0 0 auto;
}

.platform-restore-phases li.is-active {
  color: var(--obs-mist-bright);
  background: color-mix(in srgb, var(--obs-accent) 16%, transparent);
}

.platform-restore-phases li.is-active::before {
  background: var(--obs-amethyst-light);
  box-shadow: 0 0 10px color-mix(in srgb, var(--obs-teal) 80%, transparent);
  animation: platform-restore-pulse 1.2s ease-in-out infinite;
}

.platform-restore-phases li.is-done {
  color: var(--obs-success-text);
}

.platform-restore-phases li.is-done::before {
  background: var(--obs-success-text);
}

.platform-restore-live-log {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--obs-border) 90%, transparent);
  background: var(--obs-void);
  color: var(--obs-mist);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

#platform-restore-theater-close {
  margin-top: 0.9rem;
}

@keyframes platform-restore-spin {
  to { transform: rotate(360deg); }
}

@keyframes platform-restore-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.75; }
}

@keyframes platform-restore-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.platform-health-overall {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--obs-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--obs-void) 18%, transparent);
}

.platform-health-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--obs-muted) 20%, transparent);
  color: var(--obs-mist-bright);
}

.platform-health-badge.is-ok {
  background: color-mix(in srgb, var(--obs-success-strong) 18%, transparent);
  color: var(--obs-success-text);
}

.platform-health-badge.is-degraded {
  background: color-mix(in srgb, var(--obs-warn-strong) 18%, transparent);
  color: var(--obs-warn-text);
}

.platform-health-badge.is-critical,
.platform-health-badge.is-down {
  background: color-mix(in srgb, var(--obs-danger-strong) 18%, transparent);
  color: var(--obs-danger-text);
}

.platform-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.platform-health-panel {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--obs-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--obs-void) 14%, transparent);
}

.platform-health-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.platform-health-services-panel {
  margin-bottom: 0.9rem;
}

.platform-health-meters {
  display: grid;
  gap: 0.7rem;
}

.platform-health-meter-track {
  height: 8px;
  margin: 0.35rem 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--obs-border) 75%, transparent);
  overflow: hidden;
}

.platform-health-meter-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--obs-success-strong), var(--obs-success-text));
}

.platform-health-meter-bar.is-warn {
  background: linear-gradient(90deg, var(--obs-warn-strong), var(--obs-warn-text));
}

.platform-health-meter-bar.is-critical {
  background: linear-gradient(90deg, var(--obs-danger-strong), var(--obs-danger-text));
}

.platform-health-kv {
  display: grid;
  gap: 0.4rem;
}

.platform-health-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.platform-health-kv-row span {
  color: var(--obs-subtle);
}

.platform-health-kv-row strong {
  text-align: right;
  color: var(--obs-mist-bright);
  word-break: break-word;
}

.platform-health-raw {
  margin-top: 0.5rem;
}

.platform-health-raw summary {
  cursor: pointer;
  color: var(--obs-subtle);
}

@media (max-width: 980px) {
  .platform-health-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared data loading indicators */
@keyframes data-loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes data-loader-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@keyframes stat-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.data-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.75rem 1rem;
  min-height: 7.5rem;
  text-align: center;
}

.data-loader--inline {
  min-height: 4.5rem;
  padding: 1.15rem 0.75rem;
}

.data-loader--compact {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.65rem;
  min-height: 0;
  padding: 0.85rem 0.25rem;
  text-align: left;
}

.data-loader__ring {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--obs-accent) 38%, transparent);
  border-top-color: var(--obs-amethyst);
  border-right-color: var(--obs-teal);
  box-shadow: 0 0 20px color-mix(in srgb, var(--obs-teal) 28%, transparent);
  animation: data-loader-spin 0.85s linear infinite;
}

.data-loader--compact .data-loader__ring {
  width: 1.05rem;
  height: 1.05rem;
  border-width: 1.5px;
  box-shadow: none;
}

.data-loader__label {
  color: var(--obs-subtle);
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.data-loader--compact .data-loader__label {
  font-size: 0.84rem;
}

tr.data-loader-row > td {
  border-bottom: none;
  padding: 0.35rem 0.75rem;
}

.stat-skeleton {
  display: inline-block;
  width: 2.75rem;
  height: 1.15em;
  border-radius: 0.3rem;
  vertical-align: -0.15em;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--obs-border) 72%, transparent) 0%,
    color-mix(in srgb, var(--obs-teal) 46%, transparent) 45%,
    color-mix(in srgb, var(--obs-border) 72%, transparent) 90%
  );
  background-size: 200% 100%;
  animation: stat-skeleton-shimmer 1.15s ease-in-out infinite;
}

.dns-stat-card strong[aria-busy="true"] {
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
}

.page-loading-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--obs-border);
  border-radius: 0.55rem;
  background:
    linear-gradient(120deg, var(--obs-elevated), var(--obs-deep));
  color: var(--obs-mist);
}

.page-loading-banner .data-loader__ring {
  width: 1.05rem;
  height: 1.05rem;
  border-width: 1.5px;
  box-shadow: none;
}

.page-loading-banner__label {
  font-size: 0.86rem;
  color: var(--obs-mist-soft);
}

.page-loading-banner.hidden {
  display: none;
}


/* Policies page domain grouping */
.policies-domain-label {
  margin: 1.15rem 0 0.45rem;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--obs-subtle);
}

.policies-domain-label:first-of-type {
  margin-top: 0.35rem;
}

.containment-builder > .inset-panel {
  margin: 0.55rem 0 0;
}

.containment-builder > .inset-panel > h3 {
  margin-bottom: 0.65rem;
}

.containment-builder .containment-choice + .containment-choice {
  margin-top: 0.2rem;
}

details[data-policies-collapsible] > summary .dns-collapsible-title {
  flex: 0 1 auto;
}


/* Page help */
.page-help-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0;
}

.page-help-label {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--obs-subtle);
  font-size: 0.88rem;
}

.page-help-bar.hidden {
  display: none;
}

.page-help-modal-card {
  width: min(40rem, 94vw);
  max-height: min(85vh, 44rem);
  display: flex;
  flex-direction: column;
}

.page-help-body {
  overflow: auto;
  display: grid;
  gap: 0.95rem;
  padding-top: 0.35rem;
}

.page-help-section h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--obs-mist-bright);
}

.page-help-section p {
  margin: 0;
  color: var(--obs-mist);
  line-height: 1.45;
  font-size: 0.9rem;
}


/* Section best-practice tips */
.dns-collapsible-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 0 1 auto;
}

.dns-collapsible-heading .dns-collapsible-title {
  flex: 0 1 auto;
}

.section-title-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.section-title-with-tip > h2,
.section-title-with-tip > .dns-collapsible-title {
  margin-top: 0;
  margin-bottom: 0;
  flex: 0 1 auto;
}

.section-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 0;
  vertical-align: middle;
}

.section-tip-btn {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--obs-accent) 45%, transparent);
  background: color-mix(in srgb, var(--obs-deep) 90%, transparent);
  color: var(--obs-amethyst-light);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.section-tip-btn:hover,
.section-tip.is-open .section-tip-btn,
.section-tip:focus-within .section-tip-btn {
  border-color: var(--obs-amethyst);
  color: var(--obs-mist-bright);
  background: color-mix(in srgb, var(--obs-border) 95%, transparent);
}

.section-tip-panel {
  display: none;
  position: fixed;
  z-index: 1200;
  width: min(28rem, calc(100vw - 1.5rem));
  max-height: min(55vh, 24rem);
  overflow: auto;
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--obs-accent) 35%, transparent);
  border-radius: 0.5rem;
  background: linear-gradient(165deg, color-mix(in srgb, var(--obs-deep) 98%, transparent), color-mix(in srgb, var(--obs-field) 96%, transparent));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--obs-void) 55%, transparent);
  color: var(--obs-mist);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  pointer-events: none;
}

.section-tip.is-open .section-tip-panel,
.section-tip:hover .section-tip-panel,
.section-tip:focus-within .section-tip-panel {
  display: block;
}

details[data-policies-collapsible] > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

details[data-policies-collapsible] > summary .section-tip {
  margin-left: 0;
}

/* Persistent site theme control */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 7.2rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: transparent;
  color: var(--obs-mist);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  border-color: var(--obs-teal);
  background: color-mix(in srgb, var(--obs-accent) 16%, transparent);
  color: var(--obs-mist-bright);
}

/* Header notification bell + dropdown */
.notification-bell-wrap {
  position: relative;
  flex: 0 0 auto;
}

.notification-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: transparent;
  color: var(--obs-mist);
  font-size: 0.95rem;
  line-height: 1;
}

.notification-bell-btn:hover,
.notification-bell-btn[aria-expanded="true"] {
  border-color: var(--obs-teal);
  background: color-mix(in srgb, var(--obs-accent) 16%, transparent);
  color: var(--obs-mist-bright);
}

.notification-bell-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--obs-danger-strong);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--obs-void);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 1300;
  width: min(26rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 6rem));
  overflow-y: auto;
  border: 1px solid var(--obs-border);
  border-radius: 10px;
  background: var(--obs-elevated);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--obs-void) 45%, transparent);
  color: var(--obs-text);
  font-size: 0.8rem;
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--obs-border);
}

.notification-panel-subhead {
  border-top: 1px solid var(--obs-border);
  margin-top: 0.2rem;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-empty {
  padding: 0.7rem 0.75rem;
}

/* Items are <button>s; the id prefix outranks the theme-wide `html[data-theme] button` rules. */
#notification-panel .notification-item,
#notification-panel .notification-item:hover:not(:disabled) {
  display: grid;
  grid-template-columns: 0.5rem 1fr;
  gap: 0.6rem;
  width: 100%;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--obs-border) 55%, transparent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--obs-text);
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
}

#notification-panel .notification-item:last-child {
  border-bottom: 0;
}

#notification-panel .notification-item:hover:not(:disabled) {
  background: color-mix(in srgb, var(--obs-text) 8%, transparent);
}

#notification-panel .notification-item.unread {
  background: color-mix(in srgb, var(--obs-teal) 12%, transparent);
}

#notification-panel .notification-item.unread:hover:not(:disabled) {
  background: color-mix(in srgb, var(--obs-teal) 20%, transparent);
}

#notification-panel .notification-item-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.38rem;
  border-radius: 50%;
  background: var(--obs-teal);
}

#notification-panel .notification-item.sev-warning .notification-item-dot {
  background: var(--obs-warn-strong);
}

#notification-panel .notification-item.sev-critical .notification-item-dot {
  background: var(--obs-danger-strong);
}

#notification-panel .notification-item:not(.unread) .notification-item-dot {
  background: var(--obs-muted);
}

#notification-panel .notification-item-title {
  color: var(--obs-text-strong);
  font-weight: 600;
}

#notification-panel .notification-item-meta {
  margin-top: 0.15rem;
  color: var(--obs-muted);
  font-size: 0.72rem;
}

#notification-panel .notification-panel-head strong {
  color: var(--obs-text-strong);
  font-size: 0.82rem;
}

#notification-panel .notification-panel-head button.linkish,
#notification-panel .notification-panel-head a.linkish {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--obs-teal);
  font-size: 0.74rem;
  text-decoration: underline;
}

#notification-panel .notification-empty {
  color: var(--obs-muted);
}

/* Theme-specific surfaces so the panel sits on the header without glare. */
html[data-theme="huntress-light"] .notification-panel {
  background: #ffffff;
  border-color: #bdcbd0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.13);
}

html[data-theme="huntress-dark"] .notification-panel {
  background: var(--obs-elevated);
  border-color: var(--obs-border);
}

/* Bell button: match the neutral Light/Dark toggle next to it in every theme. */
#notification-bell-btn,
#notification-bell-btn:hover:not(:disabled) {
  border: 1px solid var(--obs-border);
  background: transparent;
  box-shadow: none;
  color: var(--obs-mist);
}

#notification-bell-btn:hover:not(:disabled),
#notification-bell-btn[aria-expanded="true"] {
  border-color: var(--obs-teal);
  background: color-mix(in srgb, var(--obs-accent) 16%, transparent);
  color: var(--obs-mist-bright);
}

html[data-theme="huntress-light"] #notification-bell-btn,
html[data-theme="huntress-light"] #notification-bell-btn:hover:not(:disabled) {
  border-color: #bdcbd0;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

html[data-theme="huntress-light"] #notification-bell-btn:hover:not(:disabled),
html[data-theme="huntress-light"] #notification-bell-btn[aria-expanded="true"] {
  border-color: #8ebeb3;
  background: #edf7f4;
  color: #115b4b;
}

html[data-theme="huntress-dark"] #notification-bell-btn,
html[data-theme="huntress-dark"] #notification-bell-btn:hover:not(:disabled) {
  border-color: var(--obs-border);
  background: transparent;
  color: var(--obs-text);
}

html[data-theme="huntress-dark"] #notification-bell-btn:hover:not(:disabled),
html[data-theme="huntress-dark"] #notification-bell-btn[aria-expanded="true"] {
  border-color: var(--hunt-accent);
  background: color-mix(in srgb, var(--hunt-accent) 18%, transparent);
  color: var(--obs-text-strong);
}

.activity-summary {
  max-width: 34rem;
}

.activity-details-toggle {
  font-size: 0.72rem;
}

.activity-details-row td {
  background: color-mix(in srgb, var(--obs-accent) 6%, transparent);
}

.activity-details-row pre {
  margin: 0;
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
}

.activity-stat {
  min-width: 9rem;
}

.activity-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--obs-text-strong);
}

/* Endpoint tags (shown right of the hostname) */
.endpoint-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.endpoint-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid var(--tag-border, var(--obs-border));
  background: var(--tag-bg, var(--obs-deep));
  color: var(--tag-fg, var(--obs-mist-bright));
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.endpoint-tag {
  cursor: pointer;
  font-family: inherit;
}

button.endpoint-tag:hover,
button.endpoint-tag:focus-visible {
  filter: brightness(1.15);
  outline: none;
  box-shadow: 0 0 0 2px var(--obs-accent);
}

/* Theme-scoped overrides: themed `button` rules are high specificity. */
html[data-theme="huntress-light"] button.endpoint-tag,
html[data-theme="huntress-dark"] button.endpoint-tag,
html[data-theme="huntress-light"] #device-tags-chips button,
html[data-theme="huntress-dark"] #device-tags-chips button {
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 0;
  height: auto;
  text-transform: none;
  box-shadow: none;
  border: 1px solid var(--tag-border, var(--obs-border));
  background: var(--tag-bg, var(--obs-deep));
  color: var(--tag-fg, var(--obs-mist-bright));
}

/* Eight stable hues; a tag always gets the same colour across devices. */
.endpoint-tag.tag-hue-0 { --tag-bg: rgba(22, 165, 185, 0.18); --tag-fg: #8fe3ef; --tag-border: rgba(22, 165, 185, 0.5); }
.endpoint-tag.tag-hue-1 { --tag-bg: rgba(139, 92, 246, 0.2); --tag-fg: #cdb8ff; --tag-border: rgba(139, 92, 246, 0.5); }
.endpoint-tag.tag-hue-2 { --tag-bg: rgba(34, 197, 94, 0.18); --tag-fg: #9ff0bd; --tag-border: rgba(34, 197, 94, 0.5); }
.endpoint-tag.tag-hue-3 { --tag-bg: rgba(245, 158, 11, 0.2); --tag-fg: #ffd68a; --tag-border: rgba(245, 158, 11, 0.5); }
.endpoint-tag.tag-hue-4 { --tag-bg: rgba(236, 72, 153, 0.18); --tag-fg: #ffb3d6; --tag-border: rgba(236, 72, 153, 0.5); }
.endpoint-tag.tag-hue-5 { --tag-bg: rgba(59, 130, 246, 0.2); --tag-fg: #b3d1ff; --tag-border: rgba(59, 130, 246, 0.5); }
.endpoint-tag.tag-hue-6 { --tag-bg: rgba(20, 184, 166, 0.18); --tag-fg: #9af0e4; --tag-border: rgba(20, 184, 166, 0.5); }
.endpoint-tag.tag-hue-7 { --tag-bg: rgba(248, 113, 113, 0.18); --tag-fg: #ffbdbd; --tag-border: rgba(248, 113, 113, 0.5); }

html[data-theme="huntress-light"] .endpoint-tag.tag-hue-0 { --tag-bg: #dff7fa; --tag-fg: #0b6b78; --tag-border: #9ad9e2; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-1 { --tag-bg: #efe9ff; --tag-fg: #5b36b5; --tag-border: #c9b8f5; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-2 { --tag-bg: #e3f8ea; --tag-fg: #176b3a; --tag-border: #a7dfbb; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-3 { --tag-bg: #fff2d9; --tag-fg: #8a5a00; --tag-border: #f3cf86; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-4 { --tag-bg: #ffe6f1; --tag-fg: #a3215f; --tag-border: #f4b0cf; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-5 { --tag-bg: #e5efff; --tag-fg: #1f4fa3; --tag-border: #b3ccf5; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-6 { --tag-bg: #dff7f3; --tag-fg: #0f6b60; --tag-border: #9fdcd2; }
html[data-theme="huntress-light"] .endpoint-tag.tag-hue-7 { --tag-bg: #ffe5e5; --tag-fg: #a12626; --tag-border: #f4b1b1; }

.device-tag-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: var(--obs-deep);
}

.device-tags-modal-card {
  max-width: 34rem;
}

.device-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2rem;
  margin: 0.6rem 0 0.8rem;
  padding: 0.5rem;
  border: 1px dashed var(--obs-border);
  border-radius: 8px;
}

.device-tags-chips .hint {
  align-self: center;
}

.device-tags-chips .endpoint-tag-remove {
  margin-left: 0.15rem;
  opacity: 0.75;
  font-weight: 700;
}

.device-tags-chips button.endpoint-tag:hover .endpoint-tag-remove {
  opacity: 1;
}

#device-info-title .endpoint-tags {
  font-size: 0.9rem;
}

/* Email delivery (SMTP) settings */
.email-effective {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  margin: 0 0 0.9rem;
  border: 1px solid var(--obs-border);
  border-radius: 8px;
  background: var(--obs-deep);
  font-size: 0.86rem;
}

.email-effective-label {
  color: var(--obs-subtle);
  font-weight: 600;
}

.email-effective.is-off {
  border-color: var(--obs-warn-text);
}

.email-effective.is-on {
  border-color: var(--obs-success-text);
}

.email-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}

.email-toggle input {
  width: auto;
  margin: 0;
}

.email-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}

.email-grid .field input,
.email-grid .field select {
  width: 100%;
  box-sizing: border-box;
}

.email-span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .email-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .email-grid {
    grid-template-columns: 1fr;
  }

  .email-span-2 {
    grid-column: span 1;
  }
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.8rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--obs-border);
}

.email-test-field {
  min-width: 16rem;
  margin-left: auto;
}

.email-meta {
  margin-top: 0.9rem;
  font-size: 0.8rem;
}

.email-meta .ok {
  color: var(--obs-success-text);
}

.email-meta .bad {
  color: var(--obs-danger-text);
}

.theme-toggle-icon {
  width: 1rem;
  color: var(--obs-teal);
  font-size: 0.92rem;
  line-height: 1;
  text-align: center;
}

/* Compact enterprise security-console themes; Obsidian identity is unchanged. */
html[data-theme="huntress-light"] {
  color-scheme: light;

  --obs-navy: #f1f3f5;
  --obs-purple: #0b7489;
  --obs-mauve: #33404d;
  --obs-ice: #ffffff;
  --obs-teal: #16a5b9;

  --obs-void: #f1f3f5;
  --obs-panel: #ffffff;
  --obs-deep: #f7f8f9;
  --obs-field: #ffffff;
  --obs-elevated: #e9edf0;

  --obs-surface: var(--obs-panel);
  --obs-surface-raised: var(--obs-deep);
  --obs-surface-inset: var(--obs-field);
  --obs-text: #3f4b57;
  --obs-text-strong: #202a35;
  --obs-muted: #667481;
  --obs-accent: #0b7489;
  --obs-accent-hover: #075e70;
  --obs-accent-soft: #dff2f5;
  --obs-border: #dfe3e8;
  --obs-line: #e5e8ec;
  --obs-selected: #e2f2f5;
  --obs-focus-ring: #16a5b9;
  --obs-shadow: rgba(15, 23, 42, 0.16);
  --obs-overlay: rgba(15, 23, 42, 0.54);

  --obs-amethyst: var(--obs-accent);
  --obs-amethyst-glow: var(--obs-accent-hover);
  --obs-amethyst-light: #087f8c;
  --obs-amethyst-soft: var(--obs-accent-soft);
  --obs-mist: var(--obs-text);
  --obs-mist-soft: #475569;
  --obs-mist-bright: var(--obs-text-strong);
  --obs-subtle: var(--obs-muted);
  --obs-subtle-dim: #64748b;

  --obs-success-bg: #e7f6ed;
  --obs-success-text: #166534;
  --obs-success-strong: #15803d;
  --obs-success-border: #86c89d;
  --obs-warn-bg: #fff7df;
  --obs-warn-text: #92400e;
  --obs-warn-strong: #d97706;
  --obs-warn-border: #e7bd68;
  --obs-severity-high: #c2410c;
  --obs-danger-bg: #fdeced;
  --obs-danger-text: #b42318;
  --obs-danger-strong: #dc2626;
  --obs-danger-solid: #b91c1c;
  --obs-danger-border: #eba1a1;
  --obs-info-bg: #e5f4f7;
  --obs-info-text: #155e75;
  --obs-info-strong: #0284c7;
  --obs-disabled-bg: #e7ecee;
  --obs-disabled-text: #64748b;
  --obs-disabled-border: #cbd5d9;
}

html[data-theme="huntress-light"] body {
  background: var(--obs-void);
  color: var(--obs-text);
}

html[data-theme="huntress-light"] .top-header {
  border-bottom-color: #151d2a;
  background: #3b4658;
  box-shadow: none;
  color: #eef5f7;
}

html[data-theme="huntress-light"] .main-nav > a:hover,
html[data-theme="huntress-light"] .nav-group summary:hover {
  border-color: #657386;
  background: #465367;
  color: #ffffff;
}

html[data-theme="huntress-light"] .main-nav > a.active,
html[data-theme="huntress-light"] .nav-group:has(.nav-group-menu a.active) > summary {
  border-color: #16a5b9;
  background: #303b4c;
  color: #4fd4e4;
  box-shadow: inset 0 -2px 0 var(--obs-accent);
}

html[data-theme="huntress-light"] .nav-group-menu,
html[data-theme="huntress-light"] .device-action-menu,
html[data-theme="huntress-light"] [class*="dropdown"] {
  border-color: var(--obs-border);
  background: var(--obs-panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.13);
}

html[data-theme="huntress-light"] .card,
html[data-theme="huntress-light"] .subtle-card {
  border-color: var(--obs-border);
  background: var(--obs-panel);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.055);
}

html[data-theme="huntress-light"] .inset-panel,
html[data-theme="huntress-light"] .modal-content,
html[data-theme="huntress-light"] .page-loading-banner {
  background: var(--obs-deep);
}

html[data-theme="huntress-light"] input,
html[data-theme="huntress-light"] select,
html[data-theme="huntress-light"] textarea {
  border-color: #c5d1d6;
  background: #ffffff;
  color: var(--obs-text-strong);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.035);
}

html[data-theme="huntress-light"] input::placeholder,
html[data-theme="huntress-light"] textarea::placeholder {
  color: #8492a3;
  opacity: 1;
}

html[data-theme="huntress-light"] select,
html[data-theme="huntress-light"] option {
  color-scheme: light;
  background: #ffffff;
  color: var(--obs-text-strong);
}

html[data-theme="huntress-light"] button {
  background: var(--obs-accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

html[data-theme="huntress-light"] button:hover {
  background: var(--obs-accent-hover);
}

html[data-theme="huntress-light"] .btn-secondary,
html[data-theme="huntress-light"] button.btn-secondary,
html[data-theme="huntress-light"] button.secondary,
html[data-theme="huntress-light"] .theme-toggle-btn,
html[data-theme="huntress-light"] .top-header-logout {
  border: 1px solid #bdcbd0;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

html[data-theme="huntress-light"] .btn-secondary:hover,
html[data-theme="huntress-light"] button.btn-secondary:hover,
html[data-theme="huntress-light"] button.secondary:hover,
html[data-theme="huntress-light"] .theme-toggle-btn:hover {
  border-color: #8ebeb3;
  background: #edf7f4;
  color: #115b4b;
}

html[data-theme="huntress-light"] .table-scroll,
html[data-theme="huntress-light"] .um-table-scroll,
html[data-theme="huntress-light"] .defender-status-table-scroll,
html[data-theme="huntress-light"] .defender-alerts-table-scroll,
html[data-theme="huntress-light"] .firewall-rules-table-scroll,
html[data-theme="huntress-light"] .unified-audit-table-scroll {
  border-color: var(--obs-border);
  background: #ffffff;
}

html[data-theme="huntress-light"] th,
html[data-theme="huntress-light"] .table-scroll th,
html[data-theme="huntress-light"] .card > table > thead > tr > th {
  border-bottom-color: #a9c9c3;
  background: #edf3f2;
  color: #263548;
}

html[data-theme="huntress-light"] tbody tr:nth-child(even) > td {
  background: #fafcfc;
}

html[data-theme="huntress-light"] :where(tbody tr:hover) > td,
html[data-theme="huntress-light"] .observed-main-row:hover td,
html[data-theme="huntress-light"] .device-selectable-row:hover td,
html[data-theme="huntress-light"] .defender-scan-task-row:hover td {
  background: #edf7f4;
}

html[data-theme="huntress-light"] tbody tr.selected > td,
html[data-theme="huntress-light"] #ringfencing-profiles-body tr.selected > td {
  background: var(--obs-selected);
  box-shadow: inset 3px 0 0 var(--obs-accent);
}

html[data-theme="huntress-light"] .summary-pill,
html[data-theme="huntress-light"] .scope-chip {
  border-color: #c8d8d5;
  background: #f0f7f5;
  color: #334155;
}

html[data-theme="huntress-light"] .tab-btn,
html[data-theme="huntress-light"] .defender-policy-tab,
html[data-theme="huntress-light"] .defender-endpoint-modal-tab {
  border-color: #c5d1d6;
  background: #ffffff;
  color: #475569;
  box-shadow: none;
}

html[data-theme="huntress-light"] .tab-btn:hover,
html[data-theme="huntress-light"] .defender-policy-tab:hover,
html[data-theme="huntress-light"] .defender-endpoint-modal-tab:hover {
  background: #edf7f4;
  color: #115b4b;
}

html[data-theme="huntress-light"] .tab-btn.active,
html[data-theme="huntress-light"] .defender-policy-tab.active,
html[data-theme="huntress-light"] .defender-endpoint-modal-tab.active {
  border-color: #8ebeb3;
  background: var(--obs-selected);
  color: #115b4b;
  box-shadow: inset 0 -2px 0 var(--obs-accent);
}

html[data-theme="huntress-light"] details > summary {
  color: var(--obs-text-strong);
}

html[data-theme="huntress-light"] .defender-policy-accordion[open] > summary,
html[data-theme="huntress-light"] .dns-filter-collapsible[open] > summary,
html[data-theme="huntress-light"] details[data-policies-collapsible][open] > summary {
  background: #edf7f4;
  color: #115b4b;
  box-shadow: inset 3px 0 0 var(--obs-accent);
}

html[data-theme="huntress-light"] .pagination-row {
  color: var(--obs-muted);
}

html[data-theme="huntress-light"] .pagination-row select,
html[data-theme="huntress-light"] .audit-pagination select {
  border-color: #b9cbd0;
  background: #ffffff;
}

html[data-theme="huntress-light"] .modal-overlay,
html[data-theme="huntress-light"] .modal {
  background: var(--obs-overlay);
}

html[data-theme="huntress-light"] .modal-card,
html[data-theme="huntress-light"] .vulnerability-detail-modal-content {
  border-color: #b9cbd0;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

html[data-theme="huntress-light"] .status-badge,
html[data-theme="huntress-light"] .platform-health-badge,
html[data-theme="huntress-light"] .scope-badge,
html[data-theme="huntress-light"] .audit-category-badge {
  border-color: var(--obs-border);
}

html[data-theme="huntress-light"] .status-badge.success,
html[data-theme="huntress-light"] .status-badge.ok,
html[data-theme="huntress-light"] .platform-health-badge.ok {
  border-color: var(--obs-success-border);
  background: var(--obs-success-bg);
  color: var(--obs-success-text);
}

html[data-theme="huntress-light"] .status-badge.warning,
html[data-theme="huntress-light"] .status-badge.warn,
html[data-theme="huntress-light"] .platform-health-badge.warn {
  border-color: var(--obs-warn-border);
  background: var(--obs-warn-bg);
  color: var(--obs-warn-text);
}

html[data-theme="huntress-light"] .status-badge.error,
html[data-theme="huntress-light"] .status-badge.danger,
html[data-theme="huntress-light"] .platform-health-badge.bad {
  border-color: var(--obs-danger-border);
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

html[data-theme="huntress-light"] code,
html[data-theme="huntress-light"] pre,
html[data-theme="huntress-light"] .output {
  border-color: #d3dde1;
  background: #f1f5f6;
  color: #263548;
}

html[data-theme="huntress-light"] .remote-shell-console {
  border-color: #b7c6cc;
  background: #172033;
  color: #e5edf2;
}

html[data-theme="huntress-light"] ::-webkit-scrollbar-track {
  background: #edf2f3;
}

html[data-theme="huntress-light"] ::-webkit-scrollbar-thumb {
  border-color: #edf2f3;
  background: #aab9bf;
}

html[data-theme="huntress-light"] ::-webkit-scrollbar-thumb:hover {
  background: #71848b;
}

html[data-theme="huntress-light"] .data-loader__ring {
  border-color: #c8ddd8;
  border-top-color: var(--obs-accent);
  border-right-color: var(--obs-teal);
  box-shadow: 0 0 14px rgba(22, 141, 160, 0.16);
}

html[data-theme="huntress-light"] .stat-skeleton {
  background: linear-gradient(90deg, #e2e9eb 0%, #c9ded9 45%, #e2e9eb 90%);
  background-size: 200% 100%;
}

html[data-theme="huntress-dark"] {
  color-scheme: dark;

  --obs-navy: #202b3b;
  --obs-purple: #65dce7;
  --obs-mauve: #dce5eb;
  --obs-ice: #f5f9fb;
  --obs-teal: #42ccda;

  --obs-void: #202b3b;
  --obs-panel: #35404d;
  --obs-deep: #2d3846;
  --obs-field: #293441;
  --obs-elevated: #3b4658;
  --obs-surface: var(--obs-panel);
  --obs-surface-raised: var(--obs-deep);
  --obs-surface-inset: var(--obs-field);
  --obs-text: #dce5eb;
  --obs-text-strong: #f5f9fb;
  --obs-muted: #aebbc5;
  --obs-accent: #65dce7;
  --obs-accent-hover: #86e8ef;
  --obs-accent-soft: #294d59;
  --obs-border: #596575;
  --obs-line: #505d6d;
  --obs-selected: #314f5c;
  --obs-focus-ring: #4fd4e4;
  --obs-shadow: rgba(8, 15, 24, 0.32);
  --obs-overlay: rgba(8, 15, 24, 0.75);

  --obs-amethyst: var(--obs-accent);
  --obs-amethyst-glow: var(--obs-accent-hover);
  --obs-amethyst-light: #65dce7;
  --obs-amethyst-soft: var(--obs-accent-soft);
  --obs-mist: var(--obs-text);
  --obs-mist-soft: #c5d0d8;
  --obs-mist-bright: var(--obs-text-strong);
  --obs-subtle: var(--obs-muted);
  --obs-subtle-dim: #93a2af;

  --obs-success-bg: #214637;
  --obs-success-text: #8de0b4;
  --obs-success-strong: #3ecf8e;
  --obs-success-border: #477b64;
  --obs-warn-bg: #52431f;
  --obs-warn-text: #ffd66b;
  --obs-warn-strong: #f2ae2e;
  --obs-warn-border: #826d38;
  --obs-severity-high: #ff9a55;
  --obs-danger-bg: #552d35;
  --obs-danger-text: #ffb1b8;
  --obs-danger-strong: #f05b65;
  --obs-danger-solid: #bd3642;
  --obs-danger-border: #89505a;
  --obs-info-bg: #294a5a;
  --obs-info-text: #9de5ef;
  --obs-info-strong: #4cc9dd;
  --obs-disabled-bg: #3c4652;
  --obs-disabled-text: #929eaa;
  --obs-disabled-border: #596575;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) body {
  background: var(--obs-void);
  color: var(--obs-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.32;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .container {
  padding: 0 8px 12px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
  min-height: 35px;
  margin: 0 -8px 8px;
  padding: 0 8px;
  gap: 10px;
  border-top: 2px solid #20aec2;
  border-bottom-width: 1px;
  border-radius: 0;
  background: #3b4658;
  box-shadow: none;
  backdrop-filter: none;
  color: #eef5f7;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-mark {
  width: 23px;
  height: 23px;
  border-radius: 2px;
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-brand-link {
  gap: 5px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-wordmark {
  color: #f5f9fb;
  font-size: 11px;
  letter-spacing: 0.1em;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-tagline,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org-label {
  color: #b9c5ce;
  font-size: 8px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
  gap: 5px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group > summary {
  min-height: 33px;
  box-sizing: border-box;
  padding: 10px 7px 8px;
  border: 0;
  border-radius: 0;
  color: #dce5eb;
  font-size: 10px;
  font-weight: 400;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a:hover,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group > summary:hover {
  background: #465367;
  color: #ffffff;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a.active,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group:has(.nav-group-menu a.active) > summary {
  color: #5ed9e7;
  box-shadow: inset 0 -2px 0 #28b8ca;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #tenant-select,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .theme-toggle-btn,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .session-badge {
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid #657386;
  border-radius: 2px;
  background: #303b4c;
  color: #eef5f7;
  box-shadow: none;
  font-size: 10px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .theme-toggle-btn {
  min-width: 54px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .card,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .subtle-card,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .inset-panel,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .modal-card,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .modal-content,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .page-loading-banner,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group-menu,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) [class*="dropdown"] {
  border: 1px solid var(--obs-border);
  border-radius: 2px;
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .card {
  margin-bottom: 7px;
  padding: 8px;
  background: var(--obs-panel);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .subtle-card,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .inset-panel {
  background: var(--obs-deep);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h1,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h2,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h3,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h4 {
  color: var(--obs-text-strong);
  letter-spacing: 0;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h2 {
  font-size: 15px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h3,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) h4 {
  font-size: 12px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) a {
  color: var(--obs-accent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) input,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) select,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) textarea {
  min-height: 27px;
  padding: 4px 6px;
  border: 1px solid var(--obs-border);
  border-radius: 2px;
  background: var(--obs-field);
  color: var(--obs-text-strong);
  box-shadow: none;
  font-size: 11px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--obs-accent) 78%, var(--obs-border));
  border-radius: 2px;
  background: var(--obs-accent);
  color: #ffffff;
  box-shadow: none;
  font-size: 11px;
}

html[data-theme="huntress-dark"] button {
  color: #13232c;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .btn-secondary,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button.btn-secondary,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button.secondary {
  border-color: var(--obs-border);
  background: var(--obs-deep);
  color: var(--obs-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) table {
  font-size: 11px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) th {
  padding: 6px;
  border-color: var(--obs-border);
  background: var(--obs-elevated);
  color: var(--obs-text-strong);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) td {
  padding: 6px;
  border-color: var(--obs-line);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) tbody tr:nth-child(even) > td {
  background: color-mix(in srgb, var(--obs-deep) 62%, transparent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :where(tbody tr:hover) > td {
  background: var(--obs-accent-soft);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .summary-pill,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .scope-chip,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .status-badge,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .platform-health-badge,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .scope-badge,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .audit-category-badge {
  border-radius: 2px;
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .tab-btn,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .defender-policy-tab,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .defender-endpoint-modal-tab {
  border-radius: 2px 2px 0 0;
  background: var(--obs-deep);
  color: var(--obs-muted);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .tab-btn.active,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .defender-policy-tab.active,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .defender-endpoint-modal-tab.active {
  border-color: var(--obs-accent);
  background: var(--obs-panel);
  color: var(--obs-accent);
  box-shadow: inset 0 -2px 0 var(--obs-accent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) details > summary,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .pagination-row {
  color: var(--obs-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .modal-overlay,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .modal {
  background: var(--obs-overlay);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) code,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) pre,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .output {
  border-color: var(--obs-border);
  border-radius: 2px;
  background: var(--obs-field);
  color: var(--obs-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) ::-webkit-scrollbar-track {
  background: var(--obs-deep);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) ::-webkit-scrollbar-thumb {
  border-color: var(--obs-deep);
  background: var(--obs-muted);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .data-loader__ring {
  border-color: var(--obs-border);
  border-top-color: var(--obs-accent);
  border-right-color: var(--obs-teal);
  box-shadow: none;
}

@media (max-width: 760px) {
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
    min-height: auto;
    padding: 5px 8px;
    flex-wrap: wrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls,
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav {
    flex-wrap: wrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a,
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group > summary {
    min-height: 27px;
    padding: 7px 5px 5px;
  }
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.panel-title-row h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--obs-muted) 45%, transparent);
  background: color-mix(in srgb, var(--obs-border) 35%, transparent);
  color: var(--obs-subtle);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inset-panel-override {
  border-color: color-mix(in srgb, var(--obs-warn-text) 35%, transparent);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--obs-warn-bg) 28%, transparent), color-mix(in srgb, var(--obs-void) 40%, transparent));
}

.inset-panel-override > .panel-title-row h3 {
  color: var(--obs-warn-text);
}

.containment-override-list {
  margin: 0.35rem 0 0.65rem;
  padding-left: 1.15rem;
}

.containment-override-list li {
  margin: 0.2rem 0;
}

/* Keyboard access, disabled states, and motion preferences */
:where(
  a[href],
  button,
  input,
  select,
  textarea,
  summary,
  [role="button"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid var(--obs-focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--obs-focus-ring) 24%, transparent);
}

:where(button, input, select, textarea):disabled,
:where(button, input, select, textarea)[aria-disabled="true"] {
  background-color: var(--obs-disabled-bg) !important;
  border-color: var(--obs-disabled-border) !important;
  color: var(--obs-disabled-text) !important;
  cursor: not-allowed !important;
  opacity: 0.72 !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dual-theme component normalization
 * Keep this block last: the compact dual-theme button rule above intentionally
 * defines primary actions, while these selectors restore specialised roles.
 */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) {
  --component-neutral-bg: var(--obs-deep);
  --component-neutral-hover: var(--obs-accent-soft);
  --component-neutral-text: var(--obs-text);
  --component-panel-bg: var(--obs-panel);
  --component-inset-bg: var(--obs-field);
  --component-header-bg: #303b4c;
  --component-header-border: #657386;
  --component-header-text: #eef5f7;
  --component-header-muted: #c4cfd7;
}

/* Header controls share one compact centerline; the organisation stack remains readable. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
  height: 35px;
  min-height: 35px;
  box-sizing: border-box;
  align-items: center;
  overflow: visible;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
  height: 100%;
  min-width: 0;
  align-items: center;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
  max-width: min(100%, 720px);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org {
  display: grid;
  grid-template-rows: 8px 22px;
  align-content: center;
  gap: 0;
  min-width: 132px;
  max-width: 240px;
  height: 32px;
  margin: 0;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org-label {
  align-self: start;
  overflow: hidden;
  color: var(--component-header-muted);
  font-size: 8px;
  line-height: 8px;
  white-space: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #tenant-select {
  width: 100%;
  min-width: 0;
  max-width: 240px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 1px 22px 1px 6px;
  border-color: var(--component-header-border);
  background: var(--component-header-bg);
  color: var(--component-header-text);
  font-size: 10px;
  line-height: 18px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .theme-toggle-btn,
  .top-header-logout,
  .session-badge
) {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  box-sizing: border-box;
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--component-header-border);
  border-radius: 2px;
  background: var(--component-header-bg);
  color: var(--component-header-text);
  box-shadow: none;
  font-size: 10px;
  line-height: 16px;
  white-space: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .session-badge {
  justify-content: flex-start;
  min-width: 0;
  max-width: 220px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .theme-toggle-btn,
  .top-header-logout,
  .session-badge
):hover {
  border-color: #8291a3;
  background: #465367;
  color: #ffffff;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout:hover {
  border-color: #e18b91;
  background: #5a333b;
  color: #ffe8ea;
}

/* Cards, tables, status panels and tooltips use the same surface family. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .card,
  .dash-module-card,
  .modal-card,
  .vulnerability-detail-modal-content
) {
  border-color: var(--obs-border);
  background: var(--component-panel-bg);
  color: var(--obs-text);
  box-shadow: 0 1px 3px var(--obs-shadow);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .subtle-card,
  .inset-panel,
  .modal-content,
  .page-loading-banner,
  .dns-effective-preview,
  .wu-policy-preview,
  .device-action-menu-status,
  .audit-pagination
) {
  border-color: var(--obs-border);
  background: var(--component-neutral-bg);
  color: var(--obs-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .table-scroll,
  .um-table-scroll,
  .defender-status-table-scroll,
  .defender-alerts-table-scroll,
  .firewall-rules-table-scroll,
  .unified-audit-table-scroll
) {
  border-color: var(--obs-border);
  border-radius: 2px;
  background: var(--component-panel-bg);
}

/* Secondary, status/detail, tab, pagination, close and icon controls are neutral. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.btn-secondary,
  button.secondary,
  button.linkish,
  .policy-status-btn,
  .defender-health-link,
  .defender-endpoint-details-btn,
  .vulnerability-detail-btn,
  .defender-preset-btn,
  .secure-desktop-flag-btn,
  .agent-upgrade-cancel-btn,
  .tab-btn,
  .defender-policy-tab,
  .defender-endpoint-modal-tab,
  .pagination-row button,
  button[id$="-close"],
  button[id$="-close-btn"],
  button[data-wu-close],
  .defender-alert-menu-btn
) {
  border: 1px solid var(--obs-border);
  background: var(--component-neutral-bg);
  color: var(--component-neutral-text);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.btn-secondary,
  button.secondary,
  .policy-status-btn,
  .defender-health-link,
  .defender-endpoint-details-btn,
  .vulnerability-detail-btn,
  .defender-preset-btn,
  .secure-desktop-flag-btn,
  .agent-upgrade-cancel-btn,
  .tab-btn,
  .defender-policy-tab,
  .defender-endpoint-modal-tab,
  .pagination-row button,
  button[id$="-close"],
  button[id$="-close-btn"],
  button[data-wu-close],
  .defender-alert-menu-btn
):hover:not(:disabled) {
  border-color: var(--obs-accent);
  background: var(--component-neutral-hover);
  color: var(--obs-text-strong);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button.linkish {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--obs-accent);
  text-decoration: underline;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button.linkish:hover {
  background: transparent;
  color: var(--obs-accent-hover);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .tab-btn.active,
  .defender-policy-tab.active,
  .defender-endpoint-modal-tab.active
) {
  border-color: var(--obs-accent);
  background: var(--component-panel-bg);
  color: var(--obs-accent);
  box-shadow: inset 0 -2px 0 var(--obs-accent);
}

/* Endpoint policy state is a compact detail control, not a primary action. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .policy-status-btn {
  min-height: 0;
  padding: 3px 5px;
  border-color: var(--obs-border);
  border-radius: 2px;
  background: var(--component-inset-bg);
  color: var(--obs-text);
  line-height: 1.2;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .policy-status-btn:hover {
  border-color: var(--obs-accent);
  background: var(--component-neutral-hover);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .policy-status-btn.applied .policy-status-summary {
  color: var(--obs-success-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .policy-status-btn.failed .policy-status-summary {
  color: var(--obs-danger-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .policy-status-preview {
  color: var(--obs-muted);
}

/* Device and Defender menus use one aligned, neutral action geometry. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu {
  min-width: 232px;
  padding: 4px;
  gap: 3px;
  border-color: var(--obs-border);
  border-radius: 3px;
  background: var(--component-panel-bg);
  box-shadow: 0 8px 20px var(--obs-shadow);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 28px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--obs-border);
  border-radius: 2px;
  background: var(--component-neutral-bg);
  color: var(--component-neutral-text);
  box-shadow: none;
  font: inherit;
  font-size: 11px;
  line-height: 16px;
  text-align: left;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu button:hover:not(:disabled) {
  border-color: var(--obs-accent);
  background: var(--component-neutral-hover);
  color: var(--obs-text-strong);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu-divider {
  height: 1px;
  margin: 4px 2px;
  background: var(--obs-line);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-protection-row {
  gap: 3px;
  margin-bottom: 2px;
  padding: 0 2px 5px;
  border-bottom-color: var(--obs-line);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu :is(
  button.device-action-danger,
  button.device-action-danger:hover:not(:disabled)
) {
  color: var(--obs-danger-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu button.device-action-danger {
  border-color: var(--obs-danger-border);
  background: color-mix(in srgb, var(--obs-danger-bg) 42%, var(--component-neutral-bg));
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu button.device-action-danger:hover:not(:disabled) {
  border-color: var(--obs-danger-strong);
  background: var(--obs-danger-bg);
}

/* Danger actions keep normal control typography and geometry outside menus too. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.device-action-danger,
  button.danger,
  button.danger-btn
) {
  border: 1px solid var(--obs-danger-border);
  background: color-mix(in srgb, var(--obs-danger-bg) 68%, var(--component-neutral-bg));
  color: var(--obs-danger-text);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.device-action-danger,
  button.danger,
  button.danger-btn
):hover:not(:disabled) {
  border-color: var(--obs-danger-strong);
  background: var(--obs-danger-bg);
  color: var(--obs-danger-text);
}

/* Help icons are exact circles; the page-level Help button remains rectangular. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip-btn,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip-btn:hover,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip.is-open .section-tip-btn,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip:focus-within .section-tip-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--obs-border);
  border-radius: 50%;
  background: var(--component-neutral-bg);
  color: var(--obs-accent);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip-btn:hover,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip.is-open .section-tip-btn,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip:focus-within .section-tip-btn {
  border-color: var(--obs-accent);
  background: var(--component-neutral-hover);
  color: var(--obs-text-strong);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .section-tip-panel {
  padding: 8px 9px;
  border: 1px solid var(--obs-border);
  border-radius: 4px;
  background: var(--component-panel-bg);
  color: var(--obs-text);
  box-shadow: 0 8px 20px var(--obs-shadow);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 850px) {
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
    height: auto;
    min-height: 35px;
    overflow: visible;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls,
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
    width: 100%;
    height: auto;
    max-width: none;
    flex-wrap: wrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org {
    flex: 1 1 180px;
    max-width: none;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #tenant-select {
    max-width: none;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .session-badge {
    max-width: min(100%, 280px);
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout {
    flex: 0 0 auto;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .device-action-menu {
    max-width: calc(100vw - 16px);
  }
}

/* Header utility controls — terminal overrides.
 * Keep this block at the absolute end. It deliberately replaces the obsolete
 * stacked organisation caption and joined-prefix treatments above.
 */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  gap: 8px;
  padding: 5px 8px;
  flex-wrap: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-brand {
  flex: 0 1 auto;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav {
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
  flex-wrap: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  height: 26px;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Preserve the native label relationship while removing all visible caption UI. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org-label.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org {
  position: relative;
  display: inline-flex;
  flex: 0 0 clamp(150px, 16vw, 176px);
  width: clamp(150px, 16vw, 176px);
  min-width: 150px;
  max-width: 176px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  margin: 0;
  align-items: center;
  gap: 0;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #tenant-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  margin: 0;
  padding: 2px 22px 2px 6px;
  border: 1px solid var(--component-header-border);
  border-radius: 2px;
  background: var(--component-header-bg);
  color: var(--component-header-text);
  font-size: 10px;
  line-height: 20px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .theme-toggle-btn,
  .top-header-logout,
  .session-badge
) {
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  padding: 4px 7px;
  border-radius: 2px;
  font-size: 10px;
  line-height: 16px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .theme-toggle-btn {
  flex: 0 0 auto;
  min-width: 54px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .session-badge {
  flex: 0 1 clamp(140px, 15vw, 200px);
  width: clamp(140px, 15vw, 200px);
  min-width: 110px;
  max-width: 200px;
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout {
  flex: 0 0 auto;
  min-width: 58px;
  border-color: #8b7c83;
  background: var(--component-header-bg);
  color: #ffffff;
  font-weight: 600;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout:hover:not(:disabled) {
  border-color: #e18b91;
  background: #5a333b;
  color: #ffe8ea;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout:disabled,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-logout[aria-disabled="true"] {
  color: #d9e1e6 !important;
  font-weight: 600;
  opacity: 0.68 !important;
}

@media (min-width: 901px) and (max-width: 1180px) {
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-tagline {
    display: none;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a,
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group > summary {
    padding-right: 5px;
    padding-left: 5px;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls {
    gap: 6px;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
    gap: 7px;
  }
}

@media (max-width: 900px) {
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
    height: auto;
    min-height: 38px;
    align-items: center;
    flex-wrap: wrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-controls {
    flex: 1 0 100%;
    width: 100%;
    height: auto;
    flex-wrap: wrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav {
    flex: 1 0 100%;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-utilities {
    flex: 1 1 100%;
    width: 100%;
    gap: 7px;
    flex-wrap: nowrap;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header-org {
    flex: 1 1 clamp(118px, 30vw, 170px);
    width: clamp(118px, 30vw, 170px);
    min-width: 118px;
    max-width: 170px;
  }

  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .session-badge {
    flex: 1 1 110px;
    width: auto;
    min-width: 72px;
    max-width: 200px;
  }
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn {
  flex: 0 0 auto;
  min-width: 58px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  padding: 4px 7px;
  border: 1px solid #8b7c83;
  border-radius: 2px;
  background: #303b4c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:hover:not(:disabled) {
  border-color: #e18b91;
  background: #5a333b;
  color: #ffe8ea;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:disabled,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn[aria-disabled="true"] {
  color: #d9e1e6 !important;
  font-weight: 600;
  opacity: 0.68 !important;
}

/* Huntress rounded visual system — terminal refinement.
 * Keep this layer at the absolute end, with the direct Logout rules last.
 */
html[data-theme="huntress-light"] {
  --hunt-radius-card: 6px;
  --hunt-radius-control: 6px;
  --hunt-radius-small: 4px;
  --hunt-radius-pill: 999px;
  --hunt-accent: #087383;
  --hunt-accent-hover: #075d6a;
  --hunt-coral: #c83f4b;
  --hunt-coral-hover: #a92f3a;
  --hunt-warning: #b65f00;
  --hunt-category: #7651a8;
  --hunt-shadow-card: 0 2px 8px rgba(15, 23, 42, 0.08);
  --hunt-shadow-float: 0 10px 28px rgba(15, 23, 42, 0.18);

  --obs-void: #f3f5f6;
  --obs-border: #dce2e6;
  --obs-line: #e4e8eb;
  --obs-accent: var(--hunt-accent);
  --obs-accent-hover: var(--hunt-accent-hover);
  --obs-focus-ring: #159aaa;
  --obs-shadow: rgba(15, 23, 42, 0.14);
}

html[data-theme="huntress-dark"] {
  --hunt-radius-card: 6px;
  --hunt-radius-control: 6px;
  --hunt-radius-small: 4px;
  --hunt-radius-pill: 999px;
  --hunt-accent: #20c4cf;
  --hunt-accent-hover: #48d6df;
  --hunt-coral: #f06b74;
  --hunt-coral-hover: #ff8790;
  --hunt-warning: #f2ae2e;
  --hunt-category: #a77bd8;
  --hunt-shadow-card: 0 2px 8px rgba(8, 15, 24, 0.24);
  --hunt-shadow-float: 0 12px 30px rgba(8, 15, 24, 0.42);

  --obs-void: #202b3b;
  --obs-panel: #35404d;
  --obs-elevated: #3b4658;
  --obs-border: #566474;
  --obs-line: #4d5b6a;
  --obs-accent: var(--hunt-accent);
  --obs-accent-hover: var(--hunt-accent-hover);
  --obs-focus-ring: #48d6df;
}

/* Cards, modules, floating panels, and table shells form distinct surfaces. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .card,
  .dash-module-card,
  .inset-panel,
  .subtle-card,
  .modal-card,
  .modal-content,
  .vulnerability-detail-modal-content,
  .page-loading-banner,
  .nav-group-menu,
  .device-action-menu,
  .column-picker,
  .section-tip-panel,
  [class*="tooltip"],
  [class*="dropdown"],
  .dns-effective-preview,
  .wu-policy-preview,
  .device-action-menu-status,
  .audit-pagination,
  .vulnerability-update-progress,
  .device-reboot-banner-progress,
  .platform-restore-progress-track,
  .dash-modules-loading,
  [class$="-status-panel"],
  [class$="-progress-panel"]
) {
  border-radius: var(--hunt-radius-card);
  box-shadow: var(--hunt-shadow-card);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .nav-group-menu,
  .device-action-menu,
  .column-picker,
  .section-tip-panel,
  [class*="tooltip"],
  [class*="dropdown"],
  .modal-card,
  .vulnerability-detail-modal-content
) {
  box-shadow: var(--hunt-shadow-float);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .table-scroll,
  .um-table-scroll,
  .defender-status-table-scroll,
  .defender-alerts-table-scroll,
  .firewall-rules-table-scroll,
  .unified-audit-table-scroll
) {
  overflow: auto;
  border: 1px solid var(--obs-border);
  border-radius: var(--hunt-radius-card);
  background: var(--component-panel-bg);
  box-shadow: var(--hunt-shadow-card);
}

/* The viewport header stays flush; only controls inside it are rounded. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
  border-radius: 0;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button,
  input,
  select,
  textarea,
  .theme-toggle-btn,
  .session-badge,
  .policy-status-btn,
  .device-action-menu button,
  .pagination-row button,
  .pagination-row select,
  .audit-pagination select,
  .column-picker button
) {
  border-radius: var(--hunt-radius-control);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button {
  border-color: color-mix(in srgb, var(--hunt-accent) 78%, var(--obs-border));
  background: var(--hunt-accent);
  box-shadow: 0 1px 3px var(--obs-shadow);
}

html[data-theme="huntress-light"] button {
  color: #ffffff;
}

html[data-theme="huntress-dark"] button {
  color: #10252b;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) button:hover:not(:disabled) {
  border-color: var(--hunt-accent-hover);
  background: var(--hunt-accent-hover);
}

/* Detail, menu, pagination, and secondary actions remain neutral. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.btn-secondary,
  button.secondary,
  button.linkish,
  .theme-toggle-btn,
  .policy-status-btn,
  .device-action-menu button,
  .defender-health-link,
  .defender-endpoint-details-btn,
  .vulnerability-detail-btn,
  .defender-preset-btn,
  .secure-desktop-flag-btn,
  .agent-upgrade-cancel-btn,
  .tab-btn,
  .defender-policy-tab,
  .defender-endpoint-modal-tab,
  .pagination-row button,
  button[id$="-close"],
  button[id$="-close-btn"],
  button[data-wu-close],
  .defender-alert-menu-btn
) {
  border-color: var(--obs-border);
  background: var(--component-neutral-bg);
  color: var(--component-neutral-text);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  button.btn-secondary,
  button.secondary,
  .theme-toggle-btn,
  .policy-status-btn,
  .device-action-menu button,
  .defender-health-link,
  .defender-endpoint-details-btn,
  .vulnerability-detail-btn,
  .defender-preset-btn,
  .secure-desktop-flag-btn,
  .agent-upgrade-cancel-btn,
  .tab-btn,
  .defender-policy-tab,
  .defender-endpoint-modal-tab,
  .pagination-row button,
  button[id$="-close"],
  button[id$="-close-btn"],
  button[data-wu-close],
  .defender-alert-menu-btn
):hover:not(:disabled) {
  border-color: var(--hunt-accent);
  background: var(--component-neutral-hover);
  color: var(--obs-text-strong);
}

/* The page Help action is coral; contextual question-mark controls are not. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #page-help-btn {
  min-height: 27px;
  padding: 4px 10px;
  border-color: var(--hunt-coral);
  border-radius: var(--hunt-radius-control);
  background: var(--hunt-coral);
  color: #ffffff;
  box-shadow: 0 1px 3px var(--obs-shadow);
  font-weight: 650;
}

html[data-theme="huntress-dark"] #page-help-btn {
  color: #241316;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #page-help-btn:hover:not(:disabled) {
  border-color: var(--hunt-coral-hover);
  background: var(--hunt-coral-hover);
  color: #ffffff;
}

html[data-theme="huntress-dark"] #page-help-btn:hover:not(:disabled) {
  color: #241316;
}

/* Compact labels use pills while category color remains semantically distinct. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .summary-pill,
  .scope-chip,
  .status-badge,
  .platform-health-badge,
  .scope-badge,
  .audit-category-badge,
  .ingestion-status-badge,
  .dns-status-badge,
  .dns-block-event-status-badge,
  .nav-pending-badge,
  .wu-priority-badge,
  .wu-state-badge,
  .update-pending-badge,
  .session-badge,
  .dash-module-link
) {
  border-radius: var(--hunt-radius-pill);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .audit-category-badge {
  border-color: color-mix(in srgb, var(--hunt-category) 58%, var(--obs-border));
  background: color-mix(in srgb, var(--hunt-category) 18%, var(--component-panel-bg));
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .tab-btn,
  .defender-policy-tab,
  .defender-endpoint-modal-tab
) {
  border-radius: var(--hunt-radius-control) var(--hunt-radius-control) 0 0;
}

/* Adjacent controls keep rounded outer corners and clean shared edges. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .pagination-row,
  .audit-pagination,
  .column-picker
) :is(button, select):not(:first-child) {
  border-top-left-radius: var(--hunt-radius-small);
  border-bottom-left-radius: var(--hunt-radius-small);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .pagination-row,
  .audit-pagination,
  .column-picker
) :is(button, select):not(:last-child) {
  border-top-right-radius: var(--hunt-radius-small);
  border-bottom-right-radius: var(--hunt-radius-small);
}

/* Circle exceptions must follow every generic rounded-control rule. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .section-tip-btn,
  .section-tip-btn:hover,
  .section-tip.is-open .section-tip-btn,
  .section-tip:focus-within .section-tip-btn
) {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  padding: 0;
  border-radius: 50%;
  background: var(--component-neutral-bg);
  color: var(--hunt-accent);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .data-loader__ring,
  .dash-donut,
  .dash-donut-hole,
  .donut,
  .donut-chart,
  [class*="donut-chart"]
) {
  border-radius: 50%;
}

/* Direct ID rules remain terminal so Logout cannot inherit primary colors. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn {
  flex: 0 0 auto;
  min-width: 58px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  padding: 4px 7px;
  border: 1px solid #8b7c83;
  border-radius: var(--hunt-radius-control);
  background: #303b4c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:hover:not(:disabled) {
  border-color: #e18b91;
  background: #5a333b;
  color: #ffe8ea;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:disabled,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn[aria-disabled="true"] {
  color: #d9e1e6 !important;
  font-weight: 600;
  opacity: 0.68 !important;
}

/* Site-wide expanded content sections — terminal overrides.
 * Content details are explicit so header navigation dropdowns remain unchanged.
 */
html[data-theme="huntress-light"] {
  --hunt-open-section-bg: #e4f2f3;
  --hunt-open-section-border: #8ebec2;
  --hunt-open-section-text: #174f59;
}

html[data-theme="huntress-dark"] {
  --hunt-open-section-bg: #314f5c;
  --hunt-open-section-border: #56818a;
  --hunt-open-section-text: #e9f8fa;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] {
  border: 1px solid var(--hunt-open-section-border);
  border-radius: var(--hunt-radius-card);
  background: var(--hunt-open-section-bg);
  color: var(--hunt-open-section-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--hunt-open-section-border);
  border-radius: var(--hunt-radius-card) var(--hunt-radius-card) 0 0;
  background: var(--hunt-open-section-bg);
  color: var(--hunt-open-section-text);
  box-shadow: inset 3px 0 0 var(--hunt-accent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > summary:is(:hover, :focus) {
  background: var(--hunt-open-section-bg);
  color: var(--hunt-open-section-text);
  box-shadow:
    inset 3px 0 0 var(--hunt-accent),
    inset 0 0 0 1px color-mix(in srgb, var(--hunt-accent) 48%, transparent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible[open] > .dns-collapsible-body,
  .defender-policy-accordion[open] > :not(summary),
  .wu-legacy-settings[open] > :not(summary),
  .unified-audit-health-card[open] > :not(summary),
  .platform-health-raw[open] > :not(summary)
) {
  background: transparent;
}

/* Expanded content panels — filled interior groundwork.
 * Keep this terminal and scoped to content accordions; navigation and modals are excluded.
 */
html[data-theme="huntress-light"] {
  --hunt-open-table-head-bg: color-mix(in srgb, var(--hunt-open-section-bg) 88%, #4f8198);
  --hunt-open-table-even-bg: color-mix(in srgb, var(--hunt-open-section-bg) 94%, #6d98aa);
  --hunt-open-table-hover-bg: color-mix(in srgb, var(--hunt-open-section-bg) 84%, var(--hunt-accent));
  --hunt-open-section-separator: color-mix(in srgb, var(--hunt-open-section-text) 16%, transparent);
}

html[data-theme="huntress-dark"] {
  --hunt-open-table-head-bg: color-mix(in srgb, var(--hunt-open-section-bg) 84%, #203d50);
  --hunt-open-table-even-bg: color-mix(in srgb, var(--hunt-open-section-bg) 92%, #29495d);
  --hunt-open-table-hover-bg: color-mix(in srgb, var(--hunt-open-section-bg) 82%, var(--hunt-accent));
  --hunt-open-section-separator: color-mix(in srgb, var(--hunt-open-section-text) 14%, transparent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > :not(summary) {
  background: var(--hunt-open-section-bg);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] :is(
  .dns-collapsible-body,
  .inset-panel,
  .inset-panel-override,
  .containment-builder,
  .containment-builder .inset-panel,
  .table-scroll,
  .um-table-scroll,
  .defender-status-table-scroll,
  .defender-alerts-table-scroll,
  .firewall-rules-table-scroll,
  .unified-audit-table-scroll,
  .column-picker,
  .pagination-row,
  .audit-pagination,
  .subtle-card,
  .dns-effective-preview,
  .wu-policy-preview,
  .device-action-menu-status,
  [class$="-status-panel"],
  [class$="-progress-panel"]
) {
  border-color: transparent;
  background: var(--hunt-open-section-bg);
  background-image: none;
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] .dns-collapsible-body {
  border-top-color: transparent;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] :is(
  .table-scroll,
  .um-table-scroll,
  .defender-status-table-scroll,
  .defender-alerts-table-scroll,
  .firewall-rules-table-scroll,
  .unified-audit-table-scroll
) {
  border: 1px solid var(--hunt-open-section-separator);
  border-radius: 6px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] table {
  background: transparent;
  color: var(--hunt-open-section-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] table thead th {
  border-color: var(--hunt-open-section-separator);
  background: var(--hunt-open-table-head-bg);
  color: var(--hunt-open-section-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] table tbody tr > td {
  border-color: var(--hunt-open-section-separator);
  background: transparent;
  color: var(--hunt-open-section-text);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] table tbody tr:nth-child(even) > td {
  background: var(--hunt-open-table-even-bg);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] table tbody tr:hover > td {
  background: var(--hunt-open-table-hover-bg);
}

/* Form controls, actions, badges, and code are intentionally absent above. */

/* Direct ID rules remain final so Logout cannot inherit primary colors. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn {
  flex: 0 0 auto;
  min-width: 58px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  box-sizing: border-box;
  padding: 4px 7px;
  border: 1px solid #8b7c83;
  border-radius: var(--hunt-radius-control);
  background: #303b4c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:hover:not(:disabled) {
  border-color: #e18b91;
  background: #5a333b;
  color: #ffe8ea;
  opacity: 1;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn:disabled,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) #logout-btn[aria-disabled="true"] {
  color: #d9e1e6 !important;
  font-weight: 600;
  opacity: 0.68 !important;
}

/* Expanded content panels — final seamless-surface correction.
 * Content selectors stay explicit so header navigation groups are unaffected.
 */
html[data-theme="huntress-light"] {
  --hunt-open-section-bg: #dcecf3;
  --hunt-open-section-border: transparent;
  --hunt-open-section-text: #173f52;
}

html[data-theme="huntress-dark"] {
  --hunt-open-section-bg: #405d70;
  --hunt-open-section-border: transparent;
  --hunt-open-section-text: #f2f7fa;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] {
  border-color: transparent;
  border-radius: 6px;
  background: var(--hunt-open-section-bg);
  color: var(--hunt-open-section-text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--obs-shadow) 24%, transparent);
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > summary {
  margin-bottom: 0;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--hunt-open-section-bg);
  color: var(--hunt-open-section-text);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > summary:is(:hover, :focus) {
  background: color-mix(in srgb, var(--hunt-open-section-bg) 96%, white);
  color: var(--hunt-open-section-text);
  box-shadow: none;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] > summary:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--hunt-open-section-text) 28%, transparent);
  outline-offset: -2px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible[open] > .dns-collapsible-body,
  .defender-policy-accordion[open] > :not(summary),
  .wu-legacy-settings[open] > :not(summary),
  .unified-audit-health-card[open] > :not(summary),
  .platform-health-raw[open] > :not(summary)
) {
  background: transparent;
}

/* Expanded content panels — filled interior surfaces.
 * This terminal rule completes the continuous surface after the seamless correction.
 */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible[open] > .dns-collapsible-body,
  .defender-policy-accordion[open] > :not(summary),
  .wu-legacy-settings[open] > :not(summary),
  .unified-audit-health-card[open] > :not(summary),
  .platform-health-raw[open] > :not(summary)
) {
  background: var(--hunt-open-section-bg);
}

/* Taller borderless header — absolute terminal override.
 * Keep this block last so both Huntress themes use the same centered header shell.
 */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
  height: 46px;
  min-height: 46px;
  padding: 6px 8px;
  border-top: 0;
  align-items: center;
  flex-wrap: nowrap;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav {
  height: 33px;
  align-items: stretch;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .main-nav > a,
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .nav-group > summary {
  display: inline-flex;
  min-height: 33px;
  padding: 0 7px;
  align-items: center;
}

@media (max-width: 900px) {
  :is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .top-header {
    height: auto;
    min-height: 46px;
    border-top: 0;
    align-items: center;
    flex-wrap: wrap;
  }
}

/* Inline code and page-size controls — absolute terminal cleanup.
 * Keep this last so broad theme surfaces and responsive form rules cannot win.
 */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) code:not(pre code) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) :is(
  .dns-filter-collapsible,
  .defender-policy-accordion,
  .wu-legacy-settings,
  .unified-audit-health-card,
  .platform-health-raw
)[open] code:not(pre code) {
  background: transparent;
  color: inherit;
}

/* This code element is intentionally a multiline technical block. */
:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .vulnerability-job-detail code {
  display: block;
  max-width: 28rem;
  margin-top: 0.35rem;
  padding: 0.5rem;
  border: 1px solid var(--obs-border);
  border-radius: 2px;
  background: var(--obs-field);
  color: var(--obs-subtle);
  box-shadow: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) select[id$="-page-size"] {
  flex: 0 0 78px;
  width: 78px;
  min-width: 72px;
  max-width: 82px;
  height: 27px;
  min-height: 27px;
  max-height: 27px;
  margin: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  box-sizing: border-box;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) label[for$="-page-size"] {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  line-height: 27px;
}

:is(html[data-theme="huntress-light"], html[data-theme="huntress-dark"]) .row:has(> label[for$="-page-size"]) {
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
