/* Bounded historical summary inside the existing doctor patient modal. */
#patBox .doctor-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#patBox .doctor-history-group { min-width: 0; }
#patBox .doctor-history-group h3 { margin: 4px 0 12px; font-size: 15px; color: #315575; }
#patBox .doctor-history-card { margin-bottom: 12px; padding: 14px; border: 1px solid #dce5ee; border-radius: 10px; background: #fff; }
#patBox .doctor-history-fields, #patBox .doctor-history-sources dl { margin: 0; }
#patBox .doctor-history-field { margin-bottom: 12px; overflow-wrap: anywhere; }
#patBox .doctor-history-field:last-child { margin-bottom: 0; }
#patBox .doctor-history-field dt { margin-bottom: 4px; font-size: 12px; color: #6b7785; }
#patBox .doctor-history-field dd { margin: 0; font-size: 14px; line-height: 1.65; }
#patBox .doctor-history-muted { color: #7b8793; }
#patBox .doctor-history-diagnoses { margin: 0; padding-left: 18px; }
#patBox .doctor-history-diagnoses li + li { margin-top: 8px; }
#patBox .doctor-history-diagnoses strong { font-weight: 500; }
#patBox .doctor-history-diagnoses small { display: block; color: #6b7785; font-size: 12px; }
#patBox .doctor-history-surgeries { margin: 0; padding: 0; list-style: none; }
#patBox .doctor-history-surgeries > li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e7edf3; }
#patBox .doctor-history-surgeries strong { display: block; font-weight: 500; }
#patBox .doctor-history-surgeries small { display: block; color: #6b7785; font-size: 12px; }
#patBox .doctor-history-surgery-status { margin: 6px 0; color: #815f28; font-size: 12px; }
#patBox .doctor-history-surgery-source summary { cursor: pointer; color: #315575; font-size: 12px; }
#patBox .doctor-history-surgery-source dl { margin: 8px 0 0; }
#patBox .doctor-history-sources { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e7edf3; }
#patBox .doctor-history-sources summary { cursor: pointer; font-size: 12px; color: #315575; }
#patBox .doctor-history-sources dl { padding-top: 12px; }
#patBox .doctor-history-state { padding: 18px 12px; background: #f5f8fb; border-radius: 8px; color: #6b7785; font-size: 14px; line-height: 1.7; }
#patBox .doctor-history-error { color: #a03636; }
#patBox .doctor-history-note { margin: 12px 0 0; color: #6b7785; font-size: 12px; line-height: 1.8; }
#patBox .doctor-history-refresh { display: flex; justify-content: flex-end; margin: 12px 0; }
#patBox .doctor-history-refresh button:disabled { cursor: wait; opacity: .65; }
#patBox .doctor-history-refresh-status, #patBox .doctor-history-refresh-warning { margin: 12px 0; padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
#patBox .doctor-history-refresh-status { color: #315575; background: #eef5fb; border: 1px solid #cbdfee; }
#patBox .doctor-history-refresh-warning { color: #854b14; background: #fff5e5; border: 1px solid #dfb96e; font-weight: 500; }
@media (max-width: 640px) { #patBox .doctor-history-grid { grid-template-columns: minmax(0, 1fr); } }
