/* ============ LOCAL FONTS ============ */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/plus-jakarta-sans-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url('/assets/fonts/plus-jakarta-sans-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ CSS VARIABLES PER THEME ============ */
        :root {
            --font-main: 'Inter', sans-serif;
            --font-display: 'Inter', sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            --bg-body: #f8fafc;
            --bg-header: #ffffff;
            --bg-card: #ffffff;
            --bg-input: #ffffff;
            --bg-dropzone: #f8fafc;
            --color-text: #0f172a;
            --color-text-muted: #64748b;
            --color-primary: #2563eb;
            --color-primary-hover: #1d4ed8;
            --color-border: #e2e8f0;
            --color-border-focus: #2563eb;
            --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.15);
            --radius-card: 0.75rem;
            --radius-input: 0.625rem;
            --radius-btn: 0.625rem;
        }

        /* PRO BLUE */
        body.theme-pro-blue {
            --font-main: 'Inter', sans-serif;
            --bg-body: #f8fafc;
            --bg-header: #ffffff;
            --bg-card: #ffffff;
            --bg-input: #ffffff;
            --bg-dropzone: #ffffff;
            --color-text: #0f172a;
            --color-text-muted: #64748b;
            --color-primary: #2563eb;
            --color-primary-hover: #1d4ed8;
            --color-border: #e2e8f0;
            --color-border-focus: #2563eb;
            --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.15);
            --radius-card: 0.75rem;
            --radius-input: 0.625rem;
            --radius-btn: 0.625rem;
        }

        /* DARK LUXURY */
        body.theme-dark-luxury {
            --font-main: 'IBM Plex Sans', sans-serif;
            --font-display: 'Playfair Display', serif;
            --bg-body: #0a0a0a;
            --bg-header: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
            --bg-card: #1a1a1a;
            --bg-input: #1a1a1a;
            --bg-dropzone: #1a1a1a;
            --color-text: #e8e8e8;
            --color-text-muted: #888888;
            --color-primary: #d4af37;
            --color-primary-hover: #c9a227;
            --color-border: #2a2a2a;
            --color-border-focus: #d4af37;
            --shadow-focus: 0 0 0 3px rgba(212, 175, 55, 0.15);
            --radius-card: 1rem;
            --radius-input: 0.5rem;
            --radius-btn: 0.75rem;
        }

        /* PLAYFUL MOTION */
        body.theme-playful-motion {
            --font-main: 'Lexend', sans-serif;
            --font-display: 'Fredoka', sans-serif;
            --bg-body: linear-gradient(135deg, #faf9f7 0%, #f3f0ff 50%, #f0f9ff 100%);
            --bg-header: rgba(255, 255, 255, 0.7);
            --bg-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 240, 255, 0.7) 100%);
            --bg-input: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 240, 255, 0.9) 100%);
            --bg-dropzone: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(248, 240, 255, 0.4) 100%);
            --color-text: #2d1b69;
            --color-text-muted: #6b5b95;
            --color-primary: #8b5cf6;
            --color-primary-hover: #7c3aed;
            --color-border: rgba(139, 92, 246, 0.25);
            --color-border-focus: #8b5cf6;
            --shadow-focus: 0 0 0 4px rgba(139, 92, 246, 0.15);
            --radius-card: 2rem;
            --radius-input: 1.25rem;
            --radius-btn: 1.5rem;
        }

        /* ZEN MINIMALIST */
        body.theme-zen-minimalist {
            --font-main: 'Outfit', sans-serif;
            --font-display: 'Outfit', sans-serif;
            --bg-body: #faf8f6;
            --bg-header: #ffffff;
            --bg-card: #ffffff;
            --bg-input: #ffffff;
            --bg-dropzone: #ffffff;
            --color-text: #3f3f3f;
            --color-text-muted: #999999;
            --color-primary: #1c1917;
            --color-primary-hover: #3f3f3f;
            --color-border: #e8e8e8;
            --color-border-focus: #3f3f3f;
            --shadow-focus: 0 0 0 2px rgba(63, 63, 63, 0.08);
            --radius-card: 0.75rem;
            --radius-input: 0.5rem;
            --radius-btn: 0.5rem;
        }

        /* MODERN PROFESSIONAL */
        body.theme-modern-professional {
            --font-main: 'Inter', sans-serif;
            --font-display: 'Inter', sans-serif;
            --bg-body: linear-gradient(180deg, #fefdfb 0%, #faf8f6 100%);
            --bg-header: rgba(255, 255, 255, 0.6);
            --bg-card: #ffffff;
            --bg-input: #ffffff;
            --bg-dropzone: #fafaf9;
            --color-text: #2d2d2d;
            --color-text-muted: #6f6f6f;
            --color-primary: #1f2937;
            --color-primary-hover: #111827;
            --color-border: #e5e3e0;
            --color-border-focus: #2d2d2d;
            --shadow-focus: 0 0 0 3px rgba(45, 45, 45, 0.08);
            --radius-card: 0.75rem;
            --radius-input: 0.625rem;
            --radius-btn: 0.625rem;
        }

        /* VIBRANT TECH */
        body.theme-vibrant-tech {
            --font-main: 'Inter', sans-serif;
            --font-display: 'Inter', sans-serif;
            --font-mono: 'IBM Plex Mono', monospace;
            --bg-body: linear-gradient(135deg, #0f172a 0%, #1a1f3a 50%, #1a2847 100%);
            --bg-header: rgba(15, 23, 42, 0.85);
            --bg-card: rgba(30, 41, 59, 0.7);
            --bg-input: rgba(30, 41, 59, 0.9);
            --bg-dropzone: rgba(99, 102, 241, 0.08);
            --color-text: #e5e7eb;
            --color-text-muted: #9ca3af;
            --color-primary: #6366f1;
            --color-primary-hover: #4f46e5;
            --color-border: rgba(99, 102, 241, 0.3);
            --color-border-focus: #6366f1;
            --shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.2);
            --radius-card: 0.75rem;
            --radius-input: 0.625rem;
            --radius-btn: 0.625rem;
        }

        /* CLEAN GEOMETRIC */
        body.theme-clean-geometric {
            --font-main: 'DM Sans', sans-serif;
            --font-display: 'DM Sans', sans-serif;
            --font-mono: 'Source Code Pro', monospace;
            --bg-body: linear-gradient(135deg, #f8f6f2 0%, #f5f2ec 100%);
            --bg-header: #ffffff;
            --bg-card: #ffffff;
            --bg-input: #ffffff;
            --bg-dropzone: rgba(194, 85, 62, 0.03);
            --color-text: #2b2b2b;
            --color-text-muted: #666666;
            --color-primary: #c2553e;
            --color-primary-hover: #b33f2d;
            --color-border: #e0e0e0;
            --color-border-focus: #c2553e;
            --shadow-focus: 0 0 0 3px rgba(194, 85, 62, 0.12);
            --radius-card: 0;
            --radius-input: 0;
            --radius-btn: 0;
        }

        /* ============ BASE STYLES ============ */
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            background: var(--bg-body);
            color: var(--color-text);
            font-family: var(--font-main);
            min-height: 100vh;
            transition: all 0.3s ease;
        }

        /* ============ HEADER ============ */
        .header {
            background: var(--bg-header);
            border-bottom: 1px solid var(--color-border);
            padding: 1.5rem 0;
            position: sticky;
            top: 0;
            z-index: 50;
            backdrop-filter: blur(10px);
        }
        .header-inner {
            max-width: 72rem;
            margin: 0 auto;
            padding: 0 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            transition: transform 0.2s ease;
        }
        .logo-link:hover { transform: scale(1.02); }
        .logo-icon {
            width: 2.5rem;
            height: 2.5rem;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 800;
            font-size: 1.1rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        body.theme-clean-geometric .logo-icon {
            clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
            border-radius: 0;
        }
        .brand-text {
            font-family: var(--font-display);
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--color-text);
            letter-spacing: -0.02em;
        }
        .brand-accent {
            color: var(--color-primary);
        }
        body.theme-playful-motion .brand-text {
            background: linear-gradient(120deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* ============ MAIN CONTENT ============ */
        .main-content {
            max-width: 72rem;
            margin: 0 auto;
            padding: 3rem 1.5rem 8rem;
        }

        /* ============ STEP INDICATOR ============ */
        .step-indicator {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1.5rem;
            margin-bottom: 3rem;
        }
        .step-item {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }
        .step-num {
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1rem;
            background: var(--color-border);
            color: var(--color-text-muted);
            transition: all 0.3s ease;
        }
        .step-num.active {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
            color: white;
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
            transform: scale(1.1);
        }
        body.theme-clean-geometric .step-num {
            clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 90%, 0% 10%);
            border-radius: 0;
        }
        .step-line {
            width: 2.5rem;
            height: 2px;
            background: var(--color-border);
        }

        /* ============ HEADINGS ============ */
        .page-title {
            font-family: var(--font-display);
            font-size: 3rem;
            font-weight: 800;
            color: var(--color-text);
            margin-bottom: 1rem;
            letter-spacing: -0.02em;
        }
        .page-subtitle {
            font-size: 1.125rem;
            color: var(--color-text-muted);
            margin-bottom: 3rem;
        }
        .section-title {
            font-family: var(--font-display);
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--color-text);
            margin-bottom: 1.5rem;
        }

        /* ============ CARDS ============ */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-card);
            padding: 2rem;
            margin-bottom: 1.5rem;
            transition: all 0.3s ease;
        }
        .card:hover {
            border-color: var(--color-primary);
            box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        }
        body.theme-playful-motion .card {
            backdrop-filter: blur(10px);
        }
        body.theme-vibrant-tech .card {
            backdrop-filter: blur(8px);
        }

        /* ============ FORM ELEMENTS ============ */
        .form-group {
            margin-bottom: 1rem;
        }
        .label-text {
            display: block;
            font-size: 0.75rem;
            margin-top: 0.375rem;
            font-weight: 700;
            color: var(--color-text-muted);
            margin-bottom: 0.5rem;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
        .input-field {
            width: 100%;
            padding: 0.875rem 1rem;
            background: var(--bg-input);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-input);
            font-family: var(--font-main);
            font-size: 0.9375rem;
            color: var(--color-text);
            transition: all 0.2s ease;
        }
        .input-field:focus {
            outline: none;
            border-color: var(--color-border-focus);
            box-shadow: var(--shadow-focus);
        }
        .input-field::placeholder {
            color: var(--color-text-muted);
        }
        .input-mono {
            font-family: var(--font-mono);
        }
        .form-grid-2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
        .form-grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
        }
        .form-grid-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
        }
        .form-grid-plz {
            display: grid;
            grid-template-columns: 6rem 1fr;
            gap: 0.5rem;
        }
        @media (max-width: 768px) {
            .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
        }

        /* ============ BUTTONS ============ */
        .btn-primary {
            width: 100%;
            padding: 1rem 2rem;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
            color: white;
            border: none;
            border-radius: var(--radius-btn);
            font-family: var(--font-main);
            font-weight: 700;
            font-size: 0.95rem;
            letter-spacing: 0.02em;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        }
        body.theme-dark-luxury .btn-primary {
            color: #0a0a0a;
        }
        .btn-secondary {
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            color: var(--color-text);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-btn);
            font-weight: 600;
            font-size: 0.875rem;
            line-height: 1.2;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
            transition: all 0.2s ease;
        }
        .btn-secondary:hover {
            border-color: var(--color-primary);
            background: var(--bg-input);
        }
        .btn-danger {
            background: rgba(220, 38, 38, 0.1);
            color: #dc2626;
            border-color: rgba(220, 38, 38, 0.3);
        }

        /* ============ BADGES ============ */
        .badge { display: inline-block; padding: 2px 6px; font-size: 0.7rem; border-radius: 3px; font-weight: 600; }
        .badge-warning { background: #f59e0b; color: #000; }
        .badge-info { background: #3b82f6; color: #fff; }

        /* ============ DROPZONE ============ */
        .dropzone {
            background: var(--bg-dropzone);
            border: 2px dashed var(--color-border);
            border-radius: var(--radius-card);
            padding: 4rem 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .dropzone:hover {
            border-color: var(--color-primary);
            transform: scale(1.02);
        }
        .dropzone.dragover {
            border-color: var(--color-primary);
            background: rgba(var(--color-primary), 0.05);
            transform: scale(1.03);
        }
        .dropzone-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
        }
        .dropzone-title {
            font-family: var(--font-display);
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--color-text);
            margin-bottom: 0.5rem;
        }
        .dropzone-text {
            color: var(--color-text-muted);
        }

        /* ============ SUCCESS STATE ============ */
        .success-icon {
            width: 7rem;
            height: 7rem;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 2rem;
            box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
        }
        .success-icon svg {
            width: 4rem;
            height: 4rem;
            color: white;
        }
        body.theme-clean-geometric .success-icon {
            clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
            border-radius: 0;
        }

        /* ============ LAYOUT GRID ============ */
        .layout-grid {
            display: grid;
            grid-template-columns: 5fr 7fr;
            gap: 2.5rem;
        }
        @media (max-width: 1024px) {
            .layout-grid { grid-template-columns: 1fr; }
        }
        .pdf-viewer-card {
            position: sticky;
            top: 2rem;
            padding: 0;
            overflow: hidden;
            background: #1a1a1a;
            border: 2px solid #2a2a2a;
        }
        .pdf-viewer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
            border-bottom: 1px solid #3a3a3a;
        }
        .pdf-viewer-title {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 0.75rem;
            font-weight: 600;
            color: #10b981;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pdf-viewer-title::before {
            content: '◉';
            color: #10b981;
            animation: pulse-dot 2s ease-in-out infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .pdf-viewer-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .pdf-zoom-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #0a0a0a;
            border: 1px solid #3a3a3a;
            color: #e5e5e5;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: 'JetBrains Mono', monospace;
        }
        .pdf-zoom-btn:hover {
            background: #2a2a2a;
            border-color: #10b981;
            color: #10b981;
        }
        .pdf-zoom-btn:active {
            transform: scale(0.95);
        }
        .pdf-zoom-level {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            color: #888;
            min-width: 50px;
            text-align: center;
            padding: 0.25rem 0.5rem;
            background: #0a0a0a;
            border: 1px solid #2a2a2a;
        }
        .pdf-fullscreen-btn {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #0a0a0a;
            border: 1px solid #3a3a3a;
            color: #e5e5e5;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.15s ease;
            margin-left: 0.5rem;
        }
        .pdf-fullscreen-btn:hover {
            background: #f59e0b;
            border-color: #f59e0b;
            color: #0a0a0a;
        }
        .pdf-viewer-container {
            position: relative;
            background: #0f0f0f;
            overflow: auto;
            height: 75vh;
        }
        .pdf-embed {
            width: 100%;
            height: 100%;
            border: none;
            display: block;
            transform-origin: top left;
            transition: transform 0.2s ease;
        }
        .pdf-viewer-card.fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 9999;
            border-radius: 0;
            border: none;
        }
        .pdf-viewer-card.fullscreen .pdf-viewer-container {
            height: calc(100vh - 56px);
        }
        .pdf-viewer-card.fullscreen .pdf-fullscreen-btn {
            background: #dc2626;
            border-color: #dc2626;
            color: #fff;
        }
        .pdf-zoom-hint {
            position: absolute;
            bottom: 1rem;
            right: 1rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            color: #555;
            background: rgba(0,0,0,0.8);
            padding: 0.25rem 0.5rem;
            border: 1px solid #333;
            pointer-events: none;
        }

        /* ============ HEADER ACTIONS ============ */
        .header-actions {
            display: flex;
            gap: 0.75rem;
            align-items: center;
            margin-bottom: 2rem;
        }
        .header-actions-title {
            flex: 1;
        }

        /* ============ UTILITIES ============ */
        .text-center { text-align: center; }
        .mb-0 { margin-bottom: 0; }
        .hidden { display: none; }
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .animate-spin { animation: spin 1s linear infinite; }

        /* ============ TOAST NOTIFICATIONS ============ */
        #toast-container {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-width: 380px;
            pointer-events: none;
        }
        .toast {
            background: var(--bg-card, #fff);
            border: 1px solid var(--color-border, #e2e8f0);
            border-left: 4px solid #3b82f6;
            border-radius: 0.5rem;
            padding: 0.75rem 1rem;
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            opacity: 0;
            transform: translateY(1rem);
            transition: opacity 0.3s, transform 0.3s;
            pointer-events: all;
        }
        .toast--visible { opacity: 1; transform: translateY(0); }
        .toast--success { border-left-color: #22c55e; }
        .toast--error   { border-left-color: #ef4444; }
        .toast--info    { border-left-color: #3b82f6; }
        .toast--warning { border-left-color: #f59b00; }
        .toast__message { flex: 1; font-size: 0.875rem; line-height: 1.4; }
        .toast__close   { background: none; border: none; cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--color-text-muted, #64748b); padding: 0; }
        @media (max-width: 768px) {
            #toast-container { left: 1rem; right: 1rem; max-width: none; }
        }

        /* ============ MOBILE: POSITIONS GRID + PDF VIEWER ============ */
        @media (max-width: 768px) {
            /* Positions-Grid mobil */
            #positionsBody,
            .position-row .pos-edit > div {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            .position-row .pos-edit > div {
                display: block;
            }
            .position-row .pos-edit > div > div {
                display: inline-block;
                min-width: 80px;
                vertical-align: top;
            }

            /* PDF-Viewer kleiner auf Mobile */
            .pdf-viewer-container {
                height: 40vh !important;
            }

            /* AC-Tabelle scrollbar */
            .ac-table,
            .ac-table-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                display: block;
            }
        }

        /* ============ HAMBURGER MENU ============ */
        .nav-hamburger {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            width: 2.5rem;
            height: 2.5rem;
            background: none;
            border: 1px solid var(--color-border);
            border-radius: var(--radius-btn);
            cursor: pointer;
            padding: 0.375rem;
            color: var(--color-text-muted);
            transition: border-color 0.2s;
        }
        .nav-hamburger:hover { border-color: var(--color-primary); }
        .nav-hamburger span {
            display: block;
            width: 18px;
            height: 2px;
            background: currentColor;
            border-radius: 1px;
            transition: transform 0.25s, opacity 0.25s;
        }
        .nav-hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
        .nav-hamburger--open span:nth-child(2) { opacity: 0; }
        .nav-hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

        /* ============ COMPREHENSIVE MOBILE STYLES ============ */
        @media (max-width: 640px) {
            /* --- Navigation --- */
            .nav-hamburger {
                display: flex;
            }
            .nav-links {
                display: none !important;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: var(--bg-nav, var(--bg-card));
                border-top: 1px solid var(--color-border);
                border-bottom: 1px solid var(--color-border);
                padding: 1rem 1.5rem;
                flex-direction: column !important;
                align-items: stretch !important;
                gap: 0.5rem !important;
                z-index: 1000;
                box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            }
            .nav-links--open {
                display: flex !important;
            }
            .nav-links a {
                padding: 0.625rem 0.75rem !important;
                font-size: 0.9375rem !important;
                border-radius: var(--radius-btn) !important;
            }
            .header {
                position: relative;
            }
            .header-inner {
                padding: 0 1rem;
                height: 3.5rem;
            }

            /* --- Main content spacing --- */
            .main-content {
                padding: 1.25rem 1rem;
            }

            /* --- Step indicator --- */
            .step-indicator {
                gap: 0.75rem;
                margin-bottom: 1.5rem;
            }
            .step-item {
                gap: 0.75rem;
            }
            .step-num {
                width: 2.25rem;
                height: 2.25rem;
                font-size: 0.875rem;
            }
            .step-line {
                width: 1.5rem;
            }

            /* --- Cards --- */
            .card {
                padding: 1rem;
            }

            /* --- Page title --- */
            .page-title {
                font-size: 1.5rem !important;
            }

            /* --- Header actions (review page) --- */
            .header-actions {
                flex-wrap: wrap;
                gap: 0.5rem;
                margin-bottom: 1.25rem;
            }
            .header-actions-title {
                flex-basis: 100%;
                font-size: 1.375rem !important;
            }
            .header-actions .btn-secondary,
            .header-actions a.btn-secondary {
                flex: 1;
                min-width: 0;
                font-size: 0.8125rem;
                padding: 0.5rem 0.625rem;
                text-align: center;
                justify-content: center;
            }
            .header-actions select {
                flex: 1;
                min-width: 0;
                font-size: 0.8125rem !important;
                padding: 0.5rem !important;
            }

            /* --- Position edit grid: 3-col on mobile --- */
            .pos-edit-grid {
                grid-template-columns: 1fr 1fr 1fr !important;
                gap: 0.375rem !important;
            }
            .pos-edit-grid > div:first-child {
                grid-column: 1 / -1;
            }

            /* --- Upload page --- */
            .upload-wrapper,
            .upload-wrapper > div {
                padding-top: 1.5rem !important;
                padding-bottom: 1.5rem !important;
            }

            /* --- Form grids (2-col → 1-col) --- */
            .form-grid-2 {
                grid-template-columns: 1fr !important;
            }

            /* --- Dropzone --- */
            .dropzone {
                padding: 2rem 1rem;
            }
            .dropzone-icon { font-size: 2.5rem; }
            .dropzone-title { font-size: 1.125rem; }

            /* --- Totals validation table --- */
            .totals-table,
            .totals-validation-table {
                font-size: 0.8125rem;
            }

            /* --- Layout-Reihenfolge: Formular zuerst, PDF darunter --- */
            .layout-grid > div:first-child { order: 2; }
            .layout-grid > div:last-child  { order: 1; }
            .layout-grid > div:first-child .pdf-viewer-container {
                height: 50vh !important;
            }

            /* --- AC-Tabelle: Card-Stack statt horizontaler Scroll --- */
            .ac-table-wrapper {
                overflow-x: visible !important;
                border: none !important;
            }
            .ac-table {
                overflow-x: visible !important;
                display: block !important;
            }
            .ac-table thead { display: none !important; }
            .ac-table tbody { display: block !important; }
            .ac-table tr.ac-row {
                display: grid !important;
                grid-template-columns: 1fr 1fr !important;
                gap: 0.375rem !important;
                padding: 0.625rem !important;
                border: 1px solid #e2e8f0 !important;
                border-radius: 0.5rem !important;
                margin-bottom: 0.5rem !important;
            }
            .ac-table td { display: block !important; padding: 0 !important; }
            .ac-table td:nth-child(1)::before { content: "Typ"; font-size: 0.625rem; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
            .ac-table td:nth-child(2)::before { content: "Beschreibung"; font-size: 0.625rem; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
            .ac-table td:nth-child(3)::before { content: "Betrag"; font-size: 0.625rem; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
            .ac-table td:nth-child(4)::before { content: "USt %"; font-size: 0.625rem; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
            .ac-table td:nth-child(5)::before { content: "Code"; font-size: 0.625rem; color: #64748b; text-transform: uppercase; display: block; margin-bottom: 0.25rem; }
            .ac-table td:nth-child(2) { grid-column: 1 / -1 !important; }
            .ac-table td:nth-child(6) { grid-column: 2; grid-row: 1; display: flex !important; justify-content: flex-end; }
            .ac-table tfoot tr { display: flex !important; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding: 0.375rem 0; }
            .ac-table tfoot td { display: inline !important; padding: 0 !important; }

            /* --- Touch-Targets 44px --- */
            .btn-pos-action {
                width: 44px !important;
                height: 44px !important;
                font-size: 1rem !important;
            }
            .btn-icon-compact {
                width: 44px !important;
                height: 44px !important;
                font-size: 1rem !important;
            }
            .pdf-zoom-btn,
            .pdf-fullscreen-btn {
                width: 44px !important;
                height: 44px !important;
            }

            /* --- Header-Actions Buttons --- */
            .header-actions .btn-secondary,
            .header-actions .btn-primary {
                min-height: 44px;
                padding: 0.75rem 1rem;
                font-size: 0.875rem;
            }

/* --- Hover utilities (CSP-safe, ersetzen inline onmouseover/onmouseout) --- */
.hover-text:hover { color: var(--color-primary) !important; }
.hover-border:hover { border-color: var(--color-primary) !important; }
.hover-both:hover { color: var(--color-primary) !important; border-color: var(--color-primary) !important; }
.hover-dim:hover { opacity: 0.9 !important; }
.hover-bright:hover { opacity: 1 !important; }
        }

/* ============ BLOG POST ============ */
.blog-post {
    max-width: 720px;
    margin: 0 auto;
}

.blog-post__breadcrumb {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    letter-spacing: 0.01em;
}
.blog-post__breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.blog-post__breadcrumb a:hover { color: var(--color-primary); }

.blog-post__title {
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.625rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
}

.blog-post__meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 2.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-main);
}

/* ── Blog Typography ─────────────────────────────── */

.blog-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.125rem;
    line-height: 1.875;
    color: var(--color-text);
}

/* Lead paragraph: slightly larger, sets the tone */
.blog-content > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text);
    font-weight: 400;
    margin-bottom: 1.75rem;
}

.blog-content h2 {
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.5625rem);
    font-weight: 700;
    color: var(--color-text);
    margin: 3.25rem 0 1rem;
    letter-spacing: -0.025em;
    line-height: 1.25;
    padding-left: 1.125rem;
    border-left: 3px solid var(--color-primary);
}
.blog-content h2:first-child { margin-top: 0; }

.blog-content h3 {
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2.25rem 0 0.625rem;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.blog-content p {
    margin-bottom: 1.5rem;
}
.blog-content p:last-child { margin-bottom: 0; }
.blog-content p:empty { display: none; }

.blog-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: opacity 0.2s;
}
.blog-content a:hover { opacity: 0.72; }

.blog-content strong {
    font-weight: 700;
    color: var(--color-text);
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif;
    font-size: 0.975em;
}
.blog-content em { font-style: italic; }

.blog-content ul,
.blog-content ol {
    padding-left: 1.75rem;
    margin-bottom: 1.5rem;
    font-family: Georgia, serif;
}
.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

/* Fallback: alle <img> im Content korrekt einpassen */
.blog-content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

/* ── Hero-Bild ────────────────────────────────────── */
.blog-hero-image {
    margin: 0 0 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.09);
}
.blog-hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}
.blog-image-credit {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-align: right;
    margin: 6px 0 0;
    font-family: var(--font-main);
    font-style: italic;
}

/* ── Inline-Bilder ────────────────────────────────── */
.blog-content figure {
    margin: 2.25rem 0;
    max-width: 100%;
}
.blog-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
}
.blog-content figcaption {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-align: right;
    margin-top: 7px;
    font-family: var(--font-main);
    font-style: italic;
}

/* ── Callout-Box ──────────────────────────────────── */
.callout {
    background: #eff6ff;
    border-left: 4px solid var(--color-primary);
    padding: 1.125rem 1.375rem;
    margin: 2.25rem 0;
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.callout strong {
    display: block;
    color: #1d4ed8;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.callout p {
    margin: 0;
    color: #1e3a8a;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    line-height: 1.65;
}
body.theme-dark-luxury .callout { background: #1e3a8a22; }
body.theme-dark-luxury .callout strong { color: #93c5fd; }
body.theme-dark-luxury .callout p { color: #bfdbfe; }

/* ── Pull-Quote ───────────────────────────────────── */
.pull-quote {
    position: relative;
    margin: 2.75rem 0;
    padding: 1.5rem 1.75rem 1.5rem 3.25rem;
    background: transparent;
    border-left: none;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--color-text);
}
.pull-quote::before {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 5rem;
    line-height: 0.85;
    color: var(--color-primary);
    opacity: 0.25;
    position: absolute;
    top: 0.75rem;
    left: 0.5rem;
    pointer-events: none;
    font-style: normal;
}
.pull-quote::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-primary);
    opacity: 0.3;
    border-radius: 2px;
}

/* ── CTA-Box ──────────────────────────────────────── */
.blog-cta {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 2.25rem;
    margin-top: 3.5rem;
    text-align: center;
}
.blog-cta h3 {
    font-family: 'Plus Jakarta Sans', var(--font-display), sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.625rem;
    letter-spacing: -0.02em;
}
.blog-cta p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    font-family: var(--font-main);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}
.blog-cta__btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    transition: opacity 0.2s, transform 0.15s;
}
.blog-cta__btn:hover { opacity: 0.88; transform: translateY(-1px); }
body.theme-dark-luxury .blog-cta__btn { color: #0a0a0a; }

/* ── Weitere Artikel ──────────────────────────────── */
.blog-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}
.blog-related__label {
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.blog-related__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.blog-related__list a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s, padding-left 0.2s;
}
.blog-related__list a::before {
    content: '→';
    color: var(--color-primary);
    opacity: 0;
    font-size: 0.875rem;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.blog-related__list a:hover {
    color: var(--color-primary);
    padding-left: 0.25rem;
}
.blog-related__list a:hover::before { opacity: 1; }
.blog-related__list li:last-child a { border-bottom: none; }
