.report-page { width: min(100%, 800px); margin-inline: auto; }
.report-header { margin-block: 22px 26px; }
.report-entry .report-header { margin-block: 28px 30px; }
.report-header h1, .report-admin-title h1, .report-receipt h1 { margin: 0; }
.report-header p, .report-admin-title p { margin: 8px 0 0; }
.report-back { display: inline-flex; gap: .5em; align-items: center; text-decoration: none; font-weight: 650; }
.report-back:hover { text-decoration: underline; }
.report-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-route { display: grid; grid-template-columns: 46px 1fr auto; align-items: start; gap: 14px; padding: 22px; color: inherit; text-decoration: none; transition: border-color .16s, background-color .16s; }
.report-route:hover { border-color: var(--green, #256843); background: #f2faf5; }
.report-route strong { display: block; font-size: 21px; margin-bottom: 5px; color: var(--ink, #274f46); }
.report-route .muted { display: block; }
.report-route-icon { display: grid; place-items: center; background: #e6f3ea; color: var(--green, #256843); border-radius: 12px; width: 46px; height: 46px; }
.report-route-icon svg { width: 24px; height: 24px; }
.report-arrow { color: var(--green, #256843); font-size: 22px; line-height: 1.5; }
.report-help { margin-block: 25px; }
.report-location-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.report-location-picker > label { flex: 1 1 220px; }
.report-location-picker, .report-plan-card, .report-form-section, .report-empty { padding: clamp(16px, 3vw, 26px); }
.report-plan-card { margin-top: 16px; }
.report-plan-card h2, .report-form-section h2 { margin: 0; }
.report-plan-card p, .report-plan-card form { margin-top: 12px; }
.report-plan-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px 10px; }
.report-plan-controls [aria-pressed="true"] { background-color: #e6f3ea; }
.report-plan-frame { width: 100%; aspect-ratio: 16 / 9; overflow: auto; display: grid; place-items: center; background: #eef4ee; border: 1px solid var(--line, #dce8df); border-radius: 12px; }
.report-plan-art { display: block; border: 0; position: relative; width: max-content; max-width: 100%; padding: 0; border-radius: 0; margin: 0; background: none; }
.report-plan-art img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(43vw, 400px); user-select: none; }
.report-plan-input { cursor: crosshair; }
.report-plan-input:focus-visible { outline: 3px solid var(--green, #256843); outline-offset: -3px; }
.report-plan-frame[data-zoom="2"] { display: block; }
.report-plan-frame[data-zoom="2"] .report-plan-art { width: 200%; max-width: none; }
.report-plan-frame[data-zoom="2"] img { width: 100%; max-height: none; }
.report-plan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.report-pin { fill: #17643e; stroke: white; stroke-width: 3px; }
.report-pin[hidden], .report-page [hidden] { display: none; }
.report-pin-feedback { font-size: 15px; }
.report-form, .report-form-section, .report-detail-main, .report-detail-aside { display: grid; gap: 16px; align-content: start; }
.report-form-section p { margin: 0; }
.report-form-section h3 { margin: 4px 0 0; }
.report-fields-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
[data-unit-fields] { display: grid; gap: 14px; }
.report-file input[type="file"] { padding: 10px; height: auto; }
.report-file input[type="file"]::file-selector-button { margin-right: 8px; background: #e5f1e8; color: var(--ink, #274f46); border: 0; border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.report-photo-list { padding: 0; margin: 0; list-style: none; }
.report-photo-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px; overflow-wrap: anywhere; }
.report-photo-list button { border: 1px solid var(--line, #dce8df); background: #fff; border-radius: 7px; color: var(--ink, #274f46); font: inherit; padding: 6px 10px; cursor: pointer; }
.report-error, .report-photo-error { background: #fdf0eb; color: #82291b; border: 1px solid #ecc7b9; border-radius: 8px; padding: 12px 16px; }
.report-form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.report-honeypot { position: absolute; top: 0; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.report-receipt { padding-block: clamp(12px, 4vw, 42px); }
.report-receipt-card { display: grid; gap: 14px; place-items: center; text-align: center; padding: clamp(20px, 5vw, 62px); }
.report-receipt-card h1:focus { outline: none; }
.report-receipt-card p { margin: 0; }
.report-check { display: grid; place-items: center; border-radius: 100%; width: 84px; height: 84px; color: #fff; background: var(--green, #256843); margin-bottom: 8px; }
.report-check svg { width: 60px; height: 60px; }
.report-reference { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; color: var(--ink, #274f46); padding: 10px 14px; background: #edf5ee; border-radius: 8px; }
.report-reference code { font-size: 15px; }
.report-admin { display: grid; gap: 18px; }
.report-admin-title, .report-list-tabs { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.report-list-tabs { justify-content: start; }
.report-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.report-badge { display: inline-flex; flex: none; align-items: center; border-radius: 999px; padding: 5px 10px; color: #255938; background: #e6f3ea; font-size: 15px; font-weight: 650; }
.report-badge[data-status="waiting"] { color: #744412; background: #fff1d5; }
.report-badge[data-status="closed"] { color: #455651; background: #eef2ee; }
.report-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 17px; }
.report-detail-grid p, .report-multiline, .report-id { overflow-wrap: anywhere; }
.report-multiline { white-space: pre-wrap; }
.report-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.report-photo-grid a { display: grid; align-content: start; gap: 4px; overflow-wrap: anywhere; }
.report-photo-grid img { width: 100%; height: 115px; object-fit: cover; border-radius: 8px; }
.report-timeline li { border-inline-start: 2px solid var(--line, #dce8df); padding: 2px 0 2px 10px; }
.report-timeline li span { font-size: 15px; }
.report-form-section summary { cursor: pointer; font-weight: 650; }
.report-form-section details form { margin-top: 10px; }
@media (max-width: 670px) {
  .report-entry-grid, .report-fields-two, .report-detail-grid { grid-template-columns: 1fr; }
}

/* Ticket index and detail */
.report-ticket-index, .report-ticket-detail { min-width: 0; }
.report-ticket-index .portal-heading, .report-ticket-detail .portal-heading { margin: 0; }
.report-ticket-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); }
.report-ticket-tabs a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); padding: 8px 2px 11px; border-bottom: 2px solid transparent; }
.report-ticket-tabs a[aria-current="page"] { border-bottom-color: var(--green); color: var(--ink); font-weight: 700; }
.report-ticket-tabs strong { color: var(--ink); background: var(--pale); font-size: .84em; border-radius: 99px; padding: 1px 8px; }
.report-ticket-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.report-ticket-filters label { flex: 0 1 15rem; min-width: 9.5rem; }
.report-ticket-filters label:first-child { flex-basis: 10rem; }
.report-filter-reset { padding: 8px 5px; }
.report-ticket-layout { display: grid; min-width: 0; align-items: start; }
.report-ticket-table-wrap { min-width: 0; overflow-x: auto; }
.report-ticket-table { width: 100%; }
.report-ticket-table th[scope="row"] { font-weight: 500; }
.report-ticket-table td, .report-ticket-table th { padding: 9px 11px; }
.report-ticket-subject { color: var(--ink); font-weight: 700; display: block; overflow-wrap: anywhere; }
.report-ticket-reference { display: block; margin-top: 2px; white-space: nowrap; }
.report-ticket-date time { font-variant-numeric: tabular-nums; }
.report-ticket-table .report-badge { font-size: .85em; padding: 3px 8px; }
.report-ticket-panel h2, .report-ticket-panel p { margin: 0; }
.report-ticket-facts { display: grid; grid-template-columns: minmax(5.3rem, auto) minmax(0,1fr); column-gap: 10px; row-gap: 8px; margin: 0; align-items: baseline; font-size: .96em; }
.report-ticket-facts dt { color: var(--muted); font-weight: 650; }
.report-ticket-facts dd { margin: 0; overflow-wrap: anywhere; }
.report-ticket-facts dd > span:not(.report-badge), .report-ticket-facts dd > a { display: block; }
.report-ticket-panel { display: grid; gap: 12px; }
.report-ticket-detail .report-detail-grid { grid-template-columns: minmax(0, 1fr) minmax(15rem, .54fr); }
.report-ticket-detail .report-admin-title h1 { overflow-wrap: anywhere; }
.report-ticket-detail .report-admin-title > div { min-width: 0; }
.report-ticket-actions { padding-block: 10px; border-block: 1px solid var(--line); }
.report-ticket-actions form { display: inline-flex; }
.report-ticket-actions .button, .report-ticket-filters .button { white-space: normal; }
.report-ticket-actions svg, .report-ticket-index .button svg { flex-shrink: 0; }
.report-ticket-map .report-plan-art { max-height: 100%; }
.report-ticket-map img { max-height: min(22vw, 220px); }
[data-ticket-location] [hidden] { display: none; }
[data-ticket-location] .report-pin-feedback { margin-bottom: 0; }

@media (max-width: 760px) {
  .report-ticket-detail .report-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .report-ticket-table .report-ticket-location, .report-ticket-table .report-ticket-source { display: none; }
  .report-ticket-map img { max-height: min(46vw, 250px); }
}
@media (max-width: 480px) {
  .report-ticket-table .report-ticket-date { display: none; }
  .report-ticket-filters label, .report-ticket-filters label:first-child { flex: 1 1 8rem; min-width: 7rem; }
}

.report-badge[data-status="forwarded"] { color: #254a68; background: #e6eef6; }
.report-badge[data-status="archived"] { color: #455651; background: #eef2ee; }
.report-forward-draft textarea { resize: vertical; }
.report-forward-confirmation { display: flex; flex-direction: row; align-items: start; gap: 9px; }
.report-forward-confirmation input { flex: none; margin-top: .25rem; }
