/* ========================================
   EIGENE RUBRIK - OBJECT CARDS v3.0
   Version: 3.0.2 (Timeline Fix v2 - Proper Alignment)
   Date: 2025-11-21
   Design: Apple-Style Glassmorphism

   CHANGELOG v3.0.2:
   - FIXED: Timeline dots on same horizontal line (flex-start + absolute line)
   - FIXED: Timeline line visible (position: absolute inside item)
   - FIXED: All 7 steps visible with horizontal scroll
   - FIXED: Image size balanced (90-110px range)
   - Timeline dots clickable for status change

   WICHTIG: Klassen-Namen bleiben zunächst unverändert (.report-*)
   bis Phase 3 (renderObjectCard v3.0)
   ======================================== */

/* ==========================================
   CONTAINER & GRID
   ========================================== */

.berichte-container {
    padding: 24px;
}

.berichte-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.berichte-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.berichte-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: rgba(0, 119, 182, 0.1);
    color: #0077b6;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
}

/* Grid Layout - Responsive (v3.0.11: Left-aligned) */
.berichte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 420px)); /* CHANGED: Max 420px per card */
    gap: 20px;
    padding-bottom: 16px;
    justify-content: start; /* CHANGED v3.0.11: Left-aligned (was center) */
    max-width: 1400px; /* Max 3 cards @ 420px each + gaps */
    margin: 0 auto; /* Center grid container */
}

/* ==========================================
   REPORT CARD (v2.0 - Current)
   ========================================== */

.report-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden; /* ADDED v3.0.6: Prevent child overflow (Layer 1 protection) */
    box-sizing: border-box; /* ADDED v3.0.6: Include padding in width */
    -webkit-tap-highlight-color: transparent;
}

.report-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 119, 182, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.12);
}

/* Report Card Header (v3.1 - User Type Icon + Map Button) */
.report-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.report-card-header .object-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Type Icon (v3.2 - No background, icon only blue) */
.user-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0077b6;
}

.user-type-icon svg {
    width: 18px;
    height: 18px;
}

/* Header Map Button (v3.2 - No background, icon only blue) */
/* v6.7: Desktop - Map Button ganz rechts im Header */
.header-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #0077b6;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    order: 10; /* v6.7: Push to far right on desktop (after title which has flex: 1) */
}

.header-map-btn:hover {
    transform: scale(1.1);
}

.header-map-btn:active {
    transform: scale(0.95);
}

.header-map-btn svg {
    width: 16px;
    height: 16px;
}

/* Header Image Wrapper (v6.6 - nur auf Mobile sichtbar) */
.header-image-wrapper {
    display: none; /* Desktop: versteckt, Mobile: sichtbar */
}

/* v6.7: Header-Left Container (nur Mobile sichtbar) */
.header-left {
    display: none; /* Desktop: versteckt */
}

/* v6.7: Header-Title-Row (nur Mobile sichtbar) */
.header-title-row {
    display: none; /* Desktop: versteckt */
}

/* v6.7: Header-Address (nur Mobile sichtbar) */
.header-address {
    display: none; /* Desktop: versteckt */
}

/* v6.7: 3 Dots Indikator (nur Mobile sichtbar) */
.slideshow-dots {
    display: none; /* Desktop: versteckt, Mobile: sichtbar in header-image-wrapper */
}

/* Header Thumbnail Styles (v6.6) */
.header-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.header-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.header-slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.header-counter {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 4px;
}

.header-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 6px;
    color: #aaa;
}

.report-type-badge {
    display: none;
}

.report-date {
    display: none;
}

/* Title */
.report-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Address */
.report-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
}

.report-address svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #0077b6;
}

/* Bottom Row: Facts + Circle Button (v2.0 Redesign) */
.report-bottom-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: 4px;
}

/* Key Facts Grid (3 columns) */
.report-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    flex: 1;
}

.report-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fact-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #86868b;
    letter-spacing: 0.6px;
}

.fact-value {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.fact-value.empty {
    color: #d2d2d7;
}

/* View Button (OLD - Deprecated in v2.0) */
.report-view-btn {
    display: none;
}

/* Circle Button (v2.0 Redesign) */
.report-view-btn-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 119, 182, 0.08);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(0, 119, 182, 0.15);
    color: #0077b6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.report-view-btn-circle:hover {
    background: rgba(0, 119, 182, 0.15);
    border-color: rgba(0, 119, 182, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2);
}

.report-view-btn-circle:active {
    transform: translateY(0);
}

.report-view-btn-circle svg {
    flex-shrink: 0;
}

/* Empty State */
.berichte-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.berichte-empty svg {
    color: #d2d2d7;
    margin-bottom: 16px;
}

.berichte-empty p {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px 0;
}

.berichte-empty span {
    font-size: 14px;
    color: #86868b;
    max-width: 400px;
    line-height: 1.5;
}

/* ==========================================
   OBJECT CARD v3.0 (NEW - Phase 3)
   Neue Klassen für zukünftiges Redesign
   ========================================== */

/* Top Section: Title+Facts (left) + Image (right) */
.object-top-section {
    display: grid;
    grid-template-columns: 70% 30%; /* CHANGED v3.0.9: Percentage for stable ratio */
    gap: 20px; /* CHANGED v3.0.9: More breathing room (was 16px) */
    align-items: start; /* Align items to top */
}

.object-left-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.object-title {
    font-size: 17px; /* Default, overridden by JS for long titles */
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* CHANGED v3.0.3: Always single line */
    margin: 0 0 12px 0; /* CHANGED v3.0.4: margin-bottom for spacing above 70/30 split */
}

.object-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
}

.object-address svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Facts Grid (3×2) */
.object-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 8px 12px;
}

.object-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Right Side: Objektbild + Map Button */
.object-image-wrapper {
    position: relative;
    width: clamp(80px, calc(100% - 16px), 130px); /* CHANGED v3.0.10: Subtract margin space */
    height: clamp(80px, calc(100% - 16px), 130px); /* Same for square */
    aspect-ratio: 1 / 1; /* 1:1 square */
    border-radius: 12px;
    overflow: hidden; /* Layer 2 protection */
    flex-shrink: 0; /* Prevent squishing */
    box-sizing: border-box; /* Include border in dimensions */
    margin: 0 8px; /* 8px spacing - now accounted for in width calc */
    justify-self: stretch; /* Stretch to fill column */
}

.object-image {
    width: 100%;
    height: 100%;
    max-width: 100%; /* ADDED v3.0.6: Never exceed wrapper (Layer 3 protection) */
    max-height: 100%; /* ADDED v3.0.6: Never exceed wrapper (Layer 3 protection) */
    object-fit: cover; /* Existing - maintain aspect ratio */
    object-position: center; /* Existing - center crop */
    display: block; /* ADDED v3.0.6: Remove inline spacing (critical!) */
}

.object-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.object-placeholder svg {
    width: 50px; /* FIXED v2: Medium size */
    height: 50px;
    color: rgba(255, 255, 255, 0.85);
}

.object-map-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.object-map-btn:hover {
    background: rgba(0, 119, 182, 0.1);
    border-color: rgba(0, 119, 182, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2);
}

.object-map-btn svg {
    width: 18px;
    height: 18px;
    color: #0077b6;
}

/* ==========================================
   TIMELINE SECTION (Horizontal, 7 Stati)
   Phase 4 - Wird in renderObjectCard v3.0 verwendet
   ========================================== */

.timeline-container {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertikal zentriert */
    gap: 8px;
    padding: 16px;
    background: rgba(0, 119, 182, 0.03);
    border-radius: 12px;
}

.timeline-current-label {
    font-size: 13px;
    font-weight: 600;
    color: #0077b6;
    margin-bottom: 4px;
}

.timeline-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.timeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #0077b6 100%);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.timeline-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
}

.timeline-label {
    font-size: 11px;
    font-weight: 500;
    color: #86868b;
    text-align: center;
    line-height: 1.2;
    min-height: 28px;
    display: flex;
    align-items: center;
}

.timeline-label.active {
    color: #0077b6;
    font-weight: 600;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #d2d2d7;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.timeline-dot.completed {
    background: #10b981;
    border-color: #10b981;
}

.timeline-dot.current {
    background: #0077b6;
    border-color: #0077b6;
    /* v2.4: Keine Größenänderung mehr - alle Dots gleich groß */
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(0, 119, 182, 0.4);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(0, 119, 182, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(0, 119, 182, 0.6);
    }
}

.timeline-dot.rejected {
    background: #ef4444;
    border-color: #ef4444;
}

.timeline-date {
    font-size: 10px;
    color: #86868b;
    font-weight: 500;
    min-height: 14px;
}

.timeline-date.active {
    color: #1d1d1f;
    font-weight: 600;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #d2d2d7;
    z-index: 1;
    transform: translateY(-50%);
}

.timeline-item:first-child::before {
    display: none;
}

.timeline-item.completed::before {
    background: #10b981;
}

/* ==========================================
   DATEPICKER MODAL
   ========================================== */

.timeline-datepicker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.timeline-datepicker-modal.open {
    display: flex;
}

.timeline-datepicker-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.timeline-datepicker-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.timeline-datepicker-content input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 16px;
    font-family: inherit;
}

.timeline-datepicker-actions {
    display: flex;
    gap: 12px;
}

.timeline-datepicker-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-datepicker-actions .btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.timeline-datepicker-actions .btn-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

.timeline-datepicker-actions .btn-confirm {
    background: #0077b6;
    color: white;
}

.timeline-datepicker-actions .btn-confirm:hover {
    background: #005f8f;
}

/* ==========================================
   AI INSIGHTS SECTION
   Phase 5 - Wird in renderObjectCard v3.0 verwendet
   ========================================== */

.ai-insights-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 119, 182, 0.05);
    border-radius: 10px;
}

.ai-insights-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.ai-insights-icon svg {
    width: 20px;
    height: 20px;
    color: #0077b6;
}

.ai-insights-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 13px;
    color: #1d1d1f;
    line-height: 1.4;
}

.ai-insight-item {
    position: relative;
    padding-left: 12px;
}

.ai-insight-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0077b6;
    font-weight: bold;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS (v3.0.5: Image responsive sizing)
   Grid auto-adjusts columns based on available width
   Min card width: 320px
   Max container: 1400px (prevents too many columns on ultra-wide)

   Desktop (>768px): 140×140px image, side-by-side
   Tablet (640-768px): 110×110px image, side-by-side
   Mobile (<640px): 80×80px image, stacked above facts
   ========================================== */

/* Tablet: Smaller image (640-768px) */
@media (max-width: 768px) and (min-width: 641px) {
    .object-top-section {
        grid-template-columns: 70% 30%; /* CHANGED v3.0.9: Percentage for stability */
        gap: 16px; /* Slightly more gap */
    }

    .object-image-wrapper {
        width: clamp(70px, calc(100% - 16px), 100px); /* CHANGED v3.0.10: Subtract margin */
        height: clamp(70px, calc(100% - 16px), 100px);
        margin: 0 8px; /* ADDED v3.0.10: Same spacing as desktop */
    }

    .object-title {
        font-size: 16px; /* Slightly smaller */
    }
}

/* Mobile: Stacked layout (<640px) */
@media (max-width: 640px) {
    .berichte-grid {
        gap: 12px; /* Smaller gap on mobile */
    }

    .berichte-container {
        padding: 16px;
    }

    .berichte-header h3 {
        font-size: 20px;
    }

    .report-card {
        padding: 8px; /* v6.6: Kompakter auf Mobile */
    }

    .report-title {
        font-size: 16px;
    }

    /* ==========================================
       Phase 6 v6.7: Mobile Header mit 2 Zeilen
       - LINKS: 2 Zeilen (Titel-Row + Adresse)
       - RECHTS: Bild 44x44 mit 3 Dots
       - Adresse jetzt IM Header (nicht mehr darunter)
       ========================================== */

    /* Report Card Header v6.7 - Grid Layout */
    .report-card-header {
        display: grid;
        grid-template-columns: 1fr 44px; /* Text links, Bild rechts */
        gap: 8px;
        padding: 0; /* Card hat bereits 8px Padding */
        align-items: center;
    }

    /* v6.7: Desktop-only Elemente auf Mobile VERSTECKEN */
    /* Diese werden auf Mobile durch header-left/header-title-row ersetzt */
    .report-card-header > .user-type-icon,
    .report-card-header > .header-map-btn,
    .report-card-header > .object-title {
        display: none !important;
    }

    /* Linke Spalte: 2 Zeilen Container */
    .header-left {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0; /* Erlaubt text-overflow */
    }

    /* Zeile 1: Icon + Map + Titel */
    .header-title-row {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    /* User-Type Icon */
    .header-title-row .user-type-icon {
        flex-shrink: 0;
    }

    .header-title-row .user-type-icon svg {
        width: 16px;
        height: 16px;
    }

    /* Map-Button in Title-Row */
    .header-title-row .header-map-btn {
        flex-shrink: 0;
        order: 0; /* v6.7: Reset order for mobile (desktop has order: 10) */
    }

    .header-title-row .header-map-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Titel wächst und füllt verfügbaren Platz */
    .header-title-row .object-title {
        flex: 1;
        font-size: 14px !important;
        margin: 0;
        line-height: 1.3;
        min-width: 0; /* Erlaubt text-overflow */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Zeile 2: Adresse im Header */
    .header-address {
        font-size: 13px;
        color: #666;
        line-height: 1.4;
        display: flex;
        align-items: flex-start;
        gap: 4px;
        /* Kann umbrechen - max 2 Zeilen */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .header-address svg {
        flex-shrink: 0;
        width: 13px;
        height: 13px;
        margin-top: 2px;
        stroke: #666;
    }

    /* Bild im Header: 44x44 (rechte Spalte) */
    .header-image-wrapper {
        display: block; /* Sichtbar auf Mobile */
        width: 44px;
        height: 44px;
        border-radius: 6px;
        overflow: hidden;
        background: #f5f5f5;
        position: relative; /* Für absolute Dots */
    }

    .header-image-wrapper .object-slideshow,
    .header-image-wrapper .header-slideshow {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        border-radius: 6px;
    }

    .header-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Slideshow-Pfeile im Header verstecken */
    .header-image-wrapper .slideshow-arrow {
        display: none !important;
    }

    /* Counter im Header verstecken (3 Dots stattdessen) */
    .header-image-wrapper .slideshow-counter,
    .header-image-wrapper .header-counter {
        display: none !important;
    }

    /* 3 Dots Indikator (v6.7 - nur bei >1 Bild) */
    .header-image-wrapper .slideshow-dots {
        display: flex !important; /* Sichtbar auf Mobile */
        position: absolute;
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
        gap: 3px;
        z-index: 2;
    }

    .header-image-wrapper .slideshow-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 2px rgba(0,0,0,0.3);
    }

    /* Top-Section: Nur noch Facts (Adresse jetzt im Header) */
    .object-top-section {
        display: block;
    }

    /* Adresse aus Top-Section VERSTECKEN (ist jetzt im Header) */
    .object-top-section .object-address {
        display: none !important;
    }

    /* Bild aus Top-Section VERSTECKEN (ist jetzt im Header) */
    .object-top-section .object-image-wrapper,
    .object-top-section .object-slideshow {
        display: none !important;
    }

    /* Facts bleiben normal */
    .object-facts {
        width: 100%;
    }

    /* Left section: children become direct children */
    .object-left-section {
        display: contents;
    }

    .object-title {
        font-size: 14px !important;
    }

    .fact-label {
        font-size: 10px; /* Smaller labels */
    }

    .fact-value {
        font-size: 13px; /* Smaller values */
    }

    /* v6.6: Facts zentriert auf Mobile */
    .object-fact {
        align-items: center;
        text-align: center;
    }

    /* REMOVED v3.0.7: Fact-label abbreviations (not needed - only title abbreviations) */

    /* Facts Grid: 2 Spalten auf Mobile (v2.0) */
    .report-facts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Circle Button: etwas kleiner auf Mobile (v2.0) */
    .report-view-btn-circle {
        width: 36px;
        height: 36px;
    }

    .report-view-btn-circle svg {
        width: 16px;
        height: 16px;
    }

    /* Bottom Row: Stack vertikal wenn zu eng */
    @media (max-width: 480px) {
        .report-bottom-row {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
        }

        .report-view-btn-circle {
            align-self: flex-end;
        }

        /* Facts Grid: 1 Spalte auf sehr kleinen Screens */
        .report-facts {
            grid-template-columns: 1fr;
        }
    }

    /* Timeline kompakter (Phase 4) */
    .timeline-container {
        padding: 12px;
        gap: 6px;
    }

    .timeline-current-label {
        font-size: 12px;
    }

    .timeline-label {
        font-size: 9px;
        min-height: 24px;
    }

    .timeline-dot {
        width: 12px;
        height: 12px;
    }

    /* v2.4: .timeline-dot.current Größe entfernt - alle Dots gleich groß */

    .timeline-date {
        font-size: 9px;
    }

    /* AI Insights kompakter (Phase 5) */
    .ai-insights-container {
        padding: 4px 12px 12px 12px; /* v6.6: Top 4px, Rest 12px */
        gap: 8px;
    }

    .ai-insights-list {
        font-size: 12px;
    }

    .ai-insight-item:nth-child(n+3) {
        display: none;
    }

    /* REMOVED v3.0.5: Old object-top-section styles (replaced with stacked layout at line 693) */

    .object-facts {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto auto;
        gap: 6px 10px;
    }

    .object-placeholder svg {
        width: 36px;
        height: 36px;
    }

    .object-map-btn {
        width: 32px;
        height: 32px;
        top: 6px;
        right: 6px;
    }

    .object-map-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Extra Small Mobile (<480px) */
@media (max-width: 479px) {
    /* REMOVED v3.0.5: object-top-section and object-image-wrapper (handled by 640px breakpoint) */

    .timeline-label {
        font-size: 8px;
        min-height: 20px;
    }

    .timeline-date {
        font-size: 8px;
    }
}

/* ============================================
   OBJECT CARD v4.0 - INTERACTIVE SLIDER TIMELINE
   Draggable 7-dot timeline with touch support
   All status dots visible, current label always shown
   ============================================ */

/* Timeline Slider Container */
.timeline-slider {
    position: relative;
    height: 70px;
    padding: 18px 16px; /* Symmetrisch */
    border-top: 1px solid rgba(142, 142, 147, 0.15);
    border-bottom: 1px solid rgba(142, 142, 147, 0.15); /* v6.6: Bottom border hinzugefügt */
    touch-action: none; /* Besseres Touch-Handling */
    user-select: none;
}

/* Track (Hintergrund-Linie) */
.timeline-track {
    position: absolute;
    top: 50%;
    left: 24px;
    right: 24px;
    height: 4px;
    background: #E5E5EA;
    border-radius: 2px;
    transform: translateY(-50%);
}

/* Progress (dunkelgrau bis zum aktuellen Status) */
.timeline-progress {
    height: 100%;
    background: #8E8E93;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Dots Container */
.timeline-dots {
    position: absolute;
    top: 50%;
    left: 24px;
    right: 24px;
    height: 0;
    transform: translateY(-50%);
}

/* Einzelner Dot */
.timeline-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
    box-sizing: border-box;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    /* WICHTIG: Keine transitions - verhindert Verschiebung bei Hover */
}

/* 44px Touch Target (iOS Guideline) */
.timeline-dot::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Dot States: Completed (absolviert) - Grau gefüllt */
.timeline-dot.completed {
    background: #8E8E93;
    border: 2px solid #8E8E93;
}

/* Dot States: Upcoming (bevorstehend) - Weiß mit Outline */
.timeline-dot.upcoming {
    background: #FFFFFF;
    border: 2px solid #C7C7CC;
}

/* Dot States: Current (aktuell) - Grün mit Glow */
/* v2.4: Keine Größenänderung - alle Dots gleich groß */
.timeline-dot.current {
    background: #34C759;
    border: 2px solid #34C759;
    box-shadow: 0 0 12px rgba(52, 199, 89, 0.5);
    z-index: 3;
}

/* Dot States: Rejected (Abgelehnt) - Immer Rot */
.timeline-dot.rejected {
    background: #FFFFFF;
    border: 2px solid #FF3B30;
}

.timeline-dot.rejected.completed {
    background: #FF3B30;
    border: 2px solid #FF3B30;
}

.timeline-dot.rejected.current {
    background: #FF3B30;
    border: 2px solid #FF3B30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.5);
}

/* Labels - IMMER sichtbar, abwechselnd oben/unten */
.dot-label {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #8E8E93;
    white-space: nowrap;
    opacity: 1;
    pointer-events: none;
    font-weight: 500;
}

/* Gerade Dots (2, 4, 6) = Labels UNTEN */
.timeline-dot:nth-child(even) .dot-label {
    bottom: auto;
    top: calc(100% + 6px);
}

/* AKTUELLER STATUS: hervorgehoben */
/* v2.4: Keine font-size Änderung - alle Labels gleich groß */
.timeline-dot.current .dot-label {
    color: #34C759;
    font-weight: 600;
}

/* Abgelehnt-Label in Rot wenn aktuell */
.timeline-dot.rejected.current .dot-label {
    color: #FF3B30;
}

/* Draggable Handle (versteckt - Dots sind klickbar) */
.timeline-handle {
    display: none; /* Versteckt - wir nutzen nur Dot-Clicks */
}

/* Pulse Animation für Current Dot */
@keyframes timelineSliderPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(52, 199, 89, 0.5);
    }
    50% {
        box-shadow: 0 0 18px rgba(52, 199, 89, 0.7);
    }
}

.timeline-dot.current:not(.rejected) {
    animation: timelineSliderPulse 2s ease-in-out infinite;
}

@keyframes timelineSliderPulseRed {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 59, 48, 0.5);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 59, 48, 0.7);
    }
}

.timeline-dot.rejected.current {
    animation: timelineSliderPulseRed 2s ease-in-out infinite;
}

/* ============================================
   TIMELINE SLIDER - RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .timeline-slider {
        height: 65px;
        padding: 4px 12px 16px 12px; /* v6.6: Weniger top padding */
    }
    .timeline-track {
        left: 20px;
        right: 20px;
    }
    .timeline-dots {
        left: 20px;
        right: 20px;
    }
    .timeline-dot {
        width: 12px;
        height: 12px;
    }
    /* v2.4: .timeline-dot.current Größe entfernt - alle Dots gleich groß */
    .dot-label {
        font-size: 8px;
    }
    /* v2.4: .timeline-dot.current .dot-label font-size entfernt - alle Labels gleich groß */
}

/* Mobile */
@media (max-width: 480px) {
    .timeline-slider {
        height: 60px;
        padding: 4px 8px 14px 8px; /* v6.6: Weniger top padding */
    }
    .timeline-track {
        left: 16px;
        right: 16px;
    }
    .timeline-dots {
        left: 16px;
        right: 16px;
    }
    .timeline-dot {
        width: 10px;
        height: 10px;
    }
    /* v2.4: .timeline-dot.current Größe entfernt - alle Dots gleich groß */
    /* Mobile: Labels versteckt außer aktueller Status */
    .dot-label {
        display: none;
    }
    .timeline-dot.current .dot-label {
        display: block;
        /* v2.4: font-size entfernt - gleiche Größe wie .dot-label */
    }
}

/* ============================================
   OBJECT CARD v3.0 - AI INSIGHTS (Phase 5)
   SIMPLE TEXT LIST
   ============================================ */

.object-insights {
    padding: 16px;
    /* v6.6: border-top entfernt - Timeline hat jetzt border-bottom */
    min-height: 90px; /* ADDED v3.0.3: Consistent height for empty insights */
}

.insights-label {
    font-size: 11px;
    font-weight: 600;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-item {
    font-size: 12px;
    line-height: 1.4;
    color: #3C3C43;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.insight-item svg {
    color: #0077B6;
    flex-shrink: 0;
}

.insight-item span {
    flex: 1;
}

/* ============================================
   RESPONSIVE: Timeline & Insights
   ============================================ */

@media (max-width: 768px) {
    .object-timeline {
        padding: 4px 12px 12px 12px; /* v6.6: Weniger top padding */
        min-height: 90px;
    }

    .timeline-item {
        min-width: 60px; /* Kompakt auf Mobile */
        gap: 7px;
        height: 65px;
    }

    .timeline-dot {
        width: 12px;
        height: 12px;
        border-width: 2.5px;
    }

    .timeline-label {
        font-size: 9px;
        max-width: 55px;
    }

    .object-insights {
        padding: 4px 0 0 0; /* v6.6: Nur 4px top padding */
    }

    .insight-card {
        padding: 12px 14px;
    }

    .insight-icon {
        font-size: 18px;
        width: 28px;
        height: 28px;
    }

    .insight-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .object-timeline {
        padding: 20px 8px;
        min-height: 75px;
    }

    .timeline-item {
        min-width: 55px;
        height: 60px;
        gap: 6px;
    }

    .timeline-dot {
        width: 11px;
        height: 11px;
    }

    .timeline-label {
        font-size: 8px;
        max-width: 50px;
    }

    .insight-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .insight-icon {
        font-size: 16px;
        width: 24px;
        height: 24px;
    }

    .insight-text {
        font-size: 11px;
    }
}


/* ==========================================
   IMAGE LIGHTBOX
   Fullscreen overlay for image zoom
   ========================================== */

.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: default; /* v6.1: Changed from zoom-out - cursor only on close button */
}

.image-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* Clickable images indicator */
.object-image img,
.object-image-inner {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.object-image img:hover,
.object-image-inner:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 85vh;
        border-radius: 8px;
    }
}

/* ==========================================
   LIGHTBOX GALLERY NAVIGATION v6.0
   Prev/Next arrows + counter for gallery mode
   ========================================== */

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    /* FIX v6.2: Always flex, visibility controlled via JS */
    /* Using visibility instead of display prevents click-through to overlay */
    display: flex;
    visibility: hidden; /* Hidden by default, shown via JS */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.image-lightbox-overlay.gallery-mode .lightbox-nav {
    /* FIX v6.2: visibility now controlled by JS based on index position */
    /* This selector ensures display:flex is maintained in gallery mode */
    display: flex;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10001;
    display: none; /* Hidden by default */
}

.image-lightbox-overlay.gallery-mode .lightbox-counter {
    display: block;
}

/* Mobile adjustments for gallery */
@media (max-width: 640px) {
    /* FIX v6.4: Hide arrows on mobile - use swipe gestures instead */
    .lightbox-nav {
        display: none !important;
    }

    .lightbox-counter {
        bottom: 16px;
        font-size: 13px;
        padding: 6px 12px;
    }

    /* Swipe hint on first open */
    .image-lightbox-overlay.gallery-mode::after {
        content: '← Wischen zum Navigieren →';
        position: absolute;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 12px;
        padding: 6px 12px;
        border-radius: 12px;
        opacity: 0;
        animation: swipeHintFade 3s ease-in-out;
        pointer-events: none;
    }

    @keyframes swipeHintFade {
        0% { opacity: 0; }
        10% { opacity: 1; }
        70% { opacity: 1; }
        100% { opacity: 0; }
    }
}

/* ==========================================
   IMAGE SLIDESHOW v1.0
   Multi-image support for Report Cards
   ========================================== */

.object-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    touch-action: pan-y pinch-zoom;
}

.slideshow-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.slideshow-slide {
    flex: 0 0 100%;
    height: 100%;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* Navigation Dots */
.slideshow-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.slideshow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.3);
}

/* Image counter badge */
.slideshow-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 5;
}

/* Mobile Touch optimization */
@media (max-width: 640px) {
    .slideshow-dots {
        gap: 5px;
        padding: 3px 6px;
        bottom: 6px;
    }

    .slideshow-dot {
        width: 6px;
        height: 6px;
    }

    .slideshow-counter {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Swipe hint animation (first time) */
@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.slideshow-track.show-hint {
    animation: swipeHint 0.8s ease-in-out 2;
}

/* ==========================================
   SLIDESHOW ARROWS v6.0
   Navigation arrows for thumbnail slideshow
   ========================================== */

.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
}

.slideshow-arrow svg {
    color: white;
}

.object-slideshow:hover .slideshow-arrow {
    opacity: 1;
}

.slideshow-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slideshow-prev {
    left: 4px;
}

.slideshow-next {
    right: 4px;
}

/* Mobile: Hide arrows, use swipe gestures instead (v6.4) */
@media (max-width: 768px) {
    .slideshow-arrow {
        display: none !important;
    }
}
