.report-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--overlay);
}

.completeness-report {
  display: grid;
  grid-template-rows: auto auto auto minmax(120px, 1fr) auto;
  width: min(900px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 20px 60px var(--shadow-strong);

  > header, > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; }
  > header { position: relative; }
  h2 { margin: 0; font: 700 20px Georgia, serif; }
  header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
  .close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    font-size: 0;

    &::before, &::after {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 16px;
      height: 3px;
      border-radius: 2px;
      background: currentColor;
      content: "";
    }

    &::before { transform: translate(-50%, -50%) rotate(45deg); }
    &::after { transform: translate(-50%, -50%) rotate(-45deg); }
  }
  .report-options, .report-summary { padding: 10px 22px; border-top: 1px solid var(--line); }
  .report-options { display: flex; align-items: center; gap: 18px; }
  .report-option { display: flex; gap: 9px; align-items: center; font-size: 13px; }
  .report-scope { display: grid; grid-template-columns: repeat(2, 1fr); width: 260px; margin-left: auto; gap: 8px; }
  .report-scope button { padding: 6px 10px; border-color: var(--line-strong); background: var(--button); color: var(--muted); font-size: 11px; }
  .report-scope button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
  .report-option input[type="checkbox"] {
    display: grid;
    place-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    appearance: none;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--input);

    &::after {
      width: 8px;
      height: 4px;
      border-bottom: 2px solid var(--button-hover);
      border-left: 2px solid var(--button-hover);
      content: "";
      opacity: 0;
      transform: rotate(-45deg) translateY(-1px);
    }

    &:checked { border-color: var(--accent); background: var(--accent); }
    &:checked::after { opacity: 1; }
  }
  .report-summary { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
  .report-summary strong { color: var(--ink); }
  .report-table-wrap { overflow: auto; border-top: 1px solid var(--line); }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th, td { padding: 11px 22px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  th { position: sticky; top: 0; background: var(--panel-soft); color: var(--muted); font-size: 10px; letter-spacing: .08em; }
  th:last-child, td:last-child { width: 58px; text-align: center; }
  tr.ignored { color: var(--muted); text-decoration: line-through; }
  .report-empty { padding: 22px; color: var(--muted); text-align: center; }
  > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
}

