body.veesure-portal-body {
    background: #f8f9fa;
}


.veesure-sidebar {
    min-height: 100vh;
}

.veesure-sidebar .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: 0.2s ease;
}

.veesure-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
}

.veesure-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

.card {
    border-radius: 1rem;
}

.portal-start-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: #f1f3f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.veesure-portal-wrapper {
    min-height: 100vh;
    padding: 0;
}

.veesure-inbox-page {
    min-height: 75vh;
}

.veesure-thread-list {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.veesure-chat-area {
    background: #f8f9fa;
    min-height: 420px;
    max-height: calc(100vh - 340px);
    overflow-y: auto;
}

.veesure-bubble {
    width: 100%;
    max-width: 780px;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.veesure-bubble-own {
    background: var(--bs-primary);
    color: #fff;
    border-bottom-right-radius: 0.35rem;
}

.veesure-bubble-other {
    background: #fff;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    border-bottom-left-radius: 0.35rem;
}

.veesure-bubble-text p:last-child {
    margin-bottom: 0;
}

.active-thread {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

@media (max-width: 991.98px) {
    .veesure-thread-list,
    .veesure-chat-area {
        max-height: none;
    }
}

#veesureAutohausResults {
    max-height: 220px;
    overflow-y: auto;
}

.veesure-inbox-page {
    min-height: 75vh;
}

.veesure-inbox-sidebar,
.veesure-inbox-content {
    border-radius: 1rem;
}

.veesure-thread-list {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.veesure-thread-card {
    border: 0 !important;
    border-bottom: 1px solid var(--bs-border-color-translucent) !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.veesure-thread-card:hover {
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.active-thread {
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
}

.veesure-thread-avatar,
.veesure-thread-header-avatar,
.veesure-message-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.veesure-thread-avatar {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

.veesure-thread-header-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

.veesure-message-avatar {
    background: #eef2f7;
    color: #465266;
}

.veesure-message-avatar-own {
    background: rgba(var(--bs-primary-rgb), 0.14);
    color: var(--bs-primary);
}

.veesure-thread-title {
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.veesure-thread-date {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.veesure-thread-subline {
    font-size: 0.78rem;
    color: var(--bs-secondary-color);
}

.veesure-thread-preview {
    font-size: 0.83rem;
    color: var(--bs-secondary-color);
    line-height: 1.45;
}

.veesure-thread-meta-bottom {
    font-size: 0.74rem;
    color: var(--bs-secondary-color);
}

.veesure-thread-context-line {
    font-size: 0.88rem;
    color: var(--bs-secondary-color);
}

.veesure-chat-area {
    background:
        linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.03), rgba(var(--bs-primary-rgb), 0.01)),
        #f8f9fa;
    min-height: 420px;
    max-height: calc(100vh - 340px);
    overflow-y: auto;
}

.veesure-bubble-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    width: 100%;
}

.veesure-bubble-wrap.is-own {
    justify-content: flex-end;
}

.veesure-bubble-wrap.is-other {
    justify-content: flex-start;
}

.veesure-bubble {
    width: 100%;
    max-width: 760px;
    border-radius: 1.1rem;
    padding: 0.95rem 1rem;
    box-shadow: 0 0.35rem 1rem rgba(20, 24, 34, 0.06);
}

.veesure-bubble-own {
    background: linear-gradient(135deg, var(--bs-primary), #4c7cf3);
    color: #fff;
    border-bottom-right-radius: 0.4rem;
}

.veesure-bubble-other {
    background: #fff;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    border-bottom-left-radius: 0.4rem;
}

.veesure-bubble-sender {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.veesure-bubble-email {
    font-size: 0.74rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}

.veesure-bubble-time {
    font-size: 0.72rem;
    opacity: 0.8;
    white-space: nowrap;
}

.veesure-bubble-text {
    line-height: 1.6;
}

.veesure-bubble-text p:last-child {
    margin-bottom: 0;
}

#veesureAutohausResults {
    max-height: 220px;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .veesure-thread-list,
    .veesure-chat-area {
        max-height: none;
    }

    .veesure-bubble {
        max-width: 100%;
    }
}

.veesure-thread-header {
    position: sticky;
    top: 0;
    z-index: 4;
}

.veesure-thread-header-actions {
    min-width: 220px;
}

.veesure-thread-extra-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.veesure-reply-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    box-shadow: 0 -8px 20px rgba(20, 24, 34, 0.05);
}

.veesure-chat-area {
    scroll-behavior: smooth;
}

@media (max-width: 991.98px) {
    .veesure-thread-header {
        position: static;
    }

    .veesure-reply-sticky {
        position: static;
        box-shadow: none;
    }

    .veesure-thread-header-actions {
        min-width: 0;
    }
}

.veesure-thread-avatar-wrap {
    position: relative;
}

.veesure-thread-dot {
    position: absolute;
    right: -2px;
    top: -2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--bs-danger);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}

.veesure-mini-indicator {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.veesure-mini-indicator-unread {
    background: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

.veesure-mini-indicator-note {
    background: rgba(var(--bs-warning-rgb), 0.18);
    color: #8a5a00;
}

.veesure-status-neu {
    border-left: 4px solid var(--bs-primary) !important;
}

.veesure-status-offen {
    border-left: 4px solid var(--bs-info) !important;
}

.veesure-status-wartet-intern {
    border-left: 4px solid var(--bs-danger) !important;
}

.veesure-status-wartet-autohaus {
    border-left: 4px solid var(--bs-warning) !important;
}

.veesure-status-kundenkontakt {
    border-left: 4px solid var(--bs-info) !important;
    opacity: 0.9;
}

.veesure-status-geschlossen {
    border-left: 4px solid var(--bs-secondary) !important;
    opacity: 0.9;
}

.active-thread.veesure-status-geschlossen {
    opacity: 1;
}

.veesure-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.veesure-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.18);
    color: inherit;
    font-size: 0.75rem;
    line-height: 1.2;
}

.veesure-bubble-other .veesure-attachment-item {
    background: #f3f6fa;
    border-color: #dce4ef;
    color: var(--bs-body-color);
}

.veesure-attachment-item:hover {
    opacity: 0.9;
}

.veesure-attachment-icon {
    font-size: 0.85rem;
}

.veesure-attachment-name {
    font-weight: 600;
}

.veesure-attachment-type {
    opacity: 0.72;
    font-size: 0.7rem;
}

.veesure-thread-lock-box .alert {
    border-radius: 0.85rem;
}

.veesure-mail-status {
    font-size: 0.75rem;
    opacity: 0.85;
}

.veesure-contact-tooltip .tooltip-inner {
    white-space: pre-line;
    text-align: left;
    max-width: 320px;
}

.veesure-contact-tooltip .tooltip-inner {
    text-align: left;
    max-width: 320px;
}