/* ==========================================================================
   TUIA — Design System (Executive Cobalt & Slate Navy)
   Paleta: Slate Navy, Royal Cobalt Blue, Sentinel Cyan & Pure White
   Foco: Executivo, sóbrio, corporativo e ultra-otimizado para Mobile Presentation
   ========================================================================== */

:root {
  /* Canvas e Superfícies Escuras Neutras */
  --bg: #0a0f1d;
  --bg-2: #0f172a;
  --panel: #111a2e;
  --panel-2: #17233d;
  --panel-3: #1e293b;

  /* Bordas e Divisores Sóbrios */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-focus: rgba(255, 255, 255, 0.22);

  /* Tipografia Executiva */
  --txt: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;

  /* Acentos da Marca (Sóbrio: Royal Cobalt Blue & Sentinel Cyan) */
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-ink: #ffffff;
  --brand-tint: rgba(37, 99, 235, 0.12);

  --accent: #38bdf8;
  --accent-ink: #38bdf8;

  /* Severidades de Alto Contraste (Cyber Badges Corporativos) */
  --crit: #ef4444;
  --high: #f97316;
  --med: #eab308;
  --low: #38bdf8;
  --info: #94a3b8;

  --crit-bg: rgba(239, 68, 68, 0.12);
  --crit-tx: #fca5a5;
  --crit-border: rgba(239, 68, 68, 0.28);

  --high-bg: rgba(249, 115, 22, 0.12);
  --high-tx: #fdba74;
  --high-border: rgba(249, 115, 22, 0.28);

  --med-bg: rgba(234, 179, 8, 0.12);
  --med-tx: #fde047;
  --med-border: rgba(234, 179, 8, 0.28);

  --low-bg: rgba(56, 189, 248, 0.12);
  --low-tx: #7dd3fc;
  --low-border: rgba(56, 189, 248, 0.28);

  --info-bg: rgba(148, 163, 184, 0.1);
  --info-tx: #cbd5e1;
  --info-border: rgba(148, 163, 184, 0.2);

  --ok-bg: rgba(16, 185, 129, 0.1);
  --ok-tx: #34d399;
  --ok-border: rgba(16, 185, 129, 0.25);

  /* Sidebar e Chrome de Navegação */
  --nav-bg: #090c0f;
  --nav-2: #12181d;
  --nav-line: rgba(255, 255, 255, 0.07);
  --nav-txt: #e2e8f0;
  --nav-muted: #8492a6;
  --nav-active: rgba(255, 255, 255, 0.07);

  /* Sombras & Profundidade */
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 22px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.07);

  --radius: 12px;
  --radius-sm: 8px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Canvas 3D Atmosférico de Fundo */
.cyber-app-ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.app, .mtop, #modal-root {
  position: relative;
  z-index: 2;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: #7dd3fc;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.018em;
  color: #ffffff;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-ligatures: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ==========================================================================
   Layout Desktop
   ========================================================================== */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--nav-bg);
  border-right: 1px solid var(--nav-line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--nav-txt);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--nav-line);
}
.brand .logo { width: 34px; height: 34px; flex: none; }
.brand .name { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; color: #fff; }
.brand .name b { color: #ffffff; font-weight: 800; }
.brand .tag { font-size: 10.5px; color: var(--nav-muted); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 1px; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
.nav .nav-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nav-muted);
  padding: 10px 12px 6px;
  font-weight: 650;
  opacity: 0.8;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 9px;
  color: var(--nav-muted);
  font-weight: 550;
  font-size: 13.5px;
  transition: all 0.15s ease;
  position: relative;
}
.nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  stroke-width: 2;
  transition: all 0.15s ease;
}
.nav a:hover {
  background: var(--nav-2);
  color: #ffffff;
}
.nav a:hover svg {
  opacity: 1;
  stroke: #ffffff;
}
.nav a.active {
  background: var(--nav-active);
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}
.nav a.active svg {
  color: #ffffff;
  opacity: 1;
  stroke: #ffffff;
  filter: none;
}

.sidebar .foot {
  margin-top: auto;
  font-size: 11px;
  color: var(--nav-muted);
  padding: 16px 10px 4px;
  border-top: 1px solid var(--nav-line);
  line-height: 1.6;
}
.sidebar .foot b {
  color: #e2e8f0;
  font-weight: 600;
}

.main {
  padding: 28px 36px 72px;
  max-width: 1280px;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.topbar h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.024em;
}
.topbar .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
  max-width: 680px;
}

/* ==========================================================================
   Buttons (Sóbrios & Corporativos)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 9px;
  font-weight: 580;
  font-size: 13.5px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
  user-select: none;
}
.btn:hover {
  background: var(--panel-3);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn.primary {
  background: #0f766e;
  border-color: #14b8a6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.btn.primary:hover {
  background: #115e59;
  border-color: #2dd4bf;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.btn.sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 7px;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   Cards & KPIs
   ========================================================================== */
.grid {
  display: grid;
  gap: 16px;
}
.kpis {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.kpi {
  padding: 18px 20px;
  position: relative;
}
.kpi .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kpi .label {
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}
.kpi .val {
  font-size: 30px;
  font-weight: 750;
  margin-top: 10px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #ffffff;
}
.kpi .val small {
  font-size: 14px;
  color: var(--muted-2);
  font-weight: 500;
}
.kpi .delta {
  font-size: 12px;
  margin-top: 8px;
  color: var(--muted-2);
}
.kpi .ic {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.kpi .ic svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 14px;
}
.section-title h2 {
  font-size: 15px;
  font-weight: 650;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.section-title .hint {
  color: var(--muted-2);
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ==========================================================================
   Donut & Charts (Executive Dark)
   ========================================================================== */
.chart-wrap {
  position: relative;
  flex: none;
}
.chart-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.cc-v {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #ffffff;
}
.cc-l {
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 4px;
  max-width: 96px;
}

.dist {
  display: flex;
  align-items: center;
  gap: 28px;
}
.dist .legend {
  flex: 1;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.legend .row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.legend .row:last-child {
  border-bottom: none;
}
.legend .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.legend .n {
  margin-left: auto;
  font-weight: 650;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.legend .pc {
  color: var(--muted-2);
  font-size: 12px;
  width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Tables & Badges
   ========================================================================== */
.tbl-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  font-weight: 650;
  padding: 0 14px 12px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: top;
  color: var(--muted);
}
tbody tr {
  transition: background 0.12s ease;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}
.t-title {
  font-weight: 600;
  color: #ffffff;
}
.t-asset {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.t-cat {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* Badges de Severidade Corporativos */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 650;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.badge .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.sev-critical {
  background: var(--crit-bg);
  color: var(--crit-tx);
  border-color: var(--crit-border);
}
.sev-critical .d { background: var(--crit); }

.sev-high {
  background: var(--high-bg);
  color: var(--high-tx);
  border-color: var(--high-border);
}
.sev-high .d { background: var(--high); }

.sev-medium {
  background: var(--med-bg);
  color: var(--med-tx);
  border-color: var(--med-border);
}
.sev-medium .d { background: var(--med); }

.sev-low {
  background: var(--low-bg);
  color: var(--low-tx);
  border-color: var(--low-border);
}
.sev-low .d { background: var(--low); }

.sev-info {
  background: var(--info-bg);
  color: var(--info-tx);
  border-color: var(--info-border);
}
.sev-info .d { background: var(--info); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 550;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.pill svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
.pill.lgpd {
  background: var(--low-bg);
  border-color: var(--low-border);
  color: var(--low-tx);
  font-weight: 650;
}
.pill.ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-tx);
  font-weight: 600;
}

/* ==========================================================================
   Project Cards & Risk Chips
   ========================================================================== */
.proj-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.proj {
  cursor: pointer;
  transition: all 0.15s ease;
}
.proj:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.proj .h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.proj .nm {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.proj .org {
  color: var(--muted-2);
  font-size: 12.5px;
  margin-top: 3px;
}
.proj .tgt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.proj .meta {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Risk Chip */
.risk {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
}
.risk .rv {
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.risk .rl {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-top: 3px;
  font-weight: 650;
}
.risk.r-crit { background: var(--crit-bg); border-color: var(--crit-border); }
.risk.r-crit .rv { color: var(--crit-tx); }

.risk.r-high { background: var(--high-bg); border-color: var(--high-border); }
.risk.r-high .rv { color: var(--high-tx); }

.risk.r-med { background: var(--med-bg); border-color: var(--med-border); }
.risk.r-med .rv { color: var(--med-tx); }

.risk.r-low { background: var(--ok-bg); border-color: var(--ok-border); }
.risk.r-low .rv { color: var(--ok-tx); }

/* ==========================================================================
   Modals & Form Fields
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 10, 0.82);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 20px;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #11171d;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  width: min(580px, 100%);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal .mh {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  flex: none;
}
.modal .mh h3 {
  font-size: 16px;
  font-weight: 650;
  color: #ffffff;
}
.modal .mb {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal .mf {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #0d1217;
  flex: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 560;
}
.field input, .field select, .field textarea {
  background: #0a0d10;
  border: 1px solid var(--line-2);
  color: #ffffff;
  border-radius: 8px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13.5px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted-2);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.field select option {
  background: #11171d;
  color: #ffffff;
}
.field textarea {
  resize: vertical;
  min-height: 72px;
}
.field .help {
  font-size: 11.5px;
  color: var(--muted-2);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 14px;
}
.consent input {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: #0f766e;
  flex: none;
}
.consent label, .consent span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.consent b {
  color: #ffffff;
}

.x {
  background: none;
  border: none;
  color: var(--muted-2);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: all 0.12s ease;
}
.x:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ==========================================================================
   Progress & Phases
   ========================================================================== */
.progress-wrap {
  max-width: 680px;
  margin: 28px auto;
  text-align: center;
}
.pbar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.pbar .fill {
  height: 100%;
  background: #0f766e;
  width: 0;
  transition: width 0.5s ease;
  border-radius: 20px;
}
.phases {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 8px;
}
.phase {
  flex: 1;
  text-align: center;
  opacity: 0.45;
  transition: 0.3s;
}
.phase.on, .phase.done {
  opacity: 1;
}
.phase .pc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 650;
}
.phase.on .pc {
  border-color: #14b8a6;
  color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.phase.done .pc {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
  font-weight: 750;
}
.phase .pl {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Tabs
   ========================================================================== */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 11px 18px;
  color: var(--muted-2);
  font-weight: 560;
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover {
  color: #ffffff;
}
.tab.active {
  color: #ffffff;
  border-bottom-color: var(--accent);
  font-weight: 650;
}

/* ==========================================================================
   Report & Gauge
   ========================================================================== */
.report h3 {
  font-size: 12px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-weight: 650;
}
.report .block {
  margin-bottom: 22px;
}
.report p {
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.65;
}
.posture {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.gauge {
  --v: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--v)*1%), var(--bg-2) 0);
  position: relative;
}
.gauge::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--panel);
}
.gauge .g-in {
  position: relative;
  text-align: center;
}
.gauge .g-v {
  font-size: 22px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}
.gauge .g-l {
  font-size: 8.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}

.timeline {
  position: relative;
  padding-left: 26px;
  margin-top: 6px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-2);
}
.tl {
  position: relative;
  margin-bottom: 22px;
}
.tl::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--panel);
  border: 3px solid var(--accent);
}
.tl .th {
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 10px;
  color: #ffffff;
}
.tl .ti {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  align-items: flex-start;
}
.tl .ti:first-of-type { border-top: none; }
.tl .ti .act { color: var(--muted-2); font-size: 12.5px; margin-top: 3px; }
.effort {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line-2);
  white-space: nowrap;
  height: fit-content;
  font-weight: 550;
}

.mphases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.mph {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 540;
  color: var(--muted);
}
.mph .ck {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12px;
}
.mph.y {
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.mph.y .ck {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-weight: 700;
}
.mph.n .ck {
  background: var(--bg-2);
  color: var(--muted-2);
}

/* ==========================================================================
   Visão Geral One-Pager
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.hero-l {
  padding-right: 28px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.hero-eyebrow svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  stroke-width: 2;
}
.hero-title {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-top: 12px;
  color: #ffffff;
}
.hero-meta {
  color: var(--muted-2);
  font-size: 13.5px;
  margin-top: 5px;
}
.hero-target {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-target svg {
  color: var(--muted-2);
}
.hero-summary {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
  margin: 0;
  max-width: 64ch;
}
.hero-r {
  border-left: 1px solid var(--line);
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

/* Sensor 3D Holográfico de Risco */
.hero-3d-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.hero-3d-wrap:active {
  cursor: grabbing;
}
.hero-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.hero-3d-center {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}
.hero-3d-center .h-val {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-3d-center .h-lbl {
  font-size: 9.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 650;
  margin-top: 4px;
}
.hero-3d-hint {
  font-size: 10.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.85;
}
.hero-3d-hint svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

/* Scanner 3D Holográfico durante execução do teste */
.scan-3d-stage {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: 12px;
  background: rgba(9, 14, 17, 0.85);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.scan-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.scan-3d-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}
.scan-3d-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
  animation: beaconPulse 1.8s infinite;
}

.hero-grade {
  font-size: 12.5px;
  color: var(--muted-2);
}
.hero-grade b {
  color: #ffffff;
  font-weight: 700;
}

.tiles {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
}
.tile {
  padding: 16px 20px;
}
.tile-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tile-ic {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tile-ic svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.tile.danger .tile-ic {
  background: var(--crit-bg);
  color: var(--crit-tx);
  border-color: var(--crit-border);
}
.tile.info .tile-ic {
  background: var(--low-bg);
  color: var(--low-tx);
  border-color: var(--low-border);
}
.tile-label {
  font-size: 12.5px;
  color: var(--muted-2);
  font-weight: 560;
}
.tile-val {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #ffffff;
}
.tile.danger .tile-val {
  color: var(--crit-tx);
}
.tile-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 7px;
}

.toplist-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.m-scroll-hint {
  display: none;
}
.toplist {
  display: flex;
  flex-direction: column;
}
.toprow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  transition: background 0.12s ease;
  border-radius: 8px;
}
.toprow:first-child {
  border-top: none;
}
.tr-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
}
.tr-main {
  flex: 1;
  min-width: 0;
}
.tr-title {
  font-weight: 580;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}
.tr-asset {
  font-size: 11.5px;
  color: var(--accent);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-side {
  text-align: right;
  flex: none;
}
.tr-cvss {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.ov-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}
.ov-grid {
  display: grid;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.ov-grid.a { grid-template-columns: 380px minmax(0, 1fr); }
.ov-grid.b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Testar Scan Card */
.scan-card {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.scan-note {
  font-size: 12px;
  color: var(--muted-2);
}

/* Itens clicáveis & detalhe do achado */
.click { cursor: pointer; }
.toprow.click:hover {
  background: rgba(255, 255, 255, 0.04);
}
tr.click:hover {
  background: rgba(255, 255, 255, 0.04);
}
.ti.click {
  cursor: pointer;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.ti.click:hover {
  background: rgba(255, 255, 255, 0.04);
}

.find-detail { gap: 0; }
.find-detail .fd-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-sec {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.fd-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 650;
  margin-bottom: 9px;
}
.fd-h svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  stroke-width: 2;
}
.fd-asset {
  color: var(--accent);
  font-size: 13px;
  word-break: break-all;
}
.fd-ev {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  background: #0a0d10;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  word-break: break-word;
}
.find-detail p {
  margin: 0;
  color: var(--txt);
  line-height: 1.65;
}
.ia-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 4px;
  font-weight: 650;
}

/* ==========================================================================
   Prose & Toast
   ========================================================================== */
.prose { max-width: 780px; }
.prose h2 { font-size: 19px; margin: 30px 0 12px; letter-spacing: -0.02em; color: #ffffff; }
.prose p { color: var(--muted); margin: 0 0 14px; line-height: 1.68; }
.prose p b, .prose li b { color: #ffffff; }
.prose ul { color: var(--muted); padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; line-height: 1.6; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }

.empty {
  text-align: center;
  color: var(--muted-2);
  padding: 56px 20px;
}
.empty svg {
  width: 44px;
  height: 44px;
  opacity: 0.45;
  margin-bottom: 12px;
  stroke-width: 1.6;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #11171d;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-size: 13.5px;
  max-width: 360px;
  animation: slideup 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}
.toast.err { border-color: var(--crit); color: var(--crit-tx); }
@keyframes slideup { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 12px;
}
.crumbs a {
  color: var(--muted);
  cursor: pointer;
}
.crumbs a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Responsividade Intermediária (Tablets: 761px - 960px)
   ========================================================================== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-l { padding-right: 0; }
  .hero-r {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
    margin-top: 8px;
  }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dist { flex-direction: column; gap: 18px; }
  .ov-grid.a, .ov-grid.b { grid-template-columns: minmax(0, 1fr); }
  .split, .proj-list { grid-template-columns: 1fr; }
  .mphases { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MOBILE PRESENTATION ENGINE (<= 760px)
   Otimizado para apresentações ao vivo via smartphone (ergonomia sóbria)
   ========================================================================== */
.mtop { display: none; }

@media (max-width: 760px) {
  .app {
    display: block;
    min-height: 100vh;
  }

  /* Barra Superior Fixa (Header Mobile Executivo) */
  .mtop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 16px 0;
    background: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    color: #ffffff;
  }

  .mtop-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mtop .logo {
    width: 26px;
    height: 26px;
    flex: none;
  }
  
  /* Status Beacon Discreto na Barra Mobile */
  .mtop-beacon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
  }
  .mtop-beacon-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: beaconPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
  @keyframes beaconPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
  }
  .mtop-beacon-txt {
    font-size: 10px;
    font-weight: 550;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
  }

  /* Botão de Ação Rápida no Topo Mobile (Sóbrio) */
  .mtop-right {
    display: flex;
    align-items: center;
  }
  .mtop-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 550;
    transition: all 0.15s ease;
  }
  .mtop-quick-btn:active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: scale(0.96);
  }

  /* Barra de Navegação Inferior Nativa (Tab Bar Mobile) */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: none;
    border-top: 1px solid var(--line);
    background: rgba(9, 13, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 60;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }
  .sidebar .brand,
  .sidebar .foot,
  .nav .nav-lbl {
    display: none !important;
  }

  .nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
    margin: 0;
  }
  .nav a {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 5px 2px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 550;
    color: var(--nav-muted);
    box-shadow: none;
    text-align: center;
    border-left: none !important;
    position: relative;
    user-select: none;
    transition: transform 0.1s ease, color 0.15s ease;
  }
  .nav a span {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
  }
  .nav a svg {
    width: 20px;
    height: 20px;
    opacity: 0.85;
    flex: none;
  }
  .nav a:active {
    transform: scale(0.92);
  }
  .nav a.active {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-weight: 600;
  }
  .nav a.active svg {
    color: #38bdf8;
    stroke: #38bdf8;
    opacity: 1;
    filter: none;
  }
  .nav a.active::before {
    content: "";
    position: absolute;
    top: 2px;
    width: 14px;
    height: 2px;
    background: #38bdf8;
    border-radius: 2px;
  }

  /* Área Principal com Espaçamento Livre para Apresentação */
  .main {
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
    padding: calc(64px + env(safe-area-inset-top, 0px)) 14px calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    width: 100%;
    min-width: 0;
  }
  .topbar h1 {
    font-size: 21px;
  }
  .topbar .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }

  /* Cartão Hero no Mobile */
  .hero {
    padding: 18px 14px;
    border-radius: 12px;
    gap: 16px;
    min-width: 0;
    box-sizing: border-box;
  }
  .hero-eyebrow {
    font-size: 11px;
    gap: 5px;
  }
  .hero-title {
    font-size: 19px;
    line-height: 1.25;
    word-break: break-word;
  }
  .hero-meta {
    font-size: 11.5px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .hero-target {
    font-size: 12px;
    word-break: break-all;
    white-space: normal;
  }
  .hero-summary {
    font-size: 12.5px;
    line-height: 1.5;
  }
  .hero-r {
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid var(--line);
    margin-top: 6px;
  }
  .hero-3d-wrap {
    width: 165px;
    height: 165px;
    margin: 0 auto;
  }
  .hero-3d-canvas {
    width: 165px !important;
    height: 165px !important;
  }
  .hero-3d-center .h-val {
    font-size: 30px;
  }
  .hero-grade {
    font-size: 11px;
    text-align: center;
    margin-top: 6px;
  }

  /* Grid de Tiles e KPIs no Mobile: 2 colunas equilibradas sem estouro */
  .tiles, .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    width: 100%;
  }
  .tile, .kpi {
    padding: 12px 12px;
    border-radius: 10px;
    min-width: 0;
    box-sizing: border-box;
  }
  .tile-top, .kpi .top {
    gap: 6px;
  }
  .tile-ic, .kpi .ic {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .tile-ic svg, .kpi .ic svg {
    width: 14px;
    height: 14px;
  }
  .tile-label, .kpi .label {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tile-val, .kpi .val {
    font-size: 22px;
    margin-top: 6px;
  }
  .tile-sub, .kpi .delta {
    font-size: 10px;
    line-height: 1.3;
    margin-top: 4px;
    white-space: normal;
    word-break: break-word;
  }

  /* Grid Geral e Cards Mobile */
  .card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 14px;
    border-radius: 12px;
  }
  .ov-grid, .ov-grid.a, .ov-grid.b, .split, .proj-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100%;
    margin-top: 14px;
    box-sizing: border-box;
  }

  /* Cabeçalho de Seções */
  .section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px;
    width: 100%;
    min-width: 0;
  }
  .section-title h2 {
    font-size: 14.5px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .section-title .hint {
    font-size: 11px;
    flex-shrink: 0;
    color: var(--muted-2);
  }

  /* Distribuição por Severidade (Donut centralizado + legenda em 2 colunas) */
  .dist {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .dist svg {
    margin: 0 auto;
  }
  .dist .legend {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  /* Indicador Visual de Rolagem Horizontal no Mobile */
  .m-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 4px;
    padding: 1.5px 6px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
    letter-spacing: 0.02em;
    animation: scrollHintPulse 2.5s infinite;
  }
  @keyframes scrollHintPulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; border-color: rgba(56, 189, 248, 0.5); }
  }

  /* Lista de Achados com Rolagem Horizontal Suave (Mobile) */
  .toplist-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 4px 4px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.35) rgba(255, 255, 255, 0.04);
  }
  .toplist-wrap::-webkit-scrollbar {
    height: 5px;
  }
  .toplist-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
  }
  .toplist-wrap::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35);
    border-radius: 6px;
  }
  .toplist-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6);
  }

  .toplist {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 530px;
    width: 100%;
  }

  .toprow {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 8px;
    min-width: 530px;
    border-top: 1px solid var(--line);
    transition: background 0.12s ease;
    border-radius: 6px;
  }
  .toprow:first-child {
    border-top: none;
  }
  .toprow:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .tr-rank {
    width: 24px;
    height: 24px;
    font-size: 11.5px;
    flex: none;
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--muted);
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
  }

  .tr-main {
    flex: 1;
    min-width: 280px;
  }
  .tr-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .tr-title .pill.lgpd {
    font-size: 9.5px;
    padding: 1.5px 6px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
  }
  .tr-asset {
    font-size: 11.5px;
    color: #38bdf8;
    margin-top: 3px;
    white-space: nowrap;
  }

  .tr-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: none;
    min-width: 90px;
    text-align: right;
  }
  .tr-side .badge {
    padding: 3px 9px;
    font-size: 11px;
    white-space: nowrap;
  }
  .tr-cvss {
    font-size: 11px;
    color: var(--muted-2);
    font-weight: 550;
    white-space: nowrap;
  }

  /* Linha do Tempo / Plano de Remediação no Mobile */
  .timeline {
    padding-left: 18px;
  }
  .timeline::before {
    left: 4px;
  }
  .tl::before {
    left: -18px;
    width: 9px;
    height: 9px;
    top: 4px;
  }
  .tl .th {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .tl .ti {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }
  .tl .ti > div {
    width: 100%;
    min-width: 0;
  }
  .tl .ti .act {
    font-size: 11.5px;
    margin-top: 3px;
    line-height: 1.4;
  }
  .effort {
    align-self: flex-start;
    font-size: 10.5px;
    padding: 1.5px 7px;
  }

  /* Conformidade & Fases Metodológicas */
  .mphases {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .mph {
    padding: 10px 12px;
    font-size: 12.5px;
    border-radius: 8px;
  }

  /* Rodapé do Portfólio */
  .ov-foot {
    font-size: 11px;
    line-height: 1.5;
    padding: 0 4px;
    margin-top: 16px;
    word-break: break-word;
  }

  /* Formulários e Modais no Mobile (Sem zoom do iOS) */
  .field input, .field select, .field textarea {
    font-size: 16px !important;
    padding: 12px 14px;
  }
  .two {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .overlay {
    padding: 8px;
    align-items: flex-end;
  }
  .modal {
    width: 100%;
    max-height: 90vh;
    border-radius: 18px 18px 12px 12px;
  }
  .modal .mh {
    padding: 14px 16px;
  }
  .modal .mb {
    padding: 14px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal .mf {
    padding: 12px 16px;
  }
  .modal .mf .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
  }
  .fd-chips {
    gap: 6px;
  }
  .fd-sec {
    margin-top: 14px;
    padding-top: 14px;
  }

  .phases {
    flex-wrap: wrap;
    gap: 10px 6px;
  }
  .phase {
    flex-basis: 30%;
  }

  .proj-list {
    grid-template-columns: 1fr;
  }
  .scan-card {
    max-width: none;
    padding: 16px 14px;
    gap: 14px;
  }
  .scan-card .btn.primary {
    width: 100%;
    padding: 12px 18px;
  }
  .scan-note {
    font-size: 11.5px;
    line-height: 1.4;
  }
}
