/* Outgoing mail uses compact recipient rows and a persistent set of filters. */
.outbox-page { min-width:0; }
.outbox-page>.page-heading { margin-bottom:22px; }
.outbox-page .page-heading h1 { font-size:28px; letter-spacing:-.9px; }
.outbox-page .page-heading p { font-size:12px; line-height:1.7; }
.outbox-page .outbox-list { padding:0; border-radius:12px; overflow:hidden; box-shadow:0 5px 24px #30233006; }
.outbox-page .outbox-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:16px 22px; border-bottom:1px solid var(--line); }
.outbox-page .outbox-tabs { display:flex; align-items:center; flex-wrap:nowrap; gap:6px; min-width:0; max-width:100%; margin:0; overflow-x:auto; scrollbar-width:thin; }
.outbox-page .outbox-tabs .filter { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex-shrink:0; min-height:36px; padding:7px 10px; border:1px solid transparent; border-radius:7px; background:transparent; color:#a18a9a; font-size:11px; white-space:nowrap; }
.outbox-page .outbox-tabs .filter:hover { background:#faf5ed; color:#9c765b; }
.outbox-page .outbox-tabs .filter.active { border-color:#e8c8b3; background:#fcf0e4; color:#ad5434; font-weight:550; }
.outbox-page .outbox-tabs .filter:focus-visible { outline:2px solid #aa8db5; outline-offset:-2px; }
.outbox-page .outbox-tabs .filter>span { display:inline-grid; place-items:center; min-width:21px; min-height:20px; margin:0; padding:2px 5px; border-radius:5px; background:#f3eee8; color:#aa97a3; font-size:9px; font-weight:500; opacity:1; line-height:1.4; }
.outbox-page .outbox-tabs .filter.active>span { background:#f0d7c4; color:#b06442; }
.outbox-page .outbox-search { display:flex; align-items:center; gap:8px; flex:0 1 330px; width:330px; min-width:235px; min-height:38px; padding:9px 11px; border:1px solid #e2d8cd; border-radius:7px; background:#fffdf9; color:#a390a0; }
.outbox-page .outbox-search>.icon { flex-shrink:0; width:14px; height:14px; }
.outbox-page .outbox-search>input { width:100%; min-width:0; padding:0; border:0; outline:0; background:transparent; color:#786476; font:inherit; font-size:11px; }
.outbox-page .outbox-search:focus-within { border-color:#ad94b8; box-shadow:0 0 0 3px #9a7ea810; }
.outbox-page .page-filters { margin:0; padding:16px 22px 19px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:#fcfaf6; }
.outbox-page .outbox-filter-row { display:flex; align-items:flex-end; flex-wrap:wrap; gap:13px; margin:0; }
.outbox-filter { flex:0 1 245px; min-width:160px; }
.outbox-filter:nth-child(3) { flex-basis:280px; }
.outbox-filter>label { display:block; margin-bottom:6px; color:#a18b9c; font-size:10px; font-weight:500; }
.outbox-page .outbox-filter>select { width:100%; max-width:none; min-width:0; min-height:39px; padding:9px 29px 9px 10px; border:1px solid #e4d9cc; border-radius:7px; background:#fffefa; color:#806a7c; font-size:11px; text-overflow:ellipsis; }
.outbox-page .outbox-filter>select:focus { outline:none; border-color:#ad94b8; box-shadow:0 0 0 3px #9a7ea810; }
.outbox-page .outbox-filter-row>.btn { min-height:39px; padding:9px 6px; font-size:10px; }
.outbox-page .outbox-table { max-height:clamp(360px,calc(100dvh - 365px),920px); margin:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.outbox-page .outbox-table>.data-table { width:100%; min-width:1030px; }
.outbox-recipient-col { width:25%; }
.outbox-stage-col { width:17%; }
.outbox-campaign-col { width:21%; }
.outbox-sender-col { width:25%; }
.outbox-actions-col { width:1%; }
.outbox-page .outbox-table thead { position:sticky; top:0; z-index:1; background:#f7f3ed; }
.outbox-page .outbox-table th { padding:13px 21px; border-bottom:1px solid var(--line); color:#a793a1; font-size:10px; font-weight:550; letter-spacing:.2px; white-space:nowrap; }
.outbox-page .outbox-table td { min-width:0; max-width:none; padding:17px 21px; border-bottom:1px solid #eee6dd; vertical-align:middle; font-size:11px; }
.outbox-page .outbox-table tbody tr:hover { background:#fdfaf5; }
.outbox-page .outbox-table tbody tr:last-child td { border-bottom:0; }
.outbox-contact { display:flex; align-items:center; gap:11px; min-width:210px; }
.outbox-contact-avatar { display:grid; place-items:center; flex:0 0 35px; height:35px; border:1px solid #eadbca; border-radius:10px; background:#f7ecdf; color:#af7e54; font-size:10px; font-weight:600; }
.outbox-contact>div { min-width:0; }
.outbox-contact-name { display:block; padding:0; border:0; background:none; color:#695768; font:inherit; font-size:12px; font-weight:600; line-height:1.6; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.outbox-contact-name:hover { color:#b25232; }
.outbox-contact-name:focus-visible { outline:2px solid #aa8db5; outline-offset:3px; border-radius:2px; }
.outbox-contact-email { display:block; margin-top:3px; color:#ac95a4; font-size:10px; line-height:1.7; overflow-wrap:anywhere; }
.outbox-stage { min-width:145px; }
.outbox-stage>.chip { max-width:100%; padding:5px 7px; border-radius:5px; font-size:9px; line-height:1.4; white-space:normal; }
.outbox-page .outbox-reason { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; max-width:265px; overflow:hidden; margin:7px 0 0; color:#a38a99; font-size:10px; line-height:1.7; }
.outbox-campaign-name { min-width:145px; color:#7d687a; font-size:11px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.outbox-origin { display:flex; align-items:center; gap:5px; margin-top:5px; color:#b09ba8; font-size:10px; line-height:1.6; }
.outbox-origin>.icon { flex-shrink:0; width:11px; height:11px; color:#b5a1b8; }
.outbox-job-name { display:block; margin-top:4px; color:#ab93a3; font-size:9px; line-height:1.6; }
.outbox-sender-address { min-width:165px; color:#947c8e; font-size:10px; line-height:1.7; overflow-wrap:anywhere; }
.outbox-timing { display:flex; align-items:flex-start; gap:5px; margin-top:5px; color:#b29da9; font-size:9px; line-height:1.7; }
.outbox-timing>.icon { flex-shrink:0; width:11px; height:11px; margin-top:2px; }
.outbox-timing.is-scheduled { color:#967ba6; }
.outbox-provider { display:inline-block; margin-top:6px; padding:2px 5px; border:1px solid #e6ddeb; border-radius:4px; background:#f5eff8; color:#a18aaf; font-size:9px; line-height:1.5; }
.outbox-page .outbox-row-actions { display:flex; align-items:center; justify-content:flex-end; flex-direction:row; flex-wrap:wrap; gap:6px; width:max-content; min-width:0; max-width:230px; }
.outbox-page .outbox-row-actions>.btn { min-height:32px; padding:7px 9px; border-radius:6px; font-size:9px; white-space:nowrap; }
.outbox-page .outbox-row-actions>.outbox-view-button { gap:8px; border-color:#e4d7c9; background:#fffdf9; color:#8d7285; }
.outbox-view-button>.icon { width:11px; height:11px; color:#b48e74; }
.outbox-page .outbox-row-actions>.btn.ghost { color:#b1846c; }
.outbox-list-footer.section-foot { display:flex; align-items:center; justify-content:space-between; gap:15px; flex-wrap:wrap; margin:0; padding:16px 22px; border-top:1px solid var(--line); background:var(--card); }
.outbox-list-footer>span:first-child { color:#ab95a4; font-size:10px; }
.outbox-list-footer .btn { min-height:31px; padding:7px 10px; border-radius:6px; font-size:10px; }
.outbox-list-footer .btn>.icon { width:12px; height:12px; }
.outbox-empty { padding:35px 22px; }
@media(max-width:1150px) {
 .outbox-page .outbox-toolbar { gap:13px; }
 .outbox-page .outbox-tabs { flex:1; }
 .outbox-page .outbox-search { flex:0 1 290px; }
 .outbox-page .outbox-tabs .filter { padding:7px 8px; gap:5px; font-size:10px; }
 .outbox-page .outbox-table th,.outbox-page .outbox-table td { padding-inline:17px; }
}
@media(max-width:950px) {
 .outbox-page .outbox-toolbar { align-items:stretch; }
 .outbox-page .outbox-tabs { flex-basis:100%; width:100%; }
 .outbox-page .outbox-search { flex-basis:100%; width:100%; min-width:0; }
 .outbox-filter,.outbox-filter:nth-child(3) { flex:1 1 170px; }
 .outbox-page .outbox-table { max-height:650px; }
}
@media(max-width:600px) {
 .outbox-page .page-heading h1 { font-size:25px; }
 .outbox-page .page-heading p { font-size:11px; }
 .outbox-page .outbox-toolbar { padding:14px; gap:12px; }
 .outbox-page .outbox-tabs { gap:4px; padding-bottom:4px; }
 .outbox-page .outbox-tabs .filter { padding:6px 8px; }
 .outbox-page .page-filters { padding:14px; }
 .outbox-page .outbox-filter-row { gap:11px; }
 .outbox-filter { flex-basis:calc(50% - 6px); min-width:120px; }
 .outbox-filter:nth-child(3) { flex-basis:100%; }
 .outbox-page .outbox-filter-row>.btn { min-height:29px; padding-block:5px; }
 .outbox-page .outbox-table { max-height:580px; }
 .outbox-page .outbox-table>.data-table { min-width:990px; }
 .outbox-list-footer.section-foot { padding:14px; gap:12px; }
 .outbox-list-footer>span:first-child { font-size:9px; }
 .outbox-list-footer .btn { padding:6px 8px; font-size:9px; }
}

/* A saved email reads as a message, with delivery information alongside it. */
.modal:has(.outbox-detail-body) { display:flex; flex-direction:column; width:1100px; max-width:calc(100vw - 48px); height:min(880px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); overflow:hidden; border:1px solid #ffffffa0; border-radius:16px; box-shadow:0 24px 90px #21182d36; }
.modal:has(.outbox-detail-body)>.modal-header { flex-shrink:0; align-items:flex-start; padding:22px 26px; background:var(--card); }
.modal:has(.outbox-detail-body) .modal-header h2 { font-size:22px; font-weight:650; letter-spacing:-.6px; line-height:1.4; }
.modal:has(.outbox-detail-body) .modal-header p:empty { display:none; }
.modal:has(.outbox-detail-body) .modal-header .icon-btn { flex-shrink:0; width:32px; height:32px; border-radius:8px; background:#f7f3ee; }
.outbox-detail-body.modal-body { display:flex; flex-direction:column; flex:1; min-height:0; gap:20px; padding:21px 24px 24px; overflow:hidden; background:#faf8f4; }
.outbox-detail-contact { display:flex; align-items:center; flex-shrink:0; gap:12px; min-width:0; }
.outbox-detail-contact>.outbox-contact-avatar { flex-basis:42px; height:42px; border-radius:12px; font-size:11px; }
.outbox-detail-contact>div { flex:1; min-width:0; }
.outbox-detail-contact strong { display:block; font-size:15px; font-weight:600; line-height:1.6; overflow-wrap:anywhere; }
.outbox-detail-contact>div>span { display:block; margin-top:2px; font-size:10px; color:#ac96a5; }
.outbox-detail-contact>.chip { flex-shrink:0; padding:5px 8px; border-radius:6px; font-size:10px; }
.outbox-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:18px; flex:1; min-height:0; }
.outbox-detail-main { min-width:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.outbox-email-preview { padding:23px 25px; border:1px solid #e5dcd1; border-radius:11px; background:var(--card); }
.outbox-copy-label { display:flex; align-items:center; gap:7px; margin-bottom:21px; color:#a38b9d; font-size:10px; font-weight:550; }
.outbox-copy-label>.icon { width:14px; height:14px; color:#b49bb8; }
.outbox-envelope { display:flex; flex-direction:column; gap:11px; margin:0 0 22px; padding-bottom:21px; border-bottom:1px solid #eee5db; }
.outbox-envelope>div { display:grid; grid-template-columns:38px minmax(0,1fr); gap:12px; font-size:11px; line-height:1.7; }
.outbox-envelope dt { color:#b09aa8; }
.outbox-envelope dd { margin:0; color:#826a7c; overflow-wrap:anywhere; }
.outbox-email-subject>span { display:block; color:#aa92a2; font-size:10px; }
.outbox-email-subject>h3 { margin:8px 0 0; color:#604e60; font-size:20px; font-weight:550; letter-spacing:-.4px; line-height:1.5; overflow-wrap:anywhere; }
.outbox-detail-body .outbox-copy { margin:24px 0 0; color:#665365; font-family:inherit; font-size:14px; font-weight:400; line-height:1.95; white-space:pre-wrap; overflow-wrap:anywhere; }
.outbox-detail-sidebar { min-width:0; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.outbox-delivery-card,.outbox-message-info { padding:17px; border:1px solid #e5dcd1; border-radius:10px; background:var(--card); }
.outbox-detail-sidebar h3 { display:flex; align-items:center; gap:7px; margin:0 0 15px; color:#837082; font-size:11px; font-weight:600; }
.outbox-detail-sidebar h3>.icon { width:14px; height:14px; color:#b098b9; }
.outbox-delivery-mode { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border:1px solid #e6ddec; border-radius:6px; background:#f5eff8; color:#9b7eac; font-size:10px; font-weight:550; line-height:1.6; }
.outbox-delivery-mode>.icon { width:12px; height:12px; flex-shrink:0; }
.outbox-delivery-card>p { margin:10px 0 0; color:#af98a7; font-size:10px; line-height:1.8; }
.outbox-delivery-state { margin-top:14px; padding-top:13px; border-top:1px solid #eee6dc; color:#93798c; font-size:11px; line-height:1.8; overflow-wrap:anywhere; }
.outbox-delivery-card>.outbox-retry-blocked { display:flex; align-items:flex-start; gap:6px; margin-top:12px; padding:10px; border:1px solid #eed2bf; border-radius:6px; background:#fff3e8; color:#b07f5c; }
.outbox-retry-blocked>.icon { flex-shrink:0; width:12px; height:12px; margin-top:3px; }
.outbox-message-info { margin-top:13px; }
.outbox-message-info dl { margin:0; }
.outbox-message-info dl>div+div { margin-top:14px; padding-top:12px; border-top:1px solid #eee6dc; }
.outbox-message-info dt { color:#af98a7; font-size:9px; line-height:1.6; }
.outbox-message-info dd { margin:5px 0 0; color:#8b7385; font-size:11px; line-height:1.8; overflow-wrap:anywhere; }
.outbox-delivery-history { margin-top:15px; border:1px solid #e5dcd1; border-radius:10px; background:var(--card); overflow:hidden; }
.outbox-delivery-history>summary { display:flex; align-items:center; gap:8px; padding:15px 18px; color:#967e92; font-size:11px; font-weight:550; list-style:none; cursor:pointer; }
.outbox-delivery-history>summary::-webkit-details-marker { display:none; }
.outbox-delivery-history>summary:focus-visible { outline:2px solid #ad91b8; outline-offset:-3px; border-radius:9px; }
.outbox-delivery-history>summary>.icon { flex-shrink:0; width:14px; height:14px; color:#b39bb9; }
.outbox-delivery-history>summary>.icon:last-child { width:12px; height:12px; margin-left:auto; transition:transform .15s; }
.outbox-delivery-history[open]>summary>.icon:last-child { transform:rotate(180deg); }
.outbox-event-count { display:grid; place-items:center; min-width:20px; min-height:20px; padding:2px 5px; border-radius:5px; background:#f3ede6; color:#aa92a2; font-size:9px; font-weight:400; }
.outbox-event-list { margin:0; padding:2px 18px 16px; list-style:none; }
.outbox-event-list>li { position:relative; display:flex; gap:11px; padding:0 0 20px; }
.outbox-event-list>li:last-child { padding-bottom:0; }
.outbox-event-list>li:not(:last-child)::before { position:absolute; content:""; left:12px; top:24px; bottom:0; width:1px; background:#e8dfd5; }
.outbox-event-dot { display:grid; place-items:center; flex:0 0 25px; height:25px; border:1px solid #e5daeb; border-radius:50%; background:#f4eef8; color:#aa8cb8; }
.outbox-event-dot>.icon { width:12px; height:12px; }
.outbox-event-list>li>div { flex:1; min-width:0; padding-top:3px; }
.outbox-event-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.outbox-event-heading strong { color:#90758a; font-size:11px; font-weight:550; line-height:1.6; overflow-wrap:anywhere; }
.outbox-event-heading>span { color:#b09aa9; font-size:9px; line-height:1.8; text-align:right; }
.outbox-event-list p { margin:7px 0 0; color:#a38a9a; font-size:11px; line-height:1.8; overflow-wrap:anywhere; }
.outbox-event-list small { display:block; margin-top:7px; color:#baa6b2; font-size:9px; line-height:1.7; }
.outbox-activity-empty { display:flex; align-items:flex-start; gap:9px; padding:0 18px 17px; }
.outbox-activity-empty>.icon { flex-shrink:0; width:14px; height:14px; margin-top:3px; color:#bdabbe; }
.outbox-activity-empty>p { margin:0; color:#ad96a6; font-size:10px; line-height:1.9; }
.modal:has(.outbox-detail-body)>.outbox-detail-actions { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-shrink:0; margin:0; padding:16px 24px; background:var(--card); }
.outbox-detail-actions>.btn { flex-shrink:0; }
.outbox-detail-buttons { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; min-width:0; }
.outbox-detail-actions .btn { min-height:36px; padding:9px 12px; border-radius:7px; font-size:10px; }
.outbox-detail-actions .btn>.icon { width:12px; height:12px; }
@media(max-width:900px) {
 .outbox-detail-body.modal-body { display:block; overflow-y:auto; }
 .outbox-detail-layout { display:flex; flex-direction:column; margin-top:19px; }
 .outbox-detail-main { overflow:visible; }
 .outbox-detail-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:14px; margin-top:16px; overflow:visible; }
 .outbox-message-info { margin:0; }
}
@media(max-width:600px) {
 .modal:has(.outbox-detail-body) { max-width:calc(100vw - 24px); height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); border-radius:12px; }
 .modal:has(.outbox-detail-body)>.modal-header { padding:18px 20px; }
 .modal:has(.outbox-detail-body) .modal-header h2 { font-size:20px; }
 .outbox-detail-body.modal-body { padding:18px 16px; }
 .outbox-detail-contact { gap:9px; }
 .outbox-detail-contact>.outbox-contact-avatar { flex-basis:34px; height:34px; border-radius:10px; font-size:9px; }
 .outbox-detail-contact strong { font-size:13px; }
 .outbox-detail-contact>.chip { padding:4px 6px; font-size:9px; }
 .outbox-email-preview { padding:19px; }
 .outbox-email-subject>h3 { font-size:18px; }
 .outbox-detail-body .outbox-copy { margin-top:20px; font-size:12px; line-height:1.95; }
 .outbox-detail-sidebar { grid-template-columns:1fr; }
 .modal:has(.outbox-detail-body)>.outbox-detail-actions { align-items:flex-start; padding:14px 16px; gap:9px; }
 .outbox-detail-buttons { gap:6px; }
 .outbox-detail-actions .btn { min-height:34px; padding:8px 10px; font-size:9px; }
 .outbox-event-heading { flex-wrap:wrap; gap:4px; }
}
