/* ============================================
   BSE-Auftrag - Zentrales Stylesheet
   ============================================
   Version: 1.0
   Erstellt: 2026-01-27
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES (VARIABLEN)
   ============================================ */
:root {
    /* Primärfarben */
    --color-primary: #5D7B9D;
    --color-primary-hover: #4a6380;
    --color-primary-dark: #284775;

    /* Sekundärfarben */
    --color-secondary: #6c757d;
    --color-secondary-hover: #5a6268;

    /* Hintergrundfarben */
    --color-bg-light: #f5f5f5;
    --color-bg-white: #FFFFFF;
    --color-bg-input: #ffffcc;

    /* Textfarben */
    --color-text-dark: #333333;
    --color-text-light: #FFFFFF;
    --color-text-muted: #6c757d;

    /* Tabellenfarben */
    --color-table-header: #5D7B9D;
    --color-table-row-odd: #F7F6F3;
    --color-table-row-even: #FFFFFF;
    --color-table-hover: #E2DED6;

    /* Border-Farben */
    --color-border: #ddd;
    --color-border-light: #e0e0e0;
    --color-border-dark: #333333;

    /* Gradient (Login-Seite) */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Schriftarten */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Schriftgroessen */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 32px;

    /* Abstände */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border-Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-round: 50%;

    /* Schatten */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(150, 150, 150, 0.3);

    /* Transitionen */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease-out;
}

/* ============================================
   2. CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-dark);
}

h1 { font-size: var(--font-size-xxl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ============================================
   4. BUTTONS
   ============================================ */
.btn,
.button,
input[type="submit"],
input[type="button"],
button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--color-primary);
    color: var(--color-text-light);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
    background-color: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:active,
.button:active,
input[type="submit"]:active,
input[type="button"]:active,
button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:disabled,
.button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button Varianten */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
}

.btn-success {
    background-color: #28a745;
    color: var(--color-text-light);
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: var(--color-text-light);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: var(--color-text-dark);
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-md);
}

/* ============================================
   5. FORMULARE
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: inline-block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text-dark);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(93, 123, 157, 0.1);
}

input[type="search"] {
    background-color: var(--color-bg-input);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    cursor: pointer;
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: var(--spacing-xs);
    cursor: pointer;
}

/* Form Input Klassen */
.form-input {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-height: 36px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(93, 123, 157, 0.1);
}

/* Kleine Eingabefelder (EK, VK, Menge, etc.) */
.form-input.form-input-small {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
}

/* Mittlere Eingabefelder */
.form-input.form-input-medium {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
}

/* Extra kleine Eingabefelder (Staffelmengen) */
.form-input.form-input-xs {
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
}

/* Form Input Gruppen (nebeneinander) */
.form-input-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Form Labels im Grid */
.form-label {
    font-weight: 500;
    color: var(--color-text-dark);
    font-size: 14px;
    padding: 8px 0;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 15px;
    align-items: center;
}

/* Inputs in Gruppen */
.form-input-group .form-input {
    width: auto !important;
    flex-shrink: 0;
}

.form-input-group select {
    width: auto !important;
    flex-shrink: 0;
}

/* Dropdown Einheit/MwSt */
.form-input.form-input-dropdown,
select.form-input-dropdown {
    width: 75px !important;
    min-width: 75px !important;
}

/* ============================================
   6. TABELLEN
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    background-color: var(--color-bg-white);
}

th, td {
    padding: 10px 8px;
    text-align: left;
    border: 1px solid var(--color-border);
    font-size: 13px;
}

thead th,
.table-header {
    background-color: var(--color-table-header);
    color: var(--color-text-light);
    font-weight: 600;
}

tbody tr:nth-child(odd) {
    background-color: var(--color-table-row-odd);
}

tbody tr:nth-child(even) {
    background-color: var(--color-table-row-even);
}

tbody tr:hover {
    background-color: var(--color-table-hover);
    cursor: pointer;
}

tfoot td,
.table-footer {
    background-color: var(--color-table-header);
    color: var(--color-text-light);
    font-weight: 600;
}

/* ============================================
   6.1 GRIDVIEW STYLES (ASP.NET)
   ============================================ */
.GridViewStyle {
    width: 100%;
    border: 1px solid #ddd;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background: var(--color-bg-white);
}

/* Icon-Buttons in GridView-Zellen kompakt */
.GridViewStyle td img,
.GridViewStyle td input[type="image"] {
    display: block;
    margin: 0 auto;
}

/* ImageButton-Spalten in GridViews - kompakt */
.icon-col,
th.icon-col,
td.icon-col,
.GridViewStyle th.icon-col,
.GridViewStyle td.icon-col,
.GridViewStyle .icon-col {
    width: 45px !important;
    max-width: 50px !important;
    min-width: 35px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 4px 2px !important;
    text-align: center !important;
}

.icon-col img,
.icon-col input[type="image"] {
    display: block;
    margin: 0 auto;
    max-width: 24px;
    height: auto;
}

.HeaderStyle {
    background-color: var(--color-primary) !important;
    color: var(--color-text-light) !important;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.RowStyle {
    background-color: var(--color-bg-white) !important;
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 13px;
    color: var(--color-text-dark) !important;
}

.RowStyle td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border-light);
}

.AlternatingRowStyle {
    background-color: #f9f9f9 !important;
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 13px;
    color: var(--color-text-dark) !important;
}

.AlternatingRowStyle td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--color-border-light);
}

/* GridView Header Cells */
.HeaderStyle th,
.GridViewStyle th {
    background-color: #5D7B9D !important;
    color: white !important;
    padding: 10px 6px !important;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border: none !important;
    white-space: nowrap;
}

/* GridView Row Cells */
.RowStyle td,
.AlternatingRowStyle td,
.GridViewStyle td {
    padding: 8px 6px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-left: none !important;
    border-right: none !important;
    font-size: 13px;
    vertical-align: middle;
}

/* GridView Spaltenbreiten */
.col-artikelnr { width: 100px; }
.col-artikeltext { width: auto; }
.col-preis { width: 45px; text-align: right; }
.col-einheit { width: 40px; }
.col-bestand { width: 45px; text-align: right; }

/* GridView Zeilen-Status */
.GridViewStyle tr.unread-row {
    background-color: #e8e8e8 !important;
    font-weight: 600;
}

.GridViewStyle tr.priority-high {
    background-color: #ffe6e6 !important;
}

.GridViewStyle tr.priority-medium {
    background-color: #fff8e1 !important;
}

.GridViewStyle tr.completed {
    background-color: #e8f5e9 !important;
}

.GridViewStyle tr.archived,
.GridViewStyle tr.inactive {
    background-color: #d5d5d5 !important;
    color: #666 !important;
}

/* Override für schwarze Hintergründe aus Code-Behind */
.GridViewStyle tr[style*="background-color: Black"],
.GridViewStyle tr[style*="background-color: black"],
.GridViewStyle tr[style*="background-color: #000000"],
.GridViewStyle tr[style*="background-color: #000"],
.GridViewStyle tr[style*="background:Black"],
.GridViewStyle tr[style*="background:black"] {
    background-color: #d5d5d5 !important;
    color: #333 !important;
}

.GridViewStyle tr[style*="background-color: Black"] td,
.GridViewStyle tr[style*="background-color: black"] td,
.GridViewStyle tr[style*="background-color: #000000"] td,
.GridViewStyle tr[style*="background-color: #000"] td {
    color: #333 !important;
}

.GridViewStyle tr:hover {
    background-color: #e8f0f7 !important;
    cursor: pointer;
}

/* GridView Footer */
.FooterStyle {
    background-color: var(--color-primary) !important;
    color: var(--color-text-light) !important;
    padding: 10px 8px;
    font-weight: 600;
}

.FooterStyle td {
    padding: 10px 8px;
}

/* GridView Pager - KOMPAKT */
.PagerStyle {
    background-color: #f9f9f9;
    padding: 10px 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.PagerStyle table {
    margin: 0;
    border: none;
    background: transparent;
}

.PagerStyle table td {
    padding: 0 2px;
    border: none;
}

.PagerStyle a {
    color: var(--color-primary);
    padding: 5px 10px;
    margin: 0 1px;
    text-decoration: none;
    border: 1px solid var(--color-primary);
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 30px;
    text-align: center;
}

.PagerStyle a:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.PagerStyle span {
    color: var(--color-text-light);
    background-color: var(--color-primary);
    padding: 5px 10px;
    margin: 0 1px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid var(--color-primary);
    min-width: 30px;
    text-align: center;
}

/* Zeilen pro Seite Auswahl */
.rows-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-dark);
}

.rows-per-page label {
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

.rows-per-page select {
    width: auto;
    min-width: 60px;
    padding: 5px 8px;
    font-size: 12px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background-color: var(--color-bg-white);
    cursor: pointer;
}

.rows-per-page select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Grid Toolbar - Zeilen pro Seite Auswahl */
.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
    gap: 10px;
}

.grid-toolbar .rows-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grid-toolbar .rows-per-page label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin: 0;
}

.page-size-select {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-bg-white);
    cursor: pointer;
    min-width: 70px;
}

.page-size-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Grid Container mit Pager-Footer */
.grid-container {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.grid-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 10px;
}

.grid-footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.grid-footer-center {
    display: flex;
    align-items: center;
    gap: 2px;
}

.grid-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Alte GridView Klassen (Kompatibilität) */
.gridview {
    width: 100%;
    border-collapse: collapse;
}

.gridview th {
    background-color: var(--color-table-header);
    color: var(--color-text-light);
    padding: 12px 8px;
    font-size: 13px;
}

.gridview td {
    padding: 10px 8px;
    border: 1px solid var(--color-border);
    font-size: 13px;
}

/* ============================================
   7. HEADER & NAVIGATION
   ============================================ */

/* Haupt-Container */
.main-container,
.dashboard-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    transition: margin-right 0.3s ease;
}

.main-container.panel-open,
.dashboard-container.panel-open {
    margin-right: 320px;
}

/* Header Section - Einheitlicher Header für alle Seiten */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 20px;
    gap: 20px;
}

/* Seitenname links */
.header-title-container {
    flex: 0 0 auto;
    min-width: 150px;
}

.page-title-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    white-space: nowrap;
}

/* Navigation in der Mitte */
.header-navigation-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Logo rechts */
.header-logo {
    flex: 0 0 auto;
    width: 200px;
    text-align: right;
}

.header-logo img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

/* Mobile Menu Toggle - versteckt auf Desktop, sichtbar auf Mobile */
button.mobile-menu-toggle,
.mobile-menu-toggle {
    display: none !important;
    background-color: var(--color-primary);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Alte Header-Klassen (Kompatibilität) */
.header,
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-bg-white);
    border-bottom: 2px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.header-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--color-text-dark);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    right: 0;
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content .dropdown-item,
.dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    box-shadow: none;
}

.dropdown-content .dropdown-item:hover,
.dropdown-content button:hover {
    background-color: #f1f1f1;
    transform: none;
    box-shadow: none;
}

/* Side Panel Styles */
.side-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: white;
    border-left: 2px solid var(--color-primary);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    right: 0;
}

.side-panel .panel-header {
    background: var(--color-primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-panel .panel-title {
    font-size: 18px;
    font-weight: 600;
}

.panel-close {
    background: transparent;
    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.3s;
    box-shadow: none;
}

.panel-close:hover {
    background: rgba(255,255,255,0.2);
    transform: none;
    box-shadow: none;
}

.panel-switcher {
    display: flex;
    background: #f0f0f0;
    padding: 0;
    margin: 0;
}

.panel-tab {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 13px;
    box-shadow: none;
}

.panel-tab.active {
    background: white;
    border-bottom-color: var(--color-primary);
    color: var(--color-primary);
}

.panel-tab:hover {
    background: #e0e0e0;
    transform: none;
    box-shadow: none;
}

.panel-content {
    flex: 1;
    overflow: hidden;
}

.panel-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Toggle Button für Side Panel */
.panel-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 15px 8px;
    cursor: pointer;
    z-index: 999;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
    writing-mode: vertical-rl;
    font-weight: 600;
    font-size: 14px;
}

.panel-toggle:hover {
    background: var(--color-primary-hover);
    padding-right: 12px;
}

.panel-toggle.panel-open {
    right: 320px;
}

/* Section Styles */
.content-section,
.ticket-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
}

/* Icon Buttons */
.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
    height: 24px;
    width: auto;
    box-shadow: none;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: none;
}

/* Popup Styles für Modals */
.Popup,
.popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 3px solid #333;
    border-radius: 8px;
    width: 95vw;
    max-width: 1400px;
    max-height: 90vh;
    overflow: auto;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.Popup iframe,
.popup-modal iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.Popup_Zeit {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 3px solid #333;
    border-radius: 8px;
    width: 600px;
    max-width: 95vw;
    z-index: 1001;
}

.Popup_Zeit iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.PopupEinstellungen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 3px solid #333;
    border-radius: 8px;
    width: 95vw;
    max-width: 1600px;
    max-height: 90vh;
    overflow: auto;
    z-index: 1001;
}

.PopupEinstellungen iframe {
    width: 100%;
    height: 700px;
    border: none;
}

.PopupBenutzerverwaltung {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 3px solid #333;
    border-radius: 8px;
    width: 95vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow: auto;
    z-index: 1001;
}

.PopupBenutzerverwaltung iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.Background {
    background-color: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* ============================================
   8. FOOTER
   ============================================ */
.footer,
.page-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-align: center;
}

/* ============================================
   9. CARDS & PANELS
   ============================================ */
.card,
.panel {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header,
.panel-header {
    padding: var(--spacing-md);
    background-color: var(--color-primary);
    color: var(--color-text-light);
    font-weight: 600;
}

.card-body,
.panel-body {
    padding: var(--spacing-md);
}

.card-footer,
.panel-footer {
    padding: var(--spacing-md);
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
}

/* ============================================
   10. MODALS & POPUPS
   ============================================ */
.modal-overlay,
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal,
.popup {
    background-color: var(--color-bg-white);
    border: 3px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
    animation: slideIn var(--transition-slow);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header,
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
}

.modal-title,
.popup-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.modal-close,
.popup-close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    box-shadow: none;
}

.modal-close:hover,
.popup-close:hover {
    color: var(--color-text-dark);
    background: none;
    box-shadow: none;
}

.modal-body,
.popup-body {
    padding: var(--spacing-md) 0;
}

.modal-footer,
.popup-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

/* Popup Groessen */
.popup-sm { width: 400px; }
.popup-md { width: 600px; }
.popup-lg { width: 800px; }
.popup-xl { width: 1000px; }
.popup-xxl { width: 1200px; }

/* ============================================
   11. ALERTS & NACHRICHTEN
   ============================================ */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger,
.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ============================================
   12. PAGINATION
   ============================================ */
.pagination,
.pager {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0;
}

.pagination a,
.pager a,
.page-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.pagination a:hover,
.pager a:hover,
.page-link:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-decoration: none;
}

.pagination .active a,
.pager .active a,
.page-link.active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-color: var(--color-primary);
    font-weight: 600;
}

/* Pagination mit Zeilen-Auswahl */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    font-size: 13px;
    color: var(--color-text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ============================================
   13. BADGES & LABELS
   ============================================ */
.badge,
.label {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-primary { background-color: var(--color-primary); color: var(--color-text-light); }
.badge-secondary { background-color: var(--color-secondary); color: var(--color-text-light); }
.badge-success { background-color: #28a745; color: var(--color-text-light); }
.badge-danger { background-color: #dc3545; color: var(--color-text-light); }
.badge-warning { background-color: #ffc107; color: var(--color-text-dark); }
.badge-info { background-color: #17a2b8; color: var(--color-text-light); }

/* ============================================
   14. UTILITIES
   ============================================ */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-muted { color: var(--color-text-muted); }
.text-white { color: var(--color-text-light); }
.text-dark { color: var(--color-text-dark); }

/* Background Colors */
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-light { background-color: var(--color-bg-light); }
.bg-white { background-color: var(--color-bg-white); }

/* Margins */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-xs); }
.m-2 { margin: var(--spacing-sm); }
.m-3 { margin: var(--spacing-md); }
.m-4 { margin: var(--spacing-lg); }
.m-5 { margin: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

/* Paddings */
.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

/* Width & Height */
.w-100 { width: 100%; }
.w-auto { width: auto; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

/* Borders */
.border { border: 1px solid var(--color-border); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }
.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-circle { border-radius: var(--radius-round); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-scroll { overflow: scroll; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

/* ============================================
   15. RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .d-lg-none { display: none; }
}

@media (max-width: 768px) {
    :root {
        --font-size-xxl: 28px;
        --font-size-xl: 22px;
        --font-size-lg: 16px;
    }

    .header,
    .page-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    /* Header Section Responsive */
    .header-section {
        flex-direction: column;
        gap: 15px;
        padding: 10px 0;
    }

    .header-title-container {
        order: 1;
        text-align: center;
        min-width: auto;
    }

    .page-title-label {
        font-size: 20px;
    }

    .header-navigation-container {
        order: 2;
        width: 100%;
    }

    .header-navigation {
        justify-content: center;
        gap: 5px;
    }

    .header-navigation .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .header-logo {
        order: 3;
        width: 150px;
        text-align: center;
    }

    button.mobile-menu-toggle,
    .mobile-menu-toggle {
        display: block !important;
    }

    .header-navigation {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #f9f9f9;
        padding: 10px;
        border-radius: 4px;
    }

    .header-navigation.show {
        display: flex;
    }

    /* Side Panel Responsive */
    .side-panel {
        width: 100%;
        right: -100%;
    }

    .side-panel.open {
        right: 0;
    }

    .panel-toggle {
        display: none;
    }

    .main-container.panel-open,
    .dashboard-container.panel-open {
        margin-right: 0;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .popup,
    .modal,
    .Popup,
    .Popup_Zeit {
        width: 95vw !important;
        padding: 15px;
    }

    .Popup iframe,
    .Popup_Zeit iframe {
        height: 300px;
    }

    table {
        font-size: var(--font-size-sm);
    }

    th, td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .d-md-none { display: none; }
    .d-md-block { display: block; }

    .dropdown-content {
        position: fixed;
        right: 10px;
        left: auto;
        min-width: 180px;
    }
}

@media (max-width: 576px) {
    :root {
        --font-size-xxl: 24px;
        --font-size-xl: 20px;
        --spacing-lg: 20px;
        --spacing-xl: 24px;
    }

    .btn,
    .button,
    input[type="submit"],
    input[type="button"],
    button {
        width: 100%;
        padding: var(--spacing-md);
    }

    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
}

@media (max-width: 480px) {
    .header-title {
        font-size: var(--font-size-lg);
    }

    .card-body,
    .panel-body {
        padding: var(--spacing-sm);
    }
}

/* ============================================
   16. PRINT STYLES
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background-color: white;
        color: black;
    }

    .header,
    .footer,
    .nav-menu {
        display: none;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .btn,
    .button {
        display: none;
    }
}

/* ============================================
   17. ANIMATIONEN
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeIn { animation: fadeIn var(--transition-normal); }
.animate-slideIn { animation: slideInFromTop var(--transition-slow); }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ============================================
   18. LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-round);
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* ============================================
   19. DROPZONE FILE UPLOAD
   ============================================ */
.dropzone-container {
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    background-color: var(--color-bg-light);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.dropzone-container:hover,
.dropzone-container.dz-drag-hover {
    border-color: var(--color-primary-hover);
    background-color: rgba(93, 123, 157, 0.1);
}

/* ============================================
   20. SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}
