/* --- GLOBAL DESIGN (Index Style) --- */
body { 
    font-family: 'Inter', sans-serif; 
    /* Tiefes Slate-950 ohne Glow */
    background-color: #020617 !important; 
    color: #e2e8f0; 
    min-height: 100vh;
}

/* Text Markierung (Selection) */
::selection {
    background-color: #6366f1; /* Indigo-500 */
    color: #ffffff;
}

/* --- SCROLLBAR (Global Dark) --- */
::-webkit-scrollbar { 
    width: 10px; 
    height: 16px; 
}
::-webkit-scrollbar-track { 
    background: #0f172a;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb { 
    background: #334155; 
    border-radius: 8px;
    border: 3px solid #0f172a;
}
::-webkit-scrollbar-thumb:hover { 
    background: #475569; 
}

/* --- ANIMATIONEN --- */
.fade-in { 
    animation: fadeIn 0.4s ease-out; 
}
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- INPUTS: DATE PICKER FIXES --- */
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}
input[type="date"]::selection {
    background: transparent !important;
    color: inherit !important;
}
input[type="date"]:focus {
    outline: none;
}

/* --- INPUTS: CUSTOM CHECKBOX --- */
.checkbox-wrapper input:checked + div {
    background-color: #059669; 
    border-color: #059669;
}
.checkbox-wrapper input:checked + div svg {
    display: block;
}

/* --- APEXCHARTS DARK MODE OVERRIDES --- */
.apexcharts-tooltip { 
    background: #1e293b !important; 
    border-color: #334155 !important; 
    color: #fff; 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
}
.apexcharts-tooltip-title { 
    background: #0f172a !important; 
    border-bottom: 1px solid #334155 !important; 
    font-family: 'Inter', sans-serif !important;
}
.apexcharts-text {
    fill: #94a3b8 !important; 
    font-family: 'Inter', sans-serif !important;
}
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-pie-label {
    fill: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}
.apexcharts-gridline {
    stroke: #1e293b !important; 
}

/* --- SOCIAL MEDIA GLOWS (nur noch für die Karten) --- */
.ig-glow {
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.15), inset 0 0 0 1px rgba(217, 70, 239, 0.3);
    border-color: rgba(217, 70, 239, 0.4) !important;
}
.tt-glow {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15), inset 0 0 0 1px rgba(6, 182, 212, 0.3);
    border-color: rgba(6, 182, 212, 0.4) !important;
}

/* --- UTILITIES --- */
.snap-x { scroll-snap-type: x mandatory; }
.snap-start { scroll-snap-align: start; }
.history-dropdown { transition: all 0.3s ease-in-out; }
.rotate-180 { transform: rotate(180deg); }

/* --- MOBILE RESPONSIVE FIXES --- */
@media (max-width: 640px) {
    /* Smaller padding on mobile */
    body { padding-left: 0.5rem; padding-right: 0.5rem; }
    
    /* Prevent horizontal overflow */
    .max-w-\[1800px\], .max-w-\[1900px\], .max-w-\[1600px\] {
        max-width: 100%;
    }

    /* Make filter selects full-width on mobile */
    .post-filter-select {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    /* Date filter bar mobile layout */
    #dateFilterBar {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
    }
    
    /* Table header cells smaller on mobile */
    th, td {
        padding: 0.5rem 0.375rem !important;
        font-size: 0.625rem !important;
    }
    
    /* Prevent text overflow in cards */
    .text-4xl { font-size: 1.5rem !important; }
    .text-3xl { font-size: 1.25rem !important; }
}

/* Macht das Kalender-Icon wieder sichtbar und weiß (für Dark Mode) */
input[type="date"]::-webkit-calendar-picker-indicator {
    display: block !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23ffffff" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>');
    cursor: pointer;
    opacity: 1;
}