/* ==========================================================================
   own_classifieds - Apple Design System (HIG & Craft Refinements)
   Grounded in Apple Human Interface Guidelines:
   - Typography: -apple-system / SF Pro Font Stack, Text Hierarchy & Tracking
   - Liquid Glass & Translucency: backdrop-filter Blur, Subtle Borders & Specular Highlights
   - Modern Form Controls: 10px-12px Squircle Radius, Smooth Focus Ring (SF Blue)
   - Depth & Shadows: Multi-layered, soft ambient occlusion instead of harsh drop shadows
   - Tactile Feedback & Micro-interactions: Active button scaling, smooth Bezier curves
   ========================================================================== */

:root {
    --sf-font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Nunito", sans-serif;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-blue-active: #0062c4;
    --apple-surface: #ffffff;
    --apple-surface-elevated: #ffffff;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-border-subtle: rgba(0, 0, 0, 0.04);
    --apple-text-primary: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-card-radius: 16px;
    --apple-btn-radius: 10px;
    --apple-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --apple-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --apple-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] {
    --apple-blue: #2997ff;
    --apple-blue-hover: #3ca1ff;
    --apple-blue-active: #147ce5;
    --apple-surface: #1c1c1e;
    --apple-surface-elevated: #2c2c2e;
    --apple-border: rgba(255, 255, 255, 0.1);
    --apple-border-subtle: rgba(255, 255, 255, 0.05);
    --apple-text-primary: #f5f5f7;
    --apple-text-secondary: #a1a1a6;
    --apple-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.24);
    --apple-shadow-card: 0 6px 24px rgba(0, 0, 0, 0.32);
    --apple-shadow-hover: 0 14px 40px rgba(0, 0, 0, 0.44);
}

body {
    font-family: var(--sf-font-stack) !important;
    color: var(--apple-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
}

/* 1. Mazer Sidebar & Navigation Refinement */
#sidebar, .sidebar-wrapper {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.sidebar-wrapper {
    background: var(--apple-surface) !important;
    border-right: 1px solid var(--apple-border) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 120, 128, 0.25) transparent;
}

.sidebar-wrapper::-webkit-scrollbar {
    width: 5px !important;
    height: 0px !important;
}

.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 128, 0.25) !important;
    border-radius: 10px !important;
}

.sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent !important;
}

.sidebar-header {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.sidebar-menu {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.sidebar-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    color: var(--apple-text-secondary) !important;
    text-transform: uppercase;
}

.sidebar-link {
    font-family: var(--sf-font-stack);
    border-radius: 10px !important;
    font-weight: 500 !important;
    font-size: 0.92rem !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sidebar-item.active > .sidebar-link {
    background-color: var(--apple-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35) !important;
}

/* 2. User-Card (Apple Glass & Smooth Squircle) */
.sidebar-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.65rem 0.85rem !important;
    text-decoration: none !important;
    color: inherit !important;
    border-radius: 14px !important;
    background: rgba(120, 120, 128, 0.08) !important;
    border: 1px solid var(--apple-border) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sidebar-user-card:hover {
    background: rgba(120, 120, 128, 0.14) !important;
    transform: translateY(-1px);
    color: inherit !important;
}

.initialen-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #0071e3, #5856d6) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
    flex-shrink: 0;
}

/* 3. Cards & Surfaces (Subtle Depth & 16px Squircles) */
.card {
    border-radius: var(--apple-card-radius) !important;
    border: 1px solid var(--apple-border) !important;
    background-color: var(--apple-surface) !important;
    box-shadow: var(--apple-shadow-card) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-header {
    border-bottom: 1px solid var(--apple-border-subtle) !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}

/* Horizontale Pillen-Scrollleiste */
.kategorien-scroll-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.kategorien-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Schnellfilter-Dropdowns: Großzügig, luftig & perfekt lesbar */
.schnellfilter-select {
    min-height: 42px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding-left: 0.9rem !important;
    padding-right: 2.4rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--apple-border) !important;
    background-color: var(--apple-surface) !important;
    color: var(--apple-text-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}

.schnellfilter-select:hover {
    border-color: rgba(0, 113, 227, 0.4) !important;
}

.schnellfilter-select:focus {
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18) !important;
}

.schnellfilter-input {
    min-height: 42px !important;
    font-size: 0.92rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--apple-border) !important;
    background-color: var(--apple-surface) !important;
    color: var(--apple-text-primary) !important;
}

.schnellfilter-input:focus {
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18) !important;
}

/* Aufgeräumte Filter-Container-Karte */
.filter-container-card {
    background: rgba(142, 142, 147, 0.05) !important;
    border: 1px solid var(--apple-border) !important;
}

.filter-container-card .form-control,
.filter-container-card .form-select {
    background-color: var(--apple-surface) !important;
    font-size: 0.88rem;
}

/* 4. Anzeigen-Karten (Apple Store / iOS App Store Style) */
.anzeige-karte {
    border-radius: var(--apple-card-radius) !important;
    border: 1px solid var(--apple-border) !important;
    background: var(--apple-surface);
    box-shadow: var(--apple-shadow-card);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.anzeige-karte:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--apple-shadow-hover) !important;
}

.anzeige-bild-wrapper {
    position: relative;
    width: 100%;
    padding-top: 68%;
    background-color: rgba(142, 142, 147, 0.08);
    overflow: hidden;
    border-top-left-radius: var(--apple-card-radius);
    border-top-right-radius: var(--apple-card-radius);
}

.anzeige-bild-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.anzeige-karte:hover .anzeige-bild-wrapper img {
    transform: scale(1.035) !important;
}

/* 4.1 Zustands-Badges mit garantiertem Kontrast (White & Dark Mode) */
.badge-zustand {
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 700 !important;
    font-size: 0.74rem !important;
    padding: 0.24rem 0.65rem !important;
    border-radius: 980px !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
}

.badge-zustand-neu {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.badge-zustand-sehr-gut {
    background-color: #0071e3 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.badge-zustand-gut {
    background-color: #5856d6 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.badge-zustand-akzeptabel {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.badge-zustand-defekt {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.badge-zustand-standard {
    background-color: #4b5563 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Liquid Glass Preis-Badge */
.anzeige-preis-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(29, 29, 31, 0.78) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.86rem !important;
    padding: 0.22rem 0.6rem;
    border-radius: 980px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Status-Ribbon als dezentes Pill-Badge */
.anzeige-status-ribbon {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    border-radius: 980px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.55rem !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 5. Kategorie-Pills (iOS Segmented / Filter Style) */
.kategorie-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 980px;
    border: 1px solid var(--apple-border);
    background-color: rgba(142, 142, 147, 0.08);
    color: var(--apple-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kategorie-pill:hover {
    background-color: rgba(142, 142, 147, 0.16);
    color: var(--apple-text-primary);
    transform: translateY(-1px);
}

.kategorie-pill.active {
    background-color: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 113, 227, 0.32);
}

/* 6. Apple Form Controls & Buttons */
.form-control, .form-select {
    border-radius: var(--apple-btn-radius) !important;
    border: 1px solid var(--apple-border) !important;
    font-family: var(--sf-font-stack);
    font-size: 0.94rem;
    padding: 0.55rem 0.85rem;
    background-color: var(--apple-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--apple-blue) !important;
    box-shadow: 0 0 0 3.5px rgba(0, 113, 227, 0.22) !important;
}

.btn {
    border-radius: var(--apple-btn-radius) !important;
    font-family: var(--sf-font-stack);
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn:active {
    transform: scale(0.975);
}

.btn-primary {
    background-color: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--apple-blue-hover) !important;
    border-color: var(--apple-blue-hover) !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
}

/* 7. KI Highlight Box (Apple Intelligence Violet/Indigo Glow) */
.ki-highlight-box {
    border-radius: 14px !important;
    border: 1px solid rgba(88, 86, 214, 0.25) !important;
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.08) 0%, rgba(0, 113, 227, 0.04) 100%) !important;
    padding: 1.25rem !important;
    box-shadow: 0 4px 18px rgba(88, 86, 214, 0.06);
}

/* 8. Galerie & Thumbnails */
.detail-hauptbild-container {
    background-color: rgba(142, 142, 147, 0.08) !important;
    border-radius: var(--apple-card-radius) !important;
    border: 1px solid var(--apple-border);
    height: 480px;
    max-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

#detail-hauptbild {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.detail-hauptbild-container:hover #detail-hauptbild {
    transform: scale(1.02);
}

.detail-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px !important;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.detail-thumb:hover,
.detail-thumb.active {
    border-color: var(--apple-blue) !important;
    opacity: 1 !important;
    transform: scale(1.05);
}

/* 9. Offline Banner (Minimalist Frosted Glass Alert) */
#sync-warning {
    position: sticky;
    top: 1rem;
    z-index: 1080;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* 10. Mobile Drawer & Backdrop nach Apple iOS HIG */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Top Header (Apple Glass Look) */
.mobile-top-header {
    background: rgba(120, 120, 128, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-border);
    position: sticky;
    top: 0.5rem;
    z-index: 100;
}

@media (max-width: 1199.98px) {
    #sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 300px !important;
        max-width: 84vw !important;
        z-index: 1050 !important;
        background-color: var(--apple-surface) !important;
        transform: translateX(-105%) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: none !important;
        border-right: 1px solid var(--apple-border) !important;
    }

    #sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.45) !important;
    }

    #main {
        padding: 0.5rem 0.75rem 2rem 0.75rem !important;
    }

    .anzeige-karte .card-body {
        padding: 0.55rem 0.65rem !important;
    }

    .anzeige-preis-badge {
        font-size: 0.78rem !important;
        padding: 0.18rem 0.45rem !important;
        bottom: 0.35rem !important;
        right: 0.35rem !important;
    }
}

/* 11. Backend Bildupload & Drag-and-Drop Grid */
.sortable-bild-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.85rem !important;
    align-items: flex-start !important;
    margin-top: 0.5rem !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.sortable-bild-item {
    width: 195px !important;
    min-width: 195px !important;
    max-width: 195px !important;
    border-radius: 12px !important;
    border: 1px solid var(--apple-border) !important;
    background-color: var(--apple-surface) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
    cursor: grab;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.sortable-bild-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14) !important;
}

.sortable-bild-item img {
    width: 100% !important;
    height: 145px !important;
    max-height: 145px !important;
    object-fit: cover !important;
    display: block !important;
    border-bottom: 1px solid var(--apple-border-subtle) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sortable-bild-item .position-relative:hover img {
    transform: scale(1.05) !important;
}

.sortable-bild-item .badge {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    backdrop-filter: blur(8px);
}

/* Rote schwebende Mülltonne direkt oben rechts auf jedem Foto */
.sortable-bild-item .bild-loeschen-schwebend {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #ef4444 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
}

.sortable-bild-item .bild-loeschen-schwebend:hover {
    transform: scale(1.15) !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Flohmarkt-Korb Schnell-Hinzufügen Button auf den Bildkarten
   ========================================================================== */
.btn-korb-toggle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
    z-index: 5 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-korb-toggle i {
    font-size: 1.15rem !important;
    color: #0d6efd !important;
    line-height: 1 !important;
    transition: transform 0.15s ease !important;
}

.btn-korb-toggle:hover {
    transform: scale(1.12) !important;
    background-color: #f0f7ff !important;
    border-color: #0d6efd !important;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.35) !important;
}

.btn-korb-toggle:hover i {
    transform: scale(1.1) !important;
}

/* Aktiv / Im Flohmarkt-Korb abgelegt */
.btn-korb-toggle.im-korb {
    background-color: #198754 !important;
    border-color: #198754 !important;
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.45) !important;
}

.btn-korb-toggle.im-korb i {
    color: #ffffff !important;
}

.btn-korb-toggle.im-korb:hover {
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

/* ==========================================================================
   10. Dashboard & Tabellen Dropdown-Menü Fix (Kein Abschneiden an Rändern)
   ========================================================================== */
.dashboard-anfragen-card {
    position: relative;
}

@media (min-width: 992px) {
    .dashboard-anfragen-card .table-responsive {
        overflow: visible !important;
    }
}

.dashboard-anfragen-card .dropdown-menu {
    border: 1px solid var(--apple-border, rgba(255, 255, 255, 0.16)) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 1080 !important;
}

.dashboard-anfragen-card .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   11. Dark-Mode Schrift- und Kontrast-Optimierungen & Bildkarten-Aktionen
   ========================================================================== */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-body-emphasis,
body.theme-dark .text-body-emphasis {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-body-secondary,
body.theme-dark .text-body-secondary {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .card-header.bg-warning.bg-opacity-10 span.fw-bold,
[data-bs-theme="dark"] .bg-warning.bg-opacity-10 .text-dark {
    color: #facc15 !important; /* Leuchtend lesbares Gelbgold statt dunklem Grau */
}

[data-bs-theme="dark"] .btn-outline-warning {
    color: #facc15 !important;
    border-color: #facc15 !important;
}

[data-bs-theme="dark"] .btn-outline-warning:hover {
    color: #0f172a !important;
    background-color: #facc15 !important;
}

/* WICHTIG: Wenn .btn-outline-warning aktiv ist oder gelben Hintergrund hat,
   MUSS die Schrift tiefdunkel / schwarz sein, damit sie glasklar lesbar ist! */
.btn-outline-warning.active,
.btn-outline-warning:active,
.btn-outline-warning.bg-warning,
[data-bs-theme="dark"] .btn-outline-warning.active,
[data-bs-theme="dark"] .btn-outline-warning:active,
[data-bs-theme="dark"] .btn-outline-warning.bg-warning {
    color: #0f172a !important;
    background-color: #facc15 !important;
    border-color: #eab308 !important;
}

[data-bs-theme="dark"] .btn-outline-info {
    color: #38bdf8 !important;
    border-color: #38bdf8 !important;
}

[data-bs-theme="dark"] .btn-outline-info:hover {
    color: #0f172a !important;
    background-color: #38bdf8 !important;
}

/* Spezifische Optimierungen für Hauptbild-Button in den Bildkarten (auch auf Smartphones) */
.sortable-bild-item .btn {
    touch-action: manipulation;
    pointer-events: auto !important;
    position: relative;
    z-index: 3;
}

.sortable-bild-item .btn-set-hauptbild {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 3px 7px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}

/* Aktives Hauptbild: Knalliges Gelb mit fettem schwarzem Text & Icon */
.sortable-bild-item .btn-set-hauptbild.active,
.sortable-bild-item .btn-set-hauptbild.bg-warning,
[data-bs-theme="dark"] .sortable-bild-item .btn-set-hauptbild.active,
[data-bs-theme="dark"] .sortable-bild-item .btn-set-hauptbild.bg-warning {
    background-color: #facc15 !important;
    border-color: #eab308 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.sortable-bild-item .btn-set-hauptbild.active *,
.sortable-bild-item .btn-set-hauptbild.bg-warning *,
[data-bs-theme="dark"] .sortable-bild-item .btn-set-hauptbild.active *,
[data-bs-theme="dark"] .sortable-bild-item .btn-set-hauptbild.bg-warning * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 800 !important;
}

/* Inaktives Hauptbild: Dunkler Hintergrund mit dezentem Rand und gelbem Text */
.sortable-bild-item .btn-set-hauptbild:not(.active):not(.bg-warning) {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(250, 204, 21, 0.7) !important;
    color: #facc15 !important;
}

.sortable-bild-item .btn-set-hauptbild:not(.active):not(.bg-warning) * {
    color: #facc15 !important;
}

.sortable-bild-item .btn-drehen-bild {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #e2e8f0 !important;
    flex-shrink: 0 !important;
}

.sortable-bild-item .btn-drehen-bild:hover,
.sortable-bild-item .btn-drehen-bild:active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #38bdf8 !important;
}

.sortable-bild-item .btn-loeschen-bild {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #dc2626 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    background-color: #ef4444 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.sortable-bild-item .btn-loeschen-bild * {
    color: #ffffff !important;
}

.sortable-bild-item .btn-loeschen-bild:hover,
.sortable-bild-item .btn-loeschen-bild:active {
    background-color: #b91c1c !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

/* ==========================================================================
   12. Kamera-Serienaufnahme im Browser (Fullscreen-Sucher & Shutter)
   ========================================================================== */
.btn-shutter {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background-color: transparent;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.btn-shutter:active {
    transform: scale(0.92);
}

.btn-shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ffffff;
    display: block;
    transition: background-color 0.15s ease;
}

.btn-shutter:active .btn-shutter-inner {
    background-color: #facc15;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    animation: pulseKamera 1.4s infinite;
}

@keyframes pulseKamera {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.kamera-thumb-item {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    border: 1.5px solid rgba(250, 204, 21, 0.7);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.kamera-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kamera-thumb-item .btn-thumb-del {
    position: absolute;
    top: 1px;
    right: 1px;
    background: rgba(0, 0, 0, 0.75);
    color: #ef4444;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

/* ==============================================================================
   Notifikations-Glocke & Hintergrund-Job-Widgets
   ============================================================================== */
.btn-notif-bell {
    transition: all 0.2s ease;
}

.btn-notif-bell:hover {
    transform: scale(1.05);
}

.notif-pulse {
    animation: pulseNotif 1.6s infinite;
}

@keyframes pulseNotif {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 94, 190, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(67, 94, 190, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 94, 190, 0);
    }
}

.notif-dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18) !important;
}

[data-bs-theme="dark"] .notif-dropdown-menu {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important;
}

.notif-nachrichten-liste .list-group-item:hover {
    background-color: rgba(67, 94, 190, 0.06);
}



