/* injury.css — Injury Reports + Accident Investigations.
   Follows the existing HR card look (hrforms.css / app.css conventions):
   same radii, same muted hints, same pill vocabulary. The one deliberate
   departure is the report button: it is a danger-weight button because
   filing must be findable at a glance by someone who is hurt or rattled. */

.inj-card { border-left: 3px solid var(--danger, #c0392b); }
.inj-policy {
  margin: 0 0 .75rem; font-size: .9rem; line-height: 1.4;
  color: var(--muted, #6b7280);
}
.inj-sub { margin: 1.25rem 0 .5rem; font-size: .95rem; }

/* ---- buttons ---- */
.inj-btn, .inj-btn-primary, .inj-btn-danger {
  border-radius: 8px; padding: .55rem .9rem; font-size: .92rem;
  cursor: pointer; border: 1px solid transparent;
}
.inj-btn { background: var(--surface-2, #f3f4f6); border-color: var(--border, #d1d5db); }
.inj-btn-primary { background: var(--accent, #2563eb); color: #fff; }
.inj-btn-danger { background: var(--danger, #c0392b); color: #fff; font-weight: 600; }
.inj-btn:hover, .inj-btn-primary:hover, .inj-btn-danger:hover { filter: brightness(1.06); }

/* ---- form ---- */
.inj-form { margin-top: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.inj-l { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; }
.inj-l input, .inj-l textarea, .inj-l select {
  font: inherit; font-weight: 400; padding: .5rem .6rem;
  border: 1px solid var(--border, #d1d5db); border-radius: 8px;
  background: var(--surface, #fff); color: inherit; width: 100%;
}
.inj-l textarea { resize: vertical; }
.inj-req { color: var(--danger, #c0392b); font-weight: 600; font-size: .78rem; }
.inj-row { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; }
.inj-row label { font-weight: 400; display: flex; align-items: center; gap: .35rem; }
.inj-check { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; line-height: 1.4; }
.inj-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }

.inj-fs {
  border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  padding: .85rem; display: flex; flex-direction: column; gap: .7rem;
}
.inj-fs legend { font-size: .85rem; font-weight: 700; padding: 0 .4rem; }

/* The refusal block is visually distinct: it is the part that gets read back
   months later in a dispute, so it should never look like ordinary fields. */
.inj-refusal, .inj-refusal-view {
  border-color: var(--danger, #c0392b);
  background: color-mix(in srgb, var(--danger, #c0392b) 5%, transparent);
}
.inj-warn { margin: 0; font-size: .85rem; color: var(--danger, #c0392b); line-height: 1.4; }

.inj-err { color: var(--danger, #c0392b); font-size: .88rem; margin: .25rem 0 0; }
.inj-ok { color: var(--ok, #15803d); font-size: .95rem; font-weight: 600; }

/* ---- pills ---- */
.inj-pill {
  display: inline-block; margin-left: .45rem; padding: .1rem .5rem;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
  vertical-align: middle; white-space: nowrap;
}
.inj-pill--declined { background: #fdecea; color: #a11c11; }
.inj-pill--requested { background: #e8f2fd; color: #1b4f9c; }
.inj-pill--filed { background: #fef6e0; color: #8a5b00; }
.inj-pill--investigating { background: #ede9fe; color: #5b21b6; }
.inj-pill--closed { background: #eef2f5; color: #4b5563; }
.inj-pill--inv { background: #e6f6ee; color: #12633f; }

/* ---- lists ---- */
.inj-head { display: flex; align-items: center; justify-content: space-between; }
.inj-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.inj-row-card {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 1px solid var(--border, #d1d5db); border-radius: 10px; padding: .7rem .85rem;
  background: var(--surface, #fff);
}
.inj-row-card:hover { background: var(--surface-2, #f9fafb); }
.inj-row-main { flex: 1; min-width: 0; }
.inj-row-title { font-weight: 600; font-size: .95rem; }
.inj-row-sub { font-size: .85rem; color: var(--muted, #6b7280); margin-top: .15rem; }
.inj-row-meta { font-size: .78rem; color: var(--muted, #9ca3af); margin-top: .15rem; }
.inj-row-arrow { color: var(--muted, #9ca3af); font-size: 1.2rem; }

.inj-mine-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .45rem 0; border-bottom: 1px solid var(--border, #eef0f2); font-size: .88rem;
}
.inj-mine-row:last-child { border-bottom: none; }

/* ---- detail ---- */
.inj-detail { margin-top: .75rem; display: flex; flex-direction: column; gap: 1rem; }
.inj-dl { margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.inj-f dt { font-size: .78rem; font-weight: 700; color: var(--muted, #6b7280); text-transform: uppercase; letter-spacing: .02em; }
.inj-f dd { margin: .1rem 0 0; font-size: .92rem; white-space: pre-wrap; }
.inj-notes { margin-top: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.inj-note { font-size: .82rem; color: var(--muted, #6b7280); }

@media (max-width: 640px) {
  .inj-row { flex-direction: column; gap: .4rem; }
  .inj-actions { flex-direction: column; }
  .inj-actions button { width: 100%; }
}
