[data-peer-inbox], [data-hq-inbox] { position: relative; min-width: 44px; min-height: 44px; white-space: nowrap; }
[data-hq-inbox][hidden] { display: none !important; }
[data-peer-count] { position: absolute; top: -5px; right: -5px; background: #dc2626; color: white; border: 2px solid white; border-radius: 20px; min-width: 22px; padding: 1px 4px; font-size: 12px; line-height: 16px; }
.peer-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d9e0ea; border-radius: 18px; color: #18212f; box-shadow: 0 20px 60px #0004; overflow: auto; }
.peer-dialog::backdrop { background: #10182899; }
body.peer-dialog-open { overflow: hidden; }
.peer-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; position: sticky; top: 0; background: white; z-index: 1; border-bottom: 1px solid #d9e0ea; }
.peer-dialog h2 { font-size: 21px; margin: 0; }
.peer-content { padding: 16px; overflow-wrap: anywhere; }
.peer-dialog button { min-height: 44px; border-radius: 9px; box-shadow: 0 2px 0 #18212f24; }
.peer-dialog button:not(.primary) { background: #fff; color: #18212f; border-color: #d9e0ea; }
.peer-dialog button:active { transform: translateY(1px); box-shadow: none; }
.peer-dialog button:disabled { opacity: .6; cursor: default; }
.peer-dialog input, .peer-dialog select { font-size: 16px; }
.peer-toolbar, .peer-row-actions, .peer-dialog footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.peer-message { padding: 16px; margin: 12px 0; border: 1px solid #d9e0ea; border-radius: 12px; }
.peer-message.peer-unread { border-left: 4px solid #2563eb; background: #eff6ff; }
.peer-message strong { font-size: 17px; }
.peer-message p, .peer-system-note { line-height: 1.6; }
.peer-message time { display: block; font-size: 13px; color: #657184; margin-bottom: 12px; }
.peer-error { background: #fff1f2; color: #b91c1c; padding: 12px 16px; margin: 10px 16px; }
.peer-dialog .peer-check { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 0; font-weight: normal; min-height: 44px; }
.peer-dialog .peer-check input { flex: 0 0 22px; width: 22px; height: 22px; min-height: 22px; margin: 0; }
.peer-preferences fieldset { min-width: 0; border: 1px solid #d9e0ea; border-radius: 12px; padding: 12px; margin: 12px 0; }
.peer-suppliers { max-height: 280px; overflow: auto; }
.peer-preferences [type=search] { width: 100%; }
.peer-dialog [hidden], [data-peer-count][hidden] { display: none !important; }
.peer-dialog footer { position: sticky; bottom: -16px; background: white; padding: 14px 0; border-top: 1px solid #d9e0ea; }
.peer-system-note { color: #657184; font-size: 14px; }
.peer-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.peer-tabs button { flex: 1; min-width: 0; }
.peer-dialog .peer-tabs [aria-pressed=true] { background: #2563eb; color: white; border-color: #2563eb; }
.peer-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; position: sticky; bottom: -16px; padding: 12px 0; background: white; border-top: 1px solid #d9e0ea; }
.peer-pagination span { font-size: 13px; color: #657184; }
@media (max-width: 480px) { .peer-pagination { bottom: -12px; } }
@media (max-width: 480px) { .peer-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); } .peer-content { padding: 12px; } .peer-dialog footer { bottom: -12px; } }

.peer-order-warning { margin: 12px 0; padding: 12px; border: 1px solid #d97706; border-left: 4px solid #d97706; border-radius: 8px; background: #fffbeb; color: #78350f; line-height: 1.65; }
.peer-message .peer-order-warning strong { font-size: 15px; }
.peer-order-warning p { margin: 8px 0 0; font-size: 14px; }
.peer-order-warning.peer-order-closed { border-color: #dc2626; background: #fff1f2; color: #991b1b; }
