/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
    --pw-orange: #f2a93b;
    --pw-orange-hover: #e09930;
    --pw-orange-light: #fef8f0;
    --pw-orange-border: #fde8c8;
    --text-primary: #2c2825;
    --text-secondary: #5c5650;
    --text-muted: #8a8480;
    --text-faint: #b5b0ab;
    --bg-page: #f7f5f3;
    --bg-card: #ffffff;
    --bg-subtle: #faf9f7;
    --bg-inset: #f3f1ee;
    --border-default: #e8e5e1;
    --border-light: #f0eeeb;
    --border-focus: var(--pw-orange);
    --success: #2a9d5c;
    --success-bg: #eefbf3;
    --warn: #d97706;
    --warn-bg: #fef9ee;
    --error: #dc4545;
    --error-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.55;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.main-content {
    padding: 20px 20px;
}

/* ===========================
   HEADER – Slim, sticky
   =========================== */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-default);
    padding: 0 32px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    padding: 6px 12px 6px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.header-brand:hover { background: var(--bg-inset); }

.header-brand-icon {
    width: 28px;
    height: 28px;
    background: var(--pw-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: -0.5px;
}

.header-brand-text { font-weight: 600; color: var(--pw-orange); }
.header-brand-text span { font-weight: 400; color: var(--text-muted); }

.header-sep { width: 1px; height: 24px; background: var(--border-default); }

.header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-version {
    font-size: 11px;
    color: var(--text-faint);
    font-weight: 400;
    margin-left: auto;
}

.header-logo {
    width: 60px;
    height: 60px;
}

.main-header h1 {
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 600;
}

/* ===========================
   CONTROL PANEL – 2-state layout
   =========================== */
.control-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 20px;
}

/* State 1: Empty (centered upload focus) */
.control-state-empty {
    padding: 40px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.upload-drop-zone-large {
    width: 100%;
    max-width: 560px;
    padding: 48px 40px;
}
.upload-drop-zone-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.empty-options {
    display: flex;
    gap: 14px;
    align-items: center;
}
.empty-option-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* State 2: Loaded (2-column grid) */
.control-state-loaded { }

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
}
.control-left {
    padding: 24px;
    border-right: 1px solid var(--border-light);
    display: flex;
}
.control-right {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-drop-zone-compact {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Input rows (new design) */
.input-row { display: flex; align-items: center; gap: 10px; }
.input-label {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    min-width: 80px; flex-shrink: 0;
}
.input-field {
    flex: 1; padding: 8px 12px;
    border: 1.5px solid var(--border-default); border-radius: var(--radius-sm);
    font-size: 13px; font-family: var(--font); color: var(--text-primary);
    transition: border-color 0.15s; background: var(--bg-card);
}
.input-field:focus { outline: none; border-color: var(--border-focus); }
.input-field::placeholder { color: var(--text-faint); }

/* Option labels (radio/checkbox) */
.option-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.option-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    width: 15px; height: 15px; accent-color: var(--pw-orange); cursor: pointer;
}

/* Update row (Title/Preheader) */
.update-row { display: flex; align-items: center; gap: 10px; padding-top: 2px; }
.btn-update {
    background: none; color: var(--pw-orange);
    border: 1.5px solid var(--pw-orange);
    padding: 5px 14px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn-update:hover { background: var(--pw-orange); color: white; }
.update-hint { font-size: 11px; color: var(--text-faint); }

/* Control footer bar */
.control-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-light);
    min-height: 52px;
}
.control-footer-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Process Button (new) */
.btn-process {
    background: var(--pw-orange);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-process:hover:not(:disabled) {
    background: var(--pw-orange-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-process:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: var(--text-faint);
}

/* Secondary Button (new) */
.btn-secondary {
    background: var(--bg-inset);
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-secondary:hover:not(:disabled) { background: var(--border-default); color: var(--text-secondary); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Action Buttons Container (links nebeneinander) */
.control-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Inspector Divider – hidden in redesign, kept for JS compatibility */
.control-inspector {
    display: none !important;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-inline {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

/* Upload Drop Zone */
.upload-drop-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: 35px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--bg-subtle);
}

.upload-drop-zone:hover {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

.upload-drop-zone.drag-over {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
    box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.2);
}

.upload-drop-zone.file-loaded {
    border-color: var(--success);
    border-style: solid;
    background: var(--success-bg);
    padding: 16px 20px;
}

.upload-drop-zone.file-loaded:hover {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

/* Unloaded compact zone in loaded state - show upload prompt */
.upload-drop-zone-compact:not(.file-loaded) {
    padding: 24px 20px;
}

.upload-drop-zone.file-loaded .upload-drop-icon {
    display: none;
}

.upload-drop-zone.file-loaded .upload-drop-text {
    display: none;
}

.upload-drop-zone.file-loaded .upload-drop-hint {
    display: none;
}

.upload-drop-loaded-info {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--success);
    font-weight: 500;
    flex-wrap: wrap;
}

.upload-drop-zone.file-loaded .upload-drop-loaded-info {
    display: flex;
}

.upload-drop-loaded-change {
    font-size: 12px;
    color: var(--pw-orange);
    font-weight: 600;
    margin-left: 10px;
    padding: 3px 10px;
    border: 1px solid var(--pw-orange);
    border-radius: 4px;
    transition: all 0.2s;
}

.upload-drop-zone.file-loaded:hover .upload-drop-loaded-change {
    background: var(--pw-orange);
    color: white;
}

.upload-drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.upload-drop-icon {
    font-size: 32px;
    opacity: 0.7;
}

.upload-drop-text {
    font-size: 15px;
    color: var(--text-secondary);
}
.upload-drop-text strong {
    color: var(--pw-orange);
}

.upload-drop-hint {
    font-size: 13px;
    color: var(--text-faint);
}

/* Legacy: btn-upload bleibt für Kompatibilität falls anderswo referenziert */
.btn-upload {
    background: var(--pw-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-upload:hover {
    background: var(--pw-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.file-name-display {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    display: none; /* Dateiname wird jetzt in der Drop-Zone angezeigt */
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 30px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--pw-orange);
}

/* Pre-Header Inline */
.inline-label {
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
    color: var(--text-secondary);
}

.inline-input {
    flex: 1;
    padding: 10px 15px;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.inline-input:focus {
    outline: none;
    border-color: var(--pw-orange);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--pw-orange);
}

/* Action Buttons */
.btn-action {
    background: var(--pw-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-action:hover:not(:disabled) {
    background: var(--pw-orange-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-action:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    opacity: 0.6;
    color: var(--text-faint);
}

/* Download Button (inherits from btn-action) */
.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-download:hover:not(:disabled) {
    background: var(--success);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-download:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Inspector Button → Visueller Trenner (kein CTA) */
.btn-inspector {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    pointer-events: none;
    transition: none;
}

.btn-inspector::before,
.btn-inspector::after {
    content: '';
    flex: 1;
    height: 2px;
    background: rgba(242, 169, 59, 0.5);
}

.btn-inspector:disabled {
    opacity: 1;
}

/* Suggest Button – uses btn-secondary style in new layout */
.btn-suggest {
    background: var(--bg-inset);
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    width: fit-content;
}
.btn-suggest:hover:not(:disabled) {
    background: var(--border-default);
    color: var(--text-secondary);
}
.btn-suggest:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Restore / Neues Template Button – secondary style */
.btn-restore {
    background: var(--bg-inset);
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    width: fit-content;
}
.btn-restore:hover {
    background: var(--border-default);
    color: var(--text-secondary);
}

/* Suggest Modal */
.suggest-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow: auto;
}
.suggest-modal-content {
    background: var(--bg-card);
    margin: 40px auto;
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 720px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.suggest-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pw-orange);
}
.suggest-modal-header h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}
.suggest-modal-hint {
    font-size: 13px;
    color: var(--text-faint);
    margin-bottom: 24px;
}
.suggest-section {
    margin-bottom: 28px;
}
.suggest-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pw-orange);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ede9fe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.suggest-item {
    padding: 10px 14px;
    background: #faf9ff;
    border: 1px solid #e8e4f5;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.15s;
}
.suggest-item:hover {
    background: #f2eeff;
}
.suggest-item-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.45;
}
.suggest-copy-all-btn {
    background: none;
    border: 1px solid #b8a8e0;
    color: var(--pw-orange);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    text-transform: none;
    letter-spacing: 0;
}
.suggest-copy-all-btn:hover {
    background: var(--pw-orange);
    color: white;
    border-color: var(--pw-orange);
}
.suggest-copy-all-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* ZIP-Daten (vom Kunden) hervorheben */
.suggest-section-zip .suggest-section-title {
    color: var(--pw-orange);
    border-bottom-color: var(--pw-orange-border);
}

.suggest-section-zip .suggest-item {
    background: var(--pw-orange-light);
    border-color: var(--pw-orange-border);
}

.suggest-section-zip .suggest-item:hover {
    background: #fdf0dc;
}

.suggest-section-zip .suggest-copy-all-btn {
    border-color: var(--pw-orange);
    color: #d4890a;
}

.suggest-section-zip .suggest-copy-all-btn:hover {
    background: var(--pw-orange);
    color: white;
    border-color: var(--pw-orange);
}

.suggest-item-image {
    font-family: monospace;
    font-size: 13px;
}

/* ZIP Images Banner im Bilder-Tab */
.zip-images-banner {
    background: var(--pw-orange-light);
    border: 2px solid var(--pw-orange);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.zip-images-banner-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.zip-images-banner-icon {
    font-size: 24px;
}

.zip-images-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.btn-zip-upload {
    padding: 8px 18px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-zip-upload:hover {
    background: var(--success);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-zip-skip {
    padding: 8px 18px;
    background: none;
    color: var(--text-faint);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-zip-skip:hover {
    border-color: var(--text-faint);
    color: var(--text-secondary);
}

.zip-images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.zip-image-chip {
    font-size: 12px;
    font-family: monospace;
    background: #fef0d5;
    color: var(--warn);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--pw-orange-border);
}

.zip-images-banner.zip-images-done {
    border-color: var(--text-faint);
    background: var(--bg-subtle);
}

.zip-images-banner.zip-images-done .zip-images-banner-title {
    color: var(--text-faint);
}

.zip-images-banner.zip-images-done .zip-image-chip {
    background: var(--bg-inset);
    color: var(--text-faint);
    border-color: var(--border-default);
}

/* ===========================
   INSPECTOR SECTION
   =========================== */
.inspector-section {
    background: var(--bg-card);
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

/* Tabs */
.inspector-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-default);
    padding: 0 12px;
    overflow-x: auto;
    align-items: center;
}

.inspector-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    position: relative;
}

.inspector-tab:hover {
    color: var(--text-secondary);
    background: rgba(0,0,0,0.02);
}

.inspector-tab .tab-icon {
    font-size: 16px;
    opacity: 0.5;
}

/* ── Active Tab States: Einheitlich Orange ── */
.inspector-tab.active {
    color: var(--pw-orange);
    border-bottom-color: var(--pw-orange);
    font-weight: 600;
    background: transparent;
}

.inspector-tab.active .tab-icon { opacity: 1; }
.inspector-tab.active .tab-count { background: var(--pw-orange); color: white; }

/* ── Reparaturen Tab ── */
.inspector-tab[data-tab="optionalfixes"] {
    color: var(--text-muted);
}
.inspector-tab.active[data-tab="optionalfixes"] {
    color: var(--pw-orange);
    border-bottom-color: var(--pw-orange);
}
.inspector-tab.active[data-tab="optionalfixes"] .tab-icon { opacity: 1; }
.inspector-tab.active[data-tab="optionalfixes"] .tab-count { background: var(--pw-orange); color: white; }

/* Tab leuchtet wenn Fixes vorhanden */
.inspector-tab[data-tab="optionalfixes"].has-fixes {
    color: var(--warn);
}
.inspector-tab[data-tab="optionalfixes"].has-fixes .tab-count {
    background: var(--warn);
    color: white;
    animation: fixes-pulse 1.8s ease-in-out 3;
}
.inspector-tab[data-tab="optionalfixes"].has-fixes .tab-icon {
    opacity: 1;
    animation: fixes-pulse 1.8s ease-in-out 3;
}
@keyframes fixes-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Fix Cards im Reparaturen-Tab ── */
.optional-fixes-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--warn-bg);
    border-left: 3px solid var(--warn);
    border-radius: 4px;
    line-height: 1.5;
}
.optional-fix-card {
    border: 1px solid var(--border-default);
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.optional-fix-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.optional-fix-card.fix-applied {
    border-color: var(--success);
    background: var(--success-bg);
}
.optional-fix-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
}
.optional-fix-card.fix-applied .optional-fix-card-header {
    background: var(--success-bg);
    border-bottom-color: var(--success);
}
.optional-fix-card-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.optional-fix-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}
.optional-fix-card-risk {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--warn-bg);
    color: var(--warn);
    font-weight: 500;
}
.optional-fix-card.fix-applied .optional-fix-card-risk {
    background: var(--success-bg);
    color: var(--success);
}
.optional-fix-card-body {
    padding: 12px 14px;
}
.optional-fix-card-desc {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.55;
    margin-bottom: 8px;
}
.optional-fix-card-detail {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}
.optional-fix-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.optional-fix-apply-btn {
    padding: 7px 16px;
    background: var(--warn);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.optional-fix-apply-btn:hover { background: var(--warn); }
.optional-fix-apply-btn:disabled {
    background: var(--success);
    color: var(--success);
    cursor: default;
}
.optional-fix-applied-label {
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}
.optional-fixes-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
    font-size: 13px;
}
.optional-fixes-empty .empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

/* ── Auto-Korrekturen Protokoll ── */
.autokorr-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--success-bg);
    border-left: 3px solid var(--success);
    border-radius: 4px;
    line-height: 1.5;
}
.autokorr-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.autokorr-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    font-size: 12.5px;
    line-height: 1.5;
    transition: background 0.15s;
}
.autokorr-item:hover {
    background: var(--bg-inset);
}
.autokorr-id {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 52px;
    font-size: 11.5px;
    padding-top: 1px;
}
.autokorr-msg {
    color: var(--text-primary);
    flex: 1;
}

/* ── Count Badge on Tabs ── */
.tab-count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 8px;
    background: var(--bg-inset);
    color: var(--text-faint);
    line-height: 1.4;
    min-width: 20px;
    text-align: center;
}
.tab-count:empty { display: none; }

/* ── Pending Dot ── */
.tab-pending-dot {
    display: none;
    width: 8px;
    height: 8px;
    background: var(--warn);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 6px;
    box-shadow: 0 0 0 2px #fafafa;
    animation: pulse-pending-dot 2s infinite;
}
.tab-pending-dot.visible {
    display: block;
}

@keyframes pulse-pending-dot {
    0%, 100% { box-shadow: 0 0 0 2px #fafafa; }
    50% { box-shadow: 0 0 0 2px #fafafa, 0 0 0 5px rgba(245, 158, 11, 0.2); }
}

/* ═══════════════════════════════════════
   TRACKING TAB: Summary Stats
   ═══════════════════════════════════════ */
.tracking-summary-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    justify-content: flex-start;
}

.summary-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
}

/* ═══ Sub-Tabs (innerhalb Tracking + Bilder) ═══ */
.subtab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0;
}
.subtab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.15s, background 0.15s;
    letter-spacing: 0.01em;
}
.subtab-btn:hover { color: var(--text-primary); background: var(--bg-subtle); border-radius: 6px 6px 0 0; }
.subtab-btn.subtab-active {
    color: var(--pw-orange);
    border-bottom-color: var(--pw-orange);
    font-weight: 700;
}
.subtab-badge {
    background: #e5e3e0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
}
.subtab-badge-warn {
    background: var(--warn-bg);
    color: var(--warn);
}
.subtab-badge-ok {
    background: var(--success-bg);
    color: var(--success);
}
.subtab-panel {
    min-height: 60px;
}


.bulk-url-panel {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}
.bulk-url-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border-default);
}
.bulk-url-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.bulk-url-warn-badge {
    background: var(--warn-bg);
    border: 1px solid var(--pw-orange);
    color: var(--warn);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}
.bulk-url-header-actions {
    display: flex;
    gap: 8px;
}
.btn-bulk-url-apply {
    background: var(--pw-orange);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn-bulk-url-apply:hover { background: var(--pw-orange-hover); }
.btn-bulk-url-toggle {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.btn-bulk-url-toggle:hover { background: var(--bg-inset); }

/* Suchen & Ersetzen Zeile */
.bulk-url-find-replace {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-default);
    background: var(--pw-orange-light);
    flex-wrap: wrap;
}
.bulk-url-fr-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.bulk-url-fr-input {
    flex: 1;
    min-width: 120px;
    border: 1px solid var(--border-default);
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 12px;
    color: var(--text-primary);
}
.bulk-url-fr-input:focus { outline: none; border-color: var(--pw-orange); }
.bulk-url-fr-arrow {
    font-size: 14px;
    color: var(--text-faint);
}
.btn-bulk-fr {
    background: var(--bg-inset);
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-primary);
    white-space: nowrap;
}
.btn-bulk-fr:hover { background: #ddd8d0; }

/* Tabelle */
.bulk-url-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}
.bulk-url-table thead tr {
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border-default);
}
.bulk-url-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bulk-url-row {
    border-bottom: 1px solid var(--border-light);
}
.bulk-url-row:last-child { border-bottom: none; }
.bulk-url-row:hover { background: var(--bg-subtle); }
.bulk-url-row-warn { background: #fffbf0; }
.bulk-url-row-warn:hover { background: #fff8e8; }
.bulk-url-col-id { width: 38px; padding: 7px 6px; text-align: center; }
.btn-bulk-locate {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.btn-bulk-locate:hover { opacity: 1; background: var(--bg-inset); }
.bulk-url-col-type { width: 52px; padding: 7px 6px; }
.bulk-url-col-text { width: 18%; padding: 7px 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.bulk-url-col-url { padding: 7px 10px; overflow: hidden; word-break: break-all; }
.bulk-url-col-actions { width: 62px; padding: 7px 6px; text-align: center; white-space: nowrap; }
.btn-bulk-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 3px;
    border-radius: 4px;
    opacity: 0.55;
    transition: opacity 0.15s, background 0.15s;
    display: inline-block;
}
.btn-bulk-icon:hover { opacity: 1; background: var(--bg-inset); }
.btn-bulk-apply-row {
    flex-shrink: 0;
    background: var(--pw-orange);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-bulk-apply-row:hover { background: var(--pw-orange-hover); }
.bulk-url-current {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    word-break: break-all;
    cursor: text;
}
.bulk-url-empty-hint {
    color: var(--warn);
    font-weight: 600;
}
.bulk-url-input {
    width: 100%;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-card);
    box-sizing: border-box;
    min-width: 0;
    flex: 1;
}
.bulk-url-input:focus { outline: none; border-color: var(--pw-orange); }
.bulk-url-input-changed {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

.summary-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
}

.summary-stat.stat-links {
    background: var(--info-bg);
    border: 1px solid var(--info);
}
.summary-stat.stat-pixel {
    background: var(--warn-bg);
    border: 1px solid var(--pw-orange-border);
}
.summary-stat.stat-untracked {
    background: var(--error-bg);
    border: 1px solid var(--error);
}

.summary-stat-value {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.stat-links .summary-stat-value { color: var(--info); }
.stat-pixel .summary-stat-value { color: var(--warn); }
.stat-untracked .summary-stat-value { color: var(--error); }

.summary-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════
   SECTION DIVIDERS (Tracking & Images)
   ═══════════════════════════════════════ */
.section-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 14px 0;
}
.section-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-default);
}
.section-divider-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════
   LINK CARDS (Tracking Tab)
   ═══════════════════════════════════════ */
.link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.link-card:hover {
    border-color: var(--info);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.link-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.link-card-id {
    background: var(--info);
    color: white;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.3px;
}

.link-card-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}
.link-type-cta { background: var(--success-bg); color: var(--success); }
.link-type-image { background: var(--warn-bg); color: var(--warn); }
.link-type-text { background: var(--info-bg); color: var(--info); }
.link-type-social { background: #fae8ff; color: #86198f; }
.link-type-other { background: var(--bg-inset); color: var(--text-muted); }

.link-card-status {
    margin-left: auto;
    font-size: 14px;
}

.link-card-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.link-card-url {
    font-size: 11px;
    color: var(--text-faint);
    word-break: break-all;
    background: var(--bg-inset);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    line-height: 1.4;
}

.link-card-meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.meta-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-inset);
    color: var(--text-muted);
    font-weight: 500;
}
.meta-chip.has-utm { background: var(--success-bg); color: var(--success); }
.meta-chip.no-utm { background: var(--error-bg); color: var(--error); }

.link-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    align-items: center;
}

.link-card-edit-row {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
    align-items: center;
    margin-top: 8px;
}
.link-card-edit-row input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    font-size: 12px;
    min-width: 0;
}
.link-card-edit-row input:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.btn-card-action {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-card-action:hover {
    border-color: var(--info);
    color: var(--info);
    background: var(--info-bg);
}
.btn-card-action.action-primary {
    background: var(--info);
    color: white;
    border-color: var(--info);
}
.btn-card-action.action-primary:hover {
    background: var(--info);
}
.btn-card-action.btn-tracking-unlink {
    color: var(--error);
    border-color: var(--error);
}
.btn-card-action.btn-tracking-unlink:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

/* Warning-Hervorhebung für leere/kaputte Links */
.link-card-warning {
    border: 2px solid var(--error) !important;
    background: var(--error-bg) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.link-card-warning-badge {
    background: var(--error);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}
.link-card-url-empty {
    color: var(--error) !important;
    font-weight: 600;
    font-style: normal;
    font-size: 12px;
    padding: 6px 10px;
    background: var(--error-bg);
    border-radius: 4px;
    border-left: 3px solid var(--error);
}

/* ═══════════════════════════════════════
   IMAGE CARDS (Images Tab – NEU)
   ═══════════════════════════════════════ */
.image-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.image-card-new:hover {
    border-color: var(--pw-orange);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}

.image-card-new-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.image-card-new-id {
    background: var(--warn);
    color: white;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.image-card-new-dims {
    font-size: 11px;
    color: var(--text-faint);
    font-family: monospace;
}

.image-card-new-src {
    font-size: 11px;
    color: var(--text-faint);
    word-break: break-all;
    background: var(--bg-inset);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    margin-bottom: 6px;
}

.image-card-new-alt {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.image-card-new-alt .alt-label {
    font-weight: 600;
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-card-new-props {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.prop-chip {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.prop-chip.prop-size {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info);
}
.prop-chip.prop-align {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}
.prop-chip.prop-padding-ok {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}
.prop-chip.prop-padding-warn {
    background: #fff7ed;
    color: var(--warn);
    border: 1px solid #fed7aa;
}

/* Tracking pixel special card */
.image-card-new.is-pixel {
    border-left: 3px solid var(--pw-orange);
}
.image-card-new.is-pixel .image-card-new-id {
    background: var(--warn);
}

/* ── Alt-Text Inline Edit ── */
.image-alt-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.image-alt-edit-row .alt-label {
    font-weight: 600;
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.image-alt-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--border-default);
    border-radius: 5px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-subtle);
    min-width: 0;
    transition: border-color 0.2s;
}

.image-alt-input:focus {
    outline: none;
    border-color: var(--warn);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.1);
}

/* Warnzustand: Alt fehlt */
.image-alt-input.alt-input-warn {
    border-color: var(--warn);
    background: var(--warn-bg);
}

.image-alt-input.alt-input-warn::placeholder {
    color: var(--warn);
    font-weight: 500;
}

.image-alt-edit-row.alt-missing {
    padding: 4px 0;
}

/* ── Alt-Text Vorschlag ── */
.alt-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    margin-bottom: 6px;
    background: var(--warn-bg);
    border: 1px solid var(--pw-orange-border);
    border-radius: 6px;
    font-size: 11px;
    color: var(--warn);
}

.alt-suggestion.alt-suggestion-ok {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

.alt-suggestion-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alt-suggestion-text strong {
    color: var(--warn);
}

.btn-alt-suggestion-apply {
    flex-shrink: 0;
    padding: 3px 10px;
    border: 1px solid var(--warn);
    background: var(--bg-card);
    color: var(--warn);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-alt-suggestion-apply:hover {
    background: var(--warn);
    color: white;
}

.btn-image-alt-apply {
    flex-shrink: 0;
}

/* Alt-Text Bulk-Panel */
.alt-bulk-panel {
    background: var(--pw-orange-light);
    border: 1px solid var(--pw-orange);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.alt-bulk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--pw-orange-light);
    border-bottom: 1px solid var(--pw-orange-border);
}

.alt-bulk-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.btn-alt-bulk-apply {
    background: var(--pw-orange) !important;
    color: white !important;
    border: none;
    padding: 5px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-alt-bulk-apply:hover {
    background: var(--pw-orange-hover) !important;
}

.alt-bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.alt-bulk-table thead tr {
    background: #fdf5e6;
    border-bottom: 1px solid var(--pw-orange-border);
}

.alt-bulk-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alt-bulk-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
}

.alt-bulk-table tbody tr:last-child {
    border-bottom: none;
}

.alt-bulk-table tbody tr:hover {
    background: var(--pw-orange-light);
}

.alt-bulk-col-check {
    width: 32px;
    padding: 6px 10px;
    text-align: center;
}

.alt-bulk-col-locate {
    width: 36px;
    padding: 6px 6px;
    text-align: center;
}

.alt-bulk-col-src {
    width: 30%;
    padding: 6px 10px;
    color: var(--text-faint);
    font-size: 11px;
    word-break: break-all;
}

.alt-bulk-col-alt {
    padding: 6px 10px;
}

.alt-bulk-col-status {
    width: 90px;
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
}

.alt-status-ok {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
}

.alt-status-warn {
    font-size: 11px;
    color: var(--warn);
    font-weight: 600;
}

.alt-status-missing {
    font-size: 11px;
    color: var(--error);
    font-weight: 600;
}

.alt-bulk-input {
    width: 100%;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.alt-bulk-input:focus {
    outline: none;
    border-color: var(--pw-orange);
}

/* Zeile mit Vorschlag: leicht hervorgehoben */
.alt-bulk-has-suggestion .alt-bulk-input {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

/* Kleiner Hinweis-Text in der Überschrift */
.alt-bulk-hint {
    font-weight: 400;
    color: var(--text-faint);
    font-size: 12px;
}

/* 2-Column Layout */
.inspector-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0;
}

.inspector-left,
.inspector-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 24px;
    position: relative;
}

.inspector-left {
    border-right: 1px solid var(--border-light);
}

.inspector-left h3,
.inspector-right h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pw-orange);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Panel Content */
.inspector-panel {
    display: none;
}

.inspector-panel.active {
    display: block;
}

.panel-content {
    background: var(--bg-subtle);
    padding: 20px;
    border-radius: var(--radius-sm);
    min-height: 400px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

/* Preview */
.preview-container {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    height: calc(100vh - 280px);
    min-height: 400px;
    overflow: hidden;
}

.inspector-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer Buttons */
.inspector-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-light);
    align-items: center;
}

.btn-footer-left,
.btn-footer-right {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-footer-left {
    background: var(--pw-orange);
    color: white;
}

.btn-footer-left:hover {
    background: var(--pw-orange-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-footer-right {
    background: var(--success);
    color: white;
}

.btn-footer-right:hover:not(:disabled) {
    background: var(--success);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-footer-right:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===========================
   MODALS (Diff, Tag-Review)
   =========================== */
.diff-modal,
.tag-review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    overflow: auto;
}

.diff-modal-content,
.tag-review-modal-content {
    background: var(--bg-card);
    margin: 50px auto;
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.diff-modal-header,
.tag-review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pw-orange);
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.close-modal:hover {
    color: var(--pw-orange);
}

.diff-info {
    background: var(--info-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.diff-pending-hint {
    background: var(--warn-bg);
    padding: 12px;
    border-left: 4px solid var(--pw-orange);
    margin-bottom: 20px;
    font-size: 14px;
}

.diff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.diff-pane h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.diff-code {
    background: var(--bg-inset);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 500px;
    overflow-y: auto;
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */
.inspector-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-primary);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 14px;
    font-family: var(--font);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
}

.inspector-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* ===========================
   TAG-REVIEW TAB (Inspector)
   =========================== */

.tagreview-tab-content {
    padding: 8px 0;
}

/* --- Zusammenfassung (Status-Bar) --- */
.tagreview-summary {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
}

.tagreview-summary.summary-ok {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-color: #a5d6a7;
}

.tagreview-summary.summary-warn {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-color: #ffcc80;
}

.tagreview-summary.summary-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-color: #90caf9;
}

.tagreview-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tagreview-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.chip-high {
    background: var(--success-bg);
    color: var(--success);
}

.chip-medium {
    background: var(--warn-bg);
    color: var(--warn);
}

.chip-low {
    background: var(--error-bg);
    color: var(--error);
}

.chip-excess {
    background: var(--error-bg);
    color: var(--error);
}

.chip-unclosed {
    background: var(--warn-bg);
    color: #f57f17;
}

/* --- Sektionen --- */
.tagreview-section {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-default);
}

.tagreview-section-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.tagreview-empty {
    color: #66bb6a;
    font-style: italic;
    padding: 6px 0;
    margin: 0;
    font-size: 13px;
}

/* --- Fix Items (Auto-Fixes) --- */
.tagreview-fixes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tagreview-fix-item {
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 12px;
    background: var(--bg-subtle);
    cursor: pointer;
    transition: all 0.2s;
}

.tagreview-fix-item:hover {
    border-color: var(--pw-orange);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tagreview-fix-item.active {
    border-color: var(--pw-orange);
    box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.2);
}

/* Konfidenz-farbige Seitenleiste */
.tagreview-fix-item.conf-high {
    border-left: 4px solid var(--success);
}

.tagreview-fix-item.conf-medium {
    border-left: 4px solid var(--pw-orange);
}

.tagreview-fix-item.conf-low {
    border-left: 4px solid var(--error);
}

.tagreview-fix-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tagreview-fix-id {
    background: var(--pw-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
}

.tagreview-fix-tag {
    background: var(--info-bg);
    color: var(--info);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    font-weight: 600;
}

.tagreview-conf-badge {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.tagreview-conf-badge.conf-high {
    background: var(--success-bg);
    color: var(--success);
}

.tagreview-conf-badge.conf-medium {
    background: var(--warn-bg);
    color: var(--warn);
}

.tagreview-conf-badge.conf-low {
    background: var(--error-bg);
    color: var(--error);
}

.tagreview-fix-details {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

.tagreview-detail-label {
    font-weight: 600;
    color: var(--text-primary);
}

.tagreview-fix-snippet {
    margin-bottom: 10px;
}

.tagreview-fix-snippet pre {
    background: #263238;
    color: #cfd8dc;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
}

.tagreview-fix-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-tagreview-undo,
.btn-tagreview-remove {
    padding: 6px 14px;
    background: var(--bg-card);
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-tagreview-undo:hover,
.btn-tagreview-remove:hover {
    background: var(--error);
    color: white;
}

.btn-tagreview-keep {
    padding: 6px 14px;
    background: var(--bg-card);
    color: var(--success);
    border: 1px solid var(--success);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-tagreview-keep:hover {
    background: var(--success);
    color: white;
}

.btn-tagreview-ignore,
.btn-tagreview-manual-close {
    padding: 6px 14px;
    background: var(--bg-card);
    color: #757575;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-tagreview-ignore:hover {
    background: var(--bg-inset);
    color: var(--text-secondary);
}

.btn-tagreview-manual-close {
    color: var(--info);
    border-color: var(--info);
}

.btn-tagreview-manual-close:hover {
    background: var(--info);
    color: white;
}

.btn-tagreview-undo:disabled,
.btn-tagreview-keep:disabled,
.btn-tagreview-remove:disabled,
.btn-tagreview-ignore:disabled,
.btn-tagreview-manual-close:disabled,
.btn-tagreview-locate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-tagreview-locate {
    padding: 6px 14px;
    background: var(--bg-card);
    color: var(--info);
    border: 1px solid var(--info);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-tagreview-locate:hover {
    background: var(--info);
    color: white;
}

/* --- Probleme (Offene Issues) --- */
.tagreview-problems-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tagreview-problem-item {
    border: 1px solid var(--error);
    border-left: 4px solid var(--error);
    border-radius: 8px;
    padding: 12px;
    background: var(--error-bg);
    transition: all 0.2s;
}

.tagreview-problem-item.active {
    border-color: var(--error);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.15);
}

.tagreview-problem-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tagreview-problem-id {
    background: var(--error);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
}

.tagreview-problem-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--error);
}

.tagreview-problem-details {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* --- Status Labels (nach Aktion) --- */
.tagreview-status-label {
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
    white-space: nowrap;
}

.tagreview-undone-label { color: var(--error); }
.tagreview-accepted-label { color: var(--success); }
.tagreview-removed-label { color: var(--error); }
.tagreview-ignored-label { color: #9e9e9e; }

/* --- Manuelle Aktionen Log --- */
.tagreview-actions-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tagreview-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-inset);
    border-radius: 4px;
    font-size: 12px;
}

.tagreview-action-number {
    background: var(--border-default);
    color: var(--text-secondary);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 10px;
    font-weight: 700;
}

.tagreview-action-text {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 11px;
}
/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1200px) {
    .inspector-layout {
        grid-template-columns: 1fr;
    }
    .inspector-left {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .diff-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .control-panel {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .control-inline {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .inspector-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-footer-left,
    .btn-footer-right {
        width: 100%;
    }
}

/* ===========================
   LEGACY COMPATIBILITY STYLES
   (für alte app.js Selektoren)
   =========================== */
.tracking-item,
.image-item,
.tag-item,
.editor-block-item {
    background: var(--bg-card);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
}

.tracking-item:hover,
.image-item:hover,
.tag-item:hover,
.editor-block-item:hover {
    border-color: var(--pw-orange);
    box-shadow: 0 2px 8px rgba(242, 169, 59, 0.2);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-label {
    font-weight: 600;
    color: var(--text-primary);
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-item-action {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-locate {
    background: var(--info);
    color: white;
}

.btn-locate:hover {
    background: var(--info);
}

.btn-delete {
    background: var(--error);
    color: white;
}

.btn-delete:hover {
    background: var(--error);
}

.btn-undo {
    background: var(--pw-orange);
    color: white;
}

.btn-undo:hover {
    background: var(--pw-orange-hover);
}

.btn-keep {
    background: var(--success);
    color: white;
}

.btn-keep:hover {
    background: var(--success);
}

.code-preview {
    background: var(--bg-inset);
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
    margin-top: 10px;
}

.edit-mode-banner {
    background: var(--warn-bg);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid var(--pw-orange);
    font-weight: 600;
}

.commit-bar {
    background: var(--info-bg);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-commit {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-commit:hover {
    background: var(--success);
}

.btn-cancel {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #555;
}

/* Highlight für Click-to-Locate */
.qa-highlight {
    outline: 3px solid var(--pw-orange) !important;
    outline-offset: 2px;
    background: rgba(242, 169, 59, 0.1) !important;
}

/* ===========================
   PHASE 2: EDITOR PANELS
   =========================== */

/* Platzhalter Panel */
.editor-placeholder-panel {
    background: var(--bg-subtle);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.editor-placeholder-panel h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.editor-placeholder-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.editor-placeholder-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Link Editor Panel */
.editor-link-panel {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.editor-link-panel h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--info);
}

.editor-link-panel label {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.editor-link-panel input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.editor-link-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Image Editor Panel */
.editor-image-panel {
    background: var(--warn-bg);
    border: 1px solid var(--pw-orange-border);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.editor-image-panel h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--warn);
}

.editor-image-panel label {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.editor-image-panel input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--pw-orange-border);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.editor-image-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Action Buttons */
.btn-editor-action {
    padding: 8px 12px;
    background: var(--info);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-editor-action:hover:not(:disabled) {
    background: var(--info);
}

.btn-editor-action:disabled {
    background: var(--border-default);
    cursor: not-allowed;
}

/* ── Neue visuelle Editor-UI (kein Quellcode) ───────────────────── */

.editor-hint-idle {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.editor-selection-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0;
}

.editor-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pw-orange-hover);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

.editor-preview-text {
    background: var(--bg-subtle);
    border-left: 3px solid var(--pw-orange-hover);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
}

.editor-action-group {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 14px;
}

.editor-action-group h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.editor-action-danger-zone {
    border-color: var(--error-bg);
    background: #fff8f8;
}

.editor-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.editor-input:focus {
    outline: none;
    border-color: var(--pw-orange);
    box-shadow: 0 0 0 2px rgba(108,52,131,0.15);
}

.editor-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn-editor-primary {
    padding: 8px 16px;
    background: var(--pw-orange-hover);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-editor-primary:hover { background: #512c62; }

.btn-editor-secondary {
    padding: 8px 14px;
    background: var(--bg-inset);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-editor-secondary:hover { background: var(--border-default); }

.btn-editor-danger {
    padding: 8px 16px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-editor-danger:hover { background: var(--error); }

.btn-editor-commit {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}
.btn-editor-commit:hover { background: var(--success); }

.editor-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.editor-saved-badge {
    text-align: center;
    color: var(--success);
    font-size: 13px;
    padding: 8px;
}

/* ===========================
   BUTTONS TAB (VML/CTA)
   =========================== */

.buttons-legend {
    background: #f0f4f8;
    border: 1px solid #d0d9e3;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.8;
}

.buttons-legend strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-primary);
}

.buttons-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.buttons-legend-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.buttons-legend-text {
    color: var(--text-secondary);
}

.buttons-tab-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.buttons-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.button-item {
    background: var(--bg-card);
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
}

.button-item:hover {
    border-color: var(--pw-orange);
    box-shadow: 0 2px 8px rgba(242, 169, 59, 0.2);
}

.button-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.button-item-id {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-inset);
    padding: 2px 10px;
    border-radius: 12px;
}

.button-status {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.button-status-ok { color: var(--success); }
.button-status-warn { color: #f39c12; }
.button-status-missing { color: var(--error); }

.button-text-preview-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 10px;
    position: relative;
}

.button-text-preview {
    background: var(--bg-subtle);
    border-left: 3px solid var(--pw-orange);
    padding: 8px 12px;
    border-radius: 0 0 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    flex: 1;
    min-height: 20px;
}

.button-text-input {
    flex: 1;
    background: var(--bg-card);
    border: 2px solid var(--pw-orange);
    border-left: 3px solid var(--pw-orange);
    padding: 7px 11px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    min-height: 20px;
}

.button-text-input:focus {
    border-color: #e08e1b;
    background: #fffdf5;
}

.btn-edit-text {
    background: var(--bg-subtle);
    border: none;
    border-left: 1px solid var(--border-default);
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0 6px 6px 0;
    transition: background 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.btn-edit-text:hover {
    background: #e8e8e8;
}

.button-link-display {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    word-break: break-all;
}

.button-link-display code {
    background: var(--bg-inset);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.button-edit-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.button-edit-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.button-edit-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.button-edit-group input[type="text"],
.button-edit-group input[type="number"] {
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
}

.button-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button-color-input {
    width: 36px;
    height: 30px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
}

.button-color-hex {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

.button-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.btn-button-apply {
    padding: 8px 16px;
    background: var(--pw-orange);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-button-apply:hover { background: var(--pw-orange-hover); }

.btn-button-locate {
    padding: 8px 16px;
    background: var(--info);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-button-locate:hover { background: var(--info); }

.btn-button-rebuild {
    padding: 8px 16px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-button-rebuild:hover { background: var(--error); }

.buttons-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-faint);
    font-size: 14px;
}

.buttons-undo-section,
.buttons-commit-section {
    margin-top: 10px;
}

.btn-buttons-undo {
    padding: 8px 16px;
    background: var(--pw-orange);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.btn-buttons-undo:hover { background: var(--pw-orange-hover); }

.btn-buttons-commit {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}
.btn-buttons-commit:hover { background: var(--success); }

.buttons-commit-hint {
    font-size: 12px;
    color: #e67e22;
    margin-top: 6px;
}

.button-vml-info {
    font-size: 11px;
    color: var(--text-faint);
    background: var(--bg-subtle);
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 6px;
}

.button-bgimage-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: var(--warn-bg);
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.button-bgimage-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.button-bgimage-text {
    font-size: 11px;
    color: #6d4c00;
    line-height: 1.5;
}

.button-bgimage-text code {
    font-size: 10px;
    color: var(--text-faint);
    word-break: break-all;
}

/* Image Layout Controls (Breite + Ausrichtung) */

.button-gmail-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(244, 67, 54, 0.06);
    border: 1px solid var(--error);
    border-radius: 6px;
    margin-top: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.button-gmail-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.button-gmail-text {
    font-size: 11px;
    color: var(--error);
    line-height: 1.5;
    flex: 1;
}

.button-gmail-text code {
    font-size: 10px;
    background: rgba(0,0,0,0.06);
    padding: 1px 4px;
    border-radius: 3px;
}

.btn-gmail-fix {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--error);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--error);
    transition: all 0.15s;
    align-self: center;
    white-space: nowrap;
}

.btn-gmail-fix:hover {
    background: #c62828;
    color: var(--bg-card);
    border-color: var(--error);
}

.image-layout-controls {
    display: flex;
    gap: 16px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.image-layout-group {
    flex: 1;
    min-width: 120px;
}

.image-layout-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.image-width-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-width-input {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
}

.image-width-unit {
    font-size: 11px;
    color: var(--text-faint);
}

.image-align-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-small {
    padding: 4px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    background: var(--bg-inset);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.btn-small:hover {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

.btn-small.active {
    background: var(--pw-orange);
    border-color: #e09520;
    color: white;
}

.image-align-source {
    font-size: 10px;
    color: var(--text-faint);
    margin-left: 4px;
}

.image-dimension-info {
    font-size: 10px;
    color: var(--text-faint);
    margin-top: 2px;
}

/* Image Container Padding Controls */
.image-padding-controls {
    margin: 6px 0;
    padding: 8px 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 6px;
}

.image-padding-controls.padding-asymmetric {
    background: var(--pw-orange-light);
    border-color: var(--pw-orange);
}

.image-padding-controls > label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.image-padding-source {
    font-weight: 400;
    color: var(--text-faint);
}

.image-padding-warn {
    font-size: 11px;
    color: #c87800;
    margin-bottom: 4px;
}

.image-padding-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.image-padding-field {
    display: flex;
    align-items: center;
    gap: 2px;
}

.image-padding-field span {
    font-size: 11px;
    color: var(--text-faint);
    width: 12px;
    text-align: center;
}

.image-padding-input {
    width: 48px;
    padding: 3px 4px;
    border: 1px solid var(--border-default);
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
}

/* Image Upload Section */
.images-upload-section {
    border: 2px solid #4caf82;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    background: #f0faf4;
}

.images-upload-section h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
    border-bottom: 1px solid #b7e4c7;
    padding-bottom: 8px;
}

.images-upload-hint {
    font-size: 12px;
    color: #3a7a50;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.image-drop-zone {
    border: 2px dashed #4caf82;
    border-radius: 10px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.image-drop-zone:hover,
.image-drop-zone.dragover {
    border-color: var(--success);
    background: #e8f5ed;
    box-shadow: 0 0 10px rgba(76, 175, 130, 0.25);
}

.image-drop-zone.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #b7e4c7;
    background: var(--bg-inset);
}

.image-drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    text-align: center;
}

.image-drop-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

.image-drop-main {
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.image-drop-sub {
    font-size: 12px;
    font-weight: 400;
    color: #57a572;
    text-decoration: underline;
}

.images-folder-browse-section {
    margin-bottom: 16px;
}

.btn-folder-browse {
    background: #f0f6ff;
    border: 1px solid #bdd7f5;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1a56a0;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-folder-browse:hover { background: #dbeafe; }

.upload-status {
    margin-bottom: 8px;
    font-size: 13px;
}

.upload-status-ok { color: var(--success); }
.upload-status-err { color: var(--error); }
.upload-status-uploading { color: var(--pw-orange); }

.upload-status-help {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
}

.upload-status-help code {
    background: var(--bg-inset);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
}

.upload-status-connected {
    padding: 4px 0;
}

.upload-status-error {
    background: var(--error-bg);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #fdd;
}

.upload-dropzone {
    border: 2px dashed var(--border-default);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    margin-bottom: 8px;
}

.upload-dropzone:hover {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

.upload-dropzone.dragover {
    border-color: var(--pw-orange);
    background: #fff3d6;
    box-shadow: 0 0 8px rgba(242, 169, 59, 0.3);
}

.upload-dropzone.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-inset);
}

.upload-dropzone.disabled:hover {
    border-color: var(--text-faint);
    background: var(--bg-inset);
}

.upload-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.upload-dropzone-icon {
    font-size: 28px;
}

.upload-browse-link {
    color: var(--pw-orange);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.upload-options {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}

.upload-options label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
}

.upload-folder-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    max-width: 200px;
}

/* Upload Results */
.upload-result-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin-top: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 6px;
}

.upload-result-preview {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-inset);
}

.upload-result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-result-info {
    flex: 1;
    min-width: 0;
}

.upload-result-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.upload-result-url code {
    font-size: 10px;
    color: var(--text-faint);
    word-break: break-all;
}

.upload-result-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.upload-insert-select {
    padding: 3px 6px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 12px;
    max-width: 180px;
}

.upload-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    margin-top: 8px;
}

.btn-upload-clear {
    color: var(--text-faint);
    border-color: var(--border-default);
}

/* Folder Browser */
.upload-folder-browser {
    margin-top: 6px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-card);
    max-height: 350px;
    overflow-y: auto;
}

.folder-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

.folder-browser-loading,
.folder-browser-empty,
.folder-browser-error {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-faint);
}

.folder-browser-error {
    color: var(--error);
}

.folder-browser-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.folder-browser-item:hover {
    background: var(--pw-orange-light);
}

.folder-browser-item:last-child {
    border-bottom: none;
}

.folder-browser-item.folder-today {
    background: #f0faf0;
}

.folder-browser-item.folder-today:hover {
    background: #e0f5e0;
}

.folder-browser-name {
    font-weight: 500;
}

.folder-browser-date {
    font-size: 11px;
    color: var(--text-faint);
}

/* Folder Contents (Images in Folder) */
.folder-contents-list {
    padding: 4px;
}

.folder-content-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
}

.folder-content-item:last-child {
    border-bottom: none;
}

.folder-content-preview {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-inset);
}

.folder-content-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.folder-content-info {
    flex: 1;
    min-width: 0;
}

.folder-content-name {
    font-weight: 600;
    font-size: 13px;
}

.folder-content-size {
    font-weight: 400;
    color: var(--text-faint);
    font-size: 11px;
}

.folder-content-url code {
    font-size: 10px;
    color: var(--text-faint);
    word-break: break-all;
}

.folder-content-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-folder-back {
    color: var(--text-muted);
    border-color: var(--border-default);
}

/* Manuelle Button-Markierung */
.buttons-manual-section {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 0;
}

.buttons-manual-toggle {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.buttons-manual-toggle:hover {
    color: var(--text-primary);
}

.buttons-manual-list {
    padding: 0 16px 16px 16px;
}

.buttons-manual-hint {
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 12px;
    line-height: 1.5;
}

.button-unrecognized-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: 6px;
}

.button-unrecognized-item:hover {
    border-color: var(--pw-orange);
}

.button-unrecognized-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.button-unrecognized-text {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.button-unrecognized-href {
    font-size: 10px;
    color: var(--text-faint);
    background: var(--bg-inset);
    padding: 2px 6px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-mark-as-cta {
    padding: 6px 12px;
    background: var(--pw-orange-hover);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-mark-as-cta:hover { background: #512c62; }

.button-unrecognized-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-locate-link {
    padding: 6px 12px;
    background: var(--info);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-locate-link:hover { background: var(--info); }

/* ===== Placement Assistant (Platzierungs-Assistent) ===== */

.placement-section {
    margin-bottom: 24px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    overflow: hidden;
}

.placement-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border-default);
    font-weight: 600;
    font-size: 14px;
}

.placement-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.placement-status.found {
    background: var(--success-bg);
    color: var(--success);
}

.placement-status.missing {
    background: var(--error-bg);
    color: var(--error);
}

.placement-candidates {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.placement-candidate {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 2px solid var(--border-default);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
}

.placement-candidate:hover {
    border-color: #90caf9;
    background: #f5f9ff;
}

.placement-candidate.selected {
    border-color: var(--info);
    background: var(--info-bg);
}

.placement-candidate.current {
    border-color: var(--success);
    background: var(--success-bg);
}

.placement-candidate-radio {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--info);
}

.placement-candidate-info {
    flex: 1;
    min-width: 0;
}

.placement-candidate-label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.placement-candidate-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.placement-candidate-snippet {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: var(--bg-inset);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 6px 8px;
    color: var(--text-secondary);
    max-height: 60px;
    overflow: hidden;
    white-space: pre;
    text-overflow: ellipsis;
}

.placement-candidate-snippet .highlight-insert {
    background: var(--warn-bg);
    color: var(--warn);
    font-weight: 700;
}

.placement-apply-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-inset);
    border-top: 1px solid var(--border-default);
}

.btn-placement-apply {
    padding: 8px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-placement-apply:hover { background: #388e3c; }

.btn-placement-apply:disabled {
    background: var(--border-default);
    cursor: not-allowed;
}

.placement-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.placement-intro {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--warn-bg);
    border-bottom: 1px solid #ffe082;
    line-height: 1.5;
}

.placement-width-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-default);
}

.placement-width-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.placement-width-select {
    padding: 5px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-card);
    cursor: pointer;
}

.placement-width-custom {
    padding: 5px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 12px;
    width: 80px;
}

/* ===== CLIENT SIMULATOR ===== */
.preview-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pw-orange);
}

.preview-header-row h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 0;
    border-bottom: none;
    margin: 0;
}

.btn-download-top {
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-download-top:hover:not(:disabled) {
    background: var(--success);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-download-top:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    opacity: 0.6;
}

.tab-spacer {
    flex: 1;
}

.btn-download-tab {
    padding: 6px 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    margin-right: 8px;
    align-self: center;
}

.btn-download-tab:hover:not(:disabled) {
    background: #248a4e;
    box-shadow: var(--shadow-sm);
}

.btn-download-tab:disabled {
    background: var(--border-default);
    cursor: not-allowed;
    opacity: 0.5;
}

.preview-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.client-simulator-select {
    padding: 6px 12px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text-primary);
    min-width: 200px;
}

.client-simulator-select:hover {
    border-color: var(--pw-orange);
}

.client-simulator-select:focus {
    outline: none;
    border-color: var(--pw-orange);
    box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.2);
}

.sim-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sim-color-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.sim-color-select {
    padding: 3px 8px;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text-primary);
}

.sim-color-select:hover {
    border-color: var(--pw-orange);
}

.sim-color-select:focus {
    outline: none;
    border-color: var(--pw-orange);
    box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.2);
}

.client-sim-hint {
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    margin-top: -8px;
}

.client-sim-hint.hint-info {
    background: var(--warn-bg);
    border: 1px solid var(--pw-orange);
    color: #856404;
}

.client-sim-hint.hint-good {
    background: #d4edda;
    border: 1px solid var(--success);
    color: var(--success);
}

/* Mobile Simulation: iframe schmaler + zentriert */
.preview-container.mobile-sim {
    display: flex;
    justify-content: center;
    background: var(--border-default);
}

.preview-container.mobile-sim .inspector-preview-frame {
    width: 375px;
    max-width: 375px;
    border-left: 2px solid var(--border-default);
    border-right: 2px solid var(--border-default);
    background: var(--bg-card);
}

/* === Auto-Fix Inspector: Angewendet vs. Vorgeschlagen === */
.autofix-applied {
    border-left: 4px solid var(--success) !important;
}

.autofix-suggested {
    border-left: 4px solid var(--pw-orange) !important;
    background-color: #fff8e1;
}

.btn-apply-autofix {
    background: var(--pw-orange);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-apply-autofix:hover {
    background: var(--pw-orange-hover);
}

.btn-apply-autofix:disabled {
    background: var(--border-default);
    cursor: not-allowed;
}

.btn-ignore-autofix {
    background: var(--border-default);
    color: var(--text-muted);
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-ignore-autofix:hover {
    background: var(--border-default);
}

.btn-ignore-autofix:disabled {
    background: var(--bg-inset);
    color: var(--text-faint);
    cursor: not-allowed;
}

/* Confidence-Badges (generisch, für Inspector-Anzeige) */
.problem-status.conf-high {
    background: var(--success) !important;
    color: white;
}

.problem-status.conf-medium {
    background: var(--pw-orange) !important;
    color: white;
}

.problem-status.conf-low {
    background: var(--error) !important;
    color: white;
}

.btn-undo-suggestion {
    background: #ef5350;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-undo-suggestion:hover {
    background: var(--error);
}

/* === Manuelles Platzieren === */
.manual-place-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--warn-bg);
    border: 2px solid var(--pw-orange);
    border-radius: 6px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.manual-place-tag {
    background: var(--pw-orange);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 700;
    font-size: 13px;
}

.manual-place-hint {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.btn-cancel-place {
    background: #666;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.btn-cancel-place:hover {
    background: #444;
}

.btn-manual-place {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-manual-place:hover {
    background: #5a6fd6;
}

.manual-place-code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 6px;
    padding: 8px 0;
}

.code-line {
    display: flex;
    cursor: pointer;
    padding: 1px 8px;
    transition: background 0.1s;
    border-left: 3px solid transparent;
}

.code-line:hover {
    background: #2d4a2d;
    border-left: 3px solid var(--pw-orange);
}

.code-line-suggested {
    background: #3a2d00 !important;
    border-left: 3px solid #ffeb3b !important;
}

.line-num {
    color: var(--text-muted);
    min-width: 45px;
    text-align: right;
    padding-right: 12px;
    user-select: none;
    border-right: 1px solid #333;
    margin-right: 12px;
}

.line-content {
    color: #d4d4d4;
    white-space: pre;
    overflow-x: auto;
}

/* Manual Place Overlay */
.manual-place-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.manual-place-overlay .manual-place-code {
    flex: 1;
    max-height: none;
    border-radius: 0;
}

/* === Results Bar === */
.results-bar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    padding: 16px 24px;
    animation: slideDown 0.3s ease-out;
    scroll-margin-top: 70px; /* Platz für sticky header */
}

/* Inspector section scroll offset */
.inspector-section {
    scroll-margin-top: 70px;
}

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

/* Status Badge (PASS / WARN / FAIL) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 24px;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.status-badge.pass {
    background: var(--success-bg);
    color: var(--success);
    border: 1.5px solid var(--success);
}
.status-badge.warn {
    background: var(--warn-bg);
    color: var(--warn);
    border: 1.5px solid var(--pw-orange-border);
}
.status-badge.fail {
    background: var(--error-bg);
    color: var(--error);
    border: 1.5px solid var(--error);
}

/* === Confidence Score === */
.confidence-wrapper {
    padding: 14px 20px;
}

.confidence-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.confidence-label {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
}

.confidence-bar {
    flex: 1;
    min-width: 140px;
    height: 8px;
    background: var(--bg-inset);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.confidence-attention {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.confidence-attention-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-faint);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: 100%;
}

.confidence-attention-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--pw-orange-light);
    border: 1px solid var(--pw-orange-border);
    border-radius: 14px;
    font-size: 11.5px;
    color: var(--warn);
    line-height: 1.4;
    transition: all 0.15s;
}

.confidence-attention-item-link {
    cursor: pointer;
}

.confidence-attention-item-link:hover {
    background: var(--pw-orange-border);
    border-color: var(--pw-orange);
}

/* === Neues Template Reset Button === */
.btn-reset {
    background: #78909c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-reset:hover {
    background: #607d8b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.upload-btn-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
/* ============================================
   EOA CLIENT-VORSCHAU STYLES
   ============================================
   Einfügen am Ende der style.css
*/

/* --- EOA Tab Spinner --- */
.eoa-tab-spinner {
    margin-left: 4px;
    animation: eoaSpin 1s linear infinite;
    display: inline-block;
    font-size: 12px;
}

@keyframes eoaSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- EOA Panel Layout --- */
.eoa-panel-wrapper {
    padding: 16px;
}

/* --- Client-Auswahl Bereich --- */
.eoa-client-selector {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.eoa-client-selector h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.eoa-client-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eoa-client-group {
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 10px;
}

.eoa-client-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.eoa-client-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.eoa-client-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.eoa-client-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.eoa-client-chip:hover {
    border-color: var(--pw-orange);
    background: var(--pw-orange-light);
}

.eoa-client-chip.selected {
    background: var(--pw-orange-light);
    border-color: var(--pw-orange);
    color: var(--warn);
    font-weight: 500;
}

.eoa-client-chip input[type="checkbox"] {
    display: none;
}

.eoa-client-chip .chip-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--text-faint);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.eoa-client-chip.selected .chip-check {
    background: var(--pw-orange);
    border-color: var(--pw-orange);
    color: var(--bg-card);
}

/* --- Buttons --- */
.eoa-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.eoa-btn-start {
    padding: 8px 20px;
    background: var(--pw-orange);
    color: var(--bg-card);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.eoa-btn-start:hover {
    background: var(--warn);
}

.eoa-btn-start:disabled {
    background: #d6d3d1;
    cursor: not-allowed;
}

.eoa-btn-select-all,
.eoa-btn-select-none {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.eoa-btn-select-all:hover,
.eoa-btn-select-none:hover {
    background: #f5f3f0;
    border-color: var(--text-faint);
}

/* --- Fortschrittsanzeige --- */
.eoa-progress {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.eoa-progress-bar-container {
    flex: 1;
    height: 6px;
    background: var(--border-default);
    border-radius: 3px;
    overflow: hidden;
}

.eoa-progress-bar {
    height: 100%;
    background: var(--pw-orange);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.eoa-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Screenshot-Galerie (Mosaik) --- */
.eoa-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.eoa-screenshot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    animation: eoaFadeIn 0.4s ease-out;
}

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

.eoa-screenshot-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.eoa-screenshot-header {
    padding: 10px 12px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eoa-screenshot-client-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.eoa-screenshot-client-info {
    font-size: 11px;
    color: var(--text-faint);
}

.eoa-screenshot-img-wrapper {
    position: relative;
    max-height: 400px;
    overflow: hidden;
    cursor: pointer;
}

.eoa-screenshot-img-wrapper img {
    width: 100%;
    display: block;
}

.eoa-screenshot-img-wrapper .eoa-expand-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(255,255,255,0.95));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    font-size: 11px;
    color: var(--text-muted);
    pointer-events: none;
}

/* --- Placeholder / Lade-Karte --- */
.eoa-screenshot-card.loading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.eoa-screenshot-card.loading .eoa-screenshot-img-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
    min-height: 150px;
}

.eoa-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-default);
    border-top-color: var(--pw-orange);
    border-radius: 50%;
    animation: eoaSpin 0.8s linear infinite;
}


/* --- Fehlgeschlagene Clients (Bounced) --- */
.eoa-screenshot-card.bounced {
    border-color: var(--error-bg);
    background: var(--error-bg);
}
.eoa-screenshot-card.bounced .eoa-screenshot-header {
    background: #ffebee;
    border-bottom-color: var(--error-bg);
}
.eoa-bounced-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--error-bg);
}
.eoa-bounced-message {
    text-align: center;
    padding: 20px;
    color: var(--error);
}

/* --- EOA Fix-Panel --- */
.eoa-fix-panel {
    border-top: 1px solid var(--border-default);
    background: var(--bg-subtle);
}
.eoa-fix-panel-toggle {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s;
}
.eoa-fix-panel-toggle:hover {
    background: var(--bg-subtle);
    color: #292524;
}
.eoa-fix-panel-toggle.eoa-fix-panel-toggle-open {
    color: var(--pw-orange);
    background: #fffbf5;
}
.eoa-fix-options {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-default);
}
.eoa-fix-group {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    overflow: hidden;
}
.eoa-fix-group-title {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-primary);
}
.eoa-fix-group-desc {
    padding: 6px 10px 4px;
    font-size: 11px;
    color: var(--text-muted);
}
.eoa-fix-btn-list {
    padding: 6px 10px 10px;
}
.eoa-fix-action-btn {
    padding: 5px 12px;
    background: var(--pw-orange);
    color: var(--bg-card);
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.eoa-fix-action-btn:hover { background: #e09528; }
.eoa-fix-item-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
}
.eoa-fix-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 5px 8px;
}
.eoa-fix-item-label {
    font-size: 11px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.eoa-fix-item-btn {
    flex-shrink: 0;
    padding: 3px 10px;
    background: #292524;
    color: var(--bg-card);
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}
.eoa-fix-item-btn:hover { background: var(--pw-orange); }
.eoa-fix-item-btn:disabled { background: var(--success); cursor: default; }
.eoa-fix-none {
    font-size: 11px;
    color: var(--success);
    display: block;
    padding: 4px 0;
}

/* Hinweis nach Fix: "Vorschau neu laden" */
.eoa-fix-rerun-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
}
.eoa-fix-rerun-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.eoa-fix-rerun-text {
    font-size: 11px;
    color: var(--success);
    line-height: 1.5;
    flex: 1;
}
.eoa-fix-rerun-text strong {
    display: block;
    margin-bottom: 2px;
}
.eoa-fix-rerun-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    background: var(--success);
    color: var(--bg-card);
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    align-self: center;
}
.eoa-fix-rerun-btn:hover { background: var(--success); }

/* --- Lightbox (Vollbild-Ansicht) --- */
.eoa-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.eoa-lightbox-header {
    color: var(--bg-card);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.eoa-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.eoa-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: var(--bg-card);
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.eoa-lightbox-close:hover {
    opacity: 1;
}

/* Navigation Pfeile in Lightbox */
.eoa-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bg-card);
    font-size: 36px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.eoa-lightbox-nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.eoa-lightbox-prev {
    left: 20px;
}

.eoa-lightbox-next {
    right: 20px;
}

/* --- Status-Meldungen --- */
.eoa-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.eoa-status-info {
    background: #e0f2fe;
    color: var(--info);
    border: 1px solid var(--info);
}

.eoa-status-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error);
}

.eoa-status-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

/* --- Server-Check Banner --- */
.eoa-server-banner {
    padding: 16px;
    text-align: center;
}

.eoa-server-offline {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 20px;
    color: var(--error);
}

.eoa-server-offline h4 {
    margin-bottom: 8px;
}

.eoa-server-offline p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0;
}

/* ===== Inspector Attention Chips Bar ===== */
.inspector-attention-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    background: var(--pw-orange-light);
    border-bottom: 1px solid var(--pw-orange-border);
}

.inspector-attention-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--pw-orange);
    border-radius: 20px;
    font-size: 12px;
    color: var(--warn);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.inspector-attention-chip:hover {
    background: var(--pw-orange-border);
    border-color: var(--pw-orange-hover);
}

.inspector-attention-chip .chip-arrow {
    font-size: 10px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════
   IMAGE CRAWLER
   ═══════════════════════════════════════════════ */

.images-crawler-section {
    border: 2px solid var(--warn);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    background: var(--warn-bg);
}

.images-crawler-hint {
    font-size: 12px;
    color: var(--warn);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.images-crawler-stats {
    font-size: 13px;
    font-weight: 600;
    color: var(--warn);
    margin-bottom: 10px;
}

.btn-image-crawler {
    display: inline-block;
    padding: 10px 24px;
    background: var(--warn);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-image-crawler:hover:not(:disabled) {
    background: var(--warn);
}

.btn-image-crawler:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-crawler-progress {
    margin-top: 12px;
}

.crawler-progress-bar {
    height: 6px;
    background: var(--pw-orange-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.crawler-progress-fill {
    height: 100%;
    background: var(--warn);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.crawler-progress-text {
    font-size: 12px;
    color: var(--warn);
}

.crawler-progress-hint {
    font-size: 11px;
    color: var(--warn);
    margin-top: 4px;
}

.image-crawler-results {
    margin-top: 12px;
}

.crawler-results-header {
    margin-bottom: 8px;
}

.crawler-results-header strong {
    color: var(--success);
    font-size: 13px;
}

.crawler-results-failed {
    color: var(--error);
    font-size: 12px;
}

.crawler-results-folder {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.crawler-results-folder code {
    background: var(--border-default);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

.crawler-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}

.crawler-results-table th {
    text-align: left;
    padding: 4px 8px;
    background: var(--warn-bg);
    font-weight: 600;
    color: var(--warn);
    border-bottom: 1px solid var(--pw-orange-border);
}

.crawler-results-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-default);
}

.crawler-url-cell code {
    font-size: 11px;
    color: var(--success);
    word-break: break-all;
}

.crawler-failed-section {
    margin-top: 8px;
    font-size: 12px;
    color: var(--error);
}

.crawler-failed-section ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.crawler-failed-section li {
    margin-bottom: 2px;
}

/* Crawler Sub-Tab Inhalt */
.images-crawler-content {
    padding: 4px 0;
}

.images-crawler-list {
    margin: 8px 0 12px;
    border: 1px solid var(--pw-orange-border);
    border-radius: 6px;
    padding: 6px 10px;
    background: var(--bg-card);
}

.crawler-list-item {
    display: flex;
    align-items: center;
    padding: 3px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-light);
}

.crawler-list-item:last-child {
    border-bottom: none;
}

.crawler-list-idx {
    width: 24px;
    font-weight: 600;
    color: var(--warn);
    flex-shrink: 0;
}

.crawler-list-url {
    color: var(--text-muted);
    word-break: break-all;
}

.images-crawler-actions {
    margin-top: 12px;
}

/* Crawler Erledigt-Status */
.crawler-status-done {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: 8px;
    margin-bottom: 12px;
}

.crawler-status-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.crawler-status-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.crawler-status-text code {
    background: var(--success-bg);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.crawler-status-failed {
    font-size: 12px;
    color: var(--error);
}

.btn-crawler-done {
    background: var(--success-bg) !important;
    color: var(--success) !important;
    cursor: default !important;
}

.folder-contents ul {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
}

.folder-contents li {
    padding: 3px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
}

.folder-contents li code {
    color: var(--success);
    word-break: break-all;
}

/* Crawler animierter Fortschrittsbalken */
.crawler-progress-animate {
    animation: crawlerProgress 2s ease-in-out infinite;
}

@keyframes crawlerProgress {
    0% { width: 20%; }
    50% { width: 80%; }
    100% { width: 20%; }
}
