        * { margin: 0; padding: 0; box-sizing: border-box; }
        /* Laravel-Paginierung: SVG-Pfeile einhegen (kein Tailwind geladen) */
        .pagination { display:flex; gap:4px; list-style:none; padding:0; margin:16px 0 0; align-items:center; justify-content:center; }
        .pagination li { display:inline-flex; }
        .pagination a, .pagination span { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px; padding:0 10px; border:1px solid #e2e8f0; border-radius:8px; font-size:13px; color:#334155; text-decoration:none; background:#fff; }
        .pagination a:hover { border-color:#3b82f6; color:#1d4ed8; }
        .pagination .active span { background:#3b82f6; border-color:#3b82f6; color:#fff; font-weight:700; }
        .pagination .disabled span, .pagination span.disabled { color:#cbd5e1; border-color:#f1f5f9; }
        .pagination svg { width:16px; height:16px; }
        :root { --sidebar: 250px; --topbar: 56px; }
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: #f1f5f9; color: #1e293b; min-height: 100vh;
        }
        .dark body { background: #0f172a; color: #e2e8f0; }

        /* ===== Links: nur Content (keine Buttons/Sidebar), mit Dark-Varianten ===== */
        .content a:not(.btn) { color: #2563eb; }
        .content a:not(.btn):hover { color: #1d4ed8; }
        .content a:not(.btn):visited { color: #6d28d9; }
        .dark .content a:not(.btn) { color: #93c5fd; }
        .dark .content a:not(.btn):hover { color: #bfdbfe; }
        .dark .content a:not(.btn):visited { color: #c4b5fd; }

        /* ===== Mail-Zeilen (statt Inline-Style, mit Dark-Variante) ===== */
        table.crm-table tr.mail-unread { background: #dbeafe; font-weight: 700; }
        .dark table.crm-table tr.mail-unread { background: rgba(59,130,246,.22); }

        /* ===== Sidebar ===== */
        .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar);
            background: #1e293b; color: #94a3b8; z-index: 40; overflow: hidden;
            display: flex; flex-direction: column; transition: transform .2s; }
        .sidebar.collapsed { transform: translateX(-100%); }
        .dark .sidebar { background: #0f172a; }
        .sidebar-logo { padding: 14px 20px; border-bottom: 1px solid #334155; flex-shrink: 0; }
        .sidebar-logo h1 { color: #fff; font-size: 18px; font-weight: 700; }
        .sidebar-logo span { color: #3b82f6; }
        .sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0 20px; }

        .sidebar-group { user-select: none; }
        .sidebar-group-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 20px 4px; font-size: 11px; text-transform: uppercase;
            letter-spacing: .08em; color: #64748b; font-weight: 600; cursor: pointer;
            transition: color .15s;
        }
        .sidebar-group-header:hover { color: #94a3b8; }
        .sidebar-group-header i.chevron { font-size: 9px; transition: transform .2s; }
        .sidebar-group-header i.chevron.open { transform: rotate(90deg); }
        .sidebar-group-items { overflow: hidden; transition: max-height .25s ease; }

        .sidebar-item { display: flex; align-items: center; gap: 12px; padding: 7px 20px;
            margin: 1px 8px; border-radius: 8px; font-size: 13px; font-weight: 500;
            color: #94a3b8; text-decoration: none; transition: all .15s; cursor: pointer; }
        .sidebar-item:hover { background: #334155; color: #e2e8f0; }
        .sidebar-item.active { background: #3b82f6; color: #fff; }
        .sidebar-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

        /* ===== Topbar ===== */
        .topbar { position: fixed; left: var(--sidebar); right: 0; top: 0; height: var(--topbar);
            background: #fff; border-bottom: 1px solid #e2e8f0; z-index: 30;
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 20px; transition: left .2s; gap: 12px; }
        .dark .topbar { background: #1e293b; border-color: #334155; }
        .topbar.collapsed { left: 0; }
        .topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
        .topbar-center { flex: 1; display: flex; align-items: center; gap: 12px; position: relative; }
        .topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

        /* Shop-Filter Dropdown */
        .shop-filter { display: flex; align-items: center; gap: 6px;
            padding: 5px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
            font-size: 12px; cursor: pointer; background: #f8fafc; white-space: nowrap; }
        .dark .shop-filter { background: #0f172a; border-color: #334155; color: #e2e8f0; }
        .shop-filter:hover { border-color: #3b82f6; }
        .shop-filter .shop-dot {
            width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0;
        }
        .shop-filter .shop-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
        .shop-filter i { font-size: 10px; color: #94a3b8; }

        .topbar-search { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 12px;
            font-size: 13px; width: min(300px, 30vw); background: #f8fafc; }
        .dark .topbar-search { background: #0f172a; border-color: #334155; color: #e2e8f0; }
        .dark .topbar-search::placeholder { color: #7d8aa0; }
        .search-results { background: #fff; border: 1px solid #e2e8f0; }
        .dark .search-results { background: #1e293b; border-color: #334155; }
        .search-results a { border-bottom: 1px solid #f1f5f9; }
        .dark .search-results a { border-bottom-color: #334155; }
        .topbar-search:focus { outline: none; border-color: #3b82f6; }

        /* ===== Content ===== */
        .content { margin-left: var(--sidebar); margin-top: var(--topbar);
            padding: 20px; min-height: calc(100vh - var(--topbar)); transition: margin-left .2s; }
        .content.expanded { margin-left: 0; }
        .content.login { margin: 0; padding: 0; min-height: 100vh; }
        .maintenance-banner { position:sticky;top:0;z-index:60;background:#fef3c7;border-bottom:1px solid #f59e0b;color:#92400e;font-size:12px;font-weight:600;text-align:center;padding:6px 12px; }
        /* Wartungsmodus: Banner fix oben, Fenster rutscht darunter */
        body.has-maintenance { padding-top:30px; }
        body.has-maintenance .maintenance-banner { position:fixed;top:0;left:0;right:0;z-index:60;height:30px;padding:0 12px;display:flex;align-items:center;justify-content:center; }
        body.has-maintenance .topbar { top:30px; }
        body.has-maintenance .sidebar { top:30px; }
        body.has-maintenance .toast-container { top:86px; }

        /* ===== Cards ===== */
        .card { background: #fff; border-radius: 12px; padding: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,.06); }
        .dark .card { background: #1e293b; }

        .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
        .stat-card { background: #fff; border-radius: 12px; padding: 20px;
            box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; gap: 16px; align-items: flex-start; }
        .dark .stat-card { background: #1e293b; }
        .stat-icon { width: 44px; height: 44px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
        .stat-icon.blue { background: #eff6ff; color: #3b82f6; }
        .stat-icon.green { background: #f0fdf4; color: #22c55e; }
        .stat-icon.amber { background: #fffbeb; color: #f59e0b; }
        .stat-icon.purple { background: #faf5ff; color: #a855f7; }
        .dark .stat-icon.blue { background: #1e3a5f; }
        .dark .stat-icon.green { background: #14532d; }
        .dark .stat-icon.amber { background: #451a03; }
        .dark .stat-icon.purple { background: #3b0764; }
        .stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
        .stat-label { font-size: 13px; color: #64748b; margin-top: 2px; }
        .dark .stat-label { color: #94a3b8; }
        .stat-trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
        .stat-trend.up { color: #22c55e; }
        .stat-trend.down { color: #ef4444; }

        /* ===== Tables ===== */
        .table-wrap { overflow-x: auto; }
        table.crm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
        table.crm-table th { padding: 10px 14px; text-align: left; font-weight: 600;
            color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
            border-bottom: 2px solid #f1f5f9; }
        .dark table.crm-table th { color: #94a3b8; border-color: #334155; }
        table.crm-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
        .dark table.crm-table td { border-color: #334155; }
        table.crm-table tr:hover { background: #eef2f7; }
        .dark table.crm-table tr:hover { background: #0f172a; }
        table.crm-table tbody tr:nth-child(even) { background: #f8fafc; }
        .dark table.crm-table tbody tr:nth-child(even) { background: rgba(148,163,184,.07); }
        table.crm-table tr:last-child td { border-bottom: none; }

        /* ===== Badges ===== */
        .badge { display: inline-flex; align-items: center; padding: 2px 10px;
            border-radius: 20px; font-size: 11px; font-weight: 600; }
        .badge-success { background: #f0fdf4; color: #16a34a; }
        .badge-warning { background: #fffbeb; color: #d97706; }
        .badge-danger { background: #fef2f2; color: #dc2626; }
        .badge-info { background: #eff6ff; color: #2563eb; }
        .badge-neutral { background: #f1f5f9; color: #64748b; }
        .dark .badge-success { background: #052e16; color: #4ade80; }
        .dark .badge-warning { background: #451a03; color: #fbbf24; }
        .dark .badge-danger { background: #450a0a; color: #f87171; }
        .dark .badge-info { background: #1e3a5f; color: #93c5fd; }
        .dark .badge-neutral { background: #1e293b; color: #94a3b8; }

        /* ===== Chips (Auswahl-Tags, z.B. Lieferanten-Picker) ===== */
        .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
            background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 20px;
            font-size: 12px; color: #1e293b; }
        .chip code { font-size: 10px; }
        .chip .chip-star { color: #2563eb; font-weight: 600; }
        .chip .chip-x { background: none; border: none; cursor: pointer; color: #64748b;
            font-size: 14px; line-height: 1; padding: 0 0 0 2px; }
        .dark .chip { background: #1e3a5f; border-color: #3b82f6; color: #dbeafe; }
        .dark .chip .chip-star { color: #93c5fd; }
        .dark .chip .chip-x { color: #94a3b8; }

        /* ===== Buttons ===== */
        .btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px;
            border-radius: 8px; font-size: 13px; font-weight: 600; border: none;
            cursor: pointer; transition: all .15s; text-decoration: none; }
        .btn-primary { background: #3b82f6; color: #fff; }
        .btn-primary:hover { background: #2563eb; }
        .btn-secondary { background: #f1f5f9; color: #475569; }
        .btn-secondary:hover { background: #e2e8f0; }
        .dark .btn-secondary { background: #334155; color: #e2e8f0; }
        .btn-danger { background: #fef2f2; color: #dc2626; }
        .btn-danger:hover { background: #fee2e2; }
        .dark .btn-danger { background: #450a0a; color: #f87171; }
        .btn-ghost { background: transparent; color: #64748b; }
        .btn-ghost:hover { background: #f1f5f9; }
        .dark .btn-ghost { color: #94a3b8; }
        .dark .btn-ghost:hover { background: #334155; }
        .btn-sm { padding: 4px 10px; font-size: 12px; }
        .btn-locale { display: inline-flex; align-items: center; gap: 4px; }
        .btn-locale-code { font-size: 11px; font-weight: 700; }
        .locale-switch { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: 12px; }
        .locale-switch a { color: #94a3b8; text-decoration: none; font-weight: 600; }
        .locale-switch a.active { color: #fff; }
        .locale-switch .locale-sep { color: #475569; }
        .btn-lg { padding: 10px 24px; font-size: 15px; }

        /* ===== Inputs (einheitlich im gesamten CRM) ===== */
        .input, .form-input { border: 1px solid #94a3b8; border-radius: 8px; padding: 8px 12px;
            font-size: 13px; width: 100%; background: #fff; color: #1e293b; transition: border-color .15s; box-sizing: border-box; }
        .input:focus, .form-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
        .input::placeholder, .form-input::placeholder { color: #94a3b8; }
        select.input, select.form-input { appearance: auto; }
        .input:disabled, .form-input:disabled { background: #f1f5f9; color: #94a3b8; border-color: #cbd5e1; }
        .dark .input, .dark .form-input { background: #0f172a; border-color: #475569; color: #e2e8f0; }
        .dark .input:focus, .dark .form-input:focus { border-color: #3b82f6; }
        label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #475569; }
        .dark label { color: #94a3b8; }

        /* ===== Modal ===== */
        .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5);
            z-index: 100; display: flex; align-items: center; justify-content: center;
            backdrop-filter: blur(2px); }
        .modal { background: #fff; border-radius: 16px; width: 90%; max-width: 540px;
            max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
        /* Backdrop pattern (customer/address/bank/contact, article config):
           dimmed overlay + centered dialog. Sibling selector keeps
           .modal-overlay > .modal users untouched. */
        .modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; }
        .modal-backdrop + .modal { position: fixed; top: 50%; left: 50%;
            transform: translate(-50%,-50%); z-index: 101; }
        .dark .modal { background: #1e293b; }
        .dark .modal-dialog { background: #1e293b; color: #e2e8f0; }
        .dark #cat-search { background: #0f172a; }
        .modal-header { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: center; }
        .modal-body { padding: 16px 24px; }
        .modal-footer { padding: 12px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
        .modal-title { font-size: 18px; font-weight: 700; }
        .modal-close { width: 32px; height: 32px; border-radius: 8px; border: none;
            background: #f1f5f9; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }

        /* ===== Dropdown ===== */
        .dropdown { position: relative; display: inline-block; }
        .dropdown-menu { position: absolute; right: 0; top: 100%; margin-top: 4px;
            background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.1);
            border: 1px solid #e2e8f0; min-width: 200px; z-index: 50; padding: 4px; }
        .dark .dropdown-menu { background: #1e293b; border-color: #334155; }
        .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
            border-radius: 6px; font-size: 13px; color: #475569; text-decoration: none;
            cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
        .dark .dropdown-item { color: #e2e8f0; }
        .dropdown-item:hover { background: #f1f5f9; }
        .dark .dropdown-item:hover { background: #334155; }
        .dropdown-item i { width: 16px; text-align: center; }

        /* ===== Helpers ===== */
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
        .span-all { grid-column: 1 / -1; }
        .flex { display: flex; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .gap-2 { gap: 8px; }
        .gap-3 { gap: 12px; }
        .gap-4 { gap: 16px; }
        .mt-4 { margin-top: 16px; }
        .mt-6 { margin-top: 24px; }
        .mb-4 { margin-bottom: 16px; }
        .mb-6 { margin-bottom: 24px; }
        .text-sm { font-size: 13px; }
        .text-xs { font-size: 11px; }
        .text-center { text-align: center; }
        .text-right { text-align: right; }
        .font-mono { font-family: 'JetBrains Mono', monospace; }
        .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .w-full { width: 100%; }
        .page-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

        /* ===== Toast ===== */
        .toast-container { position: fixed; top: 56px; right: 16px; z-index: 200;
            display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
        .toast { padding: 12px 20px; border-radius: 10px; color: #fff; font-size: 13px;
            font-weight: 500; box-shadow: 0 4px 20px rgba(0,0,0,.15);
            display: flex; align-items: center; gap: 8px; pointer-events: auto; }
        .toast-success { background: #16a34a; }
        .toast-error { background: #dc2626; }
        .toast-info { background: #3b82f6; }
        .toast-warning { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

        /* ===== Scrollbar ===== */
        ::-webkit-scrollbar { width: 5px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }

        /* ===== Skeleton ===== */
        .skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
            background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
        .dark .skeleton { background: linear-gradient(90deg, #334155 25%, #1e293b 50%, #334155 75%); }
        @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

        /* ===== Tour-Tip Dark ===== */
        .dark #mmg-tour-tip p { color: #cbd5e1; }
        .dark #mmg-tour-tip .mmg-tour-row { color: #94a3b8; }
        .dark #mmg-tour-tip .mmg-tour-row button { background: #0f172a; border-color: #475569; color: #e2e8f0; }

        /* ===== Dark-Sicherheitsnetz: hartcodierte helle Inline-Styles ===== */
        .dark [style*="background:#fff"], .dark [style*="background: #fff"],
        .dark [style*="background:#ffffff"], .dark [style*="background: #ffffff"],
        .dark [style*="background:#f8fafc"], .dark [style*="background: #f8fafc"],
        .dark [style*="background:#f1f5f9"], .dark [style*="background: #f1f5f9"] {
            background-color: #1e293b !important;
        }
        .dark [style*="background:#fef2f2"], .dark [style*="background: #fef2f2"] {
            background-color: #450a0a !important;
        }
        .dark [style*="background:#f0fdf4"], .dark [style*="background: #f0fdf4"] {
            background-color: #052e16 !important;
        }
        .dark [style*="background:#fffbeb"], .dark [style*="background: #fffbeb"],
        .dark [style*="background:#fef9c3"], .dark [style*="background: #fef9c3"] {
            background-color: #451a03 !important;
        }
        .dark [style*="background:#fee2e2"], .dark [style*="background: #fee2e2"] {
            background-color: #450a0a !important;
        }
        .dark [style*="background:#e2e8f0"], .dark [style*="background: #e2e8f0"] {
            background-color: #334155 !important;
        }
        .dark [style*="color:#1e293b"], .dark [style*="color: #1e293b"],
        .dark [style*="color:#0f172a"], .dark [style*="color: #0f172a"] {
            color: #e2e8f0 !important;
        }
        .dark [style*="color:#334155"], .dark [style*="color: #334155"],
        .dark [style*="color:#475569"], .dark [style*="color: #475569"],
        .dark [style*="color:#64748b"], .dark [style*="color: #64748b"] {
            color: #94a3b8 !important;
        }
        .dark [style*="background:#eff6ff"], .dark [style*="background: #eff6ff"] {
            background-color: #1e3a5f !important;
        }
        .dark [style*="border:1px solid #e2e8f0"], .dark [style*="border: 1px solid #e2e8f0"],
        .dark [style*="border:1px solid #cbd5e1"], .dark [style*="border: 1px solid #cbd5e1"] {
            border-color: #334155 !important;
        }

        /* ===== Datei-Buttons (einheitlich, modern, mit Dark-Variante) ===== */
        input[type="file"] { font-size:12px; color:#475569; max-width:100%; }
        input[type="file"]::file-selector-button { background:#f1f5f9; color:#334155; border:1px solid #cbd5e1;
            border-radius:8px; padding:7px 14px; font-size:12px; font-weight:600; cursor:pointer; margin-right:10px; }
        input[type="file"]::file-selector-button:hover { background:#e2e8f0; border-color:#3b82f6; }
        .dark input[type="file"] { color:#94a3b8; }
        .dark input[type="file"]::file-selector-button { background:#334155; color:#e2e8f0; border-color:#475569; }
        .dark input[type="file"]::file-selector-button:hover { background:#475569; }

        [x-cloak] { display: none !important; }
