.report-correspondence { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid rgba(36, 211, 238, .2); border-radius: 12px; background: #07111e; }
.report-message-thread { display: flex; flex: 1; min-height: 160px; flex-direction: column; gap: 7px; overflow: auto; padding: 5px; }
.report-message-thread article { align-self: flex-start; max-width: 82%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px 11px 11px; background: #17243a; }
.report-message-thread article.admin { align-self: flex-end; border-color: rgba(36, 211,238,.3); border-radius: 11px 5px 11px 11px; background: #0d4960; }
.report-message-thread p { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-message-thread small, .report-notes > header small, .report-admin-note small { color: var(--muted); }
#report-reply-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
#report-reply-form textarea { resize: vertical; }
.report-notes { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid rgba(255, 195, 75, .22); border-radius: 12px; background: rgba(255, 195, 75, .035); }
.report-notes > header, .report-admin-note > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-note-list { display: grid; gap: 7px; }
.report-admin-note { padding: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: #111a29; }
.report-admin-note p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-admin-note > .danger { position: absolute; right: 8px; bottom: 8px; min-height: 28px; padding: 5px 8px; font-size: .68rem; }
.report-notes-empty { margin: 0; padding: 14px; }
@media (max-width: 600px) { #report-reply-form { grid-template-columns: 1fr; } }
.report-resolution-fields { display: grid; gap: 9px; margin: 0; padding: 10px; border: 1px solid rgba(255, 79, 139, .28); border-radius: 10px; }
.report-resolution-fields legend { padding: 0 5px; color: #ff9cbd; font-weight: 900; }
.report-resolution-fields small, .report-resolution-result small { color: var(--muted); }
.report-resolution-result { padding: 10px; border: 1px solid rgba(112, 225, 161, .25); border-radius: 10px; background: rgba(112, 225, 161, .05); }
.report-resolution-result p { margin: 6px 0; white-space: pre-wrap; }

/* Each column owns its scroll area; notes never share a shrinking grid row with the form. */
.report-management { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.report-management-card, .report-management .report-notes { flex: 0 0 auto; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #101a29; }
.report-management-card > header, .report-notes > header { margin-bottom: 14px; }
.report-ticket h4 { margin: 0; font-size: .95rem; }
.report-ticket textarea { font: inherit; font-size: .85rem; }
.report-ticket-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-ticket-title h3 { margin: 0; font-size: 1.1rem; }
.report-ticket > header { align-items: center; padding: 2px 0 6px; }
.report-ticket > header > small { flex-shrink: 0; }
.report-ticket .report-facts { gap: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-ticket .report-facts div { min-width: 0; padding: 0 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.report-ticket .report-facts div:first-child { padding-left: 0; }
.report-ticket .report-facts div:last-child { border-right: 0; }
.report-ticket dd { overflow-wrap: anywhere; }
.report-ticket > .report-correspondence { padding: 0; overflow: hidden; border-color: var(--line); }
.report-correspondence > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.report-correspondence > header small { color: var(--muted); }
.report-message-thread { min-height: 0; padding: 16px; gap: 12px; }
.report-message-thread article { padding: 12px 14px; }
.report-ticket #report-reply-form { flex: 0 0 auto; padding: 14px; border-top: 1px solid var(--line); background: #101a29; }
.report-reply-label { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); }
.report-ticket #report-reply-form textarea { min-height: 72px; max-height: 160px; }
.report-management .report-notes > header { display: grid; gap: 4px; }
.report-note-list { max-height: 240px; overflow-y: auto; }
.report-notes-empty { padding: 0 0 12px; color: var(--muted); font-size: .82rem; }
.report-management #report-note-form { padding-top: 12px; border-top: 1px solid var(--line); }
.report-management .report-resolution-fields { border: 0; border-left: 2px solid #58718b; padding: 0 0 0 12px; border-radius: 0; }
.report-resolution-fields[hidden] { display: none; }
.report-management form label { font-size: .8rem; }
.report-management form .admin-button { justify-self: start; }
.report-admin-note > header { flex-wrap: wrap; gap: 4px 10px; }
@media (max-width: 1200px) {
  .report-management { overflow: visible; padding: 0; }
  .report-ticket > .report-correspondence { height: 480px; }
}
@media (max-width: 700px) {
  .report-ticket .report-facts { grid-template-columns: 1fr 1fr; gap: 14px; }
  .report-ticket .report-facts div { padding: 0; border: 0; }
  .report-ticket > header { align-items: flex-start; flex-direction: column; }
  .report-correspondence > header { align-items: flex-start; flex-direction: column; gap: 4px; }
}
