#admin-stats-dialog { width: 760px; max-width: calc(100vw - 28px); max-height: calc(100dvh - 30px); overflow-y: auto; padding: 28px; box-sizing: border-box; border: 1px solid #e4d5ef; border-radius: 16px; background: #fff; color: #50345f; }
#admin-stats-dialog::backdrop { background: #35284055; }
#admin-stats-dialog .dialog-close { position: sticky; top: 0; float: right; margin: -8px -8px 0 12px; z-index: 1; }
#admin-stats-dialog h2 { margin: 10px 0 16px; }
#admin-stats-dialog h3 { margin: 24px 0 12px; font-size: 16px; }
#admin-stats-open { width: 100%; margin-top: 12px; padding: 12px; }
.admin-stats-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
#admin-stats-updated { margin: 0; font-size: 12px; color: #806c8c; line-height: 1.7; }
#admin-stats-refresh { padding: 8px 12px; font-size: 13px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.admin-stats-grid article { min-width: 0; padding: 16px; border: 1px solid #eadff3; border-radius: 12px; background: #faf7ff; }
.admin-stats-grid small { display: block; font-size: 12px; line-height: 1.7; color: #806c8c; }
.admin-stats-grid strong { display: block; margin-top: 9px; font-size: clamp(22px,3vw,30px); line-height: 1.35; color: #684880; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-stats-states { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.admin-stats-states > div { min-width: 0; padding: 12px; border: 1px solid #eadff3; border-radius: 10px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.admin-stats-states strong, .admin-stats-states span { display: block; }
.admin-stats-note, #stats-paid-orders { font-size: 12px; line-height: 1.8; color: #806c8c; }
#admin-stats-message { font-size: 13px; line-height: 1.7; color: #9a3e64; }
#admin-stats-message:empty { display: none; }
@media (max-width: 650px) {
  #admin-stats-dialog { padding: 22px 18px; }
  .admin-stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .admin-stats-grid article { padding: 14px; }
  .admin-stats-states { grid-template-columns: 1fr; }
}
@media (max-width: 340px) { .admin-stats-grid { grid-template-columns: 1fr; } }
