.task-item.pinned { border-color: #bfdbfe; background: #f8fbff; }
.pin-label { margin-right: 7px; padding: 3px 7px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 10px; }
.task-side { display: grid; justify-items: end; gap: 9px; }
.task-actions { display: flex; gap: 7px; }
.task-actions button { min-height: 44px; padding: 0 12px; font-size: 11px; }
.task-actions button.active { color: var(--primary); border-color: #bfdbfe; background: var(--primary-soft); }
.panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mailflow-detail-dialog { width: min(860px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.mailflow-detail-shell { display: grid; grid-template-rows: auto minmax(0,1fr); max-height: calc(100dvh - 32px); padding: 22px; }
.mailflow-detail-shell .dialog-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mailflow-detail-shell .dialog-head h2 { max-width: 700px; overflow-wrap: anywhere; }
.mailflow-detail-shell .dialog-head button { min-width: 44px; min-height: 44px; }
.mailflow-detail-body { min-height: 220px; overflow-y: auto; padding: 18px 2px 2px; }
.detail-loading { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted); }
.detail-loading .spinner { position: static; }
.mail-message { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.mail-message + .mail-message { margin-top: 12px; }
.message-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--primary); }
.message-address { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.message-content { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.7; overflow-wrap: anywhere; }
.detail-error { padding: 48px 16px; text-align: center; color: var(--danger); }
@media(max-width:760px){.task-item{grid-template-columns:1fr}.task-side{justify-items:start}.task-actions{flex-wrap:wrap}.panel-head{align-items:stretch;flex-direction:column}.panel-actions{justify-content:stretch}.panel-actions button{flex:1}.mailflow-detail-shell{padding:16px}}
