.elmatger-inbox-wrap,
.elmatger-admin-wrap {
    max-width: 1180px;
}

.elmatger-inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.elmatger-unread-badge {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #d63638;
    color: #fff;
    font-size: 12px;
}

.elmatger-inbox-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
}

.elmatger-conversations,
.elmatger-chat {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px;
}

.elmatger-conversation-item {
    display: block;
    padding: 12px;
    margin-bottom: 8px;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    color: inherit;
}

.elmatger-conversation-item.active,
.elmatger-conversation-item:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.elmatger-conversation-item small {
    display: block;
    opacity: .75;
    margin-top: 4px;
}

.elmatger-notification {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fafafa;
}

.elmatger-notification.unread {
    border-color: #2271b1;
}

.elmatger-messages {
    min-height: 420px;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    background: #f7f7f7;
}

.elmatger-message {
    max-width: 75%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e7e7e7;
}

.elmatger-message.mine {
    margin-right: auto;
    background: #e8f5e9;
}

.elmatger-message.theirs {
    margin-left: auto;
}

.elmatger-message-meta {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    font-size: 12px;
    opacity: .8;
    margin-bottom: 6px;
}

.elmatger-message-body p {
    margin: 0 0 8px;
}

.elmatger-message-form {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: flex-start;
}

.elmatger-message-form textarea,
.elmatger-start-form textarea {
    width: 100%;
    min-height: 80px;
}

.elmatger-form-response {
    min-width: 120px;
    font-size: 13px;
    opacity: .8;
}

@media (max-width: 768px) {
    .elmatger-inbox-grid {
        grid-template-columns: 1fr;
    }

    .elmatger-message {
        max-width: 95%;
    }
}
