.cq-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.cq-status{display:grid;gap:6px;min-width:125px}.cq-status>span{display:flex;align-items:center;gap:6px;font-size:10px;color:#a8a0bd}.cq-status .icon{width:13px;height:13px}.cq-status select{padding:9px 12px;border-radius:9px;border:1px solid #b298e336;background:#151925;color:#eee8fa;min-height:38px}.cq-actions .cq-mail{display:inline-flex;align-items:center;gap:7px;border:1px solid #a589e43b;background:#9470dc12;color:#d8c7fa;white-space:nowrap;border-radius:10px;font-size:12px;padding:10px 13px}.cq-mail .icon{width:16px;height:16px}.cq-cell .cq-actions{margin-bottom:10px}.cq-panel-actions{padding:16px;border:1px solid #b393df24;border-radius:14px;background:#a781e509;margin:18px 0}.cq-panel-actions p{font-size:11px!important;color:#9fa6ba;margin:12px 0 0}.cq-internal{display:flex;gap:9px;align-items:flex-start;padding:13px 15px;border:1px solid #9a89c52b;border-radius:10px;background:#9579c60a;color:#beb4d1;font-size:12px!important}.cq-internal>.icon{width:18px;height:18px;flex:none;margin-top:2px}@media(max-width:600px){.cq-actions{align-items:stretch;flex-direction:column}.cq-actions .cq-mail{justify-content:center}.cq-cell{min-width:195px}.cq-panel-actions .cq-status{width:100%}}

/* Text labels remain present so status never depends on colour alone. */
.cq-status select.cq-state-new,body #dialog .cq-status select.cq-state-new{color:#d4bdff;background:#9a71ed18;border-color:#ab84f454}
.cq-status select.cq-state-progress,body #dialog .cq-status select.cq-state-progress{color:#ffd18a;background:#e9a52a15;border-color:#efb34e66}
.cq-status select.cq-state-done,body #dialog .cq-status select.cq-state-done{color:#8fe4be;background:#36c98d13;border-color:#52d7a154}
.cq-status select option{background:#171b28;color:#edf0f7}
.cq-status select:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Compact contact list, with one consistent row of actions. */
.cq-table table{display:block;width:100%;min-width:0;table-layout:fixed}
.cq-table thead,.cq-table tbody{display:block;width:100%}
.cq-table tr{display:grid;grid-template-columns:minmax(220px,1fr) 145px 105px 280px;align-items:center;gap:22px;padding:18px 20px}
.cq-table thead tr{padding-top:12px;padding-bottom:12px}
.cq-table th,.cq-table td{display:block;padding:0!important;min-width:0;border:0!important;text-align:left;white-space:normal}
.cq-table tr>:nth-child(2){display:none}
.cq-table .cell-sub{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:7px}
.cq-table .cq-status{min-width:0;width:100%}.cq-table .cq-status>span{display:none}
.cq-table .cq-status select{width:100%;height:40px}
.cq-table .cq-cell{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.cq-table .cq-cell .cq-actions{display:contents;margin:0}
.cq-table .cq-cell button{margin:0;flex:none;width:38px;height:40px;min-height:40px;padding:8px;border-radius:10px}
.cq-table .cq-mail{height:40px;padding:9px 11px;font-size:11px;flex:none}
.cq-table tbody tr+tr{border-top:1px solid #ffffff0b}
@media(max-width:1200px){.cq-table tr{grid-template-columns:minmax(170px,1fr) 125px 85px 250px;gap:14px;padding:16px}.cq-table .cq-mail{padding:9px;font-size:10px}}
@media(max-width:800px){.cq-table thead{display:none}.cq-table tr{grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:20px}.cq-table td:first-child{grid-column:1/-1}.cq-table td:nth-child(3){max-width:180px}.cq-table td:nth-child(4){text-align:right;color:#a0aac0}.cq-table .cq-cell{grid-column:1/-1;justify-content:flex-start;border-top:1px solid #ffffff0a!important;padding-top:14px!important}.cq-table .cq-mail{font-size:12px;margin-right:auto}.cq-table .cq-cell .cq-actions{display:contents}.cq-table .cell-sub{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.6}}
.cq-table td:first-child{overflow:hidden}.cq-table td:first-child>.row,.cq-table td:first-child>.row>div{min-width:0;width:100%}.cq-table th{background:transparent!important}.cq-table td:first-child button{max-width:100%;white-space:normal;text-align:left}

.cq-table .cq-cell button.cq-mail{width:auto;padding:9px 11px}.cq-mail-summary{padding:12px 16px;border:1px solid #a991d72a;border-radius:12px;margin-bottom:20px;background:#a17bdd08}.cq-mail-summary p{margin:5px 0}#dialog form[data-form="cq-email"] textarea{min-height:200px}

.cq-thread{border-top:1px solid #ae99cc24;padding-top:18px;margin:24px 0}.cq-thread h3{display:flex;align-items:center;gap:9px}.cq-thread h3 .icon{width:18px;color:#bea0f2}.cq-thread-messages{display:grid;gap:14px;max-height:480px;overflow:auto;padding:4px}.cq-message{padding:16px 18px;border:1px solid #8f9dbc26;border-radius:15px;background:#111b28;margin-right:30px;min-width:0}.cq-message.cq-sent{margin-left:30px;margin-right:0;background:#9b73dc0d;border-color:#a27ee136}.cq-message header{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}.cq-message header strong{font-size:12px}.cq-message small{font-size:10px;color:#a8a0bb}.cq-message>b{font-size:12px;color:#c7bfd6}.cq-message p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px!important}.cq-received header strong{color:#98d9d0}.cq-sent header strong{color:#cbb1fc}@media(max-width:600px){.cq-message{margin-right:12px;padding:13px}.cq-message.cq-sent{margin-left:12px}}

.cq-table tr.cq-unread-row{background:#9170d90b;border-left:3px solid #b390f4}.cq-unread-badge{display:inline-flex;align-items:center;gap:6px;margin-top:10px;border:1px solid #b290ed66;background:#9571d520;color:#dfcaff;border-radius:8px;padding:5px 9px;font-size:11px}.cq-unread-badge .icon{width:14px;height:14px}.cq-message.cq-unread-message{border-color:#b391eaa0;box-shadow:inset 3px 0 #b391ea}

.cq-signature-preview{margin:20px 0}.cq-signature-preview span{display:block;font-size:12px;color:#b9b1ca;margin-bottom:10px}.cq-signature-preview img{display:block;width:600px;max-width:100%;height:auto;border-radius:8px}
