/* Taschenparadies - Produktdaten Styles */
:root {
    --primary-color: #456882;
    --secondary-color: #D2C1B6;
    --accent-color: #234C6A;
    --text-color: #1B3C53;
    --background-gradient: linear-gradient(135deg, #D2C1B6 0%, #456882 100%);
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --warning-color: #e74c3c;
    --success-color: #27ae60;
    --info-color: #3498db;
}

/* Sektion-Titel dauerhaft ausblenden */
.form-section h4 {
    display: none !important;
}

/* MDE & Sortierung Block ausblenden - NUR dieser spezifische Block */
.mde-sortierung-section {
    display: none !important;
}

/* Preise Block (allg. Verkaufspreis / allg. Einkaufspreis) ausblenden */
.preise-section {
    display: none !important;
}

/* Sektions-Container komplett ausblenden */
/* AUSKOMMENTIERT - versteckt alle Formular-Felder! */
/* .form-section {
    display: none !important;
} */

/* Icons ausgeblendet */
.form-section::after {
    display: none !important;
}

.form-section:nth-child(7)::after {
    content: '🌍';
    font-size: 18px;
}

.form-section:nth-child(8)::after {
    content: '📏';
    font-size: 18px;
}

.form-section:nth-child(9)::after {
    content: '🏷️';
    font-size: 18px;
}

.form-section:nth-child(10)::after {
    content: '🖼️';
    font-size: 18px;
}

.form-section:nth-child(11)::after {
    content: '🔖';
    font-size: 18px;
}

.form-section:nth-child(12)::after {
    content: '💰';
    font-size: 18px;
}

.form-section:nth-child(even) {
    border-left-color: var(--secondary-color);
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.form-section:nth-child(odd) {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

/* Größere Abstände zwischen Form-Gruppen */
.form-section .form-group {
    margin-bottom: 1.5rem;
}

.form-section .form-row {
    margin-bottom: 1rem;
    gap: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    white-space: nowrap;
    position: relative;
}

.tab-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary-color);
}

/* Tab Content */
.tab-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-panel {
    display: none;
    padding: 2rem;
}

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

.tab-panel h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-panel h3::before {
    content: "📦";
    font-size: 1.2rem;
}

/* Product Form */
.product-form {
    max-width: 800px;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(69, 104, 130, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(69, 104, 130, 0.2);
    transform: translateY(-1px);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem -2rem -2rem -2rem;
}

/* Product List Section */
.product-list-section {
    margin-top: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-list-section h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 2rem 2rem 1rem 2rem;
    margin: 0;
    border-bottom: 3px solid var(--primary-color);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-list-section h3::before {
    content: "📋";
    font-size: 1.2rem;
}

.product-list {
    max-height: 400px;
    overflow-y: auto;
}

.product-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: var(--white);
}

.product-item:hover {
    background: var(--bg-color);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.product-info h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: var(--warning-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: var(--warning-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Loading States */
.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-weight: 500;
    box-shadow: var(--shadow);
}

.message.success {
    background: var(--success-color);
    color: var(--white);
    border: 1px solid var(--success-color);
}

.message.error {
    background: var(--warning-color);
    color: var(--white);
    border: 1px solid var(--warning-color);
}

.message.info {
    background: var(--info-color);
    color: var(--white);
    border: 1px solid var(--info-color);
}

/* Varianten-Modal Styles */
.variant-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-modal > div {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.variant-modal .form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d0d7e5;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.variant-modal .form-control:focus {
    outline: none;
    border-color: #3fb38e;
    box-shadow: 0 0 0 2px rgba(63, 179, 142, 0.1);
}

.variant-modal .form-group {
    margin-bottom: 1rem;
}

.variant-modal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.variant-modal small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        border-right: none;
        margin: 0;
    }
    
    .tab-btn.active {
        border-bottom-color: var(--border-color);
        border-left: 3px solid var(--primary-color);
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        margin: 2rem -1rem -1rem -1rem;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .product-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .product-form {
        padding: 1rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    margin: 1rem;
}

.empty-state h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.empty-state p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Category Groups */
.category-group {
    margin-bottom: 2rem;
}

.category-title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Stammdaten-spezifische Styles */
.stammdaten-tabs {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.5rem;
}

/* Dropdown-Styles */
.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.dropdown-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.dropdown-option:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.dropdown-option:last-child {
    border-bottom: none;
}

/* Form-Gruppen mit Dropdown-Positionierung */
.form-group {
    position: relative;
}

/* Input-Felder mit Dropdown */
input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(69, 104, 130, 0.2);
}

/* Standardwert-Felder (können geändert werden) */
.default-value-field {
    background-color: #fff9e6 !important;
    border: 2px solid #ffd700 !important;
    border-left: 4px solid #ffa500 !important;
}

.default-value-field:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3) !important;
}

/* Select-Dropdown mit Standardwert-Markierung */
.default-value-field select,
select.default-value-field {
    background-color: #fff9e6 !important;
    border: 2px solid #ffd700 !important;
    border-left: 4px solid #ffa500 !important;
    cursor: pointer;
}

.default-value-field select:focus,
select.default-value-field:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.3) !important;
    outline: none;
}

/* Automatisch befüllte Marke-Felder */
.auto-filled {
    background-color: #e8f5e9 !important;
    border: 2px solid #4caf50 !important;
    border-left: 4px solid #2e7d32 !important;
}

.auto-filled:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3) !important;
}

/* Manuelle Eingabe erforderlich (Marke nicht in Liste) */
.manual-input-required {
    background-color: #fff3e0 !important;
    border: 2px solid #ff9800 !important;
    border-left: 4px solid #f57c00 !important;
    animation: pulse-warning 2s infinite;
}

.manual-input-required:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3) !important;
    animation: none;
}

@keyframes pulse-warning {
    0%, 100% {
        border-left-color: #f57c00;
    }
    50% {
        border-left-color: #ff9800;
    }
}

/* Material-Buttons */
.material-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.material-button {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: 'Open Sans', Arial, sans-serif;
}

.material-button:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.material-button.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(69, 104, 130, 0.3);
}

.material-button.selected:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* Material-Dropdown */
.material-dropdown-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    position: relative;
}

.material-dropdown-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.material-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--white);
}

.material-search-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(69, 104, 130, 0.2);
}

.material-dropdown {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
    position: absolute;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.material-dropdown:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(69, 104, 130, 0.2);
}

.material-dropdown option {
    padding: 0.5rem;
    cursor: pointer;
}

.material-dropdown option:hover,
.material-dropdown option:checked {
    background-color: var(--secondary-color);
}

/* Material-Button aus Dropdown */
.material-button-from-dropdown {
    border-left: 3px solid #2196f3 !important;
}

.material-button-from-dropdown.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2196f3 100%);
}

/* Eigenes Material-Eingabefeld */
.material-custom-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.material-custom-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.material-custom-field:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(69, 104, 130, 0.2);
}

/* Eigene Material-Buttons (andere Farbe) */
.material-button-custom {
    border-left: 3px solid #9c27b0 !important;
}

.material-button-custom.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, #9c27b0 100%);
}

/* Form-Controls */
.form-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Sektion-Titel ausblenden */
.section-titles-hidden .form-section h4 {
    display: none;
}

/* Kompaktere Formular-Sektionen ohne Titel */
.section-titles-hidden .form-section {
    margin-bottom: 1rem;
    padding: 1rem;
}

.section-titles-hidden .form-section.white {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.section-titles-hidden .form-section.gray {
    background: #f1f3f4;
    border: 1px solid #e9ecef;
}

/* Warengruppen-spezifische Styles */
.warengruppen-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.field-unit {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

/* Gemappte Felder - visuell kennzeichnen */
.mapped-field {
    position: relative;
    background: #e6f3ff !important; /* Leichtes Blau */
    border-left: 3px solid #3fb38e;
    padding: 0.5rem;
    border-radius: 4px;
}

.mapped-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mapped-badge {
    display: inline-block;
    background: #3fb38e;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: normal;
}

.mapped-field .form-group {
    background: #e6f3ff !important; /* Leichtes Blau für Form-Group */
}

.mapped-field input,
.mapped-field textarea,
.mapped-field select {
    background: #f0f8ff !important; /* Leichtes Blau für Input-Felder */
    border: 1px solid #3fb38e;
}

.mapped-field input:focus,
.mapped-field textarea:focus,
.mapped-field select:focus {
    background: #d9ecff !important; /* Etwas dunkleres Blau beim Fokus */
    border-color: #2d8a6e;
    box-shadow: 0 0 0 2px rgba(63, 179, 142, 0.2);
}

/* Sicherstellen, dass gemappte Felder auch in form-row sichtbar sind */
.form-row .mapped-field {
    background: #e6f3ff !important;
}

.form-row .mapped-field input,
.form-row .mapped-field textarea,
.form-row .mapped-field select {
    background: #f0f8ff !important;
}

/* Nicht gemappte Felder (könnten gemappt werden, haben aber keinen Wert) - gelb hinterlegen */
.unmapped-field {
    position: relative;
    background: #fff9e6 !important; /* Leichtes Gelb */
    border-left: 3px solid #f6ae42;
    padding: 0.5rem;
    border-radius: 4px;
}

.unmapped-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unmapped-field .form-group {
    background: #fff9e6 !important; /* Leichtes Gelb für Form-Group */
}

.unmapped-field input,
.unmapped-field textarea,
.unmapped-field select {
    background: #fffef0 !important; /* Sehr leichtes Gelb für Input-Felder */
    border: 1px solid #f6ae42;
}

.unmapped-field input:focus,
.unmapped-field textarea:focus,
.unmapped-field select:focus {
    background: #fff9e6 !important; /* Etwas dunkleres Gelb beim Fokus */
    border-color: #e09a2e;
    box-shadow: 0 0 0 2px rgba(246, 174, 66, 0.2);
}

/* Sicherstellen, dass unmappte Felder auch in form-row sichtbar sind */
.form-row .unmapped-field {
    background: #fff9e6 !important;
}

.form-row .unmapped-field input,
.form-row .unmapped-field textarea,
.form-row .unmapped-field select {
    background: #fffef0 !important;
}

/* Warengruppen-Auswahl-Dialog */
.warengruppe-selection-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.warengruppe-selection-dialog > div {
    animation: slideUp 0.3s ease-out;
}

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

/* Form-Gruppe mit voller Breite */
.form-group-full {
    width: 100%;
    flex: 1 1 100%;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(69, 104, 130, 0.2);
    outline: none;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

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

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Warengruppen-Auswahl */
.warengruppen-selection {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.warengruppen-selection h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.warengruppen-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.warengruppen-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.warengruppen-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Stammdaten-Liste */
.stammdaten-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.stammdaten-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stammdaten-header .artikelnummer {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Klickbare Artikelnummern in Tabellen */
.product-table td a {
    color: #3fb38e;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}

.product-table td a:hover {
    color: #2d8a6b;
    text-decoration: underline;
}

/* Klickbare Artikelnummern in Karten */
.data-sku a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.data-sku a:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.stammdaten-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

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

.stammdaten-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.stammdaten-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Produktkarten */
.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-header .product-sku {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

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

.product-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background-color: #138496;
}

.form-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.data-list {
    margin-top: 2rem;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.data-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: var(--white);
}

.data-item:hover {
    background: var(--bg-color);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.data-info h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.data-info p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.data-actions {
    display: flex;
    gap: 0.5rem;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.setting-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.setting-card h4 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Google Sheets Integration Styles */
.export-container {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.google-sheets-setup {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.google-sheets-setup .form-group {
    margin-bottom: 1.5rem;
}

.google-sheets-setup label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.google-sheets-setup input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.google-sheets-setup small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.auth-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: var(--bg-color);
}

.status-success {
    color: var(--success-color);
    font-weight: 600;
}

.status-error {
    color: var(--warning-color);
    font-weight: 600;
}

.status-info {
    color: var(--info-color);
    font-weight: 500;
}

.export-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.export-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    min-height: 50px;
}

.export-status .status-success,
.export-status .status-error,
.export-status .status-info {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.export-status .status-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.export-status .status-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.export-status .status-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Im Tab "Neue Stammdaten" alle Felder anzeigen */
/* Diese Regel wurde deaktiviert, damit alle Felder sichtbar sind */
/*
#add.tab-content.active .form-section:not(:first-of-type) {
    display: none !important;
}

#add.tab-content.active .form-controls {
    display: none !important;
}
*/

/* "Stammdaten suchen" Tab-Button und Tab-Content ausblenden */
.tab-btn[data-tab="search"],
#search.tab-content {
    display: none !important;
}

/* ============================================
   PREIS-TABELLE (Excel-Stil)
   ============================================ */

/* kompakte box */
.preisbox {
    border: 1px solid #d0d7e5;
    border-radius: 4px;
    padding: 8px;
    margin-top: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preisbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.preisbox__title {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.1px;
    color: #1f2937;
}

/* kein horizontal scroll: wir kürzen text */
.preisbox__tablewrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d0d7e5;
    background: #fff;
}

/* Excel-ähnliche Tabelle */
.preis-tabelle {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
}

/* Header - Excel blau */
.preis-tabelle thead th {
    background: #4472c4; /* Excel-Blau */
    color: #fff;
    border: 1px solid #2f5597;
    border-bottom: 2px solid #2f5597;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Erste Spalte im Header */
.preis-tabelle thead th:first-child {
    border-left: 1px solid #2f5597;
}

/* Letzte Spalte im Header */
.preis-tabelle thead th:last-child {
    border-right: 1px solid #2f5597;
}

/* Zellen - Excel-Stil mit Rahmen */
.preis-tabelle td {
    border: 1px solid #d0d7e5;
    padding: 4px 6px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
    font-size: 11px;
}

/* Erste Spalte */
.preis-tabelle td:first-child {
    border-left: 1px solid #d0d7e5;
}

/* Letzte Spalte */
.preis-tabelle td:last-child {
    border-right: 1px solid #d0d7e5;
}

/* Zebra-Streifen (alternierende Zeilen) */
.preis-tabelle tbody tr:nth-child(even) td {
    background: #f2f2f2;
}

/* Hover-Effekt wie Excel */
.preis-tabelle tbody tr:hover td {
    background: #d5e3f3 !important;
    cursor: pointer;
}

/* Zahlen rechtsbündig */
.preis-tabelle .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
}

/* Rahmen um die gesamte Tabelle */
.preis-tabelle {
    border: 1px solid #d0d7e5;
}

/* spaltenbreiten (anpassbar) - angepasst an Screenshot */
.preis-tabelle th:nth-child(1),
.preis-tabelle td:nth-child(1) { width: 12%; }  /* PL PL-Bez. (kombiniert) */
.preis-tabelle th:nth-child(2),
.preis-tabelle td:nth-child(2) { width: 5%; }   /* FW */
.preis-tabelle th:nth-child(3),
.preis-tabelle td:nth-child(3) { width: 7%; }   /* Preis */
.preis-tabelle th:nth-child(4),
.preis-tabelle td:nth-child(4) { width: 9%; }   /* Preisart */
.preis-tabelle th:nth-child(5),
.preis-tabelle td:nth-child(5) { width: 10%; }  /* Notiz */
.preis-tabelle th:nth-child(6),
.preis-tabelle td:nth-child(6) { width: 9%; }   /* Konto/Gruppe */
.preis-tabelle th:nth-child(7),
.preis-tabelle td:nth-child(7) { width: 16%; }  /* Bezeichnung */
.preis-tabelle th:nth-child(8),
.preis-tabelle td:nth-child(8) { width: 7%; }   /* Datum von */
.preis-tabelle th:nth-child(9),
.preis-tabelle td:nth-child(9) { width: 7%; }   /* Datum bis */
.preis-tabelle th:nth-child(10),
.preis-tabelle td:nth-child(10) { width: 6%; }   /* Rabatt 1 */
.preis-tabelle th:nth-child(11),
.preis-tabelle td:nth-child(11) { width: 6%; }   /* Rabatt 2 */
.preis-tabelle th:nth-child(12),
.preis-tabelle td:nth-child(12) { width: 6%; }   /* Ab Menge */
.preis-tabelle th:nth-child(13),
.preis-tabelle td:nth-child(13) { width: 5%; }   /* PC Ko */
.preis-tabelle th:nth-child(14),
.preis-tabelle td:nth-child(14) { width: 5%; }   /* Aktion */

/* Preis-Eingabeformular - Excel-Tabellen-Stil */
.preis-eingabe {
    background: #fff;
    border: 1px solid #d0d7e5;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    max-height: 600px;
    overflow-y: auto;
    /* display wird per JavaScript gesteuert, kein !important */
}

/* Excel-ähnliche Eingabetabelle */
.preis-eingabe-tabelle {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    border: 1px solid #d0d7e5;
}

/* Header der Eingabetabelle */
.preis-eingabe-tabelle thead th {
    background: #4472c4; /* Excel-Blau */
    color: #fff;
    border: 1px solid #2f5597;
    border-bottom: 2px solid #2f5597;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Zellen der Eingabetabelle */
.preis-eingabe-tabelle td {
    border: 1px solid #d0d7e5;
    padding: 2px 4px;
    vertical-align: middle;
    background: #fff;
}

/* Zebra-Streifen für Eingabetabelle */
.preis-eingabe-tabelle tbody tr:nth-child(even) td {
    background: #f2f2f2;
}

/* Hover-Effekt für Eingabetabelle */
.preis-eingabe-tabelle tbody tr:hover td {
    background: #d5e3f3 !important;
}

/* Input-Felder in der Tabelle */
.preis-eingabe-tabelle .preis-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 6px;
    font-size: 11px;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
    outline: none;
    box-sizing: border-box;
}

/* Input-Felder beim Fokus */
.preis-eingabe-tabelle .preis-input:focus {
    background: #fffacd; /* Excel-Gelb beim Fokus */
    border: 1px solid #4472c4;
    box-shadow: inset 0 0 0 1px #4472c4;
}

/* Produkttabelle - gleiche Styles wie Preis-Tabelle */
.product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    font-size: 11px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
}

.product-table thead th {
    background: #4472c4;
    color: #fff;
    border: 1px solid #2f5597;
    border-bottom: 2px solid #2f5597;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.product-table td {
    border: 1px solid #d0d7e5;
    padding: 4px 6px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
    font-size: 11px;
}

.product-table tbody tr:nth-child(even) td {
    background: #f2f2f2;
}

.product-table tbody tr:hover td {
    background: #d5e3f3 !important;
    cursor: pointer;
}

.product-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
}

/* Readonly Input-Felder */
.preis-eingabe-tabelle .preis-input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Select-Dropdowns in der Tabelle */
.preis-eingabe-tabelle .preis-select {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 6px;
    font-size: 11px;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
    outline: none;
    cursor: pointer;
}

.preis-eingabe-tabelle .preis-select:focus {
    background: #fffacd;
    border: 1px solid #4472c4;
    box-shadow: inset 0 0 0 1px #4472c4;
}

/* Zahlen rechtsbündig */
.preis-eingabe-tabelle .preis-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.preis-eingabe-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}
