.detail-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-dark) !important;
    overflow: hidden;
}

#chat-messages {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent !important;
    min-height: 0;
}

.detail-header {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    z-index: 10;
}

#detail-header-bg.status-neu { border-bottom: 3px solid var(--status-neu); }
#detail-header-bg.status-bearbeitung { border-bottom: 3px solid var(--status-bearbeitung); }
#detail-header-bg.status-erledigt { border-bottom: 3px solid var(--status-erledigt); }
#detail-header-bg.status-nacharbeiten { border-bottom: 3px solid var(--status-nacharbeiten); }
#detail-header-bg.status-wichtig {
    border-bottom: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.1) !important;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    animation: messageSlideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.message.own {
    align-self: flex-end;
    align-items: flex-end;
}

.bubble {
    padding: 12px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    word-wrap: break-word;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.message.own .bubble {
    background: var(--accent-blue);
    color: white;
    border-bottom-right-radius: 4px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.message:not(.own) .bubble {
    border-bottom-left-radius: 4px;
}

.message-info {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 6px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bubble-image {
    padding: 6px !important;
    background: rgba(255, 255, 255, 0.1);
}

.chat-image {
    width: 100%;
    max-width: 300px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-image:hover {
    transform: scale(1.02);
}

#detail-title {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#status-select {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

#status-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-btn-asphalt {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.header-btn-asphalt:hover {
    background: rgba(255, 255, 255, 0.1);
}
