/* Reporte parental de progreso y estilos de impresión. */
#parent-report {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 2px solid #c7dfee;
  border-radius: 24px;
  background: var(--ad-surface);
  color: #28455d;
  box-shadow: 0 24px 90px #25486766;
  overflow: auto;
}
#parent-report::backdrop {
  background: #203d58c9;
  backdrop-filter: blur(6px);
}
.report-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 10px;
  background: var(--ad-surface);
  border-bottom: 1px solid #e1ecf4;
}
.report-heading h2 {
  margin: 0;
  font-size: calc(21px * var(--text-scale, 1));
}
.report-heading p {
  margin: 3px 0 0;
  color: var(--color-ink-description);
  font-size: calc(12px * var(--text-scale, 1));
}
#parent-report .report-close {
  width: 42px;
  height: 42px;
  flex: none;
  padding: 0;
  border: 1px solid var(--ad-line-soft);
  border-radius: 13px;
  background: var(--color-surface);
  color: var(--color-ink-dialog);
  font-size: 26px;
}
.report-body {
  padding: 4px 20px 8px;
}
.report-body h3 {
  margin: 18px 0 8px;
  font-size: calc(15px * var(--text-scale, 1));
  color: var(--color-ink-dialog);
}
.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.report-stat {
  padding: 10px;
  border: 1px solid #dbe8f2;
  border-radius: 14px;
  background: var(--color-surface);
}
.report-stat strong {
  display: block;
  font-size: calc(20px * var(--text-scale, 1));
  color: #24557d;
}
.report-stat span {
  font-size: calc(12px * var(--text-scale, 1));
  color: var(--color-ink-report-muted);
}
.report-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 110px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.report-day {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  height: 100%;
  position: relative;
}
.report-bar {
  align-self: end;
  width: 70%;
  height: calc(var(--h) * 100%);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: #7fb69a;
}
.report-day small {
  margin-top: 4px;
  color: var(--color-ink-report-muted);
  font-size: calc(11px * var(--text-scale, 1));
  text-transform: uppercase;
}
.report-day b {
  position: absolute;
  top: 0;
  font-size: calc(11px * var(--text-scale, 1));
  color: #2b6843;
}
.report-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.report-word {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #dbe8f2;
  border-radius: 999px;
  background: var(--color-surface);
  font-size: calc(13px * var(--text-scale, 1));
}
.report-word small {
  color: var(--color-ink-report-muted);
}
.report-empty {
  margin: 0;
  color: var(--color-ink-report-muted);
  font-size: calc(13px * var(--text-scale, 1));
}
.report-topics {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(13px * var(--text-scale, 1));
}
.report-topics :is(th, td) {
  padding: 7px 8px;
  border-bottom: 1px solid #e3ecf3;
  text-align: left;
}
.report-topics th {
  color: var(--color-ink-report-muted);
  font-weight: 600;
}
.report-tips {
  margin: 0;
  padding-left: 20px;
  font-size: calc(13px * var(--text-scale, 1));
  line-height: 1.5;
}
.report-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid #e1ecf4;
}
#parent-report .report-print {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #28664f;
  border-radius: 12px;
  background: var(--color-action-confirm);
  color: var(--color-surface);
  font-weight: 700;
}
.report-footer small {
  color: var(--color-ink-report-muted);
}
html[data-appearance="dark"] #parent-report,
html[data-appearance="dark"] .report-heading {
  background: #21394f;
  color: var(--ad-ink-deep);
  border-color: #47637b;
}
html[data-appearance="dark"] :is(.report-stat, .report-word, #parent-report .report-close) {
  background: #2b455c;
  border-color: #526e88;
  color: #e0edf6;
}
html[data-appearance="dark"] :is(.report-stat strong, .report-body h3) {
  color: #d2e8fa;
}
html[data-appearance="dark"]
  :is(
    .report-stat span,
    .report-word small,
    .report-empty,
    .report-topics th,
    .report-day small,
    .report-footer small,
    .report-heading p
  ) {
  color: #b2c8d9;
}
@media print {
  body:has(#parent-report[open]) > :not(#parent-report) {
    display: none !important;
  }

  #parent-report[open] {
    position: static;
    width: auto;
    max-height: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  #parent-report .report-close,
  #parent-report .report-footer button {
    display: none;
  }
}
#parent-report .report-privacy {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ad-line-soft);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-ink-dialog);
  font-weight: 700;
}
