        :root {
            --bg-deepest: #06080d;
            --bg-deep: #0c0f16;
            --bg-card: #12151e;
            --bg-elevated: #181c28;
            --bg-hover: #1e2333;
            --border: var(--bl1);
            --border-light: var(--bl2);
            --text: #a8b4cc;
            --text-muted: #6b7694;
            --text-dim: #4a5370;
            --accent: #a8b4cc;
            --accent-light: #c4cde0;
            --accent-glow: rgba(168,180,204,0.20);
            --gradient-main: linear-gradient(135deg, #7b8fa8, #8b7ab5);
            --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
            --gradient-success: linear-gradient(135deg, #22c55e, #06b6d4);
            --gradient-gold: linear-gradient(135deg, #f59e0b, #eab308);
            --glass: rgba(18,21,30,0.75);
            --glass-border: var(--bl3);
            --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
            --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
            --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
            --shadow-glow: 0 0 20px rgba(168,180,204,0.08);
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            /* Theme-Variablen (ehem. hart kodierte Farben) — Werte = exakt der alte Dunkel-Stand */
            --line-1: #111;
            --line-2: #1e1e1e;
            --line-3: #1a1a1a;
            --bg-inset: #0d0d0d;
            --bg-inset-2: #0d1117;
            --bg-inset-3: #0c0e13;
            --text-bright: #e2e8f4;
            --text-soft: #7d8290;
            --text-white: #fff;
            --divider: #1e2233;
            --divider-2: #222;
            --tA1: rgba(168,180,204,0.55);
            --tA2: rgba(255,255,255,.4);
            --tA3: rgba(168,180,204,0.3);
            --tA4: rgba(168,180,204,.6);
            --tA5: rgba(168,180,204,0.6);
            --tA6: rgba(168,180,204,0.5);
            --tA7: rgba(168,180,204,.5);
            --tA8: rgba(255,255,255,0.28);
            --tA9: rgba(255,255,255,.9);
            --tA10: rgba(255,255,255,0.5);
            --tA11: rgba(255,255,255,0.45);
            --tA12: rgba(255,255,255,0.6);
            --tA13: rgba(255,255,255,0.3);
            --tA14: rgba(168,180,204,.8);
            --tA15: rgba(255,255,255,0.4);
            --tA16: rgba(255,255,255,0.35);
            --tA17: rgba(255,255,255,0.25);
            --tA18: rgba(168,180,204,0.4);
            --tA19: rgba(255,255,255,.2);
            --tA20: rgba(255,255,255,.35);
            --tA21: rgba(255,255,255,.3);
            --tA22: rgba(255,255,255,.5);
            --tA23: rgba(168,180,204,.50);
            --tA24: rgba(168,180,204,.30);
            --tA25: rgba(255,255,255,.25);
            --tA26: rgba(168,180,204,.9);
            --tA27: rgba(255,255,255,.45);
            --tA28: rgba(255,255,255,.7);
            --tA29: rgba(168,180,204,.35);
            --tA30: rgba(168,180,204,.55);
            --tA31: rgba(168,180,204,.7);
            --tA32: rgba(168,180,204,.4);
            --tA33: rgba(255,255,255,0.7);
            --tA34: rgba(255,255,255,0.95);
            --tA35: rgba(255,255,255,0.2);
            --tA36: rgba(255,255,255,0.85);
            --tA37: rgba(255,255,255,0.15);
            --tA38: rgba(168,180,204,0.35);
            --tA39: rgba(255,255,255,0.65);
            --tA40: rgba(255,255,255,.28);
            --tA41: rgba(255,255,255,0.8);
            --tA42: rgba(168,180,204,0.9);
            --tA43: rgba(168,180,204,0.2);
            --tA44: rgba(168,180,204,0.02);
            --tA45: rgba(255,255,255,.32);
            --tA46: rgba(255,255,255,.55);
            --bl1: #1e2233;
            --bl2: #2a3045;
            --bl3: rgba(255,255,255,0.06);
            --bl4: rgba(255,255,255,0.05);
            --bl5: rgba(168,180,204,0.35);
            --bl6: rgba(255,255,255,0.12);
            --bl7: rgba(168,180,204,0.10);
            --bl8: #a8b4cc;
            --bl9: #000000;
            --bl10: rgba(168,180,204,0.26);
            --bl11: rgba(168,180,204,0.3);
            --bl12: rgba(168,180,204,0.6);
            --bl13: rgba(168,180,204,0.17);
            --bl14: rgba(168,180,204,.3);
            --bl15: rgba(168,180,204,.35);
            --bl16: rgba(168,180,204,0.25);
            --bl17: rgba(255,255,255,0.03);
            --bl18: rgba(255,255,255,0.08);
            --bl19: #333;
            --bl20: rgba(168,180,204,.25);
            --bl21: rgba(168,180,204,0.55);
            --bl22: rgba(168,180,204,.15);
            --bl23: rgba(168,180,204,.4);
            --bl24: rgba(168,180,204,.18);
            --bl25: rgba(255,255,255,.04);
            --bl26: rgba(168,180,204,0.15);
            --bl27: #2a2d38;
            --bl28: rgba(255,255,255,0.04);
            --bl29: rgba(168,180,204,0.30);
            --bl30: rgba(255,255,255,.12);
            --bl31: rgba(255,255,255,.08);
            --bl32: rgba(255,255,255,.1);
            --bl33: rgba(168,180,204,.1);
            --bl34: rgba(168,180,204,0.2);
            --bl35: rgba(255,255,255,0.15);
            --bl36: rgba(255,255,255,.4);
            --bl37: rgba(255,255,255,.15);
            --bl38: rgba(255,255,255,0.13);
            --bl39: rgba(255,255,255,0.1);
            --bl40: rgba(255,255,255,0.07);
            --bl41: rgba(168,180,204,.10);
            --bl42: #252525;
            --bl43: rgba(168,180,204,.2);
            --bl44: rgba(168,180,204,.20);
            --bl45: rgba(255,255,255,.07);
            --bl46: rgba(168,180,204,.70);
            --bl47: rgba(168,180,204,0.18);
            --bl48: #2a2f3a;
            --bl49: rgba(255,255,255,.05);
            --bl50: rgba(255,255,255,.06);
            --bl51: #2a2a2a;
            --bl52: #222;
            --bl53: #0d0d0d;
            --bl54: #0e0e0e;
            --bl55: #0a0a0a;
            --bl56: rgba(255,255,255,.03);
            --bl57: rgba(168,180,204,0.42);
            --bl58: rgba(255,255,255,0.09);
            --bl59: #1a1d24;
            --bl60: rgba(168,180,204,.6);
            /* 11.08.2026: Herkunfts-Kette unter dem Artikeltitel (Nr. / Import / ◆ eigene Daten /
               Datei / Verlauf). Stand fest als #b9c1d1 im Skript und war damit an den dunklen Grund
               gebunden — in der hellen Ansicht auf Weiss unlesbar (Kontrast ~1,9:1). */
            --herkunft-pille: #b9c1d1;
            --herkunft-hinweis: #c98a1e;   /* braun: lief, brachte nichts / Marke bewusst nicht geaendert */
            --herkunft-warnung: #f87171;   /* rot: gesetzliche Luecke (z.B. Textil-Pflichtangabe) */
            --herkunft-trenner: #7f889b;
        }

        /* ===== Helle Ansicht (Einstellungen → Ansicht) ===== */
        html[data-theme="light"] {
            --bg-deepest: #e7ebf2;
            --bg-deep: #eef1f7;
            --bg-card: #ffffff;
            --bg-elevated: #f5f7fb;
            --bg-hover: #e7ecf4;
            --border: #d6dce8;
            --border-light: #c6cedf;
            --text: #333d54;
            --text-muted: #5d6880;
            --text-dim: #8a93a8;
            --accent: #333d54;
            --accent-light: #1f2840;
            --accent-glow: rgba(51,61,84,0.14);
            --glass: rgba(255,255,255,0.85);
            --glass-border: rgba(15,23,42,0.08);
            --shadow-sm: 0 2px 8px rgba(15,23,42,0.08);
            --shadow-md: 0 8px 30px rgba(15,23,42,0.10);
            --shadow-lg: 0 20px 60px rgba(15,23,42,0.16);
            --shadow-glow: 0 0 20px rgba(51,61,84,0.06);
            --line-1: #e1e5ee;
            --line-2: #d6dce8;
            --line-3: #dce1eb;
            --bg-inset: #edf0f6;
            --bg-inset-2: #edf0f6;
            --bg-inset-3: #f0f3f8;
            --text-bright: #1b2336;
            --text-soft: #5d6880;
            --text-white: #1b2336;
            --divider: #e2e7f0;
            --divider-2: #e2e7f0;
            --tA1: rgba(51,61,84,0.67);
            --tA2: rgba(27,35,54,0.65);
            --tA3: rgba(51,61,84,0.42);
            --tA4: rgba(51,61,84,0.72);
            --tA5: rgba(51,61,84,0.72);
            --tA6: rgba(51,61,84,0.62);
            --tA7: rgba(51,61,84,0.62);
            --tA8: rgba(27,35,54,0.53);
            --tA9: rgba(27,35,54,0.92);
            --tA10: rgba(27,35,54,0.75);
            --tA11: rgba(27,35,54,0.70);
            --tA12: rgba(27,35,54,0.85);
            --tA13: rgba(27,35,54,0.55);
            --tA14: rgba(51,61,84,0.92);
            --tA15: rgba(27,35,54,0.65);
            --tA16: rgba(27,35,54,0.60);
            --tA17: rgba(27,35,54,0.50);
            --tA18: rgba(51,61,84,0.52);
            --tA19: rgba(27,35,54,0.45);
            --tA20: rgba(27,35,54,0.60);
            --tA21: rgba(27,35,54,0.55);
            --tA22: rgba(27,35,54,0.75);
            --tA23: rgba(51,61,84,0.62);
            --tA24: rgba(51,61,84,0.42);
            --tA25: rgba(27,35,54,0.50);
            --tA26: rgba(51,61,84,0.95);
            --tA27: rgba(27,35,54,0.70);
            --tA28: rgba(27,35,54,0.92);
            --tA29: rgba(51,61,84,0.47);
            --tA30: rgba(51,61,84,0.67);
            --tA31: rgba(51,61,84,0.82);
            --tA32: rgba(51,61,84,0.52);
            --tA33: rgba(27,35,54,0.92);
            --tA34: rgba(27,35,54,0.92);
            --tA35: rgba(27,35,54,0.45);
            --tA36: rgba(27,35,54,0.92);
            --tA37: rgba(27,35,54,0.40);
            --tA38: rgba(51,61,84,0.47);
            --tA39: rgba(27,35,54,0.90);
            --tA40: rgba(27,35,54,0.53);
            --tA41: rgba(27,35,54,0.92);
            --tA42: rgba(51,61,84,0.95);
            --tA43: rgba(51,61,84,0.32);
            --tA44: rgba(51,61,84,0.14);
            --tA45: rgba(27,35,54,0.57);
            --tA46: rgba(27,35,54,0.80);
            --bl1: #dde2ec;
            --bl2: #dde2ec;
            --bl3: rgba(15,23,42,0.12);
            --bl4: rgba(15,23,42,0.11);
            /* 11.08.2026 (Eric am Screenshot): dieselbe Kette auf weissem Grund. #5d6880 ist
               --text-muted der hellen Ansicht und kommt auf Kontrast 5,6:1 gegen Weiss — lesbar,
               ohne die Zeile lauter zu machen als den Titel darueber. */
            --herkunft-pille: #5d6880;
            --herkunft-hinweis: #8a5d00;   /* dasselbe Braun, auf Weiss lesbar (5,0:1 statt 3,1:1) */
            --herkunft-warnung: #b91c1c;   /* dasselbe Rot, auf Weiss lesbar (6,4:1 statt 2,9:1) */
            --herkunft-trenner: #98a1b3;
            --bl5: rgba(51,61,84,0.35);
            --bl6: rgba(15,23,42,0.16);
            --bl7: rgba(51,61,84,0.10);
            --bl8: #333d54;
            --bl9: #dde2ec;
            --bl10: rgba(51,61,84,0.26);
            --bl11: rgba(51,61,84,0.30);
            --bl12: rgba(51,61,84,0.60);
            --bl13: rgba(51,61,84,0.17);
            --bl14: rgba(51,61,84,0.30);
            --bl15: rgba(51,61,84,0.35);
            --bl16: rgba(51,61,84,0.25);
            --bl17: rgba(15,23,42,0.09);
            --bl18: rgba(15,23,42,0.15);
            --bl19: #dde2ec;
            --bl20: rgba(51,61,84,0.25);
            --bl21: rgba(51,61,84,0.55);
            --bl22: rgba(51,61,84,0.15);
            --bl23: rgba(51,61,84,0.40);
            --bl24: rgba(51,61,84,0.18);
            --bl25: rgba(15,23,42,0.10);
            --bl26: rgba(51,61,84,0.15);
            --bl27: #dde2ec;
            --bl28: rgba(15,23,42,0.10);
            --bl29: rgba(51,61,84,0.30);
            --bl30: rgba(15,23,42,0.16);
            --bl31: rgba(15,23,42,0.15);
            --bl32: rgba(15,23,42,0.16);
            --bl33: rgba(51,61,84,0.10);
            --bl34: rgba(51,61,84,0.20);
            --bl35: rgba(15,23,42,0.16);
            --bl36: rgba(15,23,42,0.16);
            --bl37: rgba(15,23,42,0.16);
            --bl38: rgba(15,23,42,0.16);
            --bl39: rgba(15,23,42,0.16);
            --bl40: rgba(15,23,42,0.13);
            --bl41: rgba(51,61,84,0.10);
            --bl42: #dde2ec;
            --bl43: rgba(51,61,84,0.20);
            --bl44: rgba(51,61,84,0.20);
            --bl45: rgba(15,23,42,0.13);
            --bl46: rgba(51,61,84,0.70);
            --bl47: rgba(51,61,84,0.18);
            --bl48: #dde2ec;
            --bl49: rgba(15,23,42,0.11);
            --bl50: rgba(15,23,42,0.12);
            --bl51: #dde2ec;
            --bl52: #dde2ec;
            --bl53: #dde2ec;
            --bl54: #dde2ec;
            --bl55: #dde2ec;
            --bl56: rgba(15,23,42,0.09);
            --bl57: rgba(51,61,84,0.42);
            --bl58: rgba(15,23,42,0.16);
            --bl59: #dde2ec;
            --bl60: rgba(51,61,84,0.60);
        }
        /* Helle Ansicht: obere Navigationsleiste (Hintergruende dort sind bewusst rgba, kein var) */
        /* Obere Hauptleiste im selben Ton wie die Sidebar links (Eric-Wunsch 12.06.) */
        html[data-theme="light"] .top-nav,
        html[data-theme="light"] .nav-pill { background: rgba(231,235,242,0.94); }
        /* Heller Modus: Formular-Elemente nicht im Dark-Schema rendern (sonst uebermalen
           Selects mit erzwungenem opakem Hintergrund die Raender ihrer Eltern-Boxen) */
        html[data-theme="light"] { color-scheme: light; }
        html[data-theme="light"] select,
        html[data-theme="light"] input,
        html[data-theme="light"] textarea { color-scheme: light !important; }
        /* SVG-Ringe (Pipeline/Guthaben): Zahlen + Texte sind als fill-Attribute gesetzt,
           CSS gewinnt gegen Praesentations-Attribute -> hier die Hell-Werte */
        html[data-theme="light"] text[fill="rgba(255,255,255,.25)"] { fill: rgba(27,35,54,.40); }
        html[data-theme="light"] text[fill="rgba(255,255,255,.2)"]  { fill: rgba(27,35,54,.35); }
        html[data-theme="light"] text[fill="rgba(255,255,255,.35)"] { fill: rgba(27,35,54,.45); }
        html[data-theme="light"] text[fill="rgba(255,255,255,.4)"]  { fill: rgba(27,35,54,.50); }
        html[data-theme="light"] svg text[fill="#a8b4cc"] { fill: #333d54; }
        html[data-theme="light"] svg [stroke="#a8b4cc"] { stroke: #6b7694; }
        html[data-theme="light"] svg [fill="#a8b4cc"]:not(text) { fill: #6b7694; }
        /* Karussell-Popup (Laender-Klick im Dashboard): Container ist fest dunkel angelegt */
        html[data-theme="light"] #orbitalPopup {
            background: rgba(255,255,255,0.98) !important;
            box-shadow: 0 16px 48px rgba(15,23,42,0.25) !important;
        }
        /* Trennstriche der Auswahlfelder ragen 3px ueber die Pillen hinaus -> in hell weicher Ton */
        html[data-theme="light"] .csel-trigger.with-border-right { border-right-color: var(--divider); }
        html[data-theme="light"] .toolbar select { border-right-color: var(--divider) !important; }
        html[data-theme="light"] .nav-pill { box-shadow: 0 2px 12px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.5); }
        html[data-theme="light"] .section-btn:hover { background: rgba(51,61,84,0.08); }
        html[data-theme="light"] .section-btn.active { background: rgba(51,61,84,0.10); box-shadow: inset 0 0 0 1px rgba(51,61,84,0.18); }
        /* Helle Ansicht: Verlaufs-Texte (background-clip:text) waeren auf Weiss zu blass -> dunkles Grau.
           Farbige Varianten (rot/gruen/gold) behalten ihre Bedeutung. */
        html[data-theme="light"] [style*="background-clip:text"]:not([style*="#ef4444"]):not([style*="#22c55e"]) {
            background: none !important;
            -webkit-text-fill-color: var(--text-bright) !important;
            color: var(--text-bright) !important;
        }
        html[data-theme="light"] .stat-card:not(.stat-card-error):not(.stat-card-success):not(.stat-card-gold) .stat-number {
            background: none !important;
            -webkit-text-fill-color: var(--text-bright) !important;
            color: var(--text-bright) !important;
        }
        html[data-theme="light"] .category-item .id {
            background: none !important;
            -webkit-text-fill-color: var(--text-bright) !important;
            color: var(--text-bright) !important;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        *, *:focus, *:focus-visible, *:focus-within { outline: none !important; box-shadow: none !important; }
        body {
            font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
            background: var(--bg-deepest);
            color: var(--text);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
        }

        /* Custom Scrollbars */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

        /* ====== LOGIN SCREEN ====== */
        /* ── LOGIN SCREEN — Digital Obsidian (Stitch Design) ─────── */
        .login-screen {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #06080d;
            position: relative;
            overflow: hidden;
        }
        .login-screen::before {
            content: '';
            position: absolute;
            width: 50%; height: 50%;
            background: radial-gradient(circle at 50% 50%, rgba(168,180,204,0.06) 0%, rgba(174,179,189,0.04) 50%, transparent 100%);
            top: 50%; left: 50%;
            transform: translate(-50%,-50%);
            pointer-events: none;
        }
        .login-orb-1 {
            position: absolute;
            width: 40%; height: 40%;
            background: radial-gradient(circle, rgba(168,180,204,0.08) 0%, transparent 70%);
            top: -10%; left: -5%;
            filter: blur(60px);
            pointer-events: none;
        }
        .login-orb-2 {
            position: absolute;
            width: 40%; height: 40%;
            background: radial-gradient(circle, rgba(174,179,189,0.10) 0%, transparent 70%);
            bottom: -10%; right: -5%;
            filter: blur(60px);
            pointer-events: none;
        }
        @keyframes loginAppear {
            from { opacity: 0; transform: translateY(16px) scale(0.98); }
            to   { opacity: 1; transform: translateY(0)    scale(1);    }
        }
        .login-box {
            background: rgba(25,28,33,0.65);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid var(--bl4);
            border-radius: 16px;
            padding: 40px;
            width: 100%;
            max-width: 420px;
            box-shadow: 0px 24px 48px rgba(0,0,0,0.45);
            position: relative;
            z-index: 1;
            animation: loginAppear 0.55s cubic-bezier(0.16,1,0.3,1);
        }
        .login-brand-title {
            font-size: 32px;
            font-weight: 900;
            letter-spacing: -0.04em;
            text-align: center;
            background: linear-gradient(135deg, #aeb3bd, #d4d7dd);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 4px;
        }
        .login-brand-sub {
            text-align: center;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: rgba(194,198,214,0.6);
            margin-bottom: 36px;
        }
        .login-welcome {
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.02em;
            color: #e1e2ea;
            margin-bottom: 4px;
            text-align: center;
        }
        .login-welcome-sub {
            font-size: 13px;
            color: rgba(194,198,214,0.7);
            margin-bottom: 28px;
            text-align: center;
        }
        .login-box .form-group { margin-bottom: 18px; }
        .login-box label {
            display: block;
            margin-bottom: 7px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--tA1);
        }
        .login-input-wrap {
            position: relative;
        }
        .login-input-wrap .login-input-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(140,144,159,0.7);
            pointer-events: none;
            transition: color 0.2s;
        }
        .login-input-wrap:focus-within .login-input-icon { color: var(--text); }
        .login-box input[type="email"],
        .login-box input[type="password"],
        .login-box input[type="text"] {
            width: 100%;
            padding: 13px 14px 13px 42px;
            border: 1px solid rgba(66,71,84,0.35);
            border-radius: 10px;
            background: var(--bg-inset-3);
            color: var(--text-bright);
            font-size: 14px;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .login-box input:focus {
            border-color: var(--bl5) !important;
            box-shadow: 0 0 0 1px rgba(168,180,204,0.15) !important;
            outline: none !important;
        }
        .login-box input::placeholder { color: rgba(140,144,159,0.4); }
        .login-box input[type="password"] { padding-right: 42px; }

        /* Login box: pointer-tracking glow + glowing border on hover (wie Homepage-Cards) */
        .login-box {
            --spotlight-size: 380px;
            --hue: calc(220 + (var(--glow-xp, 0.5) * 40));
            overflow: hidden;
        }
        .login-box::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(
                var(--spotlight-size) var(--spotlight-size) at
                calc(var(--glow-x, 0) * 1px) calc(var(--glow-y, 0) * 1px),
                hsla(0, 0%, 72%, 0.07), transparent 100%
            );
            background-attachment: fixed;
            opacity: 0;
            transition: opacity 0.5s ease;
            pointer-events: none;
            z-index: 0;
        }
        .login-box::after {
            content: '';
            position: absolute;
            inset: -1px;
            border: 1px solid transparent;
            border-radius: 17px;
            background: radial-gradient(
                calc(var(--spotlight-size) * 0.7) calc(var(--spotlight-size) * 0.7) at
                calc(var(--glow-x, 0) * 1px) calc(var(--glow-y, 0) * 1px),
                hsla(0, 0%, 72%, 0.55), transparent 100%
            );
            background-attachment: fixed;
            mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
            mask-clip: padding-box, border-box;
            mask-composite: exclude;
            -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
            -webkit-mask-clip: padding-box, border-box;
            -webkit-mask-composite: xor;
            opacity: 0;
            transition: opacity 0.5s ease;
            pointer-events: none;
            z-index: 0;
        }
        .login-box:hover::before { opacity: 1; }
        .login-box:hover::after  { opacity: 1; }
        .login-box > * { position: relative; z-index: 1; }
        .login-pw-toggle {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: rgba(140,144,159,0.6);
            padding: 4px;
            transition: color 0.2s;
            display: flex;
            align-items: center;
        }
        .login-pw-toggle:hover { color: var(--text); }
        .login-row-between {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 7px;
        }
        .login-forgot {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(194,198,214,0.55);
            text-decoration: none;
            transition: color 0.2s;
        }
        .login-forgot:hover { color: var(--text); }
        .login-remember {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 22px;
        }
        .login-remember input[type="checkbox"] {
            width: 16px; height: 16px;
            accent-color: var(--text);
            background: var(--bg-inset-3);
            border: 1px solid rgba(66,71,84,0.4);
            border-radius: 4px;
            padding: 0;
        }
        .login-remember span {
            font-size: 13px;
            color: rgba(194,198,214,0.7);
        }
        .login-btn {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 10px;
            background: linear-gradient(135deg, #d4d7dd, #aeb3bd);
            color: #06080d;
            font-size: 14px;
            font-weight: 700;
            font-family: inherit;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: transform 0.15s, box-shadow 0.2s;
            box-shadow: 0 4px 16px rgba(174,179,189,0.25);
            letter-spacing: 0.01em;
        }
        .login-btn:hover  { transform: scale(1.01); box-shadow: 0 6px 24px rgba(174,179,189,0.35); }
        .login-btn:active { transform: scale(0.98); }
        .login-btn svg { transition: transform 0.2s; }
        .login-btn:hover svg { transform: translateX(3px); }
        .login-divider {
            position: relative;
            margin: 28px 0;
            text-align: center;
        }
        .login-divider::before {
            content: '';
            position: absolute;
            inset: 50% 0 auto;
            height: 1px;
            background: rgba(66,71,84,0.2);
        }
        .login-divider span {
            position: relative;
            background: rgba(25,28,33,0.95);
            padding: 0 14px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: rgba(140,144,159,0.7);
        }
        .login-switch {
            text-align: center;
            font-size: 13px;
            color: rgba(194,198,214,0.65);
        }
        .login-switch a {
            color: var(--text);
            font-weight: 700;
            text-decoration: none;
            margin-left: 4px;
            transition: opacity 0.2s;
        }
        .login-switch a:hover { opacity: 0.8; text-decoration: underline; }
        .login-error {
            background: rgba(147,0,10,0.25);
            border: 1px solid rgba(255,100,100,0.2);
            color: #ffb4ab;
            padding: 11px 14px;
            border-radius: 8px;
            margin-bottom: 18px;
            display: none;
            font-size: 13px;
            font-weight: 500;
        }
        .login-bottom-line {
            position: fixed;
            bottom: 0; left: 0;
            width: 100%; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(168,180,204,0.20), transparent);
            pointer-events: none;
        }

        /* ====== GLOBAL FORM ELEMENTS ====== */
        input[type="number"]::-webkit-inner-spin-button,
        input[type="number"]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
        input[type="number"] { -moz-appearance:textfield; }

        select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], textarea {
            font-family: inherit;
            color: var(--text);
            background: var(--bg-deep);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            transition: all 0.25s;
        }
        select:focus, input:focus, textarea:focus {
            outline: none;
            border-color: var(--border-light);
            box-shadow: none;
        }
        select {
            padding: 9px 12px;
            font-size: 13px;
            cursor: pointer;
            appearance: none;
            color-scheme: dark;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7694' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            padding-right: 30px;
        }

        /* ====== BUTTONS ====== */
        .btn {
            padding: 10px 16px;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            transition: all 0.25s ease;
            position: relative;
            letter-spacing: 0.2px;
        }
        .btn-primary {
            background: var(--gradient-main);
            color: #fff;
            box-shadow: 0 2px 10px rgba(168,180,204,0.18);
        }
        .btn-primary:hover {
            box-shadow: 0 4px 20px rgba(168,180,204,0.25);
            transform: translateY(-1px);
        }
        .btn-secondary {
            background: var(--bg-elevated);
            color: var(--text);
            border: 1px solid var(--border-light);
        }
        .btn-secondary:hover {
            background: var(--bg-hover);
            border-color: var(--accent);
        }
        .btn-success {
            background: var(--gradient-success);
            color: #fff;
            box-shadow: 0 2px 10px rgba(34,197,94,0.25);
        }
        .btn-success:hover {
            box-shadow: 0 4px 20px rgba(34,197,94,0.4);
            transform: translateY(-1px);
        }
        .btn-warning {
            background: var(--gradient-warm);
            color: #fff;
            box-shadow: 0 2px 10px rgba(245,158,11,0.25);
        }
        .btn-warning:hover {
            box-shadow: 0 4px 20px rgba(245,158,11,0.4);
            transform: translateY(-1px);
        }
        .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
        .btn-small { padding: 6px 14px; font-size: 11px; width: auto; }
        @keyframes abmahnSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        .abmahn-spin-ring { transform-origin: 34px 34px; animation: abmahnSpin 1s linear infinite; }
        .btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
        .inv-period-btn.active { background: var(--accent) !important; color: var(--text-white) !important; border-color: var(--accent) !important; }
        .stat-period-btn { font-size:11px;font-weight:700;letter-spacing:.5px;padding:5px 14px;border:none;background:transparent;color:var(--text-dim);cursor:pointer;font-family:inherit; }
        .stat-period-btn.active { background: rgba(168,180,204,0.12) !important; color: var(--text) !important; }
        @keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
        .dash-hud {
            background:
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) top left/14px 2px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) top left/2px 14px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) top right/14px 2px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) top right/2px 14px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) bottom left/14px 2px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) bottom left/2px 14px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) bottom right/14px 2px no-repeat,
                linear-gradient(rgba(168,180,204,.25),rgba(168,180,204,.25)) bottom right/2px 14px no-repeat,
                var(--bg-card);
            border: 1px solid var(--bl6);
            border-radius: 10px;
            position: relative;
            animation: fadeUp .4s ease both;
        }
        .dash-hud-title {
            font-size:9px;font-weight:700;letter-spacing:2px;color:rgba(107,118,148,.5);
            text-transform:uppercase;margin-bottom:12px;
            display:flex;align-items:center;gap:6px;
        }
        .dash-hud-title::after {
            content:'';flex:1;height:1px;
            background:linear-gradient(90deg,rgba(107,118,148,.2),transparent);
            display:inline-block;
        }
        .prom-filter-tab { padding:8px 16px;font-size:12px;font-weight:600;border:none;background:none;cursor:pointer;color:var(--text-dim);border-bottom:2px solid transparent;margin-bottom:-1px; }
        .prom-filter-tab:hover { color:var(--text); }
        .prom-filter-tab.active { color:var(--text);border-bottom-color:var(--text); }
        .prom-quick-date { padding:5px 14px;font-size:11px;font-weight:700;border:none;background:transparent;cursor:pointer;color:var(--text-dim);letter-spacing:.5px;font-family:inherit; }
        .prom-quick-date:hover { color:var(--text);background:rgba(255,255,255,.04); }
        .prom-quick-date.active { color:var(--text);background:rgba(168,180,204,0.12); }
        /* ====== SETTINGS SELECT FIX ====== */
        .settings-panel select {
            width: 100%;
            padding: 10px 14px;
            padding-right: 34px;
            font-size: 13px;
        }
        .settings-panel input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .settings-panel textarea {
            width: 100%;
            padding: 10px 14px;
            font-size: 13px;
        }
        input[type="range"] { -webkit-appearance:none;appearance:none;height:4px;border-radius:2px;background:rgba(168,180,204,.2);outline:none;border:none;cursor:pointer; }
        input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:#a8b4cc;border:none;cursor:pointer; }
        input[type="range"]::-moz-range-thumb { width:14px;height:14px;border-radius:50%;background:#a8b4cc;border:none;cursor:pointer; }
        input[type="range"]::-webkit-slider-runnable-track { height:4px;border-radius:2px;background:rgba(168,180,204,.2); }

        /* Produkte-Tabelle: nur Verhalten, Breiten direkt am th */
        #mainProductTable td:nth-child(1) { padding:0; text-align:center; vertical-align:middle; }
        #mainProductTable td:nth-child(1) input[type=checkbox],
        #mainProductTable th:nth-child(1) input[type=checkbox] { display:block; margin:0 auto; width:14px; height:14px; cursor:pointer; accent-color:var(--text); }
        #salesListContainer td:nth-child(1) { padding:0; text-align:center; vertical-align:middle; }
        #salesListContainer td:nth-child(1) input[type=checkbox],
        #salesListContainer th:nth-child(1) input[type=checkbox] { display:block; margin:0 auto; width:14px; height:14px; cursor:pointer; accent-color:var(--text); }
        #invoiceListTable td:nth-child(1) { padding:0; text-align:center; vertical-align:middle; }
        #invoiceListTable td:nth-child(1) input[type=checkbox],
        #invoiceListTable th:nth-child(1) input[type=checkbox] { display:block; margin:0 auto; width:14px; height:14px; cursor:pointer; accent-color:var(--text); }
        #mainProductTable td:nth-child(2) { vertical-align:middle; padding:1px 2px; overflow:hidden; }
        #mainProductTable td:nth-child(3) { vertical-align:middle; overflow:hidden; text-align:center; }
        #mainProductTable td:nth-child(4) { overflow:hidden; }
        #mainProductTable td:nth-child(6) { overflow:hidden; white-space:nowrap; }
        #mainProductTable td:nth-child(7) { vertical-align:middle; overflow:hidden; padding:2px 3px; }

        /* ====== GLOBAL SELECT DARK THEME ====== */
        select { background: var(--bg-elevated) !important; color: var(--text) !important; border-color: var(--border) !important; }
        select option { background: var(--bg-elevated) !important; color: var(--text) !important; }

        /* ====== PRODUCT TABLE ====== */
        .product-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 11px;
            table-layout: fixed;
        }
        .product-table th {
            background: var(--bg-card);
            padding: 11px 4px;
            text-align: left;
            font-weight: 600;
            font-size: 14px;
            color: var(--text-white);
            position: sticky;
            top: 0;
            border-bottom: 1px solid var(--border);
            white-space: nowrap;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            z-index: 5;
            overflow: hidden;
            user-select: none;
            box-sizing: border-box;
        }
        .col-resize-handle {
            position: absolute;
            right: 0; top: 0; bottom: 0;
            width: 5px;
            cursor: col-resize;
            z-index: 6;
        }
        .col-resize-handle:hover, .col-resize-handle.dragging {
            background: var(--accent);
            opacity: 0.5;
        }
        .product-table td {
            padding: 6px 4px;
            border-bottom: 1px solid var(--border);
            vertical-align: top;
            transition: background 0.15s;
        }
        .product-table tbody tr { background: transparent; cursor: pointer; }
        .product-table tbody tr:hover { background: var(--bg-hover); }
        .product-table tbody tr:hover td { border-bottom-color: var(--bl7); }
        .product-table input[type="checkbox"] {
            width: 14px; height: 14px;
            accent-color: var(--text);
            cursor: pointer;
        }

        /* Detail-Bild-Grid Slots */
        .det-thumb-slot:hover .img-fname-edit { opacity:1 !important; pointer-events:auto !important; }
        .det-thumb-slot .img-fname-edit:focus { opacity:1 !important; pointer-events:auto !important; background:rgba(0,0,0,0.92) !important; color:var(--text-white) !important; }
        .det-thumb-slot {
            aspect-ratio: 1;
            overflow: hidden;
            position: relative;
        }
        .det-thumb-slot .img-drag-handle { opacity: 0; transition: opacity 0.15s; }
        .det-thumb-slot:hover .img-drag-handle { opacity: 1; }
        .det-thumb-slot.drag-over { outline: 2px solid var(--bl8) !important; }
        .det-thumb-slot[draggable="true"] { cursor: grab; }

        /* Thumbnail in table */
        .product-thumb {
            width: 48px;
            height: 48px;
            border-radius: 0;
            object-fit: contain;
            background: #fff;
            border: 1px solid var(--border);
            display: block;
            flex-shrink: 0;
        }
        .product-thumb:hover { }
        .product-thumb-empty {
            width: 48px;
            height: 48px;
            border-radius: 0;
            background: var(--bg-elevated);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--text-dim);
            border: 1px dashed var(--border);
            flex-shrink: 0;
            opacity: 0.6;
        }

        /* ====== STATUS BADGES ====== */
        .status-badge {
            display: inline-block;
            padding: 1px 4px;
            border-radius: 20px;
            font-size: 8px;
            font-weight: 700;
            letter-spacing: 0.2px;
            text-transform: uppercase;
        }
        .status-New {
            background: rgba(59,130,246,0.22);
            color: #3b82f6;
            box-shadow: inset 0 0 0 1px rgba(59,130,246,0.50);
        }
        .status-Enriching {
            background: rgba(59,130,246,0.22);
            color: #3b82f6;
            box-shadow: inset 0 0 0 1px rgba(59,130,246,0.50);
            animation: pulseGlow 2s ease-in-out infinite;
        }
        @keyframes pulseGlow {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        .status-Enriched {
            background: rgba(59,130,246,0.22);
            color: #3b82f6;
            box-shadow: inset 0 0 0 1px rgba(59,130,246,0.50);
        }
        .status-Approved {
            background: rgba(34,197,94,0.1);
            color: #4ade80;
            box-shadow: inset 0 0 0 1px rgba(34,197,94,0.2);
        }
        .status-Uploading {
            background: rgba(249,115,22,0.1);
            color: #fb923c;
            box-shadow: inset 0 0 0 1px rgba(249,115,22,0.2);
            animation: pulseGlow 2s ease-in-out infinite;
        }
        .status-Live {
            background: rgba(34,197,94,0.15);
            color: #22c55e;
            box-shadow: inset 0 0 0 1px rgba(34,197,94,0.3), 0 0 8px rgba(34,197,94,0.15);
        }
        .status-Sold {
            background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(245,158,11,0.15));
            color: #fbbf24;
            box-shadow: inset 0 0 0 1px rgba(234,179,8,0.3), 0 0 8px rgba(234,179,8,0.1);
            font-weight: 800;
        }
        .status-Error {
            background: rgba(239,68,68,0.1);
            color: #f87171;
            box-shadow: inset 0 0 0 1px rgba(239,68,68,0.2);
        }
        .status-Blocked {
            background: rgba(107,114,148,0.1);
            color: #9ca3af;
            box-shadow: inset 0 0 0 1px rgba(107,114,148,0.2);
        }
        .status-NotFound {
            background: rgba(249,115,22,0.1);
            color: #fb923c;
            box-shadow: inset 0 0 0 1px rgba(249,115,22,0.2);
        }

        /* Table cell helpers */
        .cell-title {
            cursor: pointer;
            color: var(--tA2);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
            white-space: normal;
            font-weight: 500;
            transition: color 0.2s;
        }
        .cell-title:hover { color: #93bbfd; text-decoration: none; }
        .cell-desc { color: var(--text-muted); font-size: 11px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .cell-mono { font-family: 'SF Mono', 'Cascadia Code', monospace; font-size: 12px; color: var(--text-dim); }
        .cell-imgs { font-size: 11px; font-weight: 700; }
        .cell-imgs.full { color: var(--text-dim); }
        .cell-imgs.partial { color: var(--text-dim); }
        .cell-imgs.empty { color: #ef4444; }
        .gpsr-icon { font-size: 14px; color: var(--text-dim); font-weight: 700; }

        /* ====== DETAIL TAB INPUT COLORS ====== */
        #detailTab input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        #detailTab textarea,
        #detailTab select {
            color: var(--text-dim);
        }

        /* ====== MODAL ====== */
        .modal {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.8);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 1000;
            justify-content: center;
            align-items: flex-start;
            padding: 20px;
            overflow-y: auto;
        }
        .modal.show { display: flex; }
        .modal-content {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 900px;
            border: 1px solid var(--bl9);
            margin: 20px 0;
            display: flex;
            flex-direction: column;
            box-shadow: var(--shadow-lg);
            animation: modalSlideIn 0.3s ease-out;
        }
        @keyframes modalSlideIn {
            from { opacity: 0; transform: translateY(-20px) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 24px;
            border-bottom: 1px solid var(--border);
            background: var(--bg-elevated);
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        }
        .modal-header h2 {
            color: var(--text);
            font-size: 18px;
            font-weight: 700;
        }
        .modal-close {
            background: var(--bg-card);
            border: 1px solid var(--border);
            color: var(--text-muted);
            font-size: 18px;
            cursor: pointer;
            width: 32px; height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .modal-close:hover { color: #ef4444; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
        .modal-body { padding: 20px 24px; }

        /* Modal Sections (collapsible) */
        .modal-section {
            margin-bottom: 10px;
            border: 1px solid var(--bl9);
            border-radius: var(--radius-md);
            overflow: hidden;
            transition: border-color 0.3s;
        }
        .modal-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: var(--bg-elevated);
            cursor: pointer;
            user-select: none;
            transition: background 0.2s;
        }
        .modal-section-header h4 {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .modal-section-header .section-icon { font-size: 15px; }
        .modal-section-header .section-toggle {
            color: var(--text-dim);
            font-size: 16px;
            transition: all 0.2s;
        }
        .modal-section-header:hover { background: var(--bg-hover); }
        .modal-section-body { padding: 16px; }
        .modal-section-body.collapsed { display: none; }
        .modal-section.highlight {
            border-color: var(--bl10);
            box-shadow: 0 0 15px rgba(168,180,204,0.04);
        }
        .modal-section.highlight .modal-section-header {
            background: linear-gradient(135deg, rgba(168,180,204,0.06), rgba(139,92,246,0.05));
        }
        .modal-section.highlight .modal-section-header h4 { color: var(--accent-light); }

        /* Save bar (sticky am unteren Modal-Rand) */
        .modal-save-bar {
            position: sticky;
            bottom: 0;
            background: var(--bg-card);
            padding: 16px 24px;
            border-top: 1px solid var(--border);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .modal-save-bar .enrich-ai-btn {
            flex: 1;
            min-width: 180px;
        }

        /* ====== CHECKBOXEN GLOBAL ====== */
        input[type="checkbox"] {
            -webkit-appearance: none;
            appearance: none;
            width: 14px !important;
            height: 14px !important;
            min-width: 14px;
            min-height: 14px;
            max-width: 14px;
            max-height: 14px;
            border: 1px solid var(--bl11);
            border-radius: 2px;
            background: transparent;
            cursor: pointer;
            flex-shrink: 0;
            position: relative;
            transition: border-color 0.15s;
        }
        input[type="checkbox"]:checked {
            border-color: var(--bl8);
            background-color: var(--tA3);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 5L4 7L8 3' stroke='%23a8b4cc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
            background-size: 10px 10px;
        }
        input[type="checkbox"]:hover { border-color: var(--bl12); }

        /* ====== FORM ====== */
        .form-group { margin-bottom: 15px; }
        .form-group label {
            display: block;
            margin-bottom: 6px;
            color: var(--text-muted);
            font-weight: 600;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .form-group input, .form-group textarea, .form-group select {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--bg-deep);
            color: var(--text);
            font-size: 13px;
            font-family: inherit;
            transition: all 0.25s;
        }
        .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }
        .form-group textarea { min-height: 120px; resize: vertical; }
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
        .char-count { font-size: 10px; color: var(--text-dim); margin-top: 4px; font-weight: 500; }
        .char-count.warning { color: #f59e0b; }
        .char-count.error { color: #ef4444; }
        .char-count.ok { color: #22c55e; }

        /* Category Search */
        .category-search { display: flex; gap: 8px; margin-bottom: 12px; }
        .category-search input { flex: 1; }
        .category-results {
            background: var(--bg-elevated);
            border-radius: var(--radius-sm);
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border);
        }
        .category-item {
            padding: 12px 14px;
            cursor: pointer;
            border-bottom: 1px solid var(--border);
            font-size: 12px;
            transition: background 0.15s;
        }
        .category-item:hover { background: var(--bg-hover); }
        .category-item .id {
            background: var(--gradient-main);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
            margin-right: 10px;
        }
        .det-cat-item {
            padding: 7px 10px;
            cursor: pointer;
            border-bottom: 1px solid var(--border);
            transition: background 0.12s;
        }
        .det-cat-item:hover { background: rgba(99,102,241,0.12); }
        .det-cat-item:last-child { border-bottom: none; }

        /* ====== TOAST ====== */
        .toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; }
        .toast {
            background: var(--bg-card);
            border-left: 3px solid #22c55e;
            padding: 14px 20px;
            margin-top: 8px;
            border-radius: var(--radius-sm);
            box-shadow: var(--shadow-md);
            animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            font-size: 13px;
            color: var(--text);
            font-weight: 500;
            backdrop-filter: blur(10px);
            border: 1px solid var(--border);
        }
        .toast.error { border-left-color: #ef4444; }
        .toast.warning { border-left-color: #f59e0b; }
        .toast.info { border-left-color: var(--accent); }
        @keyframes toastIn {
            from { transform: translateX(100%) scale(0.9); opacity: 0; }
            to { transform: translateX(0) scale(1); opacity: 1; }
        }

        /* ====== SPINNER ====== */
        .spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
            vertical-align: middle;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* ====== LOADING BAR ====== */
        #globalLoadingBar {
            position: fixed;
            top: 56px; left: 0;
            width: 100%; height: 4px;
            z-index: 9999;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.15s;
        }
        #globalLoadingBar.active {
            opacity: 1;
        }
        #globalLoadingBarFill {
            height: 100%;
            background: linear-gradient(90deg, #64748b, #a8b4cc, #c4cde0, #a8b4cc, #64748b);
            background-size: 300% 100%;
            animation: loadingSlide 1s linear infinite;
            width: 100%;
        }
        @keyframes loadingSlide {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }
        @keyframes importSaveBarAnim {
            0%   { width: 0%;    opacity: 0.9; }
            65%  { width: 100%;  opacity: 0.9; }
            100% { width: 100%;  opacity: 0; }
        }
        .import-save-bar {
            height: 2px;
            width: 0%;
            opacity: 0;
            background: #374151;
            border-radius: 0 1px 1px 0;
            pointer-events: none;
        }
        .import-save-bar.running {
            animation: importSaveBarAnim 0.65s ease-out forwards;
        }

        /* ====== ITEM SPECIFICS ====== */
        .det-intl-row { display:grid; grid-template-columns:16px 1fr 86px 46px 46px; gap:4px; align-items:center; padding:3px 4px; border-radius:4px; }
        .det-intl-row:hover { background:var(--bg-hover); }
        .det-intl-row .intl-active { width:14px; height:14px; cursor:pointer; }
        .det-intl-row span { font-size:12px; color:var(--text-muted); }
        .det-intl-row input[type="number"] { background:var(--bg-elevated); border:1px solid var(--border); border-radius:3px; color:var(--text); }
        .spec-table { width: 100%; border-collapse: collapse; }
        .spec-table tr { border-bottom: 1px solid var(--border); }
        .spec-table tr:hover { background: var(--bg-hover); }
        .spec-table td { padding: 6px 8px; vertical-align: middle; }
        .spec-table td.spec-label {
            width: 180px; min-width: 140px;
            font-size: 12px; font-weight: 600; color: var(--text);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .spec-table td.spec-label.required { color: #fbbf24; }
        .spec-table td.spec-value { width: auto; }
        .spec-table td.spec-value input, .spec-table td.spec-value select {
            width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
            background: var(--bg-deep); color: var(--text); font-size: 12px; font-family: inherit;
            transition: all 0.25s;
        }
        .spec-table td.spec-value input:focus, .spec-table td.spec-value select:focus {
            border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-glow);
        }
        .spec-table td.spec-actions { width: 32px; text-align: center; }
        .spec-delete { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px; }
        .spec-delete:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
        .spec-field { margin-bottom: 8px; }
        .spec-field label { display: block; margin-bottom: 3px; color: var(--text-muted); font-size: 11px; font-weight: 500; }
        .spec-field label.required { color: #fbbf24; font-weight: 700; }
        .spec-field input, .spec-field select {
            width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
            background: var(--bg-deep); color: var(--text-dim); font-size: 12px; font-family: inherit;
            transition: all 0.25s;
        }
        .spec-field input:focus, .spec-field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-glow); }
        .spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
        /* ItemSpecifics Tooltip in product table */
        .is-badge { position: relative; cursor: pointer; }
        .is-tooltip {
            display: none; position: absolute; right: 0; top: 100%; z-index: 500;
            background: var(--bg-elevated); border: 1px solid var(--border-light);
            border-radius: var(--radius-sm); padding: 10px 14px; min-width: 280px; max-width: 400px;
            box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.6;
        }
        .is-badge:hover .is-tooltip { display: block; }
        .is-tooltip-row { display: flex; gap: 8px; padding: 2px 0; border-bottom: 1px solid var(--border); }
        .is-tooltip-row:last-child { border-bottom: none; }
        .is-tooltip-key { color: var(--accent-light); font-weight: 600; min-width: 100px; flex-shrink: 0; }
        .is-tooltip-val { color: var(--text); word-break: break-word; }

        /* ====== ENRICHMENT CARDS (42module Design) ====== */
        .enrich-action-cards { display: flex; flex-direction: column; gap: 10px; }
        .enrich-ai-btn {
            width:100%; font-size:12px; font-family:inherit; cursor:pointer;
            background: var(--bg-elevated); border: 1px solid var(--border);
            color: var(--text-muted); border-radius:8px; padding:10px 14px;
            display:flex; align-items:center; gap:10px; text-align:left;
            transition: all 0.2s;
            /* Innenelemente (Selects/Buttons, 30px) sind hoeher als der Innenraum (28px)
               und uebermalten sonst den 1px-Rand -> am Rand abschneiden */
            overflow: hidden;
        }
        /* Custom-Select-Menue darf nicht vom overflow:hidden des Rahmens abgeschnitten werden */
        .enrich-ai-btn:has(.csel) { overflow: visible; }
        .enrich-ai-btn .ai-btn-icon {
            flex-shrink:0; width:32px; height:32px; border-radius:8px;
            background: rgba(255,255,255,0.06); display:flex;
            align-items:center; justify-content:center;
        }
        .enrich-ai-btn .ai-btn-icon svg { stroke: var(--text-dim); }
        .enrich-ai-btn:hover {
            background: rgba(168,180,204,0.06); border-color: var(--bl13);
            color: var(--text);
        }
        .enrich-ai-btn:hover .ai-btn-icon { background: rgba(168,180,204,0.10); }
        .enrich-ai-btn:hover .ai-btn-icon svg { stroke: #a8b4cc; }
        #prodStats .enrich-ai-btn { padding:6px 10px; font-size:11px; gap:7px; }
        #prodStats .enrich-ai-btn .ai-btn-icon { width:24px; height:24px; border-radius:6px; }
        #prodStats .enrich-ai-btn .ai-btn-icon svg { width:13px; height:13px; }
        .enrich-ai-btn.active {
            background: rgba(168,180,204,0.10); border-color: var(--bl10);
            color: var(--text); box-shadow: inset 0 0 0 1px rgba(168,180,204,0.17);
        }
        .enrich-ai-btn.active .ai-btn-icon { background: rgba(168,180,204,0.18); }
        .enrich-ai-btn.active .ai-btn-icon svg { stroke: #a8b4cc; }
        /* Format-Menue (Beschreibung umformatieren, Detail-View) */
        .fmt-opt { display:block; width:100%; text-align:left; background:none; border:none; cursor:pointer; padding:7px 12px; font-family:inherit; font-size:11px; font-weight:600; color:var(--text); }
        .fmt-opt span { display:block; font-size:10px; font-weight:400; color:var(--text-dim); margin-top:1px; }
        .fmt-opt:hover { background:rgba(168,180,204,0.08); }
        .fmt-opt .fmt-check { display:none; font-style:normal; color:#22c55e; font-weight:900; margin-right:6px; }
        .fmt-opt.fmt-active .fmt-check { display:inline; }
        .enrich-card {
            display: flex; align-items: center; gap: 16px;
            padding: 14px 18px; border-radius: 12px;
            background: var(--bg-deep); border: 2px solid transparent;
            cursor: pointer; transition: all 0.2s;
        }
        .enrich-card:hover { border-color: var(--accent); background: var(--bg-hover); transform: translateX(4px); }
        .enrich-card:active { transform: translateX(2px); opacity: 0.9; }
        .enrich-card-icon {
            width: 48px; height: 48px; min-width: 48px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
        }
        .enrich-card-text { flex: 1; }
        .enrich-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
        .enrich-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
        .enrich-field-cb {
            display: flex; align-items: center; gap: 5px;
            font-size: 11px; color: var(--text); cursor: pointer;
            padding: 5px 9px; border-radius: 8px; background: var(--bg-deep);
            border: 1px solid var(--border); transition: all 0.2s;
        }
        .enrich-field-cb:hover { border-color: var(--accent); }
        .enrich-field-cb input { accent-color: var(--text); width: 13px; height: 13px; }

        /* ====== SETTINGS PANELS ====== */
        .settings-panel {
            background: var(--bg-card);
            padding: 20px;
            border-radius: 0;
            margin-bottom: 16px;
            border: 1px solid var(--bl6);
            transition: border-color 0.2s;
        }
        .settings-panel:hover { border-color: var(--bl6); }
        #versandPanel { border: none !important; }
        #versandPanel:hover { border: none !important; }
        #settingsTab .settings-panel { border: none; }
        #settingsTab .settings-panel:hover { border: none; }
        #settingsTab .settings-panel h4 {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 2px;
            color: var(--tA4);
            text-transform: uppercase;
            margin-top: 0;
            margin-bottom: 14px;
        }
        .sett-tab-btn { padding:10px 18px;font-size:12px;font-weight:600;border:none;border-bottom:3px solid transparent;background:transparent;color:var(--text-dim);cursor:pointer;white-space:nowrap;transition:all .15s; }
        .sett-tab-btn:hover { color:var(--text);background:rgba(255,255,255,0.04); }
        .sett-tab-btn.active { color:var(--text);border-bottom-color:var(--text); }
        #invoiceTab .settings-panel, #invoiceStatsTab .settings-panel,
        #invoiceDetailTab .settings-panel, #invoiceExportTab .settings-panel,
        #maerkteOverviewTab .settings-panel, #promotedTab .settings-panel,
        #messagesInboxTab .settings-panel, #msgVorlagenTab .settings-panel, #msgStatsTab .settings-panel {
            border-radius: 0;
            border: none;
        }
        #salesPanel { border: none !important; }
        #salesPanel:hover { border: none !important; }
        #exportTab .settings-panel { border: 1px solid var(--line-1); }
        #exportTab .settings-panel:hover { border-color: var(--line-1); }
        #invoiceTab .stat-card, #maerkteOverviewTab .stat-card,
        #msgStatsTab .stat-card {
            border-radius: 0;
            border-color: transparent;
        }
        #detDescPreview h3, #editDescPreview h3 { font-size:15px; font-weight:700; margin:18px 0 8px 0; color:var(--text); }
        #detDescPreview h3:first-child, #editDescPreview h3:first-child { margin-top:0; }
        #detDescPreview p, #editDescPreview p { margin:0 0 12px 0; line-height:1.7; }
        #detDescPreview ul, #editDescPreview ul { margin:6px 0 14px 18px; padding:0; }
        #detDescPreview li, #editDescPreview li { margin-bottom:5px; line-height:1.6; }
        #detDescPreview strong, #editDescPreview strong { font-weight:700; }
        .settings-panel h4 {
            color: var(--text);
            margin-bottom: 18px;
            font-size: 15px;
            font-weight: 700;
        }
        .settings-panel h5 { color: var(--text-muted); margin: 18px 0 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

        /* Hide/Show */
        .hidden { display: none !important; }

        /* ====== ICON SIDEBAR ====== */
        .app-layout {
            display: flex;
            min-height: 100vh;
        }
        /* ====== TOP NAVIGATION ====== */
        .top-nav {
            position: fixed;
            top: 0; left: 0; right: 0;
            height: 56px;
            z-index: 150;
            display: flex;
            align-items: center;
            padding: 0 16px 0 7px;
            justify-content: space-between;
            background: rgba(6, 8, 13, 0.88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }
        .nav-pill {
            display: flex;
            align-items: center;
            gap: 1px;
            background: rgba(6, 8, 13, 0.88);
            border: none;
            border-radius: 0 var(--radius-md) var(--radius-md) 0;
            padding: 4px 8px 4px 4px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
            white-space: nowrap;
        }
        .top-nav-sections { display: flex; gap: 0; }
        .section-pill { display: flex; gap: 1px; }
        .section-btn {
            padding: 8px 13px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            border-radius: var(--radius-sm);
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.18s ease;
            display: flex;
            align-items: center;
            gap: 7px;
        }
        .section-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
        .section-btn .btn-label {
            max-width: 0;
            overflow: hidden;
            white-space: nowrap;
            opacity: 0;
            transition: max-width 0.28s ease, opacity 0.2s ease;
            display: inline-block;
        }
        .section-btn:hover {
            background: rgba(30, 35, 51, 0.9);
            color: var(--text);
        }
        .section-btn.active {
            background: rgba(168,180,204,0.12);
            color: var(--text);
            box-shadow: inset 0 0 0 1px rgba(168,180,204,0.2);
        }
        .section-btn.active .btn-label {
            max-width: 120px;
            opacity: 1;
        }
        /* NonStop-Deals-Logo in der oberen Leiste (ersetzt den Dashboard-Knopf, Klick -> Dashboard) */
        .nav-logo {
            display: flex;
            align-items: center;
            gap: 9px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 3px 12px 3px 6px;
            margin-right: 4px;
            border-radius: var(--radius-sm);
            font-family: inherit;
            transition: background 0.18s ease;
        }
        .nav-logo:hover { background: rgba(168,180,204,0.10); }
        .nav-logo-mark {
            width: 30px; height: 30px; flex-shrink: 0;
            filter: drop-shadow(0 4px 10px rgba(174,179,189,0.4));
            transition: transform 0.25s ease;
        }
        .nav-logo:hover .nav-logo-mark { transform: rotate(-6deg) scale(1.06); }
        .nav-logo-text {
            font-weight: 900;
            font-size: 16px;
            color: var(--text-bright);
            letter-spacing: -0.01em;
            line-height: 1.08;
            text-align: left;
            white-space: nowrap;
        }
        .nav-logo-grad {
            background: linear-gradient(135deg,#d4d7dd,#aeb3bd);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .nav-logo-text small {
            display: block;
            font-weight: 600;
            font-size: 8.5px;
            letter-spacing: 0.4px;
            color: var(--text-dim);
            margin-top: -1px;
            text-transform: none;
        }
        .top-nav-user {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .top-nav-user .user-greeting {
            font-size: 12px;
            color: var(--text-muted);
            font-weight: 500;
            padding: 0 4px;
        }
        .top-nav-user .user-greeting span { color: var(--text); font-weight: 600; }
        .top-nav-user .logout-btn {
            padding: 5px;
            border: none;
            background: transparent;
            color: var(--text-dim);
            cursor: pointer;
            border-radius: 50px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
        }
        .top-nav-user .logout-btn:hover { color: #f87171; background: rgba(248,113,113,0.1); }
        .top-nav-user .logout-btn svg { width: 16px; height: 16px; }

        .icon-sidebar {
            width: 56px;
            background: transparent;
            border-right: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 0;
            position: fixed;
            top: 56px; left: 0;
            height: calc(100vh - 56px);
            z-index: 100;
        }
        .sidebar-nav {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            flex: 1;
        }
        .sidebar-bottom {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }
        .nav-divider {
            width: 32px;
            height: 1px;
            background: var(--border);
            margin: 8px 0;
        }
        .nav-icon {
            width: 44px; height: 44px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-dim);
            transition: all 0.2s ease;
            border: none;
            background: transparent;
            position: relative;
        }
        .nav-icon svg { width: 20px; height: 20px; }
        .nav-icon:hover {
            background: var(--bg-hover);
            color: var(--text);
        }
        .nav-icon.active {
            background: rgba(168,180,204,0.12);
            color: var(--text);
        }
        .nav-icon.active::before {
            content: '';
            position: absolute;
            left: -6px;
            width: 3px;
            height: 20px;
            background: #a8b4cc;
            border-radius: 0 3px 3px 0;
        }
        .nav-icon .nav-tooltip {
            display: none;
            position: absolute;
            left: 50px;
            background: var(--bg-elevated);
            color: var(--text);
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-md);
            z-index: 200;
            pointer-events: none;
        }
        .nav-icon:hover .nav-tooltip { display: block; }
        .nav-icon.logout-icon:hover { color: #f87171; }

        /* ====== CONTENT AREA ====== */
        .content-area {
            margin-left: 56px;
            margin-top: 56px;
            flex: 1;
            display: flex;
            flex-direction: column;
            height: calc(100vh - 56px);
            min-height: calc(100vh - 56px);
            max-height: calc(100vh - 56px);
            background: var(--bg-deep);
            position: relative;
            overflow: hidden;
        }

        /* ====== VIEW CONTENT ====== */
        .view-content {
            flex: 1;
            padding: 16px 28px;
            overflow-y: auto;
            max-height: calc(100vh - 56px);
        }

        /* Grosse Monitore (27 Zoll WQHD aufwaerts): Arbeitsbereich auf 24-Zoll-Arbeitsbreite
           begrenzen und mittig setzen (1720px = Full-HD minus Sidebar). 03.07.2026 auf
           Erics Wunsch von 1800 auf 1720 gesetzt. */
        @media (min-width: 1900px) {
            .view-content {
                max-width: 1720px;
                margin-left: auto;
                margin-right: auto;
            }
        }

        /* Eingangs-Rechnungen: eine Seite, kein Haupt-Scrollbalken. Der Tab fuellt genau die
           Fensterhoehe; gescrollt wird nur INNEN (Beleg-Vorschau links, Belegliste rechts),
           damit die Knopfleiste unter der Vorschau immer sichtbar bleibt. */
        #eingangsRgTab:not(.hidden) {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* Tabs die rechts landen: explizit links fixieren */
        #invoiceDetailTab:not(.hidden),
        #invoiceExportTab:not(.hidden),
        #invoiceStatsTab:not(.hidden),
        #retourenTab:not(.hidden),
        #bewertungenTab:not(.hidden),
        #paypalTab:not(.hidden),
        #zuBewertenTab:not(.hidden),
        #eurLiveTab:not(.hidden),
        #eingangsRgTab:not(.hidden),
        #kassenbuchTab:not(.hidden),
        #fahrtenbuchTab:not(.hidden),
        #anlagenTab:not(.hidden),
        #ustvaTab:not(.hidden),
        #statistikTab:not(.hidden),
        #steuerChecksTab:not(.hidden) {
            position: absolute;
            top: 0; left: 0; right: 0;
            max-height: calc(100vh - 56px);
            overflow-y: auto;
            padding: 16px 28px;
            box-sizing: border-box;
        }
        /* Retouren-Tab bis zur Browser-Kante ziehen, nur die Tabelle scrollt — kein aeusserer Scrollbalken */
        #retourenTab:not(.hidden) { bottom: 0; overflow: hidden; }
        /* Bewertungen-Tab analog: voller Bildschirm, nur Tabelle scrollt */
        #bewertungenTab:not(.hidden) { bottom: 0; overflow: hidden; }
        /* eBay-Shop-Tab: kein aeusserer Scrollbalken, das Grid scrollt selbst */
        #ebayShopTab:not(.hidden) { overflow-y: hidden; padding-bottom: 16px; }
        /* EUeR-Live (Buchhaltung-Startseite/Gesamtansicht): minimalen waagerechten Scrollbalken unterbinden.
           overflow-y:auto macht overflow-x implizit zu auto; die Detail-Buchungen-Tabelle scrollt in ihrem
           eigenen Container, daher ist horizontales Scrollen auf Tab-Ebene hier nie gewollt. */
        #eurLiveTab:not(.hidden) { overflow-x: hidden; }

        /* ====== STATS BAR ====== */
        .stats-bar {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
        }
        .stat-tile {
            flex: 1; min-width: 100px;
            background: var(--bg-card); border: 1px solid transparent;
            border-radius: var(--radius); padding: 12px 10px;
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            cursor: pointer; transition: all 0.2s; user-select: none;
        }
        .stat-tile:hover { border-color: var(--bl14); background: var(--bg-hover); }
        .stat-tile.active { border-color: var(--bl15); background: rgba(168,180,204,.07); box-shadow: inset 0 0 0 1px rgba(168,180,204,.15); }
        .stat-tile .tile-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
        .stat-card {
            flex: 1;
            background: var(--bg-card);
            padding: 7px 10px;
            border-radius: var(--radius-sm);
            text-align: center;
            border: 1px solid transparent;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }
        .stat-card::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 2px;
            background: var(--gradient-main);
            opacity: 0;
            transition: opacity 0.25s;
        }
        .stat-card:hover { border-color: var(--bl16); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
        .stat-card:hover::after { opacity: 0; }
        .stat-card .stat-number {
            font-size: 18px;
            font-weight: 800;
            background: var(--gradient-main);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }
        .stat-card .stat-label {
            font-size: 9px;
            color: var(--text-dim);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 2px;
        }
        .stat-card-gold .stat-number {
            background: var(--gradient-gold) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
        }
        .stat-card-gold::after { background: var(--gradient-gold); }
        .stat-card-error .stat-number {
            background: linear-gradient(135deg, #ef4444, #f87171) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
        }
        .stat-card-error::after { background: linear-gradient(135deg, #ef4444, #f87171); }
        .stat-card-plain .stat-number {
            background: none !important;
            -webkit-background-clip: initial !important;
            -webkit-text-fill-color: initial !important;
            background-clip: initial !important;
            font-size: 22px;
        }
        .stat-card-success .stat-number {
            background: linear-gradient(135deg, #22c55e, #4ade80) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
            background-clip: text !important;
        }
        .stat-card-success::after { background: linear-gradient(135deg, #22c55e, #4ade80); }

        /* ====== TOOLBAR ====== */
        .toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 16px;
            margin-left: -28px;
            margin-right: -28px;
            padding: 10px 20px 10px 28px;
            background: var(--bg-card);
            border-radius: 0;
            border: none;
        }
        /* 11.08.2026 (Eric): Die Aktionsleiste im Produkte-Reiter bleibt beim Scrollen oben stehen.
           Gescrollt wird NICHT im Fenster, sondern in #productsTab selbst (.view-content hat
           overflow-y:auto) — die Leiste klebt deshalb an DIESEM Kasten, nicht bei top:56px unter der
           Kopfzeile. Ein top:56px waere um genau eine Kopfzeilenhoehe daneben.
           top:-16px statt 0: der Kasten hat 16px Innenabstand oben, und die Haftgrenze liegt an
           dessen Innenkante. Bei top:0 bliebe ein 16px hoher Spalt, durch den die Artikelzeilen
           sichtbar durchlaufen. Die -16px setzen die Leiste buendig an die Aussenkante.
           z-index 20: ueber den Tabellenzeilen, aber weit unter der Kopfzeile (150) und dem
           Auswahl-Menue (9999). */
        #productsTab > #produkteToolbar {
            position: sticky;
            top: 0;
            /* 12.08.2026 (Erics Befund: "Das Dropdown von Anreichern verschwindet unter der Leiste
               Bildstatus/Titel, da steht nur noch ein bisschen Endkontrolle raus"). Die Leiste stand
               auf z-index 20 — und die Kopfzeile der Artikeltabelle (#mainProductTable thead) steht
               EBENFALLS auf 20. Bei Gleichstand gewinnt das Element, das spaeter im Dokument steht:
               die Kopfzeile. Die 9999 am .csel-menu helfen dabei NICHT, denn sie gelten nur INNERHALB
               der Leiste; nach aussen zaehlt allein deren eigene 20.
               Folge: das aufgeklappte Menue lag hinter der Kopfzeile, und ein Klick auf einen
               verdeckten Eintrag traf die Kopfzeile statt den Eintrag — der Knopf tat dann nichts.
               Am 12.08.2026 an den BERECHNETEN Stilen der Live-Seite nachgemessen, nicht vermutet. */
            z-index: 30;
            box-shadow: 0 6px 16px rgba(0,0,0,.28);
        }
        /* 11.08.2026, Nachbesserung nach Erics Screenshot: "sie bewegt sich dennoch ein Stueck nach
           oben." Ursache war mein eigenes top:-16px — damit scrollt die Leiste erst 16px hoch und
           bleibt DANN stehen. Genau dieser Ruck war zu sehen.
           Jetzt top:0 (kein Ruck) und der 16px-Innenabstand des Kastens, durch den sonst Inhalt
           sichtbar durchlaeuft, wird von einem mitfahrenden Streifen zugedeckt. Der Streifen haengt
           an der Leiste, klebt also mit — und traegt den SEITEN-Hintergrund, nicht den der Leiste,
           damit er im ungescrollten Zustand nicht auffaellt. */
        #productsTab > #produkteToolbar::before {
            content: '';
            position: absolute;
            left: 0; right: 0; top: -16px;
            height: 16px;
            /* 11.08.2026, aus Erics Screenshot GEMESSEN: der Streifen malte #e7ebf2 (--bg-deepest),
               die Flaeche daneben ist #eef1f7. Der Hintergrund der Arbeitsflaeche kommt von
               .content-area und der steht auf --bg-deep — nicht vom body. Ein Ton daneben, und man
               sieht ein Band. Wer das hier aendert, misst vorher nach, was .content-area traegt. */
            background: var(--bg-deep);
        }
        html[data-theme="light"] #productsTab > #produkteToolbar {
            box-shadow: 0 6px 16px rgba(15,23,42,.12);
        }
        /* 11.08.2026 (Eric): dieselbe Sache in der Produkt-Detailansicht — Titel, "1 von 4826", die
           Auswahlfelder und Aktualisieren/Speichern/Anreichern bleiben beim Scrollen stehen.
           Gescrollt wird wieder in #detailTab selbst (.view-content), nicht im Fenster.
           top:-16px wie dort, aus demselben Grund: die Haftgrenze liegt an der Innenkante des Kastens
           (16px Innenabstand oben), bei top:0 bliebe darueber ein Spalt, durch den der Inhalt sichtbar
           durchlaeuft. Der eigene Hintergrund ist Pflicht — ohne ihn scheint der Text darunter durch;
           --bg-deepest ist der Ton des Seitenhintergrunds (body), nicht der einer Karte. */
        #detailTab #detailKopfLeiste {
            position: sticky;
            top: 0;
            z-index: 20;
            background: var(--bg-deep);   /* siehe oben: .content-area traegt --bg-deep */
            padding: 10px 0;
            margin-bottom: 10px;
            box-shadow: 0 6px 16px rgba(0,0,0,.28);
        }
        /* Derselbe Streifen wie oben, aus demselben Grund. */
        #detailTab #detailKopfLeiste::before {
            content: '';
            position: absolute;
            left: 0; right: 0; top: -16px;
            height: 16px;
            background: var(--bg-deep);
        }
        html[data-theme="light"] #detailTab #detailKopfLeiste {
            box-shadow: 0 6px 16px rgba(15,23,42,.12);
        }
        .toolbar-group {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }
        .toolbar-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-elevated);
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .toolbar-btn:hover { border-color: var(--border-light); color: var(--text); background: var(--bg-hover); }
        #abmahnProductList label:hover > span[style*="text-overflow"] {
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: unset !important;
            word-break: break-word;
        }
        .toolbar-btn.primary { background: var(--gradient-main); color: #fff; border: none; box-shadow: 0 2px 8px rgba(168,180,204,0.18); }
        .toolbar-btn.primary:hover { box-shadow: 0 4px 16px rgba(168,180,204,0.25); transform: translateY(-1px); }
        .toolbar-btn.success { background: var(--gradient-success); color: #fff; border: none; }
        .toolbar-btn.success:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.3); transform: translateY(-1px); }
        .toolbar-btn svg { width: 14px; height: 14px; }
        .toolbar-select {
            padding: 7px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-elevated);
            color: var(--text);
            font-size: 12px;
            font-family: inherit;
            cursor: pointer;
            color-scheme: dark;
        }
        .toolbar-select:focus { outline: none; border-color: var(--accent); }

        /* ====== CUSTOM SELECT DROPDOWN ====== */
        .csel { position: relative; display: inline-flex; align-items: center; }
        .csel-trigger {
            height: 36px; padding: 0 22px 0 8px; font-size: 12px; font-weight: 600;
            color: var(--text-white); cursor: pointer; display: flex; align-items: center;
            white-space: nowrap; user-select: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7694' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 5px center;
        }
        .csel-trigger.with-border-right { border-right: 1px solid var(--border); }
        .csel-trigger.pill {
            height: auto; padding: 7px 28px 7px 12px; border: 1px solid var(--border);
            border-radius: 4px; background-color: var(--bg-elevated); color: var(--text-white);
            font-size: 12px; background-position: right 10px center;
        }
        .csel-menu {
            display: none; position: absolute; top: calc(100% + 4px); left: 0;
            background: var(--bg-deepest); border: 1px solid var(--border);
            border-radius: 4px; z-index: 9999; min-width: unset; width: max-content;
            box-shadow: 0 8px 24px rgba(0,0,0,0.7); overflow: hidden;
            max-height: 320px; overflow-y: auto;
        }
        .csel-menu.open { display: block; }
        .csel-item {
            padding: 8px 14px; font-size: 12px; color: var(--text-muted);
            cursor: pointer; transition: background 0.15s; white-space: nowrap;
        }
        .csel-item:hover { background: var(--bg-hover); color: var(--text); }
        .csel-item.selected { color: var(--text); background: rgba(168,180,204,0.08); }
        .csel-group {
            padding: 6px 14px 3px; font-size: 10px; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim);
            border-top: 1px solid var(--border); margin-top: 2px;
        }
        .csel-group:first-child { border-top: none; margin-top: 0; }

        .select-all-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            color: var(--text-muted);
            cursor: pointer;
            padding-right: 8px;
            border-right: 1px solid var(--border);
            margin-right: 4px;
        }

        /* ====== TABLE CONTAINER ====== */
        .table-container {
            background: var(--bg-card);
            border-radius: 0;
            border: none;
            overflow: hidden;
        }

        /* Produkte-Tab: alles auf einen Bildschirm */
        #productsTab {
            display: flex;
            flex-direction: column;
            height: calc(100vh - 72px);
            max-height: calc(100vh - 72px);
            overflow: hidden;
            flex: none;
            width: 100%;
            padding-top: 2px;
            padding-bottom: 0;
            padding-right: 0;
        }
        #productsTab .stats-bar  { margin-bottom: 4px; flex-shrink: 0; }
        #productsTab .toolbar    { margin-bottom: 8px; flex-shrink: 0; }
        #productsTab .sales-bar  { flex-shrink: 0; }
        #productsTab #qualitySummary { flex-shrink: 0; }
        #prodMainArea { display:flex; flex:1; min-height:0; gap:16px; padding-right:0; align-items:stretch; }
        #prodMainArea .table-container { flex:1; overflow:auto; min-height:0; margin-top:0; }
        #productsTab .table-container {
            flex: 1;
            overflow: auto;
            min-height: 0;
            max-width: 1265px;
            margin-top: 8px;
        }

        /* ====== SIDE PANEL ====== */
        #prodSidePanel {
            width: 350px; flex-shrink: 0; display: flex; flex-direction: column; margin-right: 20px;
            background: var(--bg-card); overflow: hidden; border-radius: 0;
            margin-top: 8px;
        }
        .side-panel-header {
            padding: 10px 12px; border-bottom: 1px solid var(--line-1);
            display: flex; align-items: center; justify-content: space-between;
            flex-shrink: 0;
        }
        #sidePanelTitle { font-size: 12px; font-weight: 700; color: var(--text-white); }
        .side-tab {
            width: 32px; height: 32px; border: none; background: transparent;
            border-radius: var(--radius-sm); cursor: pointer; display: flex;
            align-items: center; justify-content: center; position: relative;
            color: var(--text-muted); transition: background 0.15s, color 0.15s;
            flex-shrink: 0;
        }
        .side-tab svg { width: 16px; height: 16px; }
        .side-tab:hover { background: var(--bg-hover); color: var(--text); }
        .side-tab.active {
            background: rgba(255,255,255,0.06);
            color: var(--text);
        }
        .side-tab.active::after { display: none; }

        /* 13.08.2026 (Eric): Die Massenbearbeitung war eine einzige lange Rolle — 7 Abschnitte
           untereinander, und um an den letzten zu kommen, musste man an allen vorbei. Jetzt ist
           jeder Abschnitt ein Aufklapper: Überschrift sichtbar, Inhalt eine Klick entfernt.
           Welche offen sind, merkt sich das Tool je Abschnitt (bulk-sek-zustand in app.js) —
           sonst müsste Eric seinen Abschnitt nach jedem Neuladen wieder suchen. */
        .bulk-sek { padding: 10px 12px; border-bottom: 1px solid var(--line-1); }
        .bulk-sek-titel {
            font-size: 9px; font-weight: 700; color: var(--text-dim);
            text-transform: uppercase; letter-spacing: 1px;
            cursor: pointer; list-style: none; user-select: none;
            display: flex; align-items: center; gap: 6px;
        }
        /* Das eigene Dreieck: Safari zeigt sonst seinen Marker trotz list-style:none. */
        .bulk-sek-titel::-webkit-details-marker { display: none; }
        .bulk-sek-titel::before {
            content: "▸"; font-size: 10px; line-height: 1;
            transition: transform 0.15s; flex-shrink: 0;
        }
        .bulk-sek[open] > .bulk-sek-titel::before { transform: rotate(90deg); }
        .bulk-sek-titel:hover { color: var(--text); }
        /* Ohne diesen Abstand klebt der Inhalt direkt an der Überschrift, sobald sie aufgeht —
           vorher hatte die Überschrift ihr margin-bottom selbst. */
        .bulk-sek[open] > .bulk-sek-titel { margin-bottom: 6px; }
        .market-row {
            display: flex; align-items: center; gap: 6px; padding: 6px 12px;
            cursor: default; transition: background 0.15s; border-bottom: 1px solid var(--bl17);
        }
        .market-row:hover { background: var(--bg-hover); }
        .market-row.live { opacity: 1; }
        .market-row.not-live { opacity: 0.7; }
        .market-flag { font-size: 15px; flex-shrink: 0; width: 20px; }
        .market-code { font-size: 11px; font-weight: 700; color: var(--text); width: 26px; flex-shrink: 0; }
        .market-status { flex: 1; font-size: 10px; }
        .market-status.live { color: var(--text-white); }
        .market-status.target { color: var(--text); }
        .market-status.update { color: #f59e0b; }
        .market-status.delete { color: #ef4444; }
        .market-status.offline { color: var(--text-dim); }
        .market-cb { accent-color: var(--text); width: 13px; height: 13px; cursor: pointer; flex-shrink: 0; margin: 0 4px; }
        .market-cb.cb-update { accent-color: var(--text); }
        .market-cb.cb-delete { accent-color: var(--text); }
        .market-col-header {
            display: flex; align-items: center; gap: 6px; padding: 4px 12px 3px;
            border-bottom: 1px solid var(--bl18);
            background: rgba(255,255,255,0.03);
        }
        .market-col-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-dim); width: 21px; text-align: center; flex-shrink: 0; }
        #productTable tr.row-selected td { background: rgba(168,180,204,0.08) !important; }
        /* Seitenscrollbalken verhindern wenn Produkte-Tab aktiv */
        body:has(#productsTab:not(.hidden))         { overflow: hidden; }
        .content-area:has(> #productsTab:not(.hidden)) { overflow: hidden; }
        /* Wareneingang iframe: volle Hoehe, kein Padding */
        body:has(#wareneingangTab:not(.hidden))     { overflow: hidden; }
        #wareneingangTab:not(.hidden) { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
        #wareneingangFrame { flex: 1; border: none; width: 100%; min-height: 0; display: block; }
        /* 30.07.2026: Durchsicht & Blocker — gleiches Iframe-Muster wie der Wareneingang. */
        body:has(#durchsichtTab:not(.hidden))       { overflow: hidden; }
        #durchsichtTab:not(.hidden) { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
        #durchsichtFrame { flex: 1; border: none; width: 100%; min-height: 0; display: block; }
        body:has(#fotostudioTab:not(.hidden))     { overflow: hidden; }
        #fotostudioTab:not(.hidden) { position: fixed; top: 56px; left: 56px; right: 0; bottom: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: none; }
        #fotostudioFrame { flex: 1; border: none; width: 100%; min-height: 0; display: block; }
        /* Nachrichten-Tab: volle Bildschirmhöhe */
        body:has(#messagesInboxTab:not(.hidden))    { overflow: hidden; }
        .content-area:has(> #messagesInboxTab:not(.hidden)) { overflow: hidden; }
        #messagesInboxTab:not(.hidden) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
        #inboxPagination { display: flex; justify-content: center; gap: 8px; padding: 8px 0; flex-shrink: 0; }
        #inboxPagination:empty { display: none; padding: 0; }
        /* Rechnungen-Tab: volle Bildschirmhöhe wie Produkte */
        #prodStatsTab { padding-top: 10px; }
        #invoiceTab {
            display: flex;
            flex-direction: column;
            height: calc(100vh - 72px);
            max-height: calc(100vh - 72px);
            overflow: hidden;
            flex: none;
            padding-bottom: 0;
        }
        #invoiceTab #invListView {
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }
        #invoiceTab .stats-bar   { flex-shrink: 0; margin-bottom: 8px; }
        #salesVersandRow { flex: 1; min-height: 0; display: flex; gap: 12px; align-items: stretch; overflow: hidden; }
        #invoiceTab #salesPanel  { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
        #invoiceTab #salesListContainer { flex: 1; min-height: 0; overflow-y: auto; max-height: none !important; }
        #versandPanel { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; align-self: stretch; margin-bottom: 0; }
        #versandList { flex: 1; min-height: 0; overflow-y: auto; border: none !important; outline: none !important; }
        body:has(#invoiceTab:not(.hidden)) { overflow: hidden; }
        .content-area:has(> #invoiceTab:not(.hidden)) { overflow: hidden; }
        /* Kachel-Labels in Rechnungen: gleicher Grauton wie Produkte */
        #invoiceStats [style*="letter-spacing:2px"] { color: var(--tA5) !important; }
        /* Kachel-Labels Dashboard + alle HUD-Kacheln: blau → grau */
        .dash-hud [style*="letter-spacing:2px"] { color: var(--tA5) !important; }
        [style*="letter-spacing:2px"][style*="rgba(59,130,246"] { color: var(--tA5) !important; }
        /* Sticky Header in Rechnungstabelle */
        #invoiceListTable thead th, #invoiceTab .product-table thead th {
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--bg-card);
            box-shadow: 0 1px 0 var(--border);
        }
        /* Sticky Header in Produkttabelle */
        #mainProductTable thead {
            position: sticky;
            top: 0;
            z-index: 20;
        }
        #mainProductTable thead th {
            position: relative;
            background: var(--bg-card);
            box-shadow: 0 1px 0 var(--border);
        }
        .table-container .product-table td:first-child,
        .table-container .product-table th:first-child { padding-left: 8px; }
        .table-container .product-table td:last-child,
        .table-container .product-table th:last-child { padding-right: 8px; }

        /* ====== IMPORT PAGE ====== */
        .import-panel {
            background: var(--bg-card);
            border: 1px solid var(--line-1);
            margin-bottom: 0;
        }
        .import-panel-header {
            padding: 5px 10px;
            border-bottom: 1px solid var(--line-1);
            font-size: 10px;
            font-weight: 700;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            background: var(--bg-elevated);
        }
        .import-panel-body { padding: 10px; }
        .upload-zone {
            border: 1px dashed var(--bl19);
            padding: 28px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-dim);
            font-size: 12px;
            background: var(--bg-deep);
        }
        .upload-zone:hover {
            border-color: var(--accent);
            background: rgba(168,180,204,0.03);
            color: var(--text-muted);
        }
        .upload-zone svg { width: 28px; height: 28px; margin-bottom: 8px; color: #444; display:block;margin-left:auto;margin-right:auto; }
        .upload-zone input { display: none; }
        .quick-add-row {
            display: flex;
            gap: 10px;
        }
        .quick-add-row input {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--bg-deep);
            color: var(--text);
            font-size: 14px;
            font-family: inherit;
        }
        .quick-add-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

        /* ====== SALES BAR ====== */
        .sales-bar {
            display: flex;
            align-items: center;
            gap: 24px;
            margin-top: 20px;
            padding: 16px 20px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
        }
        .sales-bar .sales-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
        }
        .sales-bar .sales-item .sales-label { color: var(--text-muted); }
        .sales-bar .sales-item .sales-value { color: #fbbf24; font-weight: 700; }
        .sales-bar .sales-item .sales-value.total { color: #22c55e; }

        /* ====== MESSAGES ====== */
        .msg-split { display: flex; gap: 16px; flex: 1; min-height: 0; }
        .msg-split-list { flex: 0 0 380px; display: flex; flex-direction: column; overflow: hidden; }
        .msg-split-detail { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
        .msg-split-detail > div { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
        .msg-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
        .msg-delete-bar {
            display: flex; align-items: center; gap: 8px; padding: 6px 8px;
            background: var(--bg-elevated); border-radius: 0; margin-bottom: 6px;
        }
        .msg-delete-bar .msg-select-all { accent-color: var(--text); cursor: pointer; }
        .msg-delete-bar .msg-del-btn {
            padding: 4px 12px; font-size: 11px; border-radius: 8px;
            background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3);
            cursor: pointer; transition: all 0.15s;
        }
        .msg-delete-bar .msg-del-btn:hover { background: rgba(239,68,68,0.3); }
        .msg-delete-bar .msg-del-count { font-size: 11px; color: var(--text-muted); }
        /* ── Arbeits-Modus Buttons ── */
        .msg-mode-group { display:flex; gap:0; align-items:center; flex-shrink:0; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
        .msg-mode-btn {
            display:flex; align-items:center; gap:5px;
            padding:5px 14px; font-size:11px; font-weight:700; letter-spacing:.5px;
            border:none;
            background:transparent; color:var(--text-dim);
            cursor:pointer; transition:all .15s; white-space:nowrap; font-family:inherit;
        }
        .msg-mode-btn:hover { background:rgba(168,180,204,0.08); color:var(--text); }
        .msg-mode-btn.active-manual,
        .msg-mode-btn.active-semi,
        .msg-mode-btn.active-full { background:rgba(168,180,204,0.12); color:var(--text); }
        .msg-mode-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
        .mode-dot-manual { background:rgba(168,180,204,.4); }
        .mode-dot-semi   { background:rgba(168,180,204,.7); }
        .mode-dot-full   { background:#a8b4cc; animation:modePulse 2s infinite; }
        @keyframes modePulse { 0%,100%{opacity:1} 50%{opacity:.4} }
        @keyframes kiNavGlow { 0%{color:var(--text-dim);filter:none} 25%{color:var(--text);filter:drop-shadow(0 0 6px rgba(168,180,204,.9))} 75%{color:var(--text);filter:drop-shadow(0 0 6px rgba(168,180,204,.9))} 100%{color:var(--text-dim);filter:none} }
        @keyframes kiPulse { 0%,100%{color:var(--text-dim);filter:none} 50%{color:var(--text);filter:drop-shadow(0 0 8px rgba(168,180,204,.95))} }
        .ki-nav-glow { animation: kiNavGlow 1.6s ease-in-out !important; }
        .ki-side-glow { animation: kiNavGlow 1.6s ease-in-out !important; }
        .ki-pulse-glow { animation: kiPulse 0.5s ease-in-out 5 !important; }
        .msg-row-check { accent-color: var(--text); cursor: pointer; flex-shrink: 0; }
        .msg-dd-item { padding: 8px 14px; cursor: pointer; font-size: 12px; color: var(--text); }
        .msg-dd-item:hover { background: var(--bg-hover); }
        .msg-row {
            display: grid;
            grid-template-columns: 28px 1fr auto;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 0;
            cursor: pointer;
            transition: all 0.15s ease;
            font-size: 12px;
            flex-shrink: 0;
        }
        .msg-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
        .msg-row-actions .msg-row-date { color: var(--text-dim); font-size: 11px; white-space: nowrap; }
        .msg-row:hover { border-color: var(--bl20); background: var(--bg-elevated); }
        .msg-row.unread { border-left: 3px solid var(--text); }
        .msg-row.unread .msg-row-subject { font-weight: 700; color: var(--text); }
        .msg-row.active { border-color: var(--bl15); background: rgba(168,180,204,.07); }
        .msg-row.replied { border-left: 3px solid #22c55e; }
        /* SLA-Ampel: dezente Akzentkante bei alten unbeantworteten Kundennachrichten */
        .msg-row.sla-warn { border-left: 3px solid var(--bl21); }
        .msg-row.sla-alert { border-left: 3px solid var(--text); }
        .msg-row.sla-critical { border-left: 4px solid var(--text); }
        .msg-sla-badge { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; background: rgba(168,180,204,0.12); color: var(--text); }
        .msg-sla-badge.warn { opacity: 0.7; }
        .msg-sla-badge.alert { opacity: 1; }
        .msg-sla-badge.critical { background: rgba(168,180,204,0.22); }
        .msg-status-indicator {
            width: 28px; height: 28px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%; font-size: 13px; flex-shrink: 0;
        }
        .msg-status-indicator.unread { background: rgba(168,180,204,0.15); color: var(--text); }
        .msg-status-indicator.read { background: rgba(255,255,255,0.05); color: var(--text-dim); }
        .msg-status-indicator.replied { background: rgba(34,197,94,0.15); color: #22c55e; }
        .msg-row-center { overflow: hidden; min-width: 0; }
        .msg-row-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
        .msg-row-sender { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
        .msg-row-subject { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
        .msg-row-right { text-align: right; flex-shrink: 0; white-space: nowrap; }
        .msg-row-date { color: var(--text-dim); font-size: 11px; }
        .msg-row-item { color: var(--text-dim); font-size: 10px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
        .msg-status-badge {
            display: inline-block; padding: 1px 6px; border-radius: 8px;
            font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
        }
        .msg-status-badge.badge-unread { background: rgba(168,180,204,0.15); color: var(--text); }
        .msg-status-badge.badge-replied { background: rgba(34,197,94,0.15); color: #22c55e; }
        .msg-detail-panel {
            background: var(--bg-card);
            border: none;
            border-radius: 0;
            padding: 24px;
            flex: 1;
            display: flex; flex-direction: column;
            min-height: 0;
            overflow: hidden;
        }
        .msg-detail-empty {
            display: flex; align-items: center; justify-content: center;
            flex: 1; color: var(--text-dim); font-size: 13px;
            background: var(--bg-card); border: none;
            border-radius: 0;
        }
        .msg-detail-header { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
        .msg-detail-header h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
        .msg-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
        .msg-detail-meta strong { color: var(--text); }
        .msg-detail-body {
            overflow-y: auto; flex: 1; padding: 16px 12px;
            display: flex; flex-direction: column; gap: 0;
            background: var(--bg-deep); border-radius: 0;
        }
        .msg-chat-inner { display: flex; flex-direction: column; gap: 0; }
        .msg-bubble-row {
            display: flex; width: 100%; margin-bottom: 2px;
        }
        .msg-bubble-row.incoming { justify-content: flex-start; padding-right: 60px; }
        .msg-bubble-row.outgoing { justify-content: flex-end; padding-left: 60px; }
        .msg-bubble {
            max-width: 75%; padding: 2px 8px 1px 8px; border-radius: 8px;
            font-size: 13px; line-height: 1.25; word-break: break-word; white-space: pre-line;
        }
        .msg-bubble.incoming {
            background: var(--bg-elevated);
            border-top-left-radius: 3px;
            color: var(--text);
        }
        .msg-bubble.outgoing {
            background: #2a3a4a;
            border-top-right-radius: 3px;
            color: var(--text);
        }
        .msg-bubble-time {
            font-size: 10px; color: var(--text-dim); margin-top: 0;
            text-align: right; opacity: 0.7; line-height: 1.2;
        }
        .msg-bubble.outgoing .msg-bubble-time { color: #8ab4d6; }
        .msg-bubble-date-divider {
            text-align: center; font-size: 11px; color: var(--text-dim);
            padding: 8px 0; margin: 4px 0;
        }
        .msg-bubble-date-divider span {
            background: var(--bg-card); padding: 3px 12px; border-radius: 8px;
            font-size: 10px;
        }
        .msg-bubble-gap { height: 6px; }
        .msg-filter-bar { display: flex; gap: 4px; }
        .msg-filter-btn {
            padding: 4px 10px; font-size: 11px; border-radius: 12px;
            border: 1px solid var(--border); background: transparent;
            color: var(--text-muted); cursor: pointer; transition: all 0.15s;
        }
        .msg-filter-btn:hover { border-color: var(--border-light); color: var(--text); }
        .msg-filter-btn.active { background: rgba(168,180,204,.12); border-color: var(--bl15); color: var(--text); }
        .msg-reply-area { margin-top: 0; padding: 10px 8px 4px; flex-shrink: 0; }
        .msg-reply-area textarea {
            width: 100%; min-height: 120px;
            padding: 12px 16px;
            background: var(--bg-elevated);
            border: 1px solid var(--bl22);
            border-radius: 0 0 var(--radius-sm) var(--radius-sm);
            color: var(--text);
            font-size: 13px;
            font-family: inherit;
            resize: vertical;
            line-height: 1.6;
        }
        .msg-reply-area textarea:focus { border-color: var(--bl23); outline: none; }

        /* ── Compose Toolbar ── */
        .msg-toolbar {
            display: flex; align-items: center; gap: 1px; flex-wrap: wrap;
            padding: 4px 6px;
            background: var(--bg-card);
            border: none;
            border-bottom: 1px solid var(--border);
            border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        }
        .msg-toolbar-label {
            font-size: 9px; font-weight: 700; text-transform: uppercase;
            letter-spacing: 1.2px; color: var(--text-dim); padding: 0 6px 0 2px;
            flex-shrink: 0;
        }
        .msg-toolbar-label.email { color: #34d399; }
        .msg-toolbar-label.ebay  { color: var(--text); }
        .msg-toolbar-divider { width: 1px; height: 16px; background: var(--border-light); margin: 0 4px; flex-shrink: 0; }
        .msg-toolbar-btn {
            display: flex; align-items: center; gap: 5px;
            padding: 5px 9px; border: none; background: transparent;
            color: var(--text-muted); border-radius: 6px;
            font-size: 12px; font-weight: 500; cursor: pointer;
            transition: all 0.15s; white-space: nowrap; font-family: inherit;
        }
        .msg-toolbar-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
        .msg-toolbar-btn:hover { background: var(--bg-hover); color: var(--text); }
        .msg-toolbar-btn.active { background: rgba(168,180,204,.12); color: var(--text); }
        .msg-emoji-wrap { position: relative; }
        .msg-anrede-wrap { position: relative; }
        .msg-greeting-panel {
            position: absolute; bottom: calc(100% + 6px); left: 0;
            background: var(--bg-elevated); border: 1px solid var(--border);
            border-radius: 8px; padding: 4px; display: flex; flex-direction: column;
            gap: 2px; z-index: 200; min-width: 210px; box-shadow: 0 4px 16px rgba(0,0,0,0.35);
        }
        .msg-greeting-opt {
            background: transparent; border: none; color: var(--text-primary);
            padding: 8px 12px; text-align: left; cursor: pointer;
            border-radius: 6px; font-size: 13px; white-space: nowrap;
        }
        .msg-greeting-opt:hover { background: var(--bg-hover); }
        .msg-emoji-panel {
            position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 200;
            background: var(--bg-card); border: 1px solid var(--border-light);
            border-radius: var(--radius-md); padding: 8px;
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
            box-shadow: var(--shadow-md); min-width: 220px;
        }
        .msg-emoji-panel button {
            background: none; border: none; font-size: 18px; cursor: pointer;
            padding: 4px; border-radius: 4px; transition: background 0.1s; line-height: 1;
        }
        .msg-emoji-panel button:hover { background: var(--bg-hover); }
        .msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 4px; }
        .msg-attach-chip {
            display: flex; align-items: center; gap: 6px;
            background: var(--bg-elevated); border: 1px solid var(--border-light);
            border-radius: 6px; padding: 4px 8px; font-size: 11px; color: var(--text-muted);
            max-width: 180px;
        }
        .msg-attach-chip svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--accent-light); }
        .msg-attach-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
        .msg-attach-chip button {
            background: none; border: none; color: var(--text-dim); cursor: pointer;
            padding: 0; display: flex; align-items: center; font-size: 14px; line-height: 1;
        }
        .msg-attach-chip button:hover { color: #f87171; }
        .msg-template-bar {
            display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap;
        }
        .msg-template-select {
            width: 100%; padding: 10px 16px;
            background: var(--bg-elevated); border: 1px solid var(--bl22);
            border-radius: 0; color: var(--text); font-size: 12px;
            cursor: pointer; font-family: inherit; font-weight: 600;
        }
        .msg-template-select:focus { border-color: var(--bl23); outline: none; }
        .quick-tpl-row { display:flex; gap:5px; flex-wrap:wrap; margin-bottom:0; min-height:28px; }
        .quick-tpl-btn {
            padding:5px 10px; font-size:11px; font-weight:600;
            background:var(--bg-elevated); border:1px solid var(--bl24);
            border-radius:3px; color:var(--accent); cursor:pointer;
            font-family:inherit; white-space:nowrap; max-width:140px;
            overflow:hidden; text-overflow:ellipsis; transition:background .15s, border-color .15s;
        }
        .quick-tpl-btn:hover { background:rgba(168,180,204,.1); border-color:var(--bl15); }
        .tpl-dropdown-wrap { position:relative; width:100%; }
        .tpl-dropdown-btn {
            width:100%; display:flex; align-items:center; justify-content:space-between;
            padding:8px 12px; background:var(--bg-elevated); border:1px solid var(--border);
            border-radius:var(--radius-sm); color:var(--text); font-size:12px; font-weight:600;
            cursor:pointer; font-family:inherit; transition:border-color .15s, background .15s;
        }
        .tpl-dropdown-btn:hover { border-color:var(--border-light); background:var(--bg-hover); }
        .tpl-dropdown-btn .arrow { transition:transform .2s; font-size:10px; color:var(--accent); }
        .tpl-dropdown-btn.open .arrow { transform:rotate(180deg); }
        .tpl-dropdown-menu {
            display:none; position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:200;
            background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-sm);
            box-shadow:0 8px 24px rgba(0,0,0,.4); max-height:280px; overflow-y:auto;
        }
        .tpl-dropdown-menu.open { display:block; }
        .tpl-cat-header {
            padding:6px 12px 4px; font-size:10px; font-weight:700; letter-spacing:.08em;
            text-transform:uppercase; color:var(--text-dim); background:var(--bg-elevated);
            border-bottom:1px solid var(--border); pointer-events:none; position:sticky; top:0; z-index:1;
        }
        .tpl-dropdown-item {
            padding:8px 16px; font-size:12px; color:var(--text); cursor:pointer;
            border-bottom:1px solid var(--bl25); transition:background .12s;
            display:flex; align-items:center; gap:8px;
        }
        .tpl-dropdown-item:hover { background:var(--bg-hover); color:var(--text); }
        .tpl-dropdown-item:last-child { border-bottom:none; }
        .kbd-hint { font-size:10px; color:var(--text-dim); display:inline-block;
            background:var(--bg-elevated); border:1px solid var(--border);
            border-radius:3px; padding:1px 5px; font-family:monospace; margin-left:2px; }
        .msg-ai-btn {
            padding: 6px 14px; border-radius: 12px; font-size: 12px; font-weight: 600;
            background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff;
            border: none; cursor: pointer; white-space: nowrap; transition: opacity 0.15s;
        }
        .msg-ai-btn:hover { opacity: 0.85; }
        .msg-ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .msg-tpl-manage-btn {
            padding: 6px 10px; border-radius: 12px; font-size: 11px;
            background: transparent; border: 1px solid var(--border);
            color: var(--text-muted); cursor: pointer; transition: all 0.15s;
        }
        .msg-tpl-manage-btn:hover { border-color: var(--bl15); color: var(--text); }
        /* Haupt-Toolbar im Nachrichten-Tab: alle Rahmen/Background-Leaks aus Compose-Toolbar-Def entfernen */
        #messagesInboxTab > .msg-toolbar {
            display: flex; align-items: center; gap: 6px;
            padding: 0 0 16px 0; flex-shrink: 0; flex-wrap: wrap;
            background: transparent; border: none; border-radius: 0;
        }
        #messagesInboxTab > .msg-toolbar .enrich-ai-btn { border-color: transparent; }
        #messagesInboxTab > .msg-toolbar .enrich-ai-btn:hover { border-color: var(--bl20); background: rgba(168,180,204,.07); }
        .msg-search-wrap { position: relative; flex: 1; min-width: 160px; max-width: 300px; }
        .msg-search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: 0.4; pointer-events: none; }
        .msg-search-input {
            width: 100%; padding: 7px 12px 7px 32px;
            background: var(--bg-elevated); border: 1px solid transparent;
            border-radius: 20px; color: var(--text); font-size: 12px;
            font-family: inherit; outline: none;
        }
        .msg-search-input:focus { border-color: var(--bl23); }
        .msg-filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }
        .msg-filter-pill {
            padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 500;
            background: var(--bg-elevated); border: 1px solid var(--border);
            color: var(--text-muted); cursor: pointer; transition: all 0.15s; white-space: nowrap;
        }
        .msg-filter-pill:hover { border-color: var(--border-light); color: var(--text); }
        .msg-filter-pill.active { background: rgba(168,180,204,.12); border-color: var(--bl15); color: var(--text); }
        /* Detail-Panel: 2-Spalten Layout */
        .msg-detail-columns { display: flex; gap: 12px; flex: 1; min-height: 0; overflow: hidden; }
        .msg-detail-left { flex: 0 0 340px; display: flex; flex-direction: column; background: transparent; border: none; border-radius: 0; overflow: hidden; min-height: 0; }
        .msg-detail-left-title { padding: 10px 2px 6px; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; margin-bottom: 0; }
        .msg-detail-left .msg-reply-area { flex: 1; display: flex; flex-direction: column; padding: 12px 12px 10px; min-height: 0; gap: 8px; }
        /* Mittlerer Scroll-Bereich (Channel + Bestelldaten): scrollt bei Bedarf, Buttons unten bleiben sichtbar */
        .msg-reply-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
        .msg-reply-bottom { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
        .msg-detail-left .msg-reply-area textarea { flex: 1; max-height: none; resize: none; min-height: 60px; border: none; background: var(--bg-deep); padding: 10px 12px; }
        .msg-detail-right { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
        .msg-detail-right .msg-detail-body { flex: 1; min-height: 0; }
        .tpl-list-item {
            display: flex; align-items: center; gap: 10px; padding: 10px 12px;
            background: var(--bg-elevated); border: 1px solid var(--border);
            border-radius: 0; margin-bottom: 6px;
        }
        .tpl-list-item .tpl-name { font-weight: 600; font-size: 13px; color: var(--text); flex: 0 0 auto; min-width: 140px; }
        .tpl-list-item .tpl-body { font-size: 12px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tpl-list-item .tpl-actions { display: flex; gap: 4px; flex-shrink: 0; }

        /* ====== EBAY SHOP TAB-NAV ====== */
        .ebay-shop-tab {
            padding: 10px 18px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: all 0.15s ease;
            white-space: nowrap;
        }
        .ebay-shop-tab:hover { color: var(--text); }
        .ebay-shop-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }

        /* ====== EBAY SHOP CARDS — Digital Obsidian ====== */
        /* Farbschema wie die Produkt-Hauptansicht: Kartenflaeche --bg-card, Rahmen --border.
           Kein eigenes Grau mit Weichzeichner mehr. */
        .ebay-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.25s ease, border-color 0.2s ease;
            cursor: default;
        }
        .ebay-card:hover { transform: translateY(-3px) scale(1.01); border-color: var(--bl26); }
        .ebay-card-img {
            width: 100%;
            aspect-ratio: 1;
            object-fit: contain;
            background: var(--bg-inset-3);
        }
        .ebay-card-img-empty {
            width: 100%;
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 4px;
            background: var(--bg-inset-3);
            color: #424754;
            font-size: 28px;
            border: 1px dashed var(--bl27);
        }
        .ebay-card-img-empty::after {
            content: 'Kein Bild';
            font-size: 9px;
            color: #333744;
            font-family: inherit;
        }
        .ebay-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
        .ebay-card-category { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tA2); }
        .ebay-card-title {
            font-size: 13px;
            font-weight: 700;
            color: #e1e2ea;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .ebay-card-price { font-size: 20px; font-weight: 900; color: var(--text); letter-spacing: -0.02em; line-height: 1.1; }
        .ebay-card-price-old { font-size: 10px; color: #6b7280; text-decoration: line-through; margin-bottom: 1px; }
        .ebay-card-meta { font-size: 10px; color: #6b7280; }
        .ebay-card-actions { display: flex; gap: 6px; margin-top: 10px; }
        .ebay-card-btn-edit {
            flex: 1; background: #282a30; border: none; border-radius: 10px;
            padding: 9px 0; font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
            text-transform: uppercase; color: #e1e2ea; cursor: pointer;
            transition: background 0.15s ease;
        }
        .ebay-card-btn-edit:hover { background: rgba(255,255,255,0.1); }
        .ebay-card-btn-delete {
            background: #282a30; border: none; border-radius: 10px;
            padding: 9px 12px; color: #6b7280; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: color 0.15s ease, background 0.15s ease;
        }
        .ebay-card-btn-delete:hover { color: #ffb4ab; background: rgba(255,180,171,0.08); }
        .ebay-card-footer {
            padding: 8px 14px;
            border-top: 1px solid var(--bl28);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        /* Filter bar glass card */
        .ebay-filter-bar {
            background: rgba(29,32,37,0.6);
            backdrop-filter: blur(12px);
            border: 1px solid var(--bl4);
            border-radius: 16px;
            padding: 16px 20px;
            display: flex;
            flex-wrap: wrap;
            align-items: flex-end;
            gap: 20px;
            margin-bottom: 14px;
        }
        .ebay-filter-group { display: flex; flex-direction: column; gap: 5px; }
        .ebay-filter-label {
            font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
            text-transform: uppercase; color: #6b7280; padding: 0 2px;
        }
        .ebay-filter-select-wrap { position: relative; display: inline-flex; align-items: center; }
        .ebay-filter-select-wrap::after {
            content: '';
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            width: 0; height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid #6b7280;
            pointer-events: none;
        }
        .ebay-filter-select {
            background: var(--bg-inset-3); border: 1px solid var(--bl3);
            border-radius: 8px; color: #e1e2ea; font-size: 12px;
            padding: 7px 32px 7px 12px; outline: none; cursor: pointer;
            transition: border-color 0.15s;
            appearance: none; -webkit-appearance: none;
        }
        .ebay-filter-select:focus { border-color: var(--bl29); }
        .ebay-filter-select:focus + .ebay-filter-select-wrap::after,
        .ebay-filter-select-wrap:focus-within::after { border-top-color: var(--bl8); }
        .ebay-filter-sort-btn {
            background: var(--bg-inset-3); border: 1px solid var(--bl3);
            border-radius: 8px; color: #e1e2ea; font-size: 12px;
            padding: 7px 12px; outline: none; cursor: pointer;
            display: flex; align-items: center; gap: 6px;
            transition: border-color 0.15s, background 0.15s;
        }
        .ebay-filter-sort-btn:hover { background: #1d2025; }

        /* ====== RESPONSIVE ====== */
        @media (max-width: 900px) {
            .icon-sidebar { width: 56px; }
            .content-area { margin-left: 56px; }
            .nav-icon { width: 38px; height: 38px; }
            .stats-bar { flex-wrap: wrap; }
            .stat-card { min-width: 80px; }
            .toolbar { flex-wrap: wrap; }
            .import-grid { grid-template-columns: 1fr; }
            .form-row, .form-row-3 { grid-template-columns: 1fr; }
            .msg-split { flex-direction: column; height: auto; }
            .msg-split-list { flex: none; max-height: 300px; }
            .msg-split-detail { flex: none; overflow: visible; }
            .msg-row-item { display: none; }
            .top-nav { top: 8px; }
            .nav-pill { padding: 4px 6px; }
            .section-btn { padding: 6px 9px; font-size: 12px; gap: 5px; }
            .section-btn svg { width: 18px; height: 18px; }
            .top-nav-user .user-greeting { display: none; }
        }

        /* ── Context Menu ── */
        #ctxMenu {
            position: fixed; z-index: 9999;
            background: var(--bg-elevated, #1e2130);
            border: 1px solid rgba(99,102,241,0.4);
            border-radius: 8px; padding: 4px 0;
            min-width: 210px;
            box-shadow: 0 8px 28px rgba(0,0,0,0.55);
            display: none; user-select: none;
        }
        #ctxMenu .ctx-item {
            display: flex; align-items: center; gap: 9px;
            padding: 8px 14px; font-size: 12px;
            color: var(--text, #e2e8f0); cursor: pointer;
            transition: background 0.12s;
        }
        #ctxMenu .ctx-item:hover { background: rgba(99,102,241,0.18); color: #818cf8; }
        #ctxMenu .ctx-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.8; }
        #ctxMenu .ctx-label { font-size: 10px; font-weight: 700; letter-spacing: 1px;
            text-transform: uppercase; color: var(--text-dim, #6b7280);
            padding: 6px 14px 2px; }
        #detDescPreview ul, #detDescPreview ol { margin: 8px 0 8px 20px; }
        #detDescPreview li { margin-bottom: 4px; }
        #detDescPreview p { margin-bottom: 8px; }
        #detDescPreview h1, #detDescPreview h2, #detDescPreview h3 { margin: 10px 0 6px; font-weight: 600; color: var(--text); }
        #detDescPreview br + br { display: none; }
        .sett-inner-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:20px; }
        .sett-inner-btn { padding:8px 16px; font-size:11px; font-weight:600; background:transparent; border:none; border-bottom:2px solid transparent; color:var(--text-dim); cursor:pointer; transition:all .15s; letter-spacing:.3px; margin-bottom:-1px; }
        .sett-inner-btn:hover { color:var(--text); background:rgba(255,255,255,0.03); }
        .sett-inner-btn.active { color:var(--text); border-bottom-color:var(--text); }
    