/* Email Manager extras */
.em-test {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.em-reason {
    color: #b91c1c;
    font-size: 0.78rem;
    margin-top: 2px;
}
.em-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}
.em-actions {
    white-space: nowrap;
}
.em-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.em-timeline li {
    padding: 6px 0 6px 18px;
    border-left: 2px solid var(--border-color, #e2e8f0);
    position: relative;
}
.em-timeline .em-dot {
    position: absolute;
    left: -6px;
    top: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
}
.em-timeline .em-dot.em-sent {
    background: #10b981;
}
.em-timeline .em-dot.em-failed {
    background: #ef4444;
}
.em-timeline .em-dot.em-pending {
    background: #f59e0b;
}
@media (max-width: 720px) {
    #page-emails .table thead {
        display: none;
    }
    #page-emails .table,
    #page-emails .table tbody,
    #page-emails .table tr,
    #page-emails .table td {
        display: block;
        width: 100%;
    }
    #page-emails .table tr.em-row {
        border: 1px solid var(--border-color, #e2e8f0);
        border-left-width: 5px;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 8px 10px;
        background: var(--bg-card, #fff);
    }
    #page-emails .table tr.em-sent {
        border-left-color: #10b981;
    }
    #page-emails .table tr.em-failed {
        border-left-color: #ef4444;
    }
    #page-emails .table tr.em-pending,
    #page-emails .table tr.em-awaiting_approval {
        border-left-color: #f59e0b;
    }
    #page-emails .table tr.em-cancelled {
        border-left-color: #94a3b8;
    }
    #page-emails .table td[data-label] {
        border: 0;
        padding: 2px 0;
    }
    #page-emails .table td[data-label='Date'] {
        font-size: 0.8rem;
        color: #64748b;
    }
}

[data-theme='dark'] .em-test,
body.dark .em-test,
body.dark-mode .em-test {
    background: #450a0a;
    color: #fecaca;
    border-color: #ef4444;
}
