/* ═══════════════════════════════════════════════════
   sidebar-light-unified.css v1.5 (04.05.2026)
   v1.5: SuperAdmin Sidebar-Texte explizit dunkel.
         Logo "glulando" voll sichtbar (vorher: nur "glu" orange,
         "lando" weiß auf weiß). Menü-Items, Section-Header,
         Icons mit erzwungener Farbe — überbietet branding-contrast.css.
   v1.4: SuperAdmin Body/HTML/Topbar/page-content auch hell.
   v1.3: Light-Sidebar auch auf DESKTOP (nicht mehr nur Mobile).
   v1.2: FIX Mobile Avatar-Click - user-select:none, tap-highlight.
   v1.1: BULLETPROOF — ueberbietet body.dark + admin-light.
   v1.0: Mobile-Sidebar visuell synchron zur Desktop-Icon-Rail.
   ═══════════════════════════════════════════════════ */

/* ─── Sidebar Container — weiß, hell, BULLETPROOF ── */
html body .sidebar,
html body.dark .sidebar,
html body.admin-light .sidebar,
html body.gl-dash .sidebar,
html body.sa-active .sidebar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-right: 1px solid #e2e8f0;
}
html body .sidebar.open {
    box-shadow: 4px 0 24px rgba(15,23,42,.18) !important;
}

/* ─── Logo-Block ─────────────────────────────────── */
html body .sidebar-logo,
html body.dark .sidebar-logo {
    background: #ffffff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
html body .sidebar-logo span,
html body.dark .sidebar-logo span {
    color: #1E40AF !important;
}

/* ─── Section-Header ─────────────────────────────── */
html body .sidebar-section,
html body.dark .sidebar-section {
    color: #94a3b8 !important;
    background: transparent !important;
}
html body .sidebar-section .icon { opacity: .6; }

/* ─── Standard-Nav (.sidebar-nav <a>) ────────────── */
html body .sidebar-nav,
html body.dark .sidebar-nav {
    background: #ffffff !important;
}
html body .sidebar-nav a,
html body.dark .sidebar-nav a {
    color: #475569 !important;
    background: transparent !important;
    border-left-color: transparent !important;
}
html body .sidebar-nav a:hover,
html body.dark .sidebar-nav a:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}
html body .sidebar-nav a.active,
html body.dark .sidebar-nav a.active {
    background: rgba(0,168,132,.08) !important;
    color: #00a884 !important;
    border-left-color: #00a884 !important;
    font-weight: 600;
}
html body .sidebar-nav a .icon { opacity: .6; }
html body .sidebar-nav a.active .icon { opacity: 1; }

/* ─── Scrollbar ──────────────────────────────────── */
html body .sidebar-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
}

/* ─── Footer (Profil / Logout) ───────────────────── */
html body .sidebar-footer,
html body.dark .sidebar-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    padding: 12px 16px !important;
}
html body .sidebar-footer .text-muted,
html body .sidebar-footer .text-sm,
html body.dark .sidebar-footer .text-muted,
html body.dark .sidebar-footer .text-sm { color: #64748b !important; }
html body .sidebar-footer a,
html body .sidebar-footer button,
html body.dark .sidebar-footer a,
html body.dark .sidebar-footer button { color: #475569 !important; }
html body .sidebar-footer .badge { color: #ffffff !important; }
html body .sidebar-footer .avatar,
html body.dark .sidebar-footer .avatar {
    background: #e2e8f0 !important;
    color: #1E40AF !important;
}

/* ─── Mobile-spezifisch: Touch-Targets ──────────── */
@media (max-width: 768px) {
    html body .sidebar-footer a[href="/profile"] {
        display: block !important;
        min-height: 44px !important;
        padding: 8px !important;
        margin: -8px !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0,168,132,.18) !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: manipulation !important;
        transition: background .15s ease !important;
    }
    html body .sidebar-footer a[href="/profile"]:active {
        background: rgba(0,168,132,.08) !important;
    }
    html body .sidebar-footer a[href="/profile"] * {
        -webkit-user-select: none !important;
        user-select: none !important;
        pointer-events: none !important;
    }
    html body .sidebar-footer .badge {
        -webkit-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
        pointer-events: none !important;
    }
    html body .sidebar-close {
        background: #f1f5f9 !important;
        color: #64748b !important;
    }
    html body #ams-nav { background: #ffffff !important; }
    html body .ams-i {
        color: #475569 !important;
        -webkit-tap-highlight-color: rgba(0,168,132,.12) !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: manipulation !important;
    }
    html body .ams-i:active,
    html body .ams-i:hover { background: #f1f5f9 !important; }
    html body .ams-i.on {
        background: rgba(0,168,132,.08) !important;
        color: #00a884 !important;
        border-left-color: #00a884 !important;
    }
    body.admin-light .ai-footer-link-floating,
    body.ah-active .ai-footer-link-floating,
    body.sa-active .ai-footer-link-floating,
    body.gl-dash .ai-footer-link-floating {
        display: none !important;
    }
}

/* ─── KI-Hinweis-Pill auch auf Desktop fuer Admin weg ── */
body.admin-light .ai-footer-link-floating,
body.sa-active .ai-footer-link-floating {
    display: none !important;
}

/* ═══════════════════════════════════════════════════
   v1.4 — SuperAdmin: Body/HTML/Topbar/Content komplett hell
   ═══════════════════════════════════════════════════ */
html:has(body.sa-active),
html:has(body.admin-light) {
    background: #f0f2f5 !important;
}
body.sa-active {
    background: #f0f2f5 !important;
    color: #1e293b !important;
}

/* Topbar (oben) — weiß statt dunkel */
html body.sa-active .topbar {
    background: #ffffff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
html body.sa-active .topbar a,
html body.sa-active .topbar button,
html body.sa-active .topbar .text-muted,
html body.sa-active .topbar h2,
html body.sa-active #page-title {
    color: #1e293b !important;
}

/* Content-Area & main — heller Hintergrund */
html body.sa-active .page-content,
html body.sa-active .main-content,
html body.sa-active main {
    background: #f0f2f5 !important;
    color: #1e293b !important;
}

/* SuperAdmin Cards — sicherstellen dass sie weiß bleiben */
html body.sa-active .card {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}
html body.sa-active .card .text-muted { color: #64748b !important; }

/* Tabellen */
html body.sa-active table { background: transparent !important; color: #1e293b !important; }
html body.sa-active table th { color: #64748b !important; border-bottom-color: #e2e8f0 !important; }
html body.sa-active table td { border-color: #e2e8f0 !important; }
html body.sa-active table tr:hover td { background: #f8fafc !important; }

/* Tabs */
html body.sa-active .tabs { border-bottom-color: #e2e8f0 !important; }
html body.sa-active .tab { color: #64748b !important; background: transparent !important; }
html body.sa-active .tab.active { color: #1E40AF !important; border-bottom-color: #1E40AF !important; }

/* ═══════════════════════════════════════════════════
   v1.5 — SuperAdmin: Logo + Menü-Texte erzwungen dunkel
   Überbietet branding-contrast.css (--primary orange) und
   stellt sicher dass "glulando" voll sichtbar ist.
   ═══════════════════════════════════════════════════ */

/* Logo "glulando" — beide Hälften sichtbar */
html body.sa-active .sidebar-logo {
    color: #1e293b !important;
    font-weight: 700 !important;
}
html body.sa-active .sidebar-logo span {
    color: #1E40AF !important;
    background: none !important;
    -webkit-text-fill-color: #1E40AF !important;
}

/* Menü-Links: dunkler Text, schwarze Schrift */
html body.sa-active .sidebar-nav a,
html body.sa-active .sidebar-nav a:visited,
html body.sa-active .sidebar-nav a:link {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}
html body.sa-active .sidebar-nav a:hover {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    background: #f1f5f9 !important;
}
html body.sa-active .sidebar-nav a.active {
    color: #00a884 !important;
    -webkit-text-fill-color: #00a884 !important;
    background: rgba(0,168,132,.08) !important;
    border-left-color: #00a884 !important;
}

/* Icons (SVG) im Menü */
html body.sa-active .sidebar-nav a .icon,
html body.sa-active .sidebar-nav a .icon svg {
    color: #475569 !important;
    stroke: #475569 !important;
    opacity: .8;
}
html body.sa-active .sidebar-nav a.active .icon,
html body.sa-active .sidebar-nav a.active .icon svg {
    color: #00a884 !important;
    stroke: #00a884 !important;
    opacity: 1;
}

/* Section-Header (PLATTFORM / SUPPORT / SYSTEM etc.) */
html body.sa-active .sidebar-section,
html body.sa-active .sidebar-section span {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    font-weight: 600;
    letter-spacing: .04em;
}
html body.sa-active .sidebar-section .icon,
html body.sa-active .sidebar-section .icon svg {
    color: #94a3b8 !important;
    stroke: #94a3b8 !important;
}

/* Footer (Avatar-Bereich) — Name dunkel sichtbar */
html body.sa-active .sidebar-footer .font-semibold,
html body.sa-active .sidebar-footer [style*="color:#fff"] {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}
