/* ============================================
   CSS VARIABLES & THEME
   ============================================ */
:root {
    /* NRW-inspiriertes Farbschema */
    --primary-600: #005293;
    --primary-700: #003d6e;
    --primary-500: #0066b3;
    --primary-100: #e6f0f7;
    --primary-50: #f0f6fa;
    
    /* Akzentfarben */
    --accent-green: #2e7d32;
    --accent-green-light: #e8f5e9;
    --accent-orange: #e65100;
    --accent-orange-light: #fff3e0;
    --accent-red: #c62828;
    --accent-red-light: #ffebee;
    
    /* Grautöne */
    --gray-900: #1a1a2e;
    --gray-800: #2d2d44;
    --gray-700: #4a4a5e;
    --gray-600: #6b6b7b;
    --gray-500: #8e8e9a;
    --gray-400: #b0b0ba;
    --gray-300: #d1d1d8;
    --gray-200: #e8e8ec;
    --gray-100: #f4f4f6;
    --gray-50: #fafafb;
    --white: #ffffff;
    
    /* Status */
    --success: #2e7d32;
    --warning: #f57c00;
    --error: #c62828;
    --info: #0288d1;
    
    /* Info Palette */
    --info-50: #e1f5fe;
    --info-100: #b3e5fc;
    --info-300: #4fc3f7;
    --info-500: #03a9f4;
    --info-600: #039be5;
    --info-700: #0288d1;
    
    /* Schatten */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Typografie */
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    
    /* Site-Header/Footer */
    --color-site-header: #1e3a5f;
    --site-header-height: 70px;

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 280px;
    --preview-width: 400px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ============================================
   SITE HEADER & FOOTER (ki-schulwissen.de)
   ============================================ */

.site-header {
    position: relative;
    background-color: var(--color-site-header);
    height: var(--site-header-height);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 200;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

.main-nav ul {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.site-footer {
    background-color: var(--color-site-header);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

.site-footer p {
    margin-bottom: 0.25rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.footer-links a:not(:first-child)::before {
    content: "|";
    padding: 0 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover { color: var(--primary-700); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--primary-600);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

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

.btn-success:hover:not(:disabled) {
    background: #1b5e20;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 82, 147, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Icon Picker */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.icon-option {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-option:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.icon-option.selected {
    border-color: var(--primary-500);
    background: var(--primary-100);
    box-shadow: 0 0 0 2px rgba(0, 82, 147, 0.2);
}

/* Radio & Checkbox Cards */
.option-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-card:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.option-card.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    accent-color: var(--primary-600);
    cursor: pointer;
    order: -1;
}

.option-card-content {
    flex: 1;
}

.option-card-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.option-card-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.option-card-icon {
    font-size: 1.75rem;
    line-height: 1;
}

/* Checkbox List */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-item:hover {
    background: var(--gray-50);
}

.checkbox-item.checked {
    background: var(--accent-green-light);
    border-color: var(--accent-green);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-green);
}

/* ============================================
   LAYOUT: APP STRUCTURE
   ============================================ */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.app-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    padding: 0 1.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
    font-size: 1.125rem;
}

.header-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.version-badge {
    font-size: 0.625rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    margin-left: -0.25rem;
}

#undo-btn:disabled,
#redo-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#undo-btn,
#redo-btn {
    font-size: 1rem;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

#undo-btn:not(:disabled):hover,
#redo-btn:not(:disabled):hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.undo-redo-group {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.undo-redo-group .btn {
    border-radius: 50%;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Stepper Navigation */
.stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stepper-item:hover:not(.disabled) {
    background: var(--gray-100);
    color: var(--gray-700);
}

.stepper-item.active {
    background: var(--primary-100);
    color: var(--primary-700);
}

.stepper-item.completed {
    color: var(--accent-green);
}

.stepper-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stepper-number {
    width: 24px;
    height: 24px;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.stepper-item.active .stepper-number {
    background: var(--primary-600);
    color: var(--white);
}

.stepper-item.completed .stepper-number {
    background: var(--accent-green);
    color: var(--white);
}

.stepper-divider {
    width: 32px;
    height: 2px;
    background: var(--gray-300);
    border-radius: 1px;
}

.stepper-item.completed + .stepper-divider {
    background: var(--accent-green);
}

/* Main Content */
.app-main {
    margin-top: calc(var(--site-header-height) + var(--header-height));
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--site-header-height) - var(--header-height));
    overflow: hidden;
}

/* Views */
.view {
    display: none;
    flex: 1;
    min-height: 0;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* ============================================
   VIEW 1: WELCOME
   ============================================ */
.welcome-view {
    background: linear-gradient(160deg, var(--gray-50) 0%, var(--primary-50) 50%, var(--gray-100) 100%);
    padding: 3rem 1.5rem;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
}

.welcome-container {
    max-width: 900px;
    width: 100%;
}

.welcome-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-title span {
    color: var(--primary-600);
}

.welcome-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 600px) {
    .welcome-cards {
        grid-template-columns: 1fr;
    }
}

.welcome-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.welcome-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.welcome-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
}

.welcome-cta {
    text-align: center;
}

.welcome-info {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--accent-orange-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent-orange);
}

.welcome-info h4 {
    color: var(--accent-orange);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-info p {
    font-size: 0.9375rem;
    color: var(--gray-700);
    margin: 0;
}

/* ============================================
/* ============================================
   VIEW 2: CONFIGURATION
   ============================================ */
.config-view {
    padding: 2rem 1.5rem;
    align-items: center;
    overflow-y: auto;
}

.config-container {
    max-width: 800px;
    width: 100%;
}

.config-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.config-header h1 {
    margin-bottom: 0.5rem;
}

.config-header p {
    color: var(--gray-600);
}

.config-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.config-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-section-title .step-badge {
    width: 24px;
    height: 24px;
    background: var(--primary-600);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .option-grid {
        grid-template-columns: 1fr;
    }
}

.config-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

/* Conditional Options */
.conditional-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.conditional-options.hidden {
    display: none;
}

/* ============================================
   VIEW 3: EDITOR
   ============================================ */
.editor-view {
    height: calc(100vh - var(--site-header-height) - var(--header-height));
    overflow: hidden;
    background: var(--gray-100);
}

.editor-view.active {
    display: flex;
    justify-content: center;
}

.editor-view-inner {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar - Fixed, nicht scrollend */
.editor-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--site-header-height) - var(--header-height));
    overflow: hidden;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.editor-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
}

.editor-sidebar.collapsed > * {
    opacity: 0;
    visibility: hidden;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--gray-50);
}

.sidebar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    flex-shrink: 0;
}

/* Module Cards in Sidebar */
.module-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: stretch;
    position: relative;
}

.module-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.module-card.active {
    background: var(--primary-50);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 82, 147, 0.1);
}

.module-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-400);
}

.module-card.drag-over {
    border-top: 3px solid var(--primary-500);
}

.module-drag-handle {
    display: flex;
    align-items: center;
    padding: 0 0.5rem 0 0;
    color: var(--gray-400);
    cursor: grab;
    font-size: 0.875rem;
    letter-spacing: -2px;
    user-select: none;
}

.module-drag-handle:hover {
    color: var(--gray-600);
}

.module-drag-handle:active {
    cursor: grabbing;
}

.module-card-main {
    flex: 1;
    min-width: 0;
}

.module-delete-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 50%;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
}

.module-card:hover .module-delete-btn {
    opacity: 1;
}

.module-delete-btn:hover {
    background: var(--accent-red);
    color: var(--white);
}

.custom-badge {
    font-size: 0.625rem;
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
}

.custom-module {
    border-left: 3px solid var(--primary-400);
}

/* Neues Modul anlegen Button */
.add-module-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-module-card:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-600);
}

.add-module-icon {
    font-size: 1.25rem;
    font-weight: 300;
}

.add-module-text {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Settings Card ohne Drag-Handle */
.settings-card .module-drag-handle,
.logo-card .module-drag-handle,
.prolog-card .module-drag-handle {
    display: none;
}

.settings-card,
.logo-card,
.prolog-card {
    display: block;
    padding: 0.875rem;
}

/* Export Settings Button */
.export-settings-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.export-settings-btn:hover {
    background: var(--white);
    border-color: var(--primary-400);
    color: var(--primary-600);
}

/* Logo Section */
.logo-section {
    border: 1px solid var(--gray-200);
    background: var(--white);
    max-width: 500px;
}

.logo-section .module-section-header {
    background: var(--gray-50);
}

.logo-section .module-section-title {
    font-weight: 600;
    color: var(--gray-800);
}

.logo-upload-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.logo-upload-area {
    flex: 1;
    min-width: 200px;
}

.logo-info-text {
    flex: 1;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.logo-info-text p {
    margin: 0;
}

.logo-dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logo-dropzone:hover,
.logo-dropzone.dragover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.logo-dropzone.dragover {
    border-style: solid;
    transform: scale(1.02);
}

.logo-dropzone-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.logo-dropzone-text {
    font-weight: 500;
    color: var(--gray-700);
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
}

.logo-dropzone-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

.logo-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.logo-preview-img {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: white;
    padding: 0.25rem;
    border: 1px solid var(--gray-200);
}

.logo-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
    text-align: center;
}

.logo-filename {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    word-break: break-all;
    max-width: 120px;
}

.logo-position-selector {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.logo-position-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.position-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.position-option:hover {
    border-color: var(--primary-400);
}

.position-option.selected {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.position-option input {
    display: none;
}

/* Logo Dual Container: Zwei Boxen nebeneinander */
.logo-dual-container {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 800px) {
    .logo-dual-container {
        flex-direction: column;
    }
}

.logo-controls-box {
    flex: 0 0 340px;
    min-width: 300px;
}

.logo-preview-box {
    flex: 1;
    min-width: 200px;
}

.logo-controls-inner {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.logo-preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--white);
}

.logo-preview-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.logo-file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-filename-full {
    font-weight: 500;
    color: var(--gray-700);
    word-break: break-all;
    font-size: 0.875rem;
}

.logo-dimensions {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.badge-svg {
    background: var(--accent-green);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.logo-slider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-slider-row label,
.logo-position-row label {
    font-size: 0.8125rem;
    color: var(--gray-600);
    white-space: nowrap;
    min-width: 55px;
}

.logo-size-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-300);
    border-radius: 3px;
    outline: none;
}

.logo-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-600);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.logo-size-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-600);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.logo-scale-value {
    font-weight: 600;
    color: var(--primary-700);
    font-size: 0.875rem;
    min-width: 40px;
}

.logo-position-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-position-buttons {
    display: flex;
    gap: 0.25rem;
}

.pos-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.pos-btn:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.pos-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

.logo-upload-compact {
    max-width: 400px;
}

/* Prolog Section */
.prolog-section {
    border: 2px solid var(--primary-200);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
}

.prolog-section .module-section-header {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
}

.prolog-editor {
    position: relative;
}

.prolog-toolbar {
    margin-bottom: 0.5rem;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.prolog-toolbar.visible,
.prolog-editor:focus-within .prolog-toolbar {
    opacity: 1;
    height: auto;
    overflow: visible;
}

.prolog-text {
    min-height: 120px;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    line-height: 1.6;
    transition: all var(--transition-fast);
}

.prolog-text:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(0, 82, 147, 0.1);
}

.prolog-text p {
    margin-bottom: 0.75rem;
}

.prolog-text p:last-child {
    margin-bottom: 0;
}

.prolog-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.prolog-text li {
    margin-bottom: 0.25rem;
}

/* Prolog Card in Sidebar */
.module-card.prolog-card {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
    border: 1px solid var(--primary-200);
}

.module-card.prolog-card:hover {
    border-color: var(--primary-400);
}

.module-card.prolog-card.active {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
    border-color: var(--primary-500);
}

.module-card.prolog-card .module-card-progress {
    display: none;
}

/* Settings Card in Sidebar */
.module-card.settings-card {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    border: 1px dashed var(--gray-300);
}

.module-card.settings-card:hover {
    border-color: var(--primary-400);
    border-style: solid;
}

.module-card.settings-card .module-card-progress {
    display: none;
}

/* Logo Card in Sidebar */
.module-card.logo-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-200);
}

.module-card.logo-card:hover {
    border-color: var(--primary-400);
}

.module-card.logo-card.active {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
    border-color: var(--primary-500);
}

.module-card.logo-card .module-card-progress {
    display: none;
}

.module-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.module-card-icon {
    font-size: 1.125rem;
}

.module-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
    line-height: 1.3;
}

.module-card-status {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.module-card-status.complete {
    color: var(--accent-green);
}

.module-card-progress {
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.module-card-progress-bar {
    height: 100%;
    background: var(--accent-green);
    transition: width var(--transition-normal);
}

/* Progress Summary */
.progress-summary {
    text-align: center;
}

.progress-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.progress-text strong {
    color: var(--gray-800);
}

/* Main Editor Area - Scrollbar */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--site-header-height) - var(--header-height));
    overflow: hidden;
    background: var(--gray-100);
    min-width: 0; /* Important for flex overflow */
}

.editor-toolbar {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.toolbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.toolbar-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.editor-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    /* Scrollbar nur hier */
}

/* Document Header Editor */
.document-header {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

/* Settings Panel */
.settings-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.settings-panel-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.settings-panel-header:hover {
    background: var(--gray-100);
}

.settings-panel-icon {
    font-size: 1.25rem;
}

.settings-panel-title {
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
}

.settings-panel-toggle {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.settings-panel-content {
    padding: 1.25rem;
    transition: all var(--transition-normal);
}

.settings-panel-content.collapsed {
    display: none;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.setting-group .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0;
}

.form-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input {
    flex: 1;
    font-family: monospace;
    font-size: 0.8125rem;
}

.settings-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.settings-checkboxes .checkbox-item {
    background: transparent;
    border: none;
    padding: 0;
}

.settings-checkboxes .checkbox-item:hover {
    background: transparent;
}

/* Module Title Input */
.module-title-input {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-700);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    margin: -0.25rem 0;
    transition: all var(--transition-fast);
}

.module-title-input:hover {
    background: var(--white);
    border-color: var(--gray-300);
}

.module-title-input:focus {
    background: var(--white);
    border-color: var(--primary-500);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 147, 0.1);
}

.module-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-200);
}

.document-header .form-input {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-600);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.document-header .form-input:hover {
    border-color: var(--primary-300);
}

.document-header .form-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    outline: none;
}

.document-header .form-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

/* Kleinere Felder für Version und Stand */
.document-header .form-input.header-input-small {
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
}

/* Module Section */
.module-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.module-section-icon {
    font-size: 1.25rem;
}

.module-section-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 100px;
}

.module-section-badge.required {
    background: var(--primary-100);
    color: var(--primary-700);
}

.module-section-content {
    padding: 1.25rem;
}

/* Policy Items / Baustein */
.baustein {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: stretch;
}

.baustein:last-child {
    margin-bottom: 0;
}

.baustein:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.baustein.selected {
    border-color: var(--accent-green);
    background: var(--accent-green-light);
}

.baustein.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-400);
}

.baustein.drag-over {
    border-top: 3px solid var(--primary-500);
}

.baustein-drag-handle {
    display: flex;
    align-items: center;
    padding: 1rem 0.5rem 1rem 0.75rem;
    color: var(--gray-400);
    cursor: grab;
    font-size: 0.875rem;
    letter-spacing: -2px;
    user-select: none;
    background: var(--gray-50);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.baustein-drag-handle:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.baustein-drag-handle:active {
    cursor: grabbing;
}

.baustein-main {
    flex: 1;
    min-width: 0;
}

.baustein-header {
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.baustein-checkbox {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.baustein-content {
    flex: 1;
}

.baustein-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.baustein-text p {
    margin-bottom: 0.5rem;
}

.baustein-text p:last-child {
    margin-bottom: 0;
}

.baustein-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.baustein-text li {
    margin-bottom: 0.25rem;
}

.baustein-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.baustein-tag {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.baustein-tag.tag-pflicht {
    background: var(--primary-100);
    color: var(--primary-700);
}

.baustein-tag.tag-wichtig {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

/* Inline-Editing Toolbar */
.baustein-toolbar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.toolbar-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

.toolbar-btn:active {
    background: var(--gray-200);
}

.toolbar-btn-reset {
    margin-left: auto;
    width: auto !important;
    min-width: 75px;
    height: 28px;
    padding: 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.toolbar-btn-reset:not(.disabled):hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-700);
}

.toolbar-btn-reset.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--gray-100);
}

.toolbar-btn-delete {
    color: var(--accent-red);
    border-color: var(--accent-red-light);
}

.toolbar-btn-delete:hover {
    background: var(--accent-red-light);
}

.toolbar-btn-list {
    width: auto;
    min-width: 28px;
    padding: 0.125rem 0.375rem;
    font-size: 0.5rem;
    line-height: 1;
    white-space: nowrap;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--gray-300);
    margin: 0 0.25rem;
    align-self: center;
}

/* Editable Text Area */
.baustein-editable {
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    outline: none;
}

.baustein-editable:hover {
    background: var(--gray-50);
}

.baustein-editable:focus {
    background: var(--white);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 82, 147, 0.1);
}

.baustein-editable p {
    margin-bottom: 0.5rem;
}

.baustein-editable p:last-child {
    margin-bottom: 0;
}

.baustein-editable ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.baustein-editable ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.baustein-editable li {
    margin-bottom: 0.25rem;
}

.baustein-actions {
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
}

.baustein.selected .baustein-actions {
    background: rgba(46, 125, 50, 0.05);
    border-color: rgba(46, 125, 50, 0.2);
}

/* Add Baustein Button */
.add-baustein-btn {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-500);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-baustein-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    background: var(--primary-50);
}

/* Preview styles for Modal - diese CSS bleiben für das Modal */

/* ============================================
   VIEW 4: RESULT
   ============================================ */
.result-view {
    padding: 2rem 1.5rem;
    align-items: center;
    overflow-y: auto;
}

.result-container {
    max-width: 900px;
    width: 100%;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Export-Formate Leiste */
.export-formats {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.export-formats-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
    white-space: nowrap;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-export {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-export:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-export:active {
    background: var(--gray-100);
    transform: translateY(1px);
}

/* Kalender-Button */
.btn-calendar {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-calendar:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.btn-calendar:active {
    background: var(--gray-300);
}

.result-document {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    min-height: 600px;
}

/* Header mit Logo */
.result-header.with-logo {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-header.logo-left {
    flex-direction: row;
}

.result-header.logo-right {
    flex-direction: row;
}

.result-header.logo-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.result-logo {
    max-width: 350px;
    max-height: 200px;
    object-fit: contain;
}

.result-header-text {
    flex: 1;
}

.result-header-text h1 {
    margin-bottom: 0.25rem !important;
}

.result-header-text .subtitle {
    margin-bottom: 0 !important;
}

.result-header.logo-center .subtitle {
    margin-bottom: 0 !important;
}

.result-document h1 {
    font-size: 1.75rem;
    color: var(--primary-700);
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}

.result-document .subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.result-document h2 {
    font-size: 1.25rem;
    color: var(--gray-800);
    margin: 2rem 0 1rem;
    font-family: var(--font-sans);
}

.result-document p {
    font-family: var(--font-serif);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.result-document ul {
    font-family: var(--font-serif);
    margin: 0.75rem 0 1rem;
    padding-left: 1.5rem;
}

.result-document li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.result-item {
    margin-bottom: 1rem;
}

.result-item p {
    margin-bottom: 0.75rem;
}

.result-item ul {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.result-item ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.result-item li {
    margin-bottom: 0.375rem;
}

.result-meta {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-500);
}

.result-meta p {
    font-family: var(--font-sans);
    margin-bottom: 0.25rem;
}

/* Prolog im Result */
.result-prolog {
    background: var(--gray-50);
    border-left: 4px solid var(--primary-500);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.result-prolog .prolog-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-700);
    margin: 0 0 0.75rem 0;
}

.result-prolog .prolog-content {
    color: var(--gray-700);
    line-height: 1.7;
}

.result-prolog .prolog-content p {
    margin-bottom: 0.75rem;
}

.result-prolog .prolog-content p:last-child {
    margin-bottom: 0;
}

.result-prolog .prolog-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Preview Prolog */
.preview-prolog {
    background: var(--gray-50);
    border-left: 3px solid var(--primary-500);
    padding: 1rem 1.25rem;
    margin: 1rem 0 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.preview-prolog h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-700);
    margin: 0 0 0.5rem 0;
}

.preview-prolog p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.preview-prolog p:last-child {
    margin-bottom: 0;
}

/* Preview Header mit Logo */
.preview-header.with-logo {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-header.logo-left { flex-direction: row; }
.preview-header.logo-right { flex-direction: row; }
.preview-header.logo-center { 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
}

.preview-logo {
    max-width: 350px;
    max-height: 200px;
    object-fit: contain;
}

.preview-header-text { flex: 1; }
.preview-header-text h1 { margin-bottom: 0.25rem; }
.preview-header-text .preview-subtitle { margin-bottom: 0; }
.preview-header.logo-center .preview-subtitle { margin-bottom: 0; }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Preview Modal - larger size */
.preview-modal {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.preview-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: var(--gray-50);
}

.preview-modal .preview-document {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    min-height: 400px;
}

.preview-modal .preview-document h1 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    color: var(--primary-700);
    margin-bottom: 0.5rem;
}

.preview-modal .preview-document .preview-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* Compliance Check Styles */
.compliance-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.compliance-summary.status-success {
    background: var(--accent-green-light);
    border: 1px solid var(--accent-green);
}

.compliance-summary.status-warning {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
}

.compliance-summary.status-error {
    background: var(--accent-red-light);
    border: 1px solid var(--accent-red);
}

.compliance-score {
    font-size: 2rem;
    font-weight: 700;
}

.compliance-score-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.compliance-category {
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.compliance-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    cursor: pointer;
}

.compliance-category-header:hover {
    background: var(--gray-100);
}

.compliance-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.compliance-category-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-weight: 500;
}

.compliance-category-status.complete {
    background: var(--accent-green-light);
    color: #047857;
}

.compliance-category-status.partial {
    background: #FEF3C7;
    color: #B45309;
}

.compliance-category-status.missing {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.compliance-category-items {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-200);
}

.compliance-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.compliance-item-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.compliance-item.found .compliance-item-icon {
    color: var(--accent-green);
}

.compliance-item.missing .compliance-item-icon {
    color: var(--accent-red);
}

.compliance-item-text {
    flex: 1;
}

.compliance-item-action {
    font-size: 0.75rem;
    color: var(--primary-600);
    cursor: pointer;
    text-decoration: underline;
}

.compliance-item-action:hover {
    color: var(--primary-700);
}

.preview-modal .preview-document h2 {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    color: var(--gray-800);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--gray-200);
}

.preview-modal .preview-document p {
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.preview-modal .preview-document ul {
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.5rem;
}

.preview-modal .preview-document li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
    min-height: 300px;
}

.preview-placeholder-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.preview-placeholder p {
    font-size: 0.9375rem;
    max-width: 250px;
    line-height: 1.5;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: calc(var(--site-header-height) + var(--header-height) + 1rem);
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-500);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--accent-green);
}

.toast.error {
    border-left-color: var(--accent-red);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9375rem;
}

.toast-message {
    color: var(--gray-600);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    line-height: 1;
}

.toast-close:hover {
    color: var(--gray-600);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* Export Settings Modal */
.modal-lg {
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-lg .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.export-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.settings-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.settings-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.setting-item .form-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0;
}

.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-picker {
    width: 36px;
    height: 32px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
}

.color-text {
    flex: 1;
    font-family: monospace;
    font-size: 0.8125rem;
    text-transform: uppercase;
}

.settings-checkboxes-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Config Badge im Header */
.config-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    color: var(--primary-700);
}

.config-badge-icon {
    font-size: 1rem;
}

.config-badge-text {
    font-weight: 500;
}

.config-badge-separator {
    color: var(--primary-300);
}

@media (max-width: 640px) {
    .settings-row {
        grid-template-columns: 1fr;
    }
    
    .settings-checkboxes-row {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .stepper {
        flex-wrap: wrap;
    }

    .stepper-divider {
        display: none;
    }

    .editor-sidebar {
        position: fixed;
        left: 0;
        top: calc(var(--site-header-height) + var(--header-height));
        bottom: 0;
        z-index: 50;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .editor-sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .result-document {
        padding: 1.5rem;
    }

    .editor-content {
        padding: 1rem;
    }

    .editor-toolbar {
        flex-wrap: wrap;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .preview-modal {
        max-width: 100%;
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
}

/* Responsive: Site-Header Navigation */
@media (max-width: 800px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-site-header);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 200;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.75rem 0;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-radius: 0;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray-500);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ============================================
   ANLEITUNG STYLES
   ============================================ */
.anleitung-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 80px;
    font-size: 0.9375rem;
    line-height: 1.7;
    position: relative;
}

.anleitung-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-200);
}

.anleitung-header h1 {
    font-size: 2rem;
    color: var(--primary-700);
    margin-bottom: 0.5rem;
}

.anleitung-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.anleitung-toc {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.anleitung-toc h2 {
    font-size: 1.25rem;
    color: var(--primary-700);
    margin-bottom: 1rem;
}

.anleitung-toc ol {
    margin: 0;
    padding-left: 1.5rem;
}

.anleitung-toc li {
    margin-bottom: 0.5rem;
}

.anleitung-toc a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.2s;
}

.anleitung-toc a:hover {
    color: var(--primary-800);
    text-decoration: underline;
}

.anleitung-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.anleitung-section:last-of-type {
    border-bottom: none;
}

.anleitung-section h2 {
    font-size: 1.5rem;
    color: var(--primary-700);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-300);
}

.anleitung-section h3 {
    font-size: 1.125rem;
    color: var(--gray-800);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.anleitung-section h4 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.anleitung-section p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.anleitung-section ul, .anleitung-section ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.anleitung-section li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.anleitung-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem 0;
    font-size: 0.875rem;
}

.anleitung-table th, .anleitung-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--gray-200);
}

.anleitung-table th {
    background: var(--primary-600);
    color: white;
    font-weight: 600;
}

.anleitung-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.anleitung-hinweis, .anleitung-tipp, .anleitung-warnung {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.anleitung-hinweis {
    background: var(--info-50);
    border-left: 4px solid var(--info-500);
}

.anleitung-tipp {
    background: var(--success-50);
    border-left: 4px solid var(--success-500);
}

.anleitung-warnung {
    background: var(--warning-50);
    border-left: 4px solid var(--warning-500);
}

.anleitung-faq {
    margin-bottom: 1.5rem;
}

.anleitung-faq h4 {
    color: var(--primary-700);
    margin-bottom: 0.5rem;
}

.anleitung-faq p {
    color: var(--gray-600);
}

.anleitung-glossar {
    display: grid;
    gap: 1rem;
}

.anleitung-glossar dt {
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: 0.25rem;
}

.anleitung-glossar dd {
    margin-left: 0;
    padding-left: 1rem;
    border-left: 2px solid var(--gray-200);
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.anleitung-footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    font-style: italic;
    border-top: 1px solid var(--gray-200);
    margin-top: 2rem;
}

/* Copyright Footer */
.copyright-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.copyright-footer p {
    margin: 0;
    line-height: 1.6;
}

.copyright-footer a {
    color: var(--primary-600);
    text-decoration: none;
}

.copyright-footer a:hover {
    text-decoration: underline;
}

.anleitung-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-600);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: all 0.3s;
}

.anleitung-scroll-top:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
}

.anleitung-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Hilfe-Modul in Sidebar */
.module-card.hilfe-card {
    background: linear-gradient(135deg, var(--info-50), var(--primary-50));
    border: 2px solid var(--info-300);
    flex-direction: column;
    align-items: flex-start;
}

.module-card.hilfe-card:hover {
    border-color: var(--info-500);
}

.module-card.hilfe-card.active {
    background: linear-gradient(135deg, var(--info-100), var(--primary-100));
    border-color: var(--info-500);
}

/* Welcome-Buttons */
.welcome-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-info {
    background: var(--primary-600);
    color: white;
    border: 2px solid var(--primary-600);
}

.btn-info:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
}

/* Programmeinstellungen Card */
.module-card.settings-prog-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-300);
    flex-direction: column;
    align-items: flex-start;
}

.module-card.settings-prog-card:hover {
    border-color: var(--gray-400);
}

.module-card.settings-prog-card.active {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    border-color: var(--gray-500);
}

/* Auto-Save Indikator */
.autosave-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--gray-100);
}

.autosave-indicator.saving {
    color: var(--info-600);
}

.autosave-indicator.saved {
    color: var(--accent-green);
}

/* Validierung Modal */
.validation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.validation-item.success {
    background: var(--accent-green-light);
    border: 1px solid var(--accent-green);
}

.validation-item.warning {
    background: var(--accent-orange-light);
    border: 1px solid var(--accent-orange);
}

.validation-item.error {
    background: var(--accent-red-light);
    border: 1px solid var(--accent-red);
}

.validation-icon {
    font-size: 1.25rem;
}

.validation-text {
    flex: 1;
}

.validation-text strong {
    display: block;
    margin-bottom: 0.125rem;
}

.validation-text small {
    color: var(--gray-600);
}

/* Platzhalter-Manager */
.placeholder-list {
    max-height: 400px;
    overflow-y: auto;
}

.placeholder-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    background: var(--white);
}

.placeholder-item:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.placeholder-name {
    font-family: monospace;
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
}

.placeholder-input {
    flex: 1;
}

.placeholder-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.no-placeholders {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.no-placeholders .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
