.mail-flow [hidden] { display: none !important; }
.mail-flow-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.mail-flow-header h2 { margin: 0 0 5px; }
.mail-flow-header p { margin: 0 0 18px; color: var(--muted); }
.mail-return-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; color: var(--muted); }
.mail-return-bar[hidden] { display: none; }
.mail-badge { border-radius: 99px; background: #eef2f7; color: #344256; padding: 7px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.mail-badge.ready { background: #e7f7ef; color: #176a44; }
.mail-badge.blocked { background: #fff3df; color: #8a4b09; }
.mail-next-step { margin: 0 0 16px; padding: 12px 14px; border-radius: 9px; background: #eef6ff; border: 1px solid #c5dbf7; color: #1d3f6a; font-weight: 600; line-height: 1.45; }
.mail-next-step.ready { background: #e9f8ef; border-color: #b7e4c7; color: #176a44; }
.mail-tab-hint { margin: -8px 0 14px; }
.mail-message:empty { display: none; }
.mail-message { margin: 0 0 15px; padding: 11px 13px; border-radius: 8px; background: #f1f7ff; color: #24456c; }
.mail-message.success { background: #e9f8ef; color: #176a44; }
.mail-message.error { background: #fff0ee; color: #a02921; }
.mail-subtabs { display: flex; overflow-x: auto; gap: 5px; border-bottom: 1px solid #e3e9ef; margin: 14px 0 18px; }
.mail-subtab { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 11px 16px; font: inherit; font-weight: 700; color: #657185; cursor: pointer; white-space: nowrap; }
.mail-subtab.active { border-bottom-color: #2563eb; color: #2059b6; }
.mail-card { border: 1px solid #e1e7ee; border-radius: 11px; background: #fff; padding: 20px; margin: 0 0 16px; }
.mail-card h3 { margin: 0 0 8px; }
.mail-card p { line-height: 1.5; }
.mail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.mail-source-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border: 0; margin: 14px 0 18px; padding: 0; min-width: 0; }
.mail-source-choices legend { font-weight: 700; padding: 0; margin-bottom: 9px; }
.mail-source-option { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border: 2px solid #d4deec; border-radius: 10px; cursor: pointer; min-width: 0; }
.mail-source-option:has(input:checked) { border-color: #2563eb; background: #f3f8ff; }
.mail-source-option:focus-within { outline: 3px solid #b9d2ff; outline-offset: 2px; }
.mail-source-option input { width: auto; flex: none; margin: 4px 0 0; }
.mail-source-option strong, .mail-source-option small { display: block; }
.mail-source-option small { margin-top: 5px; color: #5c6b80; font-size: .9em; font-weight: 400; line-height: 1.4; }
@media (max-width: 700px) { .mail-source-choices { grid-template-columns: 1fr; } }
.mail-inline-note { margin: 8px 0; border-left: 3px solid #2563eb; padding: 10px 14px; background: #f4f8ff; line-height: 1.5; }
.mail-inline-note button { display: block; margin-top: 9px; }
.mail-later-link { margin-top: 16px; padding: 12px 14px; border: 1px solid #d4deec; border-radius: 8px; background: #f7f9fc; line-height: 1.5; }
.mail-later-link strong { display: block; }
.mail-later-link button { display: block; margin-top: 10px; }
.mail-media-toggle { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 500; }
.mail-media-toggle input { width: auto; margin: 0; }
.mail-file-row { display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 10px; border: 1px dashed #9db8e8; border-radius: 9px; background: #f7faff; }
.mail-file-native { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip-path: inset(50%); }
.mail-file-native:focus-visible + .mail-file-pick { outline: 3px solid #b9d2ff; outline-offset: 2px; }
.mail-file-native:disabled + .mail-file-pick { opacity: .5; pointer-events: none; }
.mail-file-pick { white-space: nowrap; }
.mail-file-thumb { width: 46px; height: 46px; object-fit: contain; border-radius: 5px; background: #fff; }
.mail-file-status { flex: 1; min-width: 0; color: #344256; font-weight: 600; overflow-wrap: anywhere; }
.mail-file-row button { flex: none; }
@media (max-width: 520px) { .mail-file-row { flex-wrap: wrap; } .mail-file-status { min-width: 100px; } }
.mail-media-upload-message:empty { display: none; }
.mail-media-upload-message { margin: 8px 0; padding: 9px 11px; border-radius: 8px; background: #f1f7ff; color: #24456c; line-height: 1.4; }
.mail-media-upload-message.success { background: #e9f8ef; color: #176a44; }
.mail-media-upload-message.error { background: #fff0ee; color: #a02921; }
.mail-word-review-actions { border-top: 1px solid #e1e7ee; margin-top: 20px; padding-top: 18px; }
.mail-word-edit-hint { margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: #eef6ff; color: #24456c; line-height: 1.45; }
.mail-word-review-actions button { margin-top: 10px; }
.mail-warning { border: 1px solid #f1cf9f; background: #fff8eb; color: #7e4708; border-radius: 8px; padding: 10px 12px; }
.mail-fixed-block { border: 1px solid #b9d8fa; background: #f3f8ff; border-radius: 8px; padding: 13px 15px; }
.mail-fixed-block p { margin: 5px 0 0; }
.mail-fieldset { border: 1px solid #e1e7ee; border-radius: 8px; margin: 16px 0; padding: 13px 15px; }
.mail-fieldset legend { font-weight: 700; padding: 0 5px; }
.mail-fieldset > label { display: block; margin: 7px 0; font-weight: 400; }
.mail-fieldset input[type=radio] { width: auto; margin-right: 7px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0 17px; }
.mail-dns-records { overflow-x: auto; margin: 10px 0; }
.mail-dns-records table { border-collapse: collapse; width: 100%; font-size: 13px; }
.mail-dns-records th,.mail-dns-records td { text-align: left; padding: 8px; border-bottom: 1px solid #e8edf2; overflow-wrap: anywhere; }
.mail-dns-status { font-weight: 700; white-space: nowrap; }
.mail-dns-status.ok { color: #176a44; }
.mail-dns-status.failed { color: #a02921; }
.mail-dns-status.pending { color: #657185; }
.mail-dns-result { margin: 10px 0 0; font-weight: 600; }
.mail-dns-result.ok { color: #176a44; }
.mail-dns-result.failed { color: #a02921; }
.mail-dns-result.pending { color: #657185; }
.mail-results-list { margin: 15px 0; }
.mail-result { border-bottom: 1px solid #e8edf2; padding: 12px 0; }
.mail-result:last-child { border-bottom: 0; }
.mail-result-title { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.mail-result small { display: block; color: var(--muted); margin: 5px 0; }
.mail-preview { border: 1px solid #e1e7ee; padding: 15px; border-radius: 8px; overflow: auto; max-height: 550px; background: #fff; }
.mail-word-section { border-top: 1px solid #e1e7ee; margin: 20px 0; padding-top: 20px; }
.mail-word-section h3 { margin: 0 0 8px; }
.mail-compose-method { border: 1px solid #d4deec; border-radius: 9px; margin: 18px 0; padding: 14px 16px; }
.mail-compose-method legend { font-weight: 700; padding: 0 6px; }
.mail-compose-method p { margin: 3px 0 11px; }
.mail-compose-method label { display: block; margin: 8px 0; cursor: pointer; }
.mail-compose-method input { width: auto; margin-right: 7px; }
.mail-compose-method .mail-media-toggle { display: flex; align-items: flex-start; gap: 8px; margin: 9px 0; }
.mail-compose-method .mail-media-toggle input { flex: none; margin: 3px 0 0; }
.mail-compose-method #mailComposeStatus { margin: 12px 0 0; }
.mail-template-bar { border: 1px solid #d4deec; border-radius: 9px; margin: 0 0 16px; padding: 14px 16px; background: #f7faff; }
.mail-template-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.mail-template-details { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; margin-top: 12px; }
.mail-template-details .mail-template-name { flex: 1 1 220px; min-width: 180px; }
.mail-template-details .mail-template-name input { width: 100%; }
.mail-template-details .mail-media-toggle { margin: 0 0 6px; }
.mail-word-steps { line-height: 1.55; margin: 10px 0 8px; padding-left: 24px; }
.mail-word-section #mailWordPreviewButton { margin: 5px 0 12px; }
.mail-word-section #mailWordPreviewButton:disabled { opacity: .55; cursor: not-allowed; }
.mail-word-draft-status { border-left: 4px solid #2563eb; background: #f3f8ff; padding: 11px 13px; margin: 12px 0; }
.mail-flow #mailReminderBannerSection { margin: 14px 0; padding: 14px; border: 1px solid #d4deec; border-radius: 8px; }
.mail-final-actions { border-top: 1px solid #e1e7ee; margin-top: 20px; padding-top: 18px; }
.mail-final-actions h3 { margin: 0 0 8px; }
.mail-final-actions #mailFinalStatus { margin: 0 0 12px; }
.mail-word-attention { border: 1px solid #e6aaa6; background: #fff3f2; color: #8f2823; border-radius: 8px; padding: 13px 15px; margin: 0 0 16px; line-height: 1.5; }
.mail-word-attention p { margin: 5px 0 0; }
.mail-word-changes { border: 1px solid #b9d8fa; background: #f3f8ff; color: #24456c; border-radius: 8px; padding: 13px 15px; margin: 0 0 16px; line-height: 1.5; }
.mail-word-changes summary { cursor: pointer; font-weight: 700; }
.mail-word-changes #mailWordPasswordWarning { margin-top: 8px; }
.mail-word-changes ul { margin: 8px 0 0; padding-left: 22px; }
.mail-word-changes li + li { margin-top: 7px; }
.mail-word-link-details { color: #52637b; margin: 0 0 14px; overflow-wrap: anywhere; }
.mail-word-link-details summary { cursor: pointer; }
.mail-word-preview-modes { display: flex; gap: 8px; margin: 14px 0 8px; }
.mail-word-preview-modes [aria-pressed="true"] { border-color: #2563eb; background: #eaf2ff; color: #2059b6; }
.mail-flow textarea { display: block; box-sizing: border-box; width: 100%; height: auto; min-height: 145px; padding: 12px 13px; line-height: 1.5; resize: vertical; }
.mail-flow #mailEmails { min-height: 90px; }
.mail-final-dialog { width: min(94vw, 590px); max-height: min(90vh, 760px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 70px #14233b55; color: #1d2940; }
.mail-final-dialog::backdrop { background: #101b2a99; }
.mail-final-dialog-content { padding: 24px; overflow-y: auto; max-height: min(90vh, 760px); box-sizing: border-box; }
.mail-final-dialog h2 { margin: 0 0 8px; font-size: 1.4rem; }
.mail-final-dialog p { line-height: 1.5; }
.mail-final-details { margin: 18px 0; border: 1px solid #dbe4ef; border-radius: 9px; overflow: hidden; }
.mail-final-details > div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 12px; padding: 11px 14px; }
.mail-final-details > div + div { border-top: 1px solid #e7ecf2; }
.mail-final-details dt { color: #56657a; font-weight: 600; }
.mail-final-details dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.mail-final-note { margin: 9px 0; color: #5b6779; font-size: .94rem; }
.mail-final-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mail-final-dialog-actions .btn { white-space: normal; text-align: center; }
@media (max-width: 520px) { .mail-final-dialog-content { padding: 18px; } .mail-final-details > div { display: block; } .mail-final-details dt { margin-bottom: 3px; } .mail-final-dialog-actions .btn { width: 100%; } }
@media (max-width: 700px) { .mail-grid { grid-template-columns: 1fr; } .mail-flow-header { display: block; } .mail-badge { display: inline-block; margin-bottom: 10px; } }
