:root {
    --lp-bg: #f1f5f9;
    --lp-panel: #ffffff;
    --lp-border: #e2e8f0;
    --lp-text: #0f172a;
    --lp-muted: #64748b;
    --lp-primary: #475569;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--lp-bg); color: var(--lp-text); }

/* Dashboard */
.lp-dashboard-header { padding: 24px 32px; background: var(--lp-panel); border-bottom: 1px solid var(--lp-border); }
.lp-dashboard-header h1 { margin: 0; font-size: 20px; }
.lp-dashboard-main { padding: 24px 32px; display: flex; flex-direction: column; gap: 32px; }
.lp-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lp-panel-head h2 { margin: 0; font-size: 16px; }
.lp-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.lp-card { background: var(--lp-panel); border: 1px solid var(--lp-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.lp-card-thumb { min-height: 80px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--lp-muted); font-size: 12px; padding: 8px; line-height: 1.4; }
.lp-card-body { padding: 12px; flex: 1; }
.lp-card-body strong { display: block; font-size: 14px; }
.lp-card-body p { margin: 4px 0 0; font-size: 12px; color: var(--lp-muted); }
.lp-card-actions { display: flex; gap: 6px; padding: 0 12px 12px; }
.lp-card-actions input { flex: 1; padding: 6px 8px; border: 1px solid var(--lp-border); border-radius: 6px; font-size: 12px; }
.lp-link { display: block; text-align: center; padding: 8px; font-size: 12px; color: var(--lp-muted); text-decoration: none; border-top: 1px solid var(--lp-border); }
.lp-empty { color: var(--lp-muted); font-size: 13px; }
.lp-card-footer-actions { display: flex; border-top: 1px solid var(--lp-border); }
.lp-card-footer-actions a, .lp-card-footer-actions form { flex: 1; }
.lp-link-btn { width: 100%; background: none; border: none; padding: 8px; font-size: 12px; color: var(--lp-muted); cursor: pointer; border-left: 1px solid var(--lp-border); }
.lp-link-btn-danger { color: #dc2626; }

.lp-btn { border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.lp-btn-primary { background: var(--lp-primary); color: #fff; }
.lp-btn-ghost { background: #eef2f6; color: var(--lp-text); }

dialog { border: none; border-radius: 12px; padding: 20px; width: 360px; }
dialog label { display: block; font-size: 13px; margin-bottom: 12px; }
dialog input, dialog textarea { width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--lp-border); border-radius: 6px; }
.lp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Editor shell */
.lp-editor-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.lp-topbar { height: 52px; background: #0f172a; color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; flex-shrink: 0; }
.lp-back { color: #fff; text-decoration: none; font-size: 14px; }
.lp-device-toggle { display: flex; gap: 6px; margin-left: auto; }
.lp-device-toggle button { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.lp-device-toggle button.is-active { background: #2563eb; border-color: #2563eb; }
.lp-topbar-right { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.lp-topbar-right button { background: transparent; border: none; color: #fff; cursor: pointer; font-size: 16px; }
.lp-save-status { color: #94a3b8; }
.lp-mode-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; display: inline-block; }

.lp-editor-shell { flex: 1; display: flex; overflow: hidden; min-height: 0; }

.lp-panel-sections, .lp-panel-library, .lp-panel-design, .lp-panel-tracking {
    width: 280px; background: var(--lp-panel); border-right: 1px solid var(--lp-border);
    display: flex; flex-direction: column; padding: 16px; gap: 12px; overflow-y: auto; min-height: 0;
}
.lp-panel-sections[hidden], .lp-panel-library[hidden], .lp-panel-design[hidden], .lp-panel-tracking[hidden] { display: none; }
.lp-tracking-hint { font-size: 12px; color: var(--lp-muted); line-height: 1.5; }
.lp-tracking-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lp-tracking-field input, .lp-tracking-field textarea { padding: 8px; border: 1px solid var(--lp-border); border-radius: 6px; font-family: inherit; font-size: 13px; resize: vertical; }
.lp-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lp-panel-settings, .lp-panel-section-settings { width: 280px; background: var(--lp-panel); border-right: 1px solid var(--lp-border); display: flex; flex-direction: column; padding: 16px; gap: 12px; overflow-y: auto; min-height: 0; }
.lp-panel-settings[hidden], .lp-panel-section-settings[hidden] { display: none; }
.lp-section-settings-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 12px; }
.lp-section-settings-field input, .lp-section-settings-field textarea, .lp-section-settings-field select {
    padding: 8px; border: 1px solid var(--lp-border); border-radius: 6px; font-family: inherit; font-size: 13px; resize: vertical;
}
.lp-section-settings-field label { font-weight: 600; color: var(--lp-text); }
.lp-pairlist-row { display: flex; gap: 6px; margin-bottom: 6px; }
.lp-pairlist-row input { flex: 1; padding: 6px 8px; border: 1px solid var(--lp-border); border-radius: 6px; font-size: 12px; }
.lp-pairlist-row button { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 14px; }
.lp-pairlist-add { background: none; border: 1px dashed var(--lp-border); border-radius: 6px; padding: 6px; font-size: 12px; cursor: pointer; width: 100%; }
.lp-checkbox-list { display: flex; flex-direction: column; gap: 6px; }
.lp-panel-title { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--lp-muted); }
.lp-panel-subtitle { font-size: 18px; font-weight: 600; }
.lp-back-inline { background: none; border: none; color: var(--lp-muted); cursor: pointer; font-size: 13px; padding: 0; }

.lp-section-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; user-select: none; -webkit-user-select: none; }
.lp-section-row {
    display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-radius: 8px;
    cursor: grab; position: relative; background: var(--lp-panel);
}
.lp-section-row.is-dragging, .lp-section-row.is-dragging * { cursor: grabbing; }
.lp-section-row:hover { background: #f8fafc; }
.lp-section-row.is-dragging { opacity: 0.4; }
.lp-drag-handle { color: var(--lp-muted); font-size: 13px; }
.lp-section-index { color: var(--lp-muted); font-size: 13px; width: 16px; }
.lp-section-name { flex: 1; font-size: 14px; font-weight: 500; }
.lp-section-row.is-hidden-section .lp-section-name { color: var(--lp-muted); text-decoration: line-through; }
.lp-row-menu-btn { background: none; border: none; cursor: pointer; font-size: 16px; color: var(--lp-muted); }
.lp-row-menu { position: absolute; right: 8px; top: 36px; background: #fff; border: 1px solid var(--lp-border); border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); display: none; flex-direction: column; z-index: 20; min-width: 140px; }
.lp-row-menu.is-open { display: flex; }
.lp-row-menu button { background: none; border: none; text-align: left; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.lp-row-menu button:hover { background: #f1f5f9; }

.lp-add-section-btn, .lp-design-btn {
    background: none; border: 1px dashed var(--lp-border); border-radius: 8px; padding: 10px; font-size: 13px;
    cursor: pointer; color: var(--lp-text); text-align: left;
}
.lp-design-btn { border-style: solid; background: #f8fafc; }

.lp-library-category { margin-bottom: 16px; }
.lp-library-category-label { font-size: 12px; color: var(--lp-muted); margin-bottom: 8px; }
.lp-library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-library-card { border: 1px solid var(--lp-border); border-radius: 8px; padding: 0; cursor: pointer; background: #fff; overflow: hidden; text-align: left; min-width: 0; }
.lp-library-card-thumb { width: 100%; height: 72px; background: #fff; position: relative; overflow: hidden; }
.lp-library-thumb-scale {
    width: 860px; transform: scale(0.155); transform-origin: top left;
    pointer-events: none; user-select: none; --lp-primary: #475569;
}
.lp-library-card-label { display: block; padding: 6px 8px; font-size: 12px; }
.lp-library-card:hover { border-color: var(--lp-primary); }

.lp-theme-toggle { display: flex; gap: 8px; }
.lp-theme-toggle button { flex: 1; padding: 10px; border: 1px solid var(--lp-border); border-radius: 8px; background: #fff; cursor: pointer; }
.lp-theme-toggle button.is-active { border-color: var(--lp-primary); background: #f1f5f9; }
.lp-palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-palette-swatch { border: 1px solid var(--lp-border); border-radius: 8px; padding: 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.lp-palette-swatch span { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 2px; }
.lp-palette-swatch.is-active { border-color: var(--lp-primary); box-shadow: 0 0 0 1px var(--lp-primary); }
.lp-palette-swatch small { font-size: 11px; color: var(--lp-muted); }
.lp-color-input-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.lp-color-input-row input { width: 100px; padding: 4px 6px; border: 1px solid var(--lp-border); border-radius: 6px; }
.lp-font-grid { display: flex; flex-direction: column; gap: 6px; }
.lp-font-swatch { text-align: left; padding: 10px 12px; border: 1px solid var(--lp-border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 15px; }
.lp-font-swatch.is-active { border-color: var(--lp-primary); background: #f1f5f9; }

.lp-canvas-wrap { flex: 1; overflow-y: auto; min-height: 0; padding: 24px; display: flex; justify-content: center; align-items: flex-start; background: var(--lp-bg); }
.lp-canvas-frame { background: #fff; width: 100%; max-width: 980px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; transition: max-width 0.2s; }
.lp-canvas-frame[data-device="tablet"] { max-width: 640px; }
.lp-canvas-frame[data-device="mobile"] { max-width: 380px; }
.lp-canvas-section.is-hidden { display: none; }
.lp-canvas-section.is-drop-target { outline: 2px dashed var(--lp-primary); }
.lp-canvas-section.is-scroll-highlight { outline: 2px solid var(--lp-primary); outline-offset: -2px; transition: outline-color 0.2s; }

/* Section visual styles */
.lp-section { padding: 48px 40px; max-width: 70%; margin: 0 auto; }
.lp-section-header, .lp-section-footer, .lp-section-sticky-cta { max-width: none; margin: 0; }
.lp-section-header .lp-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px max(40px, calc((100% - 1040px) / 2)); }
.lp-logo { font-weight: 700; }
.lp-section-hero { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.lp-hero-layout-image-left { flex-direction: row-reverse; }
.lp-hero-layout-image-top { flex-direction: column; text-align: center; }
.lp-hero-layout-image-top .lp-hero-text { display: flex; flex-direction: column; align-items: center; }
.lp-hero-layout-no-image .lp-hero-text { text-align: center; max-width: 640px; margin: 0 auto; }
.lp-hero-text { flex: 1; min-width: 240px; }
.lp-hero-text h1 { font-size: 28px; margin: 0 0 12px; }
.lp-hero-text p { color: var(--lp-muted); margin: 0 0 16px; }
.lp-hero-media { flex: 1; min-width: 220px; }
.lp-media-placeholder { background: #0f172a; color: #fff; border-radius: 10px; height: 200px; display: flex; align-items: center; justify-content: center; }
.lp-image-bg { width: 100%; height: 100%; min-height: 200px; background-repeat: no-repeat; background-color: #0f172a; border-radius: 10px; cursor: grab; }
.lp-image-bg.is-panning { cursor: grabbing; }
.lp-image-replace-btn {
    position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(15, 23, 42, 0.7); color: #fff; border: none; cursor: pointer; font-size: 14px; z-index: 5;
}
.lp-image-edit-hint {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 999px;
    opacity: 0; transition: opacity 0.15s; pointer-events: none; white-space: nowrap;
}
.lp-upload-slot:hover .lp-image-edit-hint { opacity: 1; }
.lp-btn-primary { background: var(--lp-primary); color: #fff; border-radius: 8px; padding: 10px 18px; display: inline-block; text-decoration: none; }
.lp-btn-ghost { border: 1px solid var(--lp-border); border-radius: 8px; padding: 8px 14px; text-decoration: none; color: var(--lp-text); }
.lp-section-compare h2, .lp-section-steps h2, .lp-section-faq h2, .lp-section-cta h2, .lp-section-final-cta h2, .lp-section-video h2 { text-align: center; margin-bottom: 24px; }
.lp-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-compare-col { border: 1px solid var(--lp-border); border-radius: 10px; padding: 16px; }
.lp-compare-good { border-color: var(--lp-primary); }
.lp-steps-list { max-width: 480px; margin: 0 auto; }
.lp-faq-list { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.lp-faq-item { border: 1px solid var(--lp-border); border-radius: 8px; padding: 10px 14px; }
.lp-section-cta, .lp-section-final-cta, .lp-section-video { text-align: center; }
.lp-cta-layout-boxed { max-width: 480px; margin: 0 auto; border: 1px solid var(--lp-border); border-radius: 16px; padding: 40px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.lp-cta-layout-banner { background: var(--lp-primary); color: #fff; border-radius: 14px; padding: 40px; }
.lp-cta-layout-banner .lp-btn-primary { background: #fff; color: var(--lp-primary); }
.lp-cta-layout-banner h2, .lp-cta-layout-banner p { color: #fff; }
.lp-section-footer { display: flex; justify-content: space-between; align-items: center; padding: 24px max(40px, calc((100% - 1040px) / 2)); background: #0f172a; color: #cbd5e1; }
.lp-footer-links { display: flex; gap: 12px; }
.lp-footer-links a { color: #cbd5e1; text-decoration: none; font-size: 13px; }
[contenteditable="true"]:hover { outline: 1px dashed #94a3b8; cursor: text; }
[contenteditable="true"]:focus { outline: 2px solid var(--lp-primary); }

.lp-upload-slot { cursor: pointer; position: relative; overflow: hidden; }
.lp-upload-slot:hover .lp-media-placeholder { outline: 2px dashed var(--lp-primary); }

.lp-variable-picker {
    position: absolute; display: none; gap: 4px; background: #0f172a; border-radius: 6px; padding: 4px; z-index: 1000;
}
.lp-variable-picker button {
    background: #1e293b; color: #fff; border: none; border-radius: 4px; padding: 4px 8px; font-size: 11px; cursor: pointer;
}
.lp-variable-picker button:hover { background: #334155; }

.lp-publish-btn { background: #2563eb; color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.lp-publish-btn.is-published { background: #15803d; }
.lp-public-link { color: #93c5fd; font-size: 12px; text-decoration: none; }

/* Conversion sections */
.lp-section-leadform { text-align: center; }
.lp-leadform { max-width: 420px; margin: 16px auto 0; display: flex; flex-direction: column; gap: 10px; }
.lp-leadform input { padding: 12px 14px; border: 1px solid var(--lp-border); border-radius: 8px; font-size: 14px; }
.lp-leadform-success { color: #15803d; font-weight: 600; }
.lp-leadform-error { color: #dc2626; font-size: 13px; font-weight: 600; }
.lp-leadform button[disabled] { opacity: 0.7; cursor: not-allowed; }

.lp-section-countdown { text-align: center; }
.lp-countdown { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.lp-countdown-box { background: #0f172a; color: #fff; border-radius: 10px; padding: 12px 16px; min-width: 64px; }
.lp-countdown-box span { display: block; font-size: 24px; font-weight: 700; }
.lp-countdown-box small { font-size: 11px; color: #94a3b8; }
.lp-countdown-expired { color: #ef4444; font-weight: 600; }

.lp-section-trustbadges { text-align: center; padding-top: 24px; padding-bottom: 24px; }
.lp-trustbadges-headline { color: var(--lp-muted); font-size: 13px; margin-bottom: 12px; }
.lp-trustbadges-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.lp-trustbadge-slot { width: 110px; height: 60px; border-radius: 8px; }
.lp-trustbadge-slot .lp-media-placeholder { height: 100%; font-size: 11px; border-radius: 8px; }
.lp-trustbadge-slot .lp-image-bg { background-color: transparent; min-height: 0; }

.lp-section-guarantee { display: flex; gap: 16px; align-items: flex-start; background: #f8fafc; border-radius: 12px; padding: 24px; }
.lp-guarantee-badge { width: 40px; height: 40px; border-radius: 50%; background: var(--lp-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.lp-section-guarantee h3 { margin: 0 0 4px; }
.lp-section-guarantee p { margin: 0; color: var(--lp-muted); }

.lp-section-testimonials h2 { text-align: center; margin-bottom: 24px; }
.lp-testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-testimonial-card { border: 1px solid var(--lp-border); border-radius: 10px; padding: 16px; }
.lp-testimonial-card p { margin: 0 0 8px; color: var(--lp-text); }
.lp-testimonial-card strong { font-size: 13px; color: var(--lp-muted); }

.lp-section-pricing { text-align: center; }
.lp-pricing-card { max-width: 360px; margin: 16px auto 0; border: 2px solid var(--lp-primary); border-radius: 14px; padding: 24px; }
.lp-pricing-amount { font-size: 32px; font-weight: 700; }
.lp-pricing-note { color: var(--lp-muted); font-size: 13px; margin-bottom: 16px; }
.lp-pricing-card ul { list-style: none; padding: 0; margin: 0 0 16px; text-align: left; }
.lp-pricing-card ul li { padding: 6px 0; border-bottom: 1px solid var(--lp-border); }

.lp-section-sticky-cta { display: block; background: #0f172a; color: #fff; padding: 16px 40px; }
.lp-sticky-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 70%; margin: 0 auto; }
.lp-section-sticky-cta a { white-space: nowrap; }
.lp-sticky-layout-primary { background: var(--lp-primary); }
.lp-sticky-layout-primary .lp-btn-primary { background: #fff; color: var(--lp-primary); }
.lp-sticky-layout-light { background: #f1f5f9; color: var(--lp-text); }

.lp-video-embed { position: relative; width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 16/9; }
.lp-video-embed iframe, .lp-video-embed video { width: 100%; height: 100%; border-radius: 10px; background: #000; object-fit: cover; }
.lp-video-url-slot { max-width: 720px; margin: 0 auto; aspect-ratio: 16/9; height: auto; }

.lp-section-gallery h2 { text-align: center; margin-bottom: 16px; }
.lp-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lp-gallery-slot { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; }
.lp-gallery-slot .lp-media-placeholder { height: 100%; border-radius: 10px; }

/* Leads dashboard */
.lp-lead-filter { margin: -8px 0 4px; display: flex; align-items: center; justify-content: space-between; }
.lp-lead-filter select { padding: 8px 10px; border: 1px solid var(--lp-border); border-radius: 6px; font-size: 13px; }
.lp-lead-table { width: 100%; border-collapse: collapse; background: var(--lp-panel); border-radius: 10px; overflow: hidden; }
.lp-lead-table th, .lp-lead-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--lp-border); font-size: 13px; }
.lp-lead-table th { background: #f8fafc; color: var(--lp-muted); font-weight: 600; }
.lp-lead-field { display: inline-block; margin-right: 14px; }

/* Cookie banner (public page) */
.lp-cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; background: #0f172a; color: #fff;
    padding: 16px 24px; z-index: 2000; font-size: 13px;
}
.lp-cookie-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-cookie-banner p { margin: 0; max-width: 560px; }
.lp-cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-cookie-btn-primary { background: #2563eb; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; flex-shrink: 0; }
.lp-cookie-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; padding: 8px 16px; cursor: pointer; flex-shrink: 0; }
.lp-cookie-details { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); display: flex; flex-direction: column; gap: 10px; }
.lp-cookie-details[hidden] { display: none; }
.lp-cookie-category { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.lp-cookie-category span { font-weight: 400; color: #94a3b8; font-size: 12px; }
.lp-legal-page .lp-section { max-width: 720px; margin: 0 auto; padding: 60px 24px; }
.lp-legal-text { white-space: normal; line-height: 1.7; color: var(--lp-text); }
.lp-cookie-reopen-link {
    position: fixed; bottom: 12px; left: 12px; z-index: 1999; font-size: 11px; color: #64748b;
    background: #fff; padding: 4px 10px; border-radius: 999px; text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Image picker dialog */
.lp-image-picker-dialog { border: none; border-radius: 14px; padding: 0; width: 640px; max-width: 90vw; max-height: 80vh; }
.lp-image-picker-dialog::backdrop { background: rgba(15,23,42,0.5); }
.lp-image-picker-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--lp-border); }
.lp-image-picker-tabs { display: flex; gap: 4px; }
.lp-image-picker-tab { background: none; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--lp-muted); }
.lp-image-picker-tab.is-active { background: #f1f5f9; color: var(--lp-text); font-weight: 600; }
.lp-image-picker-pane { padding: 16px; max-height: calc(80vh - 56px); overflow-y: auto; }
.lp-image-picker-pane[hidden] { display: none; }
.lp-image-picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.lp-image-picker-grid img, .lp-image-picker-grid video { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; display: block; }
.lp-image-picker-grid img:hover, .lp-image-picker-grid video:hover { border-color: var(--lp-primary); }
.lp-image-picker-grid .lp-pixabay-item { position: relative; }
.lp-image-picker-grid .lp-pixabay-item.is-loading::after {
    content: 'Lädt…'; position: absolute; inset: 0; background: rgba(15,23,42,0.6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 11px; border-radius: 8px;
}
.lp-pixabay-search-row { display: flex; gap: 8px; }
.lp-pixabay-search-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--lp-border); border-radius: 6px; }
.lp-pixabay-search-row select { padding: 8px; border: 1px solid var(--lp-border); border-radius: 6px; }

/* Collapsible tracking/settings sections */
.lp-collapsible { border: 1px solid var(--lp-border); border-radius: 8px; padding: 0; margin-bottom: 8px; background: #fff; }
.lp-collapsible summary {
    padding: 10px 12px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.lp-collapsible summary::-webkit-details-marker { display: none; }
.lp-collapsible summary::after { content: '+'; color: var(--lp-muted); font-weight: 400; }
.lp-collapsible[open] summary::after { content: '–'; }
.lp-collapsible > *:not(summary) { padding: 0 12px; }
.lp-collapsible > *:last-child { padding-bottom: 12px; }
.lp-collapsible[open] summary { border-bottom: 1px solid var(--lp-border); margin-bottom: 10px; }

.lp-favicon-row, .lp-sitemap-row { display: flex; align-items: center; gap: 8px; }
.lp-favicon-preview { width: 32px; height: 32px; border-radius: 6px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.lp-favicon-preview img { width: 100%; height: 100%; object-fit: contain; }
.lp-sitemap-row input { flex: 1; font-size: 12px; padding: 8px; border: 1px solid var(--lp-border); border-radius: 6px; color: var(--lp-muted); }

/* Dark mode for the landing page canvas/public output (scoped — editor chrome stays light) */
.lp-canvas-frame.is-dark, .lp-public-frame.is-dark {
    background: #0f172a; color: #e2e8f0;
    --lp-text: #e2e8f0; --lp-muted: #94a3b8; --lp-border: #334155; --lp-panel: #1e293b; --lp-bg: #0f172a;
}
.lp-canvas-frame.is-dark .lp-section-guarantee { background: #1e293b; }
.lp-canvas-frame.is-dark .lp-btn-ghost { background: #1e293b; color: #e2e8f0; }
.lp-canvas-frame.is-dark .lp-trustbadge-slot .lp-media-placeholder { background: #1e293b; }
.lp-canvas-frame.is-dark .lp-cookie-banner { background: #1e293b; }

/* Header logo image */
.lp-logo-row { display: flex; align-items: center; gap: 10px; }
.lp-logo-image-slot { width: 120px; height: 40px; }
.lp-logo-image-slot .lp-image-bg { background-size: contain; background-color: transparent; min-height: 0; }
.lp-logo-image-empty { width: auto; height: auto; font-size: 11px; color: var(--lp-muted); border: 1px dashed var(--lp-border); border-radius: 6px; padding: 4px 8px; cursor: pointer; }

/* Standalone text/image/video sections */
.lp-section-text { line-height: 1.7; }
.lp-section-text a { color: var(--lp-primary); }
.lp-section-image-block, .lp-section-video-block { text-align: center; }
.lp-image-block-slot { max-width: 720px; margin: 0 auto; min-height: 240px; border-radius: 10px; overflow: hidden; }
.lp-image-caption { margin-top: 10px; font-size: 13px; color: var(--lp-muted); }

/* Rich text formatting toolbar */
.lp-format-toolbar button { font-weight: 700; }
.lp-format-toolbar button:nth-child(2) { font-style: italic; font-weight: 400; }

.lp-cookie-policy-text { font-size: 12px; color: #cbd5e1; line-height: 1.6; max-height: 140px; overflow-y: auto; margin-bottom: 10px; padding-right: 8px; }

.lp-toolbar-sep { width: 1px; background: #334155; margin: 2px 2px; }

.lp-section-bullet-list h2 { text-align: center; margin-bottom: 20px; }
.lp-bullet-list { list-style: none; padding: 0; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-bullet-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.lp-bullet-list li::before { flex-shrink: 0; font-weight: 700; color: var(--lp-primary); }
.lp-bullet-icon-check li::before { content: '✓'; }
.lp-bullet-icon-arrow li::before { content: '→'; }
.lp-bullet-icon-star li::before { content: '★'; }
.lp-bullet-icon-dot li::before { content: '•'; }

/* Auth pages */
.lp-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lp-auth-card { width: 360px; background: var(--lp-panel); border: 1px solid var(--lp-border); border-radius: 14px; padding: 32px; }
.lp-auth-card h1 { margin: 0 0 20px; font-size: 20px; text-align: center; }
.lp-auth-card label { display: block; font-size: 13px; margin-bottom: 14px; }
.lp-auth-card input { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--lp-border); border-radius: 8px; font-size: 14px; }
.lp-auth-error { background: #fef2f2; color: #b91c1c; font-size: 13px; padding: 10px; border-radius: 8px; margin-bottom: 14px; }
.lp-auth-divider { text-align: center; color: var(--lp-muted); font-size: 12px; margin: 16px 0; position: relative; }
.lp-auth-divider::before, .lp-auth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--lp-border); }
.lp-auth-divider::before { left: 0; }
.lp-auth-divider::after { right: 0; }
.lp-google-btn { width: 100%; gap: 10px; }
.lp-auth-switch { text-align: center; font-size: 13px; color: var(--lp-muted); margin-top: 18px; }

/* ---- Responsive (mobile) ---- */
@media (max-width: 768px) {
    .lp-section { max-width: 92%; padding: 32px 0; }
    .lp-section-header, .lp-section-footer, .lp-section-sticky-cta { max-width: none; }
    .lp-section-header .lp-header-bar, .lp-section-footer { padding-left: 20px; padding-right: 20px; }
    .lp-section-hero { flex-direction: column; text-align: center; gap: 20px; }
    .lp-hero-layout-image-left { flex-direction: column; }
    .lp-hero-text h1 { font-size: 24px; }
    .lp-compare-grid, .lp-testimonials-grid, .lp-gallery-grid { grid-template-columns: 1fr; }
    .lp-section-sticky-cta { padding: 14px 20px; }
    .lp-sticky-cta-inner { flex-direction: column; gap: 10px; text-align: center; max-width: 100%; }
    .lp-pricing-card { max-width: 100%; }
    .lp-cookie-main { flex-direction: column; align-items: stretch; text-align: center; }
    .lp-cookie-actions { justify-content: center; }
    .lp-video-embed, .lp-video-url-slot, .lp-image-block-slot { max-width: 100%; }
    .lp-trustbadges-row { gap: 10px; }
    .lp-trustbadge-slot { width: 86px; height: 48px; }
}

@media (max-width: 480px) {
    .lp-section { padding: 24px 0; }
    .lp-hero-text h1 { font-size: 21px; }
    .lp-section-header .lp-header-bar { flex-wrap: wrap; gap: 8px; padding: 12px 0; }
    .lp-leadform { max-width: 100%; }
    .lp-countdown { gap: 6px; }
    .lp-countdown-box { padding: 8px 10px; min-width: 50px; }
    .lp-countdown-box span { font-size: 18px; }
}

.lp-storage-bar-wrap { margin: 4px 0 10px; }
.lp-storage-bar { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.lp-storage-bar-fill { height: 100%; background: var(--lp-primary); border-radius: 999px; transition: width 0.2s; }
.lp-storage-bar-fill.is-full { background: #dc2626; }

.lp-section-html-embed { width: 100%; }
.lp-section-html-embed > * { width: 100%; max-width: 100%; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Flowtorio UI-Refresh — nur App-Oberfläche (body.lp-dashboard).
   Bewusst NICHT global: .lp-btn-primary etc. werden auch auf den
   veröffentlichten Landingpages benutzt und behalten dort ihr Theme.
   ========================================================================== */
:root {
    --lp-accent: #ea580c;
    --lp-accent-hover: #c2410c;
    --lp-accent-soft: #ffedd5;
}

body.lp-dashboard {
    background: #f6f7f9;
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
body.lp-dashboard .lp-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.lp-header-brand { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.lp-header-brand img { border-radius: 7px; display: block; }
.lp-header-brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.lp-header-brand .lp-brand-sub { font-weight: 400; color: var(--lp-muted); }
.lp-header-nav { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--lp-muted); }
.lp-header-nav a { color: var(--lp-muted); text-decoration: none; padding: 4px 0; border: none; }
.lp-header-nav a:hover { color: var(--lp-text); }

/* --- Layout & Panels --- */
body.lp-dashboard .lp-dashboard-main {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 28px 32px 56px;
    gap: 24px;
}
body.lp-dashboard .lp-panel {
    background: var(--lp-panel);
    border: 1px solid var(--lp-border);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.lp-dashboard .lp-panel-head { margin-bottom: 16px; }
body.lp-dashboard .lp-panel-head h2 { font-size: 15px; letter-spacing: -0.01em; }
body.lp-dashboard .lp-panel > h2 { font-size: 15px; margin-top: 0; }

/* --- Buttons --- */
body.lp-dashboard .lp-btn {
    border-radius: 9px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
body.lp-dashboard .lp-btn-primary { background: var(--lp-accent); }
body.lp-dashboard .lp-btn-primary:hover { background: var(--lp-accent-hover); }
body.lp-dashboard .lp-btn-ghost { background: #fff; border: 1px solid var(--lp-border); }
body.lp-dashboard .lp-btn-ghost:hover { border-color: #cbd5e1; background: #f8fafc; }

/* --- Formularfelder --- */
body.lp-dashboard input:not([type="checkbox"]),
body.lp-dashboard select,
body.lp-dashboard textarea {
    font-family: inherit;
    box-sizing: border-box;
}
body.lp-dashboard input:focus-visible,
body.lp-dashboard select:focus-visible,
body.lp-dashboard textarea:focus-visible {
    outline: 2px solid var(--lp-accent);
    outline-offset: 1px;
    border-color: var(--lp-accent);
}

/* --- Karten (Vorlagen / Landingpages) --- */
body.lp-dashboard .lp-card {
    border-radius: 12px;
    transition: box-shadow 0.15s, transform 0.15s;
}
body.lp-dashboard .lp-card:hover {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}
body.lp-dashboard .lp-card-thumb {
    background: linear-gradient(135deg, #fff7ed, var(--lp-accent-soft));
    color: #9a3412;
    font-weight: 500;
}
body.lp-dashboard .lp-link:hover,
body.lp-dashboard .lp-link-btn:hover { color: var(--lp-text); background: #f8fafc; }
body.lp-dashboard .lp-link-btn-danger:hover { color: #b91c1c; background: #fef2f2; }

/* --- Leads-Tabelle --- */
body.lp-dashboard .lp-lead-table {
    border: 1px solid var(--lp-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-radius: 12px;
}
body.lp-dashboard .lp-lead-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
body.lp-dashboard .lp-lead-table tbody tr:hover td { background: #fafaf9; }

/* --- Konto-Seite --- */
.lp-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}
body.lp-dashboard .lp-panel-danger { border-color: #fecaca; }
body.lp-dashboard .lp-panel-danger h2 { color: #b91c1c; }
body.lp-dashboard .lp-storage-bar-fill { background: linear-gradient(90deg, #fb923c, var(--lp-accent)); }
body.lp-dashboard .lp-storage-bar-fill.is-full { background: #dc2626; }

/* --- Auth-Karten (Login / Registrierung) --- */
body.lp-dashboard .lp-auth-card {
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}
body.lp-dashboard .lp-auth-card .lp-btn-primary { padding: 10px 14px; font-size: 14px; }

@media (max-width: 720px) {
    body.lp-dashboard .lp-dashboard-header { padding: 12px 16px; }
    body.lp-dashboard .lp-dashboard-main { padding: 20px 16px 40px; }
    .lp-header-brand .lp-brand-sub { display: none; }
}
