:root {
  color: #17222b;
  background: #f3f5f1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
header { height: 68px; padding: 0 28px; background: #124c3f; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 18px; align-items: baseline; color: white; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.brand span { color: #b9d8c9; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.logout { padding: 8px 0; border: 0; background: transparent; color: #dce9df; font: inherit; cursor: pointer; }
main { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 68px); }
.login-view { grid-template-columns: 1fr; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 36px; border: 1px solid #d9dfd9; border-radius: 10px; background: white; }
.login-card h1 { margin-bottom: 12px; font-size: 30px; letter-spacing: -.035em; }
.login-card > p:not(.eyebrow, .login-error) { margin-bottom: 26px; color: #64736c; line-height: 1.5; }
.login-card label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.login-card input { width: 100%; min-height: 46px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid #aab5af; border-radius: 7px; font: inherit; }
.login-card input:focus { border-color: #176d58; outline: 3px solid #dce9df; }
.login-card .button { width: 100%; }
.login-card .button:disabled { opacity: .6; cursor: wait; }
.login-error { margin-bottom: 14px; color: #a42b25; font-size: 14px; }
h1, h2, p { margin-top: 0; }
.eyebrow { margin-bottom: 8px; color: #438675; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.report-sidebar { display: flex; min-height: 0; flex-direction: column; border-right: 1px solid #d7ddd7; background: #fff; }
.sidebar-heading { display: flex; align-items: end; justify-content: space-between; padding: 28px 24px 20px; border-bottom: 1px solid #e5e9e4; }
.sidebar-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.sidebar-heading > span { min-width: 34px; padding: 7px 9px; border-radius: 20px; background: #dce9df; color: #245e4f; font-size: 13px; font-weight: 800; text-align: center; }
.report-list { flex: 1; overflow-y: auto; }
.date-divider { position: sticky; z-index: 1; top: 0; margin: 0; padding: 9px 24px; border-bottom: 1px solid #d9e1da; background: #eef3ef; color: #2f7160; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.report-item { display: flex; flex-direction: column; gap: 5px; padding: 18px 24px; border-bottom: 1px solid #edf0ed; color: #25322c; text-decoration: none; }
.report-item:hover { background: #f4f7f4; }
.report-item.selected { background: #e3eee6; box-shadow: inset 4px 0 #176d58; }
.report-item strong { font-size: 15px; }
.report-item > span, .report-item small { color: #66756e; }
.report-item small { font-size: 12px; }
.detail-pane { min-width: 0; overflow-y: auto; padding: 48px clamp(32px, 5vw, 76px) 80px; }
.detail-pane.is-loading { opacity: .55; transition: opacity 120ms ease; }
.report-detail { width: min(1050px, 100%); margin: 0 auto; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.detail-heading h1 { margin-bottom: 8px; font-size: clamp(36px, 5vw, 58px); line-height: 1; letter-spacing: -.045em; }
.detail-heading p:last-child { margin: 0; color: #53635b; }
.people { min-width: 190px; padding: 20px 24px; background: #dce9df; border-radius: 10px; }
.people strong, .people span { display: block; }
.people strong { font-size: 36px; }
.people span { color: #496359; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.detail-section, .notes, .photos { padding: 26px; background: white; border: 1px solid #d9dfd9; border-radius: 10px; }
.detail-section h2, .notes h2, .photos h2 { margin-bottom: 18px; font-size: 17px; }
.detail-section h2:not(:first-child) { margin-top: 26px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; padding: 10px 0; border-top: 1px solid #edf0ed; }
dt { color: #64736c; }
dd { margin: 0; font-weight: 650; }
.notes, .photos { margin-top: 18px; }
.notes p { margin: 0; white-space: pre-wrap; line-height: 1.6; }
.photos > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; }
.photos a { display: block; cursor: zoom-in; }
#photo-viewer { width: min(92vw, 1400px); max-width: none; height: 88vh; max-height: none; padding: 0; border: 0; background: transparent; overflow: visible; }
#photo-viewer::backdrop { background: rgb(8 14 11 / .88); }
#photo-viewer img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-close { position: absolute; z-index: 1; top: -18px; right: -18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: white; color: #17222b; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 3px 18px rgb(0 0 0 / .3); }
.empty { padding: 30px 24px; color: #64736c; }
.list-sentinel { padding: 18px; color: #64736c; font-size: 12px; text-align: center; }
.empty-state, .loading, .error { display: grid; height: 100%; place-content: center; text-align: center; color: #607068; }
.button { min-height: 44px; padding: 12px 18px; border: 0; border-radius: 7px; background: #124c3f; color: white; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 900px) {
  main { grid-template-columns: 300px minmax(0, 1fr); }
  .detail-pane { padding: 34px 24px 60px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  header { height: auto; min-height: 68px; }
  .brand { align-items: flex-start; flex-direction: column; gap: 2px; padding: 12px 0; }
  main { display: block; height: auto; }
  .report-sidebar { height: 48vh; border-right: 0; border-bottom: 1px solid #d7ddd7; }
  .detail-pane { min-height: 52vh; }
  .photos > div { grid-template-columns: repeat(2, 1fr); }
}
