#statistics { max-width: 1400px; margin-inline: auto; }
#statistics fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#statistics button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#statistics button svg { width: 18px; height: 18px; flex: 0 0 18px; }
#statistics .stats-actions { display: flex; gap: 8px; }
#statistics h2 { font-size: 28px; } #statistics h3 { font-size: 20px; } #statistics h4 { font-size: 17px; }
#statistics label { min-width: 0; font-size: 13px; }
#statistics input, #statistics select, #statistics textarea { width: 100%; min-width: 0; box-sizing: border-box; }
#statistics textarea { resize: vertical; }
#statistics textarea[data-field="dish"] { min-height: 64px; line-height: 1.4; font: inherit; padding: 10px; border: 1px solid #cfd6d4; border-radius: 5px; }
#statsReview { scroll-margin-top: 145px; }
#statistics details { padding: 12px 0; border-bottom: 1px solid #dce3e2; }
#statistics summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
#statistics .stats-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 12px 0; border-bottom: 1px solid #cfdad7; }
#statistics .stats-section-head h3, #statistics .stats-section-head h4 { margin: 0; }
#statsTotal { color: #286858; font-size: 13px; text-align: right; }
#statistics .stats-row { display: grid; grid-template-columns: 150px minmax(180px,1fr) 160px 100px 40px; align-items: end; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e2e8e6; }
#statistics .stats-icon { width: 40px; height: 40px; padding: 8px; flex-shrink: 0; }
#statistics .stats-day { display: grid; grid-template-columns: 110px minmax(180px,320px) minmax(0,1fr); gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid #e2e8e6; }
#statistics .stats-day output { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; margin-top: 6px; box-sizing: border-box; border: 1px solid #d4dfdc; border-radius: 4px; background: #f4f7f6; font-weight: 600; overflow-wrap: anywhere; }
#statistics .stats-day [data-people-source] { display: block; color: #63756f; font-size: 12px; margin-top: 4px; }
#statistics .stats-confirm { display: flex; align-items: center; gap: 10px; margin-block: 18px; }
#statistics .stats-confirm input { width: 19px; height: 19px; flex: 0 0 19px; }
#statistics .stats-saved-day { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #e2e8e6; font-size: 14px; }
#statistics .stats-saved-day span { flex: 1; min-width: 110px; }
#statistics .stats-saved-day strong { min-width: 95px; }
#statsOriginalContent img { display: block; max-height: 600px; max-width: 100%; object-fit: contain; }
#statistics pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#statistics .stats-error { color: #a42b32; } #statistics .stats-warning { color: #85571a; }
#statsReview { padding: 20px 0; border-bottom: 2px solid #d4dfdb; }
#statsStatus:empty, #statsWarnings:empty { display: none; }
#statsAdd { margin-top: 12px; }
@media(max-width:1050px) {
 #statistics .stats-row { grid-template-columns: 140px minmax(120px,1fr) 130px 80px 40px; gap: 8px; }
 #statistics .stats-day { grid-template-columns: 110px 1fr 1fr; }
 #statistics .stats-day .stats-confirm { grid-column: 2 / -1; margin: 0; }
}
@media(max-width:700px) {
 #statistics .section-head { align-items: stretch; flex-wrap: wrap; gap: 12px; }
 #statistics .stats-actions { justify-content: flex-end; }
 #statistics .stats-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 40px; padding: 16px 0; }
 #statistics .stats-row label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
 #statistics .stats-row label:nth-child(1) { grid-column: 1 / 3; }
 #statistics .stats-row button { grid-column: 3; grid-row: 2; }
 #statistics .stats-row label:nth-child(3) { grid-column: 1; }
 #statistics .stats-row label:nth-child(4) { grid-column: 2 / 4; }
 #statistics .stats-day { grid-template-columns: 1fr; gap: 10px; }
 #statistics .stats-day .stats-confirm { grid-column: auto; }
 #statistics .stats-section-head { flex-wrap: wrap; gap: 8px; }
 #statsTotal { text-align: left; }
}
