:root {
            --primary: #5d7db6;
            --primary-light: #e8eef7;
            --primary-dark: #4a6a9e;
            --success: #22c55e;
            --success-light: #dcfce7;
            --danger: #ef4444;
            --danger-light: #fee2e2;
            --bg: #f5f7fb;
            --surface: #ffffff;
            --text: #1e293b;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
            --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
            --radius: 1rem;
            --radius-sm: 0.625rem;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * { box-sizing: border-box; }

        html {
            accent-color: var(--primary);
            color-scheme: light;
            /* Fluide Basis-Schriftgröße (steuert alle rem-Maße).
               Handy/kleine Screens: 16px (optimal). Je größer der Bildschirm,
               desto kompakter Richtung ~14px — große Monitore sollen die Schrift
               NICHT vergrößern, sondern dezent verkleinern. */
            font-size: clamp(14px, 16.8px - 0.15vw, 16px);
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg);
            color: var(--text);
            font-size: 0.9375rem;
            -webkit-font-smoothing: antialiased;
            margin: 0;
        }

        /* Fluider Container mit komfortabler Obergrenze:
           - skaliert stufenlos mit dem Viewport (Seitenränder wachsen mit),
           - wird aber bei 1400px gedeckelt und zentriert, damit Formularfelder
             auf großen Monitoren nicht überdehnt werden (gute Lesbarkeit). */
        .container {
            width: 100%;
            max-width: 1400px;
            padding-left: clamp(1rem, 3vw, 2.5rem);
            padding-right: clamp(1rem, 3vw, 2.5rem);
            margin-left: auto;
            margin-right: auto;
        }

        /* Ab Tablet/Desktop die vier Wochentage in einer Reihe statt 2×2,
           damit die breite Karte gefüllt wird statt zwei überbreite Felder. */
        @media (min-width: 1200px) {
            .day-selects-grid { grid-template-columns: repeat(4, 1fr); }
        }

        /* ── Navbar ── */
        .app-nav {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 1020;
            backdrop-filter: blur(12px);
            background: rgba(255,255,255,0.92);
        }

        .app-nav .container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 64px;
        }

        .app-nav-brand {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            color: var(--text);
        }

        .app-nav-brand img {
            height: 36px;
            border-radius: 8px;
        }

        .app-nav-brand span {
            font-weight: 700;
            font-size: 1.0625rem;
            letter-spacing: -0.02em;
        }

        .app-nav-links {
            display: flex;
            gap: 0.25rem;
        }

        .app-nav-links a {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            text-decoration: none;
            color: var(--text-muted);
            font-size: 0.9375rem;
            font-weight: 500;
            transition: all var(--transition);
        }

        .app-nav-links a:hover {
            color: var(--primary);
            background: var(--primary-light);
            text-decoration: none;
        }

        .app-nav-links a.active {
            color: var(--primary);
            background: var(--primary-light);
            font-weight: 600;
        }

        /* ── Cards ── */
        .card {
            border: 1px solid var(--border);
            border-radius: var(--radius);
            box-shadow: var(--shadow-sm);
            background: var(--surface);
            overflow: hidden;
            transition: box-shadow var(--transition);
        }

        .card-header {
            background: var(--surface) !important;
            border-bottom: 1px solid var(--border);
            padding: 1rem 1.25rem;
            font-weight: 600;
            font-size: 1.0625rem;
            color: var(--text);
            border-radius: 0 !important;
        }

        .card-body {
            padding: 1.25rem;
        }

        /* ── Skeleton Loading ── */
        .skeleton-wrapper {
            padding: 1.5rem;
            animation: fadeIn 0.3s ease;
        }

        .skeleton {
            background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s ease-in-out infinite;
            border-radius: 0.5rem;
        }

        .skeleton-header {
            height: 2.5rem;
            margin-bottom: 1.25rem;
            width: 60%;
        }

        .skeleton-row {
            display: flex;
            gap: 1rem;
            margin-bottom: 0.75rem;
        }

        .skeleton-cell {
            height: 1.25rem;
            flex: 1;
        }

        .skeleton-cell-label {
            height: 1.25rem;
            width: 80px;
            flex-shrink: 0;
        }

        .skeleton-button {
            height: 3rem;
            margin-top: 1.5rem;
            width: 100%;
        }

        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(16px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ── Tabelle (Menüplan) ── */
        .menu-table-wrap {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .table {
            font-size: 0.9375rem;
            margin-bottom: 0;
            border-collapse: separate;
            border-spacing: 0;
        }

        .table thead th {
            background: var(--primary);
            color: #fff;
            font-weight: 600;
            font-size: 0.8125rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 0.75rem 1rem;
            border: none;
            white-space: nowrap;
        }

        .table thead th:first-child {
            border-radius: 0;
        }

        .table thead th:last-child {
            border-radius: 0;
        }

        .table td {
            padding: 0.65rem 1rem;
            vertical-align: middle;
            border-top: 1px solid var(--border);
            background: var(--surface);
        }

        .table tbody tr {
            transition: background var(--transition);
        }

        .table tbody tr:hover td {
            background: #f8fafc;
        }

        .row-beilage td {
            font-size: 0.8125rem;
            color: var(--text-muted);
            font-style: italic;
            padding-top: 0 !important;
            border-top: none !important;
        }

        /* ── Formular ── */
        .form-section {
            animation: slideUp 0.4s ease;
        }

        .form-group {
            margin-bottom: 1.25rem;
        }

        .form-group label {
            font-weight: 600;
            font-size: 0.8125rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.03em;
            margin-bottom: 0.4rem;
        }

        .form-control {
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 0.6rem 0.875rem;
            font-size: 0.9375rem;
            transition: all var(--transition);
            color: var(--text);
        }

        .form-control:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(93, 125, 182, 0.15);
        }

        .form-divider {
            border: none;
            border-top: 1px solid var(--border);
            margin: 1.5rem 0;
        }

        .day-selects-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }

        .day-selects-grid select.form-control {
            text-overflow: ellipsis;
            min-width: 0;
            font-size: 0.9375rem;
            height: auto;
            padding: 0.65rem 0.875rem;
            line-height: 1.4;
        }

        .day-selects-grid .select2-container {
            width: 100% !important;
        }

        .day-selects-grid .select2-container .select2-selection--single {
            height: auto;
            padding: 0.55rem 0.875rem;
            line-height: 1.4;
            font-size: 0.9375rem;
        }

        .day-selects-grid .select2-container .select2-selection--single .select2-selection__rendered {
            padding: 0;
            line-height: 1.4;
            white-space: normal;
            word-wrap: break-word;
            overflow: visible;
            text-overflow: unset;
        }

        .day-selects-grid .select2-container .select2-selection--single .select2-selection__arrow {
            height: 100%;
        }

        .btn-bestellen {
            width: 100%;
            padding: 0.875rem;
            font-size: 1.0625rem;
            font-weight: 600;
            border-radius: var(--radius-sm);
            border: none;
            background: var(--primary);
            color: #fff;
            cursor: pointer;
            transition: all var(--transition);
            margin-top: 0.5rem;
        }

        .btn-bestellen:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(93, 125, 182, 0.35);
        }

        .btn-bestellen:active {
            transform: translateY(0);
        }

        .btn-bestellen:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* ── KW-Auswahl ── */
        .kw-select-wrapper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .kw-select-wrapper label {
            margin-bottom: 0;
            white-space: nowrap;
            font-weight: 600;
            font-size: 0.8125rem;
            color: var(--text-muted);
            text-transform: none;
            letter-spacing: 0;
        }

        .kw-select-wrapper .form-control {
            padding: 0.35rem 0.6rem;
            font-size: 0.9375rem;
            border-width: 1.5px;
        }

        .kw-select-wrapper .select2-container {
            min-width: 180px;
        }

        .kw-select-wrapper .select2-container--bootstrap .select2-selection {
            padding: 0.3rem 0.5rem;
            font-size: 0.9375rem;
            height: auto;
        }

        /* ── Select2 ── */
        .select2-container--bootstrap .select2-selection {
            background-color: #fff;
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            font-size: 0.9375rem;
            padding: 0.5rem 0.75rem;
            color: var(--text);
            transition: all var(--transition);
        }

        .select2-container--bootstrap .select2-selection--single {
            height: calc(2.5rem + 4px);
        }

        .select2-container--bootstrap.select2-container--focus .select2-selection,
        .select2-container--bootstrap.select2-container--open .select2-selection {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(93, 125, 182, 0.15);
        }

        .select2-dropdown {
            color: var(--text);
            border: 2px solid var(--border);
            border-radius: var(--radius-sm);
            box-shadow: var(--shadow-lg);
            margin-top: 4px;
        }

        .select2-results__option--highlighted {
            background: var(--primary) !important;
            color: #fff !important;
        }

        .select2-results__option--selectable {
            transition: background 0.15s ease;
        }

        /* ── Alerts ── */
        .alert-modern {
            display: none;
            padding: 1rem 1.25rem;
            border-radius: var(--radius-sm);
            font-weight: 500;
            font-size: 0.9375rem;
            animation: slideUp 0.3s ease;
            border: none;
        }

        .alert-success-modern {
            background: var(--success-light);
            color: #15803d;
        }

        .alert-danger-modern {
            background: var(--danger-light);
            color: #b91c1c;
        }

        /* ── No Orders ── */
        #no_orders {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.9375rem;
        }

        #no_orders i {
            font-size: 2.5rem;
            display: block;
            margin-bottom: 0.75rem;
            opacity: 0.4;
        }

        /* ── Modal ── */
        .modal-content {
            border: none;
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
        }

        .modal-header {
            border-bottom: 1px solid var(--border);
            padding: 1.25rem;
        }

        .modal-title {
            font-weight: 700;
        }

        .modal-body {
            padding: 1.5rem;
            line-height: 1.6;
            color: var(--text-muted);
        }

        .modal-footer {
            border-top: 1px solid var(--border);
            padding: 1rem 1.25rem;
        }

        .btn-primary,
        .modal-footer .btn-primary {
            background: var(--primary) !important;
            border-color: var(--primary) !important;
            border-radius: var(--radius-sm);
            padding: 0.5rem 1.5rem;
            font-weight: 600;
        }

        .btn-primary:hover,
        .btn-primary:focus,
        .modal-footer .btn-primary:hover {
            background: var(--primary-dark) !important;
            border-color: var(--primary-dark) !important;
            box-shadow: 0 0 0 3px rgba(93, 125, 182, 0.25) !important;
        }

        /* ── Page Content ── */
        .page-content {
            padding-top: 1.5rem;
            padding-bottom: 2rem;
        }

        .content-appear {
            animation: slideUp 0.4s ease;
        }

        /* ── Große Bildschirme (Desktop) ── */
        @media (min-width: 992px) {
            .app-nav .container { height: 72px; }
            .app-nav-brand img { height: 44px; }
            .app-nav-brand span { font-size: 1.25rem; }
            .app-nav-links a { padding: 0.6rem 1.15rem; }
            .page-content {
                padding-top: 2.5rem;
                padding-bottom: 3rem;
            }
            .card-body { padding: 1.75rem; }
            .card-header { padding: 1.25rem 1.75rem; }
        }

        /* ── Mobile ── */
        @media (max-width: 768px) {
            .app-nav .container {
                height: 56px;
            }

            .app-nav-brand img {
                height: 28px;
            }

            .app-nav-brand span {
                font-size: 0.9375rem;
            }

            .app-nav-links a {
                padding: 0.4rem 0.7rem;
                font-size: 0.875rem;
            }

            .app-nav-links a .bi {
                display: none;
            }

            .container {
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }

            .table {
                font-size: 0.875rem;
            }

            .table td, .table th {
                padding: 0.5rem 0.6rem;
            }

            .table thead th {
                font-size: 0.8125rem;
                padding: 0.6rem;
            }

            .card-header {
                padding: 0.875rem 1rem;
                font-size: 0.9375rem;
            }

            .card-body {
                padding: 1rem;
            }

            .day-selects-grid {
                grid-template-columns: 1fr;
            }

            .kw-select-wrapper {
                flex-direction: column;
                align-items: stretch;
            }

            .kw-select-wrapper label {
                margin-bottom: 0.25rem;
            }

            .page-content {
                padding-top: 1rem;
            }

            .row-beilage td {
                font-size: 0.8125rem;
            }
        }

        @media (max-width: 400px) {
            .app-nav-brand span { display: none; }
        }
