/* UI UPGRADE — AppTophs zentrales Stylesheet */

/* === Variablen === */
:root {
    --at-primary: #0d6efd;
    --at-dark: #1a1d21;
    --at-success: #198754;
    --at-danger: #dc3545;
    --at-warning: #ffc107;
    --at-muted: #6c757d;
    --at-card-border: #e9ecef;
    --at-nav-bg: #1a1d21;
}

/* === Navbar === */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar .nav-link {
    font-size: 0.92rem;
}

.navbar .audience-dropdown .btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
}

/* === Metric Cards === */
.metric-card {
    border-left: 4px solid var(--at-primary);
    border-radius: 0.375rem;
    transition: box-shadow 0.15s ease-in-out;
}

.metric-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.metric-card.warning {
    border-left-color: var(--at-warning);
}

.metric-card.danger {
    border-left-color: var(--at-danger);
}

.metric-card.success {
    border-left-color: var(--at-success);
}

/* === Badges === */
.badge-up {
    background-color: var(--at-success);
    color: #fff;
}

.badge-down {
    background-color: var(--at-danger);
    color: #fff;
}

.badge-flat {
    background-color: var(--at-muted);
    color: #fff;
}

/* === Dashboard KPI Cards === */
.kpi-card {
    text-align: center;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--at-card-border);
    background: #fff;
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-card .kpi-label {
    font-size: 0.85rem;
    color: var(--at-muted);
    margin-top: 0.25rem;
}

.kpi-card .kpi-delta {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.kpi-card .kpi-delta.positive { color: var(--at-success); }
.kpi-card .kpi-delta.negative { color: var(--at-danger); }

/* === Risk Box === */
.risk-box {
    border: 2px solid var(--at-danger);
    border-radius: 0.5rem;
    padding: 1rem;
    background: #fff5f5;
}

.risk-box.ok {
    border-color: var(--at-success);
    background: #f0fff4;
}

/* === Stabilitaets-Ampel === */
.traffic-light {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.traffic-light.green { background-color: var(--at-success); }
.traffic-light.yellow { background-color: var(--at-warning); }
.traffic-light.red { background-color: var(--at-danger); }

/* === Chart Container === */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

/* === Narrative Box === */
.narrative-box {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--at-card-border);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === Story Cards (Delta) === */
.story-card {
    border-left: 3px solid var(--at-primary);
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0 0.25rem 0.25rem 0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--at-muted);
}

.empty-state h5 {
    margin-bottom: 0.5rem;
}

.empty-state code {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

/* === Presentation Mode === */
.presentation-slide {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.presentation-nav {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.presentation-nav .slide-progress {
    font-size: 0.9rem;
    color: var(--at-muted);
    margin: 0 0.5rem;
}

.speaker-notes {
    background: #fffde7;
    border: 1px solid #f9e79f;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

/* === Guided Tour === */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.tour-tooltip {
    position: fixed;
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.25rem;
    max-width: 340px;
    z-index: 2001;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
}

.tour-tooltip .tour-step-indicator {
    font-size: 0.8rem;
    color: var(--at-muted);
    margin-bottom: 0.5rem;
}

/* === Admin-Seiten === */
.admin-header {
    border-bottom: 2px solid var(--at-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* === Profile Wizard Steps === */
.wizard-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    background: #e9ecef;
    font-size: 0.85rem;
}

.wizard-step.active {
    background: var(--at-primary);
    color: #fff;
}

.wizard-step.completed {
    background: var(--at-success);
    color: #fff;
}

/* === Print / PDF Export === */
@media print {
    /* Navigation und Controls verstecken */
    .navbar,
    .presentation-nav,
    .no-print,
    footer,
    .tour-overlay,
    .tour-tooltip,
    .speaker-notes,
    .audience-dropdown {
        display: none !important;
    }

    /* Seitenumbruch pro Slide */
    .presentation-slide {
        page-break-after: always;
        min-height: auto;
        padding: 1rem 0;
    }

    .presentation-slide:last-child {
        page-break-after: avoid;
    }

    /* Sauberes Layout */
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        border: 1px solid #dee2e6;
        break-inside: avoid;
    }

    .chart-container {
        min-height: 200px;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    /* KPI Cards druckfreundlich */
    .kpi-card {
        border: 1px solid #ccc;
    }
}
