[data-admin-section="emails"] { grid-column: 1 / -1; min-width: 0; }
.member-email-compose { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.member-email-compose > summary { cursor: pointer; font-size: 18px; font-weight: 700; padding: 10px 0; }
.member-email-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, 1fr); gap: 24px; margin-top: 22px; }
.member-email-editor, .member-email-audience { min-width: 0; }
.member-email-editor label { display: grid; gap: 8px; margin-bottom: 18px; font-size: 13px; }
.member-email-editor input, .member-email-editor textarea { width: 100%; min-width: 0; font: inherit; }
.member-email-editor textarea { resize: vertical; min-height: 240px; line-height: 1.65; }
.member-email-audience-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-email-audience h4 { font-size: 16px; margin: 0; }
.member-email-audience p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.member-email-audience input { width: 100%; min-width: 0; }
.member-email-audience ul { list-style: none; margin: 12px 0 0; padding: 0; max-height: 300px; overflow: auto; scrollbar-gutter: stable; }
.member-email-audience li { display: grid; gap: 4px; padding: 12px 4px 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.member-email-audience li span { color: var(--muted); }
.member-email-audience li small { color: var(--heat); }
.member-email-feedback, .member-email-preview, .member-email-receipt { grid-column: 1 / -1; min-width: 0; }
.member-email-feedback { font-size: 14px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.member-email-feedback:empty, .member-email-receipt:has([hidden]) { display: none; }
.member-email-preview { border-top: 1px solid var(--line); padding: 24px 0 0; overflow-wrap: anywhere; }
.member-email-preview h4 { margin: 0 0 24px; font-size: 18px; line-height: 1.5; }
.member-email-preview > div:first-of-type { max-width: 65ch; }
.member-email-preview a { color: var(--accent) !important; }
.member-email-form button { min-height: 44px; max-width: 100%; white-space: normal; }
.member-email-form button:disabled { opacity: .55; cursor: wait; }
.member-email-compose [hidden] { display: none !important; }
.email-log-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.email-log-heading h3 { margin: 0; }
.email-log-heading p, .email-log-count { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.email-log-heading .email-log-refresh { flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 4px; }
.email-log-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; }
.email-log-toolbar input, .email-log-toolbar select { width: 100%; min-width: 0; min-height: 44px; }
.email-log-count { min-height: 20px; margin: 14px 0; overflow-wrap: anywhere; }
.email-log-error { padding: 12px 0; color: var(--heat); font-size: 14px; line-height: 1.6; }
.email-log-row { min-width: 0; border-top: 1px solid var(--line); }
.email-log-row > summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) 180px 18px; align-items: center; gap: 18px; min-height: 84px; padding: 16px 0; list-style: none; cursor: pointer; }
.email-log-row > summary::-webkit-details-marker { display: none; }
.email-log-row > summary:focus-visible, .email-log-refresh:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.email-log-row time { color: var(--muted); font-size: 12px; line-height: 1.5; }
.email-log-subject { min-width: 0; display: grid; gap: 7px; }
.email-log-subject strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.email-log-subject small { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.email-log-status { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; line-height: 1.4; }
.email-log-status i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.email-log-status[data-category="delivered"] i { background: #6c9c79; }
.email-log-status[data-category="pending"] i { background: #c29c45; }
.email-log-status[data-category="problem"] i { background: #c16d4b; }
.email-log-chevron { font-size: 20px; color: var(--muted); }
.email-log-row[open] .email-log-chevron { transform: rotate(180deg); }
.email-log-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 8px 0 26px 168px; }
.email-log-detail dt { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.email-log-detail dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.email-log-footer { border-top: 1px solid var(--line); padding-top: 20px; }
.email-log-footer p { margin: 16px 0 0; max-width: 85ch; color: var(--muted); font-size: 12px; line-height: 1.6; }
.email-log-refresh:disabled, [data-email-older]:disabled { opacity: .5; cursor: wait; }
@media (max-width: 760px) {
  .member-email-form { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .member-email-audience ul { max-height: 220px; }
  .email-log-toolbar { grid-template-columns: minmax(0, 1fr); }
  .email-log-row > summary { grid-template-columns: minmax(0, 1fr) 18px; gap: 8px 14px; padding: 18px 0; }
  .email-log-row time { grid-column: 1; grid-row: 1; }
  .email-log-subject { grid-column: 1; grid-row: 2; }
  .email-log-status { grid-column: 1; grid-row: 3; margin-top: 4px; }
  .email-log-chevron { grid-column: 2; grid-row: 1 / span 3; }
  .email-log-detail { grid-template-columns: minmax(0, 1fr); padding-left: 0; gap: 18px; }
}
