:root {
  --brand: #E42527;
  --brand-dark: #c41e20;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-soft: #F0F5FF;
  --accent: #059669;
  --accent-light: #D1FAE5;
  --purple: #7C3AED;
  --purple-light: #EDE9FE;
  --cyan: #0891B2;
  --cyan-light: #CFFAFE;
  --orange: #D97706;
  --orange-light: #FEF3C7;
  --orange-bg: #FEF3C7;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface2: #F8FAFC;
  --border: #E4E7EC;
  --border-light: #F0F2F5;
  --text: #101828;
  --text-secondary: #475467;
  --muted: #667085;
  --red: #DC2626;
  --red-bg: #FEF3F2;
  --green: #059669;
  --green-bg: #ECFDF3;
  --header-bg: #0C0E12;
  --nav-bg: #0C0E12;
  --header-bar-h: 52px;
  --nav-h: 52px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 12px 32px rgba(16,24,40,.12);
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --fs: 13px;
  --fs-sm: 12px;
  --fs-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text); font-size: var(--fs); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }
.ico-xs { width: 12px; height: 12px; opacity: .55; }
.ico-logo { width: 18px; height: 18px; color: #fff; stroke: #fff; }
.ico-search { width: 14px; height: 14px; color: #98A2B3; }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header: single professional bar ── */
.app-header {
  position: sticky; top: 0; z-index: 300;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
  overflow: visible;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header-bar-h);
  padding: 0 20px;
}

.header-left {
  display: flex; align-items: center; gap: 28px;
  min-width: 0; flex: 1;
}

.header-brand {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding-right: 20px; border-right: 1px solid rgba(255,255,255,.08);
}
.header-logo {
  width: 32px; height: 32px;
  background: linear-gradient(145deg, #E42527 0%, #B91C1C 100%);
  border: none;
  border-radius: 8px; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(228,37,39,.28);
}
.header-brand-text { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.header-title {
  font-weight: 600; font-size: 14px; color: #F9FAFB;
  letter-spacing: -.02em; white-space: nowrap;
}
.header-tagline {
  font-size: 10px; font-weight: 500; color: #667085;
  letter-spacing: .04em; text-transform: uppercase;
}

.main-nav {
  display: flex; align-items: center; gap: 2px;
  min-height: 36px; overflow: visible;
  flex-wrap: nowrap;
}

.nav-tab {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  background: none; border: none; color: #98A2B3;
  padding: 0 12px; height: 32px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-tab:hover {
  color: #E4E7EC;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.nav-tab.active {
  color: #0C0E12; font-weight: 600;
  background: #fff;
  text-decoration: none;
}

/* Grouped dropdown nav */
.nav-dropdown { position: relative; flex-shrink: 0; }
.nav-dropdown-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: #98A2B3;
  padding: 0 12px; height: 32px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-dropdown-btn .ico-chev { width: 11px; height: 11px; opacity: .55; transition: transform .15s; }
.nav-dropdown.open .nav-dropdown-btn .ico-chev { transform: rotate(180deg); opacity: .9; }
.nav-dropdown-btn:hover {
  color: #E4E7EC;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.nav-dropdown.active > .nav-dropdown-btn {
  color: #0C0E12; font-weight: 600;
  background: #fff;
  text-decoration: none;
}
.nav-dropdown.open > .nav-dropdown-btn {
  color: #fff; font-weight: 600;
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16,24,40,.14); padding: 6px; z-index: 400;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
}
.nav-dropdown-menu button:hover { background: var(--surface2); color: var(--text); }
.nav-dropdown-menu button.active {
  background: var(--primary-light); color: var(--primary); font-weight: 600;
}

.nav-badge {
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 999px; min-width: 18px; text-align: center; margin-left: auto;
}

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-sm);
  padding: 0 10px; height: 32px; min-width: 160px;
}
.search-wrap:focus-within {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.header-search {
  border: none; background: transparent; font-size: 13px; width: 120px; color: #F9FAFB;
}
.header-search:focus { outline: none; width: 140px; }
.header-search::placeholder { color: #667085; }
.status-chip {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  color: #D0D5DD; background: rgba(255,255,255,.04);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}
.header-user-wrap {
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px; border-left: 1px solid rgba(255,255,255,.08);
}
.header-user { color: #D0D5DD !important; font-size: 13px; font-weight: 500; }
.btn-header-text {
  background: none; border: none; color: #98A2B3;
  font-size: 12px; font-weight: 500; cursor: pointer; padding: 4px 0;
  transition: color .15s;
}
.btn-header-text:hover { color: #fff; }
.btn-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04); color: #D0D5DD; cursor: pointer;
  display: grid; place-items: center; transition: .15s;
}
.btn-icon:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.16); }

.btn-ask-ai {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 10px;
  border-radius: 999px;
  border: 1px solid #c7d7fe;
  background: linear-gradient(180deg, #f5f8ff 0%, #eef4ff 100%);
  color: #3b5998; cursor: pointer; flex-shrink: 0;
  font-size: 12px; font-weight: 600; letter-spacing: -.01em;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 1px 2px rgba(59, 89, 152, .08);
}
.btn-ask-ai:hover {
  background: linear-gradient(180deg, #eef4ff 0%, #e3ecff 100%);
  border-color: #a4bcf7;
  box-shadow: 0 2px 8px rgba(59, 89, 152, .12);
  transform: translateY(-1px);
}
.btn-ask-ai .ico { width: 15px; height: 15px; stroke: #4f6fa8; flex-shrink: 0; }
body.copilot-open .btn-ask-ai { opacity: .55; pointer-events: none; }

.server-pill { display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.dot.online { background: var(--accent); }

.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.page-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 6px 16px; display: flex; align-items: center; justify-content: space-between;
}
.page-header.compact { padding: 5px 16px; min-height: 36px; }
.page-header-text { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.page-header h1 { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.page-sub {
  font-size: 12px; color: var(--muted); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 480px;
}
.page-sub:empty { display: none; }
.page-sub::before { content: '·'; margin-right: 8px; color: var(--border); }

.dash-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.dash-tab {
  padding: 5px 12px; background: none; border: none;
  font-size: var(--fs-sm); font-weight: 500; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dash-tab:hover { color: var(--primary); }
.dash-tab.active { color: var(--primary); border-bottom-color: var(--brand); font-weight: 600; }
.dash-panel { display: none; }
.dash-panel.active { display: block; }

.page-content { padding: 6px 12px; overflow-y: auto; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-content:has(#view-dashboard.view.active) { max-width: 100%; padding: 4px 8px 8px; }
.view { display: none; } .view.active { display: block; }

#view-dashboard .dash-tabs { margin-bottom: 6px; }
#view-dashboard .dash-summary { grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 6px; }
#view-dashboard .dash-charts { gap: 6px; margin-bottom: 6px; }
#view-dashboard .dash-lower {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 6px; align-items: stretch; min-height: calc(100vh - 340px);
}
#view-dashboard .dash-right-stack { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
#view-dashboard .dash-fleet-panel,
#view-dashboard .dash-fill-panel {
  margin-bottom: 0; padding: 10px 12px; display: flex; flex-direction: column; min-height: 0;
}
#view-dashboard .dash-scroll { flex: 1; overflow-y: auto; min-height: 100px; }
#view-dashboard .chart-tile { padding: 8px 10px; min-height: 140px; }
.dash-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary);
}
.dash-badge.ok { background: var(--green-bg); color: var(--accent); }
.dash-badge.warn { background: var(--orange-bg); color: var(--orange); }

.summary-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 4px; }
.summary-tile.blue .value { color: var(--primary); }
.summary-tile {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 6px 10px; box-shadow: var(--shadow);
}
#view-dashboard .summary-tile { padding: 6px 8px; }
#view-dashboard .summary-tile .value { font-size: 16px; }
.summary-tile.green .value { color: var(--green); }
.summary-tile.red .value { color: var(--red); }
.summary-tile.orange .value { color: var(--orange); }
.summary-tile .label { font-size: 11px; color: var(--muted); font-weight: 500; }
.summary-tile .value { font-size: 18px; font-weight: 700; margin: 1px 0 0; color: var(--primary); letter-spacing: -.02em; }
.summary-tile .sub { font-size: 9px; color: var(--muted); }

.charts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.chart-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow);
}
.chart-tile h4 { font-size: var(--fs); font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.chart-donut {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.chart-legend { font-size: var(--fs-sm); color: var(--text-secondary); }
.chart-legend div { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px solid var(--border); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 4px; }

.bar-chart { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.bar-label { width: 72px; color: var(--muted); }
.bar-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--primary); }
.bar-val { width: 24px; text-align: right; font-weight: 600; font-size: var(--fs-sm); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 8px; margin-bottom: 4px; box-shadow: var(--shadow);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid var(--border-light);
}
.panel-header h3 { font-size: 12px; font-weight: 600; color: var(--text); }
.panel-desc { font-size: 11px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table th {
  text-align: left; padding: 6px 8px; font-size: 9px; font-weight: 600;
  color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border);
  white-space: nowrap; text-transform: uppercase; letter-spacing: .03em;
}
.data-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
.data-table tr:hover td { background: var(--primary-light); }
.empty-cell { text-align: center; color: var(--muted); padding: 20px !important; font-size: var(--fs-sm); }

.badge, .status-badge, .edr-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  padding: 2px 6px; border-radius: 3px;
}
.status-badge.online, .badge.online { background: var(--green-bg); color: var(--green); border: none; }
.status-badge.offline, .badge.offline { background: var(--red-bg); color: var(--red); border: none; }
.edr-badge.active { background: var(--primary-light); color: var(--primary); border: none; }
.edr-badge.inactive { background: var(--bg); color: var(--muted); border: none; }

.risk-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.risk-low { background: var(--green-bg); color: var(--accent); }
.risk-medium { background: var(--orange-bg); color: var(--orange); }
.risk-high { background: var(--red-bg); color: var(--red); }

.severity { font-size: 8px; font-weight: 800; padding: 2px 5px; border-radius: 2px; text-transform: uppercase; }
.sev-critical { background: var(--red); color: #fff; }
.sev-high { background: var(--red-bg); color: var(--red); }
.sev-medium { background: var(--orange-bg); color: var(--orange); }
.sev-low { background: var(--green-bg); color: var(--accent); }
.sev-info { background: var(--primary-light); color: var(--primary); }

.activity-feed { max-height: 240px; overflow-y: auto; }
.activity-item, .event-item {
  display: flex; gap: 6px; align-items: flex-start;
  padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 12px; line-height: 1.35;
}
.activity-time, .event-time { font-family: var(--font-mono); font-size: 9px; color: var(--muted); min-width: 40px; }
.event-ok { color: var(--accent); } .event-fail { color: var(--red); }

.incident-item, .alert-item {
  padding: 8px 10px; border-radius: var(--radius); font-size: var(--fs-sm);
  margin-bottom: 6px; border-left: 3px solid; background: var(--surface2);
}
.incident-high, .alert-error { border-color: var(--red); background: var(--red-bg); }
.incident-medium, .alert-warn { border-color: var(--orange); background: var(--orange-bg); }
.incident-low, .alert-info { border-color: var(--primary); background: var(--primary-light); }
.alert-ok { border-color: var(--accent); background: var(--green-bg); }
#view-dashboard .alert-item, #view-dashboard .event-item { margin-bottom: 3px; padding: 4px 6px; font-size: 11px; }
#view-dashboard .empty-state { padding: 8px; font-size: 11px; }

#view-security .summary-strip { gap: 4px; margin-bottom: 4px; }
#view-security .summary-tile .value { font-size: 17px; }
#view-security .panel { margin-bottom: 0; }
#view-security .activity-feed { max-height: calc(100vh - 200px); }
#view-security .activity-item:last-child { border-bottom: none; }

.fleet-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px; flex: 1; align-content: start; overflow-y: auto;
}
.fleet-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  background: var(--surface2); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.fleet-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(34, 109, 180, .12); }
.fleet-card.offline { opacity: .85; border-color: #f5c6c2; background: #fffbfb; }
.fleet-card-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.fleet-card-top strong { font-size: 12px; display: block; line-height: 1.3; }
.fleet-card-top .muted { font-size: 10px; }
.fleet-os {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center; background: #fff; border: 1px solid var(--border);
}
.fleet-os .ico { width: 16px; height: 16px; }
.fleet-os.os-win .ico { color: #0078d4; }
.fleet-card-top .status-badge { margin-left: auto; flex-shrink: 0; }
.fleet-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px;
}
.fleet-metrics > div {
  background: var(--surface); border: 1px solid var(--border-light); border-radius: 6px;
  padding: 4px 6px; text-align: center;
}
.fleet-metrics span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; }
.fleet-metrics strong { font-size: 12px; }
.fleet-protection { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.prot-chip {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .02em;
}
.prot-chip.ok { background: var(--green-bg); color: var(--accent); }
.prot-chip.bad { background: var(--red-bg); color: var(--red); }
.prot-chip.na { background: var(--surface2); color: var(--muted); }
.fleet-foot { font-size: 10px; line-height: 1.35; }
.fleet-empty {
  grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 10px; font-size: 12px;
}

.breadcrumb { margin-bottom: 8px; }

/* Endpoint detail — compact top, no gradients, full-width content */
.main-area.detail-mode .page-header { display: none; }
.main-area.detail-mode .page-content {
  padding: 6px 10px 10px;
  max-width: none;
}

.detail-compact-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(43,51,64,.04);
}
.detail-back { flex-shrink: 0; font-size: var(--fs-sm); padding: 0; }
.detail-title-block {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.detail-name-col { min-width: 0; }
.detail-title-block h2 {
  font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.02em;
}
.detail-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.detail-os-line { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.detail-meta { font-size: 11px; }
.os-icon-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
}
.os-icon-badge.os-win { background: #e8f4fd; color: #0078d4; }
.os-icon-badge.os-linux { background: #fef3c7; color: #b45309; }
.os-icon-badge.os-apple { background: #f3f4f6; color: #111827; }
.os-icon-badge.os-generic { background: var(--primary-light); color: var(--primary); }
.ico-os { width: 22px; height: 22px; }
.ico-chip { width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; }
.detail-header-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-shrink: 0; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 120px; }
.detail-chip {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface2); white-space: nowrap;
}
.detail-chip.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.detail-chip.warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.detail-chip.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.detail-chip.info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* Modern metric cards */
.metric-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px;
}
.metric-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(43,51,64,.04);
  transition: box-shadow .15s, border-color .15s;
}
.metric-card:hover { border-color: #c5d0de; box-shadow: 0 4px 12px rgba(43,51,64,.08); }
.metric-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
}
.metric-icon .ico { width: 18px; height: 18px; }
.m-cpu .metric-icon { background: #eff6ff; color: #2563eb; }
.m-mem .metric-icon { background: #ecfdf5; color: #059669; }
.m-proc .metric-icon { background: #f5f3ff; color: #7c3aed; }
.m-up .metric-icon { background: #fff7ed; color: #ea580c; }
.m-disk .metric-icon { background: #fef2f2; color: #dc2626; }
.m-net .metric-icon { background: #ecfeff; color: #0891b2; }
.metric-body { flex: 1; min-width: 0; }
.metric-label {
  display: block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); margin-bottom: 2px;
}
.metric-value { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.metric-value.mono { font-size: 13px; font-family: var(--font-mono); font-weight: 600; }
.metric-sub { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.metric-bar {
  height: 4px; background: #eef1f6; border-radius: 99px; overflow: hidden; margin-top: 6px;
}
.metric-fill { height: 100%; background: #3b82f6; border-radius: 99px; transition: width .3s; }
.metric-fill.mem { background: #10b981; }
.metric-fill.warn { background: #f59e0b; }
.metric-fill.crit { background: #ef4444; }

/* Overview stat row */
.detail-card-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px;
}
.overview-stat {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
}
.overview-stat-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
}
.overview-stat-icon .ico { width: 17px; height: 17px; }
.overview-stat.c-blue .overview-stat-icon { background: #eff6ff; color: #2563eb; }
.overview-stat.c-green .overview-stat-icon { background: #ecfdf5; color: #059669; }
.overview-stat.c-purple .overview-stat-icon { background: #f5f3ff; color: #7c3aed; }
.overview-stat.c-orange .overview-stat-icon { background: #fff7ed; color: #ea580c; }
.overview-stat.c-red .overview-stat-icon { background: #fef2f2; color: #dc2626; }
.overview-stat.c-teal .overview-stat-icon { background: #ecfeff; color: #0891b2; }
.overview-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.overview-stat-value { font-size: 17px; font-weight: 700; display: block; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.info-item {
  padding: 7px 9px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.info-item span { font-size: 9px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.info-item strong { display: block; margin-top: 2px; font-size: var(--fs-sm); word-break: break-all; }

.script-categories { display: flex; flex-direction: column; gap: 12px; }
.script-category h4 { font-size: var(--fs); font-weight: 700; color: var(--primary); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.script-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.script-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; background: var(--surface2);
}
.script-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.script-card-name { font-weight: 600; font-size: var(--fs-sm); font-family: var(--font-mono); margin-bottom: 3px; }
.script-card-desc { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: 3px;
  padding: 4px 8px; font-size: var(--fs-sm); cursor: pointer; color: var(--text-secondary);
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); margin: 8px 0 3px; }
select, input, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 8px; font-size: var(--fs-sm); color: var(--text); background: var(--surface);
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,114,188,.12); }
textarea { resize: vertical; font-family: var(--font-mono); }
.select-sm { width: auto; padding: 4px 7px; font-size: var(--fs-sm); }

.btn {
  border: none; border-radius: var(--radius); padding: 5px 12px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--primary), #6366f1); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--primary-dark), #4f46e5); }
.btn.accent { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(11,173,117,.2); }
.btn.secondary { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.btn.secondary:hover:not(:disabled) { background: var(--surface2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.sm, .btn-sm { padding: 4px 9px; font-size: var(--fs-sm); }
.btn.full-width { width: 100%; justify-content: center; margin-top: 10px; }
.btn-ghost { background: none; border: 1px solid var(--border); border-radius: 3px; padding: 3px 7px; font-size: var(--fs-sm); cursor: pointer; color: var(--muted); }
.btn-link { background: none; border: none; color: var(--primary); font-size: var(--fs-sm); cursor: pointer; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.table-btn { background: var(--primary-light); border: 1px solid #b3d9f2; border-radius: 3px; padding: 2px 7px; font-size: 9px; cursor: pointer; color: var(--primary); font-weight: 600; }
.table-btn:hover { background: var(--primary); color: #fff; }
.panel-actions-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.result-box {
  background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; min-height: 80px; max-height: 300px; overflow: auto;
  font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; color: #2d4a63;
}
.result-box.success { border-color: #b7e4c7; background: var(--green-bg); }
.result-box.error { border-color: #f5c6c2; background: var(--red-bg); color: var(--red); }
.code-block { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; font-family: var(--font-mono); font-size: var(--fs-sm); margin-top: 6px; }

.ai-banner { padding: 8px 10px; border-radius: var(--radius); margin-bottom: 10px; font-size: var(--fs-sm); border: 1px solid var(--border); }
.ai-banner.ready { background: var(--green-bg); border-color: #b7e4c7; color: var(--accent); }
.ai-banner.missing { background: var(--orange-bg); border-color: #fde68a; color: var(--orange); }
.ai-examples { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.ai-page-panel { display: flex; flex-direction: column; min-height: calc(100vh - 180px); }
.ai-page-chat { flex: 1; min-height: 320px; max-height: calc(100vh - 340px); }
.ai-advanced { margin-top: 12px; font-size: var(--fs-sm); }
.ai-advanced summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ai-advanced-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* AI Copilot — modern assistant panel */
.ai-copilot-backdrop {
  position: fixed; inset: 0; z-index: 1198; background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(2px);
}
.ai-copilot-backdrop.hidden { display: none; }
.ai-copilot-drawer {
  position: fixed; top: 0; right: 0; z-index: 1199;
  width: min(440px, 100vw); height: 100vh;
  background: #f8fafc; border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .12);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}
.ai-copilot-drawer.open { transform: translateX(0); }
.copilot-top {
  padding: 16px 16px 12px; background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.copilot-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.copilot-header-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #0078d4, #106ebe);
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 120, 212, .25);
}
.copilot-header-icon .ico { width: 18px; height: 18px; stroke: #fff; }
.copilot-header strong { font-size: 15px; color: #0f172a; display: block; }
.copilot-sub { font-size: 11px; color: #64748b; margin-top: 1px; }
.copilot-close {
  margin-left: auto; width: 32px; height: 32px; border: none; border-radius: 8px;
  background: transparent; color: #64748b; cursor: pointer; font-size: 16px;
}
.copilot-close:hover { background: #f1f5f9; color: #0f172a; }
.copilot-device label {
  display: block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #64748b; margin-bottom: 4px;
}
.copilot-device select {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 13px; background: #fff; color: #0f172a;
}
.copilot-messages {
  flex: 1; overflow-y: auto; min-height: 0; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.copilot-bottom {
  flex-shrink: 0; padding: 12px 16px 16px; background: #fff;
  border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 16px rgba(15, 23, 42, .04);
}
.copilot-msg { display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
.copilot-msg.user { align-items: flex-end; }
.copilot-msg.assistant { align-items: flex-start; }
.copilot-bubble {
  max-width: 94%; padding: 10px 12px; border-radius: 14px; font-size: 12px; line-height: 1.5;
  word-break: break-word;
}
.copilot-msg.user .copilot-bubble {
  background: linear-gradient(135deg, #0078d4, #106ebe); color: #fff;
  border-bottom-right-radius: 4px; box-shadow: 0 2px 8px rgba(0, 120, 212, .2);
}
.copilot-msg.assistant .copilot-bubble {
  background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .05); color: #1e293b;
}
.copilot-msg.assistant.error .copilot-bubble { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.copilot-msg.assistant.success .copilot-bubble { border-color: #bbf7d0; background: #f0fdf4; }
.copilot-msg.assistant.loading .copilot-bubble { min-width: 200px; padding: 14px 16px; }
.copilot-bubble.has-media { padding: 10px; max-width: 100%; }
.copilot-bubble .copilot-text { margin-bottom: 8px; white-space: pre-wrap; font-size: 12px; }
.copilot-capture {
  display: block; max-width: 100%; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid #e2e8f0; background: #0f172a;
}
.copilot-msg-time { font-size: 10px; color: #94a3b8; padding: 0 4px; }
.copilot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; max-height: 72px; overflow-y: auto; }
.copilot-chips .chip {
  font-size: 11px; padding: 5px 10px; border-radius: 999px;
  background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155; font-weight: 500;
}
.copilot-chips .chip:hover { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.copilot-input-row { display: flex; gap: 8px; align-items: stretch; }
.copilot-input {
  flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; font-family: inherit; min-height: 48px;
  background: #f8fafc; transition: border-color .15s, box-shadow .15s;
}
.copilot-input:focus { outline: none; border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0, 120, 212, .15); background: #fff; }
.copilot-send {
  flex-shrink: 0; min-width: 56px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #0078d4, #106ebe); color: #fff;
  font-weight: 600; font-size: 13px; padding: 0 14px;
  box-shadow: 0 2px 8px rgba(0, 120, 212, .3); transition: opacity .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.copilot-send:hover:not(:disabled) { filter: brightness(1.05); }
.copilot-send:disabled { opacity: .55; cursor: not-allowed; }
.copilot-send-icon { font-size: 14px; }
/* Loading state */
.cp-loading { display: flex; flex-direction: column; gap: 10px; }
.cp-load-row { display: flex; align-items: center; gap: 10px; }
.cp-spinner {
  width: 18px; height: 18px; border: 2px solid #e2e8f0; border-top-color: #0078d4;
  border-radius: 50%; animation: cp-spin .7s linear infinite; flex-shrink: 0;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-load-text { font-size: 12px; font-weight: 600; color: #334155; }
.cp-load-sub { font-size: 11px; color: #64748b; }
.cp-progress { height: 3px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.cp-progress-bar {
  height: 100%; width: 35%; background: linear-gradient(90deg, #0078d4, #38bdf8);
  border-radius: 99px; animation: cp-progress 1.2s ease-in-out infinite;
}
@keyframes cp-progress {
  0% { transform: translateX(-100%); width: 40%; }
  50% { width: 60%; }
  100% { transform: translateX(280%); width: 40%; }
}
/* Result cards inside chat */
.cp-result {
  border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; background: #fafbfc;
}
.cp-result-head {
  padding: 8px 10px; font-size: 12px; font-weight: 700; color: #0f172a;
  background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
}
.cp-result-meta { padding: 6px 10px; font-size: 10px; color: #64748b; border-bottom: 1px solid #f1f5f9; }
.cp-result-body { padding: 8px 10px; font-size: 11px; }
.cp-kv { display: flex; flex-direction: column; gap: 4px; }
.cp-kv-row {
  display: flex; justify-content: space-between; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}
.cp-kv-row:last-child { border-bottom: none; }
.cp-kv-row span { color: #64748b; flex-shrink: 0; }
.cp-kv-row strong { color: #0f172a; text-align: right; font-weight: 600; word-break: break-word; }
.cp-list { list-style: none; margin: 0; padding: 0; }
.cp-list li {
  padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 11px; line-height: 1.4; color: #334155;
}
.cp-list li:last-child { border-bottom: none; }
.cp-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #64748b; margin: 8px 0 4px; }
.cp-empty { font-size: 11px; color: #94a3b8; font-style: italic; padding: 4px 0; }
.cp-badge-ok { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 10px; font-weight: 700; }
.cp-badge-warn { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 10px; font-weight: 700; }

.muted { color: var(--muted); }
.empty-state { color: var(--muted); font-size: var(--fs-sm); padding: 16px; text-align: center; }
.empty-state.compact { padding: 8px 10px; font-size: 11px; }
#view-assets .empty-state { padding: 8px 10px; font-size: 11px; }
.settings-panel { max-width: 480px; }

.toast {
  position: fixed; bottom: 14px; right: 14px; background: var(--text); color: #fff;
  padding: 8px 14px; border-radius: var(--radius); font-size: var(--fs-sm); z-index: 999;
  box-shadow: var(--shadow-md);
}
.toast.hidden { opacity: 0; pointer-events: none; transition: opacity .2s; }

.toolbar { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.inline-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); margin: 0; }
.admin-toolbar select { max-width: 280px; }

/* ── Systems console (endpoint list + workspace) ── */
.sys-console { height: 100%; min-height: 0; }
.sys-layout {
  display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 10px;
  height: calc(100vh - 120px); min-height: 420px;
}
.sys-endpoints-panel, .sys-workspace {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  padding: 10px 12px !important;
}
.sys-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.sys-panel-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.sys-count-label {
  font-size: 11px; font-weight: 700; color: #4338ca;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; padding: 2px 8px;
}
.sys-search {
  width: 100%; height: 32px; padding: 0 10px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 12px;
}
.sys-endpoint-list { flex: 1; overflow: auto; min-height: 0; }
.sys-endpoint-table { font-size: 12px; }
.sys-endpoint-table th {
  position: sticky; top: 0; z-index: 1; background: #f8fafc;
  font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
}
.sys-endpoint-table td { padding: 8px 8px; vertical-align: middle; }
.sys-endpoint-sub { font-size: 10px; margin-top: 2px; }
.sys-os-cell { font-size: 11px; max-width: 120px; }
.sys-endpoint-row { cursor: pointer; transition: background .12s; }
.sys-endpoint-row:hover td { background: #f8fafc; }
.sys-endpoint-row.selected td { background: #eff6ff; }
.sys-status-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
}
.sys-status-pill.online { background: #dcfce7; color: #166534; }
.sys-status-pill.offline { background: #f3f4f6; color: #6b7280; }

.sys-workspace-detail { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.sys-empty-state {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); padding: 40px 20px;
}
.sys-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.sys-empty-state h3 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
.sys-empty-state p { margin: 0; font-size: 13px; max-width: 280px; }

.sys-endpoint-hero {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 60%, #ecfdf5 100%);
  border: 1px solid #c7d2fe;
}
.sys-hero-icon {
  width: 48px; height: 48px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; font-size: 24px; flex-shrink: 0;
  border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.sys-hero-body h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.sys-hero-user { margin: 4px 0 8px; font-size: 12px; color: var(--text); font-weight: 500; }
.sys-hero-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sys-chip {
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid #e2e8f0; color: #475569;
}
.sys-chip.online { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.sys-chip.offline { background: #f3f4f6; border-color: #e5e7eb; color: #6b7280; }

.sys-result-panel {
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  padding: 12px 14px; box-shadow: var(--shadow);
}
.sys-result-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.sys-result-head h3 { margin: 0; font-size: 13px; font-weight: 700; }
.sys-result-panel .admin-result-panel { border: none; padding: 0; min-height: 80px; background: transparent; }
.sys-cache-hint { font-size: 11px; color: var(--muted); margin: 0 0 10px; padding: 6px 10px; background: var(--surface2); border-radius: 6px; }
.sys-result-panel .data-table-scroll { max-height: 420px; }
.sys-settings-wrap {
  display: flex; flex-direction: column; gap: 0; min-height: 0;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff;
}
.sys-settings-nav {
  display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc, #f1f5f9); padding: 0 4px;
}
.sys-nav-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.sys-nav-item:hover { color: var(--text); background: rgba(255,255,255,.6); }
.sys-nav-item.active { color: #1d4ed8; border-bottom-color: #3b82f6; background: #fff; }
.sys-nav-icon { font-size: 14px; }

.sys-settings-list { display: flex; flex-direction: column; }
.sys-action-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: none; border-bottom: 1px solid var(--border-light);
  background: #fff; cursor: pointer; text-align: left; font: inherit;
  transition: background .12s;
}
.sys-action-row:last-child { border-bottom: none; }
.sys-action-row:hover:not(:disabled) { background: #f8fafc; }
.sys-action-row:disabled { opacity: .55; cursor: not-allowed; }
.sys-action-row.danger strong { color: #b91c1c; }
.sys-action-chevron {
  width: 28px; height: 28px; border-radius: 8px; background: #eff6ff; color: #3b82f6;
  display: grid; place-items: center; font-size: 18px; font-weight: 300; flex-shrink: 0;
}
.sys-action-row.danger .sys-action-chevron { background: #fef2f2; color: #dc2626; }
.sys-action-text { flex: 1; min-width: 0; }
.sys-action-text strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.sys-action-text small { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; }
.sys-action-go {
  font-size: 11px; font-weight: 600; color: #3b82f6; padding: 4px 10px;
  border-radius: 999px; background: #eff6ff; flex-shrink: 0;
}
.sys-action-badge.offline {
  font-size: 10px; font-weight: 700; color: #6b7280; padding: 3px 8px;
  border-radius: 999px; background: #f3f4f6; flex-shrink: 0;
}

.sys-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sys-about-row {
  padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border-light);
}
.sys-about-label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.sys-about-value { display: block; font-size: 13px; font-weight: 600; color: var(--text); word-break: break-word; }
.sys-power-ok { padding: 12px 14px; border-radius: 8px; background: #ecfdf5; color: #166534; font-weight: 600; font-size: 13px; }

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

@media (max-width: 900px) {
  .sys-layout { grid-template-columns: 1fr; height: auto; }
  .sys-endpoint-list { max-height: 220px; }
}

/* ── Admin consoles (Systems / Networks / Security) ── */
.admin-console { display: flex; flex-direction: column; gap: 6px; }
.admin-page-head { display: none; }
.admin-page-head-sys { border-left: 4px solid var(--primary); }
.admin-page-head-net { border-left: 4px solid var(--accent); }
.admin-page-head-sec { border-left: 4px solid var(--red); }

.admin-device-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 4px;
}
.admin-device-field { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
.admin-device-field label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.admin-device-field select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; background: var(--surface2);
}
.admin-device-status {
  flex: 1; font-size: 13px; color: var(--muted); text-align: right; min-width: 200px;
}
.admin-device-status.ready { color: var(--text); font-weight: 600; }
.admin-device-status .status-online { color: #059669; font-weight: 700; }
.admin-device-status .status-offline { color: var(--red); font-weight: 700; }

.admin-sections { display: flex; flex-direction: column; gap: 14px; }
.admin-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 14px 10px; box-shadow: var(--shadow);
}
.admin-section-head {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.admin-tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}

.admin-tool-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; gap: 12px; align-items: flex-start;
  text-align: left; font: inherit; width: 100%;
}
.admin-tool-card:hover {
  border-color: var(--primary); box-shadow: 0 4px 14px rgba(37,99,235,.12); transform: translateY(-1px);
}
.admin-tool-card .tool-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
}
.admin-tool-card .tool-body { flex: 1; min-width: 0; }
.admin-tool-card .tool-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.admin-tool-card .tool-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.admin-tool-card.danger { border-color: #fecaca; background: #fffafa; }
.admin-tool-card.danger .tool-icon-wrap { background: #fee2e2; }
.admin-tool-card.danger .tool-name { color: var(--red); }
.admin-tool-card.danger:hover { border-color: #f87171; box-shadow: 0 4px 14px rgba(239,68,68,.12); }
.admin-tool-card.loading { pointer-events: none; }
.admin-tool-card.loading .tool-body { opacity: .4; }
.admin-tool-card .tool-spinner {
  display: none; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(255,255,255,.75); place-items: center;
}
.admin-tool-card.loading .tool-spinner { display: grid; }
.admin-tool-card .tool-spinner::after {
  content: ''; width: 24px; height: 24px; border: 3px solid #e2e8f0;
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.admin-hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 10px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.admin-hero h2 { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 2px; }
.admin-hero p { font-size: var(--fs-sm); color: var(--muted); }
.admin-hero-sys { background: var(--surface); border-left: 3px solid var(--primary); }
.admin-hero-net { background: var(--surface); border-left: 3px solid var(--accent); }
.admin-hero-sec { background: var(--surface); border-left: 3px solid var(--red); }

/* legacy admin grid helpers — kept for firewall etc. */
.admin-group-title {
  grid-column: 1 / -1; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); padding: 6px 0 2px; border-bottom: 1px solid var(--border);
}
.admin-result-panel {
  min-height: 120px; padding: 12px; font-size: var(--fs-sm); line-height: 1.45;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.admin-result-panel.success { border-color: #b7e4c7; background: var(--green-bg); }
.admin-result-panel.error { border-color: #f5c6c2; background: var(--red-bg); }
.admin-result-panel .cp-result { margin: 0; }
.cp-loading-inline { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 8px 0; }
.data-table-scroll { overflow-x: auto; max-height: 360px; overflow-y: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface2); position: sticky; top: 0; }
.data-table.compact th, .data-table.compact td { padding: 6px 8px; }
.data-table tr:hover td { background: rgba(59,130,246,.04); }
.fw-wtt-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 9px; font-weight: 700; }
.fw-action-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.fw-action-pill.allow { background: #dcfce7; color: #166534; }
.fw-action-pill.block { background: #fee2e2; color: #991b1b; }
.fw-row-wtt td:first-child { border-left: 3px solid #3b82f6; }
.fw-row-actions { white-space: nowrap; }
.fw-row-actions .table-btn { margin-right: 4px; }
.fw-row-actions .table-btn.danger { color: var(--red); }
.fw-device-rules-wrap { margin-top: 8px; }
.fw-rules-meta { margin-top: 8px; font-size: 11px; }
.panel-header-actions { display: flex; gap: 8px; align-items: center; }
.btn-sm-select { font-size: 11px; padding: 4px 8px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.hidden { display: none !important; }
.error-text { color: var(--red); }
.admin-tool-card.danger .tool-name { color: var(--red); }

.fw-policy-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.fw-policy-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2);
  font-size: var(--fs-sm);
}

.perf-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.detail-perf { grid-template-columns: repeat(6, 1fr); margin-bottom: 6px; }
.detail-perf.compact { gap: 5px; }
.detail-perf.compact .perf-tile { padding: 5px 8px; }
.detail-perf.compact .perf-val,
.detail-perf.compact .perf-big { font-size: 13px; margin-top: 0; }
.detail-perf.compact .perf-bar { height: 4px; margin-bottom: 2px; }
.perf-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px;
}
.perf-tile.tile-cpu { border-left: 3px solid #3b82f6; }
.perf-tile.tile-mem { border-left: 3px solid #10b981; }
.perf-tile.tile-proc { border-left: 3px solid #8b5cf6; }
.perf-tile.tile-up { border-left: 3px solid #f59e0b; }
.perf-tile.tile-disk { border-left: 3px solid #ef4444; }
.perf-tile.tile-net { border-left: 3px solid #06b6d4; }
.disk-sub { font-size: 9px; margin-top: 2px; }
.ip-val { font-size: 12px; font-family: var(--font-mono); }
.panel-tint { border-left: 3px solid var(--border); }
.panel-tint.blue { border-left-color: #3b82f6; }
.panel-tint.green { border-left-color: #10b981; }
.panel-tint.orange { border-left-color: #f59e0b; }
.panel-tint.purple { border-left-color: #8b5cf6; }
.panel-tint.red { border-left-color: #ef4444; }
.detail-main-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  min-height: calc(100vh - 210px);
}
.detail-fill-panel {
  margin-bottom: 0; display: flex; flex-direction: column; min-height: 100%;
  padding: 14px 16px;
}
.detail-fill-panel .panel-header { margin-bottom: 8px; padding-bottom: 6px; }
.detail-fill-panel .panel-header h3 { font-size: 14px; }
.detail-scroll { flex: 1; overflow-y: auto; min-height: 200px; }
#view-agent-detail .info-item { padding: 10px 12px; }
#view-agent-detail .info-item span { font-size: 10px; }
#view-agent-detail .info-item strong { font-size: 13px; }
#view-agent-detail .net-row { padding: 10px 12px; font-size: 13px; }

.net-list { display: flex; flex-direction: column; gap: 6px; }
.net-row {
  padding: 7px 9px; border-radius: var(--radius); background: var(--surface2);
  border: 1px solid var(--border); font-size: var(--fs-sm);
}
.net-row strong { color: var(--primary); }
.monitor-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.monitor-toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.monitor-frame {
  background: #0f172a; border-radius: var(--radius); min-height: 280px;
  display: grid; place-items: center; overflow: hidden; border: 2px solid #334155;
}
.monitor-frame img { max-width: 100%; max-height: 420px; display: block; }
.monitor-placeholder { color: #94a3b8; font-size: var(--fs-sm); padding: 20px; text-align: center; }
.monitor-meta { font-size: 10px; margin-top: 6px; }
.monitor-telemetry { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.monitor-stat {
  padding: 8px; border-radius: var(--radius); background: var(--surface2);
  border: 1px solid var(--border); text-align: center;
}
.monitor-stat .val { font-size: 18px; font-weight: 700; color: var(--primary); }
.spark-wrap { margin-top: 8px; }
.spark-wrap .label { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.spark-bar {
  flex: 1; min-width: 4px; border-radius: 2px 2px 0 0;
  background: #3b82f6; transition: height .2s;
}
.spark-bar.mem { background: #10b981; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.access-shell-panel { grid-column: 1 / -1; }
.access-target {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; font-family: var(--font-mono); font-size: var(--fs-sm); margin: 8px 0;
}
.access-actions, .access-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.shell-output {
  background: #0f172a; color: #e2e8f0; border-radius: var(--radius);
  padding: 10px; min-height: 140px; max-height: 220px; overflow: auto;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.45; margin-bottom: 8px;
}
.shell-input-row { display: flex; gap: 6px; align-items: center; }
.shell-prompt { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 700; }
.shell-input { flex: 1; font-family: var(--font-mono); font-size: 12px; }
.proc-mem-bar { height: 4px; background: var(--surface2); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.proc-mem-fill { height: 100%; background: #8b5cf6; border-radius: 2px; }
.proc-mem-fill.high { background: #ef4444; }

.broadcast-hero {
  display: none;
}
.broadcast-hero-badge {
  font-size: var(--fs-sm); font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: #10b981; color: #fff; white-space: nowrap;
}
.bc-type-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.bc-format-row { display: flex; gap: 6px; margin-bottom: 10px; }
.bc-format {
  flex: 1; padding: 8px 12px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface2); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary);
}
.bc-format.active { border-color: #8b5cf6; background: #f5f3ff; color: #6d28d9; }
.bc-template-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bc-template-chip {
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 11px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.bc-template-chip:hover { border-color: var(--primary); color: var(--primary); }
.bc-ai-row { display: flex; gap: 8px; margin-bottom: 8px; }
.bc-ai-row input { flex: 1; }
.bc-ai-row .btn { white-space: nowrap; }
textarea.code-input {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.45;
  background: #0f172a; color: #e2e8f0; border-color: #334155;
}
.bc-type {
  flex: 1; min-width: 90px; padding: 8px 10px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface2); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary);
}
.bc-type.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.bc-type.critical.active { border-color: #ef4444; background: #fef2f2; color: #b91c1c; }
.bc-options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.bc-target-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.bc-radio { font-size: var(--fs-sm); font-weight: 500; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.bc-agent-picker {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface2); padding: 8px; margin-bottom: 10px; max-height: 160px; overflow-y: auto;
}
.bc-agent-picker.hidden { display: none; }
.bc-picker-toolbar { display: flex; gap: 6px; margin-bottom: 6px; }
.bc-agent-list { display: flex; flex-direction: column; gap: 4px; }
.bc-agent-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-sm); cursor: pointer;
}
.bc-agent-item:hover { border-color: var(--primary); }
.bc-agent-item input { accent-color: var(--primary); }
.bc-actions { display: flex; gap: 8px; margin-top: 10px; }
.bc-actions .btn.primary { flex: 1; justify-content: center; }
.bc-preview {
  min-height: 280px; border-radius: 12px; border: 2px solid var(--border);
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
  position: relative;
}
.bc-preview.html-mode { background: #0f172a; border-color: #334155; }
.bc-preview.html-mode.info,
.bc-preview.html-mode.warning,
.bc-preview.html-mode.critical { background: #0f172a; }
.bc-preview-frame {
  flex: 1; width: 100%; min-height: 240px; border: 0; background: #fff;
}
.bc-preview-frame.hidden,
#bcPreviewPlain.hidden { display: none; }
.bc-preview.info { background: linear-gradient(160deg, #1e5f9e 0%, #226db4 55%, #1a5690 100%); border-color: #1a5690; color: #fff; }
.bc-preview.warning { background: linear-gradient(160deg, #b45309 0%, #d97706 55%, #92400e 100%); border-color: #b45309; color: #fff; }
.bc-preview.critical { background: linear-gradient(160deg, #991b1b 0%, #dc2626 55%, #7f1d1d 100%); border-color: #991b1b; color: #fff; }
.bc-preview-title {
  font-size: 22px; font-weight: 700; padding: 28px 24px 12px; text-align: center;
  color: #fff; flex-shrink: 0;
}
.bc-preview-body {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 18px; line-height: 1.55; white-space: pre-wrap; padding: 16px 32px 24px;
  color: rgba(255,255,255,.96);
}
.bc-preview-meta {
  font-size: 10px; padding: 10px 16px; text-align: center; font-weight: 600;
  background: rgba(0,0,0,.18); color: rgba(255,255,255,.85); flex-shrink: 0;
}
.bc-history { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.bc-history-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface2);
  font-size: var(--fs-sm);
}
.bc-history-item.info { border-left: 3px solid #3b82f6; }
.bc-history-item.warning { border-left: 3px solid #f59e0b; }
.bc-history-item.critical { border-left: 3px solid #ef4444; }
.bc-history-item .bc-h-time { font-family: var(--font-mono); font-size: 9px; color: var(--muted); min-width: 52px; }

.activity-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 8px;
  min-height: calc(100vh - 200px);
}
.activity-options-panel { margin-bottom: 0; }
.activity-results-panel { margin-bottom: 0; display: flex; flex-direction: column; }
.activity-option-grid {
  display: grid; grid-template-columns: 1fr; gap: 6px; margin: 8px 0;
}
.activity-opt-card {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  text-align: left; cursor: pointer; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.activity-opt-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(43,51,64,.08); }
.activity-opt-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
}
.activity-opt-icon .ico { width: 16px; height: 16px; }
.activity-opt-card.ac-blue .activity-opt-icon { background: #eff6ff; color: #2563eb; }
.activity-opt-card.ac-purple .activity-opt-icon { background: #f5f3ff; color: #7c3aed; }
.activity-opt-card.ac-teal .activity-opt-icon { background: #ecfeff; color: #0891b2; }
.activity-opt-card.ac-green .activity-opt-icon { background: #ecfdf5; color: #059669; }
.activity-opt-card.ac-orange .activity-opt-icon { background: #fff7ed; color: #ea580c; }
.activity-opt-card.ac-red .activity-opt-icon { background: #fef2f2; color: #dc2626; }
.activity-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-opt-text strong { font-size: 12px; font-weight: 600; }
.activity-opt-text span { font-size: 10px; color: var(--muted); line-height: 1.35; }
.activity-subtabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.activity-subtab {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface2); font-size: 11px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.activity-subtab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.activity-result-body { flex: 1; overflow-y: auto; min-height: 300px; }
.activity-section-title { font-size: 12px; font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.activity-section-title:first-child { margin-top: 0; }
.activity-summary-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.activity-block { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.activity-block:last-child { border-bottom: none; }
.perf-tile .label { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.perf-bar { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.perf-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.perf-fill.mem { background: var(--accent); }
.perf-fill.warn { background: var(--orange); }
.perf-fill.crit { background: var(--red); }
.perf-val { font-size: 14px; font-weight: 700; }
.perf-big { font-size: 14px; font-weight: 700; margin-top: 4px; }
.tm-tabs {
  display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap;
  padding: 4px; background: var(--surface2); border-radius: 10px;
  border: 1px solid var(--border-light); overflow-x: auto;
}
.info-os-row { display: inline-flex; align-items: center; gap: 6px; }
.ico-info-os { width: 16px; height: 16px; flex-shrink: 0; color: #0078d4; }
.tm-tab {
  padding: 6px 14px; background: var(--surface2); border: 1px solid transparent;
  border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer;
  white-space: nowrap; margin-bottom: 6px;
}
.tm-tab:hover { color: var(--primary); background: var(--primary-light); }
.tm-tab.active {
  color: var(--primary); background: var(--surface);
  border-color: var(--border); font-weight: 600;
  box-shadow: 0 1px 3px rgba(43,51,64,.06);
}
.tm-panel { display: none; }
.tm-panel.active { display: block; }
#view-agent-detail .tm-table-wrap { max-height: calc(100vh - 200px); overflow-y: auto; }
#view-agent-detail .data-table { font-size: 13px; }
#view-agent-detail .data-table th { font-size: 10px; padding: 8px 10px; }
#view-agent-detail .data-table td { padding: 8px 10px; }
#view-agent-detail .two-col { min-height: calc(100vh - 200px); margin-bottom: 0; }
#view-agent-detail .two-col .panel { margin-bottom: 0; padding: 14px 16px; }
.tm-table-wrap { max-height: 360px; overflow-y: auto; }
.tm-search { border: 1px solid var(--border) !important; font-size: var(--fs-sm) !important; padding: 4px 8px !important; }
.data-table tr.row-clickable { cursor: pointer; }
.disk-row { margin-bottom: 8px; }
.disk-row .disk-label { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 3px; display: flex; justify-content: space-between; }
.btn-xs { padding: 2px 6px; font-size: 9px; border-radius: 3px; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); }
.btn-xs.danger { color: var(--red); border-color: #f5c6c2; }
.btn-xs:hover { background: var(--primary-light); }

@media (max-width: 1100px) {
  .header-title strong { font-size: var(--fs); }
  .summary-strip { grid-template-columns: repeat(3, 1fr); }
  .charts-row { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-card-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-main-grid { grid-template-columns: 1fr; min-height: auto; }
  .activity-layout { grid-template-columns: 1fr; }
  .monitor-layout { grid-template-columns: 1fr; }
  .access-grid { grid-template-columns: 1fr; }
  .bc-options-grid { grid-template-columns: 1fr; }
}
/* Login page — bright modern split layout */
.login-page {
  min-height: 100vh; margin: 0; position: relative; overflow-x: hidden;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
}

.login-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(160deg, #f8f9fb 0%, #f4f5f7 50%, #eef0f3 100%);
}
.login-orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  animation: login-float 18s ease-in-out infinite;
}
.login-orb-1 {
  width: 480px; height: 480px; top: -10%; left: -6%;
  background: radial-gradient(circle, rgba(37,99,235,.06), transparent 70%);
}
.login-orb-2 {
  width: 400px; height: 400px; bottom: 5%; left: 20%;
  background: radial-gradient(circle, rgba(16,24,40,.04), transparent 70%);
  animation-delay: -6s;
}
.login-orb-3 {
  width: 340px; height: 340px; top: 35%; right: 8%;
  background: radial-gradient(circle, rgba(228,37,39,.05), transparent 70%);
  animation-delay: -12s;
}
.login-grid {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(34,109,180,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,109,180,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 10%, transparent 80%);
}
@keyframes login-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -14px) scale(1.03); }
  66% { transform: translate(-12px, 10px) scale(.97); }
}

.login-layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

.login-hero {
  display: flex; align-items: center; padding: 56px 64px;
  color: var(--text);
}
.login-hero-inner { max-width: 480px; }
.login-hero-brand {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.login-hero-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(145deg, #E42527 0%, #B91C1C 100%);
  border: none;
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(228,37,39,.22);
}
.ico-logo-login { width: 24px; height: 24px; color: #fff; stroke: #fff; }
.login-hero-title {
  font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15;
  color: var(--text);
}
.login-hero-sub {
  font-size: 12px; font-weight: 500; color: var(--muted);
  margin-top: 4px; letter-spacing: .04em; text-transform: uppercase;
}
.login-hero-lead {
  font-size: 15px; line-height: 1.65; color: var(--text-secondary);
  margin: 0 0 32px; max-width: 420px;
}

.login-hero-features {
  list-style: none; display: flex; flex-direction: column; gap: 12px;
  margin: 0 0 36px; padding: 0;
}
.login-hero-features li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.login-hero-features li:hover {
  border-color: #c5daf0;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.login-feature-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary-light);
  display: grid; place-items: center;
}
.login-feature-icon .ico { width: 18px; height: 18px; stroke: var(--primary); }
.login-hero-features li strong {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px;
  color: var(--text);
}
.login-hero-features li span {
  font-size: 12px; color: var(--muted); line-height: 1.4;
}

.login-hero-stats {
  display: flex; gap: 28px; padding-top: 8px;
}
.login-stat { display: flex; flex-direction: column; gap: 2px; }
.login-stat-val {
  font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  color: var(--primary);
}
.login-stat-lbl {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}

.login-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 48px 24px;
  background: rgba(255,255,255,.55);
  border-left: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 28px;
  box-shadow: var(--shadow-md);
}
.login-card-header { margin-bottom: 28px; text-align: center; }
.login-card-logo {
  width: 44px; height: 44px; border-radius: 10px; margin: 0 auto 18px;
  background: linear-gradient(145deg, #E42527 0%, #B91C1C 100%);
  border: none;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(228,37,39,.2);
}
.login-card-logo .ico-logo-login { width: 22px; height: 22px; color: #fff; stroke: #fff; }
.login-card-header h1 {
  font-size: 26px; font-weight: 700; color: var(--text);
  margin: 0 0 6px; letter-spacing: -.03em;
}
.login-card-header p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.login-field { margin-bottom: 20px; }
.login-field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; letter-spacing: .02em;
}
.login-input-wrap {
  position: relative; display: flex; align-items: center;
}
.login-input-ico {
  position: absolute; left: 14px; width: 18px; height: 18px;
  stroke: var(--muted); pointer-events: none; z-index: 1;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%; box-sizing: border-box;
  padding: 13px 44px 13px 44px; font-size: 14px; color: var(--text);
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 12px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-form input::placeholder { color: var(--muted); }
.login-form input:hover { border-color: #c8d0dc; background: #fff; }
.login-form input:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(34,109,180,.12);
}

.login-pass-toggle {
  position: absolute; right: 10px; z-index: 2;
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; display: grid; place-items: center;
  color: var(--muted); transition: color .15s, background .15s;
}
.login-pass-toggle:hover { color: var(--text); background: var(--border-light); }
.login-pass-toggle .ico { width: 18px; height: 18px; }
.login-pass-toggle .hidden { display: none; }

.login-row { margin-bottom: 24px; }
.login-remember {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.login-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.login-check {
  width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--border); background: #fff;
  display: grid; place-items: center; transition: all .15s;
}
.login-remember input:checked + .login-check {
  background: var(--primary); border-color: var(--primary);
  box-shadow: inset 0 0 0 2px #fff;
}
.login-remember input:focus-visible + .login-check {
  box-shadow: 0 0 0 3px rgba(34,109,180,.2);
}

.login-submit {
  width: 100%; padding: 14px 20px; border: none; border-radius: 12px;
  background: var(--primary);
  color: #fff; font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, box-shadow .2s, background .15s;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(37,99,235,.22);
}
.login-submit:active:not(:disabled) { transform: translateY(0); }
.login-submit:disabled {
  opacity: .65; cursor: not-allowed; transform: none;
  box-shadow: none;
}
.login-btn-arrow { width: 18px; height: 18px; stroke: #fff; transition: transform .2s; }
.login-submit:hover:not(:disabled) .login-btn-arrow { transform: translateX(3px); }
.login-btn-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: login-spin .7s linear infinite;
}
.login-btn-spinner.hidden { display: none; }
.login-btn-arrow.hidden { display: none; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.login-error {
  background: var(--red-bg); border: 1px solid #fecaca; color: var(--red);
  padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.login-error.hidden { display: none; }

.login-foot {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light);
  text-align: center;
}
.login-foot p { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.login-foot code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--primary-soft); padding: 2px 7px; border-radius: 6px;
  color: var(--primary-dark);
}
.login-foot-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--primary); background: var(--primary-light);
  border: 1px solid #c5daf0; padding: 4px 10px; border-radius: 999px;
}
.login-copy {
  margin-top: 24px; font-size: 11px; color: var(--muted);
}

@media (max-width: 960px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-hero {
    padding: 40px 28px 24px; min-height: auto;
    border-bottom: 1px solid var(--border-light);
  }
  .login-hero-lead { display: none; }
  .login-hero-features { display: none; }
  .login-hero-stats { gap: 20px; }
  .login-stat-val { font-size: 15px; }
  .login-panel {
    padding: 32px 20px 20px;
    border-left: none; background: transparent;
  }
  .login-card {
    border-radius: 16px; padding: 32px 24px 24px;
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 480px) {
  .login-hero-stats { display: none; }
  .login-hero-brand { margin-bottom: 0; }
}

@media (max-width: 1200px) {
  .header-tagline { display: none; }
  .main-nav { gap: 0; }
  .nav-tab, .nav-dropdown-btn { padding: 0 8px; font-size: 12px; }
}

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; padding: 8px 12px; }
  .header-left { flex-wrap: wrap; gap: 12px; }
  .header-brand { border-right: none; padding-right: 0; }
  .main-nav { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .header-search { width: 90px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .perf-strip { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

/* Software Catalog */
.inv-tab-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.inv-tab {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
}
.inv-tab.active { border-color: #10b981; background: #ecfdf5; color: #047857; }
.inv-panel { display: none; }
.inv-panel.active { display: block; }
.inv-source-row { display: flex; gap: 6px; margin-bottom: 10px; }
.inv-source {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 12px; cursor: pointer;
}
.inv-source.active { border-color: #10b981; background: #ecfdf5; color: #047857; }
.inv-software-wrap { min-height: 120px; }
.inv-table-scroll { overflow: auto; max-height: 55vh; }
.inv-table td:last-child { width: 110px; text-align: right; }
.error-text { color: #b91c1c; }

.page-content:has(#view-assets.view.active) { padding: 4px 10px 8px; max-width: 100%; }

/* Asset Management */
.assets-subnav {
  display: flex; gap: 4px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.assets-subtab {
  padding: 4px 10px; border: none; background: none;
  font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.assets-subtab:hover { color: var(--text); }
.assets-subtab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.assets-pane { display: none; }
.assets-pane.active { display: block; }

.assets-panel-compact { padding: 6px 8px !important; margin-bottom: 0 !important; }
.assets-toolbar-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.assets-count-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.assets-cat-tabs { display: flex; gap: 3px; flex-wrap: wrap; flex: 1; }
.assets-filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px minmax(150px, 1fr) 32px;
  gap: 6px; align-items: center; margin-bottom: 4px;
}
.assets-filter-select,
#assetSearch {
  height: 30px; padding: 0 8px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
}
#assetSearch { width: 100%; }
.assets-sync-select { min-width: 0; }
.btn-sync-icon {
  width: 30px; height: 30px; border-radius: 6px; border: none;
  background: var(--primary); color: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, opacity .15s;
}
.btn-sync-icon:hover:not(:disabled) { background: var(--primary-dark); }
.btn-sync-icon:disabled { opacity: .6; cursor: not-allowed; }
.btn-sync-icon .ico { width: 15px; height: 15px; stroke: #fff; }
.btn-sync-icon.syncing .ico { animation: login-spin .7s linear infinite; }
.assets-cat-tab {
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px;
  background: #fff; font-size: 11px; cursor: pointer; line-height: 1.3;
}
.assets-cat-tab .tab-count {
  margin-left: 4px; padding: 0 5px; border-radius: 999px;
  background: #f1f5f9; font-size: 10px; font-weight: 600;
}
.assets-cat-tab.active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.assets-cat-tab.active .tab-count { background: #dbeafe; }
.assets-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  min-height: 0;
}
.assets-table-wrap:has(.assets-table tbody tr:nth-child(8)) {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}
.assets-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.assets-table th {
  position: sticky; top: 0; background: #f8fafc; text-align: left;
  padding: 3px 6px; border-bottom: 1px solid var(--border); font-size: 10px;
  text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap;
}
.assets-table td { padding: 3px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.assets-table .asset-sub { font-size: 10px; line-height: 1.2; margin-top: 1px; }
.assets-table tr:hover td { background: #f8fafc; cursor: pointer; }
.assets-table tr.selected td { background: #eff6ff; }
.assets-table .sno { width: 40px; color: var(--muted); text-align: center; }
.asset-tag, .asset-tag-link {
  font-family: ui-monospace, monospace; font-size: 11px; color: #1d4ed8;
  text-decoration: none !important;
}
.asset-tag-link {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
}
.asset-tag-link:hover, .asset-tag-link:focus { color: #1e40af; text-decoration: none !important; }
.asset-status { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 10px; }
.asset-status.in-use { background: #dcfce7; color: #166534; }
.asset-status.in-stock { background: #dbeafe; color: #1e40af; }
.asset-status.retired { background: #f3f4f6; color: #6b7280; }
.asset-status.repair { background: #fef3c7; color: #92400e; }
.asset-status.missing { background: #fee2e2; color: #991b1b; }
.assets-pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 4px; font-size: 11px; }

.assets-detail-panel { padding: 0; }
.asset-back-link {
  display: inline-block; margin-bottom: 6px; font-size: 12px; text-decoration: none !important;
}
.asset-detail-head {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.asset-detail-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.asset-detail-body { padding: 12px 14px; }
.asset-detail-tabs {
  display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.asset-detail-tab {
  padding: 6px 12px; border: none; background: none; font-size: 12px; font-weight: 500;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.asset-detail-tab:hover { color: var(--text); }
.asset-detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.asset-detail-grid {
  display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 12px;
}
.asset-detail-grid dt { color: var(--muted); margin: 0; font-weight: 500; }
.asset-detail-grid dd { margin: 0; color: var(--text); word-break: break-word; }
.asset-detail-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); }

.asset-comp-section { margin-top: 14px; }
.asset-comp-section h4 {
  font-size: 12px; font-weight: 700; color: var(--text); margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.asset-comp-count {
  font-size: 10px; font-weight: 600; color: #4338ca;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px;
  padding: 1px 7px;
}
.asset-comp-table-wrap {
  overflow: auto; max-height: 280px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff;
}
.asset-comp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.asset-comp-table th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  text-align: left; padding: 7px 10px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .04em;
  color: #64748b; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.asset-comp-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border-light);
  vertical-align: top; color: var(--text);
}
.asset-comp-table tbody tr:hover td { background: #f8fafc; }
.asset-comp-table tr:last-child td { border-bottom: none; }

.assets-cat-tab.cat-system.active { background: #eef2ff; border-color: #6366f1; color: #4338ca; }
.assets-cat-tab.cat-system.active .tab-count { background: #e0e7ff; }
.assets-cat-tab.cat-laptop.active { background: #eef2ff; border-color: #6366f1; color: #4338ca; }
.assets-cat-tab.cat-laptop.active .tab-count { background: #e0e7ff; }
.assets-cat-tab.cat-desktop.active { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.assets-cat-tab.cat-desktop.active .tab-count { background: #dcfce7; }
.assets-cat-tab.cat-storage.active { background: #fff7ed; border-color: #f97316; color: #c2410c; }
.assets-cat-tab.cat-storage.active .tab-count { background: #ffedd5; }
.assets-cat-tab.cat-printer.active { background: #fdf4ff; border-color: #a855f7; color: #7e22ce; }
.assets-cat-tab.cat-printer.active .tab-count { background: #f3e8ff; }
.assets-cat-tab.cat-software.active { background: #ecfeff; border-color: #06b6d4; color: #0e7490; }
.assets-cat-tab.cat-software.active .tab-count { background: #cffafe; }
.assets-cat-tab.cat-network.active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.assets-cat-tab.cat-network.active .tab-count { background: #dbeafe; }

.asset-cat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.asset-cat-badge .cat-icon { font-size: 11px; line-height: 1; }
.asset-cat-badge.cat-system { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.asset-cat-badge.cat-computer { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.asset-cat-badge.cat-laptop { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.asset-cat-badge.cat-desktop { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.asset-cat-badge.cat-storage { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.asset-cat-badge.cat-printer { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }
.asset-cat-badge.cat-software { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.asset-cat-badge.cat-network { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.asset-cat-badge.cat-other { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }

.asset-detail-tabs { gap: 6px; margin-bottom: 14px; padding-bottom: 0; }
.asset-detail-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px 8px 0 0;
  border: 1px solid transparent; background: #f8fafc;
}
.asset-detail-tab .tab-ico { font-size: 12px; }
.asset-detail-tab.tab-overview.active { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; border-bottom-color: #eff6ff; }
.asset-detail-tab.tab-components.active { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; border-bottom-color: #f0fdf4; }
.asset-detail-tab.tab-software.active { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; border-bottom-color: #fdf4ff; }

.asset-hero {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: 12px; margin-bottom: 14px;
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.asset-hero.hero-system,
.asset-hero.hero-laptop {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #fdf4ff 100%);
  border-color: #c7d2fe;
}
.asset-hero.hero-desktop {
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 55%, #eff6ff 100%);
  border-color: #bbf7d0;
}
.asset-hero-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center; font-size: 26px; flex-shrink: 0;
  background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
}
.asset-hero-body { flex: 1; min-width: 0; }
.asset-hero-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.asset-hero-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.asset-hero-sub { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.asset-hero-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hero-chip {
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.8); border: 1px solid rgba(148,163,184,.25); color: #475569;
}
.hero-tag { font-size: 11px !important; }

.asset-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
}
.overview-fact {
  padding: 10px 12px; border-radius: 10px; background: #fff;
  border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.overview-fact-label {
  display: block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); margin-bottom: 4px;
}
.overview-fact-value { font-size: 12px; font-weight: 500; color: var(--text); word-break: break-word; }

.hw-section { margin-top: 16px; }
.hw-section-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.hw-section-icon {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 14px; background: #fff; border: 1px solid var(--border);
}
.hw-section h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--text); }
.hw-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px;
}
.hw-card {
  padding: 10px 12px; border-radius: 10px; background: #fff;
  border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(15,23,42,.05);
  transition: box-shadow .15s, transform .15s;
}
.hw-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,.08); transform: translateY(-1px); }
.hw-card-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 11px; }
.hw-card-row + .hw-card-row { border-top: 1px dashed var(--border-light); }
.hw-card-label { color: var(--muted); font-weight: 500; flex-shrink: 0; }
.hw-card-value { color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }

.hw-section.hw-cpu .hw-section-icon { background: #eff6ff; border-color: #bfdbfe; }
.hw-section.hw-cpu .hw-card { border-left: 3px solid #3b82f6; }
.hw-section.hw-memory .hw-section-icon { background: #fdf4ff; border-color: #e9d5ff; }
.hw-section.hw-memory .hw-card { border-left: 3px solid #a855f7; }
.hw-section.hw-gpu .hw-section-icon { background: #fff7ed; border-color: #fed7aa; }
.hw-section.hw-gpu .hw-card { border-left: 3px solid #f97316; }
.hw-section.hw-storage .hw-section-icon { background: #ecfeff; border-color: #a5f3fc; }
.hw-section.hw-storage .hw-card { border-left: 3px solid #06b6d4; }
.hw-section.hw-network .hw-section-icon { background: #f0fdf4; border-color: #bbf7d0; }
.hw-section.hw-network .hw-card { border-left: 3px solid #22c55e; }
.hw-section.hw-printer .hw-section-icon { background: #fef2f2; border-color: #fecaca; }
.hw-section.hw-printer .hw-card { border-left: 3px solid #ef4444; }
.hw-section.hw-software .hw-section-icon { background: #eef2ff; border-color: #c7d2fe; }
.hw-section.hw-software .hw-card { border-left: 3px solid #6366f1; }

@media (max-width: 900px) {
  .assets-filters { grid-template-columns: 1fr 1fr; }
  .assets-filters .btn-sync-icon { grid-column: 2; justify-self: end; }
}

/* ── Domain Services (AD + GPO) ─────────────────────────────────────────── */
.dir-console { display: flex; flex-direction: column; gap: 14px; }
.dir-hero {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #f0fdf4 100%);
  border: 1px solid #dbeafe;
}
.dir-hero-main { display: flex; gap: 14px; align-items: center; min-width: 240px; }
.dir-hero-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; background: #fff; border: 1px solid #c7d2fe; box-shadow: 0 2px 8px rgba(59,130,246,.12);
}
.dir-hero-main h2 { margin: 0; font-size: 18px; font-weight: 700; color: #0f172a; }
.dir-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; flex: 1; min-width: 280px; }
.dir-meta-item { display: flex; flex-direction: column; gap: 2px; }
.dir-meta-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.dir-meta-item strong { font-size: 13px; color: #0f172a; }
.dir-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dir-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.dir-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; text-align: center;
}
.dir-stat-card.warn { background: #fff7ed; border-color: #fed7aa; }
.dir-stat-val { display: block; font-size: 22px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.dir-stat-lbl { display: block; font-size: 10px; color: #64748b; margin-top: 4px; font-weight: 600; text-transform: uppercase; }
.dir-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.dir-tab {
  border: none; background: transparent; padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dir-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.dir-panel { display: flex; flex-direction: column; gap: 12px; }
.dir-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.dir-status-dot.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.dir-status-dot.offline { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
@media (max-width: 1100px) {
  .dir-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dir-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-hero { flex-direction: column; }
}
