.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 7px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.page-heading h1 { margin: 0; color: var(--navy-900); font-size: clamp(25px,3vw,34px); font-weight: 700; letter-spacing: .02em; }
.page-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.primary-button, .secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.primary-button { color: var(--white); background: var(--navy-900); box-shadow: 0 9px 20px rgba(8,40,82,.16); }
.primary-button:hover { background: var(--navy-700); }
.secondary-button { color: var(--navy-700); background: var(--white); border: 1px solid var(--line); }
.secondary-button:hover { border-color: #bdc7d2; background: #f8fafb; }
.secondary-button:disabled { opacity: .5; cursor: not-allowed; }

.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.summary-grid article { position: relative; overflow: hidden; min-height: 116px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.summary-grid article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--navy-700); }
.summary-grid article:nth-child(2)::before { background: var(--gold); }
.summary-grid article:nth-child(3)::before { background: var(--warning); }
.summary-grid article:nth-child(4)::before { background: var(--success); }
.summary-grid span { display: block; color: var(--muted); font-size: 12px; }
.summary-grid strong { display: block; margin-top: 12px; color: var(--navy-900); font-size: 29px; font-weight: 750; line-height: 1; }

.reports-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.panel-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.panel-toolbar h2 { margin: 0; color: var(--navy-900); font-size: 16px; }
.panel-toolbar p { margin: 5px 0 0; color: #8b95a2; font-size: 10px; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.search-field input, .select-field select { height: 40px; color: var(--ink); background: #fafbfc; border: 1px solid #d5dde5; border-radius: 8px; outline: none; }
.search-field input { width: min(290px,28vw); padding: 0 13px; }
.select-field select { min-width: 126px; padding: 0 30px 0 11px; }
.search-field input:focus, .select-field select:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,149,79,.14); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 15px 22px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #fafbfc; font-size: 10px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
td { font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.case-number { color: var(--navy-700); font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 11px; white-space: nowrap; }
.address-cell { max-width: 280px; color: #536174; line-height: 1.45; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-draft { color: #667382; background: #edf0f3; }
.status-in_progress { color: #3f668d; background: #eaf1f7; }
.status-review { color: var(--warning); background: #fbf0e1; }
.status-completed { color: var(--success); background: #e5f2ed; }
.row-action { min-height: 32px; padding: 0 11px; color: var(--navy-700); background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; font-weight: 750; }
.row-action:hover { border-color: #bdc7d2; background: #f8fafb; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; white-space: nowrap; }
.row-action { display: inline-flex; align-items: center; justify-content: center; }
.row-action-primary { color: #fff; background: var(--navy-900); border-color: var(--navy-900); }
.row-action-primary:hover { color: #fff; background: var(--navy-700); border-color: var(--navy-700); }
.empty-state { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; text-align: center; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); border-radius: 50%; font-size: 25px; }
.empty-state h3 { margin: 17px 0 7px; color: var(--navy-900); font-size: 17px; }
.empty-state p { max-width: 400px; margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.report-dialog { width: min(670px,calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; color: var(--ink); background: var(--white); border: 0; border-radius: 12px; box-shadow: 0 26px 70px rgba(6,27,56,.3); }
.report-dialog::backdrop { background: rgba(6,27,56,.58); backdrop-filter: blur(2px); }
.report-dialog form { padding: 25px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; color: var(--navy-900); font-size: 22px; }
.icon-button { width: 37px; height: 37px; color: #667382; background: #f5f7f8; border-radius: 50%; font-size: 25px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 21px 0 6px; }
.form-grid label { display: grid; gap: 7px; color: #526070; font-size: 12px; font-weight: 750; }
.form-grid label.wide { grid-column: 1/-1; }
.form-grid label b { color: #a03f3f; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; color: var(--ink); background: var(--white); border: 1px solid #d3dbe4; border-radius: 8px; outline: none; }
.form-grid input, .form-grid select { height: 44px; padding: 0 12px; }
.form-grid textarea { padding: 11px 12px; resize: vertical; line-height: 1.55; }
.form-message { min-height: 20px; margin: 7px 0 0; color: #a03f3f; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 15px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: calc(100vw - 32px); padding: 13px 17px; border-radius: 8px; color: #fff; background: var(--navy-950); box-shadow: 0 12px 30px rgba(6,27,56,.25); font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1040px) {
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: flex-start; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
}
@media (max-width: 768px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .panel-toolbar { padding: 14px 17px; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1/-1; }
  .select-field select, .toolbar-actions .secondary-button { width: 100%; }
  th, td { padding: 14px 17px; }
}
@media (max-width: 460px) {
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .summary-grid article { min-height: 105px; padding: 15px; }
  .summary-grid strong { font-size: 26px; }
  .toolbar-actions { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .report-dialog form { padding: 20px; }
}
