/* InventoryOS live demo shell — overview-first */

.demo-app {
  --demo-bg: #0f172a;
  --demo-header: rgba(30, 41, 59, 0.95);
  --demo-card: rgba(30, 41, 59, 0.55);
  --demo-card-hover: rgba(30, 41, 59, 0.68);
  --demo-card-border: rgba(51, 65, 85, 0.5);
  --demo-text: #f8fafc;
  --demo-muted: #94a3b8;
  --demo-subtle: #64748b;
  --demo-accent: #6366f1;
  --demo-accent-soft: rgba(99, 102, 241, 0.15);
  --demo-hover-surface: rgba(51, 65, 85, 0.35);
  min-height: 100vh;
  background: var(--demo-bg);
  color: var(--demo-text);
}

/* Marketing .site-page-flow ships a dark gradient canvas; demo uses --demo-bg instead */
.demo-app .site-page-flow {
  background: transparent !important;
}

html.demo-light .demo-app .demo-logo-dark {
  display: none;
}

html.demo-light .demo-app .demo-logo-light {
  display: block !important;
}

html.demo-light .demo-app .demo-logo-wordmark {
  fill: #0f172a;
}

html.demo-light body {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.demo-light .demo-app {
  --demo-bg: #f1f5f9;
  --demo-header: rgba(255, 255, 255, 0.95);
  --demo-card: rgba(255, 255, 255, 0.92);
  --demo-card-hover: #ffffff;
  --demo-card-border: rgba(203, 213, 225, 0.9);
  --demo-text: #0f172a;
  --demo-muted: #475569;
  --demo-subtle: #64748b;
  --demo-accent-soft: rgba(99, 102, 241, 0.1);
  --demo-hover-surface: rgba(148, 163, 184, 0.22);
}

html.demo-light footer {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #334155;
}
html.demo-light footer .text-white {
  color: #0f172a !important;
}
html.demo-light footer .text-slate-400 {
  color: #64748b !important;
}

html.demo-light .demo-app .text-white {
  color: #0f172a !important;
}
html.demo-light .demo-app .text-slate-300 {
  color: #334155 !important;
}
html.demo-light .demo-app .text-slate-400,
html.demo-light .demo-app .subtitle {
  color: #64748b !important;
}
html.demo-light .demo-app .text-slate-500 {
  color: #64748b !important;
}
html.demo-light .demo-app .text-slate-600 {
  color: #475569 !important;
}
html.demo-light .demo-app .text-slate-200 {
  color: #1e293b !important;
}
html.demo-light .demo-app .nav-link {
  color: #475569;
}
html.demo-light .demo-app .nav-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}
html.demo-light .demo-app .nav-link.active {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
}
html.demo-light .demo-app .page-action-btn.active {
  color: #4f46e5;
}
html.demo-light .demo-app .event-item {
  border-bottom-color: rgba(203, 213, 225, 0.9);
}
html.demo-light .demo-app .ip-table th {
  border-bottom-color: rgba(203, 213, 225, 0.9);
}
html.demo-light .demo-app .ip-table td {
  border-bottom-color: rgba(226, 232, 240, 0.9);
}
html.demo-light .demo-widgets-panel {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}
html.demo-light .demo-widget-pick {
  background: #f8fafc;
  border-color: #cbd5e1;
}
html.demo-light .demo-widget-pick.active {
  background: rgba(99, 102, 241, 0.08);
}
html.demo-light .demo-widget-pick:hover {
  background: #f1f5f9;
}
html.demo-light ::-webkit-scrollbar-track {
  background: #e2e8f0;
}
html.demo-light ::-webkit-scrollbar-thumb {
  background: #94a3b8;
}

.demo-app .app-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--demo-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--demo-card-border);
  height: 56px;
}

.demo-app .demo-logo {
  height: 2.25rem;
  width: auto;
  max-height: 2.25rem;
}

.demo-app .nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--demo-muted);
}
.demo-app .nav-link:hover {
  background: var(--demo-hover-surface);
}
.demo-app .nav-link.active {
  background: var(--demo-accent-soft);
  color: #a5b4fc;
}

.demo-app .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--demo-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-app .icon-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}

.demo-app .glass-card {
  border-radius: 1.5rem;
  backdrop-filter: blur(40px);
  background: var(--demo-card);
  border: 1px solid var(--demo-card-border);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.25);
  padding: 1.25rem 1.5rem;
  height: 100%;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.demo-app .glass-card:hover {
  background: var(--demo-card-hover) !important;
  border-color: var(--demo-card-border);
}
html.demo-light .demo-app .glass-card {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}
html.demo-light .demo-app .glass-card:hover {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
}

.demo-app .metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.demo-app .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--demo-text);
}

.demo-app .subtitle {
  font-size: 12px;
  color: var(--demo-subtle);
}

.demo-app .trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
}

.demo-app .view-all {
  color: #818cf8;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.demo-app .view-all:hover {
  color: #a5b4fc;
}

.demo-app .compliance-bar {
  height: 20px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background: rgba(51, 65, 85, 0.35);
}
html.demo-light .demo-app .compliance-bar {
  background: rgba(203, 213, 225, 0.6);
}
.demo-app .compliance-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.demo-app .sw-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid currentColor;
  color: inherit;
}

.demo-app .chart-box {
  position: relative;
  width: 100%;
  height: 256px;
}
.demo-app .chart-box-sm {
  height: 220px;
}

.demo-app .overview-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.demo-app .overview-widget {
  position: relative;
}
.demo-app .overview-widget[data-span="3"] { grid-column: span 3; }
.demo-app .overview-widget[data-span="4"] { grid-column: span 4; }
.demo-app .overview-widget[data-span="5"] { grid-column: span 5; }
.demo-app .overview-widget[data-span="6"] { grid-column: span 6; }
.demo-app .overview-widget[data-span="7"] { grid-column: span 7; }
.demo-app .overview-widget[data-span="8"] { grid-column: span 8; }
.demo-app .overview-widget[data-span="9"] { grid-column: span 9; }
.demo-app .overview-widget[data-span="10"] { grid-column: span 10; }
.demo-app .overview-widget[data-span="11"] { grid-column: span 11; }
.demo-app .overview-widget[data-span="12"] { grid-column: span 12; }

@media (max-width: 1023px) {
  .demo-app .overview-widget[data-span] {
    grid-column: span 12;
  }
}

.demo-app .widget-handle,
.demo-app .widget-menu-btn {
  display: none;
}
.demo-app.demo-editing .widget-handle,
.demo-app.demo-editing .widget-menu-btn {
  display: inline-flex;
}
.demo-app .widget-handle {
  color: var(--demo-subtle);
  cursor: grab;
  padding: 2px;
  touch-action: none;
}
.demo-app.demo-editing .widget-handle:active {
  cursor: grabbing;
}
.demo-app .widget-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--demo-subtle);
  cursor: pointer;
}
.demo-app .widget-menu-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}
.demo-app.demo-editing .glass-card {
  outline: 1px dashed rgba(99, 102, 241, 0.35);
}
.demo-app.demo-editing .overview-widget {
  cursor: grab;
}
.demo-app.demo-editing .overview-widget.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}
.demo-app.demo-editing .overview-widget.drag-over {
  outline: 2px dashed rgba(99, 102, 241, 0.65);
  outline-offset: 3px;
  border-radius: 1.5rem;
}

.demo-widget-size-menu {
  position: fixed;
  z-index: 10020;
  min-width: 280px;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.97);
  border: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}
.demo-widget-size-menu.hidden {
  display: none;
}
.demo-widget-size-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}
.demo-size-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  background: rgba(51, 65, 85, 0.35);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.demo-size-option:last-child {
  margin-bottom: 0;
}
.demo-size-option:hover {
  background: rgba(51, 65, 85, 0.55);
}
.demo-size-option.active {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.15);
}
.demo-size-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}
.demo-size-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  height: 3rem;
}
.demo-size-cell {
  border-radius: 0.25rem;
  background: rgba(100, 116, 139, 0.45);
}
.demo-size-cell.filled {
  background: rgba(96, 165, 250, 0.45);
}
.demo-size-cell.empty {
  background: transparent;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

html.demo-light .demo-widget-size-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}
html.demo-light .demo-widget-size-title,
html.demo-light .demo-size-label {
  color: #334155;
}
html.demo-light .demo-size-option {
  background: #f8fafc;
}
html.demo-light .demo-size-option:hover {
  background: #f1f5f9;
}
html.demo-light .demo-size-option.active {
  background: rgba(59, 130, 246, 0.1);
}
html.demo-light .demo-size-cell {
  background: rgba(203, 213, 225, 0.7);
}
html.demo-light .demo-size-cell.filled {
  background: rgba(59, 130, 246, 0.4);
}

.demo-app .event-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}
.demo-app .event-item:last-child {
  border-bottom: none;
}

.demo-app .stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.demo-app .ip-table {
  width: 100%;
  font-size: 0.8125rem;
}
.demo-app .ip-table th {
  text-align: left;
  color: var(--demo-subtle);
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
}
.demo-app .ip-table td {
  padding: 0.45rem 0;
  color: var(--demo-muted);
  border-bottom: 1px solid rgba(51, 65, 85, 0.2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

/* Org dropdown */
.demo-app .org-select-wrapper { position: relative; }
.demo-app .org-select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  background: transparent;
  color: var(--demo-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  min-width: 180px;
}
.demo-app .org-select-trigger:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: var(--demo-hover-surface);
}
.demo-app .org-select-trigger .chevron { margin-left: auto; transition: transform 0.2s; }
.demo-app .org-select-wrapper.open .chevron { transform: rotate(180deg); }
.demo-app .org-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 10005;
  padding: 4px;
}
html.demo-light .demo-app .org-dropdown {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
}
.demo-app .org-select-wrapper.open .org-dropdown { display: block; }
.demo-app .org-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #cbd5e1;
  cursor: pointer;
}
html.demo-light .demo-app .org-option { color: #334155; }
.demo-app .org-option:hover { background: var(--demo-hover-surface); }
html.demo-light .demo-app .org-option:hover { background: #f1f5f9; }
.demo-app .org-option.selected { color: var(--demo-accent-light, #a5b4fc); }
html.demo-light .demo-app .org-option.selected { color: var(--demo-accent, #4f46e5); }
.demo-app .org-option .check { visibility: hidden; color: var(--demo-accent-light, #818cf8); }
.demo-app .org-option.selected .check { visibility: visible; }

/* Modals & menus */
.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 2rem;
  backdrop-filter: blur(2px);
}
.demo-overlay.hidden { display: none; }

.demo-search-panel {
  width: min(640px, 100%);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
html.demo-light .demo-search-panel {
  background: #fff;
  border-color: #e2e8f0;
}
.demo-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}
.demo-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--demo-text);
  font-size: 0.95rem;
  outline: none;
}
.demo-search-hint {
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  color: var(--demo-subtle);
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
}
.demo-search-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--demo-muted);
}
.demo-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  background: rgba(15, 23, 42, 0.35);
  font-size: 0.7rem;
  font-family: inherit;
}

.demo-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 10006;
  padding: 0.5rem 0;
  display: none;
}
html.demo-light .demo-user-menu {
  background: #fff;
  border-color: #e2e8f0;
}
.demo-user-menu.open { display: block; }
.demo-user-menu hr {
  border: none;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  margin: 0.35rem 0;
}
.demo-user-menu a,
.demo-user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
html.demo-light .demo-user-menu a,
html.demo-light .demo-user-menu button { color: #334155; }
.demo-user-menu a:hover,
.demo-user-menu button:hover {
  background: var(--demo-hover-surface);
}
html.demo-light .demo-user-menu a:hover,
html.demo-light .demo-user-menu button:hover {
  background: #f1f5f9;
}
.demo-user-menu .sign-out {
  width: calc(100% - 1rem);
  margin: 0.5rem;
  box-sizing: border-box;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 0.5rem;
  text-align: center;
}

.demo-widgets-panel {
  position: fixed;
  top: 72px;
  right: 1.25rem;
  width: min(360px, calc(100vw - 2rem));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  z-index: 10008;
  padding: 1rem;
  display: none;
}
.demo-widgets-panel.open { display: block; }
.demo-widget-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(30, 41, 59, 0.65);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.demo-widget-pick:hover {
  border-color: rgba(99, 102, 241, 0.65);
}
.demo-widget-pick.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.12);
}
.demo-widget-pick h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--demo-text);
  margin-bottom: 0.15rem;
}
.demo-widget-pick p {
  font-size: 0.75rem;
  color: var(--demo-subtle);
}

.demo-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  background: rgba(99, 102, 241, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-app .section.hidden { display: none; }
.demo-app .page-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--demo-card-border);
  background: transparent;
  color: var(--demo-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.demo-app .page-action-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}
.demo-app .page-action-btn.active {
  background: var(--demo-accent-soft);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.45);
}
.demo-app .done-edit-btn {
  display: none;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  background: #6366f1;
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.demo-app.demo-editing .done-edit-btn { display: inline-flex; }
.demo-app.demo-editing #demo-edit-btn { display: none; }

.demo-placeholder {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--demo-muted);
}
.demo-placeholder h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--demo-text);
  margin-bottom: 0.5rem;
}

/* Organizations page — layout switcher + card sizes */
.demo-org-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--demo-card-border);
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(8px);
}
html.demo-light .demo-org-view-switcher {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.demo-org-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--demo-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-org-view-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}
.demo-org-view-btn.active {
  background: var(--demo-accent-soft);
  color: #a5b4fc;
}
html.demo-light .demo-org-view-btn.active {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.demo-org-grid {
  display: grid;
  gap: 0.75rem;
}
.demo-org-grid--grid {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .demo-org-grid--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .demo-org-grid--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .demo-org-grid--grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.demo-org-grid--large {
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .demo-org-grid--large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.demo-org-grid--list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-org-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem !important;
  padding: 1.25rem;
}
.demo-org-grid--large .demo-org-card {
  padding: 1.5rem;
}
.demo-org-grid--list .demo-org-card {
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .demo-org-grid--list .demo-org-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.demo-org-card-main {
  min-width: 0;
  flex: 1;
}
.demo-org-grid--list .demo-org-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
@media (min-width: 640px) {
  .demo-org-grid--list .demo-org-card-main {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
}

.demo-org-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}
.demo-org-grid--list .demo-org-card-head {
  margin-bottom: 0;
  flex: 0 1 auto;
}

.demo-org-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.demo-org-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--demo-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-org-grid--large .demo-org-card-title {
  font-size: 1.125rem;
}

.demo-org-pin-icon {
  flex-shrink: 0;
}
.demo-org-card:not(:has(.demo-org-pin-icon)) .demo-org-pin-icon {
  display: none;
}

.demo-org-pin-btn {
  flex-shrink: 0;
  padding: 0.25rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--demo-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.demo-org-card:hover .demo-org-pin-btn,
.demo-org-pin-btn:focus-visible {
  opacity: 1;
}
.demo-org-pin-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}

.demo-org-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.demo-org-grid--large .demo-org-card-meta {
  margin-bottom: 1.25rem;
}
.demo-org-grid--list .demo-org-card-meta {
  margin-bottom: 0;
}

.demo-org-role {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.demo-org-role-owner {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}
.demo-org-role-admin {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
}
.demo-org-role-viewer {
  border-color: rgba(100, 116, 139, 0.3);
  background: rgba(100, 116, 139, 0.1);
  color: #94a3b8;
}
html.demo-light .demo-org-role-owner {
  color: #b45309;
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.35);
}
html.demo-light .demo-org-role-admin {
  color: #0369a1;
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, 0.35);
}
html.demo-light .demo-org-role-viewer {
  color: #475569;
  background: #f1f5f9;
}

.demo-org-meta-sep,
.demo-org-devices {
  font-size: 0.75rem;
  color: var(--demo-muted);
}

.demo-org-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}
.demo-org-grid--list .demo-org-card-actions {
  margin-top: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}
@media (min-width: 640px) {
  .demo-org-grid--list .demo-org-card-actions {
    justify-content: flex-end;
  }
}

.demo-org-open-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.demo-org-open-btn:hover {
  background: rgba(99, 102, 241, 0.2);
}
.demo-org-grid--list .demo-org-open-btn {
  flex: 0 1 auto;
}
html.demo-light .demo-org-open-btn {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
}
html.demo-light .demo-org-open-btn:hover {
  background: rgba(99, 102, 241, 0.14);
}

.demo-org-settings-btn {
  flex-shrink: 0;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--demo-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.demo-org-settings-btn:hover {
  background: var(--demo-hover-surface);
  color: var(--demo-text);
}

/* -------------------------------------------------------------------------- */
/* Live demo — light mode: Agents table, filters, modals, popovers             */
/* -------------------------------------------------------------------------- */

html.demo-light .demo-app .org-select-trigger {
  color: #334155;
  border-color: #cbd5e1;
  background: #ffffff;
}

html.demo-light .agents-surface-card.glass-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06) !important;
}

html.demo-light .agents-page-header {
  border-bottom-color: #e2e8f0;
}

html.demo-light .agents-table-shell {
  background: #ffffff;
  border-top-color: #e2e8f0;
}

html.demo-light .agents-table-head th {
  color: #64748b;
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

html.demo-light .agents-zebra tbody td {
  color: #334155 !important;
}

html.demo-light .agents-zebra tbody tr.agents-row-even {
  background: #ffffff;
}

html.demo-light .agents-zebra tbody tr.agents-row-odd {
  background: #f8fafc;
}

html.demo-light .agents-zebra tbody tr.agents-row:hover {
  background: #eef2ff;
}

html.demo-light .agents-cat-header td {
  color: #64748b;
  background: #f1f5f9;
  border-top-color: #e2e8f0;
  border-bottom-color: #e2e8f0;
}

html.demo-light .agents-table-foot td {
  background: #f8fafc;
  border-top-color: #e2e8f0;
  color: #64748b;
}

html.demo-light .agents-icon-btn:hover {
  background: rgba(148, 163, 184, 0.2);
}

html.demo-light .agents-icon-btn.icon-slate {
  color: #64748b;
}

html.demo-light .agents-icon-btn.icon-slate:hover {
  color: #334155;
}

html.demo-light .agents-icon-btn.agents-icon-btn-active {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
}

html.demo-light .agent-installed-link {
  color: #4f46e5;
}

html.demo-light .agent-installed-link:hover {
  color: #4338ca;
}

html.demo-light .device-type-cell {
  color: #64748b;
}

html.demo-light .agents-zebra svg.text-slate-100 {
  color: #334155 !important;
}

html.demo-light .status-pill.status-installed {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(22, 163, 74, 0.35);
  color: #15803d;
}

html.demo-light .status-pill.status-missing {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(225, 29, 72, 0.35);
  color: #be123c;
}

html.demo-light .status-pill.status-na {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

html.demo-light .note-btn {
  color: #64748b;
}

html.demo-light .note-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

html.demo-light .note-btn.has-note {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.2);
}

/* Agents toolbar inputs (Tailwind dark utilities) */
html.demo-light .agents-surface-card input[type="text"],
html.demo-light .agents-surface-card select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.demo-light .agents-surface-card input[type="text"]::placeholder {
  color: #94a3b8 !important;
}

html.demo-light .agents-surface-card input[type="text"]:focus,
html.demo-light .agents-surface-card select:focus {
  border-color: rgba(99, 102, 241, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

/* Pagination footer */
html.demo-light .agents-surface-card .border-slate-700\/30 {
  border-color: #e2e8f0 !important;
}

html.demo-light .agents-surface-card .bg-slate-900\/20 {
  background: #f8fafc !important;
}

html.demo-light .agents-surface-card .hover\:bg-slate-700\/50:hover {
  background: #e2e8f0 !important;
}

html.demo-light .agents-page-size-trigger {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

html.demo-light .agents-page-size-trigger:hover {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.4);
}

html.demo-light .agents-page-size-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
}

html.demo-light .agents-page-size-option {
  color: #334155;
}

html.demo-light .agents-page-size-option:hover {
  background: #f1f5f9;
}

html.demo-light .agents-page-size-option.selected {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
}

html.demo-light .agents-page-size-option .check {
  color: #6366f1;
}

/* Filter panel */
html.demo-light .filter-panel-inner {
  background: rgba(248, 250, 252, 0.95);
  border-top-color: #e2e8f0;
}

html.demo-light .filter-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.demo-light .filter-card-title {
  color: #64748b;
}

html.demo-light .filter-device-btn,
html.demo-light .filter-cat-btn {
  color: #64748b;
}

html.demo-light .filter-device-btn:hover,
html.demo-light .filter-cat-btn:hover {
  color: #334155;
}

html.demo-light .filter-device-btn.active {
  border-color: #6366f1;
  color: #4f46e5;
}

html.demo-light .filter-cat-btn.filter-cat-uncat {
  border-color: #cbd5e1;
  color: #64748b;
}

html.demo-light .filter-cat-btn.filter-cat-uncat.active {
  border-color: #6366f1;
  color: #4f46e5;
}

html.demo-light .filter-check {
  color: #334155;
}

html.demo-light .filter-cb {
  accent-color: #6366f1;
}

html.demo-light .filter-sw-toggles {
  border-bottom-color: #e2e8f0;
}

html.demo-light .filter-sw-row {
  border-bottom-color: #e2e8f0;
}

html.demo-light .filter-sw-name {
  color: #0f172a;
}

html.demo-light .filter-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

html.demo-light .filter-pill:hover {
  background: #e2e8f0;
}

html.demo-light .filter-pill.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

html.demo-light .filter-select,
html.demo-light .filter-input,
html.demo-light .filter-date-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html.demo-light .filter-input::placeholder,
html.demo-light .filter-date-input::placeholder {
  color: #94a3b8;
}

html.demo-light .filter-range-track {
  background: #cbd5e1;
}

html.demo-light .filter-range-thumb {
  border-color: #ffffff;
}

html.demo-light .filter-agent-range-label {
  color: #64748b;
}

html.demo-light .filter-footer {
  border-top-color: #e2e8f0;
}

html.demo-light .filter-footer-icon {
  color: #64748b;
}

html.demo-light .filter-footer-icon:hover {
  background: #e2e8f0;
  color: #334155;
}

html.demo-light .filter-footer-icon.filter-clear:hover {
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
}

html.demo-light .filter-save-inline {
  background: #ffffff;
  border-color: #cbd5e1;
}

html.demo-light .filter-save-inline input {
  color: #0f172a;
}

html.demo-light .filter-collapse-btn {
  color: #64748b;
}

html.demo-light .filter-collapse-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

/* Coverage gap popover */
html.demo-light .coverage-gap-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

html.demo-light .coverage-gap-header,
html.demo-light .coverage-gap-footer {
  border-color: #e2e8f0;
}

html.demo-light .coverage-gap-title {
  color: #0f172a;
}

html.demo-light .coverage-gap-subtitle,
html.demo-light .coverage-gap-item-seen {
  color: #64748b;
}

html.demo-light .coverage-gap-item {
  border-bottom-color: #f1f5f9;
}

html.demo-light .coverage-gap-item-name {
  color: #1e293b;
}

html.demo-light .coverage-gap-provider-btn {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

html.demo-light .coverage-gap-footer a {
  color: #6d28d9;
}

/* Software status dropdown */
html.demo-light .sw-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

html.demo-light .sw-dropdown-option {
  color: #334155;
}

html.demo-light .sw-dropdown-option:hover {
  background: #f1f5f9;
}

/* Audit log modal */
html.demo-light .audit-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
}

html.demo-light .audit-modal-header,
html.demo-light .audit-modal-filters,
html.demo-light .audit-modal-footer {
  border-color: #e2e8f0;
}

html.demo-light .audit-modal-filters {
  background: #f8fafc;
}

html.demo-light .audit-search-input,
html.demo-light .audit-filter-select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html.demo-light .audit-search-input::placeholder {
  color: #94a3b8;
}

html.demo-light .audit-search-icon {
  color: #94a3b8;
}

html.demo-light .audit-filter-select {
  color: #475569;
}

html.demo-light .audit-modal-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

html.demo-light .audit-table th {
  color: #64748b;
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

html.demo-light .audit-table td {
  color: #334155;
  border-bottom-color: #f1f5f9;
}

html.demo-light .audit-table tbody tr:hover {
  background: #f8fafc;
}

html.demo-light .audit-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

html.demo-light .audit-modal input[type="text"],
html.demo-light .audit-modal select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Note modal */
html.demo-light .note-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

html.demo-light #note-modal-empty,
html.demo-light #note-modal-body {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

/* Custom columns modal */
html.demo-light .cc-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);
}

html.demo-light .cc-rule-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.demo-light .cc-rule-row:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

html.demo-light .cc-rule-value {
  color: #64748b;
}

html.demo-light .cc-act-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

html.demo-light .cc-wizard-card,
html.demo-light .cc-type-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.demo-light .cc-type-card.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

html.demo-light .cc-sw-list {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.demo-light .cc-sw-item:hover {
  background: #f1f5f9;
}

html.demo-light .cc-modal input[type="text"],
html.demo-light .cc-modal select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.demo-light .cc-modal .border-slate-700\/30 {
  border-color: #e2e8f0 !important;
}

/* Organizations page search inputs in light mode */
html.demo-light #organizations-section input[type="text"],
html.demo-light #organizations-section select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.demo-light .agents-updating-overlay {
  background: rgba(255, 255, 255, 0.55);
}

html.demo-light .agents-updating-badge {
  background: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Columns & saved configurations menus (light mode) */
html.demo-light .agents-toolbar-menu {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

html.demo-light .agents-menu-search-wrap,
html.demo-light .agents-menu-footer,
html.demo-light .agents-saved-footer {
  border-color: #e2e8f0;
}

html.demo-light .agents-menu-search input,
html.demo-light .agents-saved-name-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html.demo-light .agents-col-option {
  color: #1e293b;
}

html.demo-light .agents-col-option:hover {
  background: #f1f5f9;
}

html.demo-light .agents-col-check {
  border-color: #94a3b8;
}

html.demo-light .agents-col-divider,
html.demo-light .agents-saved-group-label {
  color: #64748b;
  border-color: #e2e8f0;
}

html.demo-light .agents-saved-name,
html.demo-light .agents-columns-toast {
  color: #0f172a;
}

html.demo-light .agents-columns-toast {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.demo-light .agents-saved-item:hover {
  background: #f1f5f9;
}

html.demo-light .agents-saved-scope-tip {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.demo-light .agents-saved-scope-tip strong {
  color: #0f172a;
}

html.demo-light .cc-rule-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

html.demo-light .cc-rule-name {
  color: #0f172a;
}

html.demo-light .cc-rule-value {
  color: #475569;
}

html.demo-light .cc-list-header {
  border-color: #e2e8f0;
}

html.demo-light .cc-new-rule-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

html.demo-light .cc-rules-search-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Demo page: no marketing nav stack padding */
body.demo-page {
  padding-top: 0 !important;
}

/* Agents presence stat pills (production parity) */
.agents-demo-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem 0.5rem;
  width: 100%;
}
.agents-demo-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}
.agents-demo-toolbar-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0;
}
.agents-demo-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.55rem 0.32rem 0.38rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(100, 116, 139, 0.32);
  background: rgba(15, 23, 42, 0.5);
  min-width: 4.75rem;
  text-align: left;
}
.agents-demo-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.42rem;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.agents-demo-stat-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  line-height: 1.1;
}
.agents-demo-stat-value {
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.agents-demo-stat-label {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.88;
}
.agents-demo-stat--online {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}
.agents-demo-stat--online .agents-demo-stat-icon {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.agents-demo-stat--online .agents-demo-stat-value,
.agents-demo-stat--online .agents-demo-stat-label {
  color: #6ee7b7;
}
.agents-demo-stat--offline {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}
.agents-demo-stat--offline .agents-demo-stat-icon {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.agents-demo-stat--offline .agents-demo-stat-value,
.agents-demo-stat--offline .agents-demo-stat-label {
  color: #fca5a5;
}
.agents-demo-stat--total {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}
.agents-demo-stat--total .agents-demo-stat-icon {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}
.agents-demo-stat--total .agents-demo-stat-value,
.agents-demo-stat--total .agents-demo-stat-label {
  color: #93c5fd;
}
.agents-demo-stat-btn {
  cursor: pointer;
  margin: 0;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.agents-demo-stat-btn:hover,
.agents-demo-stat-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.agents-demo-stat--active {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45);
}

/* Agent detail page */
.agent-detail-wrap {
  position: relative;
}
.agent-detail-wrap::before {
  content: "";
  position: absolute;
  inset: -2rem 10% auto;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.agent-detail-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.agent-detail-back-row {
  display: flex;
  align-items: center;
}
.agent-detail-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.agent-detail-back:hover {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
}
.agent-detail-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
}
.agent-detail-hero--interactive,
.agent-detail-status-card--interactive {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
.agent-detail-hero--interactive:hover,
.agent-detail-status-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}
.agent-detail-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.agent-detail-hero h1 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
.agent-detail-hero p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}
.agent-detail-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .agent-detail-status-grid {
    grid-template-columns: 1fr;
  }
}
.agent-detail-status-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}
.agent-detail-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
}
.agent-detail-status-icon.is-online {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}
.agent-detail-status-icon.is-offline {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}
.agent-detail-status-icon.is-os {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.agent-detail-status-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.agent-detail-status-label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #94a3b8;
}
.agent-detail-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}
.agent-detail-card-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.agent-detail-card-body {
  padding: 1.5rem;
}
.agent-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}
@media (max-width: 960px) {
  .agent-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .agent-detail-info-grid {
    grid-template-columns: 1fr;
  }
}
.agent-detail-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.agent-detail-info-value {
  font-size: 0.9375rem;
  color: #e2e8f0;
}
.agent-detail-link-btn {
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: rgba(49, 46, 129, 0.35);
  color: #c7d2fe;
  font-size: 0.75rem;
  cursor: not-allowed;
  opacity: 0.85;
}
/* Software checks — tile grid */
.agent-detail-checks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent 55%, rgba(16, 185, 129, 0.1));
}
.agent-detail-checks-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.agent-detail-checks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(16, 185, 129, 0.22));
  color: #a5b4fc;
  flex-shrink: 0;
}
.agent-detail-checks-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
.agent-detail-checks-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent-detail-check-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}
.agent-detail-check-pill--warn {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(127, 29, 29, 0.35);
  color: #fecdd3;
}
.agent-detail-check-section + .agent-detail-check-section {
  margin-top: 1.5rem;
}
.agent-detail-check-section-label {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
}
.agent-detail-check-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .agent-detail-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .agent-detail-check-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.agent-detail-check-tile {
  display: flex;
  min-height: 5.5rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.45);
  background: rgba(15, 23, 42, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.agent-detail-check-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}
.agent-detail-check-tile--pass {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(6, 78, 59, 0.22);
}
.agent-detail-check-tile--fail {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(127, 29, 29, 0.25);
}
.agent-detail-check-tile--neutral {
  border-color: rgba(100, 116, 139, 0.4);
  background: rgba(30, 41, 59, 0.45);
}
.agent-detail-check-tile-top {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.agent-detail-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.45);
  flex-shrink: 0;
}
.agent-detail-check-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: #f8fafc;
}
.agent-detail-check-badge {
  align-self: flex-end;
  margin-top: 0.75rem;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.agent-detail-check-badge.agent-detail-sw--installed {
  background: rgba(16, 185, 129, 0.18);
}
.agent-detail-check-badge.agent-detail-sw--missing {
  background: rgba(244, 63, 94, 0.2);
}
.agent-detail-check-badge.agent-detail-sw--na {
  background: rgba(100, 116, 139, 0.25);
}
.agent-detail-sw-section + .agent-detail-sw-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(51, 65, 85, 0.35);
}
.agent-detail-sw-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.agent-detail-sw-count {
  font-weight: 600;
  color: #cbd5e1;
  text-transform: none;
  letter-spacing: normal;
}
.agent-detail-sw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(51, 65, 85, 0.35);
  background: rgba(15, 23, 42, 0.35);
}
.agent-detail-sw-row + .agent-detail-sw-row {
  margin-top: 0.5rem;
}
.agent-detail-sw-row--alert {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(127, 29, 29, 0.22);
}
.agent-detail-sw-name {
  font-weight: 500;
}
.agent-detail-sw-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.agent-detail-sw--installed {
  color: #6ee7b7;
}
.agent-detail-sw--missing {
  color: #fda4af;
}
.agent-detail-sw--na {
  color: #94a3b8;
}
.agent-detail-sw-footnote {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}
.agent-detail-sw-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), transparent 55%, rgba(99, 102, 241, 0.12));
}
.agent-detail-sw-card-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.agent-detail-sw-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(99, 102, 241, 0.28));
  color: #93c5fd;
  flex-shrink: 0;
}
.agent-detail-sw-card-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
.agent-detail-sw-entry-count {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #cbd5e1;
}
.agent-detail-sw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.agent-detail-sw-search,
.agent-detail-sw-select {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}
.agent-detail-sw-search {
  flex: 1 1 220px;
  min-width: 180px;
}
.agent-detail-sw-select {
  min-width: 140px;
}
.agent-detail-sw-table-wrap {
  overflow: auto;
  max-height: 320px;
  border: 1px solid rgba(51, 65, 85, 0.35);
  border-radius: 0.625rem;
}
.agent-detail-sw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.agent-detail-sw-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}
.agent-detail-sw-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.agent-detail-sw-table th.agent-detail-sw-sort-header .agent-detail-sw-sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition:
    opacity 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.agent-detail-sw-table th.agent-detail-sw-sort-header .agent-detail-sw-sort-icon:not(.is-active) {
  opacity: 0;
  transform: scale(0.88);
  pointer-events: none;
}
.agent-detail-sw-table th.agent-detail-sw-sort-header:hover .agent-detail-sw-sort-icon:not(.is-active) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.agent-detail-sw-table th.agent-detail-sw-sort-header .agent-detail-sw-sort-icon.is-active {
  opacity: 1;
  transform: scale(1);
  color: #93c5fd;
}
.agent-detail-sw-table th.agent-detail-sw-sort-header:nth-child(2),
.agent-detail-sw-table td:nth-child(2) {
  width: 10.5rem;
  min-width: 10.5rem;
  max-width: 10.5rem;
}
.agent-detail-sw-sort-btn:hover {
  color: #e2e8f0;
}
.agent-detail-sw-sort-btn[aria-sort="ascending"],
.agent-detail-sw-sort-btn[aria-sort="descending"] {
  color: #e2e8f0;
}
.agent-detail-sw-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.25);
}
.agent-detail-sw-data-row {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.agent-detail-sw-data-row.is-alt {
  background: rgba(15, 23, 42, 0.22);
}
.agent-detail-sw-data-row:hover {
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.85);
}
.agent-detail-sw-installed {
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
}
.agent-detail-sw-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  color: #94a3b8;
}
.agent-detail-scopes-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent 55%, rgba(99, 102, 241, 0.12));
}
.agent-detail-scopes-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.agent-detail-scopes-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.28));
  color: #c4b5fd;
  flex-shrink: 0;
}
.agent-detail-scopes-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}
.agent-detail-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
@media (max-width: 640px) {
  .agent-detail-scope-grid {
    grid-template-columns: 1fr;
  }
}
.agent-detail-scope-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(51, 65, 85, 0.35);
  background: rgba(15, 23, 42, 0.25);
  cursor: not-allowed;
}
.agent-detail-scope-label {
  display: block;
  font-weight: 600;
  color: #e2e8f0;
}
.agent-detail-scope-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}
.agent-detail-scope-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.agent-detail-scope-reset {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.875rem;
  cursor: not-allowed;
}
.agent-detail-scope-save {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
}
