/*
 * Modern Analyzer Design – v2 (Inter + Pill-Nav + Frosted Glass)
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

:root {
    --bg-light: #f1f3f4;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text-dark: #111827;
    --text-secondary: #374151;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --accent-yellow: #fbbf24;
    --accent-yellow-dark: #f59e0b;
    --accent-primary: #f59e0b;
    --border-light: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.09);
    --radius: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; /* Inter OpenType-Features */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 0.9em;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-light);
}

.login-box {
    background: var(--bg-white);
    padding: 40px 36px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

body.dark-theme .login-page {
    background: var(--bg-primary, #0f172a);
}

.login-title { 
    text-align: center; 
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-dark);
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: var(--sidebar-bg, #ffffff);
    border-right: 1px solid var(--sidebar-border, #e8e8e8);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-title {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--sidebar-text, var(--text-dark));
}

.nav-menu {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.nav-menu:hover {
    scrollbar-color: rgba(251, 191, 36, 0.3) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-menu:hover::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.35);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 1px 8px;
    border-radius: 8px;
    color: var(--sidebar-text-muted, var(--text-gray));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92em;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.nav-section-header {
    padding: 10px 20px 4px 20px;
    font-size: 0.65em;
    font-weight: 700;
    color: var(--sidebar-section-color, var(--text-light));
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 8px;
}

.nav-section-header:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 6px;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.nav-item.active {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.nav-item.active .nav-item-icon {
    opacity: 1;
}

.nav-item-icon {
    margin-right: 9px;
    font-size: 1.05em;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 220px;
    background: var(--bg-light);
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Header */
.page-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 60px;
    box-sizing: border-box;
}

.page-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.project-selector {
    padding: 7px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.875em;
    cursor: pointer;
    transition: all 0.2s;
}

.project-selector:hover {
    border-color: var(--accent-yellow);
}

/* Content Area */
.page-content {
    padding: 24px 32px;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    transform: translateY(-1px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* List Items (wie im Screenshot) */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 50px;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
    cursor: pointer;
}

.item-row:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-yellow);
}

.item-row.highlighted {
    background: #fbbf24; /* Fester Gelb-Ton */
    border: none;
    color: var(--text-dark);
    font-weight: 600;
}

.item-label {
    font-size: 0.8em;
    color: var(--text-gray);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
}

.item-row.highlighted .item-label,
.item-row.highlighted .item-value {
    color: var(--text-dark);
}

.item-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
}

.item-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.item-status.complete {
    background: #d1fae5;
    color: #065f46;
}

.item-status.partial {
    background: #fde68a;
    color: #78350f;
}

.item-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.item-row:hover .item-arrow {
    background: var(--accent-yellow);
    transform: translateX(4px);
}

.item-row.highlighted .item-arrow {
    background: rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #1a1100;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.38);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--accent-yellow);
    background: rgba(251, 191, 36, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.875em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.875em;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: transparent;
}

.table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.79em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-light);
}

.table td {
    padding: 10px 12px;
    border-top: 1px solid var(--border-light);
    color: var(--text-dark);
}

.table tbody tr:hover {
    background: rgba(251, 191, 36, 0.05);
}

.table tfoot td {
    text-decoration: none !important;
    border-top: 2px solid var(--accent-yellow);
}

.table tfoot td * {
    text-decoration: none !important;
}

/* Summary Grid */
.summary {
    margin-bottom: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--bg-white);
    padding: 18px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fcd34d, #f59e0b);
    border-radius: 10px 10px 0 0;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(251, 191, 36, 0.3);
}

.summary-card > div:first-child {
    color: var(--text-gray);
    font-size: 0.78em;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.summary-value {
    font-size: 2.3em;
    font-weight: 800;
    color: var(--accent-yellow-dark);
    letter-spacing: -0.02em;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
    font-size: 1.1em;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 200;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .item-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page-content {
        padding: 12px;
    }

    /* Mobile-Hamburger (falls vorhanden) */
    .mobile-menu-btn {
        display: flex !important;
    }

    /* Page-Header stapeln */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 16px;
    }
    .header-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .page-title {
        font-size: 1.2em;
    }

    /* Summary-Karten: 2 Spalten auf Mobile */
    .summary-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    /* Dashboard Quick-Cards: 2 Spalten */
    #pageDashboard .page-content > div:first-child {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Menüplan: Touch-friendly, volle Breite */
    .menuplan-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .menuplan-week-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
        min-width: unset !important;
    }
    .menuplan-day-col {
        min-width: 160px;
    }
    .menuplan-menu-item {
        font-size: 0.88em;
    }
    .menuplan-menutype {
        font-size: 0.85em;
    }

    /* Menüplan-Wochenbar */
    .menuplan-week-bar {
        flex-direction: column;
        gap: 6px;
    }
    .menuplan-week-bar-title {
        font-size: 1em;
    }

    /* Tabellen horizontal scrollbar */
    .table-responsive, .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modal: volle Breite */
    .modal-content {
        max-width: 98vw !important;
        margin: 4px;
    }

    /* Form-Grid auf Mobile: 1 Spalte */
    .form-grid-2, [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile-Hamburger Button (standardmäßig versteckt) */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 300;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── Mobile Küchen-Modus: extra große Schrift ─────────────────────────── */
@media (max-width: 480px) {
    .menuplan-week-grid {
        grid-template-columns: 1fr !important;
    }
    .menuplan-menu-item {
        font-size: 1em;
        padding: 10px;
    }
    .menuplan-menutype {
        font-size: 1em;
        font-weight: 700;
    }
    .menuplan-component-name {
        font-size: 0.95em;
    }
    .menuplan-day-name {
        font-size: 1.1em;
    }
    .menuplan-day-date {
        font-size: 0.95em;
    }
    .btn {
        padding: 10px 14px;
        font-size: 0.95em;
    }
    .summary-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.gap-2 { gap: 20px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95em;
    display: none;
}

.alert.show {
    display: block;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Upload Box */
.upload-box {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* Modal Dialogs */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.modal-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.modal-body {
    color: var(--text-dark);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Permission Checkboxes */
.permission-group {
    margin-top: 20px;
}

.permission-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.1em;
}

.permission-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.2s;
}

.permission-item:hover {
    background: rgba(251, 191, 36, 0.1);
}

.permission-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.permission-item label {
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
}

/* FORCE OVERRIDE - Fix für inline Dark Styles */
#results *, 
#usersList *,
#projectsList *,
#settingsContent *,
.modal * {
    color: var(--text-dark) !important;
}

#results h3,
#results h4,
.modal h3,
.modal h4 {
    color: var(--text-dark) !important;
}

/* Fix für Select-Felder */
select {
    background: var(--bg-white) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-light) !important;
}

/* Fix für Checkboxen-Labels */
label {
    color: var(--text-dark) !important;
}

/* Fix für spezifische Elemente mit inline styles */
[style*="color:#d1fae5"],
[style*="color:#6ee7b7"],
[style*="color:#86efac"],
[style*="color:#67e8f9"] {
    color: var(--text-dark) !important;
}

/* Delivery Overview Styles */
.delivery-customer {
    transition: all 0.2s ease;
}

.delivery-customer:hover {
    box-shadow: var(--shadow-hover);
}

.delivery-customer-header:hover {
    background: rgba(251, 191, 36, 0.05);
    border-radius: 8px;
    margin: -5px;
    padding: 10px !important;
}

.delivery-department {
    transition: all 0.2s ease;
}

.delivery-dept-header:hover {
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    margin: -8px;
    padding: 8px !important;
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
    color: var(--accent-yellow);
    font-size: 0.9em;
}

/* ============================================
   DARK THEME
   ============================================ */
body.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-light: #334155;
    --bg-white: #1e293b;
    --text-dark: #f1f5f9;
    --text-gray: #94a3b8;
    --border-light: #475569;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 15px rgba(0,0,0,0.4);
    /* Sidebar dark-theme variables */
    --sidebar-bg: var(--bg-primary);
    --sidebar-border: rgba(255,255,255,0.07);
    --sidebar-text: #f0f0f0;
    --sidebar-text-muted: #8a8a98;
    --sidebar-section-color: #4a4a58;
}

body.dark-theme {
    background: var(--bg-primary);
    color: var(--text-dark);
}

body.dark-theme .sidebar {
    background: var(--sidebar-bg);
    border-right-color: var(--sidebar-border);
}

body.dark-theme .card {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-dark);
}

body.dark-theme .card:hover {
    border-color: rgba(251, 191, 36, 0.25);
}

body.dark-theme .page-header {
    background: rgba(15, 23, 42, 0.82);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: var(--bg-light);
    border-color: var(--border-light);
    color: var(--text-dark);
}

body.dark-theme .table th {
    background: var(--bg-light);
    color: var(--text-gray);
}

body.dark-theme .table td {
    border-color: var(--border-light);
    color: var(--text-dark);
}

body.dark-theme .modal-content {
    background: var(--bg-secondary);
    color: var(--text-dark);
}

body.dark-theme .nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #f1f5f9;
}

body.dark-theme .nav-item.active {
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
}

/* Weekday Checkboxes */
.weekday-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}

.weekday-checkbox:hover {
    border-color: var(--accent-yellow);
}

.weekday-checkbox:has(input:checked) {
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
    color: #000;
    font-weight: 600;
}

.weekday-checkbox input {
    margin: 0;
}

/* Delivery Address Cards */
.delivery-addr-day {
    margin-bottom: 25px;
}

.delivery-addr-day-header {
    background: #f59e0b; /* Fester Orange-Ton */
    color: #000;
    padding: 12px 20px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-addr-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-top: none;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.delivery-addr-card:last-child {
    border-radius: 0 0 10px 10px;
}

.delivery-addr-card.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.addr-section {
    padding: 10px;
    background: var(--bg-light);
    border-radius: 6px;
}

.addr-section h5 {
    margin: 0 0 8px;
    font-size: 0.85em;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.addr-section .addr-line {
    margin: 3px 0;
    font-size: 0.95em;
}

.addr-missing {
    color: #dc2626;
    font-weight: 600;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.report-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.report-card.inactive {
    opacity: 0.7;
}

.report-card.inactive .report-card-header {
    background: #9ca3af; /* Fester Grau-Ton */
}

.report-card-header {
    background: #3b82f6; /* Fester Blau-Ton */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-card-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.report-status {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    color: white;
}

.report-card-body {
    padding: 20px;
}

.report-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.report-info-row:last-child {
    margin-bottom: 0;
}

.report-label {
    color: var(--text-gray);
    flex-shrink: 0;
    margin-right: 10px;
}

.report-value {
    text-align: right;
    word-break: break-word;
}

.report-card-actions {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    justify-content: flex-end;
}

.report-card-actions .btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
}

/* ========================================
   MENÜPLAN LAYOUT
   ======================================== */

.menuplan-container {
    width: 100%;
    overflow-x: auto;
}

.menuplan-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    min-width: 1200px;
}

/* ── Wochen-Kopfleiste ── */
.menuplan-week-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.menuplan-week-bar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menuplan-week-bar-eyebrow {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-gray);
}

.menuplan-week-bar-title {
    margin: 0;
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text-dark);
}

.menuplan-week-bar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.menuplan-info-name {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-dark);
}

.menuplan-info-fetch {
    font-size: 0.82em;
    color: var(--text-gray);
}

/* ── Tag-Spalte ── */
.menuplan-day-col {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.menuplan-day-col.menuplan-today {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15), 0 2px 8px rgba(0,0,0,0.07);
}

.menuplan-day-col.menuplan-weekend {
    background: #fafafa;
}

/* Tag-Header: kein Farbhintergrund, nur cleane Trennlinie */
.menuplan-day-header {
    padding: 10px 12px 8px;
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-light);
}

.menuplan-day-col.menuplan-today .menuplan-day-header {
    border-bottom-color: #3b82f6;
    background: rgba(59,130,246,0.04);
}

.menuplan-day-col.menuplan-weekend .menuplan-day-header {
    background: #f8fafc;
}

.menuplan-day-name {
    display: block;
    font-weight: 700;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-gray);
    margin-bottom: 1px;
}

.menuplan-day-col.menuplan-today .menuplan-day-name {
    color: #3b82f6;
}

.menuplan-day-date {
    display: block;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.2px;
}

.menuplan-day-content {
    padding: 10px 8px;
}

.menuplan-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-light);
    font-size: 1.4em;
}

/* ── Mahlzeitenklasse ── */
.menuplan-class-group {
    margin-bottom: 12px;
}

.menuplan-class-group:last-child {
    margin-bottom: 0;
}

.menuplan-class-label {
    font-weight: 700;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0ea5e9;
    margin-bottom: 6px;
    padding: 3px 6px;
    background: rgba(99,102,241,0.08);
    border-left: 3px solid #0ea5e9;
    border-radius: 0 4px 4px 0;
}

/* ── Menüeintrag-Karte ── */
.menuplan-menu-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 8px 10px;
    border-radius: 7px;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.menuplan-menu-item:last-child {
    margin-bottom: 0;
}

.menuplan-menutype {
    font-weight: 700;
    font-size: 0.88em;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

/* ── Komponenten-Liste ── */
.menuplan-components {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
}

.menuplan-components li {
    padding: 2px 0;
    font-size: 0.82em;
    color: var(--text-body);
    border-bottom: 1px dashed var(--border-light);
    list-style: none;
}

.menuplan-components li:last-child {
    border-bottom: none;
}

.menuplan-header-image {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 7px;
    display: block;
}

.menuplan-component-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.menuplan-item-image {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.menuplan-item-name {
    flex: 1;
    min-width: 0;
}

.menuplan-item-qty {
    flex-shrink: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text-gray);
    font-size: 0.9em;
    white-space: nowrap;
}

.menuplan-item-unit {
    flex-shrink: 0;
    min-width: 24px;
    color: var(--text-light);
    font-size: 0.82em;
    white-space: nowrap;
}

/* ── Nährwerte ── */
.menuplan-nutrients {
    font-size: 0.73em;
    color: #6b7280;
    margin-top: 5px;
    padding: 3px 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    letter-spacing: 0.01em;
}

.menuplan-item-weight {
    font-size: 0.78em;
    color: #9ca3af;
    margin-left: 3px;
}

/* ── Meta-Zeile (Allergene + Preise) ── */
.menuplan-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid var(--border-light);
}

/* ── Allergen-Badges ── */
.menuplan-allergen-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
}

.menuplan-allergen-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 800;
    color: white;
    cursor: default;
    line-height: 1;
}

.allergen-A { background: #f59e0b; }   /* Gluten – Amber */
.allergen-B { background: #ef4444; }   /* Krebstiere – Rot */
.allergen-C { background: #eab308; }   /* Eier – Gelb */
.allergen-D { background: #3b82f6; }   /* Fische – Blau */
.allergen-E { background: #92400e; }   /* Erdnüsse – Braun */
.allergen-F { background: #16a34a; }   /* Soja – Grün */
.allergen-G { background: #06b6d4; }   /* Milch – Cyan */
.allergen-H { background: #6b7280; }   /* Schalenfrüchte – Grau */
.allergen-L { background: #65a30d; }   /* Sellerie – Olivgrün */
.allergen-M { background: #d97706; }   /* Senf – Dunkelamber */
.allergen-N { background: #94a3b8; }   /* Sesam – Hellgrau */
.allergen-O { background: #f97316; }   /* Sulfite – Orange */
.allergen-P { background: #0891b2; }   /* Lupinen – Cyan */
.allergen-R { background: #14b8a6; }   /* Weichtiere – Teal */

/* ── Preise ── */
.menuplan-price {
    font-size: 0.76em;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(16,185,129,0.12);
    color: #059669;
    white-space: nowrap;
}

.menuplan-price-vk {
    background: rgba(37,99,235,0.1);
    color: #2563eb;
}

.menuplan-price-tax {
    background: rgba(107,114,128,0.1);
    color: #6b7280;
    font-weight: 500;
}

/* ── Allergen-Legende ── */
.menuplan-allergen-legend {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.menuplan-allergen-legend-title {
    font-weight: 700;
    font-size: 0.9em;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.menuplan-allergen-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 7px;
}

.menuplan-allergen-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-body);
}

.menuplan-allergen-legend-name {
    line-height: 1.2;
}

@media (max-width: 1400px) {
    .menuplan-week-grid {
        min-width: 1000px;
    }
}

@media (max-width: 1200px) {
    .menuplan-week-grid {
        grid-template-columns: repeat(5, 1fr);
        min-width: 900px;
    }
}

@media (max-width: 900px) {
    .menuplan-week-grid {
        grid-template-columns: repeat(3, 1fr);
        min-width: 700px;
    }
}

@media (max-width: 600px) {
    .menuplan-week-grid {
        grid-template-columns: 1fr;
        min-width: unset;
    }
}

/* ── View-Toggle (Woche/Tag) ── */
.mp-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 4px;
}
.mp-view-btn {
    padding: 6px 16px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.mp-view-btn.mp-view-active {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ── Gewicht-Badges ── */
.mp-weight-comp {
    margin-left: 6px;
    font-size: 0.78em;
    font-weight: 600;
    color: #0ea5e9;
    background: rgba(99,102,241,0.1);
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}
.mp-weight-total {
    font-size: 0.8em;
    color: #0ea5e9;
    font-weight: 600;
    margin: 4px 0 2px;
    padding: 3px 8px;
    background: rgba(99,102,241,0.08);
    border-radius: 6px;
    display: inline-block;
}

/* ── Tagesansicht ── */
.mp-day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 2px 10px;
    scroll-snap-type: x mandatory;
}
.mp-day-tabs::-webkit-scrollbar { display: none; }

.mp-day-tab {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.18s;
    scroll-snap-align: start;
    position: relative;
    min-width: 64px;
}
.mp-day-tab:hover {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.05);
}
.mp-day-tab-active {
    border-color: #3b82f6 !important;
    background: #3b82f6 !important;
    color: white;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}
.mp-day-tab-today:not(.mp-day-tab-active) {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.07);
}
.mp-day-tab-weekend {
    opacity: 0.65;
}
.mp-day-tab-empty {
    opacity: 0.45;
}
.mp-day-tab-name {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mp-day-tab-date {
    font-size: 0.95em;
    font-weight: 600;
}
.mp-day-tab-dot {
    position: absolute;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
}
.mp-day-tab-active .mp-day-tab-dot {
    background: rgba(255,255,255,0.8);
}

/* ── Nav Prev/Next ── */
.mp-day-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.mp-day-nav-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-body);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.mp-day-nav-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    color: #3b82f6;
}
.mp-day-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ── Tages-Hero ── */
.mp-day-content {
    touch-action: pan-y;
}
.mp-day-hero {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}
.mp-day-hero-name {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--text-dark);
}
.mp-day-hero-date {
    font-size: 0.95em;
    color: var(--text-gray);
}
.mp-day-today-badge {
    margin-left: auto;
    padding: 3px 12px;
    background: #f59e0b;
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
}

/* ── Klassen-Gruppe ── */
.mp-day-class-group {
    margin-bottom: 24px;
}
.mp-day-class-label {
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-gray);
    margin-bottom: 10px;
    padding-left: 2px;
}
.mp-day-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

/* ── Tag-Karte ── */
.mp-day-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.mp-day-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.mp-day-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.mp-day-card-body {
    padding: 16px;
}
.mp-day-card-menutype {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.mp-day-components {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mp-day-component-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88em;
    padding: 4px 0;
    border-bottom: 1px solid var(--bg-light);
}
.mp-day-component-row:last-child {
    border-bottom: none;
}
.mp-day-item-name {
    flex: 1;
    color: var(--text-body);
}
.mp-day-item-amt {
    font-size: 0.85em;
    color: var(--text-gray);
    white-space: nowrap;
}
.mp-day-weight-total {
    font-size: 0.85em;
    color: #0ea5e9;
    font-weight: 600;
    margin: 8px 0 4px;
    padding: 5px 10px;
    background: rgba(99,102,241,0.08);
    border-radius: 8px;
}
.mp-day-nutrients {
    font-size: 0.8em;
    color: var(--text-gray);
    margin-top: 6px;
    padding: 5px 8px;
    background: var(--bg-light);
    border-radius: 6px;
    line-height: 1.5;
}
.mp-day-order-row {
    margin-top: 12px;
}
.mp-day-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    font-size: 1em;
}

@media (max-width: 600px) {
    .mp-day-cards {
        grid-template-columns: 1fr;
    }
    .mp-day-tab {
        padding: 8px 12px;
        min-width: 52px;
    }
}

/* ========================================
   WOCHENVERGLEICH
   ======================================== */

.cmp-week-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cmp-week-selector label {
    font-size: 0.78em;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.cmp-week-selector select {
    width: 160px;
    padding: 7px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.875em;
    background: var(--bg-white);
    color: var(--text-dark);
}

.cmp-count-btn.active {
    background: var(--accent-yellow);
    color: var(--text-dark);
    border-color: var(--accent-yellow);
}

.cmp-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 12px;
}
.cmp-hide-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875em;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}
.cmp-hide-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 15px;
    height: 15px;
    accent-color: var(--accent-primary, #f59e0b);
}

.cmp-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    min-width: 600px;
    font-size: 0.85em;
}

.cmp-th-left {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 220px;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 2px solid var(--border-light);
}

.cmp-th-week {
    text-align: center;
    padding: 10px 12px;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.85em;
    min-width: 130px;
    border-left: 1px solid var(--border-light);
}

.cmp-week-dates {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-gray);
}
.cmp-plan-name {
    font-size: 0.78em;
    font-weight: 500;
    color: var(--accent-primary, #f59e0b);
    display: block;
    margin-top: 2px;
    white-space: normal;
    word-break: break-word;
}

/* Tages-Zeile */
.cmp-row-day td {
    background: #f0f0f0;
    padding: 7px 14px;
    border-top: 2px solid var(--border-light);
}
body.dark-theme .cmp-row-day td {
    background: var(--bg-light);
}

.cmp-day-name {
    font-weight: 700;
    font-size: 0.92em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
}

/* Menütyp-Zeile */
.cmp-row-menu td {
    background: rgba(251,191,36,0.07);
    border-top: 1px solid var(--border-light);
    padding: 0;
    vertical-align: top;
}

.cmp-menu-label {
    font-weight: 600;
    color: var(--text-dark);
    position: sticky;
    left: 0;
    background: rgba(251,191,36,0.1);
    border-right: 2px solid var(--border-light);
    z-index: 1;
    padding: 10px 12px;
}

/* KW-Zelle: WES-Heading + Komponenten */
.cmp-cell-content {
    border-left: 1px solid var(--border-light);
    padding: 8px 12px;
    vertical-align: top;
}

.cmp-wes-header {
    font-weight: 700;
    font-size: 0.88em;
    color: var(--text-dark);
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--border-light);
}

.cmp-items-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}

.cmp-item-row {
    font-size: 0.82em;
    color: var(--text-gray);
    white-space: nowrap;
}

.cmp-cell-label {
    font-size: 0.88em;
}

.cmp-missing {
    color: var(--text-light);
    font-style: italic;
}
.cmp-item-present {
    font-weight: 600;
}
.cmp-table.hide-missing-items .cmp-item-row.cmp-missing {
    display: none;
}

/* Abweichungs-Farben */
.cmp-higher {
    color: #dc2626;
    font-weight: 600;
}
.cmp-lower {
    color: #16a34a;
    font-weight: 600;
}

/* ========================================
   MENÜPLAN WARENKORB
   ======================================== */

/* ── Qty-Eingabe in Menükarte ── */
.menuplan-order-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-light);
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    line-height: 1;
}
.qty-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.qty-input {
    width: 52px;
    text-align: center;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 4px 4px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-white);
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.15); }

/* ── Vorbestellung-Badge (load_preorder Anzeige) ── */
.menuplan-preorder-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 9px;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    color: #1d4ed8;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.01em;
}
[data-theme="dark"] .menuplan-preorder-badge {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.4);
    color: #93c5fd;
}

/* ── Floating Cart Button ── */
.cart-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.cart-float-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(59,130,246,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cart-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.55);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.65em;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

/* ── Warenkorb-Panel (Slide-in rechts) ── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 380px;
    max-width: 100vw;
    background: var(--bg-white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 700;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.cart-panel.open {
    transform: translateX(0);
}

.cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-dark);
    flex-shrink: 0;
}

.cart-panel-close {
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    color: var(--text-gray);
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.cart-panel-close:hover { background: var(--bg-light); }

.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.cart-panel-footer {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

/* ── Warenkorb Inhalt ── */
.cart-empty-hint {
    text-align: center;
    color: var(--text-gray);
    padding: 40px 20px;
    font-size: 0.9em;
}

.cart-day-group {
    margin-bottom: 14px;
}

.cart-day-label {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.88em;
}

.cart-item-desc {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
}

.cart-item-qty {
    color: var(--text-gray);
    font-weight: 600;
    white-space: nowrap;
}

.cart-item-price {
    font-weight: 600;
    color: #059669;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}
.cart-no-price { color: var(--text-light); font-weight: 400; }

.cart-total-row {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid var(--border-light);
    text-align: right;
    font-size: 0.95em;
    color: var(--text-dark);
}
