.support-inbox {
    display: grid;
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 10rem);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    color: #0f172a;
}

.dark .support-inbox {
    background: #0f172a;
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.2);
}

.support-inbox-sidebar {
    display: flex;
    flex-direction: column;
    border-inline-end: 1px solid rgba(148, 163, 184, 0.25);
    min-height: 0;
    background: rgba(248, 250, 252, 0.9);
}

.dark .support-inbox-sidebar {
    background: rgba(15, 23, 42, 0.65);
}

.support-inbox-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-inbox-sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1rem;
}

.support-inbox-tabs {
    display: flex;
    gap: 0.35rem;
}

.support-inbox-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.55rem 0.65rem;
    background: transparent;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.support-inbox-tab.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.support-inbox-new-badge {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    font-size: 0.65rem;
    font-weight: 700;
}

.support-inbox-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.support-inbox-search {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: transparent;
    color: inherit;
}

.support-inbox-list {
    flex: 1;
    overflow-y: auto;
}

.support-inbox-item {
    width: 100%;
    text-align: start;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: transparent;
    color: inherit;
    padding: 0.9rem 1rem;
    cursor: pointer;
}

.support-inbox-item:hover,
.support-inbox-item.is-active,
.support-inbox-item.is-unread {
    background: rgba(37, 99, 235, 0.08);
}

.support-inbox-item.is-unread .support-inbox-item-name {
    font-weight: 800;
}

.support-inbox-item-top,
.support-inbox-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.support-inbox-item-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.support-inbox-item-preview {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-inbox-thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.support-inbox-thread-header {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.support-inbox-thread-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.support-inbox-thread-subtitle {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.support-inbox-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 40%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.06), transparent 35%);
}

.support-inbox-composer {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.support-inbox-empty,
.support-inbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
    opacity: 0.75;
}

.support-inbox-placeholder {
    flex: 1;
}

.support-inbox-placeholder h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.support-inbox-placeholder p {
    margin: 0;
    max-width: 24rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .support-inbox {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .support-inbox-sidebar {
        max-height: 18rem;
        border-inline-end: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    }

    .support-inbox-thread {
        min-height: 28rem;
    }
}
