/* =========================================================================
   report.css — Berichte & Urkunden (Bildschirm + Druck).
   Zwei klar getrennte Looks: festliche Urkunde (--cert) und sachlicher,
   farbiger Bericht (--report).
   ========================================================================= */

.report-sheet { margin-top: 16px; position: relative; border-radius: 20px; overflow: hidden; }

/* ===================== CERTIFICATE ===================== */
.report-sheet--cert {
  text-align: center;
  padding: 34px 26px 26px;
  background:
    radial-gradient(120% 90% at 50% 0%, #fffdf6 0%, #fff7e6 45%, #fdeecb 100%);
  border: 1px solid #e7cf93;
  box-shadow: 0 14px 40px rgba(150, 110, 30, .14);
}
/* doppelter Zierrahmen */
.report-sheet--cert::before {
  content: ''; position: absolute; inset: 10px; border-radius: 14px;
  border: 2px solid #d9b25e; opacity: .55; pointer-events: none;
}
.report-sheet--cert::after {
  content: ''; position: absolute; inset: 15px; border-radius: 11px;
  border: 1px solid #e8cf92; opacity: .7; pointer-events: none;
}
.cert__corner {
  position: absolute; width: 26px; height: 26px; border: 0 solid #c79a3e; opacity: .8; z-index: 1;
}
.cert__corner--tl { top: 18px; left: 18px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.cert__corner--tr { top: 18px; right: 18px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.cert__corner--bl { bottom: 18px; left: 18px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.cert__corner--br { bottom: 18px; right: 18px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }

.cert__brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .04em; color: #9a7322; font-size: .92rem; text-transform: uppercase; }
.cert__brand-logo { width: 20px; height: 20px; color: #c79a3e; display: inline-flex; }
.cert__brand-logo svg, .report-head__logo svg { width: 100%; height: 100%; }

.cert__seal {
  position: relative; z-index: 2; width: 74px; height: 74px; margin: 16px auto 8px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e8b54a 70%, #c79126);
  color: #fff; font-size: 2.3rem; line-height: 1;
  box-shadow: 0 6px 16px rgba(190, 140, 40, .5), inset 0 0 0 3px rgba(255,255,255,.5);
}
.cert__kicker {
  position: relative; z-index: 2; margin-top: 6px;
  font-size: 2.3rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, #b8860b, #e0a92e, #b8860b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cert__award { position: relative; z-index: 2; margin-top: 8px; font-size: 1.06rem; font-weight: 650; color: #7a5e1e; }
.cert__presented { position: relative; z-index: 2; margin-top: 18px; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #a98a45; }
.cert__name {
  position: relative; z-index: 2; margin-top: 4px;
  font-size: 2.5rem; font-weight: 850; line-height: 1.05; color: #5c4410;
  font-style: italic;
}
.cert__rule { position: relative; z-index: 2; width: 150px; height: 2px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, #c79a3e 50%, transparent); }
.cert__verdict { position: relative; z-index: 2; margin: 16px auto 4px; max-width: 440px; font-size: .98rem; line-height: 1.55; color: #5d4a1c; }
.cert__detail { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 10px 10px 0; font-size: .9rem; text-align: center; }
.cert__detail-label { color: #a98a45; font-size: .76rem; letter-spacing: .04em; }
.cert__detail-value { font-weight: 750; color: #5c4410; }
.cert__foot { position: relative; z-index: 2; margin-top: 22px; font-size: .82rem; color: #9a7322; font-weight: 600; }
.cert__seal-note { position: relative; z-index: 2; margin-top: 2px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #b89a55; }

/* ===================== REPORT ===================== */
.report-sheet--report {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(20, 30, 45, .07);
}
.report-head {
  padding: 22px 22px 20px; color: #fff;
  background: linear-gradient(135deg, var(--report-accent, #3d8bff), color-mix(in srgb, var(--report-accent, #3d8bff) 60%, #111));
  position: relative; overflow: hidden;
}
.report-head::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.report-head__row { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.report-head__brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; opacity: .92; }
.report-head__logo { width: 18px; height: 18px; display: inline-flex; }
.report-head__badge { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.2); border-radius: 9px; }
.report-head__badge svg { width: 18px; height: 18px; }
.report-head__title { position: relative; z-index: 1; margin-top: 14px; font-size: 1.5rem; font-weight: 850; letter-spacing: -.4px; line-height: 1.12; }
.report-head__meta { position: relative; z-index: 1; margin-top: 3px; font-size: .9rem; opacity: .9; }

.report-body { padding: 18px 18px 16px; }
.report-verdict {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: .96rem; line-height: 1.5; color: var(--text);
  background: color-mix(in srgb, var(--report-accent, #3d8bff) 8%, var(--surface-2, #f4f7f9));
  border-left: 4px solid var(--report-accent, #3d8bff);
  border-radius: 10px; padding: 13px 15px; margin-bottom: 6px;
}
.report-verdict__mark { font-size: 1.6rem; line-height: .8; color: var(--report-accent, #3d8bff); font-weight: 850; }

.report-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-2); margin: 20px 2px 10px;
}
.report-section-bar { width: 16px; height: 3px; border-radius: 3px; background: var(--report-accent, #3d8bff); flex: 0 0 auto; }

.report-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.report-stat {
  background: var(--surface-2, #f4f7f9); border-radius: 12px; padding: 12px 14px;
  border: 1px solid var(--border);
}
.report-stat__value { font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; color: var(--text); }
.report-stat__label { font-size: .74rem; color: var(--text-2); margin-top: 2px; }

.report-foot { margin-top: 22px; font-size: .72rem; color: var(--text-3); text-align: center; }

/* ===================== Badge-Kacheln (beide) ===================== */
.report-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; margin-top: 4px; }
.report-sheet--cert .report-badges { max-width: 460px; margin: 10px auto 0; }
.report-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 11px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--report-accent, #18b48a) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--report-accent, #18b48a) 28%, var(--border));
}
.report-sheet--cert .report-badge { background: #fff8e6; border-color: #e7cf93; }
.report-badge__emoji { font-size: 1.7rem; line-height: 1; }
.report-badge__name { font-size: .68rem; font-weight: 650; line-height: 1.2; color: var(--text-2); overflow-wrap: break-word; }
.report-sheet--cert .report-badge__name { color: #7a5e1e; }

/* A plan to print (plan-share.js): only for the print dialog, never on the screen. */
.plan-print { display: none; color: #1d2433; font-size: 12px; line-height: 1.4; }
.plan-print h1 { font-size: 18px; margin: 0 0 4px; }
.plan-print h2 { font-size: 13px; margin: 16px 0 4px; padding-bottom: 2px; border-bottom: 2px solid #18b48a; break-after: avoid; }
.plan-print .meta, .plan-print .foot { color: #5b6475; font-size: 11px; }
.plan-print table { width: 100%; border-collapse: collapse; }
.plan-print tr { break-inside: avoid; }
.plan-print td { vertical-align: top; padding: 4px 6px; border-bottom: 1px solid #e3e7ee; }
.plan-print td.day, .plan-print td.target { white-space: nowrap; width: 1%; }
.plan-print td.target { text-align: right; }
.plan-print .desc { color: #4a5363; font-size: 11px; }

/* ---------------------------------- Druck -------------------------------- */
@media print {
  .plan-print { display: block; }
  body * { visibility: hidden !important; }
  #report-print, #report-print * { visibility: visible !important; }
  #report-print {
    position: absolute; left: 0; top: 0; width: 100%;
    box-shadow: none; margin: 0; border-radius: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .no-print, #bottom-nav, .app-header, header, nav { display: none !important; }
  @page { margin: 12mm; }
}
