/* Shared visual system. Operational component geometry follows below. */
:root {
  --cc-accent: #147d73;
  --cc-accent-hover: #10685f;
  --cc-accent-soft: #eaf5f1;
  --cc-accent-ring: #b8ded4;
  --cc-page: #fff;
  --cc-surface: #fff;
  --cc-surface-subtle: #fafbfc;
  --cc-sidebar: #f7f8fa;
  --cc-sidebar-deep: #f7f8fa;
  --cc-sidebar-text: #39434e;
  --cc-sidebar-muted: #7b8490;
  --cc-text: #202832;
  --cc-text-soft: #535e6b;
  --cc-muted: #78828f;
  --cc-border: #e7eaee;
  --cc-border-strong: #d1d7de;
  --cc-success: #167c5a;
  --cc-warning: #946b21;
  --cc-danger: #bf4650;
  --cc-radius-sm: 5px;
  --cc-radius: 8px;
  --cc-radius-lg: 10px;
  --cc-shadow-sm: none;
  --cc-shadow-md: 0 8px 24px #20283212;
  --accent: var(--cc-accent);
  --accent-strong: var(--cc-accent-hover);
  --accent-soft: var(--cc-accent-soft);
  --page: var(--cc-page);
  --panel: var(--cc-surface);
  --text: var(--cc-text);
  --muted: var(--cc-muted);
  --border: var(--cc-border);
  --border-dark: var(--cc-border-strong);
  --success: var(--cc-success);
  --warning: var(--cc-warning);
  --danger: var(--cc-danger);
  --ink: var(--cc-text);
  --warn: var(--cc-warning);
  --bg: var(--cc-surface);
  --fg: var(--cc-text);
  --shadow: var(--cc-shadow-md);
  --gl-color-bg-surface1: var(--cc-surface);
  --gl-color-bg-sidebar2: var(--cc-sidebar);
  --gl-color-bg-page1: var(--cc-surface-subtle);
  --gl-color-brand-primary: var(--cc-accent);
  --gl-color-brand-background: var(--cc-accent-soft);
  --gl-color-text-level1: var(--cc-text);
  --gl-color-text-level2: var(--cc-text-soft);
  --gl-color-text-level3: var(--cc-muted);
  --gl-color-line-divider-primary: var(--cc-border);
}
html { min-width: 320px; background: var(--cc-page); scrollbar-color: #c7cdd4 transparent; }
body { min-width: 320px; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; line-height: 1.5; color: var(--cc-text); background: var(--cc-page); -webkit-font-smoothing: antialiased; }
::selection { background: #cfe8df; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.6px; color: var(--cc-text); }
.view :is(h1,h2)[tabindex="-1"]:focus { outline: none; }
h2 { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--cc-text); }
h3 { font-size: 14px; font-weight: 600; color: var(--cc-text); }
small, .muted, .panel-note { color: var(--cc-muted); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cc-accent); }
.app-shell { --cc-sidebar-width: 208px; display: grid; min-width: 0; grid-template-columns: var(--cc-sidebar-width) minmax(0, 1fr); min-height: 100dvh; background: var(--cc-page); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; width: auto; min-width: 0; height: 100dvh; padding: 0; border-right: 1px solid var(--cc-border); background: var(--cc-sidebar); color: var(--cc-sidebar-text); }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 72px; padding: 18px 16px; border-bottom: 0; }
.sidebar .brand { display: flex; align-items: center; min-height: 0; gap: 9px; padding: 0; border: 0; color: var(--cc-text); }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: var(--cc-accent); color: #fff; font-size: 10px; font-weight: 700; }
.brand-copy { min-width: 0; display: grid; gap: 0; }
.brand-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -.3px; }
.brand-copy small { font-size: 10px; color: var(--cc-muted); }
.sidebar-rail-toggle, .edge-console-rail-toggle { display: grid; place-items: center; width: 20px; height: 28px; padding: 0; border: 0; background: transparent; color: var(--cc-muted); cursor: pointer; }
.sidebar-rail-toggle svg, .edge-console-rail-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav { display: grid; align-content: start; gap: 3px; padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-section-label { margin: 0 12px 8px; color: #98a0aa; font-size: 10px; font-weight: 550; letter-spacing: .5px; text-transform: uppercase; }
.nav a, .nav summary { display: flex; align-items: center; gap: 10px; min-height: 36px; width: auto; margin: 0; padding: 8px 12px; border: 0; border-radius: 5px; color: var(--cc-sidebar-text); background: transparent; font-size: 12px; font-weight: 450; cursor: pointer; box-shadow: none; }
.nav a:hover, .nav summary:hover { background: #eceff2; color: var(--cc-text); }
.nav a.active { color: var(--cc-accent-hover); background: #e6f0eb; box-shadow: none; font-weight: 600; }
.nav-icon { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .8; }
.nav details { padding: 0; margin: 14px 0 0; border: 0; background: transparent; }
.nav summary { list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: "›"; margin-left: auto; color: var(--cc-muted); transform: rotate(90deg); }
.nav details[open] > summary::after { transform: rotate(-90deg); }
.nav-tree-panel { overflow: hidden; }
.nav-tree-panel-inner { display: grid; gap: 2px; padding: 4px 0 4px 18px; }
.nav-tree-panel-inner a { min-height: 32px; font-size: 11px; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--cc-border); }
.sidebar-status { display: flex; align-items: center; gap: 7px; color: var(--cc-muted); font-size: 11px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: none; background: var(--cc-success); }
.sidebar .sidebar-logout { border: 0; padding: 4px; min-height: 0; color: var(--cc-muted); background: transparent; font-size: 11px; }
.app-shell.sidebar-collapsed { --cc-sidebar-width: 64px; }
.app-shell.sidebar-collapsed .sidebar { width: 64px !important; min-width: 64px !important; max-width: 64px !important; }
.app-shell.sidebar-collapsed :is(.brand-copy,.nav-label,.nav-section-label,.sidebar-status #service-state,.sidebar-logout-label) { display: none !important; }
.app-shell.sidebar-collapsed .sidebar-brand-row { padding: 18px 5px; gap: 0; }
.app-shell.sidebar-collapsed .nav { padding: 12px 8px; }
.app-shell.sidebar-collapsed .nav :is(a,summary) { justify-content: center; padding: 8px; }
.app-shell.sidebar-collapsed .nav summary::after { display: none; }
.app-shell.sidebar-collapsed .nav-tree-panel-inner { padding: 0; }
.app-shell.sidebar-collapsed .sidebar-footer { justify-content: center; padding: 16px 4px; }
.workspace { min-width: 0; background: var(--cc-page); }
.workspace-topbar { display: flex; align-items: center; gap: 20px; height: 54px; padding: 0 32px; background: var(--cc-surface); border-bottom: 1px solid var(--cc-border); box-shadow: none; }
.workspace-location { color: var(--cc-muted); font-size: 12px; white-space: nowrap; }
.topbar-search { position: relative; margin-left: auto; width: 250px; max-width: 44%; height: 30px; padding: 0; border: 0; background: transparent; }
.topbar-search > span { position: absolute; left: 10px; top: 8px; width: 11px; height: 11px; z-index: 1; }
.topbar-search:focus-within { box-shadow: none; }
.topbar-search input { width: 100%; height: 30px; min-height: 30px; border: 1px solid var(--cc-border); border-radius: 5px; background: #fafbfc; font-size: 11px; font-weight: 400; padding-left: 30px; }
.topbar-stats { display: none; }
.notification-button { display: grid; place-items: center; width: 28px; height: 30px; border: 0; box-shadow: none; color: var(--cc-muted); background: transparent; }
.notification-button b { top: -1px; right: -5px; padding: 0 3px; min-width: 12px; font-size: 8px; background: var(--cc-danger); }
.view { min-width: 0; max-width: 1440px; margin: 0 auto; padding: 32px; container-type: inline-size; }
.page-head, .devices-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 28px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.page-head-main { min-width: 0; }
.page-head-title-row, .devices-header-left { display: grid; gap: 5px; align-items: start; }
.page-head-meta, .devices-header-count { font-size: 12px; color: var(--cc-muted); font-weight: 400; }
.page-head-copy { max-width: 640px; color: var(--cc-text-soft); font-size: 12px; margin-top: 8px; }
.devices-header-actions, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 12px; border: 1px solid var(--cc-border-strong); border-radius: 5px; font-size: 12px; line-height: 1.4; font-weight: 500; color: var(--cc-text-soft); background: #fff; box-shadow: none; cursor: pointer; }
.button:hover { background: #f5f7f8; border-color: #b8c1ca; color: var(--cc-text); }
.button.primary { color: #fff; background: var(--cc-accent); border-color: var(--cc-accent); }
.button.primary:hover { background: var(--cc-accent-hover); border-color: var(--cc-accent-hover); }
.button.danger { background: #fff; color: var(--cc-danger); border-color: #edd1d4; }
.button:disabled, button[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
.button svg { width: 14px; height: 14px; margin: 0; }
.compact-button { min-height: 27px; padding: 4px 9px; font-size: 11px; }
input,select,textarea { border: 1px solid var(--cc-border-strong); border-radius: 5px; background-color: #fff; color: var(--cc-text); font-size: 12px; font-weight: 400; min-height: 32px; }
input::placeholder, textarea::placeholder { color: #98a1ac; font-weight: 400; }
input:focus,select:focus,textarea:focus { border-color: var(--cc-accent); }
input[type="checkbox"],input[type="radio"] { width: 14px; height: 14px; min-height: 14px; accent-color: var(--cc-accent); }
label,legend { font-size: 12px; font-weight: 500; color: var(--cc-text-soft); }
.stack-form { display: grid; gap: 16px; }
.stack-form > label { display: grid; gap: 6px; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; }
.panel-note, .helper-text { font-size: 12px; line-height: 1.5; }
.console-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 20px; }
.console-grid > .span-12 { grid-column: span 12; }
.console-grid > .span-8 { grid-column: span 8; }
.console-grid > .span-6 { grid-column: span 6; }
.console-grid > .span-4 { grid-column: span 4; }
.console-panel { padding: 20px; min-width: 0; border: 1px solid var(--cc-border); border-radius: 8px; background: var(--cc-surface); box-shadow: none; }
.console-panel.table-panel { padding: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.table-panel > .panel-title { margin: 0; padding: 16px 18px; }
.panel-title > :is(span,a) { font-size: 11px; color: var(--cc-muted); font-weight: 400; }
.panel-title a:hover { color: var(--cc-accent); }
.table-wrap { overflow-x: auto; min-width: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { background: #fafbfc; color: var(--cc-muted); font-size: 10px; font-weight: 500; letter-spacing: .2px; text-transform: none; text-align: left; }
th,td { padding: 11px 14px; border-bottom: 1px solid var(--cc-border); }
td { font-weight: 400; color: var(--cc-text-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td strong,.table-link { color: var(--cc-text); font-weight: 550; }
td small { display: block; margin-top: 3px; color: var(--cc-muted); font-size: 10px; }
code { background: #f5f7f8; border: 0; border-radius: 3px; color: var(--cc-text-soft); font-size: 11px; font-weight: 400; }
pre { max-width: 100%; overflow: auto; font-size: 11px; }
.table-footer, .progressive-table-footer, .edge-list-footer { padding: 10px 16px; border-top: 1px solid var(--cc-border); color: var(--cc-muted); background: #fafbfc; font-size: 11px; }
.empty-cell,.empty { padding: 28px 20px; color: var(--cc-muted); font-size: 12px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 0; border: 0; background: transparent; font-size: 11px; font-weight: 500; }
.badge :is(b,strong) { font-weight: 500; }
.badge.good,.badge.success,.badge.online { color: var(--cc-success); }
.badge.warn,.badge.warning,.badge.degraded { color: var(--cc-warning); }
.badge.bad,.badge.error,.badge.failed,.badge.critical { color: var(--cc-danger); }
.badge.offline,.badge.info,.badge.queued { color: var(--cc-muted); }
.summary-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--cc-border); gap: 24px; margin: 0 0 24px; }
.summary-cell { padding: 8px 0 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.summary-cell > span { font-size: 11px; font-weight: 400; color: var(--cc-muted); letter-spacing: 0; text-transform: none; }
.summary-cell > strong { display: block; margin: 5px 0; font-size: 26px; font-weight: 550; color: var(--cc-text); }
.summary-cell > small { display: block; font-size: 11px; font-weight: 400; }
.overview-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--cc-border); margin-bottom: 28px; }
.overview-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,1fr); align-items: start; gap: 28px; }
.overview-device-table td { padding: 18px; }
.overview-section-divider { border-top: 1px solid var(--cc-border); }
.overview-edge-list { padding: 0 18px 8px; }
.overview-edge-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.overview-edge-row strong { font-size: 12px; font-weight: 550; }
.overview-edge-row small { display: block; margin-top: 3px; font-size: 10px; color: var(--cc-muted); }
.overview-alert-row { display: flex; align-items: start; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--cc-border); }
.overview-alert-row:first-child { padding-top: 0; }
.overview-alert-row:last-child { border-bottom: 0; padding-bottom: 0; }
.overview-alert-row strong { display: block; font-size: 12px; line-height: 1.5; font-weight: 450; }
.overview-alert-row small { display: block; margin-top: 4px; font-size: 10px; color: var(--cc-muted); }
.overview-alert-dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--cc-warning); margin-top: 6px; }
.fleet-filter-disclosure { margin: -4px 0 16px; }
.fleet-filter-disclosure > summary { width: fit-content; cursor: pointer; font-size: 12px; color: var(--cc-muted); padding: 5px 0; }
.fleet-filter-disclosure .survey-filter-rail { margin-top: 12px; background: #fafbfc; box-shadow: none; }
.compose-disclosure { padding: 0; }
.compose-disclosure > summary, .notification-rules-disclosure > summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--cc-text-soft); }
.compose-disclosure > summary::after { content: "+"; color: var(--cc-muted); font-size: 16px; }
.compose-disclosure[open] > summary::after { content: "−"; }
.compose-disclosure > p { margin: 16px; font-size: 12px; }
.compose-disclosure > form { max-width: 680px; margin: 4px 18px 20px; }
.compose-disclosure[open] > summary { border-bottom: 1px solid var(--cc-border); margin-bottom: 16px; }
.device-path-disclosure { margin-top: 10px; border: 1px solid var(--cc-border); border-radius: 6px; background: var(--cc-surface); }
.device-path-disclosure > summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; font-size: 12px; font-weight: 500; color: var(--cc-text-soft); cursor: pointer; }
.device-path-disclosure > summary span { color: var(--cc-muted); font-size: 11px; font-weight: 400; }
.device-path-disclosure > summary::after { content: "⌄"; margin-left: 12px; color: var(--cc-muted); }
.device-path-disclosure[open] > summary { border-bottom: 1px solid var(--cc-border); }
.search-box { width: 220px; }
.search-box input { width: 100%; min-height: 32px; height: 32px; font-size: 11px; background: #fafbfc; }
.row-action-trigger { min-height: 26px; padding: 3px 8px; border: 1px solid var(--cc-border); background: #fff; color: var(--cc-text-soft); font-size: 11px; font-weight: 500; }
.login-panel { min-height: 100dvh; display: grid; place-items: center; background: #f7f8fa; }
.login-card { width: min(390px,calc(100vw - 40px)); padding: 30px; border: 1px solid var(--cc-border); border-radius: 10px; background: #fff; box-shadow: none; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand h1 { font-size: 21px; }
.login-brand small { font-size: 11px; }
.inline-form { gap: 8px; }
.login-card > label { display: block; margin-bottom: 8px; }
.sidebar-scrim { display: none; }
.mobile-nav-toggle { display: none; }

/* Forms and secondary navigation */

.stack-form {
  gap: 13px;
}

.stack-form label,
.stack-form .check-group,
.filter-panel label {
  gap: 6px;
  color: var(--cc-text-soft);
  font-size: 11.5px;
  font-weight: 620;
}

.network-test-advanced {
  overflow: clip;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: var(--cc-surface-subtle);
}

.network-test-advanced > summary {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 9px 40px 9px 12px;
  color: var(--cc-text-soft);
}

.network-test-advanced > summary::-webkit-details-marker {
  display: none;
}

.network-test-advanced > summary::after {
  position: absolute;
  right: 15px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-right: 1.5px solid var(--cc-muted);
  border-bottom: 1.5px solid var(--cc-muted);
  content: "";
  transition: transform 150ms ease;
}

.network-test-advanced[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.network-test-advanced > summary:hover,
.network-test-advanced > summary:focus-visible {
  background: #f1f7f7;
  color: var(--cc-text);
}

.network-test-advanced > summary span {
  display: grid;
  gap: 2px;
}

.network-test-advanced > summary strong {
  font-size: 12px;
  font-weight: 680;
}

.network-test-advanced > summary small {
  color: var(--cc-muted);
  font-size: 10.5px;
  font-weight: 500;
}

.network-test-advanced-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--cc-border);
  background: #fff;
  padding: 13px;
}

.network-test-advanced-body textarea {
  min-height: 112px;
  font-size: 11px;
}

.check-list {
  gap: 5px;
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-sm);
  background: var(--cc-surface-subtle);
  padding: 9px;
}

.check-row {
  color: var(--cc-text) !important;
  font-weight: 520 !important;
}

.selection-bar,
.filter-panel {
  border-color: var(--cc-border);
  border-radius: var(--cc-radius);
  background: #fff;
}

.log-layout {
  gap: 12px;
}

.log-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -8px 0 2px;
}

.log-nav a {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--cc-muted);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 620;
  text-decoration: none;
}

.log-nav a:hover {
  background: var(--cc-surface-subtle);
  color: var(--cc-text);
}

.log-nav a.active {
  border-color: #a9d7d9;
  background: var(--cc-accent-soft);
  color: var(--cc-accent-hover);
}

/* Dialogs and transient feedback */

.login-panel {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 12%, rgba(42, 176, 183, 0.2), transparent 30%),
    linear-gradient(145deg, #0d2229 0%, #15343c 52%, #0b1c22 100%);
}

.login-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
}

.login-card {
  width: min(440px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--cc-radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  padding: 28px;
}

.login-card .login-brand {
  border-bottom: 1px solid var(--cc-border);
  margin-bottom: 20px;
  padding: 0 0 20px;
}

.login-card .brand-mark {
  border: 0;
  border-radius: 9px;
  background: var(--cc-sidebar);
  color: #74ddd9;
}

.login-brand h1 {
  color: var(--cc-text);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.login-card label {
  color: var(--cc-text-soft);
  font-size: 12px;
}

.modal-backdrop,
.device-sheet-backdrop {
  background: rgba(6, 20, 25, 0.58);
  backdrop-filter: blur(4px);
}

body.device-sheet-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.modal-card,
.device-sheet {
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-lg);
  box-shadow: 0 24px 70px rgba(6, 20, 25, 0.24);
}

.toast {
  border-color: var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow-md);
  color: var(--cc-text);
}

/* Device workspace: retain the left-tree ownership model. */

.device-detail-support {
  display: contents;
}

.device-overview-data-details {
  grid-column: 1 / -1;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
}

.device-overview-data-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  color: var(--cc-text-soft);
  cursor: pointer;
  list-style: none;
}

.device-overview-data-details > summary::-webkit-details-marker {
  display: none;
}

.device-overview-data-details > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.device-overview-data-details > summary svg {
  width: 15px;
  height: 15px;
}

.device-overview-data-details > summary small {
  color: var(--cc-muted);
  font-size: 11px;
}

.device-overview-data-details[open] > summary {
  border-bottom: 1px solid var(--cc-border);
}

.device-overview-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

[data-device-live-fragment].device-dimmed #network,
[data-device-live-fragment].device-dimmed #tools,
[data-device-live-fragment].device-dimmed #clients,
[data-device-live-fragment].device-dimmed .connection-trace-banner,
[data-device-live-fragment].device-dimmed .cyber-info-grid {
  opacity: 1;
  filter: none;
}

.device-workspace-shell {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

/*
 * Device focus rail — same visual language as the main app sidebar.
 * On device pages the primary sidebar is hidden, so this rail is the nav.
 */
.device-tool-tree {
  top: 82px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 240px;
  max-height: calc(100dvh - 100px);
  overflow: visible;
  border: 0;
  border-radius: var(--cc-radius);
  background: var(--cc-sidebar);
  box-shadow: var(--cc-shadow-md);
  color: var(--cc-sidebar-text);
  padding: 8px;
  scrollbar-color: rgba(216, 231, 234, 0.22) transparent;
}

.device-tool-tree-head {
  gap: 4px;
  border-bottom: 1px solid var(--cc-border);
  padding: 2px 2px 6px;
}

.device-tool-tree-head strong {
  color: var(--cc-text);
  font-size: 13px;
  font-weight: 550;
}

.device-tool-tree-head small {
  color: var(--cc-sidebar-muted);
  font-size: 11px;
}

.device-tree-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.device-tree-head-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.device-tree-head-identity {
  min-width: 0;
  margin-top: 2px;
  padding: 0 2px;
}

.device-tree-head-title-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.device-tree-head-identity h1 {
  margin: 0;
  min-width: 0;
  color: var(--cc-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-tree-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 3px;
  min-width: 0;
}

.device-tree-head-state {
  color: var(--cc-sidebar-muted);
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status light beside the name — blinks on RX; history opens on hover to the right */
.device-live-activity-wrap {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.device-live-activity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: help;
  line-height: 0;
}

.device-live-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #617a80;
  box-shadow: 0 0 0 0 rgba(50, 201, 149, 0);
}

/* Steady reachability color; RX pulse still overlays via .is-rx */
.device-live-activity.is-healthy .device-live-dot,
.device-live-activity.is-live .device-live-dot,
.device-live-activity.is-heartbeat .device-live-dot {
  background: #32c995;
}

.device-live-activity.is-degraded .device-live-dot,
.device-live-activity.is-reconnecting .device-live-dot,
.device-live-activity.is-recovering .device-live-dot {
  background: #f0b429;
  box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.28);
}

.device-live-activity.is-offline .device-live-dot {
  background: #f0456a;
  box-shadow: 0 0 0 4px rgba(240, 69, 106, 0.28);
}

/* RX flash should not repaint degraded/offline dots green */
.device-live-activity.is-healthy.is-rx .device-live-dot,
.device-live-activity.is-live.is-rx .device-live-dot,
.device-live-activity.is-heartbeat.is-rx .device-live-dot {
  animation: device-live-rx 0.85s ease-out;
}

.device-live-activity.is-degraded.is-rx .device-live-dot,
.device-live-activity.is-reconnecting.is-rx .device-live-dot,
.device-live-activity.is-recovering.is-rx .device-live-dot {
  animation: device-live-rx-warn 0.85s ease-out;
}

.device-live-activity.is-offline.is-rx .device-live-dot {
  animation: device-live-rx-bad 0.85s ease-out;
}

.device-tree-head-state.is-healthy,
.device-tree-head-state.is-live,
.device-tree-head-state.is-heartbeat {
  color: var(--cc-success);
}

.device-tree-head-state.is-degraded,
.device-tree-head-state.is-reconnecting,
.device-tree-head-state.is-recovering {
  color: var(--cc-warning);
}

.device-tree-head-state.is-offline {
  color: var(--cc-danger);
}

.device-live-activity-tooltip-status {
  display: grid;
  gap: 2px;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cc-border);
}

.device-live-activity-tooltip-status strong {
  color: var(--cc-accent-hover);
  font-size: 12px;
  font-weight: 550;
}

.device-live-activity-tooltip-status small {
  color: var(--cc-sidebar-muted);
  font-size: 10.5px;
  line-height: 1.35;
  white-space: normal;
}

.device-live-activity:hover,
.device-live-activity:focus-visible {
  outline: 0;
}

.device-live-activity:focus-visible .device-live-dot,
.device-live-activity-wrap:focus-within .device-live-dot {
  box-shadow: 0 0 0 3px rgba(99, 223, 217, 0.35);
}

.device-live-activity-tooltip {
  position: absolute;
  z-index: 60;
  top: -6px;
  left: calc(100% + 10px);
  display: block;
  width: min(228px, 70vw);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--cc-border);
  border-radius: 5px;
  background: var(--cc-surface);
  box-shadow: var(--cc-shadow-md);
  color: var(--cc-text-soft);
  padding: 8px 9px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-4px) scale(0.98);
  transition: opacity 120ms ease, visibility 120ms ease, transform 120ms ease;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}

.device-live-activity-wrap:hover .device-live-activity-tooltip,
.device-live-activity-wrap:focus-within .device-live-activity-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.device-live-activity-tooltip-head {
  display: block;
  margin-bottom: 5px;
  color: var(--cc-accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.device-live-activity-history {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-live-activity-history li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  color: var(--cc-text-soft);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.device-live-activity-history li.is-empty {
  grid-template-columns: 1fr;
  color: var(--cc-muted);
  font-style: italic;
  font-weight: 500;
}

.device-live-activity-history time {
  color: var(--cc-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.device-live-activity-history span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-tree-mobile-toggle {
  display: none;
}

/* Compact action toolbar — four controls share one row */
.device-tree-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin-top: 2px;
  border-top: 1px solid var(--cc-border);
  padding-top: 4px;
}

.device-rail-action {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 3px 1px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cc-text-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-align: center;
  transition: color 140ms ease, background 140ms ease;
}

.device-rail-action svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}

.device-rail-action-label {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-rail-action:hover,
.device-rail-action:focus-visible {
  background: #eceff2;
  color: var(--cc-text);
  outline: 0;
}

.device-rail-action:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: 1px;
}

.device-rail-action:hover svg,
.device-rail-action:focus-visible svg {
  opacity: 1;
  color: var(--cc-accent);
}

.device-rail-action:disabled,
.device-rail-action[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
}

.device-rail-action:disabled:hover,
.device-rail-action[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--cc-text-soft);
}

.device-rail-action.is-danger {
  color: var(--cc-danger);
}

.device-rail-action.is-danger:hover,
.device-rail-action.is-danger:focus-visible {
  background: rgba(199, 55, 83, 0.16);
  color: var(--cc-danger);
}

.device-rail-action.is-danger:hover svg,
.device-rail-action.is-danger:focus-visible svg {
  color: var(--cc-danger);
  opacity: 1;
}

.device-focus-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--cc-border);
  border-radius: 5px;
  background: transparent;
  color: var(--cc-text-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.device-focus-exit-icon {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0.85;
}

.device-focus-exit:hover,
.device-focus-exit:focus-visible {
  border-color: var(--cc-border-strong);
  background: #eceff2;
  color: var(--cc-text);
  outline: 0;
}

.device-focus-exit:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: 1px;
}

.device-tree-body {
  gap: 2px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 6px;
  scrollbar-color: rgba(216, 231, 234, 0.22) transparent;
}

.device-tree-group {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.device-tree-group summary,
.device-tree-group--nested summary {
  min-height: 38px;
  border-radius: 5px;
  padding: 0 10px;
  color: var(--cc-text-soft);
  font-size: 13px;
  font-weight: 500;
  transition: color 140ms ease, background 140ms ease;
}

.device-tree-group summary:hover,
.device-tree-group summary:focus-visible {
  background: #eceff2;
  color: var(--cc-text);
  outline: 0;
}

.device-tree-group summary:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: 1px;
}

.device-tree-summary-copy strong {
  color: inherit;
  font-size: 12.5px;
  font-weight: 500;
}

.device-tree-summary-copy small {
  color: var(--cc-sidebar-muted);
  font-size: 10.5px;
}

.device-tree-summary-copy small:empty {
  display: none;
}

.device-tree-expander {
  color: var(--cc-muted);
  opacity: 0.8;
}

.device-tree-panel-inner,
.device-tree-group--nested .device-tree-panel-inner {
  margin: 2px 0 4px 16px;
  border-left: 1px solid var(--cc-border);
  border-top: 0;
  padding: 0 0 0 6px;
}

.device-tree-group--nested .device-tree-panel-inner {
  margin-left: 12px;
}

.device-tree-leaf {
  min-height: 34px;
  border-left: 0;
  border-radius: 5px;
  padding: 6px 10px;
  color: var(--cc-text-soft);
  font-size: 12.5px;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.device-tree-leaf small {
  color: var(--cc-muted);
}

.device-tree-leaf:hover,
.device-tree-leaf:focus-visible {
  border-left-color: transparent;
  background: #eceff2;
  color: var(--cc-text);
  outline: 0;
}

.device-tree-leaf:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: 1px;
}

.device-tree-leaf.active {
  border-left-color: transparent;
  background: var(--cc-accent-soft);
  box-shadow: none;
  color: var(--cc-accent-hover);
}

.device-tree-leaf.active small {
  color: var(--cc-accent);
}

.device-tree-leaf.active svg {
  color: var(--cc-accent);
  opacity: 1;
}

.device-tool-tree .tree-dot {
  box-shadow: none;
}

.device-tool-tree .tree-dot.good {
  background: #32c995;
}

.device-tool-tree .tree-dot.warn {
  background: #e0a43a;
}

.device-tool-tree .tree-dot.bad {
  background: #e45d76;
}

.goodcloud-device-hero,
.goodcloud-info-card,
.goodcloud-stat-panel {
  background: #fff;
}

.goodcloud-device-title h1 {
  font-size: 24px;
  font-weight: 600;
}

.goodcloud-device-tabs {
  border-bottom-color: var(--cc-border);
}

.goodcloud-device-tabs a {
  color: var(--cc-muted);
  font-weight: 600;
}

.goodcloud-device-tabs a.active,
.goodcloud-device-tabs a[aria-current] {
  color: var(--cc-accent-hover);
}

/* Edge server offering workspace */

.edge-detail-summary {
  display: grid;
  gap: 10px;
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 13px 14px;
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
}

.edge-detail-identity {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.edge-detail-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #9bd0d3;
  border-radius: 10px;
  background: #effafa;
  color: var(--cc-accent-hover);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.edge-detail-mark svg {
  width: 19px;
  height: 19px;
}

.edge-detail-title {
  min-width: 0;
}

.edge-detail-title h1 {
  color: var(--cc-text);
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.edge-detail-title p {
  margin-top: 2px;
  color: var(--cc-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-detail-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: var(--cc-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.edge-detail-status i,
.edge-capability-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9aa9ae;
}

.edge-detail-status.is-online {
  border-color: #a5deca;
  background: #f1fcf8;
  color: #117555;
}

.edge-detail-status.is-online i,
.edge-capability-badge.is-available i {
  background: var(--cc-success);
  box-shadow: 0 0 0 3px rgba(20, 143, 103, 0.11);
}

.edge-detail-status.is-stale {
  border-color: #ead49a;
  background: #fffaf0;
  color: #886516;
}

.edge-detail-status.is-stale i {
  background: var(--cc-warning);
  box-shadow: 0 0 0 3px rgba(203, 145, 29, 0.11);
}

.edge-detail-status.is-offline {
  border-color: #ecc1c8;
  background: #fff7f8;
  color: var(--cc-danger);
}

.edge-detail-status.is-degraded {
  border-color: #ead49a;
  background: #fffaf0;
  color: #886516;
}

.edge-detail-status.is-degraded i {
  background: var(--cc-warning);
  box-shadow: 0 0 0 3px rgba(203, 145, 29, 0.11);
}

.edge-detail-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 0;
}

.edge-detail-facts > div {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--cc-border);
  padding: 0 10px;
}

.edge-detail-facts > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.edge-detail-facts dt {
  color: var(--cc-muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.edge-detail-facts dd {
  margin-top: 0;
  color: var(--cc-text);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-detail-facts > div.is-warning dt,
.edge-detail-facts > div.is-warning dd {
  color: var(--cc-warning);
}

.edge-detail-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.edge-detail-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #ead49a;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fffaf0;
  color: #886516;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.edge-detail-alert b {
  color: #6f5210;
  font-weight: 740;
}

.edge-detail-workspace {
  border-color: var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 0;
  background: #fff;
  box-shadow: var(--cc-shadow-sm);
  overflow: hidden;
}

/* Service console: rail + main workspace */
.edge-service-console-shell {
  overflow: visible;
}

.edge-service-console {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  min-height: 420px;
  min-width: 0;
  transition: grid-template-columns 140ms ease;
}

.edge-service-console.is-rail-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

.edge-console-rail {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--cc-border);
  background: var(--cc-surface-subtle);
  padding: 10px 8px 12px;
  min-width: 0;
}

.edge-console-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 30px;
  padding: 2px 2px 4px;
}

.edge-console-rail-title {
  color: var(--cc-text);
  font-size: 11px;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Same chevron control as primary nav, tuned for light rail */
.edge-console-rail-head .sidebar-rail-toggle {
  color: #5a7077;
}

.edge-console-rail-head .sidebar-rail-toggle:hover {
  border-color: var(--cc-border);
  background: #fff;
  color: #123038;
}

.edge-service-console.is-rail-collapsed .edge-console-rail {
  padding: 10px 6px 12px;
  justify-items: center;
}

.edge-service-console.is-rail-collapsed .edge-console-rail-head {
  justify-content: center;
  width: 100%;
  gap: 2px;
}

.edge-service-console.is-rail-collapsed .edge-console-rail-title {
  display: none;
}

.edge-service-console.is-rail-collapsed .edge-console-rail-empty {
  display: none;
}

.edge-service-console.is-rail-collapsed .edge-console-nav {
  width: 100%;
  justify-items: center;
}

.edge-service-console.is-rail-collapsed .edge-console-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  margin: 0 auto;
  padding: 0;
  box-shadow: none;
}

.edge-service-console.is-rail-collapsed .edge-console-nav-item.is-selected,
.edge-service-console.is-rail-collapsed .edge-console-nav-item.is-active {
  box-shadow: none;
  border-color: #9bd0d3;
  background: #fff;
}

.edge-service-console.is-rail-collapsed .edge-console-nav-copy {
  display: none;
}

.edge-service-console.is-rail-collapsed .sidebar-rail-toggle-icon {
  transform: scaleX(-1);
}

.edge-console-panel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.edge-console-rail-empty {
  margin: 0;
  padding: 8px;
  color: #8d641b;
  font-size: 11.5px;
  line-height: 1.35;
}

.edge-console-nav {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.edge-console-nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 9px;
  background: transparent;
  color: var(--cc-text-soft);
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.edge-console-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #c5d4d8;
  background: #eef3f5;
  color: #4d626a;
  flex: 0 0 auto;
  line-height: 0;
  overflow: hidden;
  /* Glyph shape = which service. Color below = run state only. */
}

/* Kill global `button svg { margin-right: 6px }` from style.css — it un-centers rail icons. */
.edge-console-nav-icon svg,
button.edge-console-nav-item svg,
.edge-console-panel-heading .edge-console-nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 !important;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Status colors (same semantics as the old green/amber dots). */
.edge-console-nav-item.is-running .edge-console-nav-icon,
.edge-console-nav-icon.is-running {
  background: #e5f6ea;
  border-color: #8dcf9f;
  color: #176b34;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.edge-console-nav-item.is-attention .edge-console-nav-icon,
.edge-console-nav-icon.is-attention {
  background: #fff7e6;
  border-color: #e2bf6a;
  color: #8a5a0b;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.22);
}

.edge-console-nav-item.is-stopped .edge-console-nav-icon,
.edge-console-nav-item.is-idle .edge-console-nav-icon,
.edge-console-nav-icon.is-stopped,
.edge-console-nav-icon.is-idle {
  background: #eef3f5;
  border-color: #c5d4d8;
  color: #6a7f86;
  opacity: 0.88;
}

.edge-console-nav-item.is-selected .edge-console-nav-icon,
.edge-console-nav-item.is-active .edge-console-nav-icon {
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.4);
}

.edge-console-panel-heading .edge-console-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.edge-console-panel-heading .edge-console-nav-icon svg {
  width: 15px;
  height: 15px;
}

.edge-console-nav-item:hover,
.edge-console-nav-item:focus-visible {
  border-color: var(--cc-border);
  background: #fff;
  color: var(--cc-text);
}

.edge-console-nav-item:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: 1px;
}

.edge-console-nav-item.is-selected,
.edge-console-nav-item.is-active {
  border-color: #9bd0d3;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--cc-accent);
  color: var(--cc-text);
}

.edge-console-nav-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.edge-console-nav-copy b {
  color: inherit;
  font-size: 12.5px;
  font-weight: 680;
  line-height: 1.2;
}

.edge-console-nav-copy small {
  color: var(--cc-muted);
  font-size: 10.5px;
  font-weight: 560;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-console-nav-state {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: #9aa9ae;
  box-shadow: 0 0 0 3px rgba(154, 169, 174, 0.12);
}

.edge-console-nav-state.is-running,
.edge-console-state-pill.is-running {
  background: var(--cc-success);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, 0.12);
}

.edge-console-nav-state.is-attention,
.edge-console-state-pill.is-attention {
  background: var(--cc-warning);
  box-shadow: 0 0 0 3px rgba(148, 96, 8, 0.12);
}

.edge-console-nav-state.is-stopped,
.edge-console-nav-state.is-idle,
.edge-console-state-pill.is-stopped,
.edge-console-state-pill.is-idle {
  background: #9aa9ae;
}

.edge-console-main {
  min-width: 0;
  background: #fff;
}

.edge-console-panel {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0 !important;
}

.edge-console-panel[hidden] {
  display: none !important;
}

.edge-console-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--cc-border);
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfcfc, #fff);
}

.edge-console-panel-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.edge-console-panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.edge-console-panel-heading .edge-console-nav-state {
  margin-top: 0;
}

.edge-console-panel-heading h2 {
  margin: 0;
  color: var(--cc-text);
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.edge-console-panel-title p {
  margin: 0;
  color: var(--cc-muted);
  font-size: 12px;
  line-height: 1.3;
}

.edge-console-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f3;
  color: var(--cc-text-soft);
  font-size: 10.5px;
  font-weight: 720;
}

.edge-console-state-pill.is-running {
  background: #e8f8f2;
  color: #117555;
}

.edge-console-state-pill.is-attention {
  background: #fff6e8;
  color: #8a5a0b;
}

.edge-console-state-pill.is-stopped,
.edge-console-state-pill.is-idle {
  background: #eef2f3;
  color: #5d7077;
}

.edge-console-panel-power {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  padding: 2px 8px 2px 10px;
  background: #fff;
}

.edge-console-panel-power .edge-service-switch {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.edge-console-panel-power .edge-service-switch b {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--cc-text-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.edge-console-panel-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px 14px;
}

.edge-console-activity-alert {
  display: grid;
  gap: 3px;
  border: 1px solid #ead49a;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fffaf0;
  color: #6f5210;
}

.edge-console-activity-alert strong {
  font-size: 12px;
  font-weight: 720;
}

.edge-console-activity-alert span,
.edge-console-activity-alert code {
  font-size: 11.5px;
  line-height: 1.35;
}

.edge-console-activity-alert code {
  display: block;
  overflow: hidden;
  color: #886516;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-console-mqtt-fold {
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: var(--cc-surface-subtle);
  overflow: clip;
}

.edge-console-mqtt-fold > summary {
  cursor: pointer;
  list-style: none;
  min-height: 34px;
  padding: 8px 11px;
  color: var(--cc-text-soft);
  font-size: 12px;
  font-weight: 650;
}

.edge-console-mqtt-fold > summary::-webkit-details-marker {
  display: none;
}

.edge-console-mqtt-fold[open] > summary {
  border-bottom: 1px solid var(--cc-border);
  background: #fff;
}

.edge-console-mqtt-fold .edge-ops-event-grid {
  padding: 8px;
}

/* MQTT Explorer (hierarchical topic tree + value pane) */
.edge-mqtt-tree.mqtt-explorer {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mqtt-ex-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.35fr);
  gap: 0;
  min-height: 420px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 38, 45, 0.04);
}

.mqtt-ex-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-width: 0;
  border-right: 1px solid var(--cc-border);
  background: #f4f8f9;
}

.mqtt-ex-sidebar-head {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--cc-border);
  padding: 6px 10px;
  background: #eaf1f3;
  font-size: 11px;
}

.mqtt-ex-sidebar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mqtt-ex-sidebar-title strong {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 760;
}

.mqtt-ex-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aaeb4;
}

.mqtt-ex-status-dot.is-good {
  background: #1f9d4b;
  box-shadow: 0 0 0 2px rgba(31, 157, 75, 0.18);
}

.mqtt-ex-status-dot.is-bad {
  background: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.16);
}

.mqtt-ex-status-dot.is-noise {
  background: #c9971d;
  box-shadow: 0 0 0 2px rgba(203, 145, 29, 0.18);
}

.mqtt-ex-status-compact {
  min-width: 0;
  overflow: hidden;
  color: var(--cc-muted);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mqtt-ex-endpoint-compact {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #4d6a71;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mqtt-ex-tree {
  min-height: 220px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding: 4px 0 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.mqtt-ex-node {
  min-width: 0;
}

.mqtt-ex-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-height: 28px;
  padding: 1px 8px 1px calc(8px + (var(--depth, 0) * 14px));
}

.mqtt-ex-node.is-selected > .mqtt-ex-row {
  background: #d9eef2;
  box-shadow: inset 3px 0 0 #1f7a86;
}

.mqtt-ex-row:hover {
  background: #e7f2f4;
}

.mqtt-ex-row.mqtt-ex-flashing {
  background-color: rgba(14, 165, 233, 0.72);
  transition: background-color 180ms ease-out;
}

.mqtt-ex-twist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: #4d6a71;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.mqtt-ex-twist:hover {
  background: rgba(16, 38, 45, 0.08);
  color: #123038;
}

.mqtt-ex-twist.is-leaf {
  width: 18px;
  color: #9db0b5;
  cursor: default;
}

.mqtt-ex-twist.is-leaf::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.mqtt-ex-label {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  border: 0;
  padding: 3px 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.mqtt-ex-name {
  flex: 0 1 auto;
  overflow: hidden;
  color: #16333a;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mqtt-ex-node.is-folder > .mqtt-ex-row .mqtt-ex-name {
  font-weight: 740;
}

.mqtt-ex-count {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  border-radius: 999px;
  padding: 0 5px;
  background: #dfe9ec;
  color: #35555c;
  font-size: 10px;
  font-weight: 740;
}

.mqtt-ex-preview {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #6a838a;
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mqtt-ex-children.is-hidden,
.mqtt-ex-children[hidden] {
  display: none;
}

.mqtt-ex-clients-fold,
.mqtt-ex-errors-fold {
  border-top: 1px solid var(--cc-border);
  background: #eef4f6;
}

.mqtt-ex-clients-fold > summary,
.mqtt-ex-errors-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  color: #35555c;
  font-size: 11.5px;
  font-weight: 700;
}

.mqtt-ex-clients-fold > summary::-webkit-details-marker,
.mqtt-ex-errors-fold > summary::-webkit-details-marker {
  display: none;
}

.mqtt-ex-client-list {
  max-height: 160px;
  overflow: auto;
  padding: 0 8px 8px;
}

.mqtt-ex-detail {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  max-height: min(78vh, 820px);
  overflow: auto;
  padding: 14px 16px 18px;
  background: #fbfcfc;
}

.mqtt-ex-empty-detail {
  border: 1px dashed #c9d7db;
  border-radius: 10px;
  padding: 18px;
  background: #f3f7f8;
  color: var(--cc-muted);
}

.mqtt-ex-empty-detail strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cc-text);
  font-size: 14px;
}

.mqtt-ex-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mqtt-ex-detail-kicker {
  display: block;
  color: var(--cc-muted);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mqtt-ex-detail-topic {
  margin: 2px 0 0;
  color: #123038;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.3;
  word-break: break-all;
}

.mqtt-ex-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mqtt-ex-detail-meta {
  color: #4d6a71;
  font-size: 11px;
  font-weight: 600;
}

.mqtt-ex-value-panel,
.mqtt-ex-history-panel,
.mqtt-ex-publish {
  border: 1px solid #e3ecee;
  border-radius: 10px;
  background: #fff;
}

.mqtt-ex-value-panel > header,
.mqtt-ex-history-panel > header,
.mqtt-ex-publish > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #e8eef0;
  padding: 8px 12px;
  font-size: 12px;
}

.mqtt-ex-value-panel > header span,
.mqtt-ex-history-panel > header span,
.mqtt-ex-publish > header span {
  color: var(--cc-muted);
  font-size: 11px;
}

.mqtt-ex-value-body {
  max-height: min(42vh, 360px);
  margin: 0;
  border-radius: 0 0 10px 10px;
}

.mqtt-ex-history-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}

.mqtt-ex-history-row {
  border: 1px solid #d5e1e4;
  border-radius: 8px;
  padding: 8px;
  background: #f7fafb;
}

.mqtt-ex-history-row.is-latest {
  border-color: #7eb8c2;
  background: #eef7f9;
}

.mqtt-ex-history-row.is-source-operator {
  border-color: #a8c0e8;
  background: #f3f7ff;
}

.mqtt-ex-history-head {
  margin-bottom: 6px;
}

.mqtt-ex-history-head small {
  color: #3d555c;
  font-size: 11px;
  font-weight: 600;
}

.mqtt-ex-history-body {
  margin: 0;
  max-height: 160px;
  overflow: auto;
  border: 1px solid #1a333a;
  border-radius: 6px;
  padding: 8px 10px;
  background: #10262d;
  color: #e6f2f4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

.edge-mqtt-publish-panel textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  resize: vertical;
}

.mqtt-ex-publish {
  padding-bottom: 4px;
}

.mqtt-ex-publish .edge-mqtt-publish-form {
  padding: 10px 12px 0;
}

.mqtt-ex-publish .edge-inline-status {
  margin: 4px 12px 10px;
}

.edge-mqtt-qos,
.edge-mqtt-retain,
.edge-mqtt-source,
.edge-mqtt-kind {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  padding: 0 6px;
  background: #e8f4f5;
  color: #14565c;
  font-size: 10px;
  font-weight: 740;
}

.edge-mqtt-retain {
  background: #fff4e5;
  color: #8a5a0b;
}

.edge-mqtt-source.is-operator {
  background: #e8f0ff;
  color: #1d4f91;
}

.edge-mqtt-source.is-device,
.edge-mqtt-source.is-client {
  background: #e9f7ee;
  color: #1f6b3a;
}

.edge-mqtt-kind {
  background: #f1eef8;
  color: #4b3f72;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-mqtt-message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.edge-mqtt-message-body {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  border-radius: 6px;
  padding: 8px;
  background: #10262d;
  color: #d8e7ea;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.edge-mqtt-client-list,
.edge-mqtt-error-list {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-height: 360px;
  overflow: auto;
}

.edge-mqtt-client-row {
  display: grid;
  gap: 6px;
  border: 1px solid #e8eef0;
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfc;
}

.edge-mqtt-client-row.is-disconnected {
  opacity: 0.72;
}

.edge-mqtt-client-main {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.edge-mqtt-client-main strong {
  display: block;
  color: var(--cc-text);
  font-size: 12.5px;
}

.edge-mqtt-client-main small {
  display: block;
  color: var(--cc-muted);
  font-size: 10.5px;
}

.edge-mqtt-client-main small.is-warn {
  color: #8a5a0b;
}

.edge-mqtt-error-row {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--cc-border);
  padding: 7px 8px;
}

.edge-mqtt-error-row strong {
  font-size: 12px;
}

.edge-mqtt-error-row small {
  color: var(--cc-muted);
  font-size: 10px;
}

.edge-mqtt-error-row code {
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff;
  color: #3d555c;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

@media (max-width: 1100px) {
  .mqtt-ex-shell {
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.2fr);
  }

}

@media (max-width: 860px) {
  .mqtt-ex-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mqtt-ex-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--cc-border);
  }

  .mqtt-ex-tree {
    max-height: 320px;
  }

  .mqtt-ex-detail {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .edge-service-console {
    grid-template-columns: 1fr;
  }

  .edge-console-rail {
    border-right: 0;
    border-bottom: 1px solid var(--cc-border);
    padding-bottom: 8px;
  }

  .edge-console-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .edge-console-nav-item {
    flex: 0 0 auto;
    width: min(200px, 72vw);
  }
}

/* Light-theme edge list chips + attachment meters (override dark legacy style.css) */
.edge-service-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.edge-service-chip-row span,
.edge-service-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--cc-surface-subtle);
  color: var(--cc-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.edge-service-chip-row span.active,
.edge-service-chip.is-on {
  border-color: #a5deca;
  background: #f1fcf8;
  color: #117555;
}

.edge-service-chip.is-off {
  border-color: var(--cc-border);
  background: #fff;
  color: #6b8088;
}

.edge-service-chip-empty {
  color: var(--cc-muted);
  font-size: 11.5px;
}

.edge-table .edge-attachment-pill,
.edge-attachment-pill {
  min-height: 28px;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  background: var(--cc-surface-subtle);
  color: var(--cc-text-soft);
  box-shadow: none;
}

.edge-attachment-pill.active {
  border-color: #a5deca;
  background: #f1fcf8;
  color: #117555;
}

.edge-attachment-meter b {
  color: inherit;
}

.edge-attachment-meter small {
  color: inherit;
  opacity: 0.78;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
}

/* Edge devices popover floats above the clipped table once JS positions it */
.edge-attachment-menu .menu-card.floating-menu-card {
  width: min(300px, calc(100vw - 24px));
  min-width: 240px;
  max-height: min(360px, calc(100vh - 24px));
  border: 1px solid var(--cc-border-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--cc-shadow-md);
  color: var(--cc-text);
}

.edge-attachment-card-top {
  border-bottom-color: var(--cc-border);
}

.edge-attachment-card-top strong {
  color: var(--cc-text);
  font-weight: 720;
}

.edge-attachment-card-top span {
  color: var(--cc-muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 620;
}

.edge-attached-device {
  color: var(--cc-text);
}

.edge-attached-device:hover,
.edge-attached-device:focus-visible {
  background: var(--cc-accent-soft);
}

.edge-attached-device strong {
  color: var(--cc-text);
}

.edge-attached-device small {
  color: var(--cc-muted);
}

.edge-attachment-empty {
  color: var(--cc-muted);
}

.edge-servers-header .edge-status-select select {
  min-height: 40px;
  min-width: 120px;
  border: 1px solid var(--cc-border);
  border-radius: 9px;
  background: var(--cc-surface-subtle);
  color: var(--cc-text);
  padding: 0 12px;
  font-size: 13px;
}

.edge-detail-utilitybar {
  margin-bottom: 10px;
}

.edge-offering-compatibility {
  flex: 0 0 auto;
  padding: 0 8px;
  color: #8d641b;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.edge-offering-workspace {
  border-top: 1px solid var(--cc-border);
}

.edge-offering-navigation {
  display: flex;
  align-items: stretch;
  gap: 8px;
  border-bottom: 1px solid var(--cc-border);
  padding: 7px 8px 0;
  background: var(--cc-surface-subtle);
}

.edge-offering-tablist {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scroll-padding-inline: 1px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.edge-offering-tablist::-webkit-scrollbar {
  display: none;
}

.edge-offering-tab-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 0 0 auto;
  align-items: center;
  min-width: 118px;
  max-width: 168px;
  min-height: 43px;
  border: 1px solid var(--cc-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f4f7f8;
  scroll-snap-align: start;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.edge-offering-tab-item.is-activity {
  grid-template-columns: minmax(0, 1fr);
  min-width: 92px;
  max-width: 120px;
}

.edge-offering-tab-item.is-selected {
  border-color: var(--cc-border-strong);
  background: #fff;
  box-shadow: inset 0 2px 0 var(--cc-accent);
}

.edge-offering-tab-item[data-pending="true"] {
  opacity: 0.68;
}

.edge-offering-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 7px 0 0 0;
  padding: 0 8px;
  background: transparent;
  color: var(--cc-muted);
  cursor: pointer;
  text-align: left;
}

.edge-offering-tab > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.edge-offering-tab svg {
  width: 15px;
  height: 15px;
}

.edge-offering-tab b {
  color: inherit;
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1.15;
  white-space: nowrap;
}

.edge-offering-tab:hover,
.edge-offering-tab:focus-visible {
  background: rgba(230, 245, 245, 0.72);
  color: var(--cc-accent-hover);
}

.edge-offering-tab:focus-visible {
  outline: 2px solid var(--cc-focus);
  outline-offset: -2px;
}

.edge-offering-tab.is-active {
  background: transparent;
  color: var(--cc-accent-hover);
  box-shadow: none;
}

.edge-offering-tab-control {
  display: flex;
  align-items: center;
  padding-right: 7px;
}

.edge-offering-tab-control .edge-service-switch {
  position: relative;
  display: grid;
  width: 36px;
  min-width: 36px;
  min-height: 34px;
  place-items: center;
  gap: 0;
  cursor: pointer;
}

.edge-offering-tab-control .edge-service-switch input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
}

.edge-offering-tab-control .edge-service-switch input:disabled {
  cursor: not-allowed;
}

.edge-offering-tab-control .edge-service-switch span {
  width: 32px;
  height: 18px;
  pointer-events: none;
}

.edge-offering-tab-control .edge-service-switch b,
.edge-offering-tab-control .edge-service-switch-reason {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.edge-offering-tab-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  margin-right: 8px;
  background: #fff;
  color: var(--cc-text-soft);
  font-size: 10px;
  font-weight: 750;
}

.edge-offering-panels {
  min-width: 0;
}

.edge-offering-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
}

.edge-offering-panel[hidden] {
  display: none;
}

.edge-offering-settings,
.edge-offering-activity {
  display: grid;
  gap: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

/* Collapsed server-config disclosure keeps peer/listener lists primary */
.edge-ops-config {
  min-width: 0;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: var(--cc-surface-subtle);
  overflow: clip;
}

.edge-ops-config-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 14px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--cc-text-soft);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.edge-ops-config-summary::-webkit-details-marker {
  display: none;
}

.edge-ops-config-label {
  color: var(--cc-text);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.edge-ops-config-preview {
  min-width: 0;
  overflow: hidden;
  color: var(--cc-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-ops-config-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--cc-muted);
  border-bottom: 1.5px solid var(--cc-muted);
  justify-self: end;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 140ms ease;
}

.edge-ops-config[open] .edge-ops-config-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.edge-ops-config-summary:hover,
.edge-ops-config-summary:focus-visible {
  background: #eef5f6;
  color: var(--cc-text);
}

.edge-ops-config-summary:focus-visible {
  outline: 2px solid var(--cc-accent-ring);
  outline-offset: -2px;
}

.edge-ops-config > .edge-ops-form,
.edge-ops-config > .edge-offering-form {
  border-top: 1px solid var(--cc-border);
  padding: 8px;
  background: #fff;
}

.edge-offering-form,
.edge-ops-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.edge-offering-panel .edge-control-fields,
.edge-ops-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.edge-offering-panel .edge-control-fields label,
.edge-offering-panel .edge-control-fields label:only-child,
.edge-ops-fields label {
  display: grid;
  grid-column: auto;
  gap: 3px;
  align-content: start;
  min-width: 0;
  color: var(--cc-text-soft);
  font-size: 10px;
  font-weight: 620;
  text-transform: none;
}

.edge-offering-panel .edge-control-fields label > span,
.edge-ops-fields label > span,
.edge-ops-field > span {
  color: #50666d;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edge-offering-panel .edge-control-fields input,
.edge-offering-panel .edge-control-fields select,
.edge-ops-fields input,
.edge-ops-fields select,
.edge-ops-field input,
.edge-ops-field select {
  min-height: 30px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
  color: var(--cc-text);
  font-size: 12px;
}

.edge-offering-panel .edge-control-fields .edge-checkbox-field {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
}

.edge-offering-panel .edge-control-fields .edge-checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: var(--cc-accent);
}

.edge-offering-panel .edge-control-fields label .edge-field-help,
.edge-ops-help {
  display: none;
  grid-column: auto;
  min-height: 0;
  color: var(--cc-muted);
  font-size: 9px;
  font-weight: 530;
  line-height: 1.3;
  text-transform: none;
}

.edge-offering-panel .edge-control-fields label .edge-field-help.is-error,
.edge-ops-help.is-error {
  display: block;
  color: var(--cc-danger);
}

.edge-offering-panel .edge-control-actions,
.edge-ops-actions {
  display: flex;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
}

.edge-offering-panel .edge-control-actions .button,
.edge-ops-actions .button,
.edge-ops-toolbar .button,
.edge-ops-row .button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11.5px;
  text-transform: none;
}

.edge-offering-panel .edge-control-actions .button.primary {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #fff;
}

.edge-offering-panel .edge-control-actions .button.primary:hover:not(:disabled),
.edge-offering-panel .edge-control-actions .button.primary:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.edge-offering-section-grid,
.edge-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.edge-offering-panel .edge-service-peer-panel,
.edge-offering-inventory,
.edge-ops-panel {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
}

.edge-offering-panel .edge-service-peer-panel header,
.edge-ops-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  padding-bottom: 2px;
}

.edge-offering-panel .edge-service-peer-panel header strong,
.edge-ops-panel header strong {
  color: var(--cc-text-soft);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edge-offering-panel .edge-service-peer-panel header > span,
.edge-ops-panel header > span {
  min-width: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cc-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.edge-offering-panel .empty,
.edge-ops-empty {
  margin: 0;
  padding: 6px 2px;
  color: var(--cc-muted);
  font-size: 11px;
}

.edge-offering-panel .edge-inline-status {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
}

.edge-offering-panel .edge-inline-status:empty {
  display: none;
}

.edge-offering-panel .edge-manual-wg-panel .edge-control-fields,
.edge-offering-panel .edge-manual-wg-panel .edge-control-actions {
  margin-top: 0;
}

.edge-offering-full {
  width: 100%;
}

.edge-offering-inventory .table-wrap {
  max-height: 320px;
}

/* Dense ops toolbars, peer rows, listeners */

.edge-ops-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 6px;
  min-width: 0;
  padding-top: 2px;
}

.edge-ops-toolbar.is-wrap {
  flex-wrap: wrap;
}

.edge-ops-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 0 1 148px;
}

.edge-ops-field.grow {
  flex: 1 1 160px;
}

.edge-ops-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--cc-border);
  border-radius: 6px;
  padding: 0 8px;
  background: var(--cc-surface-subtle);
  color: var(--cc-text-soft);
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.edge-ops-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--cc-accent);
}

.edge-service-peer-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.edge-offering-panel .edge-service-peer-row,
.edge-ops-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid #e8eef0;
  border-radius: 6px;
  padding: 5px 7px;
  background: #fbfcfc;
  box-shadow: none;
}

.edge-offering-panel .edge-service-peer-row:hover,
.edge-ops-row:hover {
  border-color: #c6d8db;
  background: #f5fafb;
  box-shadow: none;
  transform: none;
}

/* Rows may be either: [main-link, action] or [icon, copy, actions] */
.edge-offering-panel .edge-service-peer-main,
.edge-ops-row .edge-service-peer-main {
  display: grid;
  grid-column: 1;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.edge-ops-row > .edge-peer-status-icon {
  grid-column: 1;
  grid-row: 1;
}

.edge-ops-row > .edge-peer-copy {
  grid-column: 1;
  min-width: 0;
  padding-left: 24px;
}

.edge-ops-row:has(> .edge-peer-status-icon) > .edge-peer-copy {
  grid-column: 1;
}

.edge-ops-row:has(> .edge-peer-status-icon):not(:has(.edge-service-peer-main)) {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.edge-ops-row:has(> .edge-peer-status-icon):not(:has(.edge-service-peer-main)) > .edge-peer-copy {
  padding-left: 0;
  grid-column: 2;
}

.edge-ops-row:has(> .edge-peer-status-icon):not(:has(.edge-service-peer-main)) > .edge-ops-row-actions {
  grid-column: 3;
}

.edge-offering-panel .edge-service-peer-row > .edge-peer-status-icon,
.edge-offering-panel .edge-service-peer-main > .edge-peer-status-icon,
.edge-ops-row .edge-peer-status-icon {
  width: 16px;
  height: 16px;
  color: #95a4aa;
}

.edge-offering-panel .edge-peer-status-icon::before,
.edge-ops-row .edge-peer-status-icon::before {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 16%, transparent);
}

.edge-offering-panel .edge-service-peer-row.is-handshake-active .edge-peer-status-icon,
.edge-ops-row.is-handshake-active .edge-peer-status-icon {
  color: #16a06f;
}

.edge-offering-panel .edge-service-peer-row.is-handshake-idle .edge-peer-status-icon,
.edge-ops-row.is-handshake-idle .edge-peer-status-icon {
  color: #95a4aa;
}

.edge-peer-copy {
  min-width: 0;
}

.edge-peer-copy strong,
.edge-peer-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-peer-copy strong {
  color: var(--cc-text);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.15;
}

.edge-peer-copy small {
  margin-top: 1px;
  color: var(--cc-muted);
  font-size: 10px;
  line-height: 1.2;
}

.edge-ops-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.edge-offering-panel .edge-service-peer-row > [data-edge-wireguard-action="detach"],
.edge-offering-panel .edge-service-peer-row > [data-edge-ipsec-action="leave"] {
  grid-column: auto;
  justify-self: end;
}

.edge-ops-listen-list {
  display: grid;
  gap: 3px;
  max-height: 280px;
  overflow: auto;
}

.edge-ops-listen-row {
  display: grid;
  grid-template-columns: 52px 44px minmax(0, 1.4fr) minmax(56px, 0.7fr) minmax(64px, 0.7fr);
  gap: 6px;
  align-items: center;
  min-height: 28px;
  border: 1px solid #e8eef0;
  border-radius: 5px;
  padding: 3px 7px;
  background: #fbfcfc;
  font-size: 11px;
}

.edge-ops-listen-row b {
  color: var(--cc-text);
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.edge-ops-proto {
  color: var(--cc-accent-hover);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.03em;
}

.edge-ops-service,
.edge-ops-listen-row small,
.edge-ops-listen-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cc-text-soft);
  font-style: normal;
}

.edge-ops-listen-row em {
  color: var(--cc-muted);
  text-align: right;
}

.edge-event-grid,
.edge-ops-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.edge-event-grid .edge-event-row,
.edge-ops-event-grid .edge-event-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.55fr) minmax(90px, 1fr) auto 16px;
  gap: 5px;
  min-width: 0;
  min-height: 28px;
  margin: 0;
  border: 1px solid #e8eef0;
  border-radius: 5px;
  padding: 3px 6px;
  background: #fbfcfc;
  align-items: center;
  font-size: 11px;
}

.edge-event-grid .edge-event-row details {
  position: relative;
}

.edge-event-grid .edge-event-row summary {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 4px;
  color: var(--cc-muted);
  cursor: pointer;
  list-style: none;
}

.edge-event-grid .edge-event-row summary::-webkit-details-marker {
  display: none;
}

.edge-event-grid .edge-event-row summary:hover,
.edge-event-grid .edge-event-row summary:focus-visible {
  background: var(--cc-surface-subtle);
  color: var(--cc-text);
}

.edge-event-grid .edge-event-row details[open] pre {
  position: absolute;
  right: 0;
  z-index: 5;
  width: min(520px, calc(100vw - 64px));
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--cc-border-strong);
  border-radius: var(--cc-radius-sm);
  padding: 10px;
  background: #fff;
  box-shadow: var(--cc-shadow-md);
}

.edge-service-chip-empty {
  color: var(--cc-muted);
  font-size: 10px;
  white-space: nowrap;
}

/* Compact operational surfaces */

.sidebar .nav {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar .nav > * {
  min-width: 0;
  grid-column: 1;
}

.route-loading {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--cc-muted);
}

.route-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cc-border-strong);
  border-top-color: var(--cc-accent);
  border-radius: 50%;
  animation: route-loading-spin 700ms linear infinite;
}

@keyframes route-loading-spin {
  to { transform: rotate(360deg); }
}

.device-tool-tree-head h1 {
  margin: 0;
  color: var(--cc-text);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.device-utility-page {
  display: grid;
  gap: 12px;
}

#device-operations-workspace > [hidden] {
  display: none !important;
}

.operations-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--cc-border);
  padding-bottom: 8px;
}

.operations-subnav a {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.operations-subnav a:hover,
.operations-subnav a.active {
  border-color: #a9d7d9;
  background: var(--cc-accent-soft);
  color: var(--cc-accent-hover);
}

.utility-availability-note {
  margin: 0;
  border-left: 3px solid var(--cc-warning);
  border-radius: var(--cc-radius-sm);
  padding: 8px 10px;
  background: #fff8e8;
  color: #72561b;
  font-size: 12px;
}

.terminal-job-fallback {
  display: grid;
  gap: 12px;
}

.wifi-inactive-radios {
  grid-column: 1 / -1;
  overflow: clip;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-sm);
  background: var(--cc-surface-subtle);
}

.wireless-survey-grid > :only-child {
  grid-column: 1 / -1;
}

.wifi-inactive-radios > summary {
  min-height: 40px;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--cc-text-soft);
  font-size: 12px;
  font-weight: 650;
}

.wifi-inactive-radios[open] > summary {
  border-bottom: 1px solid var(--cc-border);
}

.wifi-inactive-radio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.scan-history-workspace-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.scan-history-index,
.scan-history-result-panel {
  min-width: 0;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: #fff;
}

.scan-history-index {
  overflow: clip;
}

.scan-history-index .wifi-history-rows-full,
.scan-history-index .bt-history-rows-full {
  max-height: 620px;
  overflow-y: auto;
}

.scan-history-index [data-progressive-row][hidden] {
  display: none !important;
}

.scan-history-result-panel {
  padding: 12px;
}

.scan-failure-state {
  border-left: 3px solid var(--cc-danger);
  border-radius: var(--cc-radius-sm);
  padding: 10px 12px;
  background: #fff4f5;
  color: var(--cc-text-soft);
}

.scan-failure-state strong {
  color: var(--cc-danger);
}

.scan-failure-state p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.diagnostic-empty-state {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 4px;
  border: 1px dashed var(--cc-border-strong);
  border-radius: var(--cc-radius);
  padding: 20px;
  color: var(--cc-muted);
  text-align: center;
  background: var(--cc-surface-subtle);
}

.diagnostic-empty-state strong {
  color: var(--cc-text);
}

.scan-history-row.selected,
.bt-history-row.selected {
  background: var(--cc-accent-soft);
  box-shadow: inset 3px 0 0 var(--cc-accent);
}

.bt-scan-controls,
.wifi-scan-controls,
.device-page-title {
  min-width: 0;
}

.bt-scan-controls,
.wifi-scan-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cell-at-advanced {
  margin-top: 14px;
  overflow: clip;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: var(--cc-surface-subtle);
}

.cell-at-advanced > summary,
.notification-rules-disclosure > summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--cc-text-soft);
}

.cell-at-advanced-body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--cc-border);
  padding: 12px;
}

.notification-rules-disclosure {
  padding: 0 !important;
  overflow: clip;
}

.notification-rules-disclosure > summary span {
  color: var(--cc-muted);
  font-size: 11px;
}

.notification-rules-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--cc-border);
  padding: 14px;
}

.template-target-picker {
  margin: -4px 0 12px;
  border-bottom: 1px solid var(--cc-border);
  padding-bottom: 10px;
}

.template-target-picker fieldset {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
}

.template-target-picker legend {
  float: left;
  margin-right: 8px;
  color: var(--cc-text-soft);
  font-size: 11px;
  font-weight: 650;
}

.template-target-picker .check-list {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.template-target-picker .check-row {
  min-height: 34px;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--cc-surface-subtle);
}

.edge-list-toolbar .search-box {
  flex: 1 1 260px;
}

.toolbar-select select {
  min-width: 128px;
}

.network-edge-readiness {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  border-left-width: 3px;
  border-radius: var(--cc-radius-sm);
  padding: 6px 9px;
  box-shadow: none;
}

.network-edge-readiness strong {
  flex: 0 1 auto;
  font-size: 12px;
}

.network-edge-readiness > span:not(.status-badge) {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--cc-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-edge-readiness .button {
  min-height: 30px;
  margin-left: auto;
}

.network-test-device-preview {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  border-left-width: 3px;
  padding: 8px;
}

.network-test-device-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.network-test-device-line small {
  min-width: 0;
  flex: 1;
  text-align: right;
}

.network-test-choice-grid {
  grid-column: auto;
}

.network-test-choice {
  min-height: 42px;
  padding: 5px 7px;
}

.network-target-preset-grid {
  display: flex;
  flex-wrap: wrap;
}

.network-target-preset.button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  text-align: center;
}

.network-test-advanced > summary {
  min-height: 44px;
}

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

.log-nav {
  margin-top: -4px;
}

/* Shared appearance for device and edge workspaces. */
.device-path-disclosure .device-flow { --flow-panel: #fff; --flow-panel-2: #fff; --flow-text: var(--cc-text); --flow-muted: var(--cc-muted); --flow-line: var(--cc-border); border: 0; border-radius: 0; background: var(--cc-surface); box-shadow: none; padding: 16px; }
.device-path-disclosure .device-flow :is(.device-flow-title,.device-flow-hop-value,.device-flow-hop.is-public .device-flow-hop-value,.device-flow-hop.is-edge .device-flow-hop-value,.device-flow-hop.is-core .device-flow-hop-value,.device-flow-hop.is-gateway .device-flow-hop-value) { color: var(--cc-text); font-weight: 550; }
.device-path-disclosure .device-flow :is(.device-flow-subtitle,.device-flow-hop-label,.device-flow-hop-note,.device-flow-route) { color: var(--cc-muted); }
.device-path-disclosure .device-flow-hop, .device-path-disclosure .device-flow-hop.is-public, .device-path-disclosure .device-flow-hop.is-public.is-focus { background: var(--cc-surface-subtle); border-color: var(--cc-border); box-shadow: none; }
.device-path-disclosure .device-flow-hop .device-flow-hop-icon, .device-path-disclosure .device-flow-head-icon { color: var(--cc-accent); background: transparent; border-color: var(--cc-border); box-shadow: none; }
.device-path-disclosure .device-flow-link-line { background: var(--cc-border-strong); box-shadow: none; }
.device-path-disclosure .device-flow-link-chevron { border-color: var(--cc-border-strong); }
.device-path-disclosure .device-flow-route, .device-path-disclosure .device-wan-ip-history { background: transparent; border-color: var(--cc-border); box-shadow: none; }
.device-overview-topline { margin-bottom: 10px; }
.device-overview-topline :is(.device-stat,.device-flow-meta-bit) { background: transparent; border: 0; box-shadow: none; }
.device-overview-topline :is(.device-stat b,.device-flow-meta-bit b) { color: var(--cc-text-soft); font-size: 11px; font-weight: 500; }
.device-overview-topline :is(.device-stat svg,.device-flow-meta-bit svg) { color: var(--cc-muted); }
.device-tool-tree-head h1 { font-weight: 600; }
.goodcloud-device-tabs a, .operations-subnav a { font-weight: 500; }
.edge-detail-title h1 { font-weight: 600; }
.edge-detail-summary { border-radius: 6px; }
.edge-console-nav-copy b, .edge-console-panel-heading h2 { font-weight: 550; }
.edge-console-nav-icon { background: transparent; box-shadow: none; border-color: transparent; }
.edge-console-nav-item { min-height: 48px; border-radius: 5px; }
.edge-console-panel { border-radius: 6px; box-shadow: none; }
.edge-console-panel-head { padding: 16px; }
.edge-console-state-pill, .edge-detail-status { font-weight: 500; }
.agent-artifact-catalog-strip { margin-bottom: 20px; }
@media (max-width: 760px) {
  .overview-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .overview-metrics { gap: 12px; margin-bottom: 20px; }
  .overview-metrics .summary-cell > strong { font-size: 22px; }
  .overview-metrics .summary-cell > small { font-size: 10px; }
  .workspace-location { display: none; }
  .topbar-search { width: auto; max-width: none; flex: 1; }
}


/* Keep list content legible without competing card treatments. */
.network-test-history-layout { display: grid; gap: 20px; }
.network-test-history-layout .test-runner { max-width: none; }
.artifact-catalog-disclosure { margin-bottom: 20px; border: 1px solid var(--cc-border); border-radius: 6px; }
.artifact-catalog-disclosure > summary { padding: 12px 16px; display: flex; justify-content: space-between; color: var(--cc-text-soft); font-size: 12px; cursor: pointer; }
.artifact-catalog-disclosure > summary span { color: var(--cc-muted); font-size: 11px; }
.artifact-catalog-disclosure .agent-artifact-strip { margin: 0; border: 0; border-top: 1px solid var(--cc-border); border-radius: 0; }
.automation-table td:first-child strong { display: block; white-space: normal; overflow-wrap: anywhere; font-weight: 550; }
.automation-table th:nth-child(1) { width: 28%; }
.automation-table th:nth-child(2) { width: 24%; }
.automation-table th:nth-child(3) { width: 14%; }
.automation-table th:nth-child(4) { width: 14%; }
.automation-table th:nth-child(5) { width: 20%; }
.automation-table .automation-row-actions { gap: 10px; }
.device-fleet-table :is(th,td strong), .goodcloud-stat-table strong { font-weight: 550; }
.device-fleet-table th { color: var(--cc-muted); font-size: 11px; }
.goodcloud-stat-table td, .device-kv-table td { font-size: 12px; }
.device-kv-table td:nth-child(2) { font-weight: 500; }
.goodcloud-device-tabs a { font-size: 12px; font-weight: 500; }
.device-tool-tree { box-shadow: none; border: 1px solid var(--cc-border); }
.app-shell.device-focus-mode .workspace-topbar { background: var(--cc-surface); }
.console-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 500; color: var(--cc-text-soft); cursor: pointer; }
.console-panel > summary :is(strong,b) { font-weight: 500; }
.summary-cell.good, .summary-cell.warn, .summary-cell.bad { border-top: 0; }

.device-page-title { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; margin-bottom: 12px; }
.device-page-title h2 { font-size: 20px; font-weight: 600; }
.stack-form label.check-row { display: flex; align-items: center; gap: 8px; }
.stack-form label.check-row input[type="checkbox"] { width: 14px; flex: 0 0 14px; }
.stack-form > .button { justify-self: start; }
.backup-description { padding: 0 18px 14px; color: var(--cc-muted); font-size: 12px; }
.backup-snapshot-table { table-layout: fixed; }
.backup-snapshot-table th:first-child { width: 28%; }
.backup-snapshot-table th:nth-child(2) { width: 22%; }
.backup-snapshot-table th:last-child { width: 18%; }
.backup-snapshot-table td { vertical-align: top; white-space: normal; }
.backup-snapshot-table details > summary { cursor: pointer; color: var(--cc-text-soft); font-size: 12px; font-weight: 400; }
.backup-file-list, .backup-full-hash { display: block; margin-top: 8px; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .sidebar { box-shadow: none; }
  .app-shell.mobile-nav-open .sidebar { box-shadow: 18px 0 54px rgba(5,18,23,.18); }
}
/* Responsive shell */

@container (max-width: 1200px) {
  .device-fleet-table :is(.device-col-mac, .device-col-serial),
  .edge-fleet-table :is(.edge-col-ip, .edge-col-version) {
    display: none;
  }
}

@container (max-width: 980px) {
  .device-fleet-table :is(.device-col-model, .device-col-uptime) {
    display: none;
  }
}

@container (max-width: 850px) {
  .network-test-history-table :is(.col-phase, .col-down, .col-up, .col-latency, .col-iperf) {
    display: none;
  }
}

@media (max-width: 1180px) {
  .view {
    padding-right: 22px;
    padding-left: 22px;
  }

  .workspace-topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .device-workspace-shell {
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 14px;
  }

  .device-tool-tree {
    width: 224px;
  }

}

@media (max-width: 980px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    display: grid;
    width: min(292px, calc(100vw - 48px));
    height: 100dvh;
    transform: translateX(-104%);
    box-shadow: none;
    transition: transform 210ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .app-shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(7, 22, 27, 0.46);
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .app-shell.mobile-nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-topbar {
    position: sticky;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px 14px;
  }

  .device-list-mode .workspace-topbar,
  .edge-list-mode .workspace-topbar,
  .edge-focus-mode .workspace-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .device-list-mode .notification-button,
  .edge-list-mode .notification-button,
  .edge-focus-mode .notification-button {
    grid-column: 3;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--cc-border);
    border-radius: 9px;
    background: #fff;
    color: var(--cc-text-soft);
    padding: 0;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
  }

  .topbar-stats {
    display: none;
  }

  .topbar-search {
    width: 100%;
    max-width: none;
  }

  .device-focus-mode .mobile-nav-toggle {
    display: none;
  }

  .device-focus-mode .workspace-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .device-workspace-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .device-tool-tree {
    position: static;
    width: 100%;
    max-height: none;
  }

  .device-tool-tree-head {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    border-bottom: 0;
    padding: 5px;
  }

  .device-tool-tree-head > strong,
  .device-tool-tree-head > small {
    grid-column: 1;
  }

  .device-tree-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .device-tree-head-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .device-focus-exit,
  .device-tree-mobile-toggle {
    min-height: 34px;
    margin: 0;
    white-space: nowrap;
  }

  .device-tree-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(216, 231, 234, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #c9dadd;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
  }

  .device-tree-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
  }

  .device-tree-mobile-toggle svg {
    width: 13px;
    height: 13px;
    margin: 0;
    transition: transform 160ms ease;
  }

  .device-tree-root.mobile-tree-open .device-tree-mobile-toggle svg {
    transform: rotate(180deg);
  }

  /* Nav body collapses; global actions stay visible (sole home for Settings/Refresh/Reboot). */
  .device-tree-root:not(.mobile-tree-open) .device-tree-body {
    display: none;
  }

  .device-tree-root .device-tree-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .device-tree-root.mobile-tree-open .device-tree-body {
    margin-top: 4px;
    border-top: 1px solid rgba(216, 231, 234, 0.1);
    padding-top: 8px;
  }
}

@media (max-width: 700px) {
  .view,
  .workspace-topbar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .view {
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .page-head,
  .devices-header,
  .device-titlebar,
  .device-utilitybar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .page-head {
    margin-bottom: 12px;
  }

  h1,
  .devices-header h1 {
    font-size: 24px;
  }

  .page-head .button-row,
  .devices-header-actions {
    justify-content: flex-start;
  }

  .page-head .button-row .button,
  .devices-header-actions .button {
    flex: 1 1 auto;
  }

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

  .summary-cell {
    min-height: 98px;
    padding: 14px;
  }

  .summary-cell strong {
    font-size: 24px;
  }

  .console-grid {
    gap: 12px;
  }

  .console-grid > .console-panel:not(.table-panel),
  .dashboard-fleet-grid > .console-panel:not(.table-panel),
  .dashboard-secondary-grid > .console-panel:not(.table-panel) {
    padding: 15px;
  }

  .toolbar.tight {
    align-items: stretch;
  }

  .toolbar.tight input[type="search"],
  .toolbar.tight .button {
    width: 100%;
  }

  .progressive-table-footer {
    align-items: stretch;
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .progressive-table-footer .button {
    width: 100%;
    margin-left: 0;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .login-card {
    padding: 22px;
  }

  .goodcloud-device-hero {
    padding: 14px;
  }

  .device-tree-root.mobile-tree-open .device-tree-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .device-fleet-table :is(.device-col-capabilities, .device-col-model, .device-col-ip, .device-col-seen),
  .edge-fleet-table :is(.edge-col-host, .edge-col-services, .edge-col-seen),
  .network-test-history-table :is(.col-created, .col-profile, .col-phase, .col-down, .col-up, .col-latency, .col-iperf),
  .device-diagnostic-history-table :is(.col-created, .col-profile, .col-phase, .col-down, .col-up, .col-latency, .col-iperf),
  .command-history-table .col-created,
  .audit-log-table :is(.col-kind, .col-status),
  .alert-log-table .col-trigger,
  .device-client-table :is(.col-mac, .col-interface) {
    display: none;
  }

  .device-fleet-table .device-col-name,
  .edge-fleet-table .edge-col-name,
  .priority-table :is(.col-device, .col-content),
  .device-client-table .col-name {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .device-fleet-table .device-col-name,
  .edge-fleet-table .edge-col-name {
    width: 42%;
  }

  .priority-table th,
  .priority-table td,
  .device-fleet-table th,
  .device-fleet-table td,
  .edge-fleet-table th,
  .edge-fleet-table td {
    padding-right: 8px;
    padding-left: 8px;
  }

  .network-test-history-table .table-action-row {
    display: grid;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  .workspace-topbar {
    gap: 7px;
  }

  .mobile-nav-toggle,
  .notification-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .topbar-search {
    min-height: 38px;
    padding: 0 10px;
  }

  .topbar-search input {
    font-size: 12px;
  }

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

  .device-tool-tree-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-tree-head-top {
    width: 100%;
  }

  .device-tree-head-controls {
    margin-top: 0;
  }

  .summary-cell {
    min-height: 90px;
  }

  .devices-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .devices-header-actions .search-box {
    grid-column: 1 / -1;
    width: 100%;
  }

  .devices-header-actions .button:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }

  th,
  td {
    padding: 10px 11px;
  }

  .log-nav {
    flex-wrap: nowrap;
    margin-right: -12px;
    margin-left: -12px;
    overflow-x: auto;
    padding: 0 12px 4px;
    scrollbar-width: none;
  }

  .log-nav::-webkit-scrollbar {
    display: none;
  }

  .log-nav a {
    flex: none;
  }

  .alert-log-table .col-created {
    display: none;
  }
}

@media (max-width: 1240px) {
  .edge-offering-section-grid,
  .edge-ops-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .edge-detail-utilitybar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .edge-detail-utilitybar .button-row {
    flex-wrap: nowrap;
    gap: 5px;
    margin-left: auto;
  }

  .edge-detail-utilitybar .button {
    min-height: 32px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .edge-detail-summary {
    padding: 10px;
  }

  .edge-detail-facts > div,
  .edge-detail-facts > div:nth-child(4) {
    border-top: 0;
    border-left: 1px solid var(--cc-border);
    padding: 0 7px;
  }

  .edge-detail-facts > div:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .edge-offering-navigation {
    padding-right: 6px;
    padding-left: 6px;
  }

  .edge-offering-panel {
    gap: 7px;
    padding: 7px;
  }

  .edge-offering-settings,
  .edge-offering-activity {
    padding: 0;
  }

  .edge-offering-form,
  .edge-ops-form {
    grid-template-columns: 1fr;
  }

  .edge-offering-panel .edge-control-fields,
  .edge-ops-fields {
    grid-template-columns: 1fr 1fr;
  }

  .edge-offering-panel .edge-control-actions,
  .edge-ops-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .edge-ops-toolbar {
    flex-wrap: wrap;
  }

  .edge-ops-field,
  .edge-ops-field.grow {
    flex: 1 1 calc(50% - 6px);
  }

  .edge-offering-panel .edge-service-peer-row,
  .edge-ops-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .edge-offering-panel .edge-service-peer-main {
    grid-column: 1;
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .edge-offering-panel .edge-service-peer-row > [data-edge-ipsec-action="leave"],
  .edge-offering-panel .edge-service-peer-row > [data-edge-wireguard-action="detach"],
  .edge-ops-row-actions {
    grid-column: 2;
    justify-self: end;
  }

  .edge-ops-listen-row {
    grid-template-columns: 44px 40px minmax(0, 1fr) minmax(52px, auto);
  }

  .edge-ops-listen-row small {
    display: none;
  }

  .edge-event-grid,
  .edge-ops-event-grid {
    grid-template-columns: 1fr;
  }

  .edge-event-grid .edge-event-row,
  .edge-ops-event-grid .edge-event-row {
    grid-template-columns: minmax(58px, 0.5fr) minmax(0, 1fr) 18px;
  }

  .edge-event-grid .edge-event-row time,
  .edge-ops-event-grid .edge-event-row time {
    display: none;
  }
}

@media (max-width: 460px) {
  .edge-detail-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .edge-detail-title {
    max-width: none;
  }

  .edge-detail-title h1 {
    font-size: 19px;
  }

  .edge-detail-status {
    width: auto;
  }

  .edge-offering-tab {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .edge-offering-panel .edge-control-actions {
    display: flex;
    width: auto;
  }

  .edge-offering-panel .edge-control-actions .button {
    width: auto;
  }
}

@media (max-width: 980px) {
  .sidebar .nav,
  .sidebar .nav-tree-panel-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar .nav > *,
  .sidebar .nav-tree-panel-inner > * {
    width: 100%;
    min-width: 0;
    grid-column: 1;
  }

  .device-tool-tree-head > h1,
  .device-tool-tree-head > small {
    grid-column: 1;
  }

  .device-overview-data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .network-test-layout,
  .notification-rules-layout,
  .scan-history-workspace-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-runner {
    position: static;
  }

  .wifi-inactive-radio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-head {
    gap: 9px;
  }

  .page-head .button-row .button,
  .devices-header-actions .button {
    min-height: 40px;
    flex: 0 1 auto;
  }

  .button:not(.icon-button),
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 40px;
  }

  .summary-cell {
    min-height: 82px;
    padding: 11px;
  }

  .summary-cell strong {
    font-size: 21px;
  }

  .device-page-title {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .bt-scan-controls,
  .wifi-scan-controls {
    justify-content: flex-start;
  }

  .network-edge-readiness {
    align-items: center;
    flex-wrap: wrap;
  }

  .network-edge-readiness > span:not(.status-badge) {
    flex-basis: calc(100% - 110px);
  }

  .network-edge-readiness .button {
    margin-left: 0;
  }

  .network-test-device-line {
    flex-wrap: wrap;
  }

  .network-test-device-line small {
    flex-basis: 100%;
    text-align: left;
  }

  .network-test-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edge-list-toolbar {
    align-items: stretch;
  }

  .edge-list-toolbar .search-box {
    flex-basis: 100%;
  }

  .toolbar-select,
  .toolbar-select select {
    flex: 1 1 auto;
    width: 100%;
  }

  .template-target-picker fieldset,
  .template-target-picker .check-list {
    align-items: stretch;
    flex-direction: column;
  }

  .template-target-picker legend {
    float: none;
  }

  .template-target-picker .check-row {
    border-radius: var(--cc-radius-sm);
  }

  .log-nav {
    flex-wrap: wrap;
    margin-right: 0;
    margin-left: 0;
    overflow: visible;
    padding: 0;
  }

  .log-nav a {
    min-height: 40px;
    flex: 1 1 auto;
    justify-content: center;
  }

  .toolbar.tight input[type="search"] {
    height: 40px;
    min-height: 40px;
    flex: 0 0 auto;
  }

  .wifi-inactive-radio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .scan-history-index .wifi-history-rows-full,
  .scan-history-index .bt-history-rows-full {
    max-height: 460px;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) thead {
    display: none;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) tbody {
    display: grid;
    gap: 9px;
    padding: 9px;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-sm);
    background: #fff;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) tr[hidden] {
    display: none !important;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) td {
    position: static !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-width: 0;
    border-bottom: 1px solid var(--cc-border);
    padding: 8px 10px;
    background: #fff !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) td:last-child {
    border-bottom: 0;
  }

  :is(
    .agent-upgrade-table,
    .agent-upgrade-jobs-table,
    .recent-alerts-table,
    .alert-rules-table,
    .templates-table,
    .site-network-table,
    .command-history-table,
    .audit-log-table
  ) td::before {
    color: var(--cc-muted);
    font-size: 10px;
    font-weight: 720;
    letter-spacing: 0.035em;
    text-transform: uppercase;
  }

  :is(.agent-upgrade-table, .agent-upgrade-jobs-table, .recent-alerts-table, .alert-rules-table, .templates-table, .site-network-table, .command-history-table, .audit-log-table) .empty-cell {
    display: block !important;
  }

  :is(.agent-upgrade-table, .agent-upgrade-jobs-table, .recent-alerts-table, .alert-rules-table, .templates-table, .site-network-table, .command-history-table, .audit-log-table) td[colspan] {
    display: block !important;
  }

  :is(.agent-upgrade-table, .agent-upgrade-jobs-table, .recent-alerts-table, .alert-rules-table, .templates-table, .site-network-table, .command-history-table, .audit-log-table) .empty-cell::before {
    display: none;
  }

  :is(.agent-upgrade-table, .agent-upgrade-jobs-table, .recent-alerts-table, .alert-rules-table, .templates-table, .site-network-table, .command-history-table, .audit-log-table) td[colspan]::before {
    display: none;
  }

  .agent-upgrade-table td:nth-child(1)::before { content: "Device"; }
  .agent-upgrade-table td:nth-child(2)::before { content: "Current"; }
  .agent-upgrade-table td:nth-child(3)::before { content: "Target"; }
  .agent-upgrade-table td:nth-child(4)::before { content: "Arch"; }
  .agent-upgrade-table td:nth-child(5)::before { content: "State"; }
  .agent-upgrade-table td:nth-child(6)::before { content: "Reason"; }
  .agent-upgrade-table td:nth-child(7)::before { content: "Action"; }
  .agent-upgrade-jobs-table td:nth-child(1)::before { content: "Created"; }
  .agent-upgrade-jobs-table td:nth-child(2)::before { content: "Device"; }
  .agent-upgrade-jobs-table td:nth-child(3)::before { content: "Target"; }
  .agent-upgrade-jobs-table td:nth-child(4)::before { content: "Status"; }
  .agent-upgrade-jobs-table td:nth-child(5)::before { content: "Command"; }
  .recent-alerts-table td:nth-child(1)::before { content: "Time"; }
  .recent-alerts-table td:nth-child(2)::before { content: "Severity"; }
  .recent-alerts-table td:nth-child(3)::before { content: "Device"; }
  .recent-alerts-table td:nth-child(4)::before { content: "Trigger"; }
  .recent-alerts-table td:nth-child(5)::before { content: "Message"; }
  .recent-alerts-table td:nth-child(6)::before { content: "Payload"; }
  .alert-rules-table td:nth-child(1)::before { content: "Name"; }
  .alert-rules-table td:nth-child(2)::before { content: "Status"; }
  .alert-rules-table td:nth-child(3)::before { content: "Trigger"; }
  .alert-rules-table td:nth-child(4)::before { content: "Severity"; }
  .alert-rules-table td:nth-child(5)::before { content: "Scope"; }
  .alert-rules-table td:nth-child(6)::before { content: "Action"; }
  .alert-rules-table td:nth-child(7)::before { content: "Updated"; }
  .alert-rules-table td:nth-child(8)::before { content: "Controls"; }
  .templates-table td:nth-child(1)::before { content: "Updated"; }
  .templates-table td:nth-child(2)::before { content: "Name"; }
  .templates-table td:nth-child(3)::before { content: "Description"; }
  .templates-table td:nth-child(4)::before { content: "Body"; }
  .templates-table td:nth-child(5)::before { content: "Apply"; }
  .site-network-table td:nth-child(1)::before { content: "Created"; }
  .site-network-table td:nth-child(2)::before { content: "Name"; }
  .site-network-table td:nth-child(3)::before { content: "Main"; }
  .site-network-table td:nth-child(4)::before { content: "CIDR"; }
  .site-network-table td:nth-child(5)::before { content: "Nodes"; }
  .site-network-table td:nth-child(6)::before { content: "Policy"; }
  .site-network-table td:nth-child(7)::before { content: "Configs"; }
  .command-history-table td:nth-child(1)::before { content: "Created"; }
  .command-history-table td:nth-child(2)::before { content: "Device"; }
  .command-history-table td:nth-child(3)::before { content: "Type"; }
  .command-history-table td:nth-child(4)::before { content: "Status"; }
  .command-history-table td:nth-child(5)::before { content: "Payload"; }
  .audit-log-table td:nth-child(1)::before { content: "Created"; }
  .audit-log-table td:nth-child(2)::before { content: "Type"; }
  .audit-log-table td:nth-child(3)::before { content: "Device"; }
  .audit-log-table td:nth-child(4)::before { content: "Activity"; }
  .audit-log-table td:nth-child(5)::before { content: "Status"; }
  .audit-log-table td:nth-child(6)::before { content: "Details"; }
}

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

  .device-tool-tree-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-tool-tree-head > h1,
  .device-tool-tree-head > small {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-scrim,
  .skip-link,
  .button,
  .action-menu summary,
  tbody tr,
  .edge-offering-tab-item {
    transition: none;
  }

  .route-loading-spinner {
    animation: none;
  }
}

@media (max-width: 620px) {
  .panel-title { flex-direction: row; align-items: center; text-align: left; }
  .panel-title h2 { font-size: 14px; }
  .overview-device-table td { padding: 14px 10px; }
  .network-test-history-table, .network-test-history-table tbody, .automation-table, .automation-table tbody { display: block; width: 100%; min-width: 0; }
  .network-test-history-table thead, .automation-table thead { display: none; }
  .network-test-history-table tbody tr, .automation-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px; border-bottom: 1px solid var(--cc-border); }
  .network-test-history-table.is-dense td, .automation-table td { display: block; width: auto; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .network-test-history-table .col-device { grid-column: 1; grid-row: 1; font-weight: 550; color: var(--cc-text); }
  .network-test-history-table .col-status { grid-column: 2; grid-row: 1; }
  .network-test-history-table .col-type { grid-column: 1; grid-row: 2; }
  .network-test-history-table .col-created { display: block; grid-column: 2; grid-row: 2; font-size: 11px; color: var(--cc-muted); text-align: right; }
  .network-test-history-table.is-dense :is(.col-profile,.col-phase,.col-score,.col-down,.col-up,.col-latency,.col-iperf) { display: none; }
  .network-test-history-table .col-actions { grid-column: 1 / -1; margin-top: 6px; }
  .network-test-history-table .table-action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
  .automation-table td:first-child, .automation-table .automation-pipeline-cell, .automation-table .automation-actions-cell { grid-column: 1 / -1; }
  .automation-table td:first-child strong { font-size: 12px; }
  .automation-table .automation-pipeline-cell code { font-size: 11px; white-space: normal; }
  .automation-table .automation-life-cell, .automation-table .automation-assigned-cell { font-size: 11px; max-width: none; }
  .automation-table .automation-row-actions { justify-content: flex-end; padding-top: 6px; }
  .device-kv-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 620px) {
  .backup-snapshot-table { font-size: 11px; }
  .backup-snapshot-table th:first-child { width: 28%; }
  .backup-snapshot-table th, .backup-snapshot-table td { padding: 10px 6px; }
  .backup-snapshot-table td:first-child { overflow-wrap: anywhere; }
  .backup-snapshot-table .button { font-size: 11px; min-height: 32px; padding: 5px 7px; }
}
