/* Phase 48 — evidence-aware date review, provenance history and clearer review queue. */
.date-review-intro{max-width:58ch;margin:0 0 11px;color:var(--muted);font-size:11px;line-height:1.55}
.date-review-list{display:grid;gap:7px;margin:0 0 12px}
.date-review-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--bg);min-width:0}
.date-review-row-main{display:grid;gap:3px;min-width:0}
.date-review-label{color:var(--muted);font-size:11px;font-weight:600}
.date-review-row-main>strong{color:var(--ink);font-size:12px;line-height:1.35;font-weight:600}
.date-review-row-main>small{color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.date-review-state{display:inline-flex;align-items:center;justify-content:center;max-width:126px;min-height:25px;padding:4px 8px;border:1px solid transparent;border-radius:6px;font-size:11px;font-weight:600;line-height:1.25;text-align:center}
.date-review-state-unchecked{background:rgba(106,119,139,.09);border-color:rgba(106,119,139,.16);color:var(--muted)}
.date-review-state-checked{background:rgba(18,132,94,.09);border-color:rgba(18,132,94,.2);color:#147a59}
.date-review-state-stale{background:rgba(180,35,24,.08);border-color:rgba(180,35,24,.18);color:#b42318}
.date-review-storage-note,.drawer-related-note{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.date-review-history{display:grid;gap:8px;margin:0 0 6px}
.date-review-history-item{display:grid;gap:5px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);min-width:0}
.date-review-history-item>div{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;flex-wrap:wrap}
.date-review-history-item strong{color:var(--ink);font-size:11px;line-height:1.4}
.date-review-history-item small{color:var(--muted);font-size:11px;line-height:1.4}
.date-review-history-item p{margin:0;color:var(--ink);font-size:11px;font-weight:600;line-height:1.45;overflow-wrap:anywhere}
.date-review-history-item>small{overflow-wrap:anywhere}
.date-review-form-intro{display:grid;gap:4px;margin:0 0 14px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.date-review-form-intro strong{color:var(--ink);font-size:12px}
.date-review-form-intro p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.date-review-fieldset{min-width:0;margin:0 0 14px;padding:11px;border:1px solid var(--line);border-radius:8px}
.date-review-fieldset:focus{outline:2px solid var(--brand);outline-offset:3px}
.date-review-fieldset legend{padding:0 5px;color:var(--ink);font-size:11px;font-weight:600}
.date-review-check-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.date-review-check-option{display:flex;align-items:flex-start;gap:9px;min-width:0;min-height:57px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);cursor:pointer}
.date-review-check-option:has(input:checked){border-color:rgba(74,91,220,.45);background:rgba(74,91,220,.055)}
.date-review-check-option input{flex:0 0 auto;width:16px;height:16px;margin:2px 0 0;accent-color:var(--brand)}
.date-review-check-option>span{display:grid;gap:3px;min-width:0}
.date-review-check-option strong{color:var(--ink);font-size:11px;line-height:1.35}
.date-review-check-option small{color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.date-review-check-option.is-unavailable{opacity:.62;cursor:not-allowed;background:var(--bg)}
.date-review-fieldset>.field-note{display:block;margin:8px 0 0}
.date-review-fieldset[aria-invalid="true"]{border-color:#b42318}
.date-review-form-intro+.date-review-fieldset{margin-top:0}
.compliance-footnote{margin:0;padding:11px 17px 13px;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.5}
.compliance-row .compliance-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.compliance-row .compliance-right .btn{white-space:nowrap}
.detail-drawer .drawer-foot{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.detail-drawer .drawer-foot .btn{min-width:0;white-space:nowrap;padding-inline:9px}
.detail-drawer .drawer-foot #drawer-action{grid-column:auto}
.workspace-body.dark-mode .date-review-row,.workspace-body.dark-mode .date-review-form-intro{background:var(--bg)}
.workspace-body.dark-mode .date-review-history-item,.workspace-body.dark-mode .date-review-check-option{background:var(--surface)}
.workspace-body.dark-mode .date-review-state-checked{background:rgba(57,181,135,.13);border-color:rgba(98,210,168,.24);color:#72d9b1}
.workspace-body.dark-mode .date-review-state-stale{background:rgba(248,113,113,.12);border-color:rgba(248,113,113,.23);color:#ff9999}
.workspace-body.dark-mode .date-review-check-option:has(input:checked){background:rgba(127,143,255,.12);border-color:rgba(127,143,255,.4)}
@media(max-width:430px){
  .date-review-row{grid-template-columns:minmax(0,1fr);align-items:start;gap:7px}
  .date-review-state{justify-self:start;max-width:100%}
  .date-review-check-options{grid-template-columns:minmax(0,1fr)}
  .detail-drawer .drawer-foot{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 13px calc(12px + env(safe-area-inset-bottom))}
  .detail-drawer .drawer-foot #drawer-action{grid-column:1/-1;grid-row:1}
  .compliance-row .compliance-right{width:100%;justify-content:flex-start;padding-left:38px}
}

/* Keep the contractual-verification caveat readable without overpowering the form. */
.workspace-body .entity-modal #entity-modal-body form[data-form-kind="lease-date-review"] .inline-info-note{
  margin:12px 0 0;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--bg);
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.workspace-body.dark-mode .entity-modal #entity-modal-body form[data-form-kind="lease-date-review"] .inline-info-note{
  border-color:var(--line-strong);
  background:var(--surface);
  color:var(--muted);
}
