*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070b14;
  color: #0f172a;
  line-height: 1.55;
}

.report-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.75rem 1rem;
}

.toolbar-inner {
  width: min(880px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.back-btn {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.back-btn:hover {
  color: #34d399;
}

.toolbar-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.toolbar-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #10b981;
  color: #03150e;
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.35);
  color: #f1f5f9;
}

.report-sheet {
  width: min(880px, 94%);
  margin: 2rem auto 3rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 2.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.rpt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.35rem;
  border-bottom: 2px solid #0f172a;
}

.rpt-brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.rpt-brand span {
  color: #059669;
}

.rpt-tagline {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  margin-top: 0.2rem;
}

.rpt-meta-line {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.rpt-doc-info {
  text-align: right;
}

.class-badge {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: #fef2f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.rpt-folio {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.35rem 0 0.2rem;
}

.rpt-date {
  font-size: 0.78rem;
  color: #64748b;
}

.rpt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.rpt-box {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
}

.rpt-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #059669;
  margin-bottom: 0.35rem;
}

.rpt-strong {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.rpt-section {
  margin-top: 2rem;
}

.rpt-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}

.rpt-section p {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  color: #334155;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.kpi-box {
  padding: 0.9rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.kpi-box strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.65rem;
}

.kpi-box span {
  font-size: 0.78rem;
  font-weight: 600;
}

.kpi-box.crit { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.kpi-box.high { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.kpi-box.med { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.kpi-box.low { background: #f8fafc; border-color: #cbd5e1; color: #475569; }

.finding-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.finding-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.finding-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
}

.finding-head h3 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
}

.finding-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.sev-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.sev-pill.crit { background: #ffe4e6; color: #be123c; }
.sev-pill.high { background: #fef3c7; color: #b45309; }
.sev-pill.med { background: #e0f2fe; color: #0369a1; }
.sev-pill.low { background: #f1f5f9; color: #475569; }
.sev-pill.ok { background: #d1fae5; color: #047857; }

.poc-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  margin: 0.75rem 0 0.35rem;
}

.poc-code {
  margin: 0 0 0.9rem;
  padding: 0.9rem 1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  overflow-x: auto;
  line-height: 1.55;
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.rpt-table th {
  text-align: left;
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 0.8rem;
}

.rpt-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}

.rpt-footer {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

@media (max-width: 720px) {
  .report-sheet {
    padding: 1.35rem;
  }
  .rpt-grid-2,
  .kpi-row {
    grid-template-columns: 1fr;
  }
  .rpt-doc-info {
    text-align: left;
  }
}

@media print {
  body {
    background: #ffffff;
  }
  .no-print {
    display: none !important;
  }
  .report-sheet {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
}
