:root {
  --bg: #0a0e1a;
  --bg-elev: #121828;
  --bg-card: #161d30;
  --border: #243049;
  --text: #e6ebf5;
  --muted: #8b96ac;
  --primary: #4f8cff;
  --primary-2: #7c5cff;
  --accent: #22d3ee;
  --red: #ff5c72;
  --orange: #ff9f43;
  --yellow: #ffd166;
  --green: #2ecc9b;
  --purple: #b07cff;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.55;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(50% 40% at 15% 0%, rgba(79, 140, 255, 0.22), transparent 60%),
    radial-gradient(45% 45% at 90% 10%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(40% 40% at 50% 100%, rgba(34, 211, 238, 0.12), transparent 60%);
  pointer-events: none;
}

/* Fundo animado de rede neural (leve/fluido) */
.neural-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(
    120% 120% at 50% 30%,
    #000 55%,
    transparent 100%
  );
  mask-image: radial-gradient(120% 120% at 50% 30%, #000 55%, transparent 100%);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 80px;
}

/* Header */
.site-header {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logout-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: rgba(22, 29, 48, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.logout-btn:hover {
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  font-size: 40px;
  filter: drop-shadow(0 4px 14px rgba(79, 140, 255, 0.5));
}

.brand h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff, #9fc0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* Search card */
.search-card {
  margin-top: 28px;
  background: linear-gradient(180deg, rgba(22, 29, 48, 0.9), rgba(18, 24, 40, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.search-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.search-form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.input-wrap {
  position: relative;
  flex: 1;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}

#url-input {
  width: 100%;
  padding: 15px 16px 15px 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#url-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.15);
}

#submit-btn {
  padding: 0 26px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s, opacity 0.2s;
  white-space: nowrap;
}

#submit-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.disclaimer {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Status */
.status {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
}

.status.error {
  border-color: rgba(255, 92, 114, 0.5);
  background: rgba(255, 92, 114, 0.08);
  color: #ffb3bd;
}

.status.loading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Results — dashboard único que preenche a tela (sem quebra de página) */
.results {
  margin-top: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "target   target   target   target   target   target   target   target   target   target   target   target"
    "tech     tech     tech     tech     provider provider provider provider security security security security"
    "geo      geo      geo      geo      whois    whois    whois    whois    security security security security";
  animation: fade-in 0.4s ease;
}

/* Em telas grandes, o dashboard ocupa a altura disponível da viewport */
@media (min-width: 1200px) {
  .results {
    height: calc(100vh - 300px);
    min-height: 520px;
  }
}

/* Modo com resultados: compacta o topo para tudo caber em uma tela */
body.has-results .search-card {
  margin-top: 14px;
  padding: 14px 22px;
}
body.has-results .search-card > h2,
body.has-results .search-card > .muted,
body.has-results .search-card > .disclaimer {
  display: none;
}
body.has-results .search-card .search-form {
  margin-top: 0;
}
body.has-results .container {
  padding-bottom: 20px;
}
body.has-results .site-header {
  padding-top: 20px;
  padding-bottom: 4px;
}

.area-target { grid-area: target; }
.area-tech { grid-area: tech; }
.area-provider { grid-area: provider; }
.area-geo { grid-area: geo; }
.area-whois { grid-area: whois; }
.area-security { grid-area: security; }

.results .card {
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.results .target-card {
  overflow: visible;
}

/* Área rolável interna dos cards — mantém tudo em uma única página */
.card-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.card-scroll::-webkit-scrollbar {
  width: 8px;
}
.card-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}
.card-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
.card-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Reflow: telas médias em 2 colunas, pilha em telas pequenas */
@media (max-width: 1199px) {
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-template-areas:
      "target   target"
      "tech     provider"
      "geo      whois"
      "security security";
  }
}
@media (max-width: 720px) {
  .results {
    grid-template-columns: 1fr;
    grid-template-areas:
      "target"
      "tech"
      "provider"
      "geo"
      "whois"
      "security";
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot-blue { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.dot-purple { background: var(--purple); box-shadow: 0 0 10px var(--purple); }
.dot-red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot-gray { background: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (min-width: 1500px) {
  .headers {
    grid-template-columns: minmax(160px, 240px) 1fr minmax(160px, 240px) 1fr;
  }
}

/* Target card */
.target-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.favicon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.target-info {
  flex: 1;
  min-width: 0;
}

.target-info h3 {
  margin: 0 0 2px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-url {
  color: var(--accent);
  font-size: 13.5px;
  text-decoration: none;
  word-break: break-all;
}

.target-url:hover {
  text-decoration: underline;
}

.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.score-grade {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.score-value {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.score-caption {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.target-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta-pill {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.meta-pill strong {
  color: var(--text);
  font-weight: 600;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Badge de autenticação (card Tecnologias) */
.auth-info:empty {
  display: none;
}
.auth-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.auth-badge.auth-protected {
  border-color: rgba(255, 159, 67, 0.4);
  background: rgba(255, 159, 67, 0.08);
}
.auth-badge.auth-optional {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}
.auth-badge.auth-public {
  border-color: rgba(46, 204, 155, 0.35);
  background: rgba(46, 204, 155, 0.07);
}
.auth-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.auth-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.auth-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.auth-sub {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}
.auth-conf {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  flex-shrink: 0;
  background: rgba(139, 150, 172, 0.14);
  color: var(--muted);
}
.auth-protected .auth-conf {
  background: rgba(255, 159, 67, 0.16);
  color: var(--yellow);
}
.auth-optional .auth-conf {
  background: rgba(34, 211, 238, 0.16);
  color: var(--accent);
}
.auth-public .auth-conf {
  background: rgba(46, 204, 155, 0.16);
  color: var(--green);
}

/* Certificado SSL/TLS (card Tecnologias) */
.cert-info:empty {
  display: none;
}
.cert-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  margin: 14px 0 2px;
  overflow: hidden;
}
.cert-box.cert-valid {
  border-color: rgba(46, 204, 155, 0.35);
}
.cert-box.cert-warn {
  border-color: rgba(255, 209, 102, 0.45);
}
.cert-box.cert-expired {
  border-color: rgba(239, 83, 80, 0.5);
}
.cert-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.cert-valid .cert-head {
  background: rgba(46, 204, 155, 0.07);
}
.cert-warn .cert-head {
  background: rgba(255, 209, 102, 0.08);
}
.cert-expired .cert-head {
  background: rgba(239, 83, 80, 0.09);
}
.cert-ico {
  font-size: 20px;
  flex-shrink: 0;
}
.cert-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.cert-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.cert-issuer {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cert-state {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
  flex-shrink: 0;
}
.cert-valid .cert-state {
  background: rgba(46, 204, 155, 0.16);
  color: var(--green);
}
.cert-warn .cert-state {
  background: rgba(255, 209, 102, 0.16);
  color: var(--yellow);
}
.cert-expired .cert-state {
  background: rgba(239, 83, 80, 0.18);
  color: #ff6b6b;
}
.cert-rows {
  display: flex;
  flex-direction: column;
  padding: 6px 14px 10px;
}
.cert-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cert-row:last-child {
  border-bottom: none;
}
.cert-k {
  color: var(--muted);
  flex-shrink: 0;
}
.cert-v {
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
}

.chip .cat {
  font-size: 11px;
  color: var(--muted);
}

.chip .conf {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(79, 140, 255, 0.15);
  color: #9fc0ff;
}

/* Provider */
.provider-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.provider-item:last-child {
  border-bottom: none;
}
.provider-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.provider-name {
  font-weight: 600;
  font-size: 14px;
}
.provider-type {
  font-size: 12px;
  color: var(--accent);
}
.provider-ev {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

/* Key/value blocks (rede e whois) */
.kv {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 6px 14px;
  font-size: 13px;
}
.kv-k {
  color: var(--muted);
  font-weight: 600;
}
.kv-v {
  color: var(--text);
  word-break: break-word;
}
.network-info {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.network-info:empty {
  display: none;
}
.ns-block {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dot-green-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.dot-cyan {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Geolocalização */
.geo-info:empty {
  display: none;
}
.geo-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.geo-map-link:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Security */
.sec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.sec-summary {
  display: flex;
  gap: 8px;
}
.sev-count {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.findings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* --- Cartão de segurança resumido --- */
.sec-card .sec-header {
  align-items: center;
}
.sec-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.score-ring {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-elev);
  border: 3px solid currentColor;
  box-shadow: 0 0 16px -4px currentColor;
}
.ring-grade {
  font-size: 26px;
  font-weight: 800;
  color: currentColor;
}
.score-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.score-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.score-num small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.score-label {
  font-size: 12px;
  color: var(--muted);
}

/* WAF — detecção de Web Application Firewall */
.waf-info:empty {
  display: none;
}
.waf-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.waf-banner.waf-detected {
  border-color: rgba(46, 204, 155, 0.35);
  background: rgba(46, 204, 155, 0.08);
}
.waf-banner.waf-none {
  border-color: rgba(255, 159, 67, 0.3);
  background: rgba(255, 159, 67, 0.07);
}
.waf-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.waf-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.waf-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.waf-sub {
  font-size: 12px;
  color: var(--muted);
}
.waf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.waf-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.waf-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.waf-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.waf-conf {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.waf-conf.conf-alta {
  color: var(--green);
  background: rgba(46, 204, 155, 0.12);
}
.waf-conf.conf-media {
  color: var(--yellow);
  background: rgba(255, 209, 102, 0.12);
}
.waf-conf.conf-baixa {
  color: var(--muted);
  background: rgba(139, 150, 172, 0.12);
}
.waf-vendor {
  font-size: 12px;
  color: var(--accent);
}
.waf-ev {
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-word;
}

/* Achados compactos e expansíveis */
.finding-c {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.finding-c > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.finding-c > summary::-webkit-details-marker {
  display: none;
}
.finding-c > summary::after {
  content: '⌄';
  margin-left: auto;
  color: var(--muted);
  font-size: 16px;
  transition: transform 0.2s;
}
.finding-c[open] > summary::after {
  transform: rotate(180deg);
}
.finding-c-title {
  font-size: 13.5px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.owasp-mini {
  font-size: 11px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.finding-c-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}
.finding-c-body .owasp-tag {
  margin-top: 12px;
}

.finding {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--bg);
}

.finding-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.finding-title {
  font-weight: 600;
  font-size: 14px;
}

.sev-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.owasp-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
}

.finding-desc {
  margin: 10px 0 6px;
  font-size: 13px;
  color: #c3cbdc;
}

.finding-rec {
  font-size: 12.5px;
  color: var(--muted);
}
.finding-rec code {
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 5px;
  color: #9fe6c9;
  font-size: 12px;
  word-break: break-all;
}

/* Severity colors */
.sev-critica { color: var(--red); }
.sev-alta { color: var(--orange); }
.sev-media { color: var(--yellow); }
.sev-baixa { color: var(--green); }

.b-critica { border-left-color: var(--red); }
.b-alta { border-left-color: var(--orange); }
.b-media { border-left-color: var(--yellow); }
.b-baixa { border-left-color: var(--green); }

.tag-critica { background: rgba(255, 92, 114, 0.15); color: var(--red); }
.tag-alta { background: rgba(255, 159, 67, 0.15); color: var(--orange); }
.tag-media { background: rgba(255, 209, 102, 0.15); color: var(--yellow); }
.tag-baixa { background: rgba(46, 204, 155, 0.15); color: var(--green); }

.no-findings {
  padding: 16px;
  border-radius: 10px;
  background: rgba(46, 204, 155, 0.08);
  border: 1px solid rgba(46, 204, 155, 0.35);
  color: #7fe3c2;
  font-size: 14px;
}

/* Grades */
.grade-A { color: var(--green); }
.grade-B { color: #7ed957; }
.grade-C { color: var(--yellow); }
.grade-D { color: var(--orange); }
.grade-E, .grade-F { color: var(--red); }

/* Headers */
.headers {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 2px 16px;
  font-size: 12.5px;
  max-height: 320px;
  overflow-y: auto;
}
.h-key {
  color: var(--accent);
  font-family: "Cascadia Code", "Consolas", monospace;
  padding: 5px 0;
  word-break: break-all;
}
.h-val {
  color: #c3cbdc;
  font-family: "Cascadia Code", "Consolas", monospace;
  padding: 5px 0;
  word-break: break-all;
  border-bottom: 1px solid var(--border);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
}

body.has-results .site-footer {
  padding: 12px;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .search-form {
    flex-direction: column;
  }
  .target-head {
    flex-wrap: wrap;
  }
  .headers {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .h-key {
    padding-top: 8px;
  }
  .h-val {
    padding-bottom: 8px;
  }
}

/* ===== Tela de login (minimalista / moderna) ===== */
.auth-body {
  display: flex;
  min-height: 100vh;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.auth-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 32px;
  border-radius: 20px;
  background: rgba(18, 24, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px) saturate(1.1);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.auth-mark {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  opacity: 0.9;
}

.auth-mark circle:first-child {
  stroke: rgba(255, 255, 255, 0.14);
}

.auth-mark-arc {
  stroke: var(--primary);
  stroke-linecap: round;
  transform-origin: 12px 12px;
  animation: authSpin 6s linear infinite;
}

.auth-mark-dot {
  fill: var(--accent);
  stroke: none;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.auth-word {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

/* Chave de acesso — caixinhas (OTP) */
.auth-otp {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
}

.otp-box {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 38px;
  text-align: center;
  color: var(--text);
  caret-color: var(--accent);
  background: rgba(9, 13, 24, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease, background 0.3s ease,
    box-shadow 0.35s ease, transform 0.3s ease;
}

.otp-box::selection {
  background: rgba(34, 211, 238, 0.28);
}

.otp-box:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.otp-box.filled {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(13, 22, 38, 0.95);
}

.otp-box:focus {
  border-color: var(--accent);
  background: rgba(9, 13, 24, 0.98);
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14),
    0 10px 26px -8px rgba(34, 211, 238, 0.5),
    inset 0 0 12px rgba(34, 211, 238, 0.08);
}

@media (max-width: 380px) {
  .auth-otp {
    gap: 6px;
  }
  .otp-box {
    height: 34px;
    line-height: 34px;
    font-size: 17px;
    border-radius: 11px;
  }
}

.auth-btn {
  position: relative;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, background 0.2s;
}

.auth-btn:hover {
  background: var(--primary-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.3);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-btn.loading span {
  opacity: 0.4;
}

.auth-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--red);
  background: rgba(255, 92, 114, 0.08);
  border: 1px solid rgba(255, 92, 114, 0.28);
  border-radius: 10px;
  text-align: center;
}

.auth-foot {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.7;
}

.auth-card.shake {
  animation: authShake 0.45s ease;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
