.email-admin { color: var(--text-primary, #20272e); }
.email-admin * { box-sizing: border-box; letter-spacing: 0; }
.email-admin h2 { font-size: 22px; margin: 0; }
.email-admin h3 { font-size: 17px; margin: 0 0 16px; }
.email-admin button, .email-preference-page button { border: 1px solid #929da9; border-radius: 5px; padding: 9px 13px; background: #fff; color: #20272e; font: inherit; cursor: pointer; }
.email-admin button:disabled { opacity: .5; cursor: default; }
.email-admin button:hover:not(:disabled) { background: #e9f3f1; }
.email-admin button:focus-visible, .email-admin input:focus-visible, .email-admin textarea:focus-visible, .email-admin select:focus-visible { outline: 2px solid #167465; outline-offset: 2px; }
.email-admin label { display: block; font-size: 13px; margin-bottom: 7px; }
.email-admin input, .email-admin textarea, .email-admin select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #929da9; border-radius: 5px; background: var(--bg-card, #fff); color: inherit; font: inherit; }
.email-admin textarea { resize: vertical; margin-bottom: 12px; }
.email-subject { margin-bottom: 16px; }
.email-toolbar, .email-metrics, .email-actions, .email-send-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.email-toolbar { justify-content: space-between; }
.email-toolbar h3 { margin: 0; }
.email-metrics { padding: 16px 0; border-bottom: 1px solid #929da9; font-size: 14px; }
.email-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 24px 0; }
.email-editor .email-toolbar { margin-bottom: 16px; }
.email-send-row { margin-top: 20px; align-items: flex-end; }
.email-send-row > div { flex: 1 1 200px; }
.email-preview iframe { display: block; width: 100%; height: 550px; border: 1px solid #929da9; background: #fff; }
.email-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.email-list { padding: 24px 0; border-top: 1px solid #929da9; }
.email-table-scroll { overflow-x: auto; }
.email-admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.email-admin td, .email-admin th { text-align: left; padding: 12px 8px; border-bottom: 1px solid #929da9; overflow-wrap: anywhere; max-width: 280px; }
.email-admin td button { margin: 3px; }
.email-notice { min-height: 24px; margin-top: 12px; }
.email-notice.email-error { color: #d55252; }
.email-preference-page { margin: 0; padding: 40px 20px; font: 16px/1.6 Arial, sans-serif; color: #20272e; background: #f4f6f8; }
.email-preference-page main { max-width: 620px; margin: 0 auto; }
.email-preference-page h1 { font-size: 24px; }
@media (max-width: 850px) { .email-workspace { grid-template-columns: minmax(0, 1fr); } .email-preview iframe { height: 450px; } }
.email-consent-choice { padding: 20px 0; margin-bottom: 24px; border-bottom: 1px solid var(--border-color, #d4dce3); }
.email-consent-choice[hidden] { display: none; }
.email-consent-choice h2 { font-size: 18px; margin: 0 0 12px; }
.email-consent-choice label { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.email-consent-choice input { margin-top: 6px; flex: 0 0 auto; }
.email-consent-choice p { margin: 10px 0; font-size: 14px; }
.email-consent-choice button { margin: 4px 8px 4px 0; max-width: 100%; white-space: normal; }
.email-rich-editor { height: auto; min-height: 300px; margin-bottom: 16px; font: inherit; }
.email-typography { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0 0 16px; padding: 12px; border: 1px solid #929da9; min-width: 0; }
.email-typography legend { font-size: 13px; padding: 0 4px; }
.email-typography label { min-width: 0; margin: 0; }
.email-typography select { display: block; margin-top: 5px; }
.email-rich-editor .ql-editor { height: auto; min-height: 300px; max-height: 650px; overflow-y: auto; overflow-wrap: anywhere; }
.email-rich-editor .ql-editor { font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; }
.email-rich-editor .ql-editor p, .email-rich-editor .ql-editor h2, .email-rich-editor .ql-editor h3, .email-rich-editor .ql-editor blockquote { margin-top: 0; margin-bottom: 16px; }
.email-editor, .email-preview { min-width: 0; }
.email-rich-editor img { display: block; max-width: 100%; height: auto; margin: 12px 0; }
.email-admin .ql-toolbar { display: flex; flex-wrap: wrap; gap: 4px; background: #f5f7f8; }
.email-admin .ql-toolbar .ql-formats { display: inline-flex; margin: 0 8px 0 0; align-items: center; }
.email-admin .ql-toolbar button { width: 30px; height: 30px; padding: 5px; border: 0; border-radius: 3px; }
.email-admin .ql-toolbar button svg { width: 20px; height: 20px; }
.email-admin .ql-toolbar .ql-picker { color: #263444; }
.email-media-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid #929da9; border-radius: 6px; padding: 24px; color: #20272e; background: white; }
.email-media-dialog::backdrop { background: #0007; }
.email-media-dialog h3 { margin: 0 0 20px; font-size: 18px; }
.email-media-dialog label { display: block; font-size: 14px; margin: 14px 0 6px; }
.email-media-dialog input { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #929da9; border-radius: 4px; }
.email-media-dialog button { padding: 9px 14px; border: 1px solid #929da9; border-radius: 4px; background: white; color: #20272e; cursor: pointer; }
.email-media-dialog button:disabled { opacity: .5; cursor: wait; }
.email-media-error { color: #aa2222; overflow-wrap: anywhere; }
.email-media-dialog .email-actions { justify-content: flex-end; margin-top: 20px; }
.email-preview .email-toolbar { margin-bottom: 16px; }
.email-admin .email-metrics span { overflow-wrap: anywhere; }
.email-targeting { min-width: 0; margin: 24px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid #929da9; }
.email-targeting > button, #emailTargetFilters { margin-top: 16px; }
.email-targeting [hidden], .email-audience-dialog [hidden] { display: none; }
.email-targeting input[type=checkbox] { width: 18px; height: 18px; }
.email-targeting .email-table-scroll { max-height: 300px; margin: 12px 0; }
.email-selected-accounts { list-style: none; padding: 0; max-height: 140px; overflow: auto; }
.email-selected-accounts li { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 6px 0; }
.email-audience-dialog { width: min(700px, calc(100% - 32px)); max-height: calc(100vh - 40px); margin: auto; overflow: auto; padding: 24px; border: 1px solid #929da9; border-radius: 6px; background: white; color: #20272e; }
.email-audience-dialog::backdrop { background: #0007; }
.email-audience-dialog h3 { font-size: 18px; margin: 0 0 12px; }
.email-audience-dialog .email-table-scroll { max-height: 350px; }
.email-audience-dialog table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.email-audience-dialog th:first-child { width: 60%; }
.email-audience-dialog td, .email-audience-dialog th { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; overflow-wrap: anywhere; }
.email-audience-dialog button { padding: 10px 14px; border: 1px solid #929da9; border-radius: 5px; background: white; cursor: pointer; }
.email-audience-dialog button:disabled { opacity: .5; cursor: default; }
.email-audience-dialog .email-actions { margin-top: 20px; justify-content: flex-end; }
.email-audience-dialog p { overflow-wrap: anywhere; }
