body, html {
    overflow: hidden;
    overscroll-behavior-y: contain;
    user-select: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1f2937; }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Verstecke Pfeile bei Nummern-Inputs */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }


/* Zähler-Labels auf Mobilgeräten explizit hell halten.
   Einige mobile Browser-/Samsung-Dark-Mode-Optimierungen überschreiben Tailwind-Grautöne. */
.counter-label {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
    text-shadow: 0 0 1px rgba(248, 250, 252, 0.35);
}

/* Placeholder Styling für Geisterzahlen */
input::placeholder {
    color: rgba(255, 255, 255, 0.34) !important;
    opacity: 1;
}

/* Step Animationen für Mobile */
.step-container { transition: opacity 0.3s ease, transform 0.3s ease; }
.step-hidden { opacity: 0; transform: translateX(20px); pointer-events: none; position: absolute; visibility: hidden; }
.step-active { opacity: 1; transform: translateX(0); position: relative; visibility: visible; }

/* Expand Animation */
.expanded-content { transition: max-height 0.3s ease-out; overflow: hidden; }



/* Einheitliches DIGISYSTEMS Branding */
.brand-logo {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    line-height: 1;
}
.brand-logo .brand-prefix { color: #3b82f6; }
.brand-logo .brand-suffix { color: #94a3b8; }
.brand-logo-count .brand-suffix { color: #94a3b8; }

/* DIGICROWD 0.40: Analytics-Vollbild und interaktive Diagramme */
#modal-analytics.analytics-fullscreen { padding: 0.5rem; }
#modal-analytics.analytics-fullscreen #analytics-panel {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    height: calc(100vh - 1rem);
    border-radius: 1rem;
}
#modal-analytics.analytics-fullscreen .analytics-scroll-area { max-height: none; }
#modal-analytics.analytics-fullscreen .analytics-chart-canvas { height: 42vh !important; min-height: 360px; }
.analytics-chart-canvas { cursor: crosshair; }

/* Kompakte Dashboard-Darstellung für Smartphones. */
.stat-label-short { display: none; }

@media (max-width: 640px) {
    #view-dashboard .flex-1.overflow-y-auto.bg-gray-950 {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    #view-dashboard .h-16 {
        height: 3.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #view-dashboard .brand-logo { font-size: 1rem; }
    #dash-project-name { max-width: 8rem; font-size: 0.95rem; }

    .dashboard-stat-card {
        min-height: 5rem;
        border-radius: 0.75rem;
    }

    .dashboard-stat-label svg {
        width: 0.9rem;
        height: 0.9rem;
    }

    .dashboard-stat-value {
        font-size: clamp(1.6rem, 9vw, 2.35rem) !important;
        line-height: 1;
    }

    .stat-label-long { display: none; }
    .stat-label-short { display: inline; }

    .dashboard-table-cell {
        padding: 0.5rem 0.35rem !important;
        font-size: 0.72rem !important;
    }

    .dashboard-count-cell {
        min-width: 2.6rem;
        font-variant-numeric: tabular-nums;
    }

    .dashboard-source {
        max-width: 5.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-hide { display: none !important; }
}

@media (max-width: 420px) {
    .dashboard-table-cell {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .mobile-hide-xs { display: none !important; }
}
