:root {
  color-scheme: dark !important;
  --hack-bg: #070b12;
  --hack-panel: #0d1420;
  --hack-panel-2: #111b2a;
  --hack-line: rgba(125, 211, 252, 0.22);
  --hack-text: #e6f1ff;
  --hack-muted: #8ea7bd;
  --hack-hot: #38bdf8;
  --hack-accent: #22d3ee;
  --hack-accent-2: #60a5fa;
  --hack-ok: #34d399;
  --hack-warn: #fbbf24;
  --hack-danger: #f87171;
  --hack-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 34px rgba(34, 211, 238, 0.08);
}

html {
  background: var(--hack-bg) !important;
}

body {
  color: var(--hack-text) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.12), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(96, 165, 250, 0.1), transparent 28rem),
    linear-gradient(135deg, #05070c 0%, #0a1220 52%, #05070c 100%) !important;
}

body::before {
  content: "010101 sys@viewtasks:~$ network telemetry\\A dns rdap mx spf dmarc blacklist\\A ports tcp udp trace route latency\\A cloudpanel api status sensors\\A endpoint identity session audit\\A diagram nodes links incident timeline\\A nmap -sV target :: authorized only\\A packets SYN ACK TLS DNS HTTP\\A";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  color: rgba(125, 211, 252, 0.1);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(0.78rem, 1.15vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-all;
  transform: rotate(-8deg) scale(1.25);
  transform-origin: center;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
  opacity: 0.7;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 78%, transparent);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(125, 211, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-copy,
.status-panel,
.control-band,
.metric,
.info-block,
.summary,
.section,
.item,
.tester,
.result,
.example,
.ip-panel,
.panel,
.block,
.step,
.container,
.card,
.hist,
.pasta-card,
.usuario-card,
.search-panel,
.final-window,
.notice {
  color: var(--hack-text) !important;
  background: rgba(13, 20, 32, 0.88) !important;
  border-color: var(--hack-line) !important;
  box-shadow: var(--hack-shadow) !important;
}

h1,
h2,
.domain,
.ip,
.metric strong,
.status-label,
.item b,
.section h2,
.section-title,
.brand,
.entity strong {
  color: var(--hack-text) !important;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.14);
}

.intro,
.subtitle,
.summary-text,
.status-detail,
.metric-label,
.metric-unit,
.network-list dt,
.network-list dd,
.item span,
.section li,
.section p,
.note,
.hint,
.example,
.label,
.evidence,
.entity span,
.badge,
.pill,
.saved-item small,
.lead,
small {
  color: var(--hack-muted) !important;
}

input,
select,
textarea,
.toolbar input,
.field input,
.field select,
.field textarea,
.saved-item,
.palette-item,
.entity {
  color: var(--hack-text) !important;
  background: #09111d !important;
  border-color: rgba(125, 211, 252, 0.2) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--hack-hot) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16) !important;
}

button,
.btn,
.primary-button {
  color: #031018 !important;
  background: linear-gradient(135deg, var(--hack-accent), var(--hack-accent-2)) !important;
  border-color: rgba(125, 211, 252, 0.72) !important;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.16) !important;
}

button:hover,
.btn:hover,
.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button,
.btn.danger {
  color: var(--hack-text) !important;
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
}

.progress-track {
  background: #07101c !important;
  border: 1px solid var(--hack-line);
}

.progress-track span {
  background: linear-gradient(90deg, var(--hack-accent), var(--hack-accent-2), var(--hack-ok)) !important;
}

.gauge {
  border: 18px solid rgba(56, 189, 248, 0.12) !important;
  border-top-color: var(--hack-hot) !important;
  border-right-color: var(--hack-accent-2) !important;
  box-shadow: inset 0 0 28px rgba(56, 189, 248, 0.14);
}

.notice {
  color: #bfdbfe !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(125, 211, 252, 0.22) !important;
}

.notice.info,
.pill {
  color: var(--hack-hot) !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(125, 211, 252, 0.24) !important;
}

a {
  color: #7dd3fc !important;
}

pre,
code {
  color: #bfdbfe !important;
  background: #050b14 !important;
  border-color: var(--hack-line) !important;
}

table {
  background: #09111d !important;
}

th {
  color: #bfdbfe !important;
  background: #111b2a !important;
}

td {
  border-color: rgba(125, 211, 252, 0.14) !important;
}

.is-clean {
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.12) !important;
}

.is-listed {
  color: #fca5a5 !important;
  background: rgba(248, 113, 113, 0.12) !important;
}

.is-skipped {
  color: #fde68a !important;
  background: rgba(251, 191, 36, 0.12) !important;
}

:root,
body,
body[data-theme="dark"] {
  --accent: #38bdf8 !important;
  --accent-dark: #0284c7 !important;
  --selected: #22d3ee !important;
  --success: #34d399 !important;
  --ok: #34d399 !important;
  --line: rgba(125, 211, 252, 0.2) !important;
  --grid: rgba(125, 211, 252, 0.12) !important;
  --link-color: #93c5fd !important;
}

.tools-nav {
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.12), transparent 46%),
    #050b14 !important;
  border-color: var(--hack-line) !important;
}

.tools-nav__brand,
.tools-nav__link[aria-current="page"] {
  background: linear-gradient(135deg, var(--hack-accent), var(--hack-accent-2)) !important;
  color: #031018 !important;
}

.tools-nav__link {
  background: #0d1420 !important;
  color: var(--hack-text) !important;
  border-color: rgba(125, 211, 252, 0.18) !important;
}

.tools-nav__link:hover,
.tools-nav__link:focus {
  border-color: rgba(125, 211, 252, 0.74) !important;
}

.workspace,
.canvas,
.maltego-map,
#redeCanvas {
  background-color: #07101c !important;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px) !important;
}

.node svg *,
.palette-item svg *,
.brand-mark svg *,
[data-icon] svg * {
  stroke: #38bdf8 !important;
}

.node svg [fill],
.palette-item svg [fill],
.brand-mark svg [fill],
[data-icon] svg [fill] {
  fill: rgba(56, 189, 248, 0.2) !important;
}

.links path,
.edge {
  stroke: rgba(147, 197, 253, 0.78) !important;
}

@media (max-width: 860px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main,
  .app-shell,
  .container,
  .main,
  .ip-panel,
  .summary,
  .panel,
  .tester,
  .card {
    width: min(100% - 20px, 100%) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero,
  .results-grid,
  .details-layout,
  .grid,
  .sections,
  .examples,
  .lists,
  .layout,
  .result-grid,
  .flow {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .container {
    display: block !important;
    min-height: auto !important;
    height: auto !important;
    padding: 12px 0 96px !important;
  }

  .sidebar,
  .main {
    width: 100% !important;
    padding: 14px !important;
    border-right: 0 !important;
  }

  header {
    padding: 14px 92px 14px 14px !important;
    font-size: 1rem !important;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.1rem) !important;
    line-height: 1.02 !important;
  }

  .intro,
  .subtitle,
  .summary-text,
  .status-detail {
    font-size: 0.98rem !important;
  }

  input,
  select,
  textarea,
  button,
  .btn,
  .primary-button,
  .secondary-button {
    width: 100% !important;
    max-width: 100% !important;
  }

  .control-band,
  form,
  .tester,
  .toolbar,
  .topbar,
  .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .gauge {
    width: min(220px, 72vw) !important;
    border-width: 14px !important;
  }

  .metric {
    min-height: 132px !important;
  }

  .network-list div {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  pre,
  #redeCanvas,
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  main,
  .app-shell,
  .container,
  .main {
    width: calc(100% - 14px) !important;
  }

  .hero-copy,
  .status-panel,
  .info-block,
  .metric,
  .card,
  .ip-panel,
  .summary,
  .panel,
  .section,
  .tester {
    padding: 14px !important;
  }

  h1 {
    font-size: clamp(1.8rem, 14vw, 2.7rem) !important;
  }

  .tools-nav__link {
    flex-basis: 60px !important;
    width: 60px !important;
  }
}
