/* ── TenableWatch page styles ──────────────────────────────────────────── */

/* Hero */
.tw-hero {
  padding: 140px 0 48px;
  text-align: center;
}
.tw-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--heading-color, #fff);
}
.tw-accent-teal   { color: #00c7b7; }
.tw-accent-orange { color: rgb(245, 110, 40); }

.tw-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 28px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* Search — reuse fb-search-wrap from fortiwatch */
.fb-search-wrap { position: relative; max-width: 640px; margin: 0 auto; }
.fb-search-wrap .fb-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: rgba(0,199,183,0.7); pointer-events: none;
}
#tw-search {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border-radius: 14px;
  border: 1.5px solid rgba(0,199,183,0.25);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
}
#tw-search::placeholder { color: rgba(255,255,255,0.3); }
#tw-search:focus {
  border-color: rgba(0,199,183,0.6);
  box-shadow: 0 0 0 3px rgba(0,199,183,0.1);
}

/* Stats */
.fb-stats {
  display: flex; justify-content: center; align-items: center;
  gap: 32px; flex-wrap: wrap; margin: 32px 0 24px;
}
.fb-stat {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; min-height: 72px; padding: 8px 16px;
}
.fb-stat-value {
  font-size: 1.9rem; font-weight: 800; line-height: 1;
  color: #00c7b7;
}
.fb-stat-value.orange { color: rgb(245,110,40); }
.fb-stat-value.red    { color: rgb(199,59,53); }
.fb-stat-label {
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-top: 4px;
}

/* Filter buttons */
.tw-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 20px;
}
.tw-filter-btn {
  padding: 7px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.tw-filter-btn:hover { border-color: rgba(0,199,183,0.4); color: #fff; }
.tw-filter-btn.active {
  background: rgba(0,199,183,0.15);
  border-color: rgba(0,199,183,0.5);
  color: #00c7b7;
}

/* Tech badge pills */
.tw-badges-bar {
  display: flex; flex-wrap: wrap; gap: 7px;
  justify-content: center; margin-bottom: 24px;
}
.tw-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 5px 12px;
  font-size: 0.78rem; cursor: pointer;
  transition: all .15s; white-space: nowrap; user-select: none;
}
.tw-badge img {
  width: 16px; height: 16px; object-fit: contain;
  border-radius: 2px;
}
.tw-badge .tw-sev-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.tw-badge .tw-cnt {
  background: rgba(255,255,255,0.08);
  border-radius: 10px; padding: 1px 6px;
  font-size: 0.7rem; color: rgba(255,255,255,0.45);
}
.tw-badge:hover { border-color: rgba(0,199,183,0.45); color: #fff; }
.tw-badge.selected {
  background: rgba(0,199,183,0.12);
  border-color: rgba(0,199,183,0.55);
  color: #00c7b7; font-weight: 600;
}

/* Results meta */
.fb-results-meta {
  font-size: 0.8rem; color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

/* Cards grid */
.tw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.tw-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.tw-card:hover {
  border-color: rgba(0,199,183,0.4);
  box-shadow: 0 0 0 1px rgba(0,199,183,0.15);
  background: rgba(0,199,183,0.04);
}
.tw-card.selected {
  border-color: rgba(0,199,183,0.7);
  box-shadow: 0 0 0 2px rgba(0,199,183,0.2);
}

.tw-card-head {
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.tw-card-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tw-card-icon img { max-width: 38px; max-height: 38px; object-fit: contain; }
.tw-card-icon .tw-fb { /* fallback text */
  width: 38px; height: 38px; background: rgba(255,255,255,0.06);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.4);
}
.tw-card-title { flex: 1; min-width: 0; }
.tw-card-title h3 {
  font-size: 0.95rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff; margin: 0;
}
.tw-card-title .tw-hosts {
  font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 2px;
}
.tw-card-sev { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tw-sev-bar  { display: flex; gap: 3px; }
.tw-sev-box  {
  font-size: 0.62rem; font-weight: 800; padding: 2px 5px; border-radius: 3px; color: #fff;
}
.tw-sev-box.critical { background: rgb(199,59,53); }
.tw-sev-box.high     { background: rgb(245,110,40); }
.tw-sev-box.medium   { background: #f59e0b; color: #000; }
.tw-exploit-tag { font-size: 0.68rem; color: #f59e0b; font-weight: 700; }

.tw-card-body {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px; display: flex;
}
.tw-card-stat { text-align: center; flex: 1; border-right: 1px solid rgba(255,255,255,0.06); }
.tw-card-stat:last-child { border-right: none; }
.tw-card-stat .val { font-size: 1.05rem; font-weight: 800; color: rgba(255,255,255,0.85); margin: 0; }
.tw-card-stat .lbl { font-size: 0.65rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: .05em; }
.tw-card-stat.cves .val  { color: #00c7b7; }
.tw-card-stat.expl .val  { color: #f59e0b; }

/* No results */
.fb-no-results {
  display: none; flex-direction: column; align-items: center;
  padding: 64px 0; color: rgba(255,255,255,0.35); text-align: center;
}

/* Detail panel — same slide-up as CVEWatch */
.tw-detail {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 99999; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .28s; padding-top: 70px; box-sizing: border-box;
}
.tw-detail.tw-detail-open { opacity: 1; }
.tw-detail-inner {
  position: relative; background: #0f1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px 18px 0 0;
  padding: 32px 28px 40px;
  width: 100%; max-width: 740px;
  max-height: 82vh; overflow-y: auto;
  transform: translateY(40px); transition: transform .28s;
}
.tw-detail-open .tw-detail-inner { transform: translateY(0); }
@media (min-width: 768px) {
  .tw-detail { align-items: center; padding-top: 0; }
  .tw-detail-inner { border-radius: 18px; max-height: 80vh; transform: translateY(20px) scale(0.98); }
  .tw-detail-open .tw-detail-inner { transform: translateY(0) scale(1); }
}

.tw-detail-close {
  position: absolute; top: 16px; right: 18px;
  background: rgba(255,255,255,0.07); border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 1.2rem;
  color: rgba(255,255,255,0.5); cursor: pointer; line-height: 1;
  transition: background .15s, color .15s;
}
.tw-detail-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.tw-detail-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.tw-detail-icon img { max-width: 40px; max-height: 40px; object-fit: contain; }
.tw-detail-name {
  font-size: 1.3rem; font-weight: 800; color: #00c7b7; flex: 1;
}
.tw-detail-hosts { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

.tw-detail-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 20px;
}
@media (max-width: 560px) { .tw-detail-grid { grid-template-columns: 1fr 1fr; } }
.tw-detail-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 12px 14px; text-align: center;
}
.tw-detail-label {
  font-size: 0.67rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 6px;
}
.tw-detail-big { font-size: 1.5rem; font-weight: 800; }
.tw-detail-big.crit  { color: rgb(199,59,53); }
.tw-detail-big.high  { color: rgb(245,110,40); }
.tw-detail-big.expl  { color: #f59e0b; }
.tw-detail-big.cves  { color: #00c7b7; }

/* Severity filter pills inside drawer */
.tw-drawer-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tw-df-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); border-radius: 6px; padding: 4px 11px;
  font-size: 0.76rem; cursor: pointer; transition: all .15s;
}
.tw-df-btn:hover, .tw-df-btn.active {
  border-color: rgba(0,199,183,0.5); color: #00c7b7;
  background: rgba(0,199,183,0.1);
}

/* Plugin list */
.tw-plugin-item {
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tw-plugin-item:last-child { border-bottom: none; }
.tw-plugin-row1 { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 5px; }
.tw-plugin-name { flex: 1; font-size: 0.84rem; font-weight: 500; color: rgba(255,255,255,0.85); line-height: 1.35; }

/* severity badge — reuse ct-check approach */
.tw-sev-badge {
  font-size: 0.67rem; font-weight: 600; padding: 1px 5px; border-radius: 4px;
  border: 1px solid; flex-shrink: 0;
}
.tw-sev-badge.critical { color: rgb(199,59,53);  border-color: rgba(199,59,53,0.35);  background: rgba(199,59,53,0.1); }
.tw-sev-badge.high     { color: rgb(245,110,40); border-color: rgba(245,110,40,0.35); background: rgba(245,110,40,0.1); }
.tw-sev-badge.medium   { color: #f59e0b;          border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.08); }
.tw-sev-badge.low      { color: #818cf8;          border-color: rgba(129,140,248,0.35); background: rgba(129,140,248,0.08); }
.tw-sev-badge.info     { color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.1); background: transparent; }

.tw-plugin-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tw-plugin-id   { font-size: 0.7rem; color: rgba(255,255,255,0.3); font-family: monospace; }
.tw-cvss-pill   {
  font-size: 0.67rem; font-weight: 600; padding: 1px 5px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12); background: transparent; color: rgba(255,255,255,0.4);
}
.tw-cvss-pill.crit { color: rgb(199,59,53);  border-color: rgba(199,59,53,0.35); }
.tw-cvss-pill.high { color: rgb(245,110,40); border-color: rgba(245,110,40,0.35); }
.tw-cvss-pill.med  { color: #f59e0b;          border-color: rgba(245,158,11,0.35); }
.tw-exploit-badge  { font-size: 0.67rem; color: #f59e0b; font-weight: 600; border: 1px solid rgba(245,158,11,0.35); border-radius: 4px; padding: 1px 5px; background: rgba(245,158,11,0.08); }
.tw-cve-tag {
  font-size: 0.67rem; background: rgba(0,199,183,0.1);
  border: 1px solid rgba(0,199,183,0.25); color: #00c7b7;
  border-radius: 4px; padding: 1px 5px; text-decoration: none;
}
.tw-cve-tag:hover { background: rgba(0,199,183,0.2); color: #00c7b7; }
.tw-more-tag {
  font-size: 0.67rem; color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; padding: 1px 5px;
}

.tw-empty-msg { font-size: 0.85rem; color: rgba(255,255,255,0.3); padding: 24px 0; text-align: center; }

/* ── Port Cards (scan result) ───────────────────────────────── */
.tw-port-cards {
  margin: 32px 0 40px;
}
.tw-port-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tw-port-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tw-port-domain {
  font-size: 1.05rem;
  font-weight: 800;
  /* merabytes accent gradient text */
  background: linear-gradient(to right, #A93E17 0%, #15399A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: monospace;
}
.tw-port-ip {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  font-family: monospace;
}
.tw-port-ip i { margin-right: 4px; }
.tw-reset-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  color: rgba(239,68,68,0.4);
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s, filter 0.2s;
}
.tw-reset-btn:hover {
  color: #ff4444;
  filter: drop-shadow(0 0 4px rgba(255,68,68,0.7));
}
.tw-port-header-right { }
.tw-port-tech-count {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.tw-port-tech-count i { margin-right: 5px; color: rgba(169,62,23,0.7); }

.tw-port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Individual port card — dark glass + gradient border like merabytes hero */
.tw-port-card {
  background: rgba(255,255,255,0.025);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  /* gradient border via box-shadow trick */
  border: 1px solid rgba(255,255,255,0.07);
  transition: border-color .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
}
.tw-port-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(169,62,23,0.5), rgba(21,57,154,0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.tw-port-card:hover {
  box-shadow: 0 4px 32px rgba(169,62,23,0.12), 0 2px 16px rgba(21,57,154,0.12);
  border-color: rgba(255,255,255,0.12);
}

.tw-pc-screenshot-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: rgba(0,0,0,0.4);
  position: relative;
}
.tw-pc-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s, opacity .3s;
}
.tw-pc-screenshot-wrap:hover .tw-pc-screenshot {
  transform: scale(1.03);
  opacity: .88;
}
.tw-pc-screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.1);
}

.tw-pc-body {
  padding: 14px 16px 16px;
}
.tw-pc-port-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tw-pc-port-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(169,62,23,0.3), rgba(21,57,154,0.3));
  border: 1px solid rgba(169,62,23,0.4);
  color: #fff;
  font-family: monospace;
  letter-spacing: .03em;
}
.tw-pc-protocol {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.tw-pc-link {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  font-family: monospace;
  margin-left: auto;
  transition: color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.tw-pc-link:hover { color: rgba(169,62,23,0.9); }

.tw-pc-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tw-pc-tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  transition: all .15s;
}
.tw-pc-tech-badge.covered {
  border-color: rgba(169,62,23,0.3);
  background: rgba(169,62,23,0.07);
  color: rgba(255,255,255,0.75);
}
.tw-pc-tech-more {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  padding: 3px 6px;
}
.tw-icon-fb {
  color: rgba(255,255,255,0.35);
}

/* ── DNS + SSL sections inside port card ─────────────────────── */
.tw-pc-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 6px;
}
.tw-pc-dns, .tw-pc-ssl {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.tw-dns-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.7rem;
}
.tw-dns-table td { padding: 2px 4px; vertical-align: top; }
.tw-dns-k {
  color: rgba(255,255,255,0.3);
  font-weight: 600;
  white-space: nowrap;
  width: 52px;
  min-width: 52px;
  font-size: 0.65rem;
}
.tw-dns-v { color: rgba(255,255,255,0.65); word-break: break-all; overflow-wrap: anywhere; max-width: 0; width: 100%; }
.tw-dns-truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.tw-dns-copy {
  cursor: pointer;
  transition: color .12s, background .12s;
}
.tw-dns-copy:hover { color: rgba(255,255,255,0.9); }
.tw-dns-copied { color: #00c7b7 !important; }
.tw-ssl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tw-ssl-badge {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tw-ssl-issuer {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tw-ssl-sans {
  margin-top: 4px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
}

/* ── Attribution badges (reutiliza patrón fortiwatch) ────────── */
.fb-attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-decoration: none;
  color: #111;
  transition: opacity .15s, transform .1s;
}
.fb-badge:hover { opacity: .82; transform: translateY(-1px); text-decoration: none; color: #111; }
.fb-badge-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}

/* ── URL Scanner ─────────────────────────────────────────────── */
.tw-scan-wrap {
  max-width: 680px;
  margin: 0 auto;
}
.tw-scan-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.tw-scan-input-box {
  position: relative;
  flex: 1;
}
.tw-scan-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: rgba(0,199,183,0.65);
  pointer-events: none;
}
#tw-url-input {
  width: 100%;
  padding: 15px 18px 15px 50px;
  border-radius: 12px;
  border: 1.5px solid rgba(0,199,183,0.25);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}
#tw-url-input::placeholder { color: rgba(255,255,255,0.3); }
#tw-url-input:focus {
  border-color: rgba(0,199,183,0.6);
  box-shadow: 0 0 0 3px rgba(0,199,183,0.1);
}
.tw-scan-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  background: linear-gradient(135deg, rgba(0,199,183,0.2), rgba(0,199,183,0.12));
  border: 1.5px solid rgba(0,199,183,0.45);
  border-radius: 12px;
  color: #00c7b7;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.tw-scan-btn:hover:not(:disabled) {
  background: rgba(0,199,183,0.22);
  border-color: rgba(0,199,183,0.7);
  box-shadow: 0 0 16px rgba(0,199,183,0.15);
}
.tw-scan-btn:disabled { opacity: 0.6; cursor: default; }
.tw-scan-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin-top: 10px;
  text-align: center;
}

/* Progress box */
.tw-progress-wrap {
  margin: 32px 0;
}
.tw-progress-box {
  max-width: 540px;
  margin: 0 auto;
  background: rgba(0,199,183,0.03);
  border: 1px solid rgba(0,199,183,0.15);
  border-radius: 16px;
  padding: 24px 28px;
}
.tw-progress-target {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-bottom: 20px;
  font-family: monospace;
  letter-spacing: .03em;
}
.tw-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tw-step {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity .3s;
}
.tw-step-icon {
  width: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.tw-step-label {
  flex: 1;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.55);
  transition: color .3s;
}
.tw-step-status {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: monospace;
  color: rgba(255,255,255,0.3);
}

/* Scan result header */
.tw-scan-result {
  display: flex;
  gap: 20px;
  margin: 32px 0 20px;
  background: rgba(0,199,183,0.04);
  border: 1px solid rgba(0,199,183,0.18);
  border-radius: 16px;
  padding: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.tw-result-left {
  flex-shrink: 0;
}
.tw-result-screenshot-wrap {
  width: 200px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.tw-result-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .3s;
}
.tw-result-screenshot-img:hover { opacity: .88; }
.tw-result-screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.2);
  font-size: 1.4rem;
}
.tw-result-screenshot-placeholder span { font-size: 0.72rem; }
.tw-result-right {
  flex: 1;
  min-width: 200px;
}
.tw-result-hostname {
  font-size: 1.1rem;
  font-weight: 800;
  color: #00c7b7;
  margin-bottom: 12px;
  font-family: monospace;
}
.tw-result-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.tw-result-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,0.35);
  min-width: 72px;
  flex-shrink: 0;
}
.tw-result-val { color: rgba(255,255,255,0.75); font-family: monospace; }
.tw-port-badge {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-family: monospace;
  color: rgba(255,255,255,0.6);
  margin-right: 4px;
}
.tw-result-detected-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tw-detected-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid;
}
.tw-detected-badge.covered {
  background: rgba(0,199,183,0.1);
  border-color: rgba(0,199,183,0.3);
  color: #00c7b7;
}
.tw-detected-badge.uncovered {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
}
.tw-no-coverage { color: rgba(255,255,255,0.25); font-weight: 400; }
.tw-clear-scan-btn {
  margin-top: 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  border-radius: 8px;
  padding: 5px 13px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all .15s;
}
.tw-clear-scan-btn:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
}

@media (max-width: 640px) {
  .tw-scan-input-row { flex-direction: column; }
  .tw-scan-btn { justify-content: center; padding: 14px; }
  .tw-result-screenshot-wrap { width: 100%; height: 160px; }
  .tw-scan-result { flex-direction: column; }
}

/* Scrollbar in detail */
.tw-detail-inner::-webkit-scrollbar { width: 6px; }
.tw-detail-inner::-webkit-scrollbar-track { background: transparent; }
.tw-detail-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES
   Selector: [data-bs-theme=light] — set on <html> by theme toggle
══════════════════════════════════════════════════════════════ */

/* Hero */
[data-bs-theme=light] .tw-hero h1 { color: #0f1117; }
[data-bs-theme=light] .tw-hero-sub { color: rgba(0,0,0,0.55); }

/* Search input */
[data-bs-theme=light] #tw-search {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  color: #0f1117;
}
[data-bs-theme=light] #tw-search::placeholder { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] #tw-search:focus {
  border-color: rgba(0,199,183,0.6);
  box-shadow: 0 0 0 3px rgba(0,199,183,0.1);
}
[data-bs-theme=light] .fb-search-wrap .fb-search-icon { color: rgba(0,0,0,0.35); }

/* Stats */
[data-bs-theme=light] .fb-stat-label { color: rgba(0,0,0,0.45); }

/* Filter buttons */
[data-bs-theme=light] .tw-filter-btn {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.55);
}
[data-bs-theme=light] .tw-filter-btn:hover { border-color: rgba(0,199,183,0.5); color: #0f1117; }
[data-bs-theme=light] .tw-filter-btn.active {
  background: rgba(0,199,183,0.1);
  border-color: rgba(0,199,183,0.5);
  color: #007d76;
}

/* Tech badge pills */
[data-bs-theme=light] .tw-badge        { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.65); }
[data-bs-theme=light] .tw-badge .tw-cnt { background: rgba(0,0,0,0.08); color: rgba(0,0,0,0.5); }
[data-bs-theme=light] .tw-badge.selected {
  background: rgba(0,199,183,0.1);
  border-color: rgba(0,199,183,0.4);
  color: #007d76;
}
[data-bs-theme=light] .tw-badge.selected .tw-cnt { background: rgba(0,199,183,0.18); color: #007d76; }

/* Results meta */
[data-bs-theme=light] .fb-results-meta { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .fb-attribution   { color: rgba(0,0,0,0.3); }

/* Cards (scanner result) */
[data-bs-theme=light] .tw-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
[data-bs-theme=light] .tw-card:hover { border-color: rgba(0,199,183,0.3); }
[data-bs-theme=light] .tw-card-title { color: #0f1117; }
[data-bs-theme=light] .tw-card-stat  { color: rgba(0,0,0,0.55); }

/* Plugin rows */
[data-bs-theme=light] .tw-plugin-row {
  border-bottom-color: rgba(0,0,0,0.06);
}
[data-bs-theme=light] .tw-plugin-name { color: #0f1117; }
[data-bs-theme=light] .tw-plugin-id   { color: rgba(0,0,0,0.3); }

/* Severity badges — outline style already adapts, but ensure text visible */
[data-bs-theme=light] .tw-sev-badge.critical { color: #b91c1c; border-color: rgba(185,28,28,0.35); background: rgba(185,28,28,0.08); }
[data-bs-theme=light] .tw-sev-badge.high     { color: #c2410c; border-color: rgba(194,65,12,0.35);  background: rgba(194,65,12,0.08); }
[data-bs-theme=light] .tw-sev-badge.medium   { color: #b45309; border-color: rgba(180,83,9,0.35);   background: rgba(180,83,9,0.08);  }
[data-bs-theme=light] .tw-sev-badge.low      { color: #4338ca; border-color: rgba(67,56,202,0.35);  background: rgba(67,56,202,0.08); }
[data-bs-theme=light] .tw-sev-badge.info     { color: rgba(0,0,0,0.35); border-color: rgba(0,0,0,0.1); }

/* CVSS pill */
[data-bs-theme=light] .tw-cvss-pill          { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.1); }
[data-bs-theme=light] .tw-cvss-pill.crit     { color: #b91c1c; border-color: rgba(185,28,28,0.35); }
[data-bs-theme=light] .tw-cvss-pill.high     { color: #c2410c; border-color: rgba(194,65,12,0.35); }
[data-bs-theme=light] .tw-cvss-pill.med      { color: #b45309; border-color: rgba(180,83,9,0.35);  }

/* Exploit badge */
[data-bs-theme=light] .tw-exploit-badge { color: #92400e; border-color: rgba(146,64,14,0.35); background: rgba(146,64,14,0.08); }

/* CVE tag */
[data-bs-theme=light] .tw-cve-tag { color: #0e7490; border-color: rgba(14,116,144,0.3); background: rgba(14,116,144,0.08); }

/* More tag */
[data-bs-theme=light] .tw-more-tag { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.04); }

/* Progress box */
[data-bs-theme=light] .tw-progress-box {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
[data-bs-theme=light] .tw-progress-target { color: #0f1117; }
[data-bs-theme=light] .tw-step-label  { color: rgba(0,0,0,0.5); }
[data-bs-theme=light] .tw-step-status { color: rgba(0,0,0,0.35); }

/* Detail panel (modal) */
[data-bs-theme=light] .tw-detail { background: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-detail-inner {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
[data-bs-theme=light] .tw-detail-name   { color: #0f1117; }
[data-bs-theme=light] .tw-detail-label  { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-detail-big    { color: #0f1117; }
[data-bs-theme=light] .tw-detail-block  { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
[data-bs-theme=light] .tw-detail-close  { color: rgba(0,0,0,0.5); }
[data-bs-theme=light] .tw-detail-close:hover { background: rgba(0,0,0,0.06); color: #0f1117; }
[data-bs-theme=light] .tw-detail-hosts  { color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .tw-detail-icon   { color: rgba(0,0,0,0.2); }

/* DNS table */
[data-bs-theme=light] .tw-dns-table { border-color: rgba(0,0,0,0.06); }
[data-bs-theme=light] .tw-dns-k     { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-dns-v     { color: rgba(0,0,0,0.75); }
[data-bs-theme=light] .tw-dns-copy:hover { color: rgba(0,0,0,0.95); }
[data-bs-theme=light] .tw-dns-copied { color: #007d76 !important; }

/* SSL */
[data-bs-theme=light] .tw-ssl-row    { border-bottom-color: rgba(0,0,0,0.06); }
[data-bs-theme=light] .tw-ssl-issuer { color: rgba(0,0,0,0.45); }
[data-bs-theme=light] .tw-ssl-sans   { color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .tw-ssl-badge  { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.6); }

/* Port cards */
[data-bs-theme=light] .tw-port-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
[data-bs-theme=light] .tw-port-header { color: #0f1117; }
[data-bs-theme=light] .tw-port-ip, [data-bs-theme=light] .tw-port-domain { color: rgba(0,0,0,0.5); }
[data-bs-theme=light] .tw-port-tech-count { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-pc-section-title { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-pc-port-row  { border-bottom-color: rgba(0,0,0,0.06); }
[data-bs-theme=light] .tw-pc-protocol  { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-pc-dns       { color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .tw-pc-port-badge { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .tw-pc-tech-badge { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.6); }
[data-bs-theme=light] .tw-pc-tech-badge.covered { background: rgba(0,199,183,0.08); border-color: rgba(0,199,183,0.3); color: #007d76; }
[data-bs-theme=light] .tw-pc-tech-more  { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] .tw-icon-fb { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] .tw-pc-link  { color: rgba(0,0,0,0.45); }
[data-bs-theme=light] .tw-pc-link:hover { color: rgba(169,62,23,0.85); }
[data-bs-theme=light] .tw-pc-ssl        { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-pc-screenshot-placeholder { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.2); }

/* Scan wrap / input */
[data-bs-theme=light] .tw-scan-wrap { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-bs-theme=light] .tw-scan-hint { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] #tw-url-input {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  color: #0f1117;
}
[data-bs-theme=light] #tw-url-input::placeholder { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] .tw-scan-input-box {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
  color: #0f1117;
}
[data-bs-theme=light] .tw-scan-input-box::placeholder { color: rgba(0,0,0,0.3); }
[data-bs-theme=light] .tw-scan-input-box:focus { border-color: rgba(0,199,183,0.5); }

/* Scan result */
[data-bs-theme=light] .tw-scan-result { border-top-color: rgba(0,0,0,0.07); }
[data-bs-theme=light] .tw-result-label  { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-result-val    { color: rgba(0,0,0,0.7); }
[data-bs-theme=light] .tw-port-badge { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .tw-result-screenshot-placeholder { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.2); }
[data-bs-theme=light] .tw-detected-badge.uncovered { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-no-coverage  { color: rgba(0,0,0,0.25); }

/* Clear scan btn */
[data-bs-theme=light] .tw-clear-scan-btn { border-color: rgba(0,0,0,0.12); color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .tw-clear-scan-btn:hover { border-color: rgba(0,0,0,0.25); color: rgba(0,0,0,0.65); }

/* Empty / no results */
[data-bs-theme=light] .tw-empty-msg  { color: rgba(0,0,0,0.3); }
[data-bs-theme=light] .fb-no-results { color: rgba(0,0,0,0.3); }

/* Drawer filters */
[data-bs-theme=light] .tw-drawer-filters { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-bs-theme=light] .tw-df-btn { border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.55); background: rgba(0,0,0,0.03); }
[data-bs-theme=light] .tw-df-btn.active { background: rgba(0,199,183,0.1); border-color: rgba(0,199,183,0.4); color: #007d76; }

/* Sev bar / dot */
[data-bs-theme=light] .tw-sev-bar  { background: rgba(0,0,0,0.07); }
[data-bs-theme=light] .tw-sev-box:not(.critical):not(.high):not(.medium):not(.low) { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }
[data-bs-theme=light] .val { color: rgba(0,0,0,0.65); }
[data-bs-theme=light] .lbl { color: rgba(0,0,0,0.4); }

/* Scrollbar in light */
[data-bs-theme=light] .tw-detail-inner::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }

/* fb-badge (vulntracker ranking) */
[data-bs-theme=light] .fb-badge { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.6); }

/* ct-detail (vulntracker CVE detail modal) */
[data-bs-theme=light] .ct-detail { background: rgba(0,0,0,0.4); }
[data-bs-theme=light] .ct-detail-inner { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-bs-theme=light] .ct-detail-cve     { color: #0f1117; }
[data-bs-theme=light] .ct-detail-product { color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .ct-detail-vendor  { color: rgba(0,0,0,0.35); }
[data-bs-theme=light] .ct-detail-label   { color: rgba(0,0,0,0.4); }
[data-bs-theme=light] .ct-detail-val     { color: rgba(0,0,0,0.7); }
[data-bs-theme=light] .ct-detail-block   { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
[data-bs-theme=light] .ct-detail-close   { color: rgba(0,0,0,0.45); }
[data-bs-theme=light] .ct-detail-close:hover { background: rgba(0,0,0,0.06); color: #0f1117; }
[data-bs-theme=light] .ct-detail-none    { color: rgba(0,0,0,0.3); }
[data-bs-theme=light] .ct-detail-btn-ghost { border-color: rgba(0,0,0,0.15); color: rgba(0,0,0,0.6); }
[data-bs-theme=light] .ct-detail-btn-ghost:hover { background: rgba(0,0,0,0.06); }
[data-bs-theme=light] .ct-detail-link     { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.65); }
[data-bs-theme=light] .ct-detail-link:hover { background: rgba(34,197,94,0.1); color: #16a34a; }
[data-bs-theme=light] .ct-detail-link-red { color: rgba(0,0,0,0.55); }
[data-bs-theme=light] .ct-detail-link-red:hover { background: rgba(220,38,38,0.1); color: #dc2626; }

/* vulntracker table */
[data-bs-theme=light] .ct-row:hover { background: rgba(0,0,0,0.03); }
[data-bs-theme=light] .ct-detail-rank  { color: rgba(0,0,0,0.25); }
[data-bs-theme=light] .ct-detail-posts { color: #0e7490; }

/* ct filter buttons (vulntracker) */
[data-bs-theme=light] .ct-filter-btn {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.55);
}
[data-bs-theme=light] .ct-filter-btn:hover  { border-color: rgba(0,199,183,0.4); color: #0f1117; }
[data-bs-theme=light] .ct-filter-btn.active { background: rgba(0,199,183,0.1); border-color: rgba(0,199,183,0.45); color: #007d76; }
