:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #64748b;
  --line: #d8dee6;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --background: #eef2f6;
  --nav: #0f172a;
  --nav-soft: #1e293b;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --blue: #2563eb;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #166534;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
}

select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
}

.hidden {
  display: none !important;
}

/* Keep standard portal checkboxes compact and consistent. Custom control
   switches use their own hidden input and track styling. */
input[type="checkbox"]:not([data-control-toggle]) {
  flex: 0 0 14px;
  height: 14px;
  margin: 0;
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.auth-loading-screen {
  align-items: center;
  background: var(--background);
  color: var(--ink);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 100vh;
}

.auth-loading-screen > div:last-child {
  display: grid;
  gap: 2px;
}

.auth-loading-screen span {
  color: var(--muted);
  font-size: 13px;
}

.auth-loading-mark {
  align-items: center;
  background: var(--nav);
  border-radius: 8px;
  color: white;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.login-screen {
  align-items: center;
  background: var(--background);
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-card {
  background: var(--nav);
  border-radius: 8px;
  color: white;
  display: grid;
  gap: 18px;
  max-width: 430px;
  padding: 24px;
  width: min(100%, 430px);
}

.login-brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.app {
  min-height: 100vh;
  display: block;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: var(--nav);
  color: white;
}

.brand-block {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 16px;
}

.brand-status {
  display: inline-flex;
  margin-top: 8px;
  color: #bdd0e5;
  font-size: 12px;
  font-weight: 700;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  border-radius: 6px;
  color: #dbeafe;
  padding: 9px 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.side-nav a:hover {
  background: var(--nav-soft);
}

.login {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

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

.login label {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #9fb6c5;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 19px;
}

h3 {
  font-size: 15px;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  margin: 12px 0 0;
  color: #d6f5f1;
  font-size: 12px;
}

.download-link {
  display: block;
  margin-top: 10px;
  color: #d6f5f1;
  font-size: 13px;
  font-weight: 700;
}

.secondary-link {
  font-weight: 600;
}

.workspace {
  min-width: 0;
  padding: 18px;
}

.topbar,
.panel-head,
.remote-head,
.selected-header,
.tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  margin-bottom: 14px;
}

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

.view-toggle {
  display: inline-flex;
  gap: 6px;
}

.view-toggle button.active,
.view-toggle a.active {
  background: var(--nav);
  color: white;
}

.top-menu {
  position: relative;
}

.top-menu-panel {
  display: none;
  min-width: 340px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
}

.top-menu:hover .top-menu-panel,
.top-menu:focus-within .top-menu-panel {
  display: block;
}

.top-menu-panel pre {
  color: var(--ink);
  max-height: 220px;
}

.top-menu-panel .download-link {
  color: var(--accent);
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px 14px;
}

.metric span,
.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.device-list-panel,
.selected-device-panel {
  margin-bottom: 14px;
}

.admin-panel {
  margin-bottom: 14px;
}

.activity-panel {
  margin-bottom: 14px;
}

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

.table-actions input {
  width: 240px;
}

.table-actions select,
.page-size select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 8px;
}

.fleet-console {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  margin-top: 10px;
  min-height: 470px;
  overflow: hidden;
}

.client-browser {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.client-browser-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: 40px;
  padding: 0 10px;
}

.client-tree {
  max-height: 610px;
  overflow: auto;
  padding: 6px;
}

.tree-item {
  align-items: center;
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 8px;
  text-align: left;
  width: 100%;
}

.tree-item:hover,
.tree-item.active {
  background: #d9eeee;
  color: #0f4f4a;
}

.tree-item strong {
  color: var(--muted);
  font-size: 12px;
}

.tree-group {
  display: grid;
  gap: 2px;
}

.tree-parent-row {
  display: grid;
  gap: 6px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  justify-content: initial;
  padding: 0 8px 0 4px;
}

.tree-toggle,
.tree-label {
  background: transparent;
  color: inherit;
  min-height: 0;
  padding: 0;
}

.tree-toggle {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  margin: 0;
  width: 20px;
}

.tree-toggle:hover,
.tree-label:hover {
  background: transparent;
}

.tree-label {
  align-items: center;
  color: inherit;
  display: flex;
  font-size: inherit;
  font-weight: inherit;
  justify-content: space-between;
  text-align: left;
  width: 100%;
}

.tree-children {
  display: grid;
  gap: 2px;
}

.site-item {
  color: #526070;
  font-size: 11px;
  font-weight: 600;
  min-height: 24px;
  padding-left: 24px;
}

.client-item {
  font-size: 12px;
  font-weight: 700;
}

.client-tree > .tree-item {
  font-size: 12px;
}

.client-tree .tree-item strong {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.device-grid-area {
  min-width: 0;
  padding: 0 0 10px;
}

.table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
}

.fleet-console .table-wrap {
  border: 0;
  border-radius: 0;
  margin-top: 0;
  max-height: 610px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
}

.sort-button {
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  text-align: left;
}

.sort-button:hover,
.sort-button.active {
  background: transparent;
  color: var(--accent);
}

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

.client-admin-row {
  cursor: pointer;
}

.client-admin-row:hover td {
  background: #eef7f6;
}

.client-admin-row.selected td {
  background: #dff3f0;
}

.client-admin-row.selected td:first-child {
  box-shadow: inset 3px 0 0 #0f766e;
}

.device-row {
  cursor: pointer;
}

.device-row:hover td,
.device-row:focus td {
  background: #f8fafc;
}

.device-row.active td {
  background: #e6f7f5;
}

.grid-controls {
  align-items: center;
  display: flex;
  gap: 5px;
  min-width: 0;
}

.remote-icon-button {
  align-items: center;
  background: var(--accent);
  border-radius: 4px;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  min-height: 20px;
  padding: 0;
  width: 24px;
}

.remote-icon-button:hover {
  background: var(--accent-dark);
}

.remote-mode-button {
  border-radius: 4px;
  font-size: 11px;
  min-height: 20px;
  padding: 2px 7px;
  white-space: nowrap;
}

.monitor-icon {
  border: 2px solid currentColor;
  border-radius: 2px;
  display: inline-block;
  height: 11px;
  position: relative;
  width: 15px;
}

.monitor-icon::after {
  background: currentColor;
  bottom: -5px;
  content: "";
  height: 2px;
  left: 3px;
  position: absolute;
  width: 7px;
}

.pager {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-height: 44px;
  padding: 7px 10px 0;
}

.page-size {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  text-transform: uppercase;
}

.status-pill,
.capability {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pill.online,
.capability.enabled {
  background: #dcfce7;
  color: var(--ok);
}

.status-pill.stale {
  background: #fef3c7;
  color: var(--warn);
}

.status-pill.offline,
.capability.disabled {
  background: #fee2e2;
  color: var(--danger);
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.header-caps {
  margin-top: 8px;
}

.device-meta-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto auto;
  min-width: min(100%, 760px);
}

.device-meta-form label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  text-transform: uppercase;
}

.device-meta-form input {
  min-height: 32px;
}

.device-meta-form select {
  min-height: 32px;
}

.admin-grid,
.admin-lists {
  display: grid;
  gap: 12px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.admin-lists {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.admin-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-form label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  text-transform: uppercase;
}

.compact-head {
  gap: 8px;
}

.admin-table-wrap {
  max-height: 420px;
}

.admin-users-layout {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
}

.admin-users-grid-card,
.admin-role-permissions-card {
  width: 100%;
}

.admin-users-grid-card .admin-table-wrap {
  max-height: min(52vh, 620px);
  overflow: auto;
}

.admin-users-grid-card table {
  min-width: 940px;
  width: 100%;
}

.admin-users-grid-card thead th {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-role-permissions-card #adminRolePermissions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-role-permissions-card .role-permission-unsaved {
  grid-column: 1 / -1;
}

.admin-role-permissions-card .permission-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0;
  min-width: 0;
  padding: 9px;
}

.admin-user-dialog form > label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.entity-dialog form > label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.admin-user-dialog label .meta {
  font-weight: 400;
  text-transform: none;
}

.dialog-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

@media (max-width: 1000px) {
  .admin-role-permissions-card #adminRolePermissions { grid-template-columns: 1fr; }
}

.activity-panel-content {
  min-height: 520px;
  padding-top: 10px;
}

.activity-page-shell .tab-toolbar {
  margin-bottom: 10px;
}

.activity-page-shell .activity-summary {
  margin-top: 0;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.row-actions button {
  min-height: 26px;
  padding: 0 8px;
}

.activity-row-button.active {
  background: #0f766e;
  color: #fff;
}

.grid-icon-button {
  align-items: center;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  min-width: 26px;
  padding: 3px 5px;
  width: 26px;
}

.grid-icon-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.activity-row-button:not(.active) .activity-indicator {
  fill: #94a3b8;
  stroke: #94a3b8;
}

.activity-row-button.active .activity-indicator {
  fill: #86efac;
  stroke: #86efac;
}

.grid-icon-button.busy svg { animation: control-icon-pulse 0.8s ease-in-out infinite alternate; }

@keyframes control-icon-pulse {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.permission-editor {
  margin-top: 5px;
  min-width: 230px;
}

.permission-editor summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.permission-options {
  display: grid;
  gap: 0;
  padding-top: 7px;
}

.permission-options > label {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 11px;
  gap: 10px;
  justify-content: space-between;
  min-height: 31px;
  padding: 5px 3px;
  text-align: left;
}

.permission-options > label span {
  line-height: 1.25;
}

.permission-options > label input[type="checkbox"] {
  flex: 0 0 14px;
  height: 14px;
  margin: 0;
  min-height: 14px;
  padding: 0;
  width: 14px;
}

.permission-options > button {
  margin-top: 8px;
}

.policy-manager-card {
  margin: 10px 0;
  padding: 12px;
}

.policy-scope-field {
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 3px;
  min-width: 180px;
}

.scope-policy-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  margin-top: 7px;
}

.scope-policy-card {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.policy-scope-summary {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  display: flex;
  gap: 8px 14px;
  grid-column: 1 / -1;
  padding: 8px 10px;
}

.policy-scope-summary span {
  color: var(--muted);
  font-size: 11px;
}

.policy-scope-summary .policy-unsaved {
  background: #fef3c7;
  border-radius: 999px;
  color: #92400e;
  font-weight: 800;
  margin-left: auto;
  padding: 3px 8px;
}

.role-permission-unsaved {
  background: #fef3c7;
  border-radius: 5px;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  margin: 0 0 6px;
  padding: 6px 8px;
}

.scope-policy-card-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.scope-policy-card-head > strong { font-size: 13px; }

.policy-state {
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  text-align: right;
}

.policy-state.direct { background: #dcfce7; color: #166534; }
.policy-state.inherited { background: #dbeafe; color: #1d4ed8; }
.policy-state.unset { background: #f1f5f9; color: #64748b; }

.policy-deployment {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.policy-deployment > span {
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
  font-size: 9px;
  padding: 3px 6px;
}

.policy-deployment .applied { background: #dcfce7; color: #166534; }
.policy-deployment .progress { background: #fef3c7; color: #92400e; }
.policy-deployment .failed { background: #fee2e2; color: #991b1b; }
.policy-deployment .awaiting { background: #e2e8f0; color: #475569; }

.scope-policy-setting,
.policy-domains {
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 3px;
}

.scope-policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.scope-policy-actions button { flex: 1 1 105px; }

.scope-policy-card select,
.scope-policy-card input,
.scope-policy-card button { min-height: 27px; }

@media (max-width: 1100px) {
  .scope-policy-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
}

@media (max-width: 700px) {
  .scope-policy-grid { grid-template-columns: 1fr; }
}

/* Non-device workspaces occupy the available viewport and scroll independently. */
.workspace.non-device-view {
  grid-template-rows: 34px 28px minmax(0, 1fr);
  overflow: hidden;
}

.workspace.non-device-view > #clientSiteAdminPanel,
.workspace.non-device-view > #policiesPanel,
.workspace.non-device-view > #reportsPanel,
.workspace.non-device-view > #jobsPanel,
.workspace.non-device-view > #auditLogsPanel,
.workspace.non-device-view > #activityPanel,
.workspace.non-device-view > #patchesPanel,
.workspace.non-device-view > #adminUsersPanel {
  grid-row: 3;
  margin-bottom: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.workspace.report-view {
  display: block;
  position: relative;
}

.workspace.report-view > .metrics-strip {
  display: none;
}

.workspace.report-view > #reportsPanel {
  bottom: 6px;
  height: auto;
  left: 8px;
  max-height: none;
  overflow: hidden;
  position: absolute;
  right: 8px;
  top: 42px;
  width: auto;
}

@media (max-width: 820px) {
  .workspace.report-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .workspace.report-view > #reportsPanel {
    bottom: auto;
    grid-row: 2;
    height: 100%;
    left: auto;
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
  }
}

.policies-panel {
  align-content: start;
  padding: 12px;
}

.policies-panel .scope-policy-grid {
  padding-bottom: 12px;
}

.reports-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.report-filters label {
  display: grid;
  font-size: 10px;
  font-weight: 800;
  gap: 3px;
  min-width: 150px;
}

.reports-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 7px;
}

.report-summary > span {
  background: #f1f5f9;
  border-radius: 5px;
  color: #475569;
  font-size: 10px;
  padding: 5px 8px;
}

.report-summary .online { background: #dcfce7; color: #166534; }
.report-summary .stale { background: #fef3c7; color: #92400e; }
.report-summary .offline { background: #fee2e2; color: #991b1b; }

.report-table-wrap {
  flex: 1 1 auto;
  margin-top: 0;
  max-height: none;
  min-height: 220px;
  overflow: auto;
  width: 100%;
}

.report-table {
  font-size: 10px;
  min-width: 100%;
  width: max-content;
}

.report-table th {
  background: var(--surface-soft);
  cursor: grab;
  position: sticky;
  top: 0;
  z-index: 2;
}

.report-table th > button {
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  text-align: left;
}

.report-table th,
.report-table td {
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
}

.report-table th:nth-child(1) { min-width: 130px; }
.report-table th:nth-child(2) { min-width: 130px; }
.report-table th:nth-child(3) { min-width: 170px; }

.report-action-column,
.report-action-cell {
  max-width: 280px;
  min-width: 220px;
  width: 240px;
}

.report-action-cell > span {
  display: block;
  margin-bottom: 3px;
}

.report-action-cell .status-pill {
  display: inline-block;
}

.report-action-cell .action-result {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-action-cell .action-time {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 0;
}

.report-action-cell.empty-action {
  color: #94a3b8;
  text-align: center;
}

.reports-workspace {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 205px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.report-catalogue {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 4px 8px 8px 0;
}

.report-catalogue section { margin-bottom: 9px; }
.report-catalogue h3 { color: var(--muted); font-size: 10px; margin: 0 0 3px 7px; text-transform: uppercase; }
.report-catalogue button {
  background: transparent;
  color: var(--ink);
  display: block;
  font-size: 11px;
  min-height: 28px;
  padding: 4px 7px;
  text-align: left;
  width: 100%;
}
.report-catalogue button:hover,
.report-catalogue button.active { background: var(--nav-soft); color: white; }

.report-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding-left: 9px; }
.report-filter-bar { align-items: end; display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.report-filter-bar > label { display: grid; font-size: 9px; font-weight: 800; gap: 2px; min-width: 112px; }
.report-filter-bar input,
.report-filter-bar select { font-size: 11px; min-height: 29px; }
.report-filter-bar .report-search-label { flex: 1 1 170px; }
.report-actions { justify-content: flex-end; }
.report-actions button,
.report-actions select { font-size: 10px; min-height: 29px; width: auto; }
.report-column-picker { position: relative; }
.report-column-picker summary { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 11px; min-height: 29px; padding: 7px 10px; }
.report-column-picker > div { background: white; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); display: grid; gap: 4px; max-height: 280px; min-width: 190px; overflow: auto; padding: 8px; position: absolute; right: 0; top: 34px; z-index: 20; }
.report-column-picker label { align-items: center; display: flex; font-size: 10px; gap: 6px; }
.report-column-picker input { min-height: 0; width: auto; }
.report-schedules details { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 5px; font-size: 10px; margin-bottom: 6px; padding: 5px 7px; }
.report-schedules details > div { display: grid; gap: 3px; padding-top: 5px; }
.report-schedules em { color: #9a3412; }
.report-group-row td { background: #e2e8f0; color: #334155; font-weight: 800; position: sticky; left: 0; }
.report-device-link { background: transparent; color: var(--accent); font-size: inherit; min-height: 0; padding: 0; text-decoration: underline; }

.jobs-panel { display: flex; flex-direction: column; gap: 8px; overflow: hidden !important; }
.job-filters { justify-content: flex-end; }
.job-filters label { display: grid; font-size: 9px; font-weight: 800; gap: 2px; min-width: 120px; }
.job-filters input,
.job-filters select { font-size: 11px; min-height: 29px; }
.job-filters .job-search-label { min-width: 210px; }
.jobs-page-content { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.job-summary { display: grid; gap: 6px; grid-template-columns: repeat(5, minmax(100px, 1fr)); padding-bottom: 8px; }
.job-summary button { align-items: center; background: #f1f5f9; color: #475569; display: flex; gap: 7px; justify-content: flex-start; min-height: 38px; }
.job-summary button strong { font-size: 16px; }
.job-summary button span { font-size: 10px; }
.job-summary .queued,
.job-summary .running { background: #fef3c7; color: #92400e; }
.job-summary .passed { background: #dcfce7; color: #166534; }
.job-summary .failed { background: #fee2e2; color: #991b1b; }
.jobs-table-wrap { flex: 1 1 auto; max-height: none; min-height: 220px; overflow: auto; }
.jobs-table { font-size: 10px; min-width: 1500px; }
.jobs-table th { background: var(--surface-soft); position: sticky; top: 0; z-index: 2; }
.jobs-table th,
.jobs-table td { padding: 5px 6px; text-align: left; vertical-align: top; }
.jobs-table th > button { background: transparent; color: inherit; font-size: inherit; font-weight: 800; min-height: 0; padding: 0; text-align: left; white-space: nowrap; }
.jobs-table td:first-child small { color: var(--muted); display: block; font-size: 8px; margin-top: 2px; }
.jobs-table .job-result-message { max-width: 360px; overflow-wrap: anywhere; white-space: normal; }
.jobs-table code { font-size: 9px; }
.jobs-pager { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 7px; }
.jobs-pager > span { color: var(--muted); font-size: 10px; margin-right: auto; }
.jobs-pager label { align-items: center; display: flex; font-size: 10px; font-weight: 800; gap: 4px; }
.jobs-pager select { font-size: 10px; min-height: 27px; width: 65px; }
.jobs-pager button { font-size: 10px; min-height: 27px; padding: 0 8px; }

.audit-logs-panel { display: flex; flex-direction: column; gap: 8px; overflow: hidden !important; }
.audit-log-filters { justify-content: flex-end; }
.audit-log-filters label { display: grid; font-size: 9px; font-weight: 800; gap: 2px; min-width: 115px; }
.audit-log-filters input,
.audit-log-filters select { font-size: 10px; min-height: 29px; }
.audit-log-filters .audit-search-label { min-width: 230px; }
.audit-logs-content { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.audit-log-summary { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 7px; }
.audit-log-summary span { background: #f1f5f9; border-radius: 5px; color: #475569; font-size: 10px; padding: 5px 8px; }
.audit-log-summary .online { background: #dcfce7; color: #166534; }
.audit-log-summary .offline { background: #fee2e2; color: #991b1b; }
.audit-log-table-wrap { flex: 1 1 auto; max-height: none; min-height: 220px; overflow: auto; }
.audit-log-table { font-size: 9px; min-width: 1600px; }
.audit-log-table th { background: var(--surface-soft); position: sticky; top: 0; z-index: 2; }
.audit-log-table th,
.audit-log-table td { padding: 5px 6px; text-align: left; vertical-align: top; }
.audit-log-table pre { background: #0f172a; border-radius: 5px; color: #e2e8f0; font-size: 9px; margin: 5px 0 0; max-height: 260px; max-width: 480px; overflow: auto; padding: 7px; white-space: pre-wrap; }
.audit-log-table details summary { color: var(--accent); cursor: pointer; font-weight: 800; }
.audit-log-pager { align-items: center; display: flex; gap: 7px; justify-content: flex-end; padding-top: 7px; }
.audit-log-pager span { color: var(--muted); font-size: 10px; }
.audit-log-pager span:first-child { margin-right: auto; }
.audit-log-pager button { font-size: 10px; min-height: 27px; }

@media (max-width: 900px) {
  .job-summary { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .job-filters { justify-content: flex-start; }
}

@media (max-width: 1050px) {
  .reports-workspace { grid-template-columns: 165px minmax(0, 1fr); }
  .report-catalogue button { font-size: 10px; }
}

@media print {
  .view-toggle,
  .topbar,
  .reports-panel > .panel-head .report-actions,
  .report-catalogue,
  .report-filter-bar,
  .report-schedules { display: none !important; }
  .app:not(.hidden) { padding-left: 0 !important; }
  .workspace.report-view > #reportsPanel { inset: 0; position: static; }
  .reports-workspace { display: block; overflow: visible; }
  .report-main,
  .reports-content,
  .report-table-wrap { overflow: visible; }
  .report-table { font-size: 8px; width: 100%; }
}

.device-action-history {
  display: grid;
  gap: 4px;
}

.device-action-entry {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 5px;
  grid-template-columns: 135px minmax(150px, 0.8fr) 75px minmax(240px, 1.5fr);
  padding: 4px 6px;
}

.device-action-entry .action-time {
  color: var(--muted);
  white-space: nowrap;
}

.device-action-entry .action-result {
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .device-action-entry {
    grid-template-columns: 120px minmax(130px, 1fr) 70px;
  }
  .device-action-entry .action-result {
    grid-column: 1 / -1;
  }
}

.permission-options label {
  align-items: center;
  display: flex;
  font-size: 10px;
  gap: 6px;
}

.permission-options input { margin: 0; }

.danger-button {
  background: #475569;
}

.danger-button:hover {
  background: #334155;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 14px -14px 0;
  padding: 0 14px;
}

.tab-button {
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-bottom: 0;
}

.tab-button:hover,
.tab-button.active {
  background: #f1f5f9;
  color: var(--ink);
}

.tab-button.active {
  border-color: var(--line);
}

.tab-content {
  padding-top: 14px;
}

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

.summary-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.summary-tile strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

dl {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 14px 0;
}

dt,
dd {
  margin: 0;
}

dt {
  font-weight: 800;
}

dd,
.meta {
  color: var(--muted);
}

.inventory-table dd,
.job-inventory dd,
.compact-kv dd {
  overflow-wrap: anywhere;
}

.compact-kv {
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  font-size: 12px;
}

.tab-section {
  margin-top: 16px;
}

.tab-section:first-child {
  margin-top: 0;
}

.tab-section h3,
.action-group h3 {
  margin-bottom: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.action-group:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.device-control-group {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 0;
  padding: 12px;
}

.agent-removal-group {
  border-color: #fecaca;
}

.agent-removal-group h3 {
  color: #991b1b;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.control-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 156px;
  padding: 12px;
}

.control-card > div:first-child {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.control-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.control-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.control-audit-panel {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.control-audit-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
}

.control-audit-item > div:first-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.control-audit-details {
  margin-top: 4px;
}

.secondary-button {
  background: #475569;
}

.secondary-button:hover {
  background: #334155;
}

.meshcentral-panel {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.meshcentral-panel strong {
  display: block;
  margin-bottom: 2px;
}

.meshcentral-panel code {
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
}

.meshcentral-panel button {
  width: 100%;
}

.meshcentral-frame-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.meshcentral-frame-card .remote-head {
  border-bottom: 1px solid var(--line);
  min-height: 38px;
  padding: 5px 8px;
}

.meshcentral-frame {
  background: white;
  border: 0;
  display: block;
  height: max(360px, calc(100dvh - 210px));
  max-height: calc(100dvh - 120px);
  min-height: 0;
  width: 100%;
}

.legacy-remote-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  margin-top: 8px;
}

.legacy-remote-details summary {
  cursor: pointer;
  font-weight: 800;
  padding: 8px 10px;
}

.legacy-remote-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 240px minmax(0, 1fr);
  padding: 10px;
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #991b1b;
}

.remote-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.remote-layout.kvm-focused {
  display: block;
}

.remote-sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.remote-main {
  min-width: 0;
}

.remote-session {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.remote-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.remote-screen-wrap {
  margin: 12px 0;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  height: min(82vh, 900px);
  min-height: 560px;
  display: block;
  overflow: auto;
}

.remote-screen-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 16px;
}

.remote-screen {
  display: block;
  max-width: none;
  height: auto;
  cursor: default;
  user-select: none;
}

.remote-wait {
  color: #d7e1ea;
  padding: 24px;
  text-align: center;
}

.remote-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.remote-tools input {
  flex: 1 1 260px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.activity-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  margin: 12px 0;
}

.activity-toolbar {
  align-items: center;
  justify-content: space-between;
}

.activity-dashboard {
  display: grid;
  gap: 14px;
}

.activity-days {
  align-items: end;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.activity-day {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 5px;
  min-height: 124px;
  padding: 8px;
}

.activity-day.active {
  border-color: #0ea5e9;
  box-shadow: inset 0 0 0 1px #0ea5e9;
}

.activity-day-bar {
  align-self: end;
  background: linear-gradient(to top, #94a3b8 0 var(--idle), #16a34a var(--idle) 100%);
  border-radius: 3px 3px 0 0;
  display: block;
  justify-self: stretch;
  min-height: 8px;
}

.activity-day small,
.activity-kpi small,
.activity-app-row small,
.activity-clip small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.activity-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.activity-kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px;
}

.activity-kpi span {
  color: var(--muted);
  font-size: 13px;
}

.powerday-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.powerday-bars {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(96, minmax(0, 1fr));
  min-height: 26px;
}

.powerday-bar {
  background: #0f172a;
  border-radius: 1px;
  min-height: 26px;
}

.powerday-bar.active {
  background: #16a34a;
}

.powerday-bar.idle {
  background: #94a3b8;
}

.powerday-bar.off {
  background: #e5e7eb;
}

.powerday-hours {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.powerday-hours span:nth-child(2),
.powerday-hours span:nth-child(3),
.powerday-hours span:nth-child(4) {
  text-align: center;
}

.powerday-hours span:last-child {
  text-align: right;
}

.powerday-legend {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.activity-section-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

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

.activity-app-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(120px, 1fr) 72px;
  gap: 10px;
}

.activity-app-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-app-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.activity-app-track span {
  background: #0ea5e9;
  display: block;
  height: 100%;
}

.activity-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.activity-timeline {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.activity-timeline-head,
.activity-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.activity-timeline-head span,
.activity-legend {
  color: var(--muted);
  font-size: 13px;
}

.activity-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5px, 1fr));
  gap: 2px;
  min-height: 52px;
  margin: 10px 0 8px;
}

.activity-bar {
  background: #16a34a;
  border-radius: 2px;
  min-height: 52px;
  position: relative;
}

.activity-bar b {
  display: none;
}

.activity-bar.idle {
  background: #94a3b8;
}

.activity-bar.mixed {
  background: linear-gradient(to top, #94a3b8 0 var(--idle), #16a34a var(--idle) 100%);
}

.activity-legend {
  justify-content: flex-start;
}

.activity-legend span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.activity-legend i {
  border-radius: 2px;
  display: inline-block;
  height: 10px;
  width: 18px;
}

.activity-legend .working {
  background: #16a34a;
}

.activity-legend .idle {
  background: #94a3b8;
}

.activity-legend .mixed {
  background: linear-gradient(to right, #16a34a 0 55%, #94a3b8 55% 100%);
}

.activity-legend .off {
  background: #e5e7eb;
}

.activity-app {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px;
  display: grid;
  gap: 3px;
}

.activity-app small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.activity-replay {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.activity-replay-head,
.activity-replay-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.activity-replay-screen {
  background: #111827;
  border-radius: 6px;
  overflow: hidden;
}

.activity-replay-screen img {
  display: block;
  max-height: 560px;
  object-fit: contain;
  width: 100%;
}

.activity-clips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.activity-clip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 118px;
  overflow: hidden;
}

.activity-clip.active {
  border-color: #0ea5e9;
}

.activity-clip img,
.activity-clip .snapshot-missing {
  display: block;
  height: 100%;
  min-height: 118px;
  object-fit: contain;
  width: 100%;
}

.activity-clip > div:last-child {
  display: grid;
  gap: 5px;
  padding: 9px;
}

.activity-clip button {
  justify-self: start;
}

.snapshot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.snapshot-card img,
.snapshot-missing {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111827;
}

.snapshot-missing {
  color: #d7e1ea;
  display: grid;
  place-items: center;
}

.snapshot-meta {
  display: grid;
  gap: 3px;
  padding: 10px;
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.list-item {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  overflow-wrap: anywhere;
}

.list-item:first-child {
  border-top: 0;
}

.meta {
  font-size: 13px;
}

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

.compact {
  padding: 8px 0 0;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 14px;
}

.notice.warning {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

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

  .fleet-console,
  .device-meta-form {
    grid-template-columns: 1fr;
  }

  .client-browser {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .client-tree {
    max-height: 220px;
  }

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

  .activity-kpis,
  .activity-app-row,
  .control-grid,
  .control-audit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .panel-head,
  .topbar,
  .selected-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .top-menu-panel {
    left: 0;
    min-width: min(92vw, 340px);
    right: auto;
  }

  .table-actions,
  .table-actions input {
    width: 100%;
  }

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

  .device-meta-form {
    width: 100%;
  }

  .activity-days,
  .activity-clips {
    grid-template-columns: 1fr;
  }

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


.remote-command-log {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.remote-command-log summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Compact console layout: keep controls visible while tables and tab bodies scroll. */
html,
body {
  height: 100%;
  overflow: hidden;
}

.app:not(.hidden) {
  height: 100vh;
  overflow: hidden;
}

.workspace {
  display: grid;
  grid-template-rows: auto auto minmax(190px, 34vh) minmax(0, 1fr);
  gap: 8px;
  height: 100vh;
  overflow: hidden;
  padding: 10px 14px;
}

.topbar {
  margin-bottom: 0;
  min-height: 40px;
}

.topbar h2 {
  font-size: 17px;
}

.topbar .eyebrow {
  margin-bottom: 0;
}

.metrics-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.metric {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 34px;
  padding: 5px 9px;
}

.metric span {
  font-size: 11px;
}

.metric strong {
  font-size: 18px;
  line-height: 1;
}

.device-list-panel,
.selected-device-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
}

.panel-head {
  gap: 8px;
  min-height: 34px;
}

.panel-head h2 {
  font-size: 16px;
}

.panel-head .eyebrow {
  margin-bottom: 0;
}

.table-actions {
  gap: 6px;
}

.table-actions input,
.table-actions select {
  min-height: 30px;
}

.fleet-console {
  flex: 1 1 auto;
  min-height: 0;
}

.client-browser-head {
  min-height: 30px;
}

.client-tree {
  max-height: none;
}

.fleet-console .table-wrap,
.device-table-wrap {
  height: 100%;
  max-height: none;
}

.device-table {
  font-size: 11px;
}

.device-table th,
.device-table td {
  height: 22px;
  line-height: 1.15;
  padding: 2px 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.device-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-table .meta {
  display: none;
}

.status-pill,
.capability-pill {
  min-height: 17px;
  padding: 1px 6px;
  font-size: 10px;
}

.pager {
  min-height: 34px;
  padding: 4px 8px 0;
}

.pager button,
.topbar-actions button,
.tab-toolbar button,
.remote-tools button {
  min-height: 30px;
  padding: 0 9px;
}

.selected-header {
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.selected-header h2 {
  font-size: 17px;
  margin-bottom: 0;
}

.selected-header .meta {
  font-size: 11px;
}

.tabs {
  flex: 0 0 auto;
  gap: 4px;
  margin: 6px -8px 0;
  padding: 0 8px;
}

.tab-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-top: 8px;
}

.tab-toolbar {
  gap: 6px;
  margin-bottom: 6px;
}

.tab-section,
.action-group,
.remote-panel {
  margin-top: 8px;
}

.remote-screen-wrap {
  min-height: 180px;
}

@media (max-width: 1100px) {
  html,
  body,
  .app:not(.hidden) {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

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

  .admin-grid,
  .admin-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 32px;
  }
}

/* Alignment pass: keep endpoint table, selected header, and tabs in clear lanes. */
.workspace {
  grid-template-rows: auto auto minmax(160px, 32vh) minmax(0, 1fr);
  padding: 8px 12px;
}

.device-list-panel {
  overflow: hidden;
}

.fleet-console {
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
}

.device-grid-area {
  overflow: hidden;
}

.fleet-console .table-wrap,
.device-table-wrap {
  overflow-y: auto;
  overflow-x: hidden;
}

.device-table {
  table-layout: fixed;
  min-width: 0;
}

.device-table th,
.device-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-table th:nth-child(1),
.device-table td:nth-child(1),
.device-table th:nth-child(2),
.device-table td:nth-child(2) {
  width: 9%;
}

.device-table th:nth-child(3),
.device-table td:nth-child(3) {
  width: 8%;
}

.device-table th:nth-child(4),
.device-table td:nth-child(4) {
  width: 7%;
}

.device-table th:nth-child(5),
.device-table td:nth-child(5),
.device-table th:nth-child(6),
.device-table td:nth-child(6),
.device-table th:nth-child(9),
.device-table td:nth-child(9) {
  width: 8%;
}

.device-table th:nth-child(7),
.device-table td:nth-child(7) {
  width: 22%;
}

.device-table th:nth-child(8),
.device-table td:nth-child(8) {
  width: 18%;
}

.selected-device-panel {
  overflow: hidden;
}

.selected-header {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 38%);
  min-height: 72px;
}

.selected-header > div {
  min-width: 0;
}

.selected-header .meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-caps {
  margin-top: 5px;
}

.device-meta-form {
  gap: 6px;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(150px, 1fr) auto auto;
  min-width: 0;
  width: 100%;
}

.device-meta-form label {
  min-width: 0;
}

.device-meta-form input {
  min-height: 30px;
  min-width: 0;
}

.device-meta-form select {
  min-height: 30px;
  min-width: 0;
}

.device-meta-form button {
  min-height: 32px;
}

.tabs {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  min-height: 33px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 4px;
  scrollbar-width: thin;
}

.tab-button {
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .selected-header {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .device-meta-form {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) auto auto;
  }

  .view-toggle {
    width: 100%;
  }
}

/* Keep endpoint pager visible below the scrollable device grid. */
.device-grid-area {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding-bottom: 0;
}

.device-table-wrap {
  min-height: 0;
}

.pager {
  background: var(--surface);
  flex: 0 0 auto;
  min-height: 36px;
  padding: 4px 8px;
  position: relative;
  z-index: 2;
}

.page-size select {
  min-height: 28px;
}

/* Dense Actions tab so all controls fit with less scrolling. */
.action-scope-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle, rgba(255, 255, 255, 0.035));
}

.action-scope-bar p { margin: 0.25rem 0 0; }
.action-scope-bar label { min-width: min(100%, 320px); }
.action-scope-bar select { width: 100%; }

@media (max-width: 720px) {
  .action-scope-bar { align-items: stretch; flex-direction: column; }
}
.device-control-group {
  padding: 6px;
}

.device-control-group > h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.device-control-group > .meta {
  font-size: 11px;
  margin: -20px 4px 4px 0;
}

.control-grid {
  gap: 6px;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.control-card {
  border-radius: 6px;
  gap: 5px;
  min-height: 82px;
  padding: 8px;
}

.control-card > div:first-child {
  gap: 6px;
}

.control-card h3 {
  font-size: 14px;
  line-height: 1.1;
  margin: 0;
}

.control-card p {
  font-size: 11px;
  line-height: 1.25;
  min-height: 14px;
}

.control-card .actions {
  gap: 5px;
}

.control-card button {
  border-radius: 5px;
  font-size: 12px;
  min-height: 28px;
  padding: 0 9px;
}

.control-card .status-pill,
.control-card .capability {
  min-height: 16px;
  padding: 1px 5px;
}

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

/* Permanently expanded vertical navigation rail. */
.app:not(.hidden) {
  padding-left: 190px;
}

.view-toggle {
  align-content: start;
  background: linear-gradient(180deg, #0b1220 0%, #101b30 58%, #0d1728 100%);
  border-right: 1px solid #263650;
  bottom: 0;
  box-shadow: 3px 0 14px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  left: 0;
  overflow: hidden;
  padding: 8px 6px;
  position: fixed;
  top: 0;
  width: 190px;
  z-index: 100;
}

.view-toggle button,
.view-toggle a,
.topbar-actions .view-toggle button,
.topbar-actions .view-toggle a {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: flex-start;
  min-height: 36px;
  overflow: hidden;
  padding: 0 9px;
  text-decoration: none;
  white-space: nowrap;
  width: 178px;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-weight: 650;
}

.view-toggle button:hover,
.view-toggle a:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.view-toggle button.active,
.view-toggle a.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.28), rgba(20, 184, 166, 0.08));
  border-color: rgba(45, 212, 191, 0.22);
  box-shadow: inset 3px 0 0 #2dd4bf;
  color: #ffffff;
}

.nav-icon {
  align-items: center;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 5px;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  color: #94a3b8;
  transition: background 120ms ease, color 120ms ease;
}

.view-toggle a:hover .nav-icon,
.view-toggle button:hover .nav-icon {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.view-toggle a.active .nav-icon,
.view-toggle button.active .nav-icon {
  background: #14b8a6;
  color: #ffffff;
}

.nav-icon svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.nav-label {
  font-size: 11px;
  opacity: 1;
  letter-spacing: 0.01em;
}

.sidebar-spacer {
  flex: 1 1 auto;
  min-height: 12px;
}

.sidebar-product {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  display: grid;
  gap: 2px;
  opacity: 1;
  overflow: hidden;
  padding: 11px 9px 8px;
  transition: opacity 100ms ease;
  white-space: nowrap;
}

.sidebar-product strong {
  font-size: 12px;
}

.sidebar-product small,
.sidebar-user-copy small {
  color: #7f91aa;
  font-size: 10px;
}

.view-toggle:hover .sidebar-product,
.view-toggle:focus-within .sidebar-product {
  opacity: 1;
}

.view-toggle .sidebar-user-button {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 7px;
  min-height: 48px;
  padding: 7px;
}

.view-toggle .sidebar-user-button:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(45, 212, 191, 0.25);
}

.sidebar-user-initial {
  align-items: center;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  border: 2px solid rgba(94, 234, 212, 0.5);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 13px;
  height: 32px;
  justify-content: center;
}

.sidebar-user-copy {
  display: grid;
  gap: 2px;
  max-width: 125px;
  opacity: 1;
  overflow: hidden;
  text-align: left;
  transition: opacity 100ms ease;
}

.sidebar-user-copy strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-toggle:hover .sidebar-user-copy,
.view-toggle:focus-within .sidebar-user-copy {
  opacity: 1;
}

.view-toggle:hover .nav-label,
.view-toggle:focus-within .nav-label {
  opacity: 1;
}

.workspace {
  --fleet-panel-height: 46vh;
  grid-template-rows: 34px 28px minmax(150px, var(--fleet-panel-height)) 7px minmax(0, 1fr);
  padding: 6px 8px;
}

.workspace-splitter {
  align-items: center;
  cursor: row-resize;
  display: flex;
  justify-content: center;
  min-height: 7px;
  touch-action: none;
}

.workspace-splitter span {
  background: #94a3b8;
  border-radius: 999px;
  height: 3px;
  transition: background 120ms ease, width 120ms ease;
  width: 54px;
}

.workspace-splitter:hover span,
.workspace-splitter:focus span,
.resizing-workspace .workspace-splitter span {
  background: var(--accent);
  width: 90px;
}

.workspace-splitter:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  outline-offset: -1px;
}

body.resizing-workspace {
  cursor: row-resize;
  user-select: none;
}

.topbar {
  min-height: 30px;
}

.topbar > div:first-child .eyebrow {
  display: none;
}

.topbar h2 {
  font-size: 15px;
}

.topbar-actions {
  flex-wrap: nowrap;
  gap: 5px;
}

.metrics-strip {
  gap: 4px;
}

.metric {
  border-radius: 5px;
  min-height: 26px;
  padding: 2px 7px;
}

.metric span {
  font-size: 9px;
}

.metric strong {
  font-size: 14px;
}

.device-list-panel,
.selected-device-panel {
  border-radius: 6px;
  margin: 0;
  padding: 5px;
}

.device-list-panel .panel-head {
  min-height: 30px;
}

.device-list-panel .panel-head .eyebrow {
  display: none;
}

.device-list-panel .panel-head h2 {
  font-size: 14px;
}

.device-list-panel .table-actions {
  flex-wrap: nowrap;
}

.device-list-panel .table-actions input {
  width: 180px;
}

.device-list-panel .table-actions input,
.device-list-panel .table-actions select {
  min-height: 26px;
}

.device-list-panel .table-actions select {
  width: 150px;
}

.selected-device-assignment {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  margin-right: auto;
  min-width: 0;
}

.assignment-title {
  align-self: center;
  font-size: 11px;
  white-space: nowrap;
}

.selected-device-assignment .device-meta-form {
  gap: 4px;
  grid-template-columns: minmax(85px, 0.7fr) minmax(85px, 0.7fr) minmax(120px, 1.2fr) auto auto;
  min-width: 0;
  width: min(620px, 100%);
}

.selected-device-assignment .device-meta-form label {
  display: grid;
  font-size: 9px;
  gap: 1px;
}

.selected-device-assignment .device-meta-form input,
.selected-device-assignment .device-meta-form select,
.selected-device-assignment .device-meta-form button {
  min-height: 23px;
}

.selected-device-assignment .status-pill {
  white-space: nowrap;
}

.fleet-console {
  margin-top: 4px;
  min-height: 0;
}

.client-browser-head {
  min-height: 26px;
  padding: 3px 7px;
}

.device-table th,
.device-table td {
  height: 20px;
  padding: 1px 5px;
}

.pager {
  gap: 6px;
  min-height: 28px;
  padding: 2px 6px;
}

.action-scope-bar {
  align-items: center;
  border-radius: 6px;
  margin-bottom: 3px;
  min-height: 32px;
  padding: 2px 5px;
}

.action-scope-bar p {
  display: none;
}

.action-scope-bar label {
  align-items: center;
  display: flex;
  font-size: 10px;
  gap: 5px;
  min-width: 260px;
}

.action-scope-bar select {
  min-height: 25px;
}

.selected-header {
  display: flex;
  flex: 0 0 auto;
  min-height: 62px;
  overflow: hidden;
  padding: 4px 6px;
}

.selected-header > div {
  display: block;
  gap: 2px;
  width: 100%;
}

.selected-header .meta {
  padding-left: 0;
}

.selected-header .header-caps {
  margin-top: 0;
  min-height: 19px;
}

.selected-device-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.selected-device-title-row h2 {
  flex: 0 0 auto;
}

.selected-device-title-row .capability-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.selected-device-panel .tabs {
  background: var(--surface);
  flex: 0 0 34px;
  margin-top: 0;
  min-height: 34px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 3px;
  position: relative;
  scrollbar-width: thin;
  z-index: 3;
}

.selected-device-panel .tab-button {
  align-items: center;
  display: inline-flex;
  font-size: 11px;
  line-height: 1;
  min-height: 29px;
  padding: 0 9px;
}

.action-groups-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.action-groups-grid .action-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0;
  padding: 6px;
}

.action-groups-grid .actions {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}

.action-groups-grid button {
  width: 100%;
}

.control-card .actions {
  align-items: end;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(105px, max-content));
}

.control-card .actions button {
  white-space: nowrap;
}

.control-switch {
  align-items: center;
  align-self: end;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  justify-self: start;
  min-height: 25px;
  position: relative;
  user-select: none;
}

.control-switch input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.control-switch-track {
  background: #94a3b8;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 36px;
  height: 20px;
  padding: 2px;
  transition: background 140ms ease;
}

.control-switch-track span {
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  height: 16px;
  transform: translateX(0);
  transition: transform 140ms ease;
  width: 16px;
}

.control-switch input:checked + .control-switch-track {
  background: var(--accent);
}

.control-switch input:checked + .control-switch-track span {
  transform: translateX(16px);
}

.control-switch input:focus-visible + .control-switch-track {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
}

.control-switch-label {
  font-size: 11px;
  font-weight: 800;
}

.control-switch.deploying {
  cursor: wait;
  opacity: 0.65;
}

.device-control-group {
  padding: 5px;
}

.control-grid {
  gap: 4px;
}

.control-switch-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.control-detail-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  margin-top: 4px;
}

.control-card {
  gap: 3px;
  min-height: 68px;
  padding: 6px;
}

.control-switch-card {
  grid-template-rows: auto minmax(24px, 1fr);
  min-height: 64px;
}

.control-switch-card > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.control-switch-card > div:first-child > strong {
  overflow-wrap: anywhere;
}

.control-switch-card .control-switch {
  align-self: center;
  justify-self: center;
}

.control-switch-card .control-switch-label {
  display: none;
}

.control-detail-card {
  grid-template-rows: auto minmax(24px, 1fr) auto;
  min-height: 98px;
}

.control-detail-card .actions {
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.control-detail-card .actions button {
  width: 100%;
}

.control-detail-card .actions .control-switch {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  justify-content: center;
  min-height: 25px;
  padding: 0 7px;
}

.control-card p {
  font-size: 10px;
  line-height: 1.15;
}

.control-card button,
.action-group button {
  font-size: 11px;
  min-height: 25px;
  padding: 0 7px;
}

.action-group {
  margin-top: 6px;
  padding-top: 6px;
}

.action-group h3 {
  margin-bottom: 4px;
}

@media (max-width: 820px) {
  .app:not(.hidden) { padding-left: 0; }
  .view-toggle,
  .view-toggle:hover,
  .view-toggle:focus-within {
    bottom: auto;
    flex-direction: row;
    overflow-x: auto;
    position: static;
    width: 100%;
  }
  .view-toggle button,
  .view-toggle a,
  .topbar-actions .view-toggle button,
  .topbar-actions .view-toggle a { width: auto; }
  .nav-label { opacity: 1; }
  .sidebar-product,
  .sidebar-user-copy { opacity: 1; }
  .workspace { grid-template-rows: auto auto auto auto; }
  .workspace-splitter { display: none; }
  .pager { flex-wrap: wrap; }
  .selected-device-assignment { flex-basis: 100%; }
  .selected-device-assignment .assignment-title { display: none; }
  .selected-device-assignment .device-meta-form { grid-template-columns: repeat(2, minmax(110px, 1fr)); max-width: none; }
  .selected-header { min-height: 82px; }
  .selected-header > div { display: block; }
  .selected-header .meta { padding-left: 0; white-space: normal; }
  .action-groups-grid { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .control-card .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-card .actions button { white-space: normal; width: 100%; }
}

@media (min-width: 821px) and (max-width: 1250px) {
  .control-switch-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .control-detail-grid { grid-template-columns: 1fr; }
  .control-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
  .control-card > div:first-child { align-self: start; }
  .control-card p { min-height: 0; }
}

.result-dialog {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
  color: var(--text);
  max-width: min(620px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}

.result-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.result-dialog form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.result-dialog-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.result-dialog-head h2 {
  margin: 2px 0 0;
}

.mfa-once-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #9a3412;
  font-size: 12px;
  margin: 0;
  padding: 8px 10px;
}

.copy-value-field {
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.copy-value-field > span {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.copy-value-field input,
.copy-value-field textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  width: 100%;
}

.copy-value-field textarea {
  resize: vertical;
}

/* Keep action controls compact instead of stretching labels across each card. */
.control-detail-card .actions,
.action-groups-grid .actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  grid-template-columns: none;
}

.control-detail-card .actions button,
.action-groups-grid .actions button {
  flex: 0 0 auto;
  min-width: 70px;
  width: auto;
}

.control-detail-card .actions .control-switch {
  flex: 0 0 auto;
}

.device-action-card .actions button {
  min-width: 66px;
}

.endpoint-summary-banner {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-bottom: 6px;
  padding: 2px 4px 7px;
}

.endpoint-summary-banner > strong {
  font-size: 15px;
}

.endpoint-summary-banner > span:not(.status-pill) {
  color: var(--muted);
  font-size: 11px;
}

.endpoint-summary-layout {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.endpoint-summary-column {
  align-content: start;
  display: grid;
  gap: 8px;
}

.endpoint-summary-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.endpoint-summary-card > h3 {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  margin: 0;
  padding: 5px 7px;
}

.summary-feature-list {
  display: grid;
  padding: 4px 7px;
}

.summary-feature-list > div {
  align-items: center;
  display: grid;
  font-size: 11px;
  gap: 6px;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  min-height: 21px;
}

.summary-feature-list > div > strong {
  color: var(--muted);
  font-size: 9px;
}

.feature-check {
  font-size: 13px;
  font-weight: 900;
}

.feature-check.enabled { color: #15803d; }
.feature-check.disabled { color: #94a3b8; }

.summary-status-list {
  display: grid;
  gap: 2px;
  padding: 5px 7px;
}

.summary-status-item {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 13px minmax(0, 1fr);
  min-height: 34px;
}

.summary-status-item strong,
.summary-status-item small {
  display: block;
}

.summary-status-item strong { font-size: 11px; }
.summary-status-item small { color: var(--muted); font-size: 10px; }

.summary-status-icon {
  background: #94a3b8;
  border-radius: 50%;
  height: 11px;
  width: 11px;
}

.summary-status-icon.online { background: #22c55e; }
.summary-status-icon.stale { background: #f59e0b; }
.summary-status-icon.offline { background: #ef4444; }

.summary-detail-list {
  gap: 3px 8px;
  grid-template-columns: minmax(95px, auto) minmax(0, 1fr);
  margin: 0;
  padding: 6px 7px;
}

.summary-detail-list dt,
.summary-detail-list dd {
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.summary-detail-list dt { color: var(--muted); }

@media (max-width: 900px) {
  .endpoint-summary-layout { grid-template-columns: 1fr; }
}

.asset-table-wrap {
  max-height: 100%;
  overflow: auto;
}

.asset-table {
  font-size: 10px;
  width: 100%;
}

.asset-table th {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.asset-table th,
.asset-table td {
  height: 25px;
  padding: 3px 7px;
  text-align: left;
  vertical-align: middle;
}

.asset-table th:first-child,
.asset-table td:first-child {
  padding-left: 5px;
  padding-right: 2px;
  width: 28px;
}

.asset-table th:nth-child(2) { width: 28%; }
.asset-table th:nth-child(3) { width: 38%; }
.asset-table th:nth-child(4) { width: 22%; }
.asset-table th:last-child { width: 80px; }

.software-table th:nth-child(2) { width: 31%; }
.software-table th:nth-child(3) { width: 14%; }
.software-table th:nth-child(4) { width: 14%; }
.software-table th:nth-child(5) { width: 20%; }
.software-table th:nth-child(6) { width: 18%; }

.asset-type-icon {
  align-items: center;
  color: #64748b;
  display: inline-flex;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.asset-type-icon svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 17px;
}

.asset-status {
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
}

.patch-workflow-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 3px 0 6px;
}

.patch-workflow-bar > div {
  display: grid;
  margin-right: auto;
}

.patch-workflow-bar label {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  gap: 4px;
}

.device-patch-table-wrap {
  max-height: 100%;
  overflow: auto;
}

.device-patch-table {
  font-size: 10px;
  width: 100%;
}

.device-patch-table th {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 2;
}

.device-patch-table th,
.device-patch-table td {
  height: 25px;
  padding: 3px 6px;
  text-align: left;
  vertical-align: middle;
}

.device-patch-table th:first-child,
.device-patch-table td:first-child { width: 28px; }
.device-patch-table th:nth-child(2) { width: 82px; }
.device-patch-table th:nth-child(3) { width: 34%; }

.device-patch-table td strong,
.device-patch-table td small { display: block; }
.device-patch-table td small { color: var(--muted); font-size: 9px; }

.patch-group-row td {
  background: #f1f5f9;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  position: sticky;
  top: 25px;
  z-index: 1;
}

.patch-installed-mark {
  color: #16a34a;
  font-size: 14px;
  font-weight: 900;
}

.patch-severity {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.patch-severity.critical { color: #b91c1c; }
.patch-severity.important { color: #c2410c; }
.patch-severity.moderate { color: #a16207; }

.device-table th[data-device-column] {
  position: relative;
  user-select: none;
}

.device-table th[draggable="true"] {
  cursor: grab;
}

.device-table th[draggable="true"]:active {
  cursor: grabbing;
}

.column-resize-handle {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 7px;
  z-index: 4;
}

.column-resize-handle:hover,
.column-resize-handle:active {
  background: rgba(15, 118, 110, 0.2);
}

.device-table th[data-device-column="expand"],
.device-table td[data-device-column="expand"] {
  min-width: 25px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  width: 25px;
}

.row-expand-button {
  align-items: center;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  font-size: 17px;
  height: 20px;
  justify-content: center;
  min-height: 20px;
  padding: 0;
  transform: rotate(0deg);
  transition: transform 120ms ease;
  width: 20px;
}

.row-expand-button.expanded {
  transform: rotate(90deg);
}

.device-expanded-row td {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 5px 8px;
}

.device-row-details {
  display: grid;
  gap: 5px 12px;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.device-row-details span {
  color: var(--ink);
  font-size: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-row-details strong {
  color: var(--muted);
  display: block;
  font-size: 8px;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .device-row-details { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
}
/* Server health */
.server-health-panel { min-height: calc(100vh - 86px); }
.server-health-actions { display: flex; align-items: center; gap: 10px; }
.server-health-content { display: grid; gap: 14px; }
.server-health-summary { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 10px; }
.server-health-card, .server-health-section { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 14px; }
.server-health-card { border-top: 3px solid #94a3b8; }
.server-health-card.healthy { border-top-color: #16a34a; }
.server-health-card.warning { border-top-color: #d97706; }
.server-health-card.danger { border-top-color: #dc2626; }
.server-health-card-head, .server-service-row, .health-stat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-health-card-head span, .server-health-section h3 { color: #334155; font-weight: 700; }
.server-health-card-head strong { color: #0f172a; font-size: 1.3rem; }
.server-health-card p { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.health-meter { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.health-meter span { display: block; height: 100%; border-radius: inherit; background: #16a34a; transition: width .25s ease; }
.server-health-card.warning .health-meter span { background: #d97706; }
.server-health-card.danger .health-meter span { background: #dc2626; }
.server-health-details { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 10px; }
.server-health-section h3 { margin: 0 0 8px; font-size: .92rem; }
.server-service-row, .health-stat-row { min-height: 34px; border-top: 1px solid #eef2f7; font-size: .82rem; }
.server-service-row:first-of-type, .health-stat-row:first-of-type { border-top: 0; }
.server-service-row span, .health-stat-row span { color: var(--muted); }
.health-stat-row strong { text-align: right; color: #0f172a; }
.server-health-loading, .server-health-error { padding: 40px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); }
.server-health-error { color: #b91c1c; }
@media (max-width: 1200px) { .server-health-summary, .server-health-details { grid-template-columns: repeat(2, minmax(210px, 1fr)); } }
@media (max-width: 700px) { .server-health-summary, .server-health-details { grid-template-columns: 1fr; } .server-health-actions { align-items: flex-end; flex-direction: column; } }
