:root {
  --bg: #080b10;
  --panel: #10151e;
  --ink: #e6edf7;
  --muted: #8a96aa;
  --line: #26303e;
  --navy: #0b0f16;
  --blue: #4d7dff;
  --red: #ff5c73;
  --orange: #f2a844;
  --green: #35c891;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at 70% -20%,#152b4e 0,#080b10 38%);
  color: var(--ink);
  font: 14px Arial,sans-serif;
}
.login-screen {
  position: fixed;
  z-index: 5;
  inset: 0;
  background: radial-gradient(circle at 70% 10%,#1b3d6c,#080b10 60%);
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: min(430px,100%);
  padding: 38px;
  background: #10151e;
  border: 1px solid #2d3a4c;
  border-radius: 18px;
  box-shadow: 0 25px 80px #00000073;
}
.login-brand {
  color: #e6edf7!important;
  margin: 0 0 32px!important;
}
.login-brand span span {
  color: var(--blue);
}
.login-copy {
  color: var(--muted);
  margin: 10px 0 24px;
}
.login-card label,.investigation label {
  display: grid;
  gap: 7px;
  margin-top: 15px;
  font-weight: 700;
  font-size: 12px;
}
.login-card input,.login-card select,.investigation select,.investigation textarea,.toolbar select {
  width: 100%;
  border: 1px solid #344153;
  border-radius: 8px;
  padding: 10px;
  background: #0a0e14;
  color: var(--ink);
  font: 13px Arial,sans-serif;
}
.login-card small {
  display: block;
  margin-top: 14px;
  line-height: 1.4;
}
.primary-button {
  margin-top: 22px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px;
  background: var(--blue);
  color: #fff;
  font: 700 13px Arial,sans-serif;
  cursor: pointer;
}
.primary-button:hover {
  background: #3f6ce9;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  padding: 30px 20px;
  background: #06090d;
  border-right: 1px solid #1d2632;
  color: #cbd4ec;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.5px;
  margin: 0 10px 48px;
}
.brand span span {
  color: #78a0ff;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: #3968f5;
  border-radius: 8px;
}
nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  color: #aeb9d5;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-link:hover,.nav-link.active {
  background: #172237;
  color: #fff;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 10px;
  margin-top: auto;
  border-top: 1px solid #202b39;
}
.avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #365aa9;
  font-size: 11px;
  font-weight: 800;
}
.user-card strong,.user-card small {
  display: block;
  font-size: 11px;
}
.user-card small {
  color: #95a6ca;
  margin-top: 2px;
}
.user-card button {
  margin-left: auto;
  border: 0;
  background: none;
  color: #b6c3df;
  font-size: 20px;
  cursor: pointer;
}
.sidebar-footer {
  padding: 15px 10px 0;
  border-top: 1px solid #202b39;
  color: #d9e0f1;
  line-height: 1.8;
}
small {
  color: var(--muted);
  font-size: 11px;
}
.sidebar small {
  color: #96a6ca;
}
.live-dot,.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
  box-shadow: 0 0 0 4px #28a67a20;
}
main {
  margin-left: 240px;
  max-width: 1500px;
  padding: 34px 42px 55px;
}
.topbar,.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
h1,h2,p {
  margin: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -1px;
}
h2 {
  font-size: 17px;
  letter-spacing: -.4px;
}
h3 {
  font-size: 14px;
}
.eyebrow {
  color: #7193d9;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.system-status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 3px;
  background: #123327;
  color: #63dcae;
  padding: 9px 13px;
  border: 1px solid #1d5a42;
  border-radius: 9px;
  font-weight: 700;
}
.system-status small {
  grid-column: 2;
  color: #75bba0;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
  margin: 30px 0 18px;
}
.metric-card,.panel,.health-card {
  background: linear-gradient(145deg,#121924,#0e131b);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 5px 16px #00000032;
}
.metric-card {
  padding: 20px;
  border-top: 3px solid var(--blue);
}
.metric-card.danger {
  border-top-color: var(--red);
}
.metric-card.warning {
  border-top-color: var(--orange);
}
.metric-card.success {
  border-top-color: var(--green);
}
.metric-card p {
  color: var(--muted);
  font-weight: 600;
}
.metric-card strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 30px;
  letter-spacing: -1px;
}
.metric-note {
  color: var(--muted);
  font-size: 12px;
}
.health-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.health-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 16px;
}
.health-card div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.health-card small {
  grid-column: 1/-1;
}
.service-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #14233e;
  color: #77a0ff;
  border-radius: 7px;
}
.health-ok,.health-demo {
  padding: 4px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
}
.health-ok {
  background: #113b2d;
  color: #54d59e;
}
.health-demo {
  background: #3e2d15;
  color: #f3b55a;
}
.chart-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
}
.panel {
  padding: 22px;
}
.chart-grid .panel {
  height: 326px;
}
.chart-grid canvas {
  width: 100%;
  height: 235px;
  margin-top: 16px;
  display: block;
}
.chart-select {
  border: 1px solid #344153;
  background: #0a0e14;
  padding: 7px;
  border-radius: 7px;
  color: var(--muted);
  font: 600 12px Arial,sans-serif;
}
.alert-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}
.alert-heading {
  padding: 22px 22px 14px;
}
.toolbar {
  display: flex;
  gap: 8px;
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid #344153;
  border-radius: 7px;
  background: #0a0e14;
  padding: 0 8px;
  color: var(--muted);
}
.search input {
  border: 0;
  outline: 0;
  width: 180px;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  font: 12px Arial,sans-serif;
}
.toolbar select {
  width: auto;
  padding: 7px;
  font-size: 12px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 22px 15px;
}
.filter {
  border: 1px solid #344153;
  background: #111824;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font: 600 12px Arial,sans-serif;
}
.filter:hover,.filter.active {
  background: #182951;
  color: #81a4ff;
  border-color: #3864b6;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  text-align: left;
}
th {
  color: #8291a6;
  background: #0c1118;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
th,td {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
}
td {
  font-size: 13px;
}
.ip {
  font: 12px Consolas,monospace;
}
.badge,.incident-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.Critical {
  background: #4a1622;
  color: #ff8496;
}
.High {
  background: #493116;
  color: #f7bb62;
}
.Medium {
  background: #172d58;
  color: #87aaff;
}
.Low {
  background: #123b2d;
  color: #62dca7;
}
.New {
  background: #172d58;
  color: #87aaff;
}
.Investigating {
  background: #493116;
  color: #f7bb62;
}
.Resolved {
  background: #123b2d;
  color: #62dca7;
}
.False {
  background: #242d39;
  color: #b2bdcd;
}
.details {
  color: #8cabff;
  background: none;
  border: 0;
  font: 700 12px Arial,sans-serif;
  cursor: pointer;
}
.details:hover {
  text-decoration: underline;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pagination button {
  border: 1px solid #344153;
  background: #111824;
  color: var(--ink);
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
}
.pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
dialog {
  border: 1px solid #344153;
  background: #10151e;
  border-radius: 14px;
  width: min(520px,calc(100% - 32px));
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 20px 70px #00000080;
}
dialog::backdrop {
  background: #000000aa;
}
.close-dialog {
  float: right;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}
dialog .badge {
  margin-top: 8px;
}
dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin: 20px 0 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
dt {
  color: var(--muted);
  font-weight: 700;
}
dd {
  margin: 0;
  font-family: Consolas,monospace;
  font-size: 12px;
  word-break: break-word;
}
.investigation {
  margin-top: 18px;
}
.investigation textarea {
  resize: vertical;
}
.investigation .primary-button {
  width: auto;
}
.save-message {
  height: 16px;
  margin-top: 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
@media(max-width:1000px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    padding: 17px 24px;
    flex-direction: row;
    align-items: center;
    gap: 25px;
  }
  .brand {
    margin: 0;
  }
  .sidebar nav {
    display: flex;
  }
  .sidebar-footer,.user-card {
    display: none;
  }
  main {
    margin: 0;
    padding: 28px 24px;
  }
  .metric-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .health-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid .panel {
    height: 310px;
  }
}
@media(max-width:600px) {
  .sidebar {
    display: block;
  }
  .sidebar nav {
    margin-top: 16px;
    overflow: auto;
  }
  .nav-link {
    white-space: nowrap;
  }
  .topbar {
    align-items: flex-start;
  }
  .system-status {
    font-size: 12px;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .alert-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
  main {
    padding: 24px 14px;
  }
}


.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#exportCsv {
  white-space: nowrap;
}


/* Multi-page dashboard navigation */
.sidebar nav {
  display: grid;
  gap: 7px;
}

.sidebar .nav-link {
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: 600 14px Arial, sans-serif;
}

.page-section {
  display: none;
  margin-top: 30px;
}

.page-section.active-page {
  display: block;
}

.page-panel {
  margin-top: 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 18px;
}

.overview-chart {
  height: 390px;
}

.overview-chart canvas {
  display: block;
  width: 100%;
  height: 300px;
  margin-top: 18px;
}

.compact-table table {
  min-width: 600px;
}

.compact-table th,
.compact-table td {
  padding: 13px 15px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #8cabff;
  cursor: pointer;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.text-metric {
  font-size: 20px !important;
  line-height: 1.25;
  min-height: 50px;
}

.top-source-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.top-source-panel .panel-heading {
  padding: 22px;
}

.page-health-grid {
  margin-bottom: 18px;
}

.health-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.detail-card dl {
  border: 0;
  padding: 0;
  margin-bottom: 0;
}

.toolbar #exportCsv {
  color: #dce6ff;
}

.investigation select:disabled,
.investigation textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media(max-width:1000px) {
  .overview-grid,
  .health-detail-grid {
    grid-template-columns: 1fr;
  }

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


/* Protected assets */
.assets-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.asset-panel {
  padding: 0;
  overflow: hidden;
}

.asset-heading {
  padding: 22px;
}

.asset-add-button {
  width: auto;
  margin: 0;
  padding-inline: 16px;
}

.asset-actions {
  white-space: nowrap;
}

.asset-delete {
  color: #ff8496;
  margin-left: 10px;
}

.read-only-label {
  color: var(--muted);
  font-size: 12px;
}

.Monitoring {
  background: #123b2d;
  color: #62dca7;
}

.Disabled {
  background: #242d39;
  color: #b2bdcd;
}

.asset-form {
  margin-top: 18px;
}

.asset-form label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
}

.asset-form input,
.asset-form select {
  width: 100%;
  border: 1px solid #344153;
  border-radius: 8px;
  padding: 10px;
  background: #0a0e14;
  color: var(--ink);
  font: 13px Arial, sans-serif;
}

#assetDialog {
  width: min(520px, calc(100% - 32px));
}

@media(max-width:1000px) {
  .assets-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:600px) {
  .assets-summary {
    grid-template-columns: 1fr;
  }

  .asset-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Registration and onboarding */
.register-screen {
  display: none;
  z-index: 6;
  overflow-y: auto;
}

.secondary-button {
  margin-top: 10px;
  width: 100%;
  border: 1px solid #344153;
  border-radius: 8px;
  padding: 10px;
  background: #111824;
  color: var(--ink);
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
}

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

.discovery-copy {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

#discoveryDialog {
  width: min(560px, calc(100% - 32px));
}

#discoveryDialog dl {
  margin-bottom: 18px;
}


/* Dashboard and email notifications */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-toggle {
  border: 1px solid #344153;
  border-radius: 9px;
  background: #111824;
  color: #aeb9d5;
  padding: 9px 12px;
  cursor: pointer;
  font: 700 12px Arial, sans-serif;
}

.notification-toggle:hover,
.notification-toggle.enabled {
  border-color: #3864b6;
  background: #182951;
  color: #9bb5ff;
}

.toast-container {
  position: fixed;
  z-index: 20;
  top: 22px;
  right: 22px;
  display: grid;
  gap: 12px;
  width: min(390px, calc(100vw - 44px));
  pointer-events: none;
}

.alert-toast {
  position: relative;
  padding: 18px;
  border: 1px solid #344153;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: #10151ef2;
  box-shadow: 0 18px 55px #00000080;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.alert-toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.alert-toast.critical-toast {
  border-left-color: var(--red);
  box-shadow: 0 18px 60px #4a162280;
}

.alert-toast h3 {
  margin: 3px 30px 7px 0;
  font-size: 16px;
}

.toast-target {
  color: #cbd4ec;
  margin-bottom: 11px;
  font-size: 13px;
}

.toast-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 12px Consolas, monospace;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.toast-view-alert {
  margin-top: 13px;
}

.notification-settings {
  margin-top: 18px;
}

.notification-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.notification-settings-grid > div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1118;
}

.setting-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.notification-settings-grid strong {
  display: block;
  word-break: break-word;
}

.test-email-button {
  width: auto;
  margin: 0;
}

.notification-test-message {
  margin-top: 15px;
}

@media(max-width:800px) {
  .topbar-actions {
    align-items: flex-end;
    flex-direction: column;
  }

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


/* Forgot password */
.forgot-password-button {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  text-align: center;
}

#forgotPasswordDialog {
  width: min(520px, calc(100% - 32px));
}

.recovery-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

#resetCode {
  font-family: Consolas, monospace;
  font-size: 20px;
  letter-spacing: 7px;
  text-align: center;
}

[hidden] {
  display: none !important;
}


/* Multi-device network discovery and onboarding */
.network-discovery-dialog {
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.onboarding-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.onboarding-benefits > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1118;
}

.onboarding-benefits strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #172d58;
  color: #9bb5ff;
}

.onboarding-benefits span {
  color: #cbd4ec;
  font-size: 12px;
  font-weight: 700;
}

.discovery-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.discovery-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #344153;
  border-radius: 11px;
  background: #0c1118;
}

.discovery-progress strong,
.discovery-progress small {
  display: block;
}

.discovery-progress small {
  margin-top: 5px;
}

.discovery-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #26303e;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: discovery-spin .85s linear infinite;
}

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

.discovered-device-list {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow-y: auto;
  margin-top: 20px;
  padding-right: 4px;
}

.discovered-device-card {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.25fr) minmax(150px, 1fr) 150px 130px;
  align-items: end;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0c1118;
}

.discovered-device-card.backend-device {
  border-color: #3864b6;
  box-shadow: inset 3px 0 #4d7dff;
}

.device-select {
  align-self: center;
}

.device-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.device-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.device-identity strong,
.device-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-identity small {
  margin-top: 4px;
}

.device-icon {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #14233e;
  color: #8cabff;
  font-size: 17px;
}

.backend-host-label {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 99px;
  background: #172d58;
  color: #87aaff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.discovered-device-card > label:not(.device-select) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.discovered-device-card input:not([type="checkbox"]),
.discovered-device-card select {
  width: 100%;
  border: 1px solid #344153;
  border-radius: 7px;
  padding: 9px;
  background: #10151e;
  color: var(--ink);
  font: 12px Arial, sans-serif;
  text-transform: none;
  letter-spacing: normal;
}

.discovery-selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.select-all-devices {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.select-all-devices input {
  accent-color: var(--blue);
}

.asset-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.discovery-empty {
  padding: 28px;
  border: 1px dashed #344153;
  border-radius: 10px;
  text-align: center;
}

@media(max-width:900px) {
  .onboarding-benefits {
    grid-template-columns: 1fr;
  }

  .discovered-device-card {
    grid-template-columns: 34px 1fr;
    align-items: start;
  }

  .discovered-device-card > label:not(.device-select) {
    grid-column: 2;
  }
}

@media(max-width:600px) {
  .discovery-result-heading,
  .discovery-selection-footer,
  .asset-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Phase 1.1 bug fixes */
#closeAlertDialog {
  position: absolute;
  top: 16px;
  right: 18px;
  float: none;
  z-index: 2;
}

#alertDialog {
  position: relative;
}

#testAlertSound {
  white-space: nowrap;
}

@media(max-width:700px) {
  .topbar-actions {
    width: 100%;
  }

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


/* Agent-only onboarding */
.agent-onboarding-dialog {
  width: min(680px, calc(100% - 32px));
}

.agent-onboarding-flow {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.agent-onboarding-flow article {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1118;
}

.agent-onboarding-flow article > strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #172d58;
  color: #9bb5ff;
}

.agent-onboarding-flow h3 {
  margin: 0 0 5px;
}

.agent-onboarding-flow p {
  color: var(--muted);
  line-height: 1.5;
}

.agent-onboarding-download {
  display: block;
  text-align: center;
  text-decoration: none;
}

.onboarding-skip-button {
  display: block;
  width: 100%;
  margin-top: 14px;
  text-align: center;
}


/* User profile */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 20px;
  align-items: stretch;
}
.profile-card,
.password-card {
  min-width: 0;
  padding: 26px;
}
.profile-company {
  margin: 20px 0 22px;
  padding: 24px;
  border: 1px solid #3f73d8;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a3568, #111b2b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.profile-company span {
  display: block;
  margin-bottom: 8px;
  color: #a9c0ff;
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.profile-company strong {
  display: block;
  color: #fff;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
}
.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
}
.profile-details div {
  display: block;
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.profile-details dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}
.profile-details dd {
  min-width: 0;
  margin: 0;
  color: #eef3ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: normal;
}
#profileEmail {
  overflow-wrap: anywhere;
  word-break: normal;
}
.profile-form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.profile-form label {
  display: grid;
  gap: 9px;
  color: #c5cde0;
  font-size: 13px;
  font-weight: 700;
}
.profile-form input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.profile-form .primary-button {
  width: 100%;
  margin-top: 4px;
}
.profile-load-error {
  margin-top: 14px;
  color: #ffb7b7;
  font-size: 13px;
}
@media (max-width: 1050px) {
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .profile-card, .password-card { padding: 20px; }
  .profile-details { grid-template-columns: 1fr; }
}



/* Attack simulator */
.simulator-panel { margin-top: 18px; }
.simulator-intro { margin: 14px 0 22px; color: var(--muted); line-height: 1.6; }
.simulator-target { display: grid; gap: 8px; max-width: 560px; font-size: 12px; font-weight: 700; }
.simulator-target select { width: 100%; border: 1px solid #344153; border-radius: 8px; padding: 11px; background: #0a0e14; color: var(--ink); }
.simulator-groups { display: grid; gap: 18px; margin-top: 24px; }
.simulator-group { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #0b1018; }
.simulator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.simulation-button { display: grid; gap: 7px; min-height: 105px; padding: 16px; text-align: left; border: 1px solid #33425a; border-radius: 10px; background: linear-gradient(145deg,#152036,#101722); color: var(--ink); cursor: pointer; transition: transform .15s ease,border-color .15s ease,background .15s ease; }
.simulation-button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--blue); background: #17243d; }
.simulation-button strong { font-size: 14px; }
.simulation-button span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.simulation-button:disabled { opacity: .48; cursor: not-allowed; }
.simulation-button.running { border-color: var(--orange); }
.simulation-result { display: grid; gap: 6px; margin-top: 20px; padding: 15px 17px; border: 1px solid #33425a; border-radius: 10px; background: #0a0e14; }
.simulation-result span { color: var(--muted); }
.simulation-result.success { border-color: #1d5a42; background: #0d261d; }
.simulation-result.error { border-color: #713241; background: #2b1118; }
.simulation-result.running { border-color: #6f5428; background: #271e0f; }
@media (max-width: 900px) { .simulator-grid { grid-template-columns: 1fr; } }


/* Company user administration */
.members-panel { margin-top: 18px; padding: 26px; }
.members-heading { align-items: flex-start; gap: 20px; }
.members-intro { max-width: 760px; margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.members-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.members-summary > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1018;
}
.members-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.members-summary strong { color: #fff; font-size: 26px; }
.member-name-cell { display: flex; align-items: center; gap: 9px; }
.current-user-badge {
  padding: 3px 7px;
  border: 1px solid #3768c9;
  border-radius: 999px;
  color: #a9c0ff;
  background: #14264a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.role-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.role-badge.admin-role { color: #ffd89b; background: #3c2a0c; border: 1px solid #73551d; }
.role-badge.viewer-role { color: #a9c0ff; background: #14264a; border: 1px solid #315aa8; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-button {
  border: 1px solid #713241;
  border-radius: 8px;
  padding: 9px 12px;
  background: #2b1118;
  color: #ffb7c1;
  font-weight: 800;
  cursor: pointer;
}
.danger-button:hover:not(:disabled) { background: #401822; }
.member-actions button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 900px) {
  .members-summary { grid-template-columns: 1fr; }
  .member-actions { min-width: 180px; }
}


/* Detection and source-zone badges */
.method-badge, .zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.method-badge.signature { color: #b9cbff; background: #17294f; border: 1px solid #345fae; }
.method-badge.anomaly { color: #e5c5ff; background: #2d1945; border: 1px solid #684091; }
.method-badge.manual, .method-badge.simulation { color: #cbd4ec; background: #202733; border: 1px solid #465064; }
.zone-badge.internal { color: #a9f0d5; background: #103729; border: 1px solid #24684e; }
.zone-badge.external { color: #ffd2a6; background: #3a250f; border: 1px solid #76501f; }

.ip-response-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.danger-button {
  border: 1px solid #ef4444;
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.danger-button:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.24);
}

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


/* Security notification center */
.notification-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-count, .security-bell span {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
}
.notification-count[hidden], .security-bell span[hidden] { display: none; }
.security-bell {
  position: relative; border: 1px solid var(--border); background: var(--panel);
  border-radius: 10px; min-width: 44px; height: 42px; font-size: 20px; cursor: pointer;
}
.security-bell span { position: absolute; top: -7px; right: -7px; }
.notification-center-panel { min-height: 520px; }
.notification-actions, .notification-item-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.security-notification-list { display: grid; gap: 12px; margin-top: 18px; }
.security-notification-item {
  display: grid; grid-template-columns: 46px 1fr; gap: 13px; padding: 16px;
  border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.02);
}
.security-notification-item.unread { border-color: rgba(77,125,255,.65); box-shadow: inset 4px 0 0 #4d7dff; }
.notification-symbol { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(77,125,255,.12); font-size: 21px; }
.notification-title-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.notification-title-row span, .notification-state { color: var(--muted); font-size: 12px; }
.notification-content p { margin: 7px 0 10px; color: var(--muted); line-height: 1.55; }
.notification-empty { padding: 38px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }
.notification-item-actions .primary-button { width: auto; padding: 9px 13px; }
@media (max-width: 700px) { .notification-title-row { flex-direction: column; gap: 4px; } }
