@import url('https://www.w3schools.com/w3css/4/w3.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* ============================================
   KNIEP LUTA - Master Styles
   Alle Styles zentral verwaltet
   ============================================ */

/* Reset & Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   LOGIN-SEITE
   ============================================ */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #263d86 0%, #1e2f6b 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #263d86;
}

.btn {
    width: 100%;
    padding: 12px;
    background: #263d86;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #1e2f6b;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
}

/* ============================================
   TOP-HEADER (wie alte App)
   ============================================ */
.top-header-bar {
    position: relative;
    width: 100%;
    height: 90px;
    background-color: #FFCF48;
    z-index: 3;
}

.logo-container {
    position: absolute;
    left: 14px;
    top: 15px;
    width: 100px;
    height: 60px;
}

.logo-container img {
    max-width: 100%;
    height: auto;
}

.top-header {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #263d86;
}

.top-header-address {
    position: absolute;
    right: 20px;
    top: 45px;
    font-size: 14px;
    color: #555;
}

.top-header-link {
    position: absolute;
    right: 20px;
    top: 65px;
    font-size: 12px;
    color: #666;
}

/* ============================================
   NAVIGATION BAR (sticky, unter Banner)
   ============================================ */
.nav-bar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #263d86;
    padding: 8px 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link,
.nav-toggle {
    display: inline-block;
    color: white;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px;
    margin-right: 10px;
    transition: opacity 0.3s;
}

.nav-help-button {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    background: #ea5b27;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-weight: bold;
    font-size: 18px;
    padding: 0;
    transition: opacity 0.3s;
}

.nav-right-items {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.nav-help-button:hover {
    opacity: 0.8;
}

/* ============================================
   GLOCKEN-BADGE (System-Fehler Anzeige)
   ============================================ */
.nav-bell-wrapper {
    position: absolute;
    right: 95px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, opacity 0.2s;
}

.nav-bell-btn.bell-ok {
    background: #28a745;
    color: white;
}

.nav-bell-btn.bell-has-errors {
    background: #dc3545;
    color: white;
    animation: bell-shake 3s infinite;
}

@keyframes bell-shake {
    0%, 85%, 100% { transform: rotate(0deg); }
    88%  { transform: rotate(-12deg); }
    92%  { transform: rotate(12deg); }
    95%  { transform: rotate(-6deg); }
    98%  { transform: rotate(6deg); }
}

.bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #dc3545;
    font-size: 10px;
    font-weight: bold;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 1px solid #dc3545;
}

.bell-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    min-width: 250px;
    z-index: 1001;
    overflow: hidden;
}

.bell-dropdown.open {
    display: block;
}

.bell-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    color: inherit;
}

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

.bell-ok-item {
    color: #28a745;
    font-weight: 500;
}

.bell-error-item {
    color: #dc3545;
    font-weight: 500;
}

.bell-error-item:hover {
    background: #fff5f5;
    text-decoration: none;
}

.nav-bell-btn:hover {
    opacity: 0.85;
}

.nav-link i,
.nav-toggle i,
.nav-help-button i {
    margin-right: 5px;
}

.nav-link:hover,
.nav-toggle:hover {
    opacity: 0.8;
    text-decoration: none;
    color: white;
}

/* ============================================
   NAVIGATION MENU
   ============================================ */
.nav-container {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    z-index: 999;
}

.w3-dropnav {
    display: none;
    padding: 10px 60px 20px 20px;
    background: #f5f5f5;
    position: relative;
}

.w3-dropnav.active-nav {
    display: block !important;
}

.w3-closebtn {
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
    font-size: 32px;
    color: #999;
    z-index: 10;
}

.w3-closebtn:hover {
    color: #333;
}

.w3-row-padding {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.w3-quarter {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1 1 calc(23% - 18px);
    min-width: 200px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.w3-quarter h3 {
    color: #263d86;
    margin-bottom: 15px;
    font-size: 20px;
  
    border-bottom: 2px solid #263d86;
    padding-bottom: 10px;
}

.w3-quarter h3 i {
    margin-right: 8px;
}

.w3-quarter a {
    display: block;
    padding: 2px 10px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
    margin-bottom: 2px;
     font-size: 16px;
    
}

.w3-quarter a:hover {
    background-color: #e8e8e8;
    color: #d32f2f;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 20px 15px;
}

/* Optional: Für Formulare/kleine Inhalte eingeschränkte Breite */
.content-narrow {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.page-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 15px;
    color: #333;
}

.card p {
    color: #666;
    line-height: 1.6;
}

/* ============================================
   PAGE TITLE (Überschrift mit Icon und Strich)
   ============================================ */
.page-title {
    margin: 0px 0 25px 0;
    padding: 3px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #ea5b27;
    color: #054686;
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 4px 4px 0 0;
}

.page-title i {
    font-size: 28px;
    color: #ea5b27;
}

/* Header Button Klasse - kompakte Buttons für Seitenüberschriften */
.btn-header {
    height: 30px !important;
    padding: 4px 12px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important; /* Override global 100% width */
}

/* Button Varianten */
.btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn.btn-secondary:hover {
    background: #5a6268;
}

.btn.btn-success {
    background: #28a745;
    color: white;
}

.btn.btn-success:hover {
    background: #218838;
}

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

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

/* Kleine Buttons für Filter und Tabellen-Aktionen */
.btn-filter {
    height: 32px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: auto !important;
}

.btn-table-action {
    height: 28px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    width: auto !important;
    min-width: auto !important;
}

/* Filter Actions Container */
.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============================================
   TOOLBOX (Slide-in Seitenmenü wie alte App)
   ============================================ */

/* Toolbox Toggle Button (links mittig) */
.toolbox-toggle {
    position: fixed;
    bottom: 45%;
    left: -25px;
    width: 50px;
    height: 50px;
    background: #263d86;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toolbox-toggle::before {
    content: '›';
    font-size: 32px;
    font-weight: bold;
    display: block;
}

.toolbox-toggle:hover {
    background: #1a2a5e;
    left: -20px;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.4);
}

.toolbox-toggle.active {
    opacity: 0;
    visibility: hidden;
    left: -50px;
}

/* Slide-in Menü */
.toolbox-menu {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: 4px 0 12px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.toolbox-menu.open {
    left: 0;
}

.toolbox-menu-header {
    background: #263d86;
    color: white;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbox-menu-content {
    padding: 20px;
}

.toolbox-context {
    flex: 0 0 auto;
    max-height: 200px;
    overflow-y: auto;
}

.toolbox-favorites {
    flex: 1 1 auto;
    overflow-y: auto;
}

.toolbox-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0 20px;
}

.toolbox-section-subtitle {
    color: #666;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.toolbox-section {
    margin-bottom: 25px;
}

.toolbox-section-title {
    color: #263d86;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbox-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.toolbox-link:hover {
    background: #f5f5f5;
    color: #263d86;
    transform: translateX(5px);
}

.toolbox-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.visit-badge {
    background: #263d86;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* Schließen-Button unten */
.toolbox-close-btn {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.toolbox-close-btn button {
    width: 100%;
    padding: 12px;
    background: #263d86;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.toolbox-close-btn button:hover {
    background: #1a2a5e;
}

/* Overlay */
.toolbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.toolbox-overlay.active {
    display: block;
}

/* ============================================
   TABELLEN (Standard für alle Tabellen)
   ============================================ */

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
}

/* Standard Table Styles */
.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    /* font-size wird dynamisch über system_settings gesteuert */
}

.user-table thead {
    background: #666666;
    color: white;
}

.user-table th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
    font-size: inherit;
    white-space: nowrap; /* Header nicht umbrechen */
    line-height: 1.3;    /* Einheitliche Zeilenhöhe */
    vertical-align: middle; /* Inhalte mittig ausrichten */
}

.user-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: inherit;
}

/* Text Truncate - Lange Texte mit ... abschneiden */
.text-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-table tbody tr:hover {
    background: #f5f5f5;
}

/* Filter Row */
.filter-row {
    background: #f9f9f9;
}

.filter-row td {
    padding: 4px 12px;
}

/* Filter Inputs Container mit Flexbox für Button-Integration */
.filter-input-container {
    display: flex;
    gap: 5px;
    align-items: center;
}

.filter-input-container input {
    flex: 1;
}

.filter-row input, 
.filter-row select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Aktive Filter-Felder hervorheben */
.filter-row input.filter-active,
.filter-row select.filter-active {
    background-color: #fff3cd;
    border-color: #ffc107;
}

/* Filter Reset Button */
.filter-reset-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-reset-btn:hover {
    background: #c82333;
}

.filter-reset-btn i {
    font-size: 14px;
}

/* Action Icons */
.action-icons a {
    margin: 0 8px;
    color: #666666;
    text-decoration: none;
}

.action-icons a:hover {
    color: #d32f2f;
}

/* Pagination */
.pagination {
    margin-top: 15px;
    text-align: center;
}

.pagination a,
.pagination button {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    background: #263d86;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
}

.pagination a:hover,
.pagination button:hover {
    background: #1e2f6b;
}

/* Buttons im Paginator ohne Rahmen/Schatten darstellen */
.pagination button {
    border: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.pagination .current {
    background: #d32f2f;
}

/* Sticky Footer Paginator (angelehnt an alte App) */
#pager.pager-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(238, 247, 255, 0.8); /* leicht transparent */
    padding: 12px 0;
    z-index: 50;
    border-top: 1px solid rgba(0,0,0,0.05);
}

#pager .pagination {
    margin-top: 0; /* im Footer kein zusätzlicher Abstand */
}

/* Platz für festen Footer schaffen, damit nichts verdeckt wird */
.content-wrapper {
    padding-bottom: 70px; /* Höhe des Footers einkalkulieren */
}

/* Table wrapper als Positionierungs-Referenz für Buttons/Dropdowns */
.table-wrapper {
    position: relative;
}

/* Zebra Stripes */
.zebra-light { 
    background: #fff; 
}

.zebra-dark { 
    background: #f9f9f9; 
}

/* Column Visibility Toggle */
.column-toggle-btn {
    position: absolute;
    top: 4px;
    right: 10px;
    background: #ea5b27;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 999;
}

.column-toggle-btn:hover {
    background: #ea5b27;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.column-toggle-dropdown {
    position: absolute;
    right: 10px;
    top: 55px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.column-toggle-dropdown.active {
    display: block;
}

.column-toggle-item {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.column-toggle-item:hover {
    background: #f5f5f5;
}

.column-toggle-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.column-toggle-item label {
    cursor: pointer;
    user-select: none;
}

/* ============================================
   MODALBOX (Standard für alle Dialoge)
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

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

/* Modal Box */
.modal-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Wenn ein Modal geöffnet ist, Scrollen der Hauptseite verhindern */
html.modal-open,
body.modal-open {
    overflow: hidden;
}

/* Modal Header */
.modal-header {
    background: #666666;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Content */
.modal-content {
    padding: 25px;
}

/* Modal Footer */
.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Modal Buttons */
.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #263d86;
    color: white;
}

.modal-btn-primary:hover {
    background: #1a2a5e;
}

.modal-btn-danger {
    background: #d32f2f;
    color: white;
}

.modal-btn-danger:hover {
    background: #b71c1c;
}

.modal-btn-secondary {
    background: #e8e8e8;
    color: #333;
}

.modal-btn-secondary:hover {
    background: #d5d5d5;
}

/* Modal Varianten */
.modal-header.danger {
    background: #d32f2f;
}

.modal-header.warning {
    background: #ff9800;
}

.modal-header.success {
    background: #4caf50;
}

.modal-header.info {
    background: #2196f3;
}

/* ============================================
   HELP PANEL (Hilfe-System rechts)
   ============================================ */

/* Help Button Klein - Rechts oben */
.help-button {
    position: fixed;
    top: 155px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #263d86;
    color: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-button:hover {
    background: #1a2a5e;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Help Overlay */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Help Panel (Slide-in von rechts) */
.help-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
    z-index: 1101;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-panel.open {
    right: 0;
}

/* Help Panel Header */
.help-panel-header {
    background: #263d86;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.help-panel-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    line-height: 1;
}

.help-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Help Panel Content */
.help-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* Help Inhaltsverzeichnis */
.help-toc {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.help-toc h4 {
    margin: 0 0 15px 0;
    color: #263d86;
    font-size: 16px;
}

.help-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-toc li {
    margin-bottom: 8px;
}

.help-toc a {
    color: #263d86;
    text-decoration: none;
    transition: color 0.2s;
}

.help-toc a:hover {
    color: #d32f2f;
}

/* Help Section */
.help-section {
    margin-bottom: 35px;
}

.help-section h4 {
    color: #263d86;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #333;
}

.help-section ul, 
.help-section ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.help-section strong {
    color: #263d86;
}

/* Help Tip Box */
.help-tip {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.help-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.help-danger {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.help-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

/* Help Code Block */
.help-code {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
}

/* ============================================
   RESPONSIVE - Kommt später für Mobile
   ============================================ */

/* ============================================
   BENUTZEREINSTELLUNGEN
   ============================================ */
.settings-container {
    display: grid;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.settings-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-card h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #263d86;
    padding-bottom: 10px;
}

.settings-card h2 i {
    color: #263d86;
    margin-right: 8px;
}

.setting-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.setting-label p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.setting-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
}

.setting-input:focus {
    outline: none;
    border-color: #263d86;
}

.setting-hint {
    font-size: 12px;
    color: #999;
}

.setting-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: #263d86;
    color: white;
}

.btn-primary:hover {
    background: #1e2f6b;
}

.btn-secondary {
    background: #666;
    color: white;
}

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

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
}

.info-table td:first-child {
    width: 180px;
    color: #666;
}

.settings-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.settings-card ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.settings-card ul li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #263d86;
    font-weight: bold;
}

/* ============================================
   TOAST NOTIFICATIONS (unten links)
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInLeft 0.3s ease;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    font-size: 24px;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error .toast-icon {
    color: #dc3545;
}

.toast.warning .toast-icon {
    color: #ffc107;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
}

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

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

.toast.hiding {
    animation: slideOutLeft 0.3s ease;
}

/* ============================================
   MODAL SETTINGS (für Artikel/Lagerfächer etc.)
   ============================================ */

/* Modal Box Settings - größer für Formulare */
.modal-box-settings {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 95vw;
    max-height: 95vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Modal Header Settings */
.modal-header-settings {
    background: linear-gradient(135deg, #263d86 0%, #3a5aa0 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-settings h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Content Settings */
.modal-content-settings {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Modal Footer Settings */
.modal-footer-settings {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Info-Boxen kompakter für Modal */
.materialtyp-box {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background: #f8f9fa;
}

.materialtyp-box h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.materialtyp-box .info-content {
    font-size: 12px;
}

.materialtyp-box .info-content p {
    margin-bottom: 8px;
}

.materialtyp-box .info-content ul {
    margin: 5px 0;
    padding-left: 15px;
}

.materialtyp-box .info-content li {
    margin-bottom: 3px;
}

/* Fehlermeldungen für Live-Validierung */
.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 8px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    display: none;
}

/* Input-Styling für Validierung */
input.valid {
    border-color: #28a745 !important;
}

input.invalid {
    border-color: #dc3545 !important;
}

/* Artikel Modal Container */
.artikel-modal-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

/* Linke Seite - Eingabefelder */
.artikel-modal-left {
    padding: 30px;
    border-right: 1px solid #e9ecef;
    background: #fff;
}

.artikel-modal-left h3 {
    color: #263d86;
    font-size: 20px;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ea5b27;
}

/* Rechte Seite - Informationen */
.artikel-modal-right {
    padding: 30px;
    background: #f8f9fa;
}

/* Materialtyp Box */
.materialtyp-box {
    display: none;
}

.materialtyp-box.active {
    display: block;
}

.materialtyp-box h3 {
    color: #263d86;
    font-size: 18px;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.materialtyp-box .info-content {
    color: #495057;
    line-height: 1.6;
}

.materialtyp-box .info-content h4 {
    color: #263d86;
    font-size: 16px;
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.materialtyp-box .info-content h4:first-child {
    margin-top: 0;
}

.materialtyp-box .info-content p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.materialtyp-box .info-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.materialtyp-box .info-content li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* Form Rows in Modal - Zweispaltig */
.artikel-modal-left .form-row {
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 15px;
    align-items: center;
}

.artikel-modal-left .form-row label {
    margin-bottom: 0;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
    text-align: right;
    padding-right: 5px;
}

.artikel-modal-left .form-row input,
.artikel-modal-left .form-row select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.artikel-modal-left .form-row input:focus,
.artikel-modal-left .form-row select:focus {
    border-color: #ea5b27;
    box-shadow: 0 0 0 2px rgba(234, 91, 39, 0.2);
    outline: none;
}

/* Responsive für kleinere Bildschirme */
@media (max-width: 992px) {
    .artikel-modal-container {
        grid-template-columns: 1fr;
    }
    
    .artikel-modal-left {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .modal-box-settings {
        max-width: 90vw;
    }
}
Timestamp: Thu Jan 29 16:12:25 CET 2026
