.mw-navbtn-notify,
.mw-mobile-message-link {
    position: relative;
}

.mw-navbtn-badge,
.mw-mobile-pill,
.mw-msg-pill {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.mw-navbtn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
}

.mw-mobile-message-link {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 18px;
    color: #fff;
    background: rgba(255,255,255,.05);
    text-decoration: none;
    margin: 12px 0 0;
}

.mw-msg-page {
    --msg-panel: rgba(10, 18, 36, .92);
    --msg-panel-2: rgba(15, 24, 45, .96);
    --msg-surface: rgba(255, 255, 255, .04);
    --msg-border: rgba(255, 255, 255, .09);
    --msg-border-strong: rgba(255, 255, 255, .14);
    --msg-text: #f8fbff;
    --msg-muted: #aebad1;
    --msg-soft: #7e8aa3;
    --msg-red: #dc2626;
    --msg-red-2: #b91c1c;
    --msg-incoming: #121d34;
    --msg-track: rgba(255, 255, 255, .03);
    position: relative;
}

    .mw-msg-page .container-mw {
        position: relative;
        z-index: 1;
    }

.mw-msg-shell {
    padding: 26px 0 72px;
}

.mw-msg-page .mw-seller-btn,
.mw-msg-page .mw-msg-thread,
.mw-msg-page .mw-msg-shortcuts a,
.mw-msg-page .mw-msg-refresh {
    transition: none;
}

    .mw-msg-page .mw-seller-btn:hover,
    .mw-msg-page .mw-msg-shortcuts a:hover,
    .mw-msg-page .mw-msg-thread:hover {
        transform: none;
    }

.mw-msg-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 18px;
    align-items: end;
    margin-bottom: 20px;
}

.mw-msg-hero-copy {
    min-width: 0;
}

.mw-msg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--msg-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.mw-msg-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 3.4vw, 3.55rem);
    line-height: 1.02;
    margin: 0 0 12px;
    font-weight: 900;
    letter-spacing: -.03em;
    max-width: 780px;
}

.mw-msg-hero p {
    color: rgba(255,255,255,.76);
    font-size: 1rem;
    max-width: 760px;
    margin: 0;
    line-height: 1.72;
}

.mw-msg-hero-actions-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 16px;
}

.mw-msg-hero-actions-title {
    color: var(--msg-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 12px;
}

.mw-msg-hero-actions {
    display: grid;
    gap: 10px;
}

.mw-msg-page .mw-seller-btn {
    min-height: 48px;
    border-radius: 16px;
    box-shadow: none;
}

    .mw-msg-page .mw-seller-btn.primary {
        background: linear-gradient(135deg, var(--msg-red), var(--msg-red-2));
    }

    .mw-msg-page .mw-seller-btn.ghost {
        color: #f2f5fb;
        border: 1px solid rgba(255,255,255,.10);
        background: rgba(255,255,255,.05);
    }

.mw-msg-gate {
    background: var(--msg-panel);
    border: 1px solid var(--msg-border);
    border-radius: 24px;
    padding: 34px 24px;
    text-align: center;
    margin-bottom: 20px;
}

    .mw-msg-gate h3 {
        color: var(--msg-text);
        margin: 0 0 10px;
    }

    .mw-msg-gate p {
        color: var(--msg-muted);
        margin: 0 0 16px;
    }

.mw-msg-gate-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: rgba(220, 38, 38, .12);
    color: #ff9c9c;
    font-size: 24px;
}

.mw-msg-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.mw-msg-summary-card {
    background: var(--msg-panel);
    border: 1px solid var(--msg-border);
    border-radius: 22px;
    padding: 18px 20px;
}

    .mw-msg-summary-card small {
        display: block;
        color: var(--msg-soft);
        font-size: 11px;
        letter-spacing: .12em;
        text-transform: uppercase;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .mw-msg-summary-card strong {
        display: block;
        font-size: clamp(2rem, 3vw, 2.35rem);
        line-height: 1;
        color: var(--msg-text);
        margin-bottom: 10px;
        font-weight: 900;
    }

    .mw-msg-summary-card span {
        color: var(--msg-muted);
        font-size: .96rem;
    }

.mw-msg-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr) 290px;
    grid-template-areas: "sidebar main side";
    gap: 16px;
    align-items: start;
}

.mw-msg-sidebar {
    grid-area: sidebar;
}

.mw-msg-main {
    grid-area: main;
    min-width: 0;
}

.mw-msg-sidepanels {
    grid-area: side;
    display: grid;
    gap: 16px;
    align-content: start;
}

.mw-msg-panel {
    background: var(--msg-panel);
    border: 1px solid var(--msg-border);
    border-radius: 24px;
    padding: 18px;
}

.mw-msg-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

    .mw-msg-panel-head h2 {
        margin: 6px 0 0;
        font-size: 1.4rem;
        color: var(--msg-text);
        font-weight: 900;
        letter-spacing: -.02em;
    }

    .mw-msg-panel-head.compact h2 {
        font-size: 1.14rem;
    }

.mw-msg-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(220, 38, 38, .12);
    color: #ff8f8f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mw-msg-refresh {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    color: var(--msg-text);
}

.mw-msg-search {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--msg-border-strong);
    border-radius: 16px;
    padding: 0 14px;
    margin-bottom: 14px;
    background: rgba(255,255,255,.04);
}

    .mw-msg-search i {
        color: var(--msg-soft);
    }

    .mw-msg-search input {
        width: 100%;
        border: 0;
        background: transparent;
        height: 46px;
        outline: none;
        color: var(--msg-text);
    }

        .mw-msg-search input::placeholder {
            color: #8fa0bd;
        }

.mw-msg-thread-list,
.mw-msg-leads {
    display: grid;
    gap: 10px;
    max-height: 690px;
    overflow: auto;
    padding-right: 4px;
}

    .mw-msg-thread-list::-webkit-scrollbar,
    .mw-msg-leads::-webkit-scrollbar,
    .mw-msg-messages::-webkit-scrollbar {
        width: 8px;
    }

    .mw-msg-thread-list::-webkit-scrollbar-thumb,
    .mw-msg-leads::-webkit-scrollbar-thumb,
    .mw-msg-messages::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.10);
        border-radius: 999px;
    }

.mw-msg-thread {
    width: 100%;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    text-align: left;
    align-items: center;
    cursor: pointer;
}

    .mw-msg-thread.is-active {
        border-color: rgba(220, 38, 38, .40);
        background: rgba(220, 38, 38, .10);
    }

.mw-msg-thread-photo,
.mw-msg-conversation-thumb {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    flex: 0 0 62px;
}

    .mw-msg-thread-photo.empty {
        width: 100%;
        height: 100%;
    }

    .mw-msg-thread-photo img,
    .mw-msg-conversation-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mw-msg-thread-copy {
    min-width: 0;
}

.mw-msg-thread-top,
.mw-msg-lead-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

    .mw-msg-thread-top strong,
    .mw-msg-lead-head strong {
        font-size: .96rem;
        color: var(--msg-text);
        font-weight: 800;
        line-height: 1.3;
    }

    .mw-msg-thread-top span,
    .mw-msg-lead-head span,
    .mw-msg-thread-preview,
    .mw-msg-thread-vehicle,
    .mw-msg-lead-meta,
    .mw-msg-lead-contact,
    .mw-msg-conversation-copy p,
    .mw-msg-empty-inline,
    .mw-msg-empty-hero p,
    .mw-msg-bubble-time,
    .mw-msg-open-vehicle {
        color: var(--msg-muted);
        font-size: .9rem;
    }

.mw-msg-thread-preview,
.mw-msg-thread-vehicle {
    line-height: 1.45;
}

.mw-msg-thread-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mw-msg-thread-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, .18);
    color: #ffb5b5;
    font-size: 12px;
    font-weight: 800;
}

.mw-msg-conversation-panel {
    min-height: 690px;
    display: flex;
    flex-direction: column;
}

.mw-msg-conversation-head {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.mw-msg-empty-hero {
    min-height: 170px;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 18px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--msg-muted);
    padding: 24px;
}

    .mw-msg-empty-hero h3 {
        margin: 0 0 8px;
        color: var(--msg-text);
        font-size: 1.18rem;
    }

    .mw-msg-empty-hero i {
        font-size: 26px;
        color: #ff8f8f;
        margin-bottom: 12px;
    }

.mw-msg-conversation-top {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.mw-msg-conversation-copy {
    flex: 1;
    min-width: 220px;
}

    .mw-msg-conversation-copy h2 {
        margin: 8px 0 6px;
        font-size: 1.45rem;
        font-weight: 900;
        color: var(--msg-text);
        letter-spacing: -.02em;
    }

.mw-msg-open-vehicle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.10);
}

.mw-msg-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 2px 14px;
    overflow: auto;
    min-height: 340px;
}

.mw-msg-bubble {
    max-width: min(82%, 600px);
    padding: 13px 15px;
    border-radius: 18px 18px 18px 6px;
    background: var(--msg-incoming);
    color: var(--msg-text);
    border: 1px solid rgba(255,255,255,.06);
}

    .mw-msg-bubble.mine {
        margin-left: auto;
        background: linear-gradient(135deg, var(--msg-red), var(--msg-red-2));
        color: #fff;
        border-radius: 18px 18px 6px 18px;
        border-color: transparent;
    }

.mw-msg-bubble-name {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
    opacity: .78;
    margin-bottom: 6px;
    color: inherit;
}

.mw-msg-bubble-text {
    white-space: pre-wrap;
    line-height: 1.6;
}

.mw-msg-bubble-time {
    margin-top: 8px;
    font-size: 11px;
    opacity: .78;
}

.mw-msg-composer {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 14px;
}

    .mw-msg-composer textarea {
        width: 100%;
        min-height: 106px;
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 18px;
        padding: 14px 16px;
        resize: vertical;
        outline: none;
        color: var(--msg-text);
        background: rgba(255,255,255,.04);
    }

        .mw-msg-composer textarea::placeholder {
            color: #8fa0bd;
        }

.mw-msg-composer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.mw-msg-lead-item {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255,255,255,.04);
}

.mw-msg-lead-vehicle {
    color: #e7edf9;
    font-size: .93rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 6px;
}

.mw-msg-lead-item p {
    margin: 10px 0 0;
    color: #d4deef;
    line-height: 1.6;
}

.mw-msg-shortcuts {
    display: grid;
    gap: 12px;
}

    .mw-msg-shortcuts a {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        color: var(--msg-text);
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 16px;
        padding: 14px 16px;
        background: rgba(255,255,255,.04);
    }

        .mw-msg-shortcuts a span,
        .mw-msg-shortcuts a i {
            color: var(--msg-text);
        }

@media (max-width: 1279px) {
    .mw-msg-layout {
        grid-template-columns: 290px minmax(0, 1fr);
        grid-template-areas:
            "sidebar main"
            "side side";
    }

    .mw-msg-sidepanels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .mw-msg-shell {
        padding: 22px 0 60px;
    }

    .mw-msg-hero {
        grid-template-columns: 1fr;
    }

    .mw-msg-summary-grid {
        grid-template-columns: 1fr;
    }

    .mw-msg-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "sidebar"
            "side";
    }

    .mw-msg-sidepanels {
        grid-template-columns: 1fr;
    }

    .mw-msg-conversation-panel,
    .mw-msg-thread-list,
    .mw-msg-leads {
        min-height: 0;
        max-height: none;
    }
}

@media (max-width: 767px) {
    .mw-msg-hero h1 {
        font-size: clamp(1.9rem, 10vw, 2.8rem);
    }

    .mw-msg-panel,
    .mw-msg-summary-card,
    .mw-msg-hero-actions-card,
    .mw-msg-gate {
        border-radius: 20px;
    }

    .mw-msg-thread {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .mw-msg-thread-photo,
    .mw-msg-conversation-thumb {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .mw-msg-thread-badge {
        grid-column: 2 / 3;
        justify-self: start;
    }

    .mw-msg-conversation-copy {
        min-width: 0;
    }

        .mw-msg-conversation-copy h2 {
            font-size: 1.24rem;
        }

    .mw-msg-bubble {
        max-width: 100%;
    }

    .mw-msg-composer-actions {
        justify-content: stretch;
    }

        .mw-msg-composer-actions .mw-seller-btn {
            width: 100%;
        }
}


@media (max-width: 767px) {
    .mw-msg-shell {
        padding: 26px 0 64px;
    }

    .mw-msg-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .mw-msg-summary-grid,
    .mw-seller-mini-grid {
        grid-template-columns: 1fr;
    }

    .mw-msg-panel,
    .mw-msg-summary-card,
    .mw-seller-mini-card {
        border-radius: 22px;
    }

    .mw-msg-thread {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .mw-msg-thread-badge {
        grid-column: 2 / 3;
        justify-self: start;
    }

    .mw-msg-bubble {
        max-width: 100%;
    }
}

.mw-msg-summary-grid,
.mw-seller-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.mw-msg-summary-card,
.mw-seller-mini-card {
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .10);
    position: relative;
    overflow: hidden;
}

    .mw-msg-summary-card::after,
    .mw-seller-mini-card::after {
        content: '';
        position: absolute;
        right: -34px;
        bottom: -34px;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: rgba(59, 130, 246, .08);
    }

    .mw-msg-summary-card.soft-rose::after,
    .mw-seller-mini-card.soft-rose::after {
        background: rgba(244, 63, 94, .10);
    }

    .mw-msg-summary-card.soft-amber::after,
    .mw-seller-mini-card.soft-amber::after {
        background: rgba(245, 158, 11, .12);
    }

    .mw-msg-summary-card.soft-blue::after,
    .mw-seller-mini-card.soft-blue::after {
        background: rgba(59, 130, 246, .10);
    }

    .mw-msg-summary-card small,
    .mw-seller-mini-card small {
        display: block;
        color: #64748b;
        font-size: 12px;
        letter-spacing: .12em;
        text-transform: uppercase;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .mw-msg-summary-card strong,
    .mw-seller-mini-card strong {
        display: block;
        font-size: 2.5rem;
        line-height: 1;
        color: #0f172a;
        margin-bottom: 10px;
    }

    .mw-msg-summary-card span,
    .mw-seller-mini-card span {
        color: #64748b;
    }
