/* EIGENE SCROLLBARS */
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.6); }

/* MICRO-INTERACTIONS & ANIMATIONEN */
button, .project-card, .info-post-clickable-area { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease !important; }
button:active, .project-card:active, .info-post-clickable-area:active { transform: scale(0.97) !important; }

.modal { display: flex !important; opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0.25s ease !important; }
.modal.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.modal-content { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; transform: scale(1) !important; }
.modal.hidden .modal-content { transform: scale(0.95) !important; }

/* SCHWEBENDE CHAT EINGABE */
.chat-input-wrapper { margin: 0 16px 20px 16px !important; border-radius: 12px !important; background: rgba(255, 255, 255, 0.85) !important; backdrop-filter: blur(15px) !important; -webkit-backdrop-filter: blur(15px) !important; box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important; border: 1px solid rgba(0,0,0,0.05) !important; padding: 8px !important; position: relative; z-index: 20; width: calc(100% - 32px) !important; box-sizing: border-box !important; }

/* SMART CHAT BUBBLES */
.message.chained .message-info { display: none !important; }
.message.chained { margin-top: -12px !important; }
.message.own.chained .bubble { border-top-right-radius: 4px !important; }
.message:not(.own):not(.system-msg).chained .bubble { border-top-left-radius: 4px !important; }

/* SKELETON LOADERS */
.skeleton-card { min-height: 90px; height: auto !important; background: #ffffff !important; border-radius: 12px; position: relative; overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(0,0,0,0.05); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.skeleton-card::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); animation: shimmer 1.5s infinite; z-index: 2; }
.skeleton-line { height: 16px; background: #f1f5f9; border-radius: 4px; z-index: 1; }
.skeleton-line.short { width: 40%; height: 12px; }
.skeleton-line.long { width: 70%; }

/* GLOBAL SEARCH UI */
#global-search-wrapper { position: relative; width: 100%; margin-bottom: 10px; }
#global-search-results { position: absolute; top: 100%; left: 0; right: 0; background: #1e293b; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 1000; max-height: 400px; overflow-y: auto; display: none; margin-top: 5px; border: 1px solid rgba(255,255,255,0.1); }
.search-result-item { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.search-result-item:hover { background: rgba(255,255,255,0.05); }
.search-result-title { font-weight:700; color:#f8fafc; font-size:15px; }
.search-result-subtitle { font-size:12px; color:#94a3b8; margin-top:2px; }
.search-badge { font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: bold; text-transform: uppercase; background:rgba(255,255,255,0.1); color:#cbd5e1; }

.date-separator { display: flex; align-items: center; text-align: center; margin: 25px 0 15px 0; color: #64748b; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.date-separator::before, .date-separator::after { content: ''; flex: 1; border-bottom: 1px solid rgba(128,128,128,0.3); }
.date-separator span { padding: 0 12px; background: transparent; }

/* PERFEKTE KARTEN-OPTIK MIT PSEUDO-ELEMENT */
.detail-header { 
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); 
    position: relative; 
    z-index: 10; 
    padding: 10px 14px !important; 
    min-height: fit-content; 
}

.detail-title-container { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.detail-header #detail-title { margin: 0 !important; font-size: 17px !important; line-height: 1.2 !important; }


.project-card.status-baustelle-raeumen::before { background: #14b8a6 !important; }
.project-card.status-baustelle-raeumen { background: rgba(20, 184, 166, 0.05) !important; }
.project-card.status-neu::before { background: #94a3b8 !important; }
.project-card.status-neu { background: rgba(148, 163, 184, 0.04) !important; }
.project-card.status-bearbeitung::before { background: #f59e0b !important; }
.project-card.status-bearbeitung { background: rgba(245, 158, 11, 0.05) !important; }
.project-card.status-erledigt::before { background: #10b981 !important; }
.project-card.status-erledigt { background: rgba(16, 185, 129, 0.05) !important; }
.project-card.status-nacharbeiten::before { background: #f43f5e !important; }
.project-card.status-nacharbeiten { background: rgba(244, 63, 94, 0.05) !important; }
.project-card.status-wichtig::before { background: #e11d48 !important; }
.project-card.status-wichtig { 
    background-color: #450a0a !important; 
    border: none !important;
    animation: fire-flicker 1.5s infinite alternate !important; 
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}
.project-card.status-wichtig * { color: #ffffff !important; }

@keyframes wave-animation {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fire-flicker {
    0%   { background-color: #dc2626; box-shadow: inset 0 0 20px #ea580c, inset 0 0 10px #f97316; }
    10%  { background-color: #ef4444; box-shadow: inset 0 0 10px #f59e0b, inset 0 0 40px #f97316; }
    20%  { background-color: #b91c1c; box-shadow: inset 0 0 30px #ea580c, inset 0 0 5px #ef4444; }
    30%  { background-color: #dc2626; box-shadow: inset 0 0 15px #f97316, inset 0 0 20px #f59e0b; }
    40%  { background-color: #f97316; box-shadow: inset 0 0 5px #fbbf24, inset 0 0 60px #f59e0b; }
    50%  { background-color: #ef4444; box-shadow: inset 0 0 25px #ea580c, inset 0 0 10px #dc2626; }
    60%  { background-color: #b91c1c; box-shadow: inset 0 0 10px #dc2626, inset 0 0 30px #ea580c; }
    70%  { background-color: #ea580c; box-shadow: inset 0 0 40px #f59e0b, inset 0 0 15px #f97316; }
    80%  { background-color: #dc2626; box-shadow: inset 0 0 5px #ef4444, inset 0 0 20px #ea580c; }
    90%  { background-color: #ef4444; box-shadow: inset 0 0 30px #f97316, inset 0 0 10px #f59e0b; }
    100% { background-color: #dc2626; box-shadow: inset 0 0 20px #ea580c, inset 0 0 10px #f97316; }
}

.detail-header.status-baustelle-raeumen { border-top: 4px solid #14b8a6 !important; background-color: rgba(255, 255, 255, 0.7) !important; background-image: linear-gradient(90deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.6) 50%, rgba(20, 184, 166, 0.15) 100%) !important; background-size: 200% 100% !important; animation: wave-animation 4s linear infinite !important; }
.detail-header.status-neu { border-top: 4px solid #94a3b8 !important; background-color: rgba(255, 255, 255, 0.7) !important; background-image: linear-gradient(90deg, rgba(148, 163, 184, 0.15) 0%, rgba(148, 163, 184, 0.6) 50%, rgba(148, 163, 184, 0.15) 100%) !important; background-size: 200% 100% !important; animation: wave-animation 4s linear infinite !important; }
.detail-header.status-bearbeitung { border-top: 4px solid #f59e0b !important; background-color: rgba(255, 255, 255, 0.7) !important; background-image: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.6) 50%, rgba(245, 158, 11, 0.15) 100%) !important; background-size: 200% 100% !important; animation: wave-animation 4s linear infinite !important; }
.detail-header.status-erledigt { border-top: 4px solid #10b981 !important; background-color: rgba(255, 255, 255, 0.7) !important; background-image: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.6) 50%, rgba(16, 185, 129, 0.15) 100%) !important; background-size: 200% 100% !important; animation: wave-animation 4s linear infinite !important; }
.detail-header.status-nacharbeiten { border-top: 4px solid #f43f5e !important; background-color: rgba(255, 255, 255, 0.7) !important; background-image: linear-gradient(90deg, rgba(244, 63, 94, 0.15) 0%, rgba(244, 63, 94, 0.6) 50%, rgba(244, 63, 94, 0.15) 100%) !important; background-size: 200% 100% !important; animation: wave-animation 4s linear infinite !important; }

/* Status Wichtig - Flammen-Effekt (Flicker) */
.detail-header.status-wichtig { 
    border-top: none !important; 
    border-bottom: none !important;
    background-image: none !important;
    animation: fire-flicker 1.5s infinite alternate !important; 
}
.detail-header.status-wichtig * { color: #ffffff !important; }
.detail-header.status-wichtig #status-select option { color: #000000 !important; background-color: #ffffff !important; text-shadow: none !important; }
.detail-header.status-wichtig #status-select { 
    background-color: rgba(255,255,255,0.15) !important; 
    color: white !important; 
    border-color: rgba(255,255,255,0.4) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
}
.detail-header.status-wichtig .btn-back-styled { background-color: rgba(255,255,255,0.15) !important; background-image: none !important; color: white !important; border-color: rgba(255,255,255,0.4) !important; }

.detail-header #detail-title { color: #1e293b; font-weight: 600; display: flex; align-items: center; letter-spacing: -0.3px; }

.header-actions-wrap { display: flex; align-items: center; gap: 8px; }
#status-select { background: rgba(255, 255, 255, 0.6) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #1e293b !important; font-weight: 600; font-size: 13px !important; border: 1px solid rgba(0, 0, 0, 0.08) !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important; border-radius: 8px !important; padding: 6px 30px 6px 12px !important; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 14px !important; transition: all 0.2s ease; }
#status-select:hover { background: rgba(255, 255, 255, 0.9) !important; border-color: rgba(0, 0, 0, 0.15) !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04) !important; }

.btn-back-styled { background: rgba(255, 255, 255, 0.6) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(0, 0, 0, 0.08) !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #1e293b !important; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; margin: 0; outline: none; }
.btn-back-styled:hover { background: rgba(255, 255, 255, 0.9) !important; border-color: rgba(0, 0, 0, 0.15) !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04) !important; transform: translateY(-1px); }

#toggle-sys-msg-btn { background: rgba(255, 255, 255, 0.6) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(0, 0, 0, 0.08) !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #1e293b !important; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s ease; white-space: nowrap; margin: 0; outline: none; }
#toggle-sys-msg-btn:hover { background: rgba(255, 255, 255, 0.9) !important; border-color: rgba(0, 0, 0, 0.15) !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04) !important; }
#toggle-sys-msg-btn.active { background: #3b82f6 !important; color: white !important; border-color: #2563eb !important; }

.project-grid { display: flex !important; flex-direction: column !important; gap: 15px !important; padding-bottom: 20px; }
.project-card { margin: 0 !important; display: flex; position: relative; height: auto !important; min-height: min-content !important; padding: 16px !important; flex-direction: column; justify-content: space-between; box-sizing: border-box; word-wrap: break-word; overflow-wrap: break-word; }
.project-card h3 { white-space: normal !important; line-height: 1.3; margin-bottom: 4px !important; }
.project-card p { white-space: normal !important; line-height: 1.4; }
.project-card.selected { border: 2px solid #3b82f6 !important; box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25) !important; background-color: #f8fafc !important; }

#drag-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); z-index: 10000; display: flex; justify-content: center; align-items: center; flex-direction: column; color: white; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
#drag-overlay.active { opacity: 1; pointer-events: all; }
#drag-overlay .icon { font-size: 80px; margin-bottom: 20px; animation: bounce 2s infinite; }

#attach-menu { position: fixed; bottom: 80px; left: 15px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); display: flex; flex-direction: column; padding: 5px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: all 0.2s ease; z-index: 10001; border: 1px solid rgba(0,0,0,0.05); }
#attach-menu.active { opacity: 1; pointer-events: all; transform: translateY(0); }
.attach-option { padding: 12px 20px; color: #1e293b; font-weight: 600; font-size: 15px; cursor: pointer; border-radius: 8px; transition: background 0.2s; display: flex; align-items: center; gap: 10px; white-space: nowrap; border: none; background: transparent; text-align: left; }
.attach-option:hover { background: #f1f5f9; }

.toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10005; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: rgba(15, 23, 42, 0.95); color: white; padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 15px rgba(0,0,0,0.2); backdrop-filter: blur(8px); opacity: 0; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { background: rgba(220, 38, 38, 0.95); }
.toast-success { background: rgba(16, 185, 129, 0.95); }

.custom-prompt-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 10002; display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.2s; }
.custom-prompt-box { background: white; padding: 25px; border-radius: 16px; width: 90%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transform: scale(0.9); transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.custom-prompt-overlay.show { opacity: 1; }
.custom-prompt-overlay.show .custom-prompt-box { transform: scale(1); }
.custom-prompt-input { width: 100%; padding: 12px; margin: 15px 0; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; outline: none; box-sizing: border-box; color: #0f172a; }
.custom-prompt-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; font-size: 40px; cursor: pointer; padding: 10px 15px; border-radius: 50%; z-index: 10002; transition: background 0.2s; display: none; }
.lightbox-nav:hover { background: rgba(0,0,0,0.8); }
#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }

.sec-item-wrap { display: flex; align-items: stretch; gap: 8px; width: 100%; margin-bottom: 6px; box-sizing: border-box; }
.dynamic-sec-btn, #header-overview-btn-side { flex: 1; min-width: 0; margin: 0 !important; padding: 12px 14px !important; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.dynamic-sec-btn { background: rgba(0, 122, 255, 0.08) !important; border: 1px solid rgba(0, 122, 255, 0.15) !important; color: rgba(255, 255, 255, 0.9) !important; font-size: 14px; cursor: pointer; }
.dynamic-sec-btn:hover { background: rgba(0, 122, 255, 0.15) !important; border-color: rgba(0, 122, 255, 0.3) !important; }
#header-overview-btn-side { background: transparent; color: white; border: none; font-size: 18px; font-weight: 800; }
#header-overview-btn-side:hover { background: rgba(255,255,255,0.05); }
.dynamic-sec-btn-content { display: flex; align-items: center; flex-grow: 1; }
.dynamic-sec-btn .nav-badge { position: relative; margin-left: 8px; }

.sidebar-add-btn { flex: 0 0 38px; width: 38px; background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 8px; font-size: 22px; font-weight: 400; cursor: pointer; display: flex; align-items: center; justify-content: center; box-sizing: border-box; margin: 0 !important; padding: 0 !important; }
.sidebar-add-btn:hover { background: #3b82f6; color: white; border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); transform: translateY(-1px); }

.header-btn-back { background: transparent; border: none; font-size: 22px; margin-right: 12px; cursor: pointer; color: #1e293b; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; }
.header-btn-back:hover { background: rgba(0,0,0,0.05); transform: translateX(-3px); }

#section-list-body { display: flex !important; flex-direction: column !important; gap: 10px; }

.message { display: flex; flex-direction: column; margin-bottom: 15px; width: 100%; position: relative; }
.message.own { align-items: flex-end; }
.message:not(.own):not(.system-msg) { align-items: flex-start; }

.bubble { max-width: 85%; width: fit-content; word-wrap: break-word; }

.bubble-image { display: flex !important; flex-direction: column !important; padding: 8px !important; border-radius: 14px !important; }
.message.own .bubble-image { border-bottom-right-radius: 2px !important; }
.message:not(.own) .bubble-image { border-bottom-left-radius: 2px !important; }

.bubble-image .chat-image { border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); display: block; width: 100%; }

.bubble-image .file-label { margin-top: 8px; font-size: 11.5px; opacity: 0.9; text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.bubble-image .file-label b { margin-bottom: 2px; }
.bubble-image .file-label .filename-wrap { display: flex; align-items: center; justify-content: center; gap: 5px; word-break: break-all; }
.bubble-image .file-label .edit-pen { cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
.bubble-image .file-label .edit-pen:hover { opacity: 1; }
.edit-info { font-size: 10px; opacity: 0.7; margin-top: 4px; text-align: center; }

.img-size-small .bubble-image { max-width: 40% !important; min-width: 150px; }
.img-size-medium .bubble-image { max-width: 65% !important; min-width: 200px; }
.img-size-large .bubble-image { max-width: 90% !important; }

.message.selectable { cursor: pointer; transition: filter 0.2s; }
.message.selectable:hover { filter: brightness(0.9); }
.message.selected-msg { transform: scale(0.95); opacity: 0.9; }

.message.selectable .bubble, .message.selectable .message-info, .message.selectable .msg-status-label { pointer-events: none !important; }

.msg-status-erledigt { border: 3px solid #10b981 !important; box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important; }
.msg-status-bearbeitung { border: 3px solid #f59e0b !important; box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important; }
.msg-status-offen { border: 3px solid #ef4444 !important; box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important; }

.msg-status-label { font-size: 11px; opacity: 0.8; margin-top: 6px; color: #64748b; font-weight: 600; background: rgba(0,0,0,0.03); padding: 4px 10px; border-radius: 12px; display: inline-block; width: fit-content; }

.reply-msg-btn, .edit-msg-btn, .delete-msg-btn { cursor: pointer; opacity: 0.8; margin-left: 8px; font-size: 15px; transition: opacity 0.2s, transform 0.1s; display: inline-block; }
.reply-msg-btn:hover, .edit-msg-btn:hover, .delete-msg-btn:hover { opacity: 1; transform: scale(1.1); }
.edit-msg-btn { color: #3b82f6; }
.delete-msg-btn { color: #ef4444; }

#reply-preview-bar { background: rgba(241, 245, 249, 0.95); backdrop-filter: blur(5px); border-left: 4px solid #3b82f6; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.05); margin: 0 10px; transform: translateY(10px); }

@keyframes pulseHighlight { 0% { background-color: rgba(59, 130, 246, 0.3); } 100% { background-color: transparent; } }
.highlight-pulse .bubble { animation: pulseHighlight 1.5s ease-out; }

.message.system-msg { margin-bottom: 2px !important; }
.sys-text { font-size: 10px; color: #64748b; background: rgba(0,0,0,0.04); padding: 3px 10px; border-radius: 12px; display: inline-block; text-align: center; line-height: 1.4; }
#chat-messages.hide-system-msgs .system-msg { display: none !important; }

#new-street, #new-measure, #edit-street, #edit-measure { width: 100% !important; box-sizing: border-box !important; }

/* INFO BOARD STYLES */
.info-post-card { border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column; margin-bottom: 25px; position: relative; }
.info-post-card:hover { box-shadow: 0 12px 35px rgba(0,0,0,0.15); transform: translateY(-3px); }
.info-post-card.expanded { transform: none; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }

.info-post-clickable-area { display: flex; align-items: center; width: 100%; cursor: pointer; transition: background 0.2s; position: relative; border-radius: 16px; }
.info-post-clickable-area:hover { background: rgba(255, 255, 255, 0.15); }

.info-post-header { padding: 30px; cursor: pointer; position: relative; display: flex; flex-direction: column; background: transparent; flex: 1; min-width: 0; }
.info-post-expand-icon { position: absolute; right: 30px; top: 40px; color: rgba(0,0,0,0.5); font-size: 20px; transition: transform 0.3s; }
.info-post-card.expanded .info-post-expand-icon { transform: rotate(180deg); }

.info-post-header h3 { margin: 0 0 10px 0 !important; font-size: 26px !important; color: #0f172a !important; padding-right: 40px; line-height: 1.3; white-space: normal !important; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
.info-post-header p { margin: 0 !important; font-size: 18px !important; color: #334155 !important; line-height: 1.5; font-weight: 500; white-space: normal !important; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
.info-post-meta { font-size: 13px; color: rgba(0,0,0,0.6); margin-top: 15px; display: flex; align-items: center; gap: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.info-post-content { padding: 20px 30px 30px 30px; border-top: 1px solid rgba(255,255,255,0.4); background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; height: auto; animation: fadeIn 0.3s ease; }
.info-post-content.hidden { display: none; }

.info-content-element { margin-top: 16px; font-size: 16.5px; color: #1e293b; line-height: 1.6; font-weight: 500; }
.info-content-element p { margin: 0; }
.info-content-element img { max-width: 100%; max-height: 600px; object-fit: contain; width: auto; height: auto; border-radius: 12px; display: block; margin: 15px auto; cursor: pointer; transition: transform 0.2s; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.info-content-element img:hover { transform: scale(1.02); }
.info-content-element a.attachment-link { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.9); padding: 12px 18px; border-radius: 10px; color: #3b82f6; text-decoration: none; font-weight: 700; border: 1px solid rgba(0,0,0,0.1); transition: all 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.info-content-element a.attachment-link:hover { background: #ffffff; border-color: #3b82f6; transform: translateY(-2px); }

.pdf-preview-frame { width: 100%; height: 500px; border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; margin-top: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); background: white; }

.admin-edit-bar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); flex-wrap: wrap; }
.admin-edit-bar button { padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 12px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; border: 1px solid transparent; }
.admin-edit-bar button:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.admin-btn-title { background: #fffbeb; color: #d97706; border-color: #fde68a !important; }
.admin-btn-edit { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe !important; }
.admin-btn-delete { background: #fef2f2; color: #ef4444; border-color: #fecaca !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* SIDEBAR REORG CSS */
#options-nav-group button, #actions-nav-group button, #admin-nav-group button, #settings-nav-btn { display: flex; align-items: center; width: 100%; text-align: left; position: relative; padding: 10px 16px; background: transparent; border: none; color: rgba(255,255,255,0.7); font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
#options-nav-group button:hover, #actions-nav-group button:hover, #admin-nav-group button:hover, #settings-nav-btn:hover { background: rgba(255,255,255,0.05); color: white; }
#options-nav-group button:disabled, #actions-nav-group button:disabled, #admin-nav-group button:disabled { opacity: 0.3 !important; cursor: default !important; pointer-events: none !important; }

/* TUMBLEWEED ANIMATION */
@keyframes tumbleweed-roll {
    0% { transform: translateX(-150px) rotate(0deg); opacity: 0; }
    15% { opacity: 1; transform: translateX(-100px) rotate(90deg) translateY(-20px); }
    30% { transform: translateX(-50px) rotate(180deg) translateY(0); }
    45% { transform: translateX(0px) rotate(270deg) translateY(-15px); }
    60% { transform: translateX(50px) rotate(360deg) translateY(0); }
    75% { transform: translateX(100px) rotate(450deg) translateY(-10px); opacity: 1; }
    90% { transform: translateX(150px) rotate(540deg) translateY(0); opacity: 0; }
    100% { transform: translateX(150px) rotate(540deg); opacity: 0; }
}

.tumbleweed-container {
    width: 100%;
    max-width: 300px;
    height: 60px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.tumbleweed-emoji {
    font-size: 40px;
    animation: tumbleweed-roll 4s linear infinite;
    filter: sepia(0.8) hue-rotate(-15deg) contrast(0.8);
}

/* TABELLE FÜR PROJEKTÜBERSICHT */
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.overview-table th, .overview-table td { border-bottom: 1px solid rgba(0,0,0,0.1); padding: 8px 10px; color: #334155; }
.overview-table th { background: #f8fafc; position: sticky; top: 0; font-weight: bold; color: #0f172a; z-index: 2; }
.overview-table-wrap { max-height: 60vh; overflow-y: auto; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; margin-bottom: 15px; }

/* LIGHTBOX BILD (FÜR ZOOM/PAN) */
#lightbox-img { touch-action: none; transform-origin: top left; }

/* MSG ACTION MENU */
.message { position: relative; overflow: visible; }
.msg-action-menu {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform-origin: bottom center;
}
.msg-action-menu::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.msg-action-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-5px);
}
.message.own .msg-action-menu {
    left: auto;
    right: 10px;
    transform: none;
}
.message.own .msg-action-menu.active {
    transform: translateY(-5px);
}
.message.own .msg-action-menu::after {
    left: auto;
    right: 20px;
    transform: none;
}
.action-menu-item {
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.action-menu-item span[style] {
    line-height: 1;
}
.action-menu-item:hover { color: #3b82f6; }
