.mfr-landing {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #b9d2c2;
  border-radius: 12px;
  background: #f0f8f3;
}
.mfr-landing h2 { margin: 0 0 12px; color: #075833; font-size: 24px; }
.mfr-landing label { color: #234535; font-size: 14px; font-weight: 750; }
.mfr-landing-entry {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  align-items: start;
  margin-top: 5px;
}
.mfr-landing-entry textarea { width: 100%; resize: vertical; }
.mfr-landing-entry button { min-height: 44px; padding-inline: 16px; }
.mfr-landing .mf-friendly-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mfr-landing .mf-friendly-quick button { min-height: 44px; }
#mf-printable-report-pack.mfr-standard {
  border: 1px solid #c4d6cb;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
}
.mfr-standard summary { padding: 13px 0; font-size: 15px; font-weight: 750; cursor: pointer; }
.mfr-standard-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
.mfr-standard-detail-help { margin: 0 0 8px; color: #435e4e; font-size: 13px; }
#mf-detailed-report-content { padding-bottom: 14px; }

#mf-report-assistant {
  width: min(850px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #bad2c4;
  border-radius: 15px;
  background: #fff;
  color: #172c21;
  box-shadow: 0 20px 65px #142e2240;
}
#mf-report-assistant::backdrop { background: #102b2180; }
#mf-report-assistant .mfr-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #f0f8f3;
  border-bottom: 1px solid #cadcd0;
}
#mf-report-assistant .mfr-header h2 { margin: 0; color: #075833; font-size: 21px; }
.mfr-body { padding: 18px 20px 20px; }
.mfr-body label, .mfr-dates legend { display: block; font-size: 13px; font-weight: 750; }
.mfr-body textarea, .mfr-dates input, .mfr-landing-entry textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid #a9beb0;
  border-radius: 7px;
  background: #fff;
  color: inherit;
  font: 16px/1.4 system-ui, sans-serif;
}
.mfr-landing-entry textarea { margin-top: 0; }
.mfr-body textarea { resize: vertical; min-height: 72px; }
.mfr-body :is(input,textarea,button):focus-visible { outline: 2px solid #006b35; outline-offset: 2px; }
.mfr-examples, .mfr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mfr-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 6px 10px 9px;
  margin: 12px 0 0;
  border: 1px solid #cadcd0;
  border-radius: 7px;
}
.mfr-dates[hidden] { display: none; }
.mfr-dates legend { padding: 0 4px; }
.mfr-status { margin-top: 12px; color: #435e4e; font-size: 13px; }
.mfr-result { margin-top: 12px; }
.mfr-result h3 { margin: 0; font-size: 19px; color: #075833; }
.mfr-filters, .mfr-note { margin: 5px 0 10px; color: #435e4e; font-size: 13px; }
.mfr-note { margin-top: 8px; }
.mfr-table-wrap { overflow-x: auto; border: 1px solid #cadcd0; border-radius: 7px; }
.mfr-result table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mfr-result :is(th,td) { padding: 9px 8px; border-bottom: 1px solid #dce7e0; text-align: left; }
.mfr-result thead, .mfr-result tfoot { background: #e8f4ec; }
.mfr-result tbody th { font-weight: 500; }
.mfr-result tfoot { font-weight: 750; }
.mfr-result tr:last-child :is(th,td) { border-bottom: 0; }
@media (max-width: 600px) {
  .mfr-landing { padding: 12px; }
  .mfr-landing-entry { grid-template-columns: minmax(0,1fr); }
  .mfr-landing .mf-friendly-quick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mfr-landing .mf-friendly-quick button { padding-inline: 6px; white-space: normal; }
  #mf-report-assistant { width: calc(100vw - 14px); max-height: calc(100dvh - 16px); }
  #mf-report-assistant .mfr-header, .mfr-body { padding: 10px; }
  #mf-report-assistant button { min-height: 44px; }
  .mfr-result table { font-size: 11.5px; }
  .mfr-result :is(th,td) { padding: 6px 4px; }
  .mfr-result .mfr-weekly { table-layout: fixed; }
  .mfr-weekly :is(th,td) { overflow-wrap: anywhere; }
  .mfr-weekly thead th:first-child:nth-last-child(4) { width: 29%; }
  .mfr-weekly thead th:nth-child(2):nth-last-child(3) { width: 17%; }
  .mfr-weekly thead th:nth-child(3):nth-last-child(2) { width: 22%; }
}
@media print {
  .mfr-landing, #mf-detailed-report-area > summary, .mfr-standard-actions, .mfr-standard-detail-help { display: none !important; }
  #mf-printable-report-pack.mfr-standard { display: block !important; border: 0; padding: 0; margin: 0; }
  #mf-native-print-surface .mfr-result { margin: 0; font: 10pt/1.3 Arial, sans-serif; color: #111; }
  #mf-native-print-surface .mfr-result h3 { font-size: 17pt; }
  #mf-native-print-surface .mfr-table-wrap { overflow: visible; }
  #mf-native-print-surface .mfr-result tr { break-inside: avoid; }
  #mf-native-print-surface .mfr-result :is(th,td) { padding: 5px; }
  #mf-native-print-surface .mfr-result thead { display: table-header-group; }
  #mf-native-print-surface .mfr-result tfoot { display: table-row-group; }
}
