/* =============================================================================
   components.css — Seitenspezifische Stile
   Angelegt am 02.09.2026.

   Hier stehen die CSS-Bloecke, die vorher als <style> mitten in den View-Dateien
   standen. Das verstiess gegen die Projektregel "Keine Inline-Styles" und machte
   sie schwer auffindbar.

   Jeder Block ist mit einer Seitenklasse abgegrenzt (z.B. .seite-public-scan),
   die BaseController::view() automatisch an das <body>-Element haengt. Dadurch
   koennen sich die Seiten nicht gegenseitig beeinflussen — vorher war das nur
   deshalb kein Problem, weil jeder Block nur auf seiner eigenen Seite geladen wurde.

   Ausgenommen: print_sheet.php und print_export.php. Die werden ohne das Layout
   ausgeliefert und behalten ihre Stile deshalb bei sich.
   ============================================================================= */

/* --- aus layout.php (gilt fuer alle Seiten) --- */
.nav-links a {
            padding: 0.75rem 1.5rem;
        }

/* --- aus admin/dashboard.php --- */
/* Table Layout Fixes */
        .seite-admin-dashboard .table-fixed {
            width: 100%;
            table-layout: fixed;
        }


        /* Mobile Optimization */
        @media (max-width: 768px) {


            /* Stack Header */
            .seite-admin-dashboard .produkte-kopf {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.5rem;
            }


            /* Stack Filters & Actions */
            .seite-admin-dashboard .produkte-leiste {
                flex-direction: column;
                align-items: stretch !important;
                margin-bottom: 2rem !important;
            }


            .seite-admin-dashboard .produkte-filter {
                flex-direction: column;
                width: 100%;
                align-items: stretch !important;
            }


            .seite-admin-dashboard .produkte-filter input[type="text"],
.seite-admin-dashboard .produkte-filter select {
                width: 100% !important;
            }


            /* Stack filter actions vertically but allow wrapping */
            .seite-admin-dashboard .produkte-aktionen {
                flex-direction: row !important;
                flex-wrap: wrap !important;
                align-items: center !important;
                margin-top: 1rem;
                gap: 0.5rem !important;
            }


            /* Default full width */
            .seite-admin-dashboard .produkte-aktionen > a,
.seite-admin-dashboard .produkte-aktionen > button {
                width: 100% !important;
                border-radius: 8px !important;
                height: 48px !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
                padding: 0 1rem !important;
                flex: none !important;
            }


            /* Print Button (Index 2) */
            .seite-admin-dashboard .produkte-aktionen .aktion-drucken {
                width: calc(50% - 0.25rem) !important;
            }


            /* Delete Button (Index 3) */
            .seite-admin-dashboard .produkte-aktionen .aktion-loeschen {
                width: calc(50% - 0.25rem) !important;
            }


            /* Table Optimization: Hide EAN (3), Category (4), Type (5) */
            .seite-admin-dashboard th:nth-child(3),
.seite-admin-dashboard td:nth-child(3),
.seite-admin-dashboard th:nth-child(4),
.seite-admin-dashboard td:nth-child(4),
.seite-admin-dashboard th:nth-child(5),
.seite-admin-dashboard td:nth-child(5) {
                display: none;
            }


            /* Status Column (6) - Hide completely on mobile */
            .seite-admin-dashboard th:nth-child(6),
.seite-admin-dashboard td:nth-child(6) {
                display: none;
            }


            /* Product Name: Larger size */
            .seite-admin-dashboard th:nth-child(2),
.seite-admin-dashboard td:nth-child(2) {
                width: auto !important;
            }


            .seite-admin-dashboard td:nth-child(2) strong {
                font-size: 1.15rem;
            }


            /* Adjust Actions - Allow flex content */
            .seite-admin-dashboard th:last-child,
.seite-admin-dashboard td:last-child {
                width: 60px !important;
                /* Slightly wider to fit dot + button */
                padding-right: 0.5rem !important;
                padding-left: 0 !important;
                text-align: right !important;
                vertical-align: middle !important;
            }


            .seite-admin-dashboard .mobile-status-dot {
                display: block;
                width: 12px;
                height: 12px;
                border-radius: 50%;
                margin-right: 8px;
                /* Gap between dot and button */
                flex-shrink: 0;
            }


            /* Product Name: Larger size */
            .seite-admin-dashboard th:nth-child(2),
.seite-admin-dashboard td:nth-child(2) {
                width: auto !important;
            }


            .seite-admin-dashboard td:nth-child(2) strong {
                font-size: 1.15rem;
            }


            /* Adjust Actions */
            .seite-admin-dashboard th:last-child,
.seite-admin-dashboard td:last-child {
                width: 40px !important;
                padding-right: 0.5rem !important;
                padding-left: 0 !important;
                text-align: right !important;
                vertical-align: middle !important;
            }


            /* Action Menu for Mobile */
            .seite-admin-dashboard .action-toggle-mobile {
                display: flex !important;
                width: 32px;
                height: 32px;
                align-items: center;
                justify-content: center;
                font-size: 1.2rem;
                margin-left: auto;
                background: none;
                border: 1px solid #ddd;
                border-radius: 4px;
                cursor: pointer;
            }


            .seite-admin-dashboard .action-buttons-container {
                display: none;
                /* Hidden by default on mobile */
                position: absolute;
                right: 0.5rem;
                top: 3rem;
                background: white;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
                border: 1px solid #e5e7eb;
                border-radius: 8px;
                padding: 0.5rem;
                z-index: 50;
                flex-direction: column;
                gap: 0.5rem;
                width: 150px;
            }


            .seite-admin-dashboard .action-buttons-container.show-menu {
                display: flex !important;
            }


            .seite-admin-dashboard .action-buttons-container a,
.seite-admin-dashboard .action-buttons-container button {
                width: 100%;
                text-align: left;
                justify-content: flex-start;
            }


            .seite-admin-dashboard .action-cell {
                position: relative;
                /* Anchor for absolute menu */
            }


            /* Smaller Text for Mobile Table */
            .seite-admin-dashboard th,
.seite-admin-dashboard td {
                font-size: 0.85rem !important;
                padding: 8px 4px !important;
                /* Tighter padding */
            }


            .seite-admin-dashboard td:nth-child(2) strong {
                font-size: 0.95rem !important;
                /* Reduced from 1.15rem */
            }


            .seite-admin-dashboard td small {
                font-size: 0.75rem !important;
            }

        
}


        /* Desktop: Hide toggle, show buttons inline */
        @media (min-width: 769px) {

            .seite-admin-dashboard .action-toggle-mobile {
                display: none !important;
            }


            .seite-admin-dashboard .action-buttons-container {
                display: flex !important;
                justify-content: flex-end;
                gap: 4px;
            }


            /* Hide mobile stuff on desktop */
            .seite-admin-dashboard .action-toggle-mobile,
.seite-admin-dashboard .mobile-status-dot,
.seite-admin-dashboard .btn-text {
                display: none !important;
            }

        
}

/* --- aus admin/product_form.php --- */
@media (max-width: 768px) {

            .seite-admin-product-form .text-mobile-none {
                display: none !important;
            }

            .seite-admin-product-form .header-inner {
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 1rem !important;
            }

            .seite-admin-product-form .formular-aktionen {
                width: 100%;
                display: flex;
                flex-wrap: wrap; /* Safety wrap */
                justify-content: space-between;
                gap: 0.5rem;
            }

            .seite-admin-product-form .formular-aktionen .btn {
                flex: 1; /* Make buttons grow */
                justify-content: center;
            }

            /* Preview button (middle one in edit mode) keeps generic flex or can be auto? 
               If we want Back and Update to be big, and Preview small: */
            .seite-admin-product-form .formular-aktionen .aktion-vorschau {
                flex: 0 0 auto; /* Don't grow preview button too much if icon only */
            }

        
}

/* --- aus admin/settings.php --- */
/* Mobile Settings Adjustments */
        @media (max-width: 768px) {

            .seite-admin-settings .tabs-nav {
                display: flex;
                flex-wrap: wrap;
                /* Allow wrapping or scroll? Wrap is safer for fewer tabs */
                gap: 0.5rem;
            }


            .seite-admin-settings .tab-btn {
                flex: 1 1 45%;
                /* 2 per row approx */
                text-align: center;
                margin-right: 0 !important;
                padding: 0.75rem 0.5rem;
            }


            .seite-admin-settings .grid-2 {
                grid-template-columns: 1fr !important;
                gap: 1rem !important;
            }


            /* Generic Flex Rows (like Add Category, Search inputs) */
            .seite-admin-settings .flex.gap-2 {
                flex-direction: column !important;
                align-items: stretch !important;
            }


            .seite-admin-settings .flex.gap-2 button {
                width: 100%;
                margin-top: 0.25rem;
            }


            /* Specific fix for Type inputs (Code + Label) */
            .seite-admin-settings #new-type-code {
                width: 100% !important;
                margin-bottom: 0.5rem;
            }


            /* Responsive Table */
            .seite-admin-settings .table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
            }


            /* System Update File Upload */
            .seite-admin-settings input[type="file"] {
                width: 100%;
                box-sizing: border-box;
            }

        
}

/* --- aus admin/haccp/tab_pest.php --- */
/* Pest & Prevention UI Improvements */
/* ---------------------------------------------------------------------------
   KORREKTUR 17.09.2026
   Die Regeln fuer die Reiter "Monitoring" und "Einstellungen" der
   Eigenkontrolle standen unter .seite-admin-haccp-tab-pest bzw.
   .seite-admin-haccp-tab-settings. Diese Klassen vergibt die Anwendung nie:
   die Reiter werden in admin/haccp/index eingebunden, und die Seite traegt
   deshalb immer .seite-admin-haccp-index.
   Beim Herausloesen der <style>-Bloecke am 02.09. ist mir das entgangen — die
   23 Regeln waren seither wirkungslos, die beiden Reiter also unformatiert.
   Aufgefallen ist es erst, als derselbe Fehler bei neuen Regeln auftrat.
   --------------------------------------------------------------------------- */
.seite-admin-haccp-index .pest-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* very soft shadow */
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.seite-admin-haccp-index .pest-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.seite-admin-haccp-index .pest-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.seite-admin-haccp-index .pest-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.seite-admin-haccp-index .type-badge {
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.seite-admin-haccp-index .freq-badge {
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seite-admin-haccp-index .f-daily { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.seite-admin-haccp-index .f-weekly { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

.seite-admin-haccp-index .f-monthly { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }


.seite-admin-haccp-index .check-input { display: none; }

.seite-admin-haccp-index .check-btn-group {
    display: inline-flex;
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    border: 1px solid #e2e8f0;
}

.seite-admin-haccp-index .check-btn,
.seite-admin-haccp-index .check-btn-red {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.seite-admin-haccp-index .check-btn:hover,
.seite-admin-haccp-index .check-btn-red:hover {
    background: #f1f5f9;
    color: #334155;
}

.seite-admin-haccp-index .check-input:checked + .check-btn {
    background: #dcfce7;
    color: #166534;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.seite-admin-haccp-index .check-input:checked + .check-btn-red {
    background: #fee2e2;
    color: #991b1b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.seite-admin-haccp-index .quick-actions-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
}

/* --- aus admin/haccp/tab_settings.php --- */
.seite-admin-haccp-index .settings-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.seite-admin-haccp-index .settings-pill-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.seite-admin-haccp-index .settings-pill-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.seite-admin-haccp-index .settings-pill-btn.active {
    background: rgba(217, 146, 148, 0.15); /* Using the theme's rose/primary colors */
    color: var(--primary, #b91c1c);
    border-color: rgba(217, 146, 148, 0.3);
    font-weight: 600;
}

/* Ensure emoji sizing looks good */
.seite-admin-haccp-index .settings-pill-btn span {
    font-size: 1.1em;
}

/* --- aus public/home.php --- */
/* Full width hero */
    .seite-public-home .hero-full {
        background-color: #F5F5F4;
        position: relative;
        overflow: hidden;
        height: 100vh;
        display: flex;
        align-items: center;
        /* No margins for full viewport height */
        margin-top: 0;
        margin-bottom: 0;
        width: 100%;
    }


    /* Background Image limited to right side */
    .seite-public-home .hero-bg-image {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 65%;
        background-image: url('/assets/images/hero_new.jpg');
        background-size: cover;
        background-position: center;
        /* Fading mask */
        mask-image: linear-gradient(to right, transparent, black 25%);
        -webkit-mask-image: linear-gradient(to right, transparent, black 25%);
    }


    .seite-public-home .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, #F5F5F4 0%, #F5F5F4 35%, rgba(245, 245, 244, 0) 100%);
        pointer-events: none;
        z-index: 1;
    }


    /* Inner centered container for text */
    .seite-public-home .hero-inner-container {
        width: 100%;
        max-width: 1200px;
        /* Match global container max-width */
        margin: 0 auto;
        padding: 0 1rem;
        /* Match global spacing-sm */
        position: relative;
        z-index: 10;
        display: flex;
        justify-content: flex-start;
    }


    .seite-public-home .hero-content {
        max-width: 580px;
        padding: 6rem 0;
        /* Increased padding */
    }



    /* Custom Scanner Button from User Request */
    .seite-public-home .custom-scanner-btn {
        --gvid-j61szsvc1g: 1rem;
        /* Font Size */
        --gcid-pybpepzbx2: #44403c;
        /* Text Color */
        --gcid-g5ko9jqzhf: #ffffff;
        /* Background Color */
        --horizontal-gap: 10px;
        --vertical-gap: 10px;
        --gcid-lsd7gs2wp7: #a8a29e;
        /* Border Color */
        --gcid-primary-color: #D99294;
        /* Hover Color / Border */

        background-position: 50% center;
        background-repeat: no-repeat;
        cursor: pointer;
        box-sizing: border-box;
        margin: 0px;
        padding: 8px 20px !important;
        border: 2px solid var(--gcid-lsd7gs2wp7);
        outline: 0px;
        font-size: var(--gvid-j61szsvc1g) !important;
        text-size-adjust: 100%;
        vertical-align: baseline;
        background: transparent;
        color: var(--gcid-pybpepzbx2) !important;
        font-weight: 500;
        background-color: var(--gcid-g5ko9jqzhf);
        background-size: cover;
        border-radius: 25px;
        transition: all 0.3s ease;
        /* Simplified for consistency */
        line-height: 1.7em !important;
        position: relative;
        display: flex;
        column-gap: var(--horizontal-gap);
        row-gap: var(--vertical-gap);
        flex-direction: row-reverse;
        align-items: center;
        text-align: start;
        text-decoration: none;
        max-width: max-content;
        font-family: 'Inter', Helvetica, Arial, Lucida, sans-serif;
    }


    .seite-public-home .custom-scanner-btn:hover {
        text-decoration: none;
        background-color: var(--gcid-g5ko9jqzhf);
        opacity: 1;
        border-color: var(--gcid-primary-color);
        color: var(--gcid-primary-color) !important;
        line-height: 1.7em !important;
        /* Keep line-height stable to prevent jumping */
    }


    @media (max-width: 768px) {

        .seite-public-home .home-actions {
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 1.5rem !important;
        }


        .seite-public-home .search-form {
            flex-direction: column !important;
            max-width: none !important;
            padding: 1rem !important;
            gap: 0.5rem;
        }


        .seite-public-home .search-form input {
            width: 100% !important;
            box-sizing: border-box;
            text-align: center;
            border-bottom: 1px solid #eee !important;
            margin-bottom: 0.5rem;
        }


        .seite-public-home .search-form button {
            width: 100% !important;
            justify-content: center;
            padding: 0.75rem !important;
        }


        .seite-public-home .custom-scanner-btn {
            width: 100% !important;
            max-width: none !important;
            justify-content: center !important;
            padding: 1rem !important;
        }

    
}

/* --- aus public/magic_form.php --- */
.seite-public-magic-form :root {
            --primary: #9d3e51; /* Assuming ATRIUM pink/red primary based on UI */
            --success: #10b981; /* Modern green */
            --bg: #f8fafc;
            --card-bg: #ffffff;
            --text: #1e293b;
            --muted: #64748b;
            
            /* Frequency Colors matching Dashboard */
            --weekly-bg: #e0f2fe;
            --weekly-border: #7dd3fc;
            --weekly-text: #0369a1;
            
            --monthly-bg: #f1f5f9;
            --monthly-border: #cbd5e1;
            --monthly-text: #334155;
        }

        .seite-public-magic-form * {
            box-sizing: border-box;
        }

        body.seite-public-magic-form {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg);
            color: var(--text);
            margin: 0;
            padding: 20px 15px 40px;
            -webkit-font-smoothing: antialiased;
        }

        .seite-public-magic-form .container {
            max-width: 480px;
            margin: 0 auto;
        }

        .seite-public-magic-form .logo-container {
            text-align: center;
            margin-bottom: 25px;
        }

        .seite-public-magic-form .logo-container img {
            max-height: 45px;
        }

        .seite-public-magic-form h1 {
            font-size: 22px;
            text-align: center;
            font-weight: 700;
            margin: 0 0 5px 0;
            letter-spacing: -0.5px;
        }

        .seite-public-magic-form .subtitle {
            text-align: center;
            color: var(--muted);
            margin-bottom: 30px;
            font-size: 14px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: inline-block;
            background: #e2e8f0;
            padding: 4px 12px;
            border-radius: 20px;
            margin-left: auto;
            margin-right: auto;
            display: block;
            width: fit-content;
        }

        .seite-public-magic-form .card {
            background-color: var(--card-bg);
            border-radius: 16px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.03), 0 10px 25px rgba(0,0,0,0.03);
            padding: 20px;
            margin-bottom: 20px;
            border: 1px solid rgba(0,0,0,0.05);
        }

        .seite-public-magic-form .card-title {
            margin-top: 0;
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .seite-public-magic-form .device-group {
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #f1f5f9;
        }

        .seite-public-magic-form .device-group:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .seite-public-magic-form .device-name {
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .seite-public-magic-form .target-temp {
            font-size: 13px;
            color: var(--muted);
            font-weight: 500;
            background: #f1f5f9;
            padding: 3px 8px;
            border-radius: 6px;
        }

        .seite-public-magic-form .temp-input-wrapper {
            display: flex;
            align-items: center;
            gap: 15px;
            background: #f8fafc;
            padding: 8px;
            border-radius: 14px;
            border: 1px solid #e2e8f0;
        }

        .seite-public-magic-form .btn-stepper {
            background: white;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            width: 50px;
            height: 50px;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text);
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            transition: all 0.1s;
        }

        .seite-public-magic-form .btn-stepper:active {
            background: #f1f5f9;
            transform: scale(0.95);
        }

        .seite-public-magic-form input[type="number"] {
            flex: 1;
            height: 50px;
            border: none;
            background: transparent;
            text-align: center;
            font-size: 26px;
            font-weight: 700;
            letter-spacing: -1px;
            color: var(--text);
            -moz-appearance: textfield;
            padding: 0;
        }

        .seite-public-magic-form input[type="number"]:focus {
            outline: none;
        }

        .seite-public-magic-form input[type="number"]::-webkit-outer-spin-button,
.seite-public-magic-form input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Toggle Switch */
        .seite-public-magic-form .task-item {
            display: flex;
            align-items: flex-start;
            gap: 15px;
            padding: 16px;
            background: white;
            border-radius: 12px;
            margin-bottom: 12px;
            border: 1px solid #e2e8f0;
            transition: all 0.2s ease;
        }

        .seite-public-magic-form .task-item:last-child {
            margin-bottom: 0;
        }

        .seite-public-magic-form .task-item.freq-weekly {
            background: var(--weekly-bg);
            border: 1px solid var(--weekly-border);
        }

        .seite-public-magic-form .task-item.freq-monthly {
            background: var(--monthly-bg);
            border: 1px solid var(--monthly-border);
        }

        .seite-public-magic-form .task-content {
            flex: 1;
        }

        .seite-public-magic-form .task-label {
            font-size: 15px;
            line-height: 1.4;
            color: var(--text);
            cursor: pointer;
            user-select: none;
        }

        .seite-public-magic-form .task-item.freq-weekly .task-label { color: var(--weekly-text); }

        .seite-public-magic-form .task-item.freq-monthly .task-label { color: var(--monthly-text); }

        
        .seite-public-magic-form .task-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 3px 8px;
            border-radius: 4px;
            margin-bottom: 6px;
            background: #e2e8f0;
            color: #475569;
        }

        .seite-public-magic-form .task-item.freq-weekly .task-badge { background: #bae6fd; color: #0369a1; }

        .seite-public-magic-form .task-item.freq-monthly .task-badge { background: #cbd5e1; color: #334155; }

        .seite-public-magic-form .task-item.primary-task .task-badge { background: #dcfce7; color: #166534; }


        /* iOS style toggle */
        .seite-public-magic-form .toggle-switch {
            position: relative;
            display: inline-block;
            width: 52px;
            height: 30px;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .seite-public-magic-form .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .seite-public-magic-form .slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: #cbd5e1;
            transition: .3s;
            border-radius: 30px;
        }

        .seite-public-magic-form .slider:before {
            position: absolute;
            content: "";
            height: 24px;
            width: 24px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

        .seite-public-magic-form input:checked + .slider {
            background-color: var(--success);
        }

        .seite-public-magic-form input:checked + .slider:before {
            transform: translateX(22px);
        }


        .seite-public-magic-form .btn-submit {
            background: #1e293b; /* Dark, classy button */
            color: white;
            border: none;
            width: 100%;
            padding: 18px;
            border-radius: 12px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            transition: transform 0.1s, background 0.2s;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        .seite-public-magic-form .btn-submit:active {
            transform: scale(0.97);
            background: #0f172a;
        }

        /* Sticky footer for submit */
        .seite-public-magic-form .submit-wrapper {
            position: sticky;
            bottom: 20px;
            z-index: 10;
        }

/* --- aus public/product_detail.php --- */
.seite-public-product-detail .product-header-mobile {
                display: flex;
                justify-content: space-between;
                align-items: start;
                flex-wrap: wrap;
                margin-bottom: 2rem;
            }


            .seite-public-product-detail .product-image-container {
                width: auto;
                max-width: 100%;
                text-align: center;
                /* Centers inline image */
                margin-top: 1rem;
            }


            .seite-public-product-detail .detail-image {
                max-height: 200px;
                /* Default Desktop */
                border-radius: 8px;
                box-shadow: none !important;
                /* Remove shadow */
            }


            /* Admin Buttons Mobile */
            @media (max-width: 768px) {


                /* ... (keep existing container styles) ... */
                .seite-public-product-detail .produkt-kopfleiste {
                    flex-direction: column-reverse;
                    align-items: stretch !important;
                    gap: 1.5rem;
                }


                .seite-public-product-detail .produkt-kopfleiste > div {
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    gap: 0.75rem;
                }


                .seite-public-product-detail .produkt-kopfleiste > a.btn-text {
                    text-align: center;
                    padding: 0.5rem;
                }


                .seite-public-product-detail .btn-outline {
                    width: 100%;
                    padding: 0.75rem;
                    font-size: 1rem;
                    text-align: center;
                    justify-content: center;
                }


                .seite-public-product-detail .product-image-container {
                    width: 100%;
                    margin-top: 1.5rem;
                }


                .seite-public-product-detail .detail-image {
                    max-height: 180px;
                    /* Smaller height on mobile */
                    max-width: 60%;
                    /* Restrict width so it doesn't fill screen if image is wide */
                    height: auto;
                    box-shadow: none !important;
                }


                .seite-public-product-detail .card {
                    padding: 1.5rem !important;
                    /* Less padding on mobile card */
                }


                .seite-public-product-detail h1 {
                    font-size: 2rem !important;
                    /* Smaller Title */
                }

            
}

        

            .seite-public-product-detail .grid-2-mobile {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 4rem;
            }


            @media(max-width:768px) {

                .seite-public-product-detail .grid-2-mobile {
                    grid-template-columns: 1fr;
                    gap: 2rem !important;
                }


                .seite-public-product-detail .container-narrow {
                    padding: 0 1rem;
                }

            
}

        

                .seite-public-product-detail .ingredients-block {
                    margin-top: 2.5rem;
                    padding-top: 1.5rem;
                    border-top: 1px solid #e7e5e4;
                }


                .seite-public-product-detail .ingredients-text {
                    margin: 0.75rem 0 0;
                    line-height: 1.7;
                    color: var(--color-text);
                }


                .seite-public-product-detail .ingredients-text strong {
                    font-weight: 600;
                }

/* --- aus public/scan.php --- */
/* Hides navbar and footer on this page specifically (optional, depending on layout structure) */
    /* Assuming layout wraps this in a container, we break out with fixed position */
    body.seite-public-scan {
        margin: 0;
        background: #000;
        overflow: hidden;
        /* Prevent scroll on valid scan page */
    }


    /* Hide layout elements if possible via CSS isolation or JS */
    .seite-public-scan header,
.seite-public-scan footer,
.seite-public-scan .container {
        /* This is risky if scoping isn't perfect, but fixed overlay covers them anyway */
    }

/* --- aus public/search_results.php --- */
.seite-public-search-results .search-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }


    @media (max-width: 768px) {

        .seite-public-search-results .search-header-mobile {
            flex-direction: column;
            align-items: stretch;
            text-align: center;
        }


        .seite-public-search-results .search-header-mobile .btn {
            width: 100%;
            text-align: center;
            padding: 0.75rem;
        }

    
}

/* Meldungsleiste (Befund A7)
   Erscheint nur, wenn eine Meldung vorliegt — im Normalbetrieb sieht man sie nicht. */
.meldungsleiste {
    margin-top: 16px;
    margin-bottom: -8px;
}

.meldung {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.meldung-fehler {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.meldung-erfolg {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Ablaufprotokoll des Update-Knopfs (Befund D2).
   Erscheint nur nach einem Klick auf "Datenbank & System aktualisieren". */
.seite-admin-settings .update-protokoll {
    list-style: none;
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #57534e;
}

.seite-admin-settings .update-protokoll li {
    padding-left: 14px;
    position: relative;
}

.seite-admin-settings .update-protokoll li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #a8a29e;
}

/* Lebenszeichen des automatischen Aufrufs (Cronjob) in den
   HACCP-Benachrichtigungen. Macht einen stillen Ausfall sichtbar. */
.seite-admin-haccp-index .cron-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.seite-admin-haccp-index .cron-status.cron-ok {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.seite-admin-haccp-index .cron-status.cron-warnung {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.seite-admin-haccp-index .cron-adresse {
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, .05);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Mehrtages-Nachtrag (Reiter "Nachtrag" in der Eigenkontrolle) */
.seite-admin-haccp-index .nachtrag-hinweis {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #854d0e;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 16px 0 0;
}

.seite-admin-haccp-index .nachtrag-zeitraum {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.seite-admin-haccp-index .nachtrag-zeitraum label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #57534e;
}

.seite-admin-haccp-index .nachtrag-zeitraum .form-control {
    width: 170px;
}

.seite-admin-haccp-index .nachtrag-kopf {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.seite-admin-haccp-index .pflicht {
    color: #b91c1c;
}

.seite-admin-haccp-index .nachtrag-tabelle th {
    font-size: 0.8rem;
    line-height: 1.3;
    vertical-align: bottom;
}

.seite-admin-haccp-index .nachtrag-tabelle .geraet-grenze {
    font-weight: 400;
    color: #a8a29e;
    font-size: 0.72rem;
    margin-top: 2px;
}

.seite-admin-haccp-index .nachtrag-tabelle .spalte-tag {
    white-space: nowrap;
    font-size: 0.85rem;
}

.seite-admin-haccp-index .nachtrag-tabelle tr.wochenende {
    background: #fafaf9;
}

.seite-admin-haccp-index .nachtrag-feld {
    width: 78px;
    padding: 6px 8px;
    text-align: center;
}

.seite-admin-haccp-index .schon-erfasst {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f5f5f4;
    color: #78716c;
    font-size: 0.85rem;
}

.seite-admin-haccp-index .spalte-reinigung {
    text-align: center;
}

.seite-admin-haccp-index .nachtrag-fuss {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

/* "Erste Zeile auf alle Tage uebernehmen" — Hilfsknopf unter der Tabelle. */
.seite-admin-haccp-index .nachtrag-uebernehmen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    background: #fafaf9;
}

.seite-admin-haccp-index .nachtrag-uebernehmen p {
    flex: 1 1 320px;
    margin: 0;
}

.seite-admin-haccp-index .nachtrag-versteckt {
    display: none;
}

/* Uebernommene Felder bleiben sichtbar markiert, bis gespeichert wird. */
.seite-admin-haccp-index .nachtrag-feld.nachtrag-uebernommen {
    background: #fef9c3;
    border-color: #facc15;
}

.seite-admin-haccp-index input[type="checkbox"].nachtrag-uebernommen {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}

.seite-admin-haccp-index .uebernahme-warnung {
    color: #b45309;
}

.seite-admin-haccp-index .uebernahme-ok {
    color: #3f6212;
}

@media (max-width: 900px) {
    .seite-admin-haccp-index .nachtrag-kopf {
        grid-template-columns: 1fr;
    }
}
