/* Report form, confirmation and My reports. Builds on theme, home, profile, form */
.rp-page .form-head h1 { font-size: 22px; }
.rp-page .panel h2 .muted { font-weight: 500; font-size: 14px; color: var(--muted); }

.rp-subject {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.rp-subject img, .rp-av { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex: none; }
.rp-av { border-radius: 50%; background: var(--green-tint) center / cover no-repeat; color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; overflow: hidden; }
.rp-av svg { width: 50%; height: 50%; }
.rp-av.rp-star { border-radius: 6px; background: var(--soft); color: var(--muted); }
.rp-subject > div { min-width: 0; }
.rp-s-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-s-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.rp-subject.small { margin: 20px 0 0; padding: 10px 12px; text-align: left; }
.rp-subject.small img, .rp-subject.small .rp-av { width: 40px; height: 40px; }

.rp-reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; }
.rp-reason {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; cursor: pointer;
  border-top: 1px solid var(--line);
}
.rp-reason:first-of-type { border-top: 0; padding-top: 0; }
.rp-reason input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--green-dark); }
.rp-reason span { display: flex; flex-direction: column; gap: 2px; }
.rp-reason strong { font-size: 15px; font-weight: 600; }
.rp-reason small { font-size: 13px; color: var(--muted); }
.rp-page .panel .error, .rp-page > form > .error { margin: 8px 0 0; }
.rp-page .field { margin-bottom: 0; }

.rp-files { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-files:empty { display: none; }
.rp-file { position: relative; width: 96px; height: 96px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.rp-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-file button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rp-file svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.rp-add {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; height: 40px; padding: 0 14px;
  border: 1.5px dashed var(--border); border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.rp-files:empty + .rp-add { margin-top: 0; }
.rp-add:hover { background: var(--soft); }
.rp-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.rp-add:has(input:focus-visible) { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.rp-add[hidden] { display: none; }

.rp-declare { display: flex; align-items: flex-start; gap: 10px; margin: 6px 4px 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.rp-declare input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--green-dark); }

/* Confirmation */
.rp-done-card { max-width: 460px; margin: 24px auto 0; padding: 32px 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.rp-check { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-tint); color: var(--green-dark); display: flex; align-items: center; justify-content: center; }
.rp-check svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rp-done-card h1 { margin: 0 0 20px; font-size: 20px; }
.rp-meta { margin: 0; border: 1px solid var(--line); border-radius: 8px; text-align: left; }
.rp-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.rp-meta div:first-child { border-top: 0; }
.rp-meta dt { color: var(--muted); }
.rp-meta dd { margin: 0; font-weight: 600; text-align: right; }
.rp-steps { display: flex; margin: 22px 0 0; padding: 0; list-style: none; }
.rp-steps li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rp-steps li::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.rp-steps li:first-child::before { display: none; }
.rp-steps li.on::before { background: var(--green); }
.rp-steps i { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); box-sizing: border-box; }
.rp-steps li.on { color: var(--ink); font-weight: 600; }
.rp-steps li.on i { background: var(--green); border-color: var(--green); }
.rp-done-actions { display: flex; gap: 10px; margin-top: 22px; }
.rp-done-actions > * { flex: 1; }

/* My reports */
.mr-list { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.mr { border-top: 1px solid var(--line); }
.mr:first-child { border-top: 0; }
.mr summary { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; }
.mr summary::-webkit-details-marker { display: none; }
.mr summary:hover { background: var(--soft); }
.mr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mr-ref { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mr-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-sub { font-size: 13px; color: var(--muted); }
.mr-st { flex: none; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mr-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mr-st.s-open { color: var(--muted); }
.mr-st.s-review { color: #B26B00; }
.mr-st.s-resolved { color: var(--green-dark); }
.mr-st.s-dismissed { color: var(--muted); }
[data-theme="dark"] .mr-st.s-review { color: #F5B544; }
.mr-chev { width: 18px; height: 18px; flex: none; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.mr[open] .mr-chev { transform: rotate(90deg); }
.mr-body { padding: 4px 20px 20px; }
.mr-body .rp-meta { margin-bottom: 14px; }
.mr-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.mr-note + .mr-note { margin-top: 8px; }
.mr-new { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--green-tint); color: var(--green-dark); font-size: 12px; font-weight: 600; }
.mr-note { padding: 12px 14px; border-radius: 6px; background: var(--soft); font-size: 14px; }
.mr-note strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mr-ev { display: flex; gap: 8px; margin-bottom: 12px; }
.mr-ev img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.mr-body .rp-steps { margin: 4px 0 16px; }

.not-found { padding: 64px 0; text-align: center; }
.not-found h1 { margin: 0 0 8px; font-size: 20px; }
.not-found p { margin: 0 0 20px; color: var(--muted); }
.not-found a { font-weight: 600; }

@media (max-width: 760px) {
  .rp-page .form-head h1 { font-size: 18px; }
  .rp-done-card { padding: 24px 18px; margin-top: 8px; }
}

.rp-sprout { display: flex; justify-content: center; margin-bottom: 14px; }
.rp-sprout .sprout { width: 72px; height: 72px; }
.rp-sprout .rp-check { margin: 0; }
